mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-06 01:53: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
|
|
@ -11,35 +11,49 @@
|
|||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../deck_loader/deck_file_format.h"
|
||||
#include "../../deck_loader/deck_loader.h"
|
||||
#include "../../deck_loader/loaded_deck.h"
|
||||
#include "../cards/additional_info/deck_color_identity.h"
|
||||
#include "../cards/card_info_frame_widget.h"
|
||||
#include "../client/network/interfaces/deck_stats_interface.h"
|
||||
#include "../client/network/interfaces/tapped_out_interface.h"
|
||||
#include "../deck_editor/deck_editor_card_database_dock_widget.h"
|
||||
#include "../deck_editor/deck_editor_card_info_dock_widget.h"
|
||||
#include "../deck_editor/deck_editor_deck_dock_widget.h"
|
||||
#include "../deck_editor/deck_editor_filter_dock_widget.h"
|
||||
#include "../deck_editor/deck_editor_printing_selector_dock_widget.h"
|
||||
#include "../deck_editor/deck_state_manager.h"
|
||||
#include "../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../interface/pixel_map_generator.h"
|
||||
#include "../interface/widgets/dialogs/dlg_load_deck.h"
|
||||
#include "../interface/widgets/dialogs/dlg_load_deck_from_clipboard.h"
|
||||
#include "../interface/widgets/dialogs/dlg_load_deck_from_website.h"
|
||||
#include "../interface/widgets/dialogs/dlg_share_deck.h"
|
||||
#include "../menus/deck_editor_menu.h"
|
||||
#include "../printing_selector/printing_selector.h"
|
||||
#include "../utility/visibility_change_listener.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
#include "tab_supervisor.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QCloseEvent>
|
||||
#include <QDesktopServices>
|
||||
#include <QDockWidget>
|
||||
#include <QFileDialog>
|
||||
#include <QHeaderView>
|
||||
#include <QLineEdit>
|
||||
#include <QFlags>
|
||||
#include <QList>
|
||||
#include <QMainWindow>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QPrintPreviewDialog>
|
||||
#include <QPrinter>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QPushButton>
|
||||
#include <QRegularExpression>
|
||||
#include <QSplitter>
|
||||
#include <QTreeView>
|
||||
#include <QSharedPointer>
|
||||
#include <QUrl>
|
||||
#include <google/protobuf/stubs/port.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/models/database/card_database_model.h>
|
||||
#include <libcockatrice/network/client/abstract/abstract_client.h>
|
||||
|
|
@ -50,6 +64,8 @@
|
|||
#include <libcockatrice/settings/paths_settings.h>
|
||||
#include <libcockatrice/settings/recents_settings.h>
|
||||
#include <libcockatrice/utility/string_limits.h>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
/**
|
||||
* @brief Constructs the AbstractTabDeckEditor.
|
||||
|
|
|
|||
|
|
@ -9,48 +9,31 @@
|
|||
#define TAB_GENERIC_DECK_EDITOR_H
|
||||
|
||||
#include "../../deck_loader/deck_loader.h"
|
||||
#include "../interface/widgets/deck_editor/deck_editor_card_database_dock_widget.h"
|
||||
#include "../interface/widgets/deck_editor/deck_editor_card_info_dock_widget.h"
|
||||
#include "../interface/widgets/deck_editor/deck_editor_database_display_widget.h"
|
||||
#include "../interface/widgets/deck_editor/deck_editor_deck_dock_widget.h"
|
||||
#include "../interface/widgets/deck_editor/deck_editor_filter_dock_widget.h"
|
||||
#include "../interface/widgets/deck_editor/deck_editor_printing_selector_dock_widget.h"
|
||||
#include "../interface/widgets/menus/deck_editor_menu.h"
|
||||
#include "../interface/widgets/visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "tab.h"
|
||||
|
||||
#include <libcockatrice/deck_list/deck_list_history_manager.h>
|
||||
#include <QMap>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class DeckStateManager;
|
||||
class CardDatabaseModel;
|
||||
class CardDatabaseDisplayModel;
|
||||
|
||||
class CardInfoFrameWidget;
|
||||
class DeckLoader;
|
||||
class DeckEditorMenu;
|
||||
class DeckEditorCardInfoDockWidget;
|
||||
class DeckEditorCardDatabaseDockWidget;
|
||||
class DeckEditorDeckDockWidget;
|
||||
class DeckEditorFilterDockWidget;
|
||||
class DeckEditorPrintingSelectorDockWidget;
|
||||
class DeckPreviewDeckTagsDisplayWidget;
|
||||
class Response;
|
||||
class FilterTree;
|
||||
class FilterTreeModel;
|
||||
class FilterBuilder;
|
||||
|
||||
class QTreeView;
|
||||
class QTextEdit;
|
||||
class QLabel;
|
||||
class QComboBox;
|
||||
class QGroupBox;
|
||||
class QMessageBox;
|
||||
class QHBoxLayout;
|
||||
class QVBoxLayout;
|
||||
class QPushButton;
|
||||
class QDockWidget;
|
||||
class QMenu;
|
||||
class QAction;
|
||||
class ExactCard;
|
||||
class TabSupervisor;
|
||||
struct LoadedDeck;
|
||||
|
||||
/**
|
||||
* @class AbstractTabDeckEditor
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueRef>
|
||||
#include <qlogging.h>
|
||||
|
||||
void ArchidektDeckListingApiResponse::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@
|
|||
#include "deck_listings/archidekt_api_response_deck_listing_container.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
#include <QUrl>
|
||||
#include <QVector>
|
||||
|
||||
class ArchidektDeckListingApiResponse
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#include "archidekt_api_response_card.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
void ArchidektApiResponseCard::fromJson(const QJsonObject &json)
|
||||
{
|
||||
id = json.value("id").toInt();
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@
|
|||
|
||||
#include "archidekt_api_response_edition.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include <QStringList>
|
||||
|
||||
class ArchidektApiResponseCard
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
#include "archidekt_api_response_card_entry.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueRef>
|
||||
#include <qlogging.h>
|
||||
|
||||
void ArchidektApiResponseCardEntry::fromJson(const QJsonObject &json)
|
||||
{
|
||||
id = json.value("id").toInt();
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@
|
|||
|
||||
#include "archidekt_api_response_card.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include <QStringList>
|
||||
|
||||
struct Category
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#include "archidekt_api_response_edition.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
void ArchidektApiResponseEdition::fromJson(const QJsonObject &json)
|
||||
{
|
||||
editionCode = json.value("editioncode").toString();
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
#ifndef COCKATRICE_ARCHIDEKT_API_RESPONSE_EDITION_H
|
||||
#define COCKATRICE_ARCHIDEKT_API_RESPONSE_EDITION_H
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
class ArchidektApiResponseEdition
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
#include "archidekt_api_response_deck.h"
|
||||
|
||||
#include "../card/archidekt_api_response_card_entry.h"
|
||||
#include "../deck_listings/archidekt_api_response_deck_owner.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueRef>
|
||||
#include <qlogging.h>
|
||||
|
||||
void ArchidektApiResponseDeck::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
#ifndef COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_H
|
||||
#define COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_H
|
||||
|
||||
#include "../card/archidekt_api_response_card.h"
|
||||
#include "../card/archidekt_api_response_card_entry.h"
|
||||
#include "../deck_listings/archidekt_api_response_deck_owner.h"
|
||||
#include "archidekt_api_response_deck_category.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
|
||||
class ArchidektApiResponseDeck
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#include "archidekt_api_response_deck_category.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
void ArchidektApiResponseDeckCategory::fromJson(const QJsonObject &json)
|
||||
{
|
||||
id = json.value("id").toInt();
|
||||
|
|
|
|||
|
|
@ -1,15 +1,8 @@
|
|||
#ifndef COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_CATEGORY_H
|
||||
#define COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_CATEGORY_H
|
||||
|
||||
#include "../card/archidekt_api_response_card.h"
|
||||
#include "../card/archidekt_api_response_card_entry.h"
|
||||
#include "../deck_listings/archidekt_api_response_deck_owner.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
class ArchidektApiResponseDeckCategory
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@
|
|||
#include "archidekt_api_response_deck_owner.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueRef>
|
||||
#include <qlogging.h>
|
||||
|
||||
void ArchidektApiResponseDeckListingContainer::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#include "archidekt_api_response_deck_owner.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include <QStringList>
|
||||
|
||||
class ArchidektApiResponseDeckListingContainer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#include "archidekt_api_response_deck_owner.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
void ArchidektApiResponseDeckOwner::fromJson(const QJsonObject &json)
|
||||
{
|
||||
id = json.value("id").toInt();
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_OWNER_H
|
||||
#define COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_OWNER_H
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
|
||||
class ArchidektApiResponseDeckOwner
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,16 +2,39 @@
|
|||
|
||||
#include "../../../../../../client/settings/cache_settings.h"
|
||||
#include "../../../../../deck_loader/card_node_function.h"
|
||||
#include "../../../../../deck_loader/deck_loader.h"
|
||||
#include "../../../../cards/card_size_widget.h"
|
||||
#include "../../../../../deck_loader/loaded_deck.h"
|
||||
#include "../../../../cards/deck_card_zone_display_widget.h"
|
||||
#include "../../../../visual_deck_editor/visual_deck_display_options_widget.h"
|
||||
#include "../../../../visual_deck_editor/visual_deck_editor_widget.h"
|
||||
#include "../api_response/archidekt_formats.h"
|
||||
#include "../api_response/card/archidekt_api_response_card.h"
|
||||
#include "../api_response/card/archidekt_api_response_card_entry.h"
|
||||
#include "../api_response/card/archidekt_api_response_edition.h"
|
||||
#include "../api_response/deck/archidekt_api_response_deck.h"
|
||||
#include "deck_list_model.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QDebug>
|
||||
#include <QHBoxLayout>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QModelIndex>
|
||||
#include <QPushButton>
|
||||
#include <QScrollArea>
|
||||
#include <QSharedPointer>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QTextStream>
|
||||
#include <QVBoxLayout>
|
||||
#include <QVariant>
|
||||
#include <functional>
|
||||
#include <libcockatrice/card/import/card_name_normalizer.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <qlogging.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class CardSizeWidget;
|
||||
|
||||
ArchidektApiResponseDeckDisplayWidget::ArchidektApiResponseDeckDisplayWidget(QWidget *parent,
|
||||
ArchidektApiResponseDeck _response,
|
||||
|
|
|
|||
|
|
@ -1,18 +1,22 @@
|
|||
#ifndef COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_DISPLAY_WIDGET_H
|
||||
#define COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../../../../deck_loader/deck_loader.h"
|
||||
#include "../../../../cards/card_size_widget.h"
|
||||
#include "../../../../general/layout_containers/flow_widget.h"
|
||||
#include "../../../../visual_deck_editor/visual_deck_display_options_widget.h"
|
||||
#include "../api_response/deck/archidekt_api_response_deck.h"
|
||||
#include "deck_list_model.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHash>
|
||||
#include <QPersistentModelIndex>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardSizeWidget;
|
||||
class DeckListModel;
|
||||
class QHBoxLayout;
|
||||
class QPushButton;
|
||||
class QScrollArea;
|
||||
class QVBoxLayout;
|
||||
class VisualDeckDisplayOptionsWidget;
|
||||
struct LoadedDeck;
|
||||
|
||||
/**
|
||||
* @class ArchidektApiResponseDeckDisplayWidget
|
||||
|
|
|
|||
|
|
@ -1,17 +1,30 @@
|
|||
#include "archidekt_api_response_deck_entry_display_widget.h"
|
||||
|
||||
#include "../../../../../card_picture_loader/card_picture_loader.h"
|
||||
#include "../../../../cards/card_info_picture_with_text_overlay_widget.h"
|
||||
#include "../../../../general/display/background_plate_widget.h"
|
||||
#include "../../../../general/display/charts/bars/color_bar.h"
|
||||
#include "../../../../general/display/shadow_background_label.h"
|
||||
#include "../api_response/deck_listings/archidekt_api_response_deck_listing_container.h"
|
||||
#include "../api_response/deck_listings/archidekt_api_response_deck_owner.h"
|
||||
#include "archidekt_deck_preview_image_display_widget.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QByteArray>
|
||||
#include <QDateTime>
|
||||
#include <QFontMetrics>
|
||||
#include <QLabel>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QPixmap>
|
||||
#include <QRect>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QSizePolicy>
|
||||
#include <QVBoxLayout>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <QtGlobal>
|
||||
#include <qnamespace.h>
|
||||
#include <version_string.h>
|
||||
|
||||
#define ARCHIDEKT_DEFAULT_IMAGE "https://storage.googleapis.com/topdekt-user/images/archidekt_deck_card_shadow.jpg"
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
#ifndef COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_ENTRY_DISPLAY_WIDGET_H
|
||||
#define COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_ENTRY_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../../../cards/card_info_picture_with_text_overlay_widget.h"
|
||||
#include "../api_response/deck_listings/archidekt_api_response_deck_listing_container.h"
|
||||
#include "archidekt_deck_preview_image_display_widget.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QResizeEvent>
|
||||
#include <QVBoxLayout>
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class BackgroundPlateWidget;
|
||||
class ArchidektDeckPreviewImageDisplayWidget;
|
||||
class QLabel;
|
||||
class QNetworkAccessManager;
|
||||
class QNetworkReply;
|
||||
class QVBoxLayout;
|
||||
|
||||
/**
|
||||
* @class ArchidektApiResponseDeckEntryDisplayWidget
|
||||
|
|
|
|||
|
|
@ -1,8 +1,18 @@
|
|||
#include "archidekt_api_response_deck_listings_display_widget.h"
|
||||
|
||||
#include "../../../../cards/card_info_picture_with_text_overlay_widget.h"
|
||||
#include "../../../../cards/card_size_widget.h"
|
||||
#include "../../../../general/layout_containers/flow_widget.h"
|
||||
#include "../api_response/archidekt_deck_listing_api_response.h"
|
||||
#include "../api_response/deck_listings/archidekt_api_response_deck_listing_container.h"
|
||||
#include "archidekt_api_response_deck_entry_display_widget.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QList>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkRequest>
|
||||
#include <QSlider>
|
||||
#include <qnamespace.h>
|
||||
|
||||
ArchidektApiResponseDeckListingsDisplayWidget::ArchidektApiResponseDeckListingsDisplayWidget(
|
||||
QWidget *parent,
|
||||
ArchidektDeckListingApiResponse response,
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
#ifndef COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_LISTINGS_DISPLAY_WIDGET_H
|
||||
#define COCKATRICE_ARCHIDEKT_API_RESPONSE_DECK_LISTINGS_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../../../cards/card_size_widget.h"
|
||||
#include "../../../../general/layout_containers/flow_widget.h"
|
||||
#include "../api_response/archidekt_deck_listing_api_response.h"
|
||||
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QVBoxLayout>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class ArchidektDeckListingApiResponse;
|
||||
class CardSizeWidget;
|
||||
class FlowWidget;
|
||||
class QHBoxLayout;
|
||||
class QNetworkAccessManager;
|
||||
|
||||
/**
|
||||
* @class ArchidektApiResponseDeckListingsDisplayWidget
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
#include "archidekt_deck_preview_image_display_widget.h"
|
||||
|
||||
#include <QFontMetrics>
|
||||
#include <QPainter>
|
||||
#include "../../../../general/display/shadow_background_label.h"
|
||||
|
||||
#include <QFont>
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
#include <qnamespace.h>
|
||||
|
||||
ArchidektDeckPreviewImageDisplayWidget::ArchidektDeckPreviewImageDisplayWidget(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef COCKATRICE_ARCHIDEKT_DECK_PREVIEW_IMAGE_DISPLAY_WIDGET_H
|
||||
#define COCKATRICE_ARCHIDEKT_DECK_PREVIEW_IMAGE_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../../../general/display/shadow_background_label.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QLabel;
|
||||
class ShadowBackgroundLabel;
|
||||
|
||||
/**
|
||||
* @class ArchidektDeckPreviewImageDisplayWidget
|
||||
|
|
|
|||
|
|
@ -3,31 +3,54 @@
|
|||
#include "../../../../../client/settings/cache_settings.h"
|
||||
#include "../../../../pixel_map_generator.h"
|
||||
#include "../../../cards/additional_info/mana_symbol_widget.h"
|
||||
#include "../../../cards/card_size_widget.h"
|
||||
#include "../../../quick_settings/settings_button_widget.h"
|
||||
#include "../../../utility/completer_utils.h"
|
||||
#include "../../tab.h"
|
||||
#include "../../tab_supervisor.h"
|
||||
#include "api_response/archidekt_deck_listing_api_response.h"
|
||||
#include "api_response/deck/archidekt_api_response_deck.h"
|
||||
#include "card_database_display_model.h"
|
||||
#include "card_database_model.h"
|
||||
#include "display/archidekt_api_response_deck_display_widget.h"
|
||||
#include "display/archidekt_api_response_deck_listings_display_widget.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QDebug>
|
||||
#include <QFormLayout>
|
||||
#include <QEvent>
|
||||
#include <QGridLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValueRef>
|
||||
#include <QLabel>
|
||||
#include <QLayoutItem>
|
||||
#include <QLineEdit>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QPoint>
|
||||
#include <QPushButton>
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QScrollBar>
|
||||
#include <QSharedPointer>
|
||||
#include <QSizePolicy>
|
||||
#include <QSpinBox>
|
||||
#include <QStringList>
|
||||
#include <QStringLiteral>
|
||||
#include <QTimer>
|
||||
#include <QUrl>
|
||||
#include <QUrlQuery>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWheelEvent>
|
||||
#include <QWidget>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/models/database/card/card_completer_proxy_model.h>
|
||||
#include <libcockatrice/models/database/card/card_search_model.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <qlogging.h>
|
||||
#include <qnamespace.h>
|
||||
#include <version_string.h>
|
||||
|
||||
TabArchidekt::TabArchidekt(TabSupervisor *_tabSupervisor)
|
||||
|
|
|
|||
|
|
@ -1,26 +1,35 @@
|
|||
#ifndef COCKATRICE_TAB_ARCHIDEKT_H
|
||||
#define COCKATRICE_TAB_ARCHIDEKT_H
|
||||
|
||||
#include "../../interface/widgets/cards/card_size_widget.h"
|
||||
#include "../../interface/widgets/quick_settings/settings_button_widget.h"
|
||||
#include "../../tab.h"
|
||||
#include "display/archidekt_api_response_deck_listings_display_widget.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QPushButton>
|
||||
#include <QScrollArea>
|
||||
#include <QChar>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QSet>
|
||||
#include <QSpinBox>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <QVector>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class ArchidektApiResponseDeckListingsDisplayWidget;
|
||||
class CardSizeWidget;
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
class QHBoxLayout;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QNetworkAccessManager;
|
||||
class QNetworkReply;
|
||||
class QPushButton;
|
||||
class QScrollArea;
|
||||
class QSpinBox;
|
||||
class QTimer;
|
||||
class QVBoxLayout;
|
||||
class QWidget;
|
||||
class SettingsButtonWidget;
|
||||
class TabSupervisor;
|
||||
|
||||
/** Base API link for Archidekt deck search */
|
||||
inline QString archidektApiLink = "https://archidekt.com/api/decks/v3/?name=";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "card_in_deck_request.h"
|
||||
|
||||
#include <QJsonValue>
|
||||
|
||||
CardInDeckRequest CardInDeckRequest::fromJson(const QJsonObject &json)
|
||||
{
|
||||
CardInDeckRequest request;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef COCKATRICE_CARD_IN_DECK_REQUEST_H
|
||||
#define COCKATRICE_CARD_IN_DECK_REQUEST_H
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
|
||||
struct CardInDeckRequest
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "commander_spellbook_card_result.h"
|
||||
|
||||
#include <QJsonValue>
|
||||
|
||||
CommanderSpellbookCardResult CommanderSpellbookCardResult::fromJson(const QJsonObject &json)
|
||||
{
|
||||
CommanderSpellbookCardResult result;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
#include "commander_spellbook_deck_request.h"
|
||||
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
#include "libcockatrice/deck_list/tree/inner_deck_list_node.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueConstRef>
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <libcockatrice/deck_list/tree/deck_list_card_node.h>
|
||||
|
||||
CommanderSpellbookDeckRequest CommanderSpellbookDeckRequest::fromJson(const QJsonObject &json)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
#ifndef COCKATRICE_COMMANDER_SPELLBOOK_DECK_REQUEST_H
|
||||
#define COCKATRICE_COMMANDER_SPELLBOOK_DECK_REQUEST_H
|
||||
#include "card_in_deck_request.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
|
||||
class DeckList;
|
||||
|
||||
struct CommanderSpellbookDeckRequest
|
||||
{
|
||||
static CommanderSpellbookDeckRequest fromJson(const QJsonObject &json);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#include "commander_spellbook_estimate_bracket_result.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueRef>
|
||||
|
||||
EstimateBracketResult EstimateBracketResult::fromJson(const QJsonObject &json)
|
||||
{
|
||||
EstimateBracketResult result;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
struct EstimateBracketResult
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "commander_spellbook_variant_result.h"
|
||||
|
||||
#include <QJsonValue>
|
||||
|
||||
CommanderSpellbookVariantResult CommanderSpellbookVariantResult::fromJson(const QJsonObject &json)
|
||||
{
|
||||
CommanderSpellbookVariantResult result;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
|
||||
struct CommanderSpellbookVariantResult
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <libcockatrice/settings/commander_bracket_settings.h>
|
||||
|
||||
class DeckList;
|
||||
|
||||
CommanderBracketService &CommanderBracketService::instance()
|
||||
{
|
||||
static CommanderBracketService service;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,15 @@
|
|||
#ifndef COCKATRICE_COMMANDER_BRACKET_SERVICE_H
|
||||
#define COCKATRICE_COMMANDER_BRACKET_SERVICE_H
|
||||
|
||||
#include "api_response/commander_spellbook_estimate_bracket_result.h"
|
||||
#include "commander_spellbook_api_accessor.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class DeckList;
|
||||
|
||||
struct CommanderBracketEstimate
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
#include "../../../../../client/settings/cache_settings.h"
|
||||
#include "../../../../pixel_map_generator.h"
|
||||
#include "commander_bracket_service.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QComboBox>
|
||||
#include <QDialog>
|
||||
#include <QDialogButtonBox>
|
||||
|
|
@ -11,11 +13,17 @@
|
|||
#include <QGridLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QPushButton>
|
||||
#include <QStringLiteral>
|
||||
#include <QTimer>
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/settings/deck_editor_settings.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
template <class T> class QSharedPointer;
|
||||
|
||||
CommanderBracketWidget::CommanderBracketWidget(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,12 +4,17 @@
|
|||
#include "commander_spellbook_bracket_explainer.h"
|
||||
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QLabel;
|
||||
class QToolButton;
|
||||
struct CommanderBracketEstimate;
|
||||
class DeckList;
|
||||
class QObject;
|
||||
template <class T> class QSharedPointer;
|
||||
|
||||
class CommanderBracketWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,21 @@
|
|||
#include "commander_spellbook_api_accessor.h"
|
||||
|
||||
#include "api_response/commander_spellbook_deck_request.h"
|
||||
#include "api_response/commander_spellbook_estimate_bracket_result.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonParseError>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QStringLiteral>
|
||||
#include <QUrl>
|
||||
#include <QVariant>
|
||||
#include <version_string.h>
|
||||
|
||||
class DeckList;
|
||||
|
||||
static const QUrl ESTIMATE_BRACKET_URL(QStringLiteral("https://backend.commanderspellbook.com/estimate-bracket"));
|
||||
|
||||
CommanderSpellbookApiAccessor &CommanderSpellbookApiAccessor::instance()
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
#ifndef COCKATRICE_COMMANDER_SPELLBOOK_API_ACCESSOR_H
|
||||
#define COCKATRICE_COMMANDER_SPELLBOOK_API_ACCESSOR_H
|
||||
|
||||
#include "api_response/commander_spellbook_estimate_bracket_result.h"
|
||||
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QObject>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class DeckList;
|
||||
class QNetworkReply;
|
||||
struct EstimateBracketResult;
|
||||
|
||||
class CommanderSpellbookApiAccessor final : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#include "commander_spellbook_bracket_explainer.h"
|
||||
|
||||
#include "api_response/commander_spellbook_card_result.h"
|
||||
#include "api_response/commander_spellbook_estimate_bracket_result.h"
|
||||
#include "api_response/commander_spellbook_variant_result.h"
|
||||
|
||||
static QString cardList(const QList<CommanderSpellbookCardResult> &cards, int max = 5)
|
||||
{
|
||||
QStringList names;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
#ifndef COCKATRICE_COMMANDER_SPELLBOOK_BRACKET_EXPLAINER_H
|
||||
#define COCKATRICE_COMMANDER_SPELLBOOK_BRACKET_EXPLAINER_H
|
||||
#include "api_response/commander_spellbook_estimate_bracket_result.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QtGlobal>
|
||||
|
||||
struct EstimateBracketResult;
|
||||
|
||||
namespace CommanderBracketNames
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,9 +2,16 @@
|
|||
|
||||
#include "../../../../../client/settings/cache_settings.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonParseError>
|
||||
#include <QMap>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkRequest>
|
||||
#include <QString>
|
||||
#include <QStringLiteral>
|
||||
#include <QUrl>
|
||||
#include <QVariant>
|
||||
#include <libcockatrice/settings/commander_bracket_settings.h>
|
||||
|
||||
static const QUrl COMMANDER_BRACKET_JSON_URL(QStringLiteral("https://cockatrice.github.io/commander-brackets.json"));
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
#ifndef COCKATRICE_HANDLE_COMMANDER_BRACKETS_H
|
||||
#define COCKATRICE_HANDLE_COMMANDER_BRACKETS_H
|
||||
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QObject>
|
||||
#include <QVariantMap>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QNetworkAccessManager;
|
||||
|
||||
class HandleCommanderBrackets : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueConstRef>
|
||||
#include <qlogging.h>
|
||||
|
||||
void EdhrecApiResponseArchidektLink::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#ifndef ARCHIDEKTENTRY_H
|
||||
#define ARCHIDEKTENTRY_H
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
#include "edhrec_average_deck_api_response.h"
|
||||
|
||||
#include "../archidekt_links/edhrec_api_response_archidekt_links.h"
|
||||
#include "../cards/edhrec_api_response_card_container.h"
|
||||
#include "../commander/edhrec_commander_api_response_average_deck_statistics.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
void EdhrecAverageDeckApiResponse::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
#include "edhrec_deck_api_response.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueConstRef>
|
||||
#include <QString>
|
||||
#include <QTextStream>
|
||||
#include <functional>
|
||||
#include <libcockatrice/card/import/card_name_normalizer.h>
|
||||
#include <qlogging.h>
|
||||
|
||||
void EdhrecDeckApiResponse::fromJson(const QJsonArray &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@
|
|||
#ifndef EDHREC_DECK_API_RESPONSE_H
|
||||
#define EDHREC_DECK_API_RESPONSE_H
|
||||
|
||||
#include "../../../../../../deck_loader/deck_loader.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
|
||||
class EdhrecDeckApiResponse
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#include "edhrec_api_response_card_prices.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
void CardPrices::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueRef>
|
||||
#include <qlogging.h>
|
||||
|
||||
void EdhrecApiResponseCardContainer::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "edhrec_commander_api_response_commander_details.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#include "edhrec_api_response_card_details.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
EdhrecApiResponseCardDetails::EdhrecApiResponseCardDetails()
|
||||
: synergy(0.0), inclusion(0), numDecks(0), potentialDecks(0)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
#include "edhrec_api_response_card_list.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueRef>
|
||||
#include <qlogging.h>
|
||||
|
||||
EdhrecApiResponseCardList::EdhrecApiResponseCardList()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "edhrec_api_response_card_details.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
#include "edhrec_commander_api_response_commander_details.h"
|
||||
|
||||
#include "../card_prices/edhrec_api_response_card_prices.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueRef>
|
||||
#include <qlogging.h>
|
||||
|
||||
void EdhrecCommanderApiResponseCommanderDetails::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#include "../card_prices/edhrec_api_response_card_prices.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
#include "edhrec_commander_api_response.h"
|
||||
|
||||
#include "../archidekt_links/edhrec_api_response_archidekt_links.h"
|
||||
#include "../cards/edhrec_api_response_card_container.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
void EdhrecCommanderApiResponse::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "edhrec_commander_api_response_average_deck_statistics.h"
|
||||
|
||||
#include <QJsonValue>
|
||||
|
||||
void EdhrecCommanderApiResponseAverageDeckStatistics::fromJson(const QJsonObject &json)
|
||||
{
|
||||
creature = json.value("creature").toInt(0);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
#include "edhrec_top_cards_api_response.h"
|
||||
|
||||
#include "../cards/edhrec_api_response_card_container.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
void EdhrecTopCardsApiResponse::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "../cards/edhrec_api_response_card_container.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
|
||||
class EdhrecTopCardsApiResponse
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
#include "edhrec_top_commanders_api_response.h"
|
||||
|
||||
#include "../cards/edhrec_api_response_card_container.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
void EdhrecTopCommandersApiResponse::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "../cards/edhrec_api_response_card_container.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
|
||||
class EdhrecTopCommandersApiResponse
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
#include "edhrec_top_tags_api_response.h"
|
||||
|
||||
#include "../cards/edhrec_api_response_card_container.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <qlogging.h>
|
||||
|
||||
void EdhrecTopTagsApiResponse::fromJson(const QJsonObject &json)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "../cards/edhrec_api_response_card_container.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
|
||||
class EdhrecTopTagsApiResponse
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
#include "edhrec_api_response_card_prices_display_widget.h"
|
||||
|
||||
#include "../../api_response/card_prices/edhrec_api_response_card_prices.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
|
||||
EdhrecApiResponseCardPricesDisplayWidget::EdhrecApiResponseCardPricesDisplayWidget(QWidget *parent,
|
||||
const CardPrices &_cardPrices)
|
||||
: QWidget(parent), cardPrices(_cardPrices)
|
||||
|
|
|
|||
|
|
@ -9,9 +9,11 @@
|
|||
|
||||
#include "../../api_response/card_prices/edhrec_api_response_card_prices.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QGridLayout;
|
||||
class QLabel;
|
||||
|
||||
class EdhrecApiResponseCardPricesDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,21 @@
|
|||
#include "edhrec_api_response_card_details_display_widget.h"
|
||||
|
||||
#include "../../../../../cards/card_info_picture_widget.h"
|
||||
#include "../../../../../cards/card_size_widget.h"
|
||||
#include "../../../../../general/display/background_plate_widget.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_details.h"
|
||||
#include "../../tab_edhrec_main.h"
|
||||
#include "edhrec_api_response_card_inclusion_display_widget.h"
|
||||
#include "edhrec_api_response_card_synergy_display_widget.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QMouseEvent>
|
||||
#include <QObject>
|
||||
#include <QSlider>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
EdhrecApiResponseCardDetailsDisplayWidget::EdhrecApiResponseCardDetailsDisplayWidget(
|
||||
QWidget *parent,
|
||||
|
|
|
|||
|
|
@ -7,15 +7,18 @@
|
|||
#ifndef EDHREC_COMMANDER_API_RESPONSE_CARD_DETAILS_DISPLAY_WIDGET_H
|
||||
#define EDHREC_COMMANDER_API_RESPONSE_CARD_DETAILS_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../../../../cards/card_info_picture_widget.h"
|
||||
#include "../../../../../general/display/background_plate_widget.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_details.h"
|
||||
#include "edhrec_api_response_card_inclusion_display_widget.h"
|
||||
#include "edhrec_api_response_card_synergy_display_widget.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class BackgroundPlateWidget;
|
||||
class CardInfoPictureWidget;
|
||||
class EdhrecApiResponseCardInclusionDisplayWidget;
|
||||
class EdhrecApiResponseCardSynergyDisplayWidget;
|
||||
class QLabel;
|
||||
class QVBoxLayout;
|
||||
|
||||
class EdhrecApiResponseCardDetailsDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
#include "edhrec_api_response_card_inclusion_display_widget.h"
|
||||
|
||||
#include "../../../../../general/display/charts/bars/percent_bar_widget.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_details.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
#include <QVBoxLayout>
|
||||
#include <qnamespace.h>
|
||||
|
||||
EdhrecApiResponseCardInclusionDisplayWidget::EdhrecApiResponseCardInclusionDisplayWidget(
|
||||
QWidget *parent,
|
||||
const EdhrecApiResponseCardDetails &_toDisplay)
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
#ifndef EDHREC_API_RESPONSE_CARD_INCLUSION_DISPLAY_WIDGET_H
|
||||
#define EDHREC_API_RESPONSE_CARD_INCLUSION_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../../../../general/display/charts/bars/percent_bar_widget.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_details.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PercentBarWidget;
|
||||
class QLabel;
|
||||
class QVBoxLayout;
|
||||
|
||||
class EdhrecApiResponseCardInclusionDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,19 @@
|
|||
#include "edhrec_api_response_card_list_display_widget.h"
|
||||
|
||||
#include "../../../../../general/display/banner_widget.h"
|
||||
#include "../../../../../general/layout_containers/flow_widget.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_details.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_list.h"
|
||||
#include "edhrec_api_response_card_details_display_widget.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QDebug>
|
||||
#include <QForeach>
|
||||
#include <QList>
|
||||
#include <QResizeEvent>
|
||||
#include <QSize>
|
||||
#include <QVBoxLayout>
|
||||
#include <qlogging.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
EdhrecApiResponseCardListDisplayWidget::EdhrecApiResponseCardListDisplayWidget(QWidget *parent,
|
||||
EdhrecApiResponseCardList toDisplay)
|
||||
|
|
|
|||
|
|
@ -8,12 +8,14 @@
|
|||
#define EDHREC_COMMANDER_API_RESPONSE_CARD_LIST_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../../../../general/display/banner_widget.h"
|
||||
#include "../../../../../general/layout_containers/flow_widget.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_list.h"
|
||||
|
||||
#include <QResizeEvent>
|
||||
#include <QVBoxLayout>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class EdhrecApiResponseCardList;
|
||||
class FlowWidget;
|
||||
class QVBoxLayout;
|
||||
|
||||
class EdhrecApiResponseCardListDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
#include "edhrec_api_response_card_synergy_display_widget.h"
|
||||
|
||||
#include "../../../../../general/display/charts/bars/percent_bar_widget.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_details.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
#include <QVBoxLayout>
|
||||
#include <qnamespace.h>
|
||||
|
||||
EdhrecApiResponseCardSynergyDisplayWidget::EdhrecApiResponseCardSynergyDisplayWidget(
|
||||
QWidget *parent,
|
||||
const EdhrecApiResponseCardDetails &_toDisplay)
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
#ifndef EDHREC_API_RESPONSE_CARD_SYNERGY_DISPLAY_WIDGET_H
|
||||
#define EDHREC_API_RESPONSE_CARD_SYNERGY_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../../../../general/display/charts/bars/percent_bar_widget.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_details.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PercentBarWidget;
|
||||
class QLabel;
|
||||
class QVBoxLayout;
|
||||
|
||||
class EdhrecApiResponseCardSynergyDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,20 @@
|
|||
#include "edhrec_api_response_commander_details_display_widget.h"
|
||||
|
||||
#include "../../../../../cards/card_info_picture_widget.h"
|
||||
#include "../../../../../cards/card_size_widget.h"
|
||||
#include "../../api_response/cards/edhrec_commander_api_response_commander_details.h"
|
||||
#include "../../tab_edhrec_main.h"
|
||||
#include "../card_prices/edhrec_api_response_card_prices_display_widget.h"
|
||||
#include "edhrec_commander_api_response_bracket_navigation_widget.h"
|
||||
#include "edhrec_commander_api_response_navigation_widget.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QObject>
|
||||
#include <QSlider>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
EdhrecCommanderResponseCommanderDetailsDisplayWidget::EdhrecCommanderResponseCommanderDetailsDisplayWidget(
|
||||
QWidget *parent,
|
||||
|
|
|
|||
|
|
@ -7,16 +7,19 @@
|
|||
#ifndef EDHREC_COMMANDER_API_RESPONSE_COMMANDER_DETAILS_DISPLAY_WIDGET_H
|
||||
#define EDHREC_COMMANDER_API_RESPONSE_COMMANDER_DETAILS_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../../../../cards/card_info_picture_widget.h"
|
||||
#include "../../api_response/cards/edhrec_commander_api_response_commander_details.h"
|
||||
#include "../card_prices/edhrec_api_response_card_prices_display_widget.h"
|
||||
#include "edhrec_commander_api_response_navigation_widget.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class EdhrecCommanderApiResponseNavigationWidget;
|
||||
class CardInfoPictureWidget;
|
||||
class EdhrecApiResponseCardPricesDisplayWidget;
|
||||
class QHBoxLayout;
|
||||
class QLabel;
|
||||
class QVBoxLayout;
|
||||
|
||||
class EdhrecCommanderResponseCommanderDetailsDisplayWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
#include "edhrec_commander_api_response_bracket_navigation_widget.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QSet>
|
||||
#include <QSharedPointer>
|
||||
#include <qnamespace.h>
|
||||
|
||||
EdhrecCommanderApiResponseBracketNavigationWidget::EdhrecCommanderApiResponseBracketNavigationWidget(
|
||||
QWidget *parent,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,16 @@
|
|||
#ifndef COCKATRICE_EDHREC_COMMANDER_API_RESPONSE_BRACKET_NAVIGATION_WIDGET_H
|
||||
#define COCKATRICE_EDHREC_COMMANDER_API_RESPONSE_BRACKET_NAVIGATION_WIDGET_H
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QPushButton>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QGridLayout;
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
|
||||
class EdhrecCommanderApiResponseBracketNavigationWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
#include "edhrec_commander_api_response_budget_navigation_widget.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QSet>
|
||||
#include <QSharedPointer>
|
||||
#include <qnamespace.h>
|
||||
|
||||
EdhrecCommanderApiResponseBudgetNavigationWidget::EdhrecCommanderApiResponseBudgetNavigationWidget(
|
||||
QWidget *parent,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,16 @@
|
|||
#ifndef COCKATRICE_EDHREC_COMMANDER_API_RESPONSE_BUDGET_NAVIGATION_WIDGET_H
|
||||
#define COCKATRICE_EDHREC_COMMANDER_API_RESPONSE_BUDGET_NAVIGATION_WIDGET_H
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QPushButton>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QGridLayout;
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
|
||||
class EdhrecCommanderApiResponseBudgetNavigationWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,15 +1,30 @@
|
|||
#include "edhrec_commander_api_response_display_widget.h"
|
||||
|
||||
#include "../../../../../cards/card_info_picture_widget.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_container.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_list.h"
|
||||
#include "../../api_response/commander/edhrec_commander_api_response.h"
|
||||
#include "../cards/edhrec_api_response_card_list_display_widget.h"
|
||||
#include "edhrec_api_response_commander_details_display_widget.h"
|
||||
|
||||
#include <QAbstractItemView>
|
||||
#include <QDebug>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLayoutItem>
|
||||
#include <QList>
|
||||
#include <QListView>
|
||||
#include <QModelIndex>
|
||||
#include <QObject>
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QSize>
|
||||
#include <QSplitter>
|
||||
#include <QStringList>
|
||||
#include <QStringListModel>
|
||||
#include <QVBoxLayout>
|
||||
#include <qlogging.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QModelIndex;
|
||||
|
||||
EdhrecCommanderApiResponseDisplayWidget::EdhrecCommanderApiResponseDisplayWidget(QWidget *parent,
|
||||
EdhrecCommanderApiResponse response,
|
||||
|
|
|
|||
|
|
@ -7,11 +7,14 @@
|
|||
#ifndef EDHREC_COMMANDER_API_RESPONSE_DISPLAY_WIDGET_H
|
||||
#define EDHREC_COMMANDER_API_RESPONSE_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../api_response/commander/edhrec_commander_api_response.h"
|
||||
|
||||
#include <QScrollArea>
|
||||
#include <QVBoxLayout>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class EdhrecCommanderApiResponse;
|
||||
class QHBoxLayout;
|
||||
class QScrollArea;
|
||||
class QVBoxLayout;
|
||||
|
||||
class EdhrecCommanderApiResponseDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
#include "edhrec_commander_api_response_navigation_widget.h"
|
||||
|
||||
#include "../../tab_edhrec_main.h"
|
||||
#include "edhrec_commander_api_response_bracket_navigation_widget.h"
|
||||
#include "edhrec_commander_api_response_budget_navigation_widget.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QObject>
|
||||
#include <QPushButton>
|
||||
|
||||
EdhrecCommanderApiResponseNavigationWidget::EdhrecCommanderApiResponseNavigationWidget(
|
||||
QWidget *parent,
|
||||
|
|
|
|||
|
|
@ -7,14 +7,16 @@
|
|||
#ifndef EDHREC_COMMANDER_API_RESPONSE_NAVIGATION_WIDGET_H
|
||||
#define EDHREC_COMMANDER_API_RESPONSE_NAVIGATION_WIDGET_H
|
||||
|
||||
#include "edhrec_api_response_commander_details_display_widget.h"
|
||||
#include "edhrec_commander_api_response_bracket_navigation_widget.h"
|
||||
#include "edhrec_commander_api_response_budget_navigation_widget.h"
|
||||
#include "../../api_response/cards/edhrec_commander_api_response_commander_details.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class EdhrecCommanderApiResponseBracketNavigationWidget;
|
||||
class EdhrecCommanderApiResponseBudgetNavigationWidget;
|
||||
class QGridLayout;
|
||||
class QPushButton;
|
||||
|
||||
class EdhrecCommanderApiResponseNavigationWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,17 @@
|
|||
#include "edhrec_top_cards_api_response_display_widget.h"
|
||||
|
||||
#include "../../api_response/cards/edhrec_api_response_card_container.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_list.h"
|
||||
#include "../../api_response/top_cards/edhrec_top_cards_api_response.h"
|
||||
#include "../cards/edhrec_api_response_card_list_display_widget.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QList>
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QVBoxLayout>
|
||||
#include <qnamespace.h>
|
||||
|
||||
EdhrecTopCardsApiResponseDisplayWidget::EdhrecTopCardsApiResponseDisplayWidget(QWidget *parent,
|
||||
EdhrecTopCardsApiResponse response)
|
||||
: QWidget(parent)
|
||||
|
|
|
|||
|
|
@ -7,12 +7,13 @@
|
|||
#ifndef EDHREC_TOP_CARDS_API_RESPONSE_DISPLAY_WIDGET_H
|
||||
#define EDHREC_TOP_CARDS_API_RESPONSE_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../api_response/top_cards/edhrec_top_cards_api_response.h"
|
||||
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class EdhrecTopCardsApiResponse;
|
||||
class QHBoxLayout;
|
||||
class QScrollArea;
|
||||
class QVBoxLayout;
|
||||
|
||||
class EdhrecTopCardsApiResponseDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,20 @@
|
|||
#include "edhrec_top_commanders_api_response_display_widget.h"
|
||||
|
||||
#include "../../api_response/cards/edhrec_api_response_card_container.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_list.h"
|
||||
#include "../../api_response/top_commanders/edhrec_top_commanders_api_response.h"
|
||||
#include "../cards/edhrec_api_response_card_list_display_widget.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QHBoxLayout>
|
||||
#include <QList>
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QSize>
|
||||
#include <QVBoxLayout>
|
||||
#include <qlogging.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
EdhrecTopCommandersApiResponseDisplayWidget::EdhrecTopCommandersApiResponseDisplayWidget(
|
||||
QWidget *parent,
|
||||
EdhrecTopCommandersApiResponse response)
|
||||
|
|
|
|||
|
|
@ -7,12 +7,13 @@
|
|||
#ifndef EDHREC_TOP_COMMANDERS_API_RESPONSE_DISPLAY_WIDGET_H
|
||||
#define EDHREC_TOP_COMMANDERS_API_RESPONSE_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../api_response/top_commanders/edhrec_top_commanders_api_response.h"
|
||||
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class EdhrecTopCommandersApiResponse;
|
||||
class QHBoxLayout;
|
||||
class QScrollArea;
|
||||
class QVBoxLayout;
|
||||
|
||||
class EdhrecTopCommandersApiResponseDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,17 @@
|
|||
#include "edhrec_top_tags_api_response_display_widget.h"
|
||||
|
||||
#include "../../api_response/cards/edhrec_api_response_card_container.h"
|
||||
#include "../../api_response/cards/edhrec_api_response_card_list.h"
|
||||
#include "../../api_response/top_tags/edhrec_top_tags_api_response.h"
|
||||
#include "../cards/edhrec_api_response_card_list_display_widget.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QList>
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QVBoxLayout>
|
||||
#include <qnamespace.h>
|
||||
|
||||
EdhrecTopTagsApiResponseDisplayWidget::EdhrecTopTagsApiResponseDisplayWidget(QWidget *parent,
|
||||
EdhrecTopTagsApiResponse response)
|
||||
: QWidget(parent)
|
||||
|
|
|
|||
|
|
@ -7,11 +7,13 @@
|
|||
#ifndef EDHREC_TOP_TAGS_API_RESPONSE_DISPLAY_WIDGET_H
|
||||
#define EDHREC_TOP_TAGS_API_RESPONSE_DISPLAY_WIDGET_H
|
||||
|
||||
#include "../../api_response/top_tags/edhrec_top_tags_api_response.h"
|
||||
|
||||
#include <QScrollArea>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class EdhrecTopTagsApiResponse;
|
||||
class QHBoxLayout;
|
||||
class QScrollArea;
|
||||
class QVBoxLayout;
|
||||
|
||||
class EdhrecTopTagsApiResponseDisplayWidget : public QWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,26 @@
|
|||
#include "tab_edhrec.h"
|
||||
|
||||
#include "../../tab.h"
|
||||
#include "api_response/commander/edhrec_commander_api_response.h"
|
||||
#include "display/commander/edhrec_commander_api_response_display_widget.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QChar>
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValueRef>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QRegularExpression>
|
||||
#include <QResizeEvent>
|
||||
#include <QSharedPointer>
|
||||
#include <QUrl>
|
||||
#include <qlogging.h>
|
||||
|
||||
class TabSupervisor;
|
||||
|
||||
TabEdhRec::TabEdhRec(TabSupervisor *_tabSupervisor) : Tab(_tabSupervisor)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@
|
|||
#define TAB_EDHREC_H
|
||||
|
||||
#include "../../tab.h"
|
||||
#include "display/commander/edhrec_commander_api_response_display_widget.h"
|
||||
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class EdhrecCommanderApiResponseDisplayWidget;
|
||||
class QNetworkAccessManager;
|
||||
class QNetworkReply;
|
||||
class TabSupervisor;
|
||||
|
||||
class TabEdhRec : public Tab
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#include "tab_edhrec_main.h"
|
||||
|
||||
#include "../../../../../client/settings/cache_settings.h"
|
||||
#include "../../../../deck_loader/loaded_deck.h"
|
||||
#include "../../../cards/card_size_widget.h"
|
||||
#include "../../../quick_settings/settings_button_widget.h"
|
||||
#include "../../../utility/completer_utils.h"
|
||||
#include "../../tab_supervisor.h"
|
||||
#include "api_response/average_deck/edhrec_average_deck_api_response.h"
|
||||
|
|
@ -18,13 +21,17 @@
|
|||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QLineEdit>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QPushButton>
|
||||
#include <QRegularExpression>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/database/card_database_querier.h>
|
||||
#include <libcockatrice/models/database/card/card_completer_proxy_model.h>
|
||||
#include <libcockatrice/models/database/card/card_search_model.h>
|
||||
#include <libcockatrice/models/database/card_database_display_model.h>
|
||||
#include <libcockatrice/models/database/card_database_model.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <version_string.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,16 +7,25 @@
|
|||
#ifndef TAB_EDHREC_MAIN_H
|
||||
#define TAB_EDHREC_MAIN_H
|
||||
|
||||
#include "../../interface/widgets/cards/card_size_widget.h"
|
||||
#include "../../interface/widgets/quick_settings/settings_button_widget.h"
|
||||
#include "../../tab.h"
|
||||
#include "display/commander/edhrec_commander_api_response_display_widget.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QPushButton>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardSizeWidget;
|
||||
class EdhrecCommanderApiResponseDisplayWidget;
|
||||
class QHBoxLayout;
|
||||
class QLineEdit;
|
||||
class QNetworkAccessManager;
|
||||
class QNetworkReply;
|
||||
class QPushButton;
|
||||
class QVBoxLayout;
|
||||
class QWidget;
|
||||
class SettingsButtonWidget;
|
||||
class TabSupervisor;
|
||||
|
||||
class TabEdhRecMain : public Tab
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,12 +1,17 @@
|
|||
#include "tab.h"
|
||||
|
||||
#include "../interface/widgets/cards/card_info_display_widget.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
#include "tab_supervisor.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCloseEvent>
|
||||
#include <QDebug>
|
||||
#include <QFlags>
|
||||
#include <QPoint>
|
||||
#include <QRect>
|
||||
#include <QScreen>
|
||||
#include <QSharedPointer>
|
||||
#include <QtGlobal>
|
||||
#include <qnamespace.h>
|
||||
|
||||
Tab::Tab(TabSupervisor *_tabSupervisor)
|
||||
: QMainWindow(_tabSupervisor), tabSupervisor(_tabSupervisor), contentsChanged(false), infoPopup(0)
|
||||
|
|
|
|||
|
|
@ -7,12 +7,16 @@
|
|||
#ifndef TAB_H
|
||||
#define TAB_H
|
||||
|
||||
#include <QList>
|
||||
#include <QMainWindow>
|
||||
#include <QString>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QMenu;
|
||||
class TabSupervisor;
|
||||
class CardInfoDisplayWidget;
|
||||
class QPoint;
|
||||
|
||||
class Tab : public QMainWindow
|
||||
{
|
||||
|
|
|
|||
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