mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 19:13:25 -08:00
Compare commits
4 commits
d0991b68f6
...
514014dc00
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
514014dc00 | ||
|
|
870ab23608 | ||
|
|
d603a2bb6a | ||
|
|
b1f4d1e99d |
1081 changed files with 12003 additions and 1772 deletions
|
|
@ -1,7 +1,10 @@
|
|||
#include "lag_monitor.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
#include <QEvent>
|
||||
#include <QMessageLogger>
|
||||
#include <QTimer>
|
||||
|
||||
LagMonitor::LagMonitor(QObject *parent) : QObject(parent)
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@
|
|||
#ifndef LAG_MONITOR_H
|
||||
#define LAG_MONITOR_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QElapsedTimer>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(LagMonitorLog, "lag_monitor");
|
||||
|
||||
class QEvent;
|
||||
class QTimer;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,7 +5,11 @@
|
|||
|
||||
#include "latency_graph_widget.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QPainter>
|
||||
#include <QRectF>
|
||||
#include <QtGlobal>
|
||||
#include <qnumeric.h>
|
||||
|
||||
LatencyGraphWidget::LatencyGraphWidget(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
#include <QList>
|
||||
#include <QWidget>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
/**
|
||||
* @brief Bar graph of recent network round-trip samples.
|
||||
|
|
|
|||
|
|
@ -6,11 +6,15 @@
|
|||
#include "latency_status_widget.h"
|
||||
|
||||
#include "latency_graph_widget.h"
|
||||
#include "latency_tracker.h"
|
||||
|
||||
#include <QEvent>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QObject>
|
||||
#include <QPoint>
|
||||
#include <QVBoxLayout>
|
||||
#include <qnamespace.h>
|
||||
|
||||
LatencyStatusWidget::LatencyStatusWidget(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@
|
|||
#define LATENCY_STATUS_WIDGET_H
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/network/client/abstract/latency_tracker.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QLabel;
|
||||
class LatencyGraphWidget;
|
||||
|
|
|
|||
|
|
@ -8,14 +8,25 @@
|
|||
#include "../interface/widgets/dialogs/dlg_forgot_password_reset.h"
|
||||
#include "../interface/widgets/dialogs/dlg_register.h"
|
||||
#include "../interface/widgets/utility/get_text_with_max.h"
|
||||
#include "libcockatrice/protocol/pb/event_connection_closed.pb.h"
|
||||
#include "libcockatrice/protocol/pb/event_server_shutdown.pb.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QLineEdit>
|
||||
#include <QList>
|
||||
#include <QMessageBox>
|
||||
#include <QPixmap>
|
||||
#include <QStringList>
|
||||
#include <QStringLiteral>
|
||||
#include <QThread>
|
||||
#include <libcockatrice/network/client/remote/remote_client.h>
|
||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||
#include <libcockatrice/settings/servers_settings.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
ConnectionController::ConnectionController(QWidget *dialogParent, QObject *parent)
|
||||
: QObject(parent), dialogParent(dialogParent)
|
||||
|
|
|
|||
|
|
@ -2,17 +2,22 @@
|
|||
#define COCKATRICE_REMOTE_CONNECTION_CONTROLLER_H
|
||||
|
||||
#include "abstract_client.h"
|
||||
#include "latency_tracker.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QThread>
|
||||
#include <libcockatrice/protocol/pb/event_connection_closed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_server_shutdown.pb.h>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class RemoteClient;
|
||||
class ServerInfo_User;
|
||||
class DlgConnect;
|
||||
class Event_ConnectionClosed;
|
||||
class Event_ServerShutdown;
|
||||
class QThread;
|
||||
class QWidget;
|
||||
template <typename T> class QList;
|
||||
|
||||
/**
|
||||
* Owns the RemoteClient and its worker thread.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,22 @@
|
|||
#include "deck_stats_interface.h"
|
||||
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/deck_list/tree/inner_deck_list_node.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QDesktopServices>
|
||||
#include <QMessageBox>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QRegularExpression>
|
||||
#include <QRegularExpressionMatch>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
#include <QUrlQuery>
|
||||
#include <functional>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/deck_list/tree/deck_list_card_node.h>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
#ifndef DECKSTATS_INTERFACE_H
|
||||
#define DECKSTATS_INTERFACE_H
|
||||
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <QObject>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QByteArray;
|
||||
class QNetworkAccessManager;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,28 @@
|
|||
#include "tapped_out_interface.h"
|
||||
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/deck_list/tree/inner_deck_list_node.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QDebug>
|
||||
#include <QDesktopServices>
|
||||
#include <QList>
|
||||
#include <QMessageBox>
|
||||
#include <QMessageLogger>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QRegularExpression>
|
||||
#include <QRegularExpressionMatch>
|
||||
#include <QRegularExpressionMatchIterator>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
#include <QUrlQuery>
|
||||
#include <QVariant>
|
||||
#include <functional>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/deck_list/tree/deck_list_card_node.h>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <QLoggingCategory>
|
||||
#include <QObject>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(TappedOutInterfaceLog, "tapped_out_interface");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "deck_link_to_api_transformer.h"
|
||||
|
||||
#include <QRegularExpression>
|
||||
#include <QRegularExpressionMatch>
|
||||
|
||||
namespace DeckLinkToApiTransformer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,21 +1,35 @@
|
|||
#include "spoiler_background_updater.h"
|
||||
|
||||
#include "../../../../interface/window_main.h"
|
||||
#include "../../../../main.h"
|
||||
#include "../../../settings/cache_settings.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QCryptographicHash>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QIODevice>
|
||||
#include <QList>
|
||||
#include <QLocale>
|
||||
#include <QMessageLogger>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QSharedPointer>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QTimeZone>
|
||||
#include <QUrl>
|
||||
#include <QtConcurrent>
|
||||
#include <QtConcurrentRun>
|
||||
#include <QtGlobal>
|
||||
#include <functional>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/download_settings.h>
|
||||
#include <libcockatrice/settings/paths_settings.h>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
#include <version_string.h>
|
||||
|
||||
#define SPOILERS_STATUS_URL "https://raw.githubusercontent.com/Cockatrice/Magic-Spoiler/files/SpoilerSeasonEnabled"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,11 @@
|
|||
#include <QByteArray>
|
||||
#include <QLoggingCategory>
|
||||
#include <QObject>
|
||||
#include <QProcess>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QProcess;
|
||||
class QUrl;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(SpoilerBackgroundUpdaterLog, "spoiler_background_updater");
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,12 @@
|
|||
|
||||
#ifndef CLIENT_UPDATE_CHECKER_H
|
||||
#define CLIENT_UPDATE_CHECKER_H
|
||||
#include <QObject>
|
||||
#include "release_channel.h"
|
||||
|
||||
class Release;
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
/**
|
||||
* We use a singleton instance of UpdateChannel, which can cause interference and feedback loops when multiple objects
|
||||
|
|
|
|||
|
|
@ -2,15 +2,27 @@
|
|||
|
||||
#include "version_string.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QMessageBox>
|
||||
#include <QJsonParseError>
|
||||
#include <QJsonValue>
|
||||
#include <QMap>
|
||||
#include <QMessageLogger>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QRegularExpression>
|
||||
#include <QSysInfo>
|
||||
#include <QRegularExpressionMatch>
|
||||
#include <QUrl>
|
||||
#include <QVariant>
|
||||
#include <QVariantMap>
|
||||
#include <QtGlobal>
|
||||
#include <optional>
|
||||
#include <qnamespace.h>
|
||||
#include <qprocessordetection.h>
|
||||
|
||||
#if defined(Q_OS_MACOS)
|
||||
#include <sys/sysctl.h>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@
|
|||
#include <QLoggingCategory>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVariantMap>
|
||||
#include <QVariantList>
|
||||
#include <optional>
|
||||
#include <qtmetamacros.h>
|
||||
#include <utility>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(ReleaseChannelLog, "release_channel");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
#include "update_downloader.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QChar>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QIODevice>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkRequest>
|
||||
#include <QUrl>
|
||||
#include <QVariant>
|
||||
|
||||
UpdateDownloader::UpdateDownloader(QObject *parent) : QObject(parent), response(nullptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,8 +7,14 @@
|
|||
#ifndef COCKATRICE_UPDATEDOWNLOADER_H
|
||||
#define COCKATRICE_UPDATEDOWNLOADER_H
|
||||
|
||||
#include <QNetworkReply>
|
||||
#include <QObject>
|
||||
#include <QtNetwork>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QNetworkAccessManager;
|
||||
|
||||
class UpdateDownloader : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,15 +2,20 @@
|
|||
|
||||
#include "../network/update/client/release_channel.h"
|
||||
#include "card_counter_settings.h"
|
||||
#include "libcockatrice/interfaces/interface_card_database_path_provider.h"
|
||||
#include "shortcuts_settings.h"
|
||||
#include "version_string.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QGlobalStatic>
|
||||
#include <QMessageLogger>
|
||||
#include <QSettings>
|
||||
#include <QSharedPointer>
|
||||
#include <QStandardPaths>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/appearance_settings.h>
|
||||
#include <libcockatrice/settings/cache_storage_settings.h>
|
||||
#include <libcockatrice/settings/card_database_settings.h>
|
||||
|
|
|
|||
|
|
@ -7,11 +7,13 @@
|
|||
#ifndef SETTINGSCACHE_H
|
||||
#define SETTINGSCACHE_H
|
||||
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <libcockatrice/interfaces/interface_card_database_path_provider.h>
|
||||
#include <libcockatrice/interfaces/interface_network_settings_provider.h>
|
||||
#include <libcockatrice/utility/macros.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(SettingsCacheLog, "settings_cache");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
#include "card_counter_settings.h"
|
||||
|
||||
#include "libcockatrice/settings/settings_manager.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QColor>
|
||||
#include <QSettings>
|
||||
#include <QVariant>
|
||||
#include <QtMath>
|
||||
#include <iterator>
|
||||
|
||||
class QObject;
|
||||
|
||||
CardCounterSettings::CardCounterSettings(const QString &settingsPath, QObject *parent)
|
||||
: SettingsManager(settingsPath + "card_counters.ini", "cards", "counters", parent)
|
||||
|
|
|
|||
|
|
@ -7,10 +7,12 @@
|
|||
#ifndef CARD_COUNTER_SETTINGS_H
|
||||
#define CARD_COUNTER_SETTINGS_H
|
||||
|
||||
#include <QString>
|
||||
#include <libcockatrice/settings/settings_manager.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QSettings;
|
||||
class QColor;
|
||||
class QObject;
|
||||
|
||||
class CardCounterSettings : public SettingsManager
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,24 @@
|
|||
#include "cache_settings.h"
|
||||
#include "shortcuts_settings.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QAbstractItemView>
|
||||
#include <QFont>
|
||||
#include <QHash>
|
||||
#include <QHeaderView>
|
||||
#include <QList>
|
||||
#include <QModelIndex>
|
||||
#include <QRegularExpression>
|
||||
#include <QSharedPointer>
|
||||
#include <QStandardItem>
|
||||
#include <QStandardItemModel>
|
||||
#include <QStringList>
|
||||
#include <QVariant>
|
||||
#include <algorithm>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QObject;
|
||||
class QWidget;
|
||||
|
||||
ShortcutFilterProxyModel::ShortcutFilterProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,8 +8,13 @@
|
|||
#define SHORTCUT_TREEVIEW_H
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStandardItemModel>
|
||||
#include <QString>
|
||||
#include <QTreeView>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QObject;
|
||||
class QStandardItemModel;
|
||||
class QWidget;
|
||||
|
||||
/**
|
||||
* Custom implementation of QSortFilterProxyModel that appends the source and parent strings together when filtering
|
||||
|
|
|
|||
|
|
@ -2,9 +2,13 @@
|
|||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QMap>
|
||||
#include <QMessageBox>
|
||||
#include <QMessageLogger>
|
||||
#include <QSettings>
|
||||
#include <QSharedPointer>
|
||||
#include <QStringList>
|
||||
#include <utility>
|
||||
#include <QVariant>
|
||||
|
||||
ShortcutKey::ShortcutKey(const QString &_name, QList<QKeySequence> _sequence, ShortcutGroup::Groups _group)
|
||||
: QList<QKeySequence>(_sequence), name(_name), group(_group)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,18 @@
|
|||
#define SHORTCUTSSETTINGS_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QByteArray>
|
||||
#include <QChar>
|
||||
#include <QHash>
|
||||
#include <QKeySequence>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QSettings>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
#include <utility>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(ShortcutsSettingsLog, "shortcuts_settings");
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,15 @@
|
|||
|
||||
#include <QApplication>
|
||||
#include <QAudioOutput>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QList>
|
||||
#include <QMediaPlayer>
|
||||
#include <QMessageLogger>
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/sound_settings.h>
|
||||
|
||||
#define DEFAULT_THEME_NAME "Default"
|
||||
|
|
|
|||
|
|
@ -7,17 +7,17 @@
|
|||
#ifndef SOUNDENGINE_H
|
||||
#define SOUNDENGINE_H
|
||||
|
||||
#include <QAudioOutput>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMap>
|
||||
#include <QMediaPlayer>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QAudioOutput;
|
||||
class QMediaPlayer;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(SoundEngineLog, "sound_engine");
|
||||
|
||||
class QBuffer;
|
||||
|
||||
typedef QMap<QString, QString> QStringMap;
|
||||
|
||||
class SoundEngine : public QObject
|
||||
|
|
|
|||
|
|
@ -1,9 +1,27 @@
|
|||
#include "deck_filter_string.h"
|
||||
|
||||
#include "../interface/deck_loader/loaded_deck.h"
|
||||
#include "libcockatrice/card/card_localization.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
#include "libcockatrice/deck_list/tree/deck_list_card_node.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
#include <QList>
|
||||
#include <QMessageLogger>
|
||||
#include <QSharedPointer>
|
||||
#include <algorithm>
|
||||
#include <any>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/filters/filter_string.h>
|
||||
#include <libcockatrice/utility/peglib.h>
|
||||
#include <mutex>
|
||||
#include <qnamespace.h>
|
||||
#include <stddef.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
static peg::parser search(R"(
|
||||
Start <- QueryPartList
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@
|
|||
#ifndef DECK_FILTER_STRING_H
|
||||
#define DECK_FILTER_STRING_H
|
||||
|
||||
#include "../interface/deck_loader/loaded_deck.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
#include <QString>
|
||||
#include <functional>
|
||||
#include <libcockatrice/card/card_localization.h>
|
||||
|
||||
struct CardSearchLanguage;
|
||||
struct LoadedDeck;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(DeckFilterStringLog, "deck_filter_string");
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,8 +5,15 @@
|
|||
|
||||
#include <QComboBox>
|
||||
#include <QGridLayout>
|
||||
#include <QIcon>
|
||||
#include <QPushButton>
|
||||
#include <QSizePolicy>
|
||||
#include <QString>
|
||||
#include <QStringLiteral>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/filters/filter_card.h>
|
||||
#include <stddef.h>
|
||||
|
||||
FilterBuilder::FilterBuilder(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
#define FILTERBUILDER_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
class LineEditUnfocusable;
|
||||
class CardFilter;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
#include "filter_tree_model.h"
|
||||
|
||||
#include <QFlags>
|
||||
#include <QFont>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <functional>
|
||||
#include <libcockatrice/filters/filter_card.h>
|
||||
#include <libcockatrice/filters/filter_tree.h>
|
||||
#include <stddef.h>
|
||||
|
||||
class QObject;
|
||||
|
||||
FilterTreeModel::FilterTreeModel(QObject *parent) : QAbstractItemModel(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,11 +8,15 @@
|
|||
#define FILTERTREEMODEL_H
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QList>
|
||||
#include <QModelIndex>
|
||||
#include <libcockatrice/filters/filter_card.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class FilterTree;
|
||||
class CardFilter;
|
||||
class FilterTreeNode;
|
||||
class QObject;
|
||||
|
||||
class FilterTreeModel : public QAbstractItemModel
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,21 @@
|
|||
#include "syntax_help.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFlags>
|
||||
#include <QIODevice>
|
||||
#include <QLineEdit>
|
||||
#include <QMessageLogger>
|
||||
#include <QObject>
|
||||
#include <QRegularExpression>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QTextBrowser>
|
||||
#include <QTextDocument>
|
||||
#include <QTextStream>
|
||||
#include <QUrl>
|
||||
#include <qnamespace.h>
|
||||
|
||||
/**
|
||||
* Creates the card search syntax help window
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@
|
|||
#ifndef SEARCH_SYNTAX_HELP_H
|
||||
#define SEARCH_SYNTAX_HELP_H
|
||||
|
||||
#include <QLineEdit>
|
||||
#include <QLoggingCategory>
|
||||
#include <QTextBrowser>
|
||||
|
||||
class QLineEdit;
|
||||
class QTextBrowser;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(SyntaxHelpLog, "syntax_help");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,18 @@
|
|||
#include "abstract_game.h"
|
||||
|
||||
#include "../interface/widgets/tabs/tab_game.h"
|
||||
#include "game_event_handler.h"
|
||||
#include "game_meta_info.h"
|
||||
#include "game_state.h"
|
||||
#include "libcockatrice/protocol/pb/game_replay.pb.h"
|
||||
#include "player/player_info.h"
|
||||
#include "player/player_logic.h"
|
||||
#include "player/player_manager.h"
|
||||
#include "zones/card_zone_logic.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
|
||||
class AbstractClient;
|
||||
|
||||
AbstractGame::AbstractGame(QObject *_parent) : QObject(_parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,15 +7,18 @@
|
|||
#ifndef COCKATRICE_ABSTRACT_GAME_H
|
||||
#define COCKATRICE_ABSTRACT_GAME_H
|
||||
|
||||
#include "game_event_handler.h"
|
||||
#include "game_meta_info.h"
|
||||
#include "game_state.h"
|
||||
#include "player/player_manager.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <libcockatrice/protocol/pb/game_replay.pb.h>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardItem;
|
||||
class AbstractClient;
|
||||
class GameEventHandler;
|
||||
class GameMetaInfo;
|
||||
class GameReplay;
|
||||
class GameState;
|
||||
class PlayerManager;
|
||||
|
||||
class AbstractGame : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#include "arrow_registry.h"
|
||||
|
||||
#include "../game_graphics/board/arrow_item.h"
|
||||
#include "board/arrow_data.h"
|
||||
|
||||
#include <QSharedPointer>
|
||||
|
||||
void ArrowRegistry::insert(QSharedPointer<ArrowData> data, ArrowItem *arrow)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#ifndef COCKATRICE_ARROW_REGISTRY_H
|
||||
#define COCKATRICE_ARROW_REGISTRY_H
|
||||
|
||||
#include "board/arrow_data.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QSet>
|
||||
#include <QSharedPointer>
|
||||
|
||||
class ArrowItem;
|
||||
struct ArrowData;
|
||||
template <class T> class QSharedPointer;
|
||||
|
||||
struct ArrowKey
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#include "arrow_data.h"
|
||||
|
||||
#include "libcockatrice/protocol/pb/serverinfo_arrow.pb.h"
|
||||
#include "libcockatrice/utility/color.h"
|
||||
|
||||
ArrowData ArrowData::fromProto(const ServerInfo_Arrow &arrow, int creatorId, bool isLocalCreator)
|
||||
{
|
||||
ArrowData data;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include <QColor>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_arrow.pb.h>
|
||||
#include <libcockatrice/utility/color.h>
|
||||
|
||||
class ServerInfo_Arrow;
|
||||
|
||||
struct ArrowData
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
#include "card_list.h"
|
||||
|
||||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QDebug>
|
||||
#include <QMessageLogger>
|
||||
#include <QSharedPointer>
|
||||
#include <algorithm>
|
||||
#include <compare>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
|
||||
CardList::CardList(bool _contentsKnown) : QList<CardItem *>(), contentsKnown(_contentsKnown)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QString>
|
||||
#include <functional>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(CardListLog, "card_list");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "card_state.h"
|
||||
|
||||
#include <QSharedPointer>
|
||||
|
||||
void CardState::resetState(bool keepAnnotations)
|
||||
{
|
||||
attacking = false;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,12 @@
|
|||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardZoneLogic;
|
||||
class CardItem;
|
||||
|
||||
class CardState : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "counter_state.h"
|
||||
|
||||
#include "libcockatrice/protocol/pb/serverinfo_counter.pb.h"
|
||||
|
||||
#include <libcockatrice/utility/color.h>
|
||||
|
||||
CounterState::CounterState(int id, const QString &name, const QColor &color, int radius, int value, QObject *parent)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
#include <QColor>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_counter.pb.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class ServerInfo_Counter;
|
||||
|
||||
class CounterState : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,17 @@
|
|||
#include "game.h"
|
||||
|
||||
#include "../interface/widgets/tabs/tab_game.h"
|
||||
#include "game_meta_info.h"
|
||||
#include "game_state.h"
|
||||
#include "player/player_manager.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/event_game_joined.pb.h>
|
||||
|
||||
class AbstractClient;
|
||||
class QObject;
|
||||
|
||||
Game::Game(QObject *_parent,
|
||||
bool isLocalGame,
|
||||
QList<AbstractClient *> &_clients,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,14 @@
|
|||
|
||||
#include "abstract_game.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class AbstractClient;
|
||||
class Event_GameJoined;
|
||||
class QObject;
|
||||
class QString;
|
||||
template <class Key, class T> class QMap;
|
||||
template <typename T> class QList;
|
||||
|
||||
class Game : public AbstractGame
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,30 @@
|
|||
#include "game_event_handler.h"
|
||||
|
||||
#include "../game_graphics/log/message_log_widget.h"
|
||||
#include "../interface/widgets/tabs/tab_game.h"
|
||||
#include "abstract_game.h"
|
||||
#include "game_meta_info.h"
|
||||
#include "game_state.h"
|
||||
#include "libcockatrice/protocol/pb/commands.pb.h"
|
||||
#include "libcockatrice/protocol/pb/game_commands.pb.h"
|
||||
#include "libcockatrice/protocol/pb/game_event.pb.h"
|
||||
#include "libcockatrice/protocol/pb/game_event_context.pb.h"
|
||||
#include "libcockatrice/protocol/pb/response.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_game.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_player.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_playerproperties.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_user.pb.h"
|
||||
#include "player/player_event_handler.h"
|
||||
#include "player/player_info.h"
|
||||
#include "player/player_logic.h"
|
||||
#include "player/player_manager.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMapIterator>
|
||||
#include <QMessageLogger>
|
||||
#include <QSharedPointer>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/stubs/port.h>
|
||||
#include <libcockatrice/network/client/abstract/abstract_client.h>
|
||||
#include <libcockatrice/protocol/get_pb_extension.h>
|
||||
#include <libcockatrice/protocol/pb/command_concede.pb.h>
|
||||
|
|
@ -13,7 +34,6 @@
|
|||
#include <libcockatrice/protocol/pb/command_next_turn.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_reverse_turn.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_active_phase.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_connection_state_changed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_deck_select.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_closed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_host_changed.pb.h>
|
||||
|
|
@ -28,6 +48,8 @@
|
|||
#include <libcockatrice/protocol/pb/event_set_active_player.pb.h>
|
||||
#include <libcockatrice/protocol/pb/game_event_container.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
GameEventHandler::GameEventHandler(AbstractGame *_game) : QObject(_game), game(_game)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,23 +19,29 @@
|
|||
|
||||
#include <QLoggingCategory>
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include <libcockatrice/protocol/pb/event_leave.pb.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
// IWYU pragma: keep
|
||||
// GameEventContext, ServerInfo_Player and ServerInfo_User are passed by value
|
||||
// to signals and slots, so the moc-generated code needs the complete types.
|
||||
#include <libcockatrice/protocol/pb/game_event_context.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_player.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
|
||||
class AbstractClient;
|
||||
class AbstractGame;
|
||||
class CommandContainer;
|
||||
class GameCommand;
|
||||
class GameEventContainer;
|
||||
class GameEventContext;
|
||||
class PendingCommand;
|
||||
class PlayerLogic;
|
||||
class Response;
|
||||
|
||||
class Event_GameStateChanged;
|
||||
class Event_PlayerPropertiesChanged;
|
||||
class Event_Join;
|
||||
class Event_Leave;
|
||||
class Event_GameHostChanged;
|
||||
class Event_GameClosed;
|
||||
class Event_SetActivePlayer;
|
||||
|
|
@ -44,6 +50,15 @@ class Event_GameSay;
|
|||
class Event_Kicked;
|
||||
class Event_ReverseTurn;
|
||||
class Event_Ping;
|
||||
class ServerInfo_PlayerProperties;
|
||||
namespace google
|
||||
{
|
||||
namespace protobuf
|
||||
{
|
||||
class Message;
|
||||
} // namespace protobuf
|
||||
} // namespace google
|
||||
template <typename T> class QList;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(GameEventHandlerLog, "game_event_handler");
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,16 @@
|
|||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_game.pb.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
// Translation layer class to expose protobuf safely and hook it up to Qt Signals.
|
||||
// This class de-couples the domain object (i.e. the GameMetaInfo) from the network object.
|
||||
// If the network object changes, only this class needs to be adjusted.
|
||||
|
||||
class AbstractGame;
|
||||
|
||||
class GameMetaInfo : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
#include "abstract_game.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QTimer>
|
||||
|
||||
class AbstractClient;
|
||||
|
||||
GameState::GameState(AbstractGame *parent,
|
||||
int _secondsElapsed,
|
||||
int _hostId,
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
#ifndef COCKATRICE_GAME_STATE_H
|
||||
#define COCKATRICE_GAME_STATE_H
|
||||
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/network/client/abstract/abstract_client.h>
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class AbstractGame;
|
||||
class ServerInfo_PlayerProperties;
|
||||
class ServerInfo_User;
|
||||
class AbstractClient;
|
||||
class QTimer;
|
||||
|
||||
class GameState : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
#include "phase.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QtGlobal>
|
||||
|
||||
Phase::Phase(const QString &_name, const QString &_color, const QString &_soundFileName)
|
||||
: name(_name), color(_color), soundFileName(_soundFileName)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@
|
|||
#ifndef PHASE_H
|
||||
#define PHASE_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
class Phase
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,14 +1,54 @@
|
|||
#include "player_actions.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "../../game_graphics/dialogs/dlg_create_token.h"
|
||||
#include "../../game_graphics/dialogs/dlg_move_top_cards_until.h"
|
||||
#include "../../game_graphics/dialogs/dlg_roll_dice.h"
|
||||
#include "../../game_graphics/player/card_menu_action_type.h"
|
||||
#include "../../game_graphics/zones/hand_zone.h"
|
||||
#include "../../game_graphics/zones/table_zone.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../interface/widgets/utility/get_text_with_max.h"
|
||||
#include "../../interface/deck_loader/loaded_deck.h"
|
||||
#include "../abstract_game.h"
|
||||
#include "../board/counter_state.h"
|
||||
#include "../game_event_handler.h"
|
||||
#include "../zones/card_zone_logic.h"
|
||||
#include "../zones/hand_zone_logic.h"
|
||||
#include "../zones/pile_zone_logic.h"
|
||||
#include "../zones/table_zone_logic.h"
|
||||
#include "../zones/view_zone_logic.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/card/printing/printing_info.h"
|
||||
#include "libcockatrice/card/relation/card_relation_type.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
#include "libcockatrice/filters/filter_string.h"
|
||||
#include "libcockatrice/protocol/pb/card_attributes.pb.h"
|
||||
#include "libcockatrice/protocol/pb/game_commands.pb.h"
|
||||
#include "libcockatrice/settings/cards_display_settings.h"
|
||||
#include "player_info.h"
|
||||
#include "player_logic.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QChar>
|
||||
#include <QColor>
|
||||
#include <QFlags>
|
||||
#include <QInputDialog>
|
||||
#include <QKeyEvent>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMapIterator>
|
||||
#include <QMetaType>
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QSharedPointer>
|
||||
#include <QTimer>
|
||||
#include <QVariant>
|
||||
#include <QVariantList>
|
||||
#include <QtGlobal>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/stubs/port.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <libcockatrice/protocol/pb/command_attach_card.pb.h>
|
||||
|
|
@ -26,13 +66,16 @@
|
|||
#include <libcockatrice/protocol/pb/command_set_card_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_shuffle.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_undo_draw.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_move_card.pb.h>
|
||||
#include <libcockatrice/settings/card_override_settings.h>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/utility/clamped_arithmetic.h>
|
||||
#include <libcockatrice/utility/counter_limits.h>
|
||||
#include <libcockatrice/utility/expression.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <memory>
|
||||
#include <qnamespace.h>
|
||||
#include <qnumeric.h>
|
||||
#include <string>
|
||||
|
||||
// milliseconds in between triggers of the move top cards until action
|
||||
static constexpr int MOVE_TOP_CARD_UNTIL_INTERVAL = 100;
|
||||
|
|
|
|||
|
|
@ -8,17 +8,25 @@
|
|||
#ifndef COCKATRICE_PLAYER_ACTIONS_H
|
||||
#define COCKATRICE_PLAYER_ACTIONS_H
|
||||
|
||||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "../../game_graphics/board/card_item.h" // IWYU pragma: keep - moc instantiates the metatype for QList<CardItem *>, which Qt 6.4 needs complete
|
||||
#include "../../game_graphics/dialogs/dlg_create_token.h"
|
||||
#include "../../game_graphics/dialogs/dlg_move_top_cards_until.h"
|
||||
#include "../../game_graphics/player/card_menu_action_type.h"
|
||||
#include "event_processing_options.h"
|
||||
#include "player_logic.h"
|
||||
#include "../board/card_list.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <libcockatrice/card/relation/card_relation_type.h>
|
||||
#include <libcockatrice/filters/filter_string.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardItem;
|
||||
class CardRelation;
|
||||
class QAction;
|
||||
class QTimer;
|
||||
template <typename T> class QList;
|
||||
|
||||
namespace google
|
||||
{
|
||||
|
|
@ -29,9 +37,9 @@ class Message;
|
|||
} // namespace google
|
||||
|
||||
class Command_MoveCard;
|
||||
class GameEventContext;
|
||||
class PendingCommand;
|
||||
class PlayerLogic;
|
||||
|
||||
class PlayerActions : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,15 +1,32 @@
|
|||
#include "player_event_handler.h"
|
||||
|
||||
#include "../../game_graphics/board/arrow_item.h"
|
||||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "../../game_graphics/zones/view_zone.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../abstract_game.h"
|
||||
#include "../board/arrow_data.h"
|
||||
#include "../board/card_list.h"
|
||||
#include "../board/counter_state.h"
|
||||
#include "../zones/card_zone_logic.h"
|
||||
#include "../zones/hand_zone_logic.h"
|
||||
#include "../zones/pile_zone_logic.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/protocol/pb/card_attributes.pb.h"
|
||||
#include "libcockatrice/protocol/pb/game_event.pb.h"
|
||||
#include "libcockatrice/protocol/pb/game_event_context.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_card.pb.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
#include "player_actions.h"
|
||||
#include "player_info.h"
|
||||
#include "player_logic.h"
|
||||
#include "player_manager.h"
|
||||
|
||||
#include <libcockatrice/protocol/pb/command_set_card_attr.pb.h>
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QSharedPointer>
|
||||
#include <QtGlobal>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/protocol/pb/context_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_undo_draw.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_attach_card.pb.h>
|
||||
|
|
@ -32,8 +49,9 @@
|
|||
#include <libcockatrice/protocol/pb/event_set_card_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_set_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_shuffle.pb.h>
|
||||
#include <libcockatrice/utility/color.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <qlogging.h>
|
||||
#include <string>
|
||||
|
||||
PlayerEventHandler::PlayerEventHandler(PlayerLogic *_player) : QObject(_player), player(_player)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@
|
|||
#include "event_processing_options.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <libcockatrice/protocol/pb/card_attributes.pb.h>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/game_event.pb.h>
|
||||
#include <libcockatrice/protocol/pb/game_event_context.pb.h>
|
||||
#include <qtmetamacros.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
class CardItem;
|
||||
class CardZoneLogic;
|
||||
class PlayerLogic;
|
||||
|
||||
class Event_AttachCard;
|
||||
class Event_ChangeZoneProperties;
|
||||
class Event_CreateArrow;
|
||||
|
|
@ -50,6 +50,9 @@ class Event_SetCardCounter;
|
|||
class Event_SetCounter;
|
||||
class Event_Shuffle;
|
||||
class Event_GameLogNotice;
|
||||
class GameEventContext;
|
||||
enum CardAttribute : int;
|
||||
template <typename T> class QList;
|
||||
|
||||
/**
|
||||
* @class PlayerEventHandler
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "player_info.h"
|
||||
|
||||
#include "libcockatrice/protocol/pb/serverinfo_user.pb.h"
|
||||
|
||||
PlayerInfo::PlayerInfo(const ServerInfo_User &info, int _id, bool _local, bool _judge)
|
||||
: id(_id), local(_local), judge(_judge)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
#ifndef COCKATRICE_PLAYER_INFO_H
|
||||
#define COCKATRICE_PLAYER_INFO_H
|
||||
|
||||
#include "../../game_graphics/player/player_target.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerInfo : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,33 +1,37 @@
|
|||
#include "player_logic.h"
|
||||
|
||||
#include "../../game_graphics/board/arrow_item.h"
|
||||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "../../game_graphics/board/counter_general.h"
|
||||
#include "../../game_graphics/game_scene.h"
|
||||
#include "../../game_graphics/player/player_target.h"
|
||||
#include "../../game_graphics/zones/hand_zone.h"
|
||||
#include "../../game_graphics/zones/pile_zone.h"
|
||||
#include "../../game_graphics/zones/stack_zone.h"
|
||||
#include "../../game_graphics/zones/table_zone.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../board/card_list.h"
|
||||
#include "../abstract_game.h"
|
||||
#include "../board/arrow_data.h"
|
||||
#include "../board/counter_state.h"
|
||||
#include "../game_meta_info.h"
|
||||
#include "../zones/hand_zone_logic.h"
|
||||
#include "../zones/pile_zone_logic.h"
|
||||
#include "../zones/stack_zone_logic.h"
|
||||
#include "../zones/table_zone_logic.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_card.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_counter.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_playerproperties.pb.h"
|
||||
#include "libcockatrice/utility/zone_names.h"
|
||||
#include "player_actions.h"
|
||||
#include "player_event_handler.h"
|
||||
#include "player_info.h"
|
||||
#include "player_manager.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QMenu>
|
||||
#include <QMetaType>
|
||||
#include <QPainter>
|
||||
#include <QtConcurrent>
|
||||
#include <libcockatrice/protocol/pb/command_attach_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_card_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_create_arrow.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_create_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_draw_cards.pb.h>
|
||||
#include <QMapIterator>
|
||||
#include <QMessageLogger>
|
||||
#include <QMutableMapIterator>
|
||||
#include <QSet>
|
||||
#include <QSharedPointer>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_player.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_zone.pb.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <libcockatrice/utility/color.h>
|
||||
#include <qalgorithms.h>
|
||||
#include <string>
|
||||
|
||||
PlayerLogic::PlayerLogic(const ServerInfo_User &info, int _id, bool _local, bool _judge, AbstractGame *_parent)
|
||||
: QObject(_parent), game(_parent), playerInfo(new PlayerInfo(info, _id, _local, _judge)),
|
||||
|
|
|
|||
|
|
@ -7,57 +7,48 @@
|
|||
#ifndef PLAYER_H
|
||||
#define PLAYER_H
|
||||
|
||||
#include "../../game_graphics/player/player_area.h"
|
||||
#include "../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../board/arrow_data.h"
|
||||
#include "../interface/deck_loader/loaded_deck.h"
|
||||
#include "../zones/card_zone_logic.h"
|
||||
#include "../zones/hand_zone_logic.h"
|
||||
#include "../zones/pile_zone_logic.h"
|
||||
#include "../zones/stack_zone_logic.h"
|
||||
#include "../zones/table_zone_logic.h"
|
||||
#include "player_event_handler.h"
|
||||
#include "player_info.h"
|
||||
#include "player_manager.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
#include "libcockatrice/utility/playmat_params.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QInputDialog>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMap>
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/filters/filter_string.h>
|
||||
#include <libcockatrice/protocol/pb/card_attributes.pb.h>
|
||||
#include <libcockatrice/protocol/pb/game_event.pb.h>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
// IWYU pragma: keep
|
||||
// ServerInfo_Card appears inside QList<...> in signal and slot
|
||||
// signatures, which the moc-generated code needs to be complete.
|
||||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
|
||||
class CardItem;
|
||||
class CounterState;
|
||||
class QWidget;
|
||||
class ServerInfo_PlayerProperties;
|
||||
struct ArrowData;
|
||||
struct LoadedDeck;
|
||||
template <class T> class QSharedPointer;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(PlayerLog, "player");
|
||||
|
||||
namespace google
|
||||
{
|
||||
namespace protobuf
|
||||
{
|
||||
class Message;
|
||||
}
|
||||
} // namespace google
|
||||
class AbstractCardItem;
|
||||
class AbstractGame;
|
||||
class ArrowItem;
|
||||
class ArrowTarget;
|
||||
class CardDatabase;
|
||||
class CardZone;
|
||||
class CommandContainer;
|
||||
class GameCommand;
|
||||
class GameEvent;
|
||||
class PlayerInfo;
|
||||
class PlayerEventHandler;
|
||||
class PlayerActions;
|
||||
class PlayerMenu;
|
||||
class QAction;
|
||||
class QMenu;
|
||||
class ServerInfo_Arrow;
|
||||
class ServerInfo_Card;
|
||||
class ServerInfo_Counter;
|
||||
class ServerInfo_Player;
|
||||
class ServerInfo_User;
|
||||
class TabGame;
|
||||
|
||||
const int MAX_TOKENS_PER_DIALOG = 99;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
#include "player_manager.h"
|
||||
|
||||
#include "../abstract_game.h"
|
||||
#include "../game_state.h"
|
||||
#include "player_info.h"
|
||||
#include "player_logic.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMapIterator>
|
||||
#include <QSharedPointer>
|
||||
|
||||
PlayerManager::PlayerManager(AbstractGame *_game,
|
||||
int _localPlayerId,
|
||||
bool _localPlayerIsJudge,
|
||||
|
|
|
|||
|
|
@ -7,12 +7,17 @@
|
|||
#ifndef COCKATRICE_PLAYER_MANAGER_H
|
||||
#define COCKATRICE_PLAYER_MANAGER_H
|
||||
|
||||
#include "libcockatrice/protocol/pb/serverinfo_user.pb.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_playerproperties.pb.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class AbstractGame;
|
||||
class PlayerLogic;
|
||||
|
||||
class PlayerManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
#include "replay.h"
|
||||
|
||||
#include "../interface/widgets/tabs/tab_game.h"
|
||||
#include "game_meta_info.h"
|
||||
#include "game_state.h"
|
||||
#include "player/player_manager.h"
|
||||
|
||||
#include <QList>
|
||||
|
||||
class GameReplay;
|
||||
class QObject;
|
||||
|
||||
Replay::Replay(QObject *_parent, const GameReplay *_replay, bool isLocalGame) : AbstractGame(_parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@
|
|||
|
||||
#include "abstract_game.h"
|
||||
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class GameReplay;
|
||||
class QObject;
|
||||
|
||||
class Replay : public AbstractGame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,16 +1,25 @@
|
|||
#include "card_zone_logic.h"
|
||||
|
||||
#include "../../client/translation.h"
|
||||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "../../game_graphics/zones/card_zone.h"
|
||||
#include "../../game_graphics/zones/view_zone.h"
|
||||
#include "../board/card_list.h"
|
||||
#include "../player/player_actions.h"
|
||||
#include "../player/player_info.h"
|
||||
#include "../player/player_logic.h"
|
||||
#include "libcockatrice/card/database/card_database.h"
|
||||
#include "view_zone_logic.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QDebug>
|
||||
#include <QMessageLogger>
|
||||
#include <QSharedPointer>
|
||||
#include <QVariant>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <string>
|
||||
|
||||
/**
|
||||
* @param _player the player that the zone belongs to
|
||||
|
|
|
|||
|
|
@ -10,17 +10,18 @@
|
|||
#include "../../client/translation.h"
|
||||
#include "../board/card_list.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardItem;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(CardZoneLogicLog, "card_zone_logic");
|
||||
|
||||
class PlayerLogic;
|
||||
class ZoneViewZone;
|
||||
class QMenu;
|
||||
class QAction;
|
||||
class QPainter;
|
||||
class CardDragItem;
|
||||
|
||||
class CardZoneLogic : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "card_zone_algorithms.h"
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
||||
HandZoneLogic::HandZoneLogic(PlayerLogic *_player,
|
||||
const QString &_name,
|
||||
bool _hasCardAttr,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@
|
|||
#define COCKATRICE_HAND_ZONE_LOGIC_H
|
||||
#include "card_zone_logic.h"
|
||||
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
||||
class HandZoneLogic : public CardZoneLogic
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
#include "pile_zone_logic.h"
|
||||
|
||||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "../board/card_list.h"
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
||||
PileZoneLogic::PileZoneLogic(PlayerLogic *_player,
|
||||
const QString &_name,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@
|
|||
#define COCKATRICE_PILE_ZONE_LOGIC_H
|
||||
#include "card_zone_logic.h"
|
||||
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
||||
class PileZoneLogic : public CardZoneLogic
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "card_zone_algorithms.h"
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
||||
StackZoneLogic::StackZoneLogic(PlayerLogic *_player,
|
||||
const QString &_name,
|
||||
bool _hasCardAttr,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@
|
|||
#define COCKATRICE_STACK_ZONE_LOGIC_H
|
||||
#include "card_zone_logic.h"
|
||||
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
||||
class StackZoneLogic : public CardZoneLogic
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
#include "table_zone_logic.h"
|
||||
|
||||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "../board/card_list.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
|
||||
#include <QPoint>
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
||||
TableZoneLogic::TableZoneLogic(PlayerLogic *_player,
|
||||
const QString &_name,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@
|
|||
#define COCKATRICE_TABLE_ZONE_LOGIC_H
|
||||
#include "card_zone_logic.h"
|
||||
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
||||
class TableZoneLogic : public CardZoneLogic
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -2,8 +2,14 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game_graphics/board/card_item.h"
|
||||
#include "../board/card_list.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
||||
/**
|
||||
* @param _player the player that the cards are revealed to.
|
||||
* @param _origZone the zone the cards were revealed from.
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@
|
|||
#define COCKATRICE_VIEW_ZONE_LOGIC_H
|
||||
#include "card_zone_logic.h"
|
||||
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
||||
class ZoneViewZoneLogic : public CardZoneLogic
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -2,12 +2,20 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../z_values.h"
|
||||
#include "abstract_card_item.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QCursor>
|
||||
#include <QDebug>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QPointF;
|
||||
|
||||
const QColor GHOST_MASK = QColor(255, 255, 255, 50);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,17 @@
|
|||
#ifndef ABSTRACTCARDDRAGITEM_H
|
||||
#define ABSTRACTCARDDRAGITEM_H
|
||||
|
||||
#include "abstract_card_item.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "graphics_item_type.h"
|
||||
|
||||
class QGraphicsScene;
|
||||
class CardZone;
|
||||
class CardInfo;
|
||||
#include <QGraphicsItem>
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QPointF>
|
||||
#include <QRectF>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class AbstractCardItem;
|
||||
|
||||
class AbstractCardDragItem : public QObject, public QGraphicsItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,19 +3,42 @@
|
|||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/card_localization.h"
|
||||
#include "../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../z_values.h"
|
||||
#include "abstract_graphics_item.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QChar>
|
||||
#include <QCursor>
|
||||
#include <QFlags>
|
||||
#include <QFont>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QHash>
|
||||
#include <QLineF>
|
||||
#include <QList>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPen>
|
||||
#include <QPixmap>
|
||||
#include <QPointF>
|
||||
#include <QRectF>
|
||||
#include <QTransform>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/appearance_settings.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <libcockatrice/settings/debug_settings.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QSizeF;
|
||||
|
||||
AbstractCardItem::AbstractCardItem(QGraphicsItem *parent, const CardRef &cardRef, PlayerLogic *_owner, int _id)
|
||||
: ArrowTarget(_owner, parent), id(_id), cardRef(cardRef), tapped(false), facedown(false), tapAngle(0),
|
||||
|
|
|
|||
|
|
@ -8,14 +8,22 @@
|
|||
#define ABSTRACTCARDITEM_H
|
||||
|
||||
#include "../animated_item.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "arrow_target.h"
|
||||
#include "graphics_item_type.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class CardInfo;
|
||||
class QPainter;
|
||||
class QPoint;
|
||||
|
||||
class AbstractCardItem : public ArrowTarget, public IAnimatedItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,21 +2,33 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../client/settings/shortcuts_settings.h"
|
||||
#include "../../game/board/counter_state.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game_graphics/board/translate_counter_name.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../interface/widgets/menus/tearoff_menu.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QEvent>
|
||||
#include <QFlags>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QGraphicsView>
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QKeySequence>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/protocol/pb/command_inc_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_counter.pb.h>
|
||||
#include <libcockatrice/utility/expression.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
AbstractCounter::AbstractCounter(CounterState *state,
|
||||
PlayerLogic *_player,
|
||||
|
|
|
|||
|
|
@ -7,18 +7,21 @@
|
|||
#ifndef COUNTER_H
|
||||
#define COUNTER_H
|
||||
|
||||
#include "../../game/board/counter_state.h"
|
||||
#include "../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../player/menu/abstract_player_component.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QInputDialog>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class QAction;
|
||||
class QKeyEvent;
|
||||
class QMenu;
|
||||
class QString;
|
||||
class CounterState;
|
||||
class QWidget;
|
||||
|
||||
class AbstractCounter : public QObject, public QGraphicsItem, public AbstractPlayerComponent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
#include "abstract_graphics_item.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QPainter>
|
||||
#include <QRectF>
|
||||
#include <QString>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <qnamespace.h>
|
||||
|
||||
void AbstractGraphicsItem::paintNumberEllipse(int number,
|
||||
int fontSize,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,12 @@
|
|||
#ifndef ABSTRACTGRAPHICSITEM_H
|
||||
#define ABSTRACTGRAPHICSITEM_H
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QColor>
|
||||
#include <QGraphicsObject>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QGraphicsItem;
|
||||
class QPainter;
|
||||
|
||||
/**
|
||||
* Parent class of all objects that appear in a game.
|
||||
|
|
|
|||
|
|
@ -2,28 +2,42 @@
|
|||
#include "arrow_item.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game/board/arrow_data.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../player/player_target.h"
|
||||
#include "../z_values.h"
|
||||
#include "../zones/card_zone.h"
|
||||
#include "card_item.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/protocol/pb/color.pb.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QBrush>
|
||||
#include <QElapsedTimer>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QLineF>
|
||||
#include <QLinearGradient>
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QPoint>
|
||||
#include <QString>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <QtMath>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/protocol/pb/command_attach_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_create_arrow.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_delete_arrow.pb.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/utility/color.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <math.h>
|
||||
#include <qnamespace.h>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,15 +6,23 @@
|
|||
#include "arrow_target.h"
|
||||
#include "graphics_item_type.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QElapsedTimer>
|
||||
#include <QGraphicsItem>
|
||||
#include <QList>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QPainterPath>
|
||||
#include <QPointF>
|
||||
#include <QPointer>
|
||||
#include <QRectF>
|
||||
#include <QSharedPointer>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardItem;
|
||||
class QGraphicsSceneMouseEvent;
|
||||
class PlayerLogic;
|
||||
template <class T> class QSharedPointer;
|
||||
|
||||
class ArrowItem : public QObject, public QGraphicsItem, public IAnimatedItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#include "arrow_target.h"
|
||||
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "arrow_item.h"
|
||||
#include <QVariant>
|
||||
|
||||
class QGraphicsItem;
|
||||
|
||||
ArrowTarget::ArrowTarget(PlayerLogic *_owner, QGraphicsItem *parent) : AbstractGraphicsItem(parent), owner(_owner)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
#include "abstract_graphics_item.h"
|
||||
|
||||
#include <QList>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class ArrowItem;
|
||||
class QGraphicsItem;
|
||||
|
||||
class ArrowTarget : public AbstractGraphicsItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,9 +6,20 @@
|
|||
#include "../zones/view_zone.h"
|
||||
#include "card_item.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QCursor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QPoint>
|
||||
#include <QSharedPointer>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class CardZoneLogic;
|
||||
|
||||
CardDragItem::CardDragItem(CardItem *_item,
|
||||
int _id,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,11 @@
|
|||
|
||||
#include "abstract_card_drag_item.h"
|
||||
|
||||
#include <QPointF>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardItem;
|
||||
class CardZone;
|
||||
|
||||
class CardDragItem : public AbstractCardDragItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,26 +1,52 @@
|
|||
#include "card_item.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../client/settings/card_counter_settings.h"
|
||||
#include "../../game/abstract_game.h"
|
||||
#include "../../game/board/card_state.h"
|
||||
#include "../../game/game_state.h"
|
||||
#include "../../game/phase.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/player/player_manager.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../game/zones/table_zone_logic.h"
|
||||
#include "../../game/zones/view_zone_logic.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../zones/table_zone.h"
|
||||
#include "../zones/view_zone.h"
|
||||
#include "arrow_item.h"
|
||||
#include "card_drag_item.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_cardcounter.pb.h"
|
||||
|
||||
#include <../../client/settings/card_counter_settings.h>
|
||||
#include <QApplication>
|
||||
#include <QBrush>
|
||||
#include <QChar>
|
||||
#include <QColor>
|
||||
#include <QCursor>
|
||||
#include <QFlags>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QMenu>
|
||||
#include <QMap>
|
||||
#include <QMapIterator>
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QRectF>
|
||||
#include <QSharedPointer>
|
||||
#include <QSizeF>
|
||||
#include <QTransform>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
struct CardRef;
|
||||
|
||||
CardItem::CardItem(PlayerLogic *_owner,
|
||||
QGraphicsItem *parent,
|
||||
|
|
|
|||
|
|
@ -8,18 +8,24 @@
|
|||
#define CARDITEM_H
|
||||
|
||||
#include "../../game/board/card_state.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "abstract_card_item.h"
|
||||
#include "graphics_item_type.h"
|
||||
|
||||
#include <libcockatrice/network/server/remote/game/server_card.h>
|
||||
#include <QList>
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QString>
|
||||
#include <QVariantList>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardDatabase;
|
||||
class CardDragItem;
|
||||
class CardZone;
|
||||
class ServerInfo_Card;
|
||||
class PlayerLogic;
|
||||
class QAction;
|
||||
class QColor;
|
||||
class CardZoneLogic;
|
||||
class QGraphicsItem;
|
||||
struct CardRef;
|
||||
template <class Key, class T> class QMap;
|
||||
|
||||
const int ROTATION_DEGREES_PER_FRAME = 10;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,20 @@
|
|||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "abstract_graphics_item.h"
|
||||
|
||||
#include <QFont>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QPoint>
|
||||
#include <QRectF>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class CounterState;
|
||||
class PlayerLogic;
|
||||
class QGraphicsItem;
|
||||
|
||||
GeneralCounter::GeneralCounter(CounterState *state, PlayerLogic *player, bool useNameForShortcut, QGraphicsItem *parent)
|
||||
: AbstractCounter(state, player, true, useNameForShortcut, parent)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue