mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
[Tooling] Apply include-what-you-use across the tree (#7396)
* [DeckList] Apply include-what-you-use to libcockatrice_deck_list * [IWYU] Apply include-what-you-use across the tree Run one whole-tree IWYU pass over the libcockatrice_* libraries, the Cockatrice client, Oracle, Servatrice and the test suite, so each translation unit includes what it uses directly and forward-declares what it does not need. IWYU only analyses real translation units, never the moc code CMake generates from Q_OBJECT headers, so it strips includes that moc output silently relies on. Where a type is passed by value (or nested in a QList/QMap) in a signal or slot signature, the generated moc code needs the complete type; those includes are kept with an explanatory `// IWYU pragma: keep`. The same holds for Q_DECLARE_METATYPE targets such as QSqlDatabase. A handful of includes are added by hand where callers brace-initialize a const-reference parameter, which also requires the complete type. Applied as a single commit on purpose: stripping includes from the libcockatrice_* headers is precisely what breaks the client, test and server translation units, and the fixes for those live in the same translation units. Splitting by component would therefore leave intermediate commits that do not compile. All 426 modified Q_OBJECT/Q_GADGET headers were verified to be moc-self-contained by compiling each generated moc_*.cpp standalone; several built only because of moc include ordering in mocs_compilation.cpp before the keep-includes were added. * [Tooling] Emit public Qt headers and fix IWYU fallout CI found Three problems the local build could not see, all because a green local build only proves the configuration it was run under. Private Qt headers. IWYU emitted private, lowercase Qt headers, and qtypes.h does not exist at all before Qt 6.9, so the Debian 12 and Ubuntu 24.04 jobs on Qt 6.4.2 failed to compile. The generator only emitted a mapping when the capital header name mirrored the private one (QAbstractAnimation for qabstractanimation.h), so qtypes.h, which is wrapped by QtTypes instead, got no mapping and kept the private spelling. Map it explicitly to <QtTypes>, which is public since Qt 5 and provides the same typedefs either way, and rewrite the 100 affected includes. Do not generalize this to "prefer any Qt* wrapper". The table is generated from whichever Qt is installed, and the wrappers are not equally old: QtLogging only appeared in Qt 6.8 and QtMinMax in 6.5, so that heuristic trades one breakage for another. Every other lowercase header still in the tree has shipped publicly since Qt 5, so those are left alone. Platform-guarded includes. IWYU only sees the preprocessor configuration it is handed, so it dropped an include that only the macOS branch of main.cpp needs, and the macOS jobs failed on an undeclared UrlSchemeEventFilter. Restore the include. Force-compiling every file that carries a platform guard under Q_OS_MAC, Q_OS_MACOS and __APPLE__ reports nothing else, so the macOS branches are covered rather than assumed. shellcheck. Drop a leftover variable and stop assigning the include-what-you-use lookup, which was only ever an existence check. * [Tooling] Map Qt 6.5+ split headers to QtGlobal for Qt 6.4 compatibility IWYU emitted QtTypes, QtPreprocessorSupport, QtVersionChecks, QtAssert, QtMinMax, QtClassHelperMacros, QtEnvironmentVariables and QtTranslation. Qt 6.5 split those declarations out of qglobal.h into separate headers, so neither the Qt* wrapper nor the q*.h private name exists on the oldest Qt we support (6.4.2), and Debian 12 / Ubuntu 24.04 fail with "No such file or directory". qtypes.h is worse still: it only appeared in Qt 6.9. QtGlobal is the one spelling that works across the whole supported range. It has been public since Qt 5, defines these declarations itself up to Qt 6.4, and includes the split headers from Qt 6.5 on, so redirect all eight private headers to it and collapse the affected includes in the tree. Curated overrides now take precedence over the name-mirroring rule, which cannot know about Qt version floors because the mapping is generated from whatever Qt is installed. That rule was mapping qtversionchecks.h to <QtVersionChecks> even with an override present, because the override was only consulted as a fallback. A curated key that matches nothing is now a hard error rather than a silent fallback, and the redirected headers are no longer advertised as the home of a symbol. Verified every Qt include in the tree resolves against the real qt6-base-dev 6.4.2 package: 15 distinct includes, 0 missing. * [Tooling] Map QOverload to QtGlobal and drop the QMetaMethodArgument include Two more headers IWYU emitted do not exist on Qt 6.4.2: QOverload was split out of qglobal.h in Qt 6.5, so on 6.4.2 it is declared in qglobal.h directly and the standalone header is a hard error. QtGlobal covers both, so map qoverload.h to it like the other 6.5+ split headers. QMetaMethodArgument is never referenced anywhere in the tree. It is a bare forwarder for qobjectdefs.h that our generator advertised as a class symbol, which is how IWYU came to add the include at all. The symbol mappings are generated from header names, so they cannot tell a forwarder that happens to be capitalised from a real class; removing the unused include is the fix, and the generic case stays a known limitation of the generator. Extending the audit to every Q* header (an earlier pass only matched headers starting with "Qt" or lowercase q*.h, so it missed all of them) against the real qt6-base-dev, qt6-multimedia-dev, qt6-declarative-dev, qt6-svg-dev and qt6-websockets-dev 6.4.2 packages: 341 distinct Qt includes, 0 missing. * [Game] Give moc the complete CardItem type in player_actions.h player_actions.h forward declares CardItem but passes QList<CardItem *> by value in actPlay/actPlayFacedown/actHide. moc instantiates the metatype for those parameters, and on Qt 6.4 that expands to sizeof(CardItem), so Ubuntu 24.04 fails with "invalid application of 'sizeof' to incomplete type 'CardItem'". Newer Qt tolerates the incomplete type, which is why only the 6.4.2 jobs failed. Include the defining header with an IWYU pragma keep, matching how the other MOC-required includes in this area are handled. * [Game] Give moc the complete ServerInfo_Card type player_logic.h, game_scene.h, view_zone.h and view_zone_widget.h forward declare ServerInfo_Card but pass QList<const ServerInfo_Card *> through signal and slot signatures. moc instantiates the metatype for those parameters, which Qt 6.4 expands to sizeof(ServerInfo_Card), so the connect in game_scene.cpp fails on Debian 12 and Ubuntu 24.04 with "invalid application of 'sizeof' to incomplete type 'const ServerInfo_Card'". Newer Qt tolerates it, so only the 6.4.2 jobs failed. Include the generated protobuf header with an IWYU pragma keep, following the pattern already used for ServerInfo_Player and ServerInfo_User in game_event_handler.h. * [Client] Complete the types Qt 6.4 needs for connect and moc Qt 6.4 expands QMetaType::fromType on the normalised argument list of a PMF connect and on moc-generated metatypes, which requires sizeof on every signal and slot parameter. Newer Qt tolerates forward declarations there, so only the Debian 12 and Ubuntu 24.04 jobs failed, with "invalid application of 'sizeof' to incomplete type" for QMouseEvent, QPrinter and GameReplay. Replace the forward declarations with the real includes: - QMouseEvent in the nine widget headers that pass it through signals - QPrinter in abstract_tab_deck_editor.cpp, for the actPrintDeck lambda - game_replay.pb.h in tab_replays.h. GameReplay is a protobuf message, so the project's game/replay.h only forward declares it and cannot supply the complete type. Found by recompiling all 1918 project TUs against the Debian Qt 6.4.2 headers, which reproduces those two CI jobs locally in one pass. * [Client] Complete Release and QMenu for Qt 6.4 moc and connect Continuing the Qt 6.4 complete-type sweep: - window_main.cpp connects ClientUpdateChecker::finishedCheck to MainWindow::checkClientUpdatesFinished, whose Release * parameter made moc 6.4 instantiate the metatype. GameReplay turned out to be a protobuf message, so Release likewise needed release_channel.h in the three headers declaring those signals: window_main.h, dlg_update.h and client_update_checker.h. - moc 6.4 also needs sizeof(QMenu) for the QList<QMenu *> carried by TabSupervisor::setMenu and MainWindow::updateTabMenu. Verified by regenerating moc output with the Debian moc 6.4.2 for all 434 Q_OBJECT/Q_GADGET classes and compiling it, plus recompiling all 1612 source TUs, against the Qt 6.4.2 headers: no remaining failures. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
b1f4d1e99d
commit
d603a2bb6a
1078 changed files with 9093 additions and 1769 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <QString>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/database/card_database_querier.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
|
||||
namespace CardLocalization
|
||||
|
|
|
|||
|
|
@ -4,27 +4,45 @@
|
|||
#include "../pixel_map_generator.h"
|
||||
#include "card_picture_loader_cache_method.h"
|
||||
#include "card_picture_loader_local_schemes.h"
|
||||
#include "card_picture_loader_status_bar.h"
|
||||
#include "card_picture_loader_worker.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/card/printing/printing_info.h"
|
||||
#include "libcockatrice/card/set/card_set.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QBuffer>
|
||||
#include <QChar>
|
||||
#include <QColor>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QImage>
|
||||
#include <QLatin1Char>
|
||||
#include <QList>
|
||||
#include <QMainWindow>
|
||||
#include <QMessageLogger>
|
||||
#include <QMetaObject>
|
||||
#include <QMovie>
|
||||
#include <QNetworkRequest>
|
||||
#include <QPainter>
|
||||
#include <QMetaType>
|
||||
#include <QPixmap>
|
||||
#include <QPixmapCache>
|
||||
#include <QScreen>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QStatusBar>
|
||||
#include <QString>
|
||||
#include <QStringLiteral>
|
||||
#include <QThread>
|
||||
#include <algorithm>
|
||||
#include <QWidget>
|
||||
#include <QtGlobal>
|
||||
#include <compare>
|
||||
#include <libcockatrice/settings/cache_storage_settings.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <libcockatrice/settings/download_settings.h>
|
||||
#include <libcockatrice/settings/paths_settings.h>
|
||||
#include <utility>
|
||||
#include <qnamespace.h>
|
||||
|
||||
// never cache more than 300 cards at once for a single deck
|
||||
#define CACHED_CARD_PER_DECK_MAX 300
|
||||
|
|
|
|||
|
|
@ -1,12 +1,20 @@
|
|||
#ifndef CARD_PICTURE_LOADER_H
|
||||
#define CARD_PICTURE_LOADER_H
|
||||
|
||||
#include "card_picture_loader_status_bar.h"
|
||||
#include "card_picture_loader_worker.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QHash>
|
||||
#include <QLoggingCategory>
|
||||
#include <QObject>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardPictureLoaderStatusBar;
|
||||
class CardPictureLoaderWorker;
|
||||
class ExactCard;
|
||||
class QDateTime;
|
||||
class QImage;
|
||||
class QPixmap;
|
||||
class QSize;
|
||||
class QString;
|
||||
template <typename T> class QList;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(CardPictureLoaderLog, "card_picture_loader");
|
||||
inline Q_LOGGING_CATEGORY(CardPictureLoaderCardBackCacheFailLog, "card_picture_loader.card_back_cache_fail");
|
||||
|
|
|
|||
|
|
@ -2,11 +2,21 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "card_picture_loader_local_schemes.h"
|
||||
#include "card_picture_to_load.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/card/printing/printing_info.h"
|
||||
#include "libcockatrice/card/set/card_set.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QDirIterator>
|
||||
#include <QMovie>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <QFileInfo>
|
||||
#include <QImageReader>
|
||||
#include <QList>
|
||||
#include <QMessageLogger>
|
||||
#include <QSharedPointer>
|
||||
#include <QStringList>
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/settings/paths_settings.h>
|
||||
|
||||
static constexpr int REFRESH_INTERVAL_MS = 10 * 1000;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
#ifndef PICTURE_LOADER_LOCAL_H
|
||||
#define PICTURE_LOADER_LOCAL_H
|
||||
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
#include <QImage>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMultiHash>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class ExactCard;
|
||||
class QTimer;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(CardPictureLoaderLocalLog, "card_picture_loader.local");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
#include "card_picture_loader_request_status_display_widget.h"
|
||||
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/card/printing/printing_info.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QUrl>
|
||||
|
||||
CardPictureLoaderRequestStatusDisplayWidget::CardPictureLoaderRequestStatusDisplayWidget(QWidget *parent,
|
||||
const QUrl &_url,
|
||||
const ExactCard &card,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,16 @@
|
|||
#ifndef PICTURE_LOADER_REQUEST_STATUS_DISPLAY_WIDGET_H
|
||||
#define PICTURE_LOADER_REQUEST_STATUS_DISPLAY_WIDGET_H
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QDateTime>
|
||||
#include <QLabel>
|
||||
#include <QUrl>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class ExactCard;
|
||||
class QHBoxLayout;
|
||||
class QUrl;
|
||||
|
||||
/**
|
||||
* @class CardPictureLoaderRequestStatusDisplayWidget
|
||||
|
|
|
|||
|
|
@ -1,7 +1,19 @@
|
|||
#include "card_picture_loader_status_bar.h"
|
||||
|
||||
#include "../widgets/quick_settings/settings_button_widget.h"
|
||||
#include "../widgets/quick_settings/settings_popup_widget.h"
|
||||
#include "card_picture_loader_request_status_display_widget.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QHBoxLayout>
|
||||
#include <QList>
|
||||
#include <QProgressBar>
|
||||
#include <QSharedPointer>
|
||||
#include <QTimer>
|
||||
#include <QUrl>
|
||||
|
||||
class ExactCard;
|
||||
|
||||
CardPictureLoaderStatusBar::CardPictureLoaderStatusBar(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
layout = new QHBoxLayout(this);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
#ifndef PICTURE_LOADER_STATUS_BAR_H
|
||||
#define PICTURE_LOADER_STATUS_BAR_H
|
||||
|
||||
#include "../../interface/widgets/quick_settings/settings_button_widget.h"
|
||||
#include "card_picture_loader_worker_work.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QProgressBar>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class ExactCard;
|
||||
class QHBoxLayout;
|
||||
class QProgressBar;
|
||||
class QTimer;
|
||||
class QUrl;
|
||||
class SettingsButtonWidget;
|
||||
|
||||
/**
|
||||
* @class CardPictureLoaderStatusBar
|
||||
|
|
|
|||
|
|
@ -4,15 +4,34 @@
|
|||
#include "card_picture_loader_cache_method.h"
|
||||
#include "card_picture_loader_local.h"
|
||||
#include "card_picture_loader_worker_work.h"
|
||||
#include "card_picture_to_load.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/utility/server_rate_limiter.h"
|
||||
|
||||
#include <QDirIterator>
|
||||
#include <QMovie>
|
||||
#include <QAbstractNetworkCache>
|
||||
#include <QByteArray>
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QImage>
|
||||
#include <QMessageLogger>
|
||||
#include <QMetaObject>
|
||||
#include <QMetaType>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkCacheMetaData>
|
||||
#include <QNetworkDiskCache>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QSettings>
|
||||
#include <QSharedPointer>
|
||||
#include <QThread>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <compare>
|
||||
#include <libcockatrice/settings/cache_storage_settings.h>
|
||||
#include <libcockatrice/settings/download_settings.h>
|
||||
#include <libcockatrice/settings/paths_settings.h>
|
||||
#include <qnamespace.h>
|
||||
#include <utility>
|
||||
#include <version_string.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,25 @@
|
|||
#ifndef PICTURE_LOADER_WORKER_H
|
||||
#define PICTURE_LOADER_WORKER_H
|
||||
|
||||
#include "card_picture_loader_local.h"
|
||||
#include "card_picture_loader_worker_work.h"
|
||||
#include "card_picture_to_load.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QHash>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMutex>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkDiskCache>
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
#include <QQueue>
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <QUrl>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardPictureLoaderLocal;
|
||||
class ExactCard;
|
||||
class QDateTime;
|
||||
class QImage;
|
||||
class QNetworkAccessManager;
|
||||
class QNetworkDiskCache;
|
||||
class QNetworkReply;
|
||||
class QThread;
|
||||
|
||||
#define REDIRECT_HEADER_NAME "redirects"
|
||||
#define REDIRECT_ORIGINAL_URL "original"
|
||||
|
|
|
|||
|
|
@ -2,19 +2,35 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "card_picture_loader_worker.h"
|
||||
#include "card_picture_to_load.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/utility/server_rate_limiter.h"
|
||||
|
||||
#include <QBuffer>
|
||||
#include <QDirIterator>
|
||||
#include <QByteArray>
|
||||
#include <QCryptographicHash>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QImageReader>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMessageLogger>
|
||||
#include <QMovie>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QRandomGenerator>
|
||||
#include <QThread>
|
||||
#include <QThreadPool>
|
||||
#include <QSharedPointer>
|
||||
#include <QStringList>
|
||||
#include <QTimer>
|
||||
#include <QUrl>
|
||||
#include <QVariant>
|
||||
|
||||
ServerRateLimiter CardPictureLoaderWorkerWork::s_rateLimiter;
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/download_settings.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qobjectdefs.h>
|
||||
|
||||
// Card back returned by gatherer when card is not found
|
||||
static const QStringList MD5_BLACKLIST = {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,18 @@
|
|||
#ifndef PICTURE_LOADER_WORKER_WORK_H
|
||||
#define PICTURE_LOADER_WORKER_WORK_H
|
||||
|
||||
#include "card_picture_loader_worker.h"
|
||||
#include "card_picture_to_load.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QImage>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMutex>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QObject>
|
||||
#include <QRandomGenerator>
|
||||
#include <QString>
|
||||
#include <QThread>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/utility/server_rate_limiter.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class ExactCard;
|
||||
class QNetworkReply;
|
||||
class QUrl;
|
||||
class ServerRateLimiter;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(CardPictureLoaderWorkerWorkLog, "card_picture_loader.worker");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,22 @@
|
|||
#include "card_picture_to_load.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/card/printing/printing_info.h"
|
||||
#include "libcockatrice/card/set/card_set.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDate>
|
||||
#include <QDebug>
|
||||
#include <QMap>
|
||||
#include <QMessageLogger>
|
||||
#include <QRegularExpression>
|
||||
#include <QRegularExpressionMatch>
|
||||
#include <QRegularExpressionMatchIterator>
|
||||
#include <QSharedPointer>
|
||||
#include <QUrl>
|
||||
#include <QtGlobal>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <libcockatrice/card/set/card_set_comparator.h>
|
||||
#include <libcockatrice/interfaces/noop_card_set_priority_controller.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
#ifndef PICTURE_TO_LOAD_H
|
||||
#define PICTURE_TO_LOAD_H
|
||||
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(CardPictureToLoadLog, "card_picture_loader.picture_to_load");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
#include "card_node_function.h"
|
||||
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/printing_info.h"
|
||||
#include "libcockatrice/card/set/card_set.h"
|
||||
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/deck_list/tree/deck_list_card_node.h>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "deck_file_format.h"
|
||||
|
||||
#include <qnamespace.h>
|
||||
|
||||
DeckFileFormat::Format DeckFileFormat::getFormatFromName(const QString &fileName)
|
||||
{
|
||||
if (fileName.endsWith(".cod", Qt::CaseInsensitive)) {
|
||||
|
|
|
|||
|
|
@ -1,26 +1,51 @@
|
|||
#include "deck_loader.h"
|
||||
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/deck_list/tree/abstract_deck_list_card_node.h"
|
||||
#include "libcockatrice/deck_list/tree/abstract_deck_list_node.h"
|
||||
#include "libcockatrice/deck_list/tree/inner_deck_list_node.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileDevice>
|
||||
#include <QFileInfo>
|
||||
#include <QFutureWatcher>
|
||||
#include <QFont>
|
||||
#include <QFuture>
|
||||
#include <QIODevice>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMessageLogger>
|
||||
#include <QMultiMap>
|
||||
#include <QPrinter>
|
||||
#include <QRegularExpression>
|
||||
#include <QSaveFile>
|
||||
#include <QSet>
|
||||
#include <QSharedPointer>
|
||||
#include <QStringList>
|
||||
#include <QTextBlockFormat>
|
||||
#include <QTextCharFormat>
|
||||
#include <QTextCursor>
|
||||
#include <QTextDocument>
|
||||
#include <QTextLength>
|
||||
#include <QTextStream>
|
||||
#include <QTextTable>
|
||||
#include <QTextTableCell>
|
||||
#include <QTextTableFormat>
|
||||
#include <QVector>
|
||||
#include <QtConcurrentRun>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <functional>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/import/card_name_normalizer.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/deck_list/tree/deck_list_card_node.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QTextLength;
|
||||
|
||||
const QStringList DeckLoader::ACCEPTED_FILE_EXTENSIONS = {"*.cod", "*.dec", "*.dek", "*.txt", "*.mwDeck"};
|
||||
|
||||
|
|
|
|||
|
|
@ -7,13 +7,23 @@
|
|||
#ifndef DECK_LOADER_H
|
||||
#define DECK_LOADER_H
|
||||
|
||||
#include "deck_file_format.h"
|
||||
#include "loaded_deck.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
#include <QPrinter>
|
||||
#include <QTextCursor>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class DeckList;
|
||||
class DecklistCardNode;
|
||||
class InnerDecklistNode;
|
||||
class QPrinter;
|
||||
class QTextCursor;
|
||||
class QTextStream;
|
||||
template <typename T> class QList;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(DeckLoaderLog, "deck_loader");
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#define COCKATRICE_INTENT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class Intent : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
#include "intent_connect_to_server.h"
|
||||
|
||||
#include "contexts/context_connect_to_server.h"
|
||||
#include "intent_disconnect_from_server.h"
|
||||
#include "libcockatrice/protocol/pb/response.pb.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <QTimer>
|
||||
#include <QtGlobal>
|
||||
|
||||
template <typename T> class QList;
|
||||
|
||||
IntentConnectToServer::IntentConnectToServer(RemoteClient *_remoteClient, ContextConnectToServer *_context)
|
||||
: Intent(), remoteClient(_remoteClient), context(_context)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
#ifndef COCKATRICE_INTENT_CONNECT_TO_SERVER_H
|
||||
#define COCKATRICE_INTENT_CONNECT_TO_SERVER_H
|
||||
|
||||
#include "contexts/context_connect_to_server.h"
|
||||
#include "abstract_client.h"
|
||||
#include "intent.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class RemoteClient;
|
||||
struct ContextConnectToServer;
|
||||
|
||||
class IntentConnectToServer : public Intent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "intent_disconnect_from_server.h"
|
||||
|
||||
#include "remote_client.h"
|
||||
|
||||
IntentDisconnectFromServer::IntentDisconnectFromServer(RemoteClient *_remoteClient)
|
||||
: Intent(), remoteClient(_remoteClient)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
#ifndef COCKATRICE_INTENT_DISCONNECT_FROM_SERVER_H
|
||||
#define COCKATRICE_INTENT_DISCONNECT_FROM_SERVER_H
|
||||
|
||||
#include "abstract_client.h"
|
||||
#include "intent.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class RemoteClient;
|
||||
|
||||
class IntentDisconnectFromServer : public Intent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,9 +3,17 @@
|
|||
#include "../widgets/server/game_selector.h"
|
||||
#include "../widgets/tabs/tab_room.h"
|
||||
#include "../widgets/tabs/tab_supervisor.h"
|
||||
#include "abstract_client.h"
|
||||
#include "contexts/context_connect_to_server.h"
|
||||
#include "contexts/context_join_room.h"
|
||||
#include "intent_join_server_room.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include <qnamespace.h>
|
||||
|
||||
IntentJoinServerGame::IntentJoinServerGame(TabSupervisor *_tabSupervisor,
|
||||
RemoteClient *_remoteClient,
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@
|
|||
|
||||
#include "contexts/context_join_game.h"
|
||||
#include "intent.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <QScopedPointer>
|
||||
#include <memory>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class TabRoom;
|
||||
class TabSupervisor;
|
||||
class RemoteClient;
|
||||
|
||||
class IntentJoinServerGame : public Intent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,8 +3,15 @@
|
|||
#include "../widgets/tabs/tab_room.h"
|
||||
#include "../widgets/tabs/tab_server.h"
|
||||
#include "../widgets/tabs/tab_supervisor.h"
|
||||
#include "abstract_client.h"
|
||||
#include "contexts/context_connect_to_server.h"
|
||||
#include "contexts/context_join_room.h"
|
||||
#include "intent_connect_to_server.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_room.pb.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
#ifndef COCKATRICE_INTENT_JOIN_SERVER_ROOM_H
|
||||
#define COCKATRICE_INTENT_JOIN_SERVER_ROOM_H
|
||||
|
||||
#include "contexts/context_join_room.h"
|
||||
#include "intent.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class TabSupervisor;
|
||||
class RemoteClient;
|
||||
struct ContextJoinRoom;
|
||||
|
||||
class IntentJoinServerRoom : public Intent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,9 +2,13 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../widgets/dialogs/dlg_login_prompt.h"
|
||||
#include "contexts/context_connect_to_server.h"
|
||||
#include "libcockatrice/settings/servers_settings.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <qnamespace.h>
|
||||
|
||||
IntentGetLoginCredentials::IntentGetLoginCredentials(ContextConnectToServer *_context,
|
||||
bool _promptForMissingCredentials)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
#ifndef COCKATRICE_INTENT_LOGIN_H
|
||||
#define COCKATRICE_INTENT_LOGIN_H
|
||||
|
||||
#include "contexts/context_connect_to_server.h"
|
||||
#include "intent.h"
|
||||
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
struct ContextConnectToServer;
|
||||
|
||||
class IntentGetLoginCredentials : public Intent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -2,10 +2,14 @@
|
|||
|
||||
#include "../deck_loader/deck_file_format.h"
|
||||
#include "../deck_loader/deck_loader.h"
|
||||
#include "../deck_loader/loaded_deck.h"
|
||||
#include "../widgets/tabs/tab_supervisor.h"
|
||||
#include "intent_wait_for_database_load.h"
|
||||
#include "libcockatrice/card/database/card_database.h"
|
||||
#include "libcockatrice/card/database/card_database_loader.h"
|
||||
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <optional>
|
||||
|
||||
IntentOpenLocalDeck::IntentOpenLocalDeck(TabSupervisor *_tabSupervisor, const QString &_file)
|
||||
: Intent(), tabSupervisor(_tabSupervisor), file(_file)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "intent.h"
|
||||
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class TabSupervisor;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,22 @@
|
|||
|
||||
#include "../widgets/tabs/tab_room.h"
|
||||
#include "../widgets/tabs/tab_supervisor.h"
|
||||
#include "contexts/context_connect_to_server.h"
|
||||
#include "intent_connect_to_server.h"
|
||||
#include "libcockatrice/protocol/pb/response.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_room.pb.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QSharedPointer>
|
||||
#include <libcockatrice/protocol/pb/event_list_rooms.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_join_room.pb.h>
|
||||
#include <libcockatrice/protocol/pb/session_commands.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
|
||||
class CommandContainer;
|
||||
class QVariant;
|
||||
|
||||
IntentOpenServerRoomByName::IntentOpenServerRoomByName(TabSupervisor *_tabSupervisor,
|
||||
RemoteClient *_remoteClient,
|
||||
std::unique_ptr<ContextJoinRoom> _context,
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
#ifndef COCKATRICE_INTENT_OPEN_SERVER_ROOM_BY_NAME_H
|
||||
#define COCKATRICE_INTENT_OPEN_SERVER_ROOM_BY_NAME_H
|
||||
|
||||
#include "abstract_client.h"
|
||||
#include "contexts/context_join_room.h"
|
||||
#include "intent.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <QScopedPointer>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include <memory>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class TabRoom;
|
||||
class TabSupervisor;
|
||||
class Event_ListRooms;
|
||||
class ServerInfo_Room;
|
||||
class RemoteClient;
|
||||
class Response;
|
||||
|
||||
/**
|
||||
* @brief Connects to the configured server and opens a room identified by its name.
|
||||
|
|
|
|||
|
|
@ -3,11 +3,17 @@
|
|||
#include "../deck_loader/deck_loader.h"
|
||||
#include "../widgets/dialogs/dlg_shared_decks_preview.h"
|
||||
#include "../widgets/tabs/tab_supervisor.h"
|
||||
#include "abstract_client.h"
|
||||
#include "contexts/context_connect_to_server.h"
|
||||
#include "intent_connect_to_server.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
#include <QSharedPointer>
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/card/database/card_database_querier.h>
|
||||
#include <QWidget>
|
||||
#include <google/protobuf/repeated_ptr_field.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_share_download.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_share_list.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||
|
|
@ -15,6 +21,11 @@
|
|||
#include <libcockatrice/protocol/pb/response_deck_share_list.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_deck_share_item.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <optional>
|
||||
#include <qnamespace.h>
|
||||
#include <string>
|
||||
|
||||
class CommandContainer;
|
||||
|
||||
IntentOpenSharedDeck::IntentOpenSharedDeck(TabSupervisor *_tabSupervisor,
|
||||
RemoteClient *_remoteClient,
|
||||
|
|
|
|||
|
|
@ -1,20 +1,24 @@
|
|||
#ifndef COCKATRICE_INTENT_OPEN_SHARED_DECK_H
|
||||
#define COCKATRICE_INTENT_OPEN_SHARED_DECK_H
|
||||
|
||||
#include "../deck_loader/loaded_deck.h"
|
||||
#include "contexts/context_open_deck.h"
|
||||
#include "intent.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QScopedPointer>
|
||||
#include <QString>
|
||||
#include <memory>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class TabSupervisor;
|
||||
struct LoadedDeck;
|
||||
class CardDatabaseQuerier;
|
||||
class DlgSharedDecksPreview;
|
||||
class QTimer;
|
||||
class CommandContainer;
|
||||
class RemoteClient;
|
||||
class Response;
|
||||
|
||||
class IntentOpenSharedDeck : public Intent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#include "intent_wait_for_database_load.h"
|
||||
|
||||
#include "libcockatrice/card/database/card_database.h"
|
||||
#include "libcockatrice/card/database/card_database_loader.h"
|
||||
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
|
||||
bool IntentWaitForDatabaseLoad::checkPrecondition() const
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "intent.h"
|
||||
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class IntentWaitForDatabaseLoad : public Intent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -4,22 +4,34 @@
|
|||
#include "../widgets/tabs/tab_room.h"
|
||||
#include "../widgets/tabs/tab_supervisor.h"
|
||||
#include "../window_main.h"
|
||||
#include "contexts/context_connect_to_server.h"
|
||||
#include "contexts/context_join_game.h"
|
||||
#include "contexts/context_join_room.h"
|
||||
#include "contexts/context_open_deck.h"
|
||||
#include "intent.h"
|
||||
#include "intent_join_server_game.h"
|
||||
#include "intent_login.h"
|
||||
#include "intent_open_shared_deck.h"
|
||||
#include "remote_client.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMap>
|
||||
#include <QMessageBox>
|
||||
#include <QMessageLogger>
|
||||
#include <QSharedPointer>
|
||||
#include <QStringLiteral>
|
||||
#include <QUrl>
|
||||
#include <QUrlQuery>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/network/client/abstract/abstract_client.h>
|
||||
#include <libcockatrice/settings/servers_settings.h>
|
||||
#include <memory>
|
||||
#include <qlogging.h>
|
||||
#include <qnamespace.h>
|
||||
#include <utility>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(UrlParserLog, "url_parser");
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,11 @@
|
|||
#define COCKATRICE_URL_PARSER_H
|
||||
|
||||
#include <QList>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QUrlQuery>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class Intent;
|
||||
class MainWindow;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#include "key_signals.h"
|
||||
|
||||
#include <QEvent>
|
||||
#include <QFlags>
|
||||
#include <QKeyEvent>
|
||||
#include <qnamespace.h>
|
||||
|
||||
bool KeySignals::eventFilter(QObject * /*object*/, QEvent *event)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
#ifndef KEYSIGNALS_H
|
||||
#define KEYSIGNALS_H
|
||||
|
||||
#include <QEvent>
|
||||
#include <QObject>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class KeySignals : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,13 +15,18 @@
|
|||
|
||||
#include "flow_layout.h"
|
||||
|
||||
#include "../widgets/general/layout_containers/flow_widget.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QLayoutItem>
|
||||
#include <QScrollArea>
|
||||
#include <QMessageLogger>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QPoint>
|
||||
#include <QRect>
|
||||
#include <QSizePolicy>
|
||||
#include <QStyle>
|
||||
#include <QWidget>
|
||||
#include <QWidgetItem>
|
||||
#include <QtGlobal>
|
||||
|
||||
FlowLayout::FlowLayout(QWidget *parent,
|
||||
const Qt::Orientation flowDirection,
|
||||
|
|
|
|||
|
|
@ -12,8 +12,14 @@
|
|||
#include <QLayout>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QSize>
|
||||
#include <QStyle>
|
||||
#include <QWidget>
|
||||
#include <QVector>
|
||||
#include <qlogging.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QLayoutItem;
|
||||
class QWidget;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(FlowLayoutLog, "flow_layout", QtInfoMsg);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
#include "overlap_layout.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QLayoutItem>
|
||||
#include <QMargins>
|
||||
#include <QMessageLogger>
|
||||
#include <QRect>
|
||||
#include <QWidget>
|
||||
#include <QWidgetItem>
|
||||
#include <QtGlobal>
|
||||
#include <QtMath>
|
||||
#include <limits.h>
|
||||
|
||||
/**
|
||||
* @class OverlapLayout
|
||||
|
|
|
|||
|
|
@ -10,7 +10,11 @@
|
|||
#include <QLayout>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QWidget>
|
||||
#include <QSize>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QLayoutItem;
|
||||
class QWidget;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(OverlapLayoutLog, "overlap_layout");
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,16 @@
|
|||
#include <QApplication>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QFlags>
|
||||
#include <QIODevice>
|
||||
#include <QLocale>
|
||||
#include <QMetaObject>
|
||||
#include <QMetaType>
|
||||
#include <QMutexLocker>
|
||||
#include <QSysInfo>
|
||||
#include <iostream>
|
||||
#include <qconfig.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
#define LOGGER_MAX_ENTRIES 128
|
||||
#define LOGGER_FILENAME "qdebug.txt"
|
||||
|
|
|
|||
|
|
@ -8,10 +8,15 @@
|
|||
#define LOGGER_H
|
||||
|
||||
#include <QFile>
|
||||
#include <QList>
|
||||
#include <QMutex>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QTextStream>
|
||||
#include <QVector>
|
||||
#include <qlogging.h>
|
||||
#include <qprocessordetection.h>
|
||||
#include <qtmetamacros.h>
|
||||
#include <string>
|
||||
|
||||
#if defined(Q_PROCESSOR_X86_32)
|
||||
#define BUILD_ARCHITECTURE "32-bit"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,19 @@
|
|||
#include "color_button.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColorDialog>
|
||||
#include <QFont>
|
||||
#include <QIcon>
|
||||
#include <QPainter>
|
||||
#include <QPalette>
|
||||
#include <QPen>
|
||||
#include <QPixmap>
|
||||
#include <QRectF>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
ColorButton::ColorButton(QWidget *parent) : QToolButton(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
#include <QColor>
|
||||
#include <QToolButton>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
class ColorButton : public QToolButton
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "palette_editor_dialog.h"
|
||||
|
||||
#include "../theme_config.h"
|
||||
#include "../theme_manager.h"
|
||||
#include "palette_generator.h"
|
||||
#include "palette_grid_widget.h"
|
||||
|
|
@ -9,12 +10,22 @@
|
|||
#include <QComboBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QDir>
|
||||
#include <QEvent>
|
||||
#include <QFile>
|
||||
#include <QFrame>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QList>
|
||||
#include <QMessageBox>
|
||||
#include <QPalette>
|
||||
#include <QPushButton>
|
||||
#include <QSharedPointer>
|
||||
#include <QStringList>
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <initializer_list>
|
||||
#include <qnamespace.h>
|
||||
|
||||
PaletteEditorDialog::PaletteEditorDialog(const QString &_themeDirPath, const QString &_themeName, QWidget *parent)
|
||||
: QDialog(parent), themeDirPath(_themeDirPath), themeName(_themeName)
|
||||
|
|
|
|||
|
|
@ -3,18 +3,21 @@
|
|||
|
||||
#include "../theme_config.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QDialog>
|
||||
#include <QFrame>
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QTimer;
|
||||
|
||||
class QLabel;
|
||||
class QComboBox;
|
||||
class QDialogButtonBox;
|
||||
class QPushButton;
|
||||
class PaletteGridWidget;
|
||||
class QuickSetupPanel;
|
||||
class QFrame;
|
||||
class QWidget;
|
||||
|
||||
class PaletteEditorDialog : public QDialog
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
#include "palette_generator.h"
|
||||
|
||||
#include "../theme_config.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QMap>
|
||||
#include <QPalette>
|
||||
#include <QtGlobal>
|
||||
#include <qnamespace.h>
|
||||
#include <qnumeric.h>
|
||||
|
||||
// ════════════════════════════════════════════════════════════════════════════
|
||||
// PaletteGenerator::fromAccent
|
||||
|
|
|
|||
|
|
@ -1,14 +1,25 @@
|
|||
#include "palette_grid_widget.h"
|
||||
|
||||
#include "../theme_config.h"
|
||||
#include "../theme_manager.h"
|
||||
#include "color_button.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QColor>
|
||||
#include <QEvent>
|
||||
#include <QFont>
|
||||
#include <QFrame>
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QMetaEnum>
|
||||
#include <QScrollArea>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
#include <QtGlobal>
|
||||
#include <qnamespace.h>
|
||||
#include <utility>
|
||||
|
||||
static QList<QPalette::ColorRole> allRoles()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,15 +2,19 @@
|
|||
#define COCKATRICE_PALETTE_GRID_WIDGET_H
|
||||
|
||||
#include "../theme_config.h"
|
||||
#include "color_button.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QPalette>
|
||||
#include <QVBoxLayout>
|
||||
#include <QVector>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QLabel;
|
||||
class QScrollArea;
|
||||
class ColorButton;
|
||||
class QVBoxLayout;
|
||||
|
||||
// Scrollable grid of ColorButtons — one per (ColorGroup × ColorRole) cell.
|
||||
// Owns the load/read round-trip for PaletteConfig but has no file I/O itself.
|
||||
class PaletteGridWidget : public QWidget
|
||||
|
|
|
|||
|
|
@ -1,9 +1,15 @@
|
|||
#include "quick_setup_panel.h"
|
||||
|
||||
#include "color_button.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFont>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPalette>
|
||||
#include <QSlider>
|
||||
#include <QString>
|
||||
#include <qnamespace.h>
|
||||
|
||||
QuickSetupPanel::QuickSetupPanel(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
#ifndef COCKATRICE_QUICK_SETUP_PANEL_H
|
||||
#define COCKATRICE_QUICK_SETUP_PANEL_H
|
||||
|
||||
#include "color_button.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QHBoxLayout;
|
||||
class QLabel;
|
||||
class QSlider;
|
||||
class ColorButton;
|
||||
|
||||
/**
|
||||
* @class QuickSetupPanel
|
||||
|
|
|
|||
|
|
@ -1,15 +1,37 @@
|
|||
#include "pixel_map_generator.h"
|
||||
|
||||
#include "libcockatrice/network/server/remote/user_level.h"
|
||||
#include "theme_manager.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QBrush>
|
||||
#include <QByteArray>
|
||||
#include <QChar>
|
||||
#include <QColor>
|
||||
#include <QDebug>
|
||||
#include <QDomDocument>
|
||||
#include <QDomElement>
|
||||
#include <QDomNode>
|
||||
#include <QDomNodeList>
|
||||
#include <QFile>
|
||||
#include <QIODevice>
|
||||
#include <QImage>
|
||||
#include <QImageReader>
|
||||
#include <QLatin1Char>
|
||||
#include <QLatin1String>
|
||||
#include <QMessageLogger>
|
||||
#include <QPainter>
|
||||
#include <QPalette>
|
||||
#include <QPointF>
|
||||
#include <QRadialGradient>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QStringLiteral>
|
||||
#include <QSvgRenderer>
|
||||
#include <QtGlobal>
|
||||
#include <initializer_list>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
#define DEFAULT_COLOR_UNREGISTERED "#32c8ec";
|
||||
#define DEFAULT_COLOR_REGISTERED "#5ed900";
|
||||
|
|
|
|||
|
|
@ -7,14 +7,20 @@
|
|||
#ifndef PIXMAPGENERATOR_H
|
||||
#define PIXMAPGENERATOR_H
|
||||
|
||||
#include "libcockatrice/protocol/pb/serverinfo_user.pb.h"
|
||||
|
||||
#include <QHash>
|
||||
#include <QIcon>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMap>
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
#include <QStringView>
|
||||
#include <libcockatrice/network/server/remote/user_level.h>
|
||||
#include <optional>
|
||||
|
||||
class QSize;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(PixelMapGeneratorLog, "pixel_map_generator");
|
||||
|
||||
class PhasePixmapGenerator
|
||||
|
|
|
|||
|
|
@ -1,9 +1,17 @@
|
|||
#include "theme_config.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QChar>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFlags>
|
||||
#include <QIODevice>
|
||||
#include <QList>
|
||||
#include <QMetaEnum>
|
||||
#include <QPair>
|
||||
#include <QTextStream>
|
||||
#include <qnamespace.h>
|
||||
#include <utility>
|
||||
|
||||
bool ThemeConfig::isEmpty() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
|
||||
#include <QColor>
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QPalette>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
// Application-specific color roles, layered on top of the fixed QPalette role
|
||||
// set. Stored in the same palette-<scheme>.toml under an [AppColors] section
|
||||
|
|
|
|||
|
|
@ -2,25 +2,40 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "pixel_map_generator.h"
|
||||
#include "theme_config.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QChar>
|
||||
#include <QColor>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QLibraryInfo>
|
||||
#include <QFlags>
|
||||
#include <QGuiApplication>
|
||||
#include <QIODevice>
|
||||
#include <QLatin1Char>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMessageLogger>
|
||||
#include <QMetaEnum>
|
||||
#include <QPalette>
|
||||
#include <QPixmap>
|
||||
#include <QPixmapCache>
|
||||
#include <QStandardPaths>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QStringLiteral>
|
||||
#include <QStyle>
|
||||
#include <QStyleFactory>
|
||||
#include <QStyleHints>
|
||||
#include <QTextStream>
|
||||
#include <QWidget>
|
||||
#include <Qt>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/paths_settings.h>
|
||||
#include <qlogging.h>
|
||||
#include <qnumeric.h>
|
||||
|
||||
#define SYSTEM_THEME_NAME "System"
|
||||
#define LEGACY_SYSTEM_THEME_NAME "Default"
|
||||
|
|
|
|||
|
|
@ -10,21 +10,21 @@
|
|||
#include "theme_config.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QDir>
|
||||
#include <QColor>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QPixmap>
|
||||
#include <QPalette>
|
||||
#include <QString>
|
||||
#include <QStringView>
|
||||
#include <array>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(ThemeManagerLog, "theme_manager");
|
||||
|
||||
typedef QMap<QString, QString> QStringMap;
|
||||
typedef QMap<int, QBrush> QBrushMap;
|
||||
|
||||
class QApplication;
|
||||
|
||||
class ThemeManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,15 +1,24 @@
|
|||
#include "color_identity_widget.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "mana_symbol_widget.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QLayoutItem>
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QRegularExpression>
|
||||
#include <QRegularExpressionMatch>
|
||||
#include <QRegularExpressionMatchIterator>
|
||||
#include <QResizeEvent>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/visual_deck_storage_settings.h>
|
||||
#include <libcockatrice/utility/qt_utils.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
ColorIdentityWidget::ColorIdentityWidget(QWidget *parent, const QString &_colorIdentity)
|
||||
: QWidget(parent), colorIdentity(_colorIdentity)
|
||||
|
|
|
|||
|
|
@ -7,9 +7,13 @@
|
|||
#ifndef COLOR_IDENTITY_WIDGET_H
|
||||
#define COLOR_IDENTITY_WIDGET_H
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QHBoxLayout;
|
||||
|
||||
class ColorIdentityWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
#include "deck_color_identity.h"
|
||||
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QList>
|
||||
#include <QSet>
|
||||
#include <QStringList>
|
||||
#include <libcockatrice/card/database/card_database_querier.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/deck_list/tree/inner_deck_list_node.h>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
#include "mana_cost_widget.h"
|
||||
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "mana_symbol_widget.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QList>
|
||||
#include <QRegularExpression>
|
||||
#include <QRegularExpressionMatch>
|
||||
#include <QRegularExpressionMatchIterator>
|
||||
#include <QResizeEvent>
|
||||
#include <QSize>
|
||||
#include <qregularexpression.h>
|
||||
#include <QtGlobal>
|
||||
|
||||
ManaCostWidget::ManaCostWidget(QWidget *parent, CardInfoPtr _card) : QWidget(parent), card(_card)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,9 +7,13 @@
|
|||
#ifndef MANA_COST_WIDGET_H
|
||||
#define MANA_COST_WIDGET_H
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QHBoxLayout;
|
||||
|
||||
class ManaCostWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,8 +3,16 @@
|
|||
#include "../../../../client/settings/cache_settings.h"
|
||||
#include "../../../pixel_map_generator.h"
|
||||
|
||||
#include <QGraphicsOpacityEffect>
|
||||
#include <QPixmap>
|
||||
#include <QResizeEvent>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/visual_deck_storage_settings.h>
|
||||
#include <utility>
|
||||
|
||||
class QWidget;
|
||||
|
||||
ManaSymbolWidget::ManaSymbolWidget(QWidget *parent, QString _symbol, bool _isActive, bool _mayBeToggled)
|
||||
: QLabel(parent), symbol(std::move(_symbol)), isActive(_isActive), mayBeToggled(_mayBeToggled)
|
||||
|
|
|
|||
|
|
@ -7,8 +7,13 @@
|
|||
#ifndef MANA_SYMBOL_WIDGET_H
|
||||
#define MANA_SYMBOL_WIDGET_H
|
||||
|
||||
#include <QGraphicsOpacityEffect>
|
||||
#include <QChar>
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QGraphicsOpacityEffect;
|
||||
class QWidget;
|
||||
|
||||
class ManaSymbolWidget : public QLabel
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,17 @@
|
|||
#include "art_crop_attribution.h"
|
||||
|
||||
#include "libcockatrice/card/printing/printing_info.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QPointF>
|
||||
#include <QRectF>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
|
||||
QString buildArtAttribution(const ExactCard &card)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#ifndef COCKATRICE_ART_CROP_ATTRIBUTION_H
|
||||
#define COCKATRICE_ART_CROP_ATTRIBUTION_H
|
||||
|
||||
#include <QStringView>
|
||||
#include <QtGlobal>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class ExactCard;
|
||||
class QPainter;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
#include "card_art_utils.h"
|
||||
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
|
||||
#include <QTransform>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
namespace CardArtUtils
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,33 @@
|
|||
#include "card_group_display_widget.h"
|
||||
|
||||
#include "../../../../client/settings/cache_settings.h"
|
||||
#include "../../general/display/banner_widget.h"
|
||||
#include "../card_info_picture_widget.h"
|
||||
#include "../card_info_picture_with_text_overlay_widget.h"
|
||||
#include "../card_size_widget.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
|
||||
#include <QResizeEvent>
|
||||
#include <QAbstractItemModel>
|
||||
#include <QAbstractProxyModel>
|
||||
#include <QDebug>
|
||||
#include <QItemSelection>
|
||||
#include <QItemSelectionModel>
|
||||
#include <QItemSelectionRange>
|
||||
#include <QModelIndex>
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QSlider>
|
||||
#include <QStringLiteral>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/models/deck_list/deck_list_model.h>
|
||||
#include <libcockatrice/models/deck_list/deck_list_sort_filter_proxy_model.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <qnamespace.h>
|
||||
#include <utility>
|
||||
|
||||
CardGroupDisplayWidget::CardGroupDisplayWidget(QWidget *parent,
|
||||
DeckListModel *_deckListModel,
|
||||
|
|
|
|||
|
|
@ -7,15 +7,24 @@
|
|||
#ifndef CARD_GROUP_DISPLAY_WIDGET_H
|
||||
#define CARD_GROUP_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../general/display/banner_widget.h"
|
||||
#include "../card_info_picture_with_text_overlay_widget.h"
|
||||
#include "../card_size_widget.h"
|
||||
|
||||
#include <QItemSelectionModel>
|
||||
#include <QLabel>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMouseEvent>
|
||||
#include <QPersistentModelIndex>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QVBoxLayout>
|
||||
#include <QVector>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/models/deck_list/deck_list_model.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class BannerWidget;
|
||||
class CardSizeWidget;
|
||||
class DeckListModel;
|
||||
class ExactCard;
|
||||
class QItemSelection;
|
||||
class QItemSelectionModel;
|
||||
class QModelIndex;
|
||||
|
||||
class CardGroupDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,20 @@
|
|||
#include "flat_card_group_display_widget.h"
|
||||
|
||||
#include <QResizeEvent>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include "../../general/display/banner_widget.h"
|
||||
#include "../../general/layout_containers/flow_widget.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/models/deck_list/deck_list_model.h>
|
||||
#include <qnamespace.h>
|
||||
#include <utility>
|
||||
|
||||
class CardSizeWidget;
|
||||
class QItemSelectionModel;
|
||||
|
||||
FlatCardGroupDisplayWidget::FlatCardGroupDisplayWidget(QWidget *parent,
|
||||
DeckListModel *_deckListModel,
|
||||
QItemSelectionModel *_selectionModel,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,16 @@
|
|||
#include "../../general/layout_containers/flow_widget.h"
|
||||
#include "card_group_display_widget.h"
|
||||
|
||||
#include <QPersistentModelIndex>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardSizeWidget;
|
||||
class DeckListModel;
|
||||
class QItemSelectionModel;
|
||||
class QWidget;
|
||||
|
||||
class FlatCardGroupDisplayWidget : public CardGroupDisplayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,8 +1,20 @@
|
|||
#include "overlapped_card_group_display_widget.h"
|
||||
|
||||
#include "../../general/display/banner_widget.h"
|
||||
#include "../../general/layout_containers/overlap_widget.h"
|
||||
#include "../card_size_widget.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QResizeEvent>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <QSlider>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/models/deck_list/deck_list_model.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QItemSelectionModel;
|
||||
|
||||
OverlappedCardGroupDisplayWidget::OverlappedCardGroupDisplayWidget(QWidget *parent,
|
||||
DeckListModel *_deckListModel,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,16 @@
|
|||
#include "../../general/layout_containers/overlap_widget.h"
|
||||
#include "card_group_display_widget.h"
|
||||
|
||||
#include <QPersistentModelIndex>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardSizeWidget;
|
||||
class DeckListModel;
|
||||
class QItemSelectionModel;
|
||||
class QWidget;
|
||||
|
||||
class OverlappedCardGroupDisplayWidget : public CardGroupDisplayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,14 +1,25 @@
|
|||
#include "card_info_display_widget.h"
|
||||
|
||||
#include "../../../game_graphics/board/card_item.h"
|
||||
#include "../../../game_graphics/board/abstract_card_item.h"
|
||||
#include "../../../game_graphics/card_dimensions.h"
|
||||
#include "card_info_picture_widget.h"
|
||||
#include "card_info_text_widget.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 <QApplication>
|
||||
#include <QGuiApplication>
|
||||
#include <QObject>
|
||||
#include <QRect>
|
||||
#include <QScreen>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
CardInfoDisplayWidget::CardInfoDisplayWidget(const CardRef &cardRef, QWidget *parent, Qt::WindowFlags flags)
|
||||
: QFrame(parent, flags), aspectRatio(CardDimensions::HEIGHT_F / CardDimensions::WIDTH_F)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,15 +7,17 @@
|
|||
#ifndef CARDINFOWIDGET_H
|
||||
#define CARDINFOWIDGET_H
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QFrame>
|
||||
#include <QStringList>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardInfoPictureWidget;
|
||||
class CardInfoTextWidget;
|
||||
class AbstractCardItem;
|
||||
class QWidget;
|
||||
struct CardRef;
|
||||
|
||||
class CardInfoDisplayWidget : public QFrame
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,27 @@
|
|||
#include "card_info_frame_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../game_graphics/board/card_item.h"
|
||||
#include "card_info_display_widget.h"
|
||||
#include "../../../game_graphics/board/abstract_card_item.h"
|
||||
#include "card_info_picture_widget.h"
|
||||
#include "card_info_text_widget.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QPushButton>
|
||||
#include <QSplitter>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
struct CardRef;
|
||||
|
||||
CardInfoFrameWidget::CardInfoFrameWidget(QWidget *parent)
|
||||
: QTabWidget(parent), viewTransformationButton(nullptr), cardTextOnly(false)
|
||||
|
|
|
|||
|
|
@ -7,16 +7,19 @@
|
|||
#ifndef CARDFRAME_H
|
||||
#define CARDFRAME_H
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QString>
|
||||
#include <QTabWidget>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class AbstractCardItem;
|
||||
class CardInfoPictureWidget;
|
||||
class CardInfoTextWidget;
|
||||
class QVBoxLayout;
|
||||
class QSplitter;
|
||||
class QPushButton;
|
||||
class QWidget;
|
||||
struct CardRef;
|
||||
|
||||
class CardInfoFrameWidget : public QTabWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
#include "card_info_picture_art_crop_widget.h"
|
||||
|
||||
#include "../../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
|
||||
#include <QRect>
|
||||
#include <QSize>
|
||||
|
||||
class QWidget;
|
||||
|
||||
CardInfoPictureArtCropWidget::CardInfoPictureArtCropWidget(QWidget *parent)
|
||||
: CardInfoPictureWidget(parent, false, false)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@
|
|||
|
||||
#include "card_info_picture_widget.h"
|
||||
|
||||
#include <QPixmap>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
class CardInfoPictureArtCropWidget : public CardInfoPictureWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -2,10 +2,17 @@
|
|||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
|
||||
#include <QPainterPath>
|
||||
#include <QPoint>
|
||||
#include <QRect>
|
||||
#include <QSize>
|
||||
#include <QStylePainter>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
/**
|
||||
* @brief Constructs a CardPictureEnlargedWidget.
|
||||
|
|
|
|||
|
|
@ -8,8 +8,12 @@
|
|||
#ifndef CARD_PICTURE_ENLARGED_WIDGET_H
|
||||
#define CARD_PICTURE_ENLARGED_WIDGET_H
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QSize;
|
||||
|
||||
class CardInfoPictureEnlargedWidget final : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,21 +1,47 @@
|
|||
#include "card_info_picture_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../game_graphics/board/card_item.h"
|
||||
#include "../../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../../../interface/widgets/tabs/tab_supervisor.h"
|
||||
#include "../../window_main.h"
|
||||
#include "../tabs/abstract_tab_deck_editor.h"
|
||||
#include "card_art_utils.h"
|
||||
#include "card_info_picture_enlarged_widget.h"
|
||||
#include "libcockatrice/card/card_info.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/deck_list/tree/inner_deck_list_node.h"
|
||||
|
||||
#include <QAbstractAnimation>
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QByteArray>
|
||||
#include <QCursor>
|
||||
#include <QDebug>
|
||||
#include <QEasingCurve>
|
||||
#include <QGuiApplication>
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <QMouseEvent>
|
||||
#include <QObject>
|
||||
#include <QPainterPath>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QRect>
|
||||
#include <QScreen>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QStylePainter>
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
#include <QtGlobal>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <utility>
|
||||
#include <qlogging.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
static constexpr qreal MTG_CARD_ASPECT_RATIO = 1.396;
|
||||
// static constexpr qreal YUGIOH_CARD_ASPECT_RATIO = 1.457;
|
||||
|
|
|
|||
|
|
@ -7,15 +7,20 @@
|
|||
#ifndef CARD_INFO_PICTURE_H
|
||||
#define CARD_INFO_PICTURE_H
|
||||
|
||||
#include "card_info_picture_enlarged_widget.h"
|
||||
|
||||
#include <QPropertyAnimation>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMouseEvent>
|
||||
#include <QPixmap>
|
||||
#include <QPoint>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardInfoPictureEnlargedWidget;
|
||||
class QPropertyAnimation;
|
||||
class QTimer;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(CardInfoPictureWidgetLog, "card_info_picture_widget");
|
||||
|
||||
class AbstractCardItem;
|
||||
class QMenu;
|
||||
|
||||
class CardInfoPictureWidget : public QWidget
|
||||
|
|
|
|||
|
|
@ -1,8 +1,24 @@
|
|||
#include "card_info_picture_with_text_overlay_widget.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QChar>
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QList>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPalette>
|
||||
#include <QPen>
|
||||
#include <QPixmap>
|
||||
#include <QPoint>
|
||||
#include <QRect>
|
||||
#include <QSize>
|
||||
#include <QSizePolicy>
|
||||
#include <QStringList>
|
||||
#include <QStylePainter>
|
||||
#include <algorithm>
|
||||
|
||||
class QWidget;
|
||||
|
||||
/**
|
||||
* @brief Constructs a CardPictureWithTextOverlay widget.
|
||||
|
|
|
|||
|
|
@ -11,8 +11,14 @@
|
|||
#include "card_info_picture_widget.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QTextOption>
|
||||
#include <qnamespace.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QPainter;
|
||||
class QRect;
|
||||
class QWidget;
|
||||
|
||||
class CardInfoPictureWithTextOverlayWidget : public CardInfoPictureWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,15 +1,26 @@
|
|||
#include "card_info_text_widget.h"
|
||||
|
||||
#include "../../../game_graphics/board/card_item.h"
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../card_localization.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/printing/printing_info.h"
|
||||
#include "libcockatrice/card/set/card_set.h"
|
||||
#include "libcockatrice/settings/cards_display_settings.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QList>
|
||||
#include <QScrollArea>
|
||||
#include <QScrollBar>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QStringList>
|
||||
#include <QTextEdit>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/card/game_specific_terms.h>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qobjectdefs.h>
|
||||
|
||||
CardInfoTextWidget::CardInfoTextWidget(QWidget *parent) : QFrame(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,10 +10,13 @@
|
|||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QLabel;
|
||||
class QScrollArea;
|
||||
class QTextEdit;
|
||||
class QWidget;
|
||||
|
||||
class CardInfoTextWidget : public QFrame
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,19 @@
|
|||
#include "card_size_widget.h"
|
||||
|
||||
#include "../printing_selector/printing_selector.h"
|
||||
#include "../visual_deck_storage/visual_deck_storage_widget.h"
|
||||
#include "../general/layout_containers/flow_widget.h"
|
||||
|
||||
#include <QEvent>
|
||||
#include <QFlags>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QList>
|
||||
#include <QPoint>
|
||||
#include <QScrollArea>
|
||||
#include <QSizePolicy>
|
||||
#include <QSlider>
|
||||
#include <QWheelEvent>
|
||||
#include <QtGlobal>
|
||||
#include <qnamespace.h>
|
||||
|
||||
/**
|
||||
* @class CardSizeWidget
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@
|
|||
#ifndef CARD_SIZE_WIDGET_H
|
||||
#define CARD_SIZE_WIDGET_H
|
||||
|
||||
#include "../general/layout_containers/flow_widget.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QSlider>
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QWheelEvent;
|
||||
class FlowWidget;
|
||||
class QHBoxLayout;
|
||||
class QLabel;
|
||||
class QSlider;
|
||||
|
||||
class CardSizeWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,14 +1,38 @@
|
|||
#include "deck_card_zone_display_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../general/display/banner_widget.h"
|
||||
#include "../visual_deck_editor/visual_deck_editor_widget.h"
|
||||
#include "card_group_display_widgets/card_group_display_widget.h"
|
||||
#include "card_group_display_widgets/flat_card_group_display_widget.h"
|
||||
#include "card_group_display_widgets/overlapped_card_group_display_widget.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/database/card_database_manager.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/deck_list/tree/deck_list_card_node.h"
|
||||
#include "libcockatrice/settings/cards_display_settings.h"
|
||||
|
||||
#include <QResizeEvent>
|
||||
#include <algorithm>
|
||||
#include <QAbstractItemModel>
|
||||
#include <QDebug>
|
||||
#include <QItemSelection>
|
||||
#include <QItemSelectionModel>
|
||||
#include <QItemSelectionRange>
|
||||
#include <QLayout>
|
||||
#include <QLayoutItem>
|
||||
#include <QModelIndex>
|
||||
#include <QSharedPointer>
|
||||
#include <QSizePolicy>
|
||||
#include <QStringLiteral>
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/models/deck_list/deck_list_model.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class CardSizeWidget;
|
||||
class QMouseEvent;
|
||||
|
||||
DeckCardZoneDisplayWidget::DeckCardZoneDisplayWidget(QWidget *parent,
|
||||
DeckListModel *_deckListModel,
|
||||
|
|
|
|||
|
|
@ -7,16 +7,27 @@
|
|||
#ifndef DECK_CARD_ZONE_DISPLAY_WIDGET_H
|
||||
#define DECK_CARD_ZONE_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../general/display/banner_widget.h"
|
||||
#include "../general/layout_containers/overlap_widget.h"
|
||||
#include "../visual_deck_editor/visual_deck_editor_widget.h"
|
||||
#include "card_group_display_widgets/card_group_display_widget.h"
|
||||
#include "card_info_picture_with_text_overlay_widget.h"
|
||||
#include "card_size_widget.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QHash>
|
||||
#include <QList>
|
||||
#include <QMouseEvent>
|
||||
#include <QPersistentModelIndex>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/models/deck_list/deck_list_model.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class BannerWidget;
|
||||
class CardGroupDisplayWidget;
|
||||
class CardSizeWidget;
|
||||
class DeckListModel;
|
||||
class ExactCard;
|
||||
class OverlapWidget;
|
||||
class QItemSelection;
|
||||
class QItemSelectionModel;
|
||||
class QModelIndex;
|
||||
class QVBoxLayout;
|
||||
|
||||
class DeckCardZoneDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
#include "deck_preview_card_picture_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "card_info_picture_widget.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFileInfo>
|
||||
#include <QFontMetrics>
|
||||
#include <QMouseEvent>
|
||||
#include <QPainterPath>
|
||||
#include <QStylePainter>
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/settings/visual_deck_storage_settings.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
/**
|
||||
* @brief Constructs a CardPictureWithTextOverlay widget.
|
||||
* @param parent The parent widget.
|
||||
|
|
|
|||
|
|
@ -11,9 +11,12 @@
|
|||
#include "card_info_picture_with_text_overlay_widget.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QSize>
|
||||
#include <QTextOption>
|
||||
#include <QTimer>
|
||||
#include <QMouseEvent>
|
||||
#include <qnamespace.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QTimer;
|
||||
class QWidget;
|
||||
|
||||
class DeckPreviewCardPictureWidget final : public CardInfoPictureWithTextOverlayWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,16 @@
|
|||
#include "abstract_analytics_panel_widget.h"
|
||||
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../general/display/banner_widget.h"
|
||||
#include "deck_list_statistics_analyzer.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <QSizePolicy>
|
||||
#include <QStringLiteral>
|
||||
#include <QVBoxLayout>
|
||||
#include <qnamespace.h>
|
||||
|
||||
AbstractAnalyticsPanelWidget::AbstractAnalyticsPanelWidget(QWidget *parent, DeckListStatisticsAnalyzer *analyzer)
|
||||
: QWidget(parent), analyzer(analyzer)
|
||||
|
|
|
|||
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