mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03: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
|
|
@ -2,12 +2,20 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../z_values.h"
|
||||
#include "abstract_card_item.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QCursor>
|
||||
#include <QDebug>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QPointF;
|
||||
|
||||
const QColor GHOST_MASK = QColor(255, 255, 255, 50);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,17 @@
|
|||
#ifndef ABSTRACTCARDDRAGITEM_H
|
||||
#define ABSTRACTCARDDRAGITEM_H
|
||||
|
||||
#include "abstract_card_item.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "graphics_item_type.h"
|
||||
|
||||
class QGraphicsScene;
|
||||
class CardZone;
|
||||
class CardInfo;
|
||||
#include <QGraphicsItem>
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QPointF>
|
||||
#include <QRectF>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class AbstractCardItem;
|
||||
|
||||
class AbstractCardDragItem : public QObject, public QGraphicsItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,19 +3,42 @@
|
|||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/card_localization.h"
|
||||
#include "../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../z_values.h"
|
||||
#include "abstract_graphics_item.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QChar>
|
||||
#include <QCursor>
|
||||
#include <QFlags>
|
||||
#include <QFont>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QHash>
|
||||
#include <QLineF>
|
||||
#include <QList>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPen>
|
||||
#include <QPixmap>
|
||||
#include <QPointF>
|
||||
#include <QRectF>
|
||||
#include <QTransform>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/appearance_settings.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <libcockatrice/settings/debug_settings.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QSizeF;
|
||||
|
||||
AbstractCardItem::AbstractCardItem(QGraphicsItem *parent, const CardRef &cardRef, PlayerLogic *_owner, int _id)
|
||||
: ArrowTarget(_owner, parent), id(_id), cardRef(cardRef), tapped(false), facedown(false), tapAngle(0),
|
||||
|
|
|
|||
|
|
@ -8,14 +8,22 @@
|
|||
#define ABSTRACTCARDITEM_H
|
||||
|
||||
#include "../animated_item.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "arrow_target.h"
|
||||
#include "graphics_item_type.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class CardInfo;
|
||||
class QPainter;
|
||||
class QPoint;
|
||||
|
||||
class AbstractCardItem : public ArrowTarget, public IAnimatedItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,21 +2,33 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../client/settings/shortcuts_settings.h"
|
||||
#include "../../game/board/counter_state.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game_graphics/board/translate_counter_name.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../interface/widgets/menus/tearoff_menu.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QEvent>
|
||||
#include <QFlags>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QGraphicsView>
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QKeySequence>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/protocol/pb/command_inc_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_counter.pb.h>
|
||||
#include <libcockatrice/utility/expression.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
AbstractCounter::AbstractCounter(CounterState *state,
|
||||
PlayerLogic *_player,
|
||||
|
|
|
|||
|
|
@ -7,18 +7,21 @@
|
|||
#ifndef COUNTER_H
|
||||
#define COUNTER_H
|
||||
|
||||
#include "../../game/board/counter_state.h"
|
||||
#include "../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../player/menu/abstract_player_component.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QInputDialog>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class QAction;
|
||||
class QKeyEvent;
|
||||
class QMenu;
|
||||
class QString;
|
||||
class CounterState;
|
||||
class QWidget;
|
||||
|
||||
class AbstractCounter : public QObject, public QGraphicsItem, public AbstractPlayerComponent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
#include "abstract_graphics_item.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QPainter>
|
||||
#include <QRectF>
|
||||
#include <QString>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <qnamespace.h>
|
||||
|
||||
void AbstractGraphicsItem::paintNumberEllipse(int number,
|
||||
int fontSize,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,12 @@
|
|||
#ifndef ABSTRACTGRAPHICSITEM_H
|
||||
#define ABSTRACTGRAPHICSITEM_H
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QColor>
|
||||
#include <QGraphicsObject>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QGraphicsItem;
|
||||
class QPainter;
|
||||
|
||||
/**
|
||||
* Parent class of all objects that appear in a game.
|
||||
|
|
|
|||
|
|
@ -2,28 +2,42 @@
|
|||
#include "arrow_item.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game/board/arrow_data.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../player/player_target.h"
|
||||
#include "../z_values.h"
|
||||
#include "../zones/card_zone.h"
|
||||
#include "card_item.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/protocol/pb/color.pb.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QBrush>
|
||||
#include <QElapsedTimer>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QLineF>
|
||||
#include <QLinearGradient>
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QPoint>
|
||||
#include <QString>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <QtMath>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/protocol/pb/command_attach_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_create_arrow.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_delete_arrow.pb.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/utility/color.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <math.h>
|
||||
#include <qnamespace.h>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,15 +6,23 @@
|
|||
#include "arrow_target.h"
|
||||
#include "graphics_item_type.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QElapsedTimer>
|
||||
#include <QGraphicsItem>
|
||||
#include <QList>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QPainterPath>
|
||||
#include <QPointF>
|
||||
#include <QPointer>
|
||||
#include <QRectF>
|
||||
#include <QSharedPointer>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardItem;
|
||||
class QGraphicsSceneMouseEvent;
|
||||
class PlayerLogic;
|
||||
template <class T> class QSharedPointer;
|
||||
|
||||
class ArrowItem : public QObject, public QGraphicsItem, public IAnimatedItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#include "arrow_target.h"
|
||||
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "arrow_item.h"
|
||||
#include <QVariant>
|
||||
|
||||
class QGraphicsItem;
|
||||
|
||||
ArrowTarget::ArrowTarget(PlayerLogic *_owner, QGraphicsItem *parent) : AbstractGraphicsItem(parent), owner(_owner)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
#include "abstract_graphics_item.h"
|
||||
|
||||
#include <QList>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class ArrowItem;
|
||||
class QGraphicsItem;
|
||||
|
||||
class ArrowTarget : public AbstractGraphicsItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,9 +6,20 @@
|
|||
#include "../zones/view_zone.h"
|
||||
#include "card_item.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QCursor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QPoint>
|
||||
#include <QSharedPointer>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class CardZoneLogic;
|
||||
|
||||
CardDragItem::CardDragItem(CardItem *_item,
|
||||
int _id,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,11 @@
|
|||
|
||||
#include "abstract_card_drag_item.h"
|
||||
|
||||
#include <QPointF>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardItem;
|
||||
class CardZone;
|
||||
|
||||
class CardDragItem : public AbstractCardDragItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,26 +1,52 @@
|
|||
#include "card_item.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../client/settings/card_counter_settings.h"
|
||||
#include "../../game/abstract_game.h"
|
||||
#include "../../game/board/card_state.h"
|
||||
#include "../../game/game_state.h"
|
||||
#include "../../game/phase.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/player/player_manager.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../game/zones/table_zone_logic.h"
|
||||
#include "../../game/zones/view_zone_logic.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../zones/table_zone.h"
|
||||
#include "../zones/view_zone.h"
|
||||
#include "arrow_item.h"
|
||||
#include "card_drag_item.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_cardcounter.pb.h"
|
||||
|
||||
#include <../../client/settings/card_counter_settings.h>
|
||||
#include <QApplication>
|
||||
#include <QBrush>
|
||||
#include <QChar>
|
||||
#include <QColor>
|
||||
#include <QCursor>
|
||||
#include <QFlags>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QMenu>
|
||||
#include <QMap>
|
||||
#include <QMapIterator>
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QRectF>
|
||||
#include <QSharedPointer>
|
||||
#include <QSizeF>
|
||||
#include <QTransform>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
struct CardRef;
|
||||
|
||||
CardItem::CardItem(PlayerLogic *_owner,
|
||||
QGraphicsItem *parent,
|
||||
|
|
|
|||
|
|
@ -8,18 +8,24 @@
|
|||
#define CARDITEM_H
|
||||
|
||||
#include "../../game/board/card_state.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "abstract_card_item.h"
|
||||
#include "graphics_item_type.h"
|
||||
|
||||
#include <libcockatrice/network/server/remote/game/server_card.h>
|
||||
#include <QList>
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QString>
|
||||
#include <QVariantList>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardDatabase;
|
||||
class CardDragItem;
|
||||
class CardZone;
|
||||
class ServerInfo_Card;
|
||||
class PlayerLogic;
|
||||
class QAction;
|
||||
class QColor;
|
||||
class CardZoneLogic;
|
||||
class QGraphicsItem;
|
||||
struct CardRef;
|
||||
template <class Key, class T> class QMap;
|
||||
|
||||
const int ROTATION_DEGREES_PER_FRAME = 10;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,20 @@
|
|||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "abstract_graphics_item.h"
|
||||
|
||||
#include <QFont>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QPoint>
|
||||
#include <QRectF>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class CounterState;
|
||||
class PlayerLogic;
|
||||
class QGraphicsItem;
|
||||
|
||||
GeneralCounter::GeneralCounter(CounterState *state, PlayerLogic *player, bool useNameForShortcut, QGraphicsItem *parent)
|
||||
: AbstractCounter(state, player, true, useNameForShortcut, parent)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@
|
|||
|
||||
#include "abstract_counter.h"
|
||||
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CounterState;
|
||||
class PlayerLogic;
|
||||
class QGraphicsItem;
|
||||
|
||||
class GeneralCounter : public AbstractCounter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#include "translate_counter_name.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <utility>
|
||||
|
||||
const QMap<QString, QString> TranslateCounterName::translated = {
|
||||
{"life", QT_TRANSLATE_NOOP("TranslateCounterName", "Life")},
|
||||
{"w", QT_TRANSLATE_NOOP("TranslateCounterName", "White")},
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@
|
|||
#ifndef TRANSLATECOUNTERNAME_H
|
||||
#define TRANSLATECOUNTERNAME_H
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QCoreApplication>
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <QtCore>
|
||||
|
||||
class TranslateCounterName
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,15 +2,47 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../board/abstract_card_drag_item.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/deck_list/tree/deck_list_card_node.h"
|
||||
#include "libcockatrice/deck_list/tree/inner_deck_list_node.h"
|
||||
#include "libcockatrice/protocol/pb/move_card_to_zone.pb.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QCursor>
|
||||
#include <QFlags>
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QGraphicsSceneHoverEvent>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QMapIterator>
|
||||
#include <QMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QPoint>
|
||||
#include <QSet>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QStringList>
|
||||
#include <QtGlobal>
|
||||
#include <QtMath>
|
||||
#include <algorithm>
|
||||
#include <compare>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <qnamespace.h>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class QObject;
|
||||
class QRectF;
|
||||
class QWidget;
|
||||
struct CardRef;
|
||||
|
||||
DeckViewCardDragItem::DeckViewCardDragItem(DeckViewCard *_item,
|
||||
const QPointF &_hotSpot,
|
||||
|
|
|
|||
|
|
@ -8,17 +8,30 @@
|
|||
#define DECKVIEW_H
|
||||
|
||||
#include "../board/abstract_card_drag_item.h"
|
||||
#include "../board/abstract_card_item.h"
|
||||
#include "../board/graphics_item_type.h"
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsView>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMultiMap>
|
||||
#include <QPair>
|
||||
#include <QPointF>
|
||||
#include <QRectF>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/protocol/pb/move_card_to_zone.pb.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class DeckList;
|
||||
class InnerDecklistNode;
|
||||
class CardInfo;
|
||||
class DeckViewCardContainer;
|
||||
class DeckViewCardDragItem;
|
||||
class MoveCardToZone;
|
||||
class QObject;
|
||||
class QWidget;
|
||||
struct CardRef;
|
||||
|
||||
class DeckViewCard : public AbstractCardItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,18 +2,36 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../client/settings/shortcuts_settings.h"
|
||||
#include "../../game/abstract_game.h"
|
||||
#include "../../game/game_event_handler.h"
|
||||
#include "../../game/game_state.h"
|
||||
#include "../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../../interface/deck_loader/deck_file_format.h"
|
||||
#include "../../interface/deck_loader/deck_loader.h"
|
||||
#include "../../interface/deck_loader/loaded_deck.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_load_remote_deck.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../interface/widgets/visual_deck_storage/visual_deck_storage_widget.h"
|
||||
#include "../board/abstract_card_item.h"
|
||||
#include "deck_view.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/interfaces/interface_interface_settings_provider.h"
|
||||
#include "libcockatrice/protocol/pb/move_card_to_zone.pb.h"
|
||||
#include "libcockatrice/protocol/pb/response.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_playerproperties.pb.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QList>
|
||||
#include <QMessageBox>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QRect>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/deck_list/playmat_resolver.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_select.pb.h>
|
||||
|
|
@ -26,6 +44,9 @@
|
|||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/settings/visual_deck_storage_settings.h>
|
||||
#include <libcockatrice/utility/string_limits.h>
|
||||
#include <optional>
|
||||
#include <qnamespace.h>
|
||||
#include <string>
|
||||
|
||||
ToggleButton::ToggleButton(QWidget *parent) : QPushButton(parent), state(false)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,14 +7,17 @@
|
|||
#ifndef DECK_VIEW_CONTAINER_H
|
||||
#define DECK_VIEW_CONTAINER_H
|
||||
|
||||
#include "../../interface/deck_loader/deck_loader.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
#include "libcockatrice/utility/playmat_params.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QVBoxLayout;
|
||||
class AbstractCardItem;
|
||||
class VisualDeckStorageWidget;
|
||||
class DeckPreviewWidget;
|
||||
class Response;
|
||||
class TabGame;
|
||||
class DeckView;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
#include "tabbed_deck_view_container.h"
|
||||
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../board/abstract_card_item.h"
|
||||
#include "deck_view.h"
|
||||
#include "deck_view_container.h"
|
||||
|
||||
#include <QSharedPointer>
|
||||
#include <QTabBar>
|
||||
#include <QWidget>
|
||||
|
||||
class DeckList;
|
||||
class TabGame;
|
||||
|
||||
TabbedDeckViewContainer::TabbedDeckViewContainer(int _playerId, TabGame *parent)
|
||||
: QTabWidget(nullptr), playerId(_playerId), parentGame(parent)
|
||||
|
|
|
|||
|
|
@ -6,9 +6,15 @@
|
|||
|
||||
#ifndef TABBED_DECK_VIEW_CONTAINER_H
|
||||
#define TABBED_DECK_VIEW_CONTAINER_H
|
||||
#include "deck_view_container.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <QTabWidget>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class DeckList;
|
||||
class DeckView;
|
||||
class DeckViewContainer;
|
||||
class TabGame;
|
||||
|
||||
class TabbedDeckViewContainer : public QTabWidget
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,23 +2,30 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../interface/widgets/cards/card_info_picture_widget.h"
|
||||
#include "../../main.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QChar>
|
||||
#include <QCheckBox>
|
||||
#include <QCloseEvent>
|
||||
#include <QComboBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QGridLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QHeaderView>
|
||||
#include <QItemSelectionModel>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QModelIndex>
|
||||
#include <QRadioButton>
|
||||
#include <QSet>
|
||||
#include <QTimer>
|
||||
#include <QTreeView>
|
||||
#include <QVBoxLayout>
|
||||
#include <QVariant>
|
||||
#include <libcockatrice/card/card_localization.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/models/database/card_database_model.h>
|
||||
#include <libcockatrice/models/database/token/token_display_model.h>
|
||||
#include <libcockatrice/settings/card_override_settings.h>
|
||||
|
|
@ -26,6 +33,10 @@
|
|||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/settings/layouts_settings.h>
|
||||
#include <libcockatrice/utility/string_limits.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QModelIndex;
|
||||
class QWidget;
|
||||
|
||||
DlgCreateToken::DlgCreateToken(const QStringList &_predefinedTokens, QWidget *parent)
|
||||
: QDialog(parent), predefinedTokens(_predefinedTokens)
|
||||
|
|
|
|||
|
|
@ -8,19 +8,22 @@
|
|||
#define DLG_CREATETOKEN_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QComboBox;
|
||||
class QCheckBox;
|
||||
class QPushButton;
|
||||
class QRadioButton;
|
||||
class QCloseEvent;
|
||||
class QTreeView;
|
||||
class DeckList;
|
||||
class CardDatabaseModel;
|
||||
class TokenDisplayModel;
|
||||
class CardInfoPictureWidget;
|
||||
class QModelIndex;
|
||||
class QWidget;
|
||||
|
||||
struct TokenInfo
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,17 +1,24 @@
|
|||
#include "dlg_move_top_cards_until.h"
|
||||
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QCompleter>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QMessageBox>
|
||||
#include <QSpinBox>
|
||||
#include <QString>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/filters/filter_string.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
DlgMoveTopCardsUntil::DlgMoveTopCardsUntil(QWidget *parent, const MoveTopCardsUntilOptions &options) : QDialog(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,14 +7,19 @@
|
|||
#ifndef DLG_MOVE_TOP_CARDS_UNTIL_H
|
||||
#define DLG_MOVE_TOP_CARDS_UNTIL_H
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QDialog>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLabel>
|
||||
#include <QSpinBox>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class FilterString;
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
class QDialogButtonBox;
|
||||
class QLabel;
|
||||
class QSpinBox;
|
||||
class QWidget;
|
||||
|
||||
struct MoveTopCardsUntilOptions
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
#include "dlg_roll_dice.h"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QSpinBox>
|
||||
#include <QString>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/utility/dice_limits.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
DlgRollDice::DlgRollDice(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
numberOfSidesLabel = new QLabel(tr("Number of sides:"));
|
||||
|
|
|
|||
|
|
@ -8,9 +8,13 @@
|
|||
#define DLG_ROLL_DICE_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLabel>
|
||||
#include <QSpinBox>
|
||||
#include <qtmetamacros.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
class QDialogButtonBox;
|
||||
class QLabel;
|
||||
class QSpinBox;
|
||||
class QWidget;
|
||||
|
||||
class DlgRollDice : public QDialog
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,25 +2,50 @@
|
|||
|
||||
#include "../client/settings/cache_settings.h"
|
||||
#include "../game/abstract_game.h"
|
||||
#include "../game/arrow_registry.h"
|
||||
#include "../game/board/arrow_data.h"
|
||||
#include "../game/player/player_actions.h"
|
||||
#include "../game/player/player_event_handler.h"
|
||||
#include "../game/player/player_info.h"
|
||||
#include "../game/player/player_logic.h"
|
||||
#include "../game_graphics/player/player_graphics_item.h"
|
||||
#include "../game/zones/card_zone_logic.h"
|
||||
#include "../game/zones/view_zone_logic.h"
|
||||
#include "animated_item.h"
|
||||
#include "board/abstract_card_item.h"
|
||||
#include "board/arrow_item.h"
|
||||
#include "board/card_item.h"
|
||||
#include "phases_toolbar.h"
|
||||
#include "player/menu/player_menu.h"
|
||||
#include "player/player_graphics_item.h"
|
||||
#include "player/player_target.h"
|
||||
#include "zones/card_zone.h"
|
||||
#include "zones/select_zone.h"
|
||||
#include "zones/view_zone.h"
|
||||
#include "zones/view_zone_widget.h"
|
||||
|
||||
#include <QBasicTimer>
|
||||
#include <QDebug>
|
||||
#include <QEvent>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QGraphicsView>
|
||||
#include <QListIterator>
|
||||
#include <QMenu>
|
||||
#include <QMessageLogger>
|
||||
#include <QMutableHashIterator>
|
||||
#include <QObject>
|
||||
#include <QPoint>
|
||||
#include <QRectF>
|
||||
#include <QSet>
|
||||
#include <QSharedPointer>
|
||||
#include <QtMath>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <numeric>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class ArrowTarget;
|
||||
|
||||
/**
|
||||
* @brief Constructs the GameScene.
|
||||
|
|
|
|||
|
|
@ -2,16 +2,33 @@
|
|||
#define GAMESCENE_H
|
||||
|
||||
#include "../game/arrow_registry.h"
|
||||
#include "../game/board/arrow_data.h"
|
||||
#include "../game/zones/card_zone_logic.h"
|
||||
#include "animated_item.h"
|
||||
#include "board/arrow_item.h"
|
||||
|
||||
#include <QGraphicsScene>
|
||||
#include <QHash>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMap>
|
||||
#include <QMetaObject>
|
||||
#include <QPointF>
|
||||
#include <QPointer>
|
||||
#include <QSize>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
// IWYU pragma: keep
|
||||
// ServerInfo_Card appears inside QList<...> in signal and slot
|
||||
// signatures, which the moc-generated code needs to be complete.
|
||||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
|
||||
class CardZoneLogic;
|
||||
class IAnimatedItem;
|
||||
class QGraphicsItem;
|
||||
class QPoint;
|
||||
struct ArrowData;
|
||||
template <class T> class QSharedPointer;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(GameSceneLog, "game_scene");
|
||||
inline Q_LOGGING_CATEGORY(GameScenePlayerAdditionRemovalLog, "game_scene.player_addition_removal");
|
||||
|
|
|
|||
|
|
@ -5,13 +5,24 @@
|
|||
#include "game_scene.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QEvent>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QLayout>
|
||||
#include <QMargins>
|
||||
#include <QPainter>
|
||||
#include <QPoint>
|
||||
#include <QResizeEvent>
|
||||
#include <QRubberBand>
|
||||
#include <QString>
|
||||
#include <QStringLiteral>
|
||||
#include <QWidget>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/utility/qt_utils.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
// QRubberBand calls raise() in showEvent() and changeEvent() to stay on top of siblings.
|
||||
// This subclass disables that behavior so dragCountLabel can appear above it.
|
||||
|
|
|
|||
|
|
@ -10,11 +10,19 @@
|
|||
#include "tally/tally.h"
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QList>
|
||||
#include <QPointF>
|
||||
#include <QRect>
|
||||
#include <QRectF>
|
||||
#include <QSize>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class GameScene;
|
||||
class QGridLayout;
|
||||
class QLabel;
|
||||
class QRubberBand;
|
||||
class QAction;
|
||||
class QWidget;
|
||||
|
||||
class GameView : public QGraphicsView
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,22 @@
|
|||
#include "hand_counter.h"
|
||||
|
||||
#include "../game/board/card_list.h"
|
||||
#include "../game/zones/card_zone_logic.h"
|
||||
#include "../interface/pixel_map_generator.h"
|
||||
#include "zones/card_zone.h"
|
||||
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QPixmapCache>
|
||||
#include <QRectF>
|
||||
#include <QSize>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <QStringLiteral>
|
||||
#include <QTransform>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QGraphicsItem;
|
||||
|
||||
HandCounter::HandCounter(QGraphicsItem *parent) : AbstractGraphicsItem(parent), number(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@
|
|||
#include "board/abstract_graphics_item.h"
|
||||
#include "board/graphics_item_type.h"
|
||||
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QPainter;
|
||||
class QPixmap;
|
||||
class QGraphicsItem;
|
||||
class QPoint;
|
||||
|
||||
class HandCounter : public AbstractGraphicsItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,20 +3,39 @@
|
|||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../client/settings/card_counter_settings.h"
|
||||
#include "../../client/sound_engine.h"
|
||||
#include "../../client/translation.h"
|
||||
#include "../../game/abstract_game.h"
|
||||
#include "../../game/board/card_list.h"
|
||||
#include "../../game/game_state.h"
|
||||
#include "../../game/phase.h"
|
||||
#include "../../game/player/player_event_handler.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/player/player_manager.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../interface/card_localization.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../interface/widgets/server/chat_view/chat_view.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../board/translate_counter_name.h"
|
||||
#include "libcockatrice/protocol/pb/game_event_context.pb.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QStringList>
|
||||
#include <libcockatrice/protocol/pb/context_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_mulligan.pb.h>
|
||||
#include <libcockatrice/settings/chat_settings.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <optional>
|
||||
#include <stdlib.h>
|
||||
#include <utility>
|
||||
|
||||
class QWidget;
|
||||
class ServerInfo_User;
|
||||
class TabSupervisor;
|
||||
|
||||
static QString sanitizeHtml(QString dirty)
|
||||
{
|
||||
return dirty.replace("&", "&").replace("<", "<").replace(">", ">").replace("\"", """);
|
||||
|
|
|
|||
|
|
@ -7,14 +7,23 @@
|
|||
#ifndef MESSAGELOGWIDGET_H
|
||||
#define MESSAGELOGWIDGET_H
|
||||
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../interface/widgets/server/chat_view/chat_view.h"
|
||||
|
||||
#include <QPair>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
class AbstractGame;
|
||||
class CardItem;
|
||||
class GameEventContext;
|
||||
class PlayerLogic;
|
||||
class PlayerEventHandler;
|
||||
class CardZoneLogic;
|
||||
class QWidget;
|
||||
class ServerInfo_User;
|
||||
class TabSupervisor;
|
||||
template <typename T> class QList;
|
||||
|
||||
class MessageLogWidget : public ChatView
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,17 +1,26 @@
|
|||
#include "phases_toolbar.h"
|
||||
|
||||
#include "../interface/pixel_map_generator.h"
|
||||
#include "board/abstract_graphics_item.h"
|
||||
#include "libcockatrice/protocol/pb/card_attributes.pb.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QDebug>
|
||||
#include <QColor>
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QPixmap>
|
||||
#include <QRect>
|
||||
#include <QRectF>
|
||||
#include <QTimer>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <google/protobuf/stubs/port.h>
|
||||
#include <libcockatrice/protocol/pb/command_draw_cards.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_next_turn.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_active_phase.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_card_attr.pb.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qnumeric.h>
|
||||
|
||||
PhaseButton::PhaseButton(const QString &_name, QGraphicsItem *parent, QAction *_doubleClickAction, bool _highlightable)
|
||||
: QObject(), QGraphicsItem(parent), name(_name), active(false), highlightable(_highlightable),
|
||||
|
|
|
|||
|
|
@ -8,11 +8,14 @@
|
|||
#ifndef PHASESTOOLBAR_H
|
||||
#define PHASESTOOLBAR_H
|
||||
|
||||
#include "board/abstract_graphics_item.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QGraphicsObject>
|
||||
#include <QGraphicsItem>
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QAction;
|
||||
class QTimer;
|
||||
|
||||
namespace google
|
||||
{
|
||||
|
|
@ -21,8 +24,6 @@ namespace protobuf
|
|||
class Message;
|
||||
}
|
||||
} // namespace google
|
||||
class PlayerLogic;
|
||||
class GameCommand;
|
||||
|
||||
class PhaseButton : public QObject, public QGraphicsItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,21 +1,43 @@
|
|||
#include "card_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/card_counter_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../../game/abstract_game.h"
|
||||
#include "../../../game/player/player_info.h"
|
||||
#include "../../../game/player/player_manager.h"
|
||||
#include "../../../game/zones/card_zone_logic.h"
|
||||
#include "../../board/card_item.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/zones/view_zone_logic.h"
|
||||
#include "../../game_scene.h"
|
||||
#include "../card_menu_action_type.h"
|
||||
#include "../player_graphics_item.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/card/printing/printing_info.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
#include "move_menu.h"
|
||||
#include "pt_menu.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QColor>
|
||||
#include <QIcon>
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QSharedPointer>
|
||||
#include <QStringList>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <qnamespace.h>
|
||||
#include <utility>
|
||||
|
||||
/**
|
||||
* @brief Creates a circular icon filled with the specified color.
|
||||
|
|
|
|||
|
|
@ -7,12 +7,18 @@
|
|||
#ifndef COCKATRICE_CARD_MENU_H
|
||||
#define COCKATRICE_CARD_MENU_H
|
||||
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <QPair>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardItem;
|
||||
class PlayerGraphicsItem;
|
||||
class PlayerLogic;
|
||||
class QAction;
|
||||
struct CardRef;
|
||||
|
||||
class CardMenu : public QMenu
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
#include "custom_zone_menu.h"
|
||||
|
||||
#include "../../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game_scene.h"
|
||||
#include "../player_graphics_item.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
|
||||
CustomZoneMenu::CustomZoneMenu(PlayerGraphicsItem *_player) : player(_player)
|
||||
{
|
||||
menuAction()->setVisible(false);
|
||||
|
|
|
|||
|
|
@ -10,8 +10,11 @@
|
|||
#include "abstract_player_component.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QString>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
|
||||
class CustomZoneMenu : public QMenu, public AbstractPlayerComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,15 +1,28 @@
|
|||
#include "grave_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../../game/player/player_info.h"
|
||||
#include "../../../game/player/player_manager.h"
|
||||
#include "../../../game/zones/pile_zone_logic.h"
|
||||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../../game/abstract_game.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../player_graphics_item.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QKeySequence>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMenu>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
GraveyardMenu::GraveyardMenu(PlayerGraphicsItem *_player, QWidget *parent) : TearOffMenu(parent), player(_player)
|
||||
{
|
||||
createMoveActions();
|
||||
|
|
|
|||
|
|
@ -10,10 +10,13 @@
|
|||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "abstract_player_component.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
class QAction;
|
||||
class QMenu;
|
||||
class QWidget;
|
||||
|
||||
class GraveyardMenu : public TearOffMenu, public AbstractPlayerComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -2,16 +2,28 @@
|
|||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../../game_graphics/zones/hand_zone.h"
|
||||
#include "../../../game/board/card_list.h"
|
||||
#include "../../../game/player/player_info.h"
|
||||
#include "../../../game/player/player_manager.h"
|
||||
#include "../../../game/zones/hand_zone_logic.h"
|
||||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../../game/abstract_game.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../player_graphics_item.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QKeySequence>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMenu>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
HandMenu::HandMenu(PlayerGraphicsItem *_player, QWidget *parent) : TearOffMenu(parent), player(_player)
|
||||
{
|
||||
auto *actions = player->getLogic()->getPlayerActions();
|
||||
|
|
|
|||
|
|
@ -10,11 +10,12 @@
|
|||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "abstract_player_component.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
class PlayerActions;
|
||||
class QAction;
|
||||
class QMenu;
|
||||
class QWidget;
|
||||
|
||||
class HandMenu : public TearOffMenu, public AbstractPlayerComponent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,15 +2,29 @@
|
|||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../../game/board/card_list.h"
|
||||
#include "../../../game/player/player_info.h"
|
||||
#include "../../../game/player/player_manager.h"
|
||||
#include "../../../game/zones/pile_zone_logic.h"
|
||||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../../game/abstract_game.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../player_graphics_item.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsView>
|
||||
#include <QInputDialog>
|
||||
#include <QKeySequence>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMenu>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
|
||||
class QWidget;
|
||||
|
||||
LibraryMenu::LibraryMenu(PlayerGraphicsItem *_player, QWidget *parent) : TearOffMenu(parent), player(_player)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@
|
|||
#include "abstract_player_component.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
class PlayerLogic;
|
||||
class PlayerActions;
|
||||
class QMenu;
|
||||
class QWidget;
|
||||
|
||||
class LibraryMenu : public TearOffMenu, public AbstractPlayerComponent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
#include "move_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game_scene.h"
|
||||
#include "../card_menu_action_type.h"
|
||||
#include "../player_graphics_item.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
MoveMenu::MoveMenu(PlayerGraphicsItem *player) : QMenu(tr("Move to"))
|
||||
{
|
||||
aMoveToTopLibrary = new QAction(this);
|
||||
|
|
|
|||
|
|
@ -7,8 +7,11 @@
|
|||
#ifndef COCKATRICE_MOVE_MENU_H
|
||||
#define COCKATRICE_MOVE_MENU_H
|
||||
#include <QMenu>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
class QAction;
|
||||
|
||||
class MoveMenu : public QMenu
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,16 +1,31 @@
|
|||
#include "player_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../../game/abstract_game.h"
|
||||
#include "../../../game/player/player_info.h"
|
||||
#include "../../../game/player/player_logic.h"
|
||||
#include "../../../game/player/player_manager.h"
|
||||
#include "../../../game_graphics/zones/hand_zone.h"
|
||||
#include "../../../game_graphics/zones/pile_zone.h"
|
||||
#include "../../../game_graphics/zones/table_zone.h"
|
||||
#include "../../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../../board/card_item.h"
|
||||
#include "../player_graphics_item.h"
|
||||
#include "abstract_player_component.h"
|
||||
#include "card_menu.h"
|
||||
#include "custom_zone_menu.h"
|
||||
#include "grave_menu.h"
|
||||
#include "hand_menu.h"
|
||||
#include "library_menu.h"
|
||||
#include "rfg_menu.h"
|
||||
#include "say_menu.h"
|
||||
#include "sideboard_menu.h"
|
||||
#include "tally_menu.h"
|
||||
#include "utility_menu.h"
|
||||
|
||||
#include <libcockatrice/protocol/pb/command_reveal_cards.pb.h>
|
||||
#include <QMenu>
|
||||
#include <QString>
|
||||
|
||||
PlayerMenu::PlayerMenu(PlayerGraphicsItem *_player) : QObject(_player), player(_player)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,24 +8,28 @@
|
|||
#define COCKATRICE_PLAYER_MENU_H
|
||||
|
||||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "custom_zone_menu.h"
|
||||
#include "grave_menu.h"
|
||||
#include "hand_menu.h"
|
||||
#include "library_menu.h"
|
||||
#include "rfg_menu.h"
|
||||
#include "say_menu.h"
|
||||
#include "sideboard_menu.h"
|
||||
#include "tally_menu.h"
|
||||
#include "utility_menu.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <QObject>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
#include <qtmetamacros.h>
|
||||
#include <utility>
|
||||
|
||||
class CardItem;
|
||||
class CardMenu;
|
||||
class PlayerGraphicsItem;
|
||||
class AbstractPlayerComponent;
|
||||
class CustomZoneMenu;
|
||||
class GraveyardMenu;
|
||||
class HandMenu;
|
||||
class LibraryMenu;
|
||||
class QMenu;
|
||||
class RfgMenu;
|
||||
class SayMenu;
|
||||
class SideboardMenu;
|
||||
class TallyMenu;
|
||||
class UtilityMenu;
|
||||
struct CardRef;
|
||||
|
||||
class PlayerMenu : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
#include "pt_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game_scene.h"
|
||||
#include "../player_graphics_item.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
PtMenu::PtMenu(PlayerGraphicsItem *player) : QMenu(tr("Power / toughness"))
|
||||
{
|
||||
PlayerActions *playerActions = player->getLogic()->getPlayerActions();
|
||||
|
|
|
|||
|
|
@ -7,8 +7,11 @@
|
|||
#ifndef COCKATRICE_PT_MENU_H
|
||||
#define COCKATRICE_PT_MENU_H
|
||||
#include <QMenu>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
class QAction;
|
||||
|
||||
class PtMenu : public QMenu
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,21 @@
|
|||
#include "rfg_menu.h"
|
||||
|
||||
#include "../../../game/player/player_info.h"
|
||||
#include "../../../game/zones/pile_zone_logic.h"
|
||||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../player_graphics_item.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
|
||||
class QWidget;
|
||||
|
||||
RfgMenu::RfgMenu(PlayerGraphicsItem *_player, QWidget *parent) : TearOffMenu(parent), player(_player)
|
||||
{
|
||||
createMoveActions();
|
||||
|
|
|
|||
|
|
@ -10,10 +10,13 @@
|
|||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "abstract_player_component.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
class QAction;
|
||||
class QMenu;
|
||||
class QWidget;
|
||||
|
||||
class RfgMenu : public TearOffMenu, public AbstractPlayerComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -5,7 +5,12 @@
|
|||
#include "../../game/player/player_logic.h"
|
||||
#include "../player_graphics_item.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QKeySequence>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <libcockatrice/settings/message_settings.h>
|
||||
|
||||
SayMenu::SayMenu(PlayerGraphicsItem *_player) : player(_player)
|
||||
{
|
||||
connect(&SettingsCache::instance().messages(), &MessageSettings::messageMacrosChanged, this, &SayMenu::initSayMenu);
|
||||
|
|
|
|||
|
|
@ -10,8 +10,10 @@
|
|||
#include "abstract_player_component.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
|
||||
class SayMenu : public QMenu, public AbstractPlayerComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,10 +1,15 @@
|
|||
#include "sideboard_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../../game/player/player_info.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../player_graphics_item.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QKeySequence>
|
||||
|
||||
SideboardMenu::SideboardMenu(PlayerGraphicsItem *player, QMenu *playerMenu) : QMenu(playerMenu)
|
||||
{
|
||||
aViewSideboard = new QAction(this);
|
||||
|
|
|
|||
|
|
@ -10,8 +10,11 @@
|
|||
#include "abstract_player_component.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
class QAction;
|
||||
|
||||
class SideboardMenu : public QMenu, public AbstractPlayerComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
#include "tally_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../tally/tally.h"
|
||||
#include "libcockatrice/settings/interface_settings.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QActionGroup>
|
||||
|
||||
TallyMenu::TallyMenu()
|
||||
|
|
|
|||
|
|
@ -2,10 +2,13 @@
|
|||
#define COCKATRICE_TALLY_MENU_H
|
||||
|
||||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../../tally/tally.h"
|
||||
#include "abstract_player_component.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QAction;
|
||||
class QActionGroup;
|
||||
enum class TallyType;
|
||||
|
||||
class TallyMenu : public TearOffMenu, public AbstractPlayerComponent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,12 +1,17 @@
|
|||
#include "utility_menu.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../../interface/deck_loader/deck_loader.h"
|
||||
#include "../../../game/player/player_info.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game_scene.h"
|
||||
#include "../player_graphics_item.h"
|
||||
#include "player_menu.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
|
||||
#include <QKeySequence>
|
||||
#include <QSet>
|
||||
#include <libcockatrice/deck_list/tree/deck_list_card_node.h>
|
||||
#include <libcockatrice/deck_list/tree/inner_deck_list_node.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -9,10 +9,16 @@
|
|||
|
||||
#include "abstract_player_component.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
|
||||
class UtilityMenu : public QMenu, public AbstractPlayerComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "../../interface/theme_manager.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QPainter>
|
||||
|
||||
PlayerArea::PlayerArea(QGraphicsItem *parentItem) : QObject(), QGraphicsItem(parentItem)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,14 @@
|
|||
#define COCKATRICE_PLAYER_AREA_H
|
||||
|
||||
#include "../board/graphics_item_type.h"
|
||||
#include "QGraphicsItem"
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QObject>
|
||||
#include <QRectF>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QGraphicsItem;
|
||||
|
||||
/**
|
||||
* The entire graphical area belonging to a single player.
|
||||
|
|
|
|||
|
|
@ -1,12 +1,21 @@
|
|||
#include "player_dialogs.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../client/settings/card_counter_settings.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../interface/widgets/utility/get_text_with_max.h"
|
||||
#include "../board/abstract_counter.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../dialogs/dlg_create_token.h"
|
||||
#include "../dialogs/dlg_move_top_cards_until.h"
|
||||
#include "../dialogs/dlg_roll_dice.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../player/player_graphics_item.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QInputDialog>
|
||||
#include <QLineEdit>
|
||||
#include <libcockatrice/card/relation/card_relation.h>
|
||||
#include <libcockatrice/utility/string_limits.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,26 @@
|
|||
#ifndef COCKATRICE_PLAYER_DIALOGS_H
|
||||
#define COCKATRICE_PLAYER_DIALOGS_H
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "player_graphics_item.h"
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QObject>
|
||||
// IWYU pragma: keep
|
||||
// MoveTopCardsUntilOptions is passed by value to a slot, so the moc-generated
|
||||
// code needs the complete type.
|
||||
#include "../dialogs/dlg_move_top_cards_until.h"
|
||||
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsView>
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardItem;
|
||||
class CardRelation;
|
||||
class PlayerActions;
|
||||
class QWidget;
|
||||
struct MoveTopCardsUntilOptions;
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
class PlayerDialogs : public QObject
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +1,53 @@
|
|||
#include "player_graphics_item.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game/board/counter_state.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../game/zones/hand_zone_logic.h"
|
||||
#include "../../game/zones/pile_zone_logic.h"
|
||||
#include "../../game/zones/stack_zone_logic.h"
|
||||
#include "../../game/zones/table_zone_logic.h"
|
||||
#include "../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../../interface/widgets/cards/art_crop_attribution.h"
|
||||
#include "../../interface/widgets/cards/card_art_utils.h"
|
||||
#include "../../interface/widgets/playmat/playmat_utils.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../board/abstract_card_item.h"
|
||||
#include "../board/abstract_counter.h"
|
||||
#include "../board/counter_general.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "../hand_counter.h"
|
||||
#include "../zones/hand_zone.h"
|
||||
#include "../zones/pile_zone.h"
|
||||
#include "../zones/stack_zone.h"
|
||||
#include "../zones/table_zone.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/database/card_database_querier.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/interfaces/interface_interface_settings_provider.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
#include "menu/player_menu.h"
|
||||
#include "player_area.h"
|
||||
#include "player_dialogs.h"
|
||||
#include "player_target.h"
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QList>
|
||||
#include <QMapIterator>
|
||||
#include <QMenu>
|
||||
#include <QPainter>
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QRect>
|
||||
#include <QSharedPointer>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/deck_list/playmat_resolver.h>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qnumeric.h>
|
||||
|
||||
PlayerGraphicsItem::PlayerGraphicsItem(PlayerLogic *_player) : player(_player)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,12 +6,20 @@
|
|||
|
||||
#ifndef COCKATRICE_PLAYER_GRAPHICS_ITEM_H
|
||||
#define COCKATRICE_PLAYER_GRAPHICS_ITEM_H
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../board/abstract_counter.h"
|
||||
#include "../board/graphics_item_type.h"
|
||||
#include "../game_scene.h"
|
||||
#include "libcockatrice/utility/playmat_params.h"
|
||||
|
||||
#include <QGraphicsObject>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <QMap>
|
||||
#include <QMetaObject>
|
||||
#include <QPixmap>
|
||||
#include <QRectF>
|
||||
#include <QSize>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class HandZone;
|
||||
class PileZone;
|
||||
|
|
@ -20,7 +28,12 @@ class PlayerMenu;
|
|||
class PlayerTarget;
|
||||
class StackZone;
|
||||
class TableZone;
|
||||
class ZoneViewZone;
|
||||
class AbstractCounter;
|
||||
class CardZone;
|
||||
class CounterState;
|
||||
class PlayerArea;
|
||||
class PlayerLogic;
|
||||
struct CardRef;
|
||||
|
||||
class PlayerGraphicsItem : public QGraphicsObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,16 +2,30 @@
|
|||
|
||||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "../../interface/widgets/server/user/user_context_menu.h"
|
||||
#include "../../interface/widgets/server/user/user_list_manager.h"
|
||||
#include "../../interface/widgets/server/user/user_list_widget.h"
|
||||
#include "../../interface/widgets/tabs/tab_game.h"
|
||||
#include "../../interface/widgets/tabs/tab_supervisor.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_user.pb.h"
|
||||
#include "user_level.h"
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QEvent>
|
||||
#include <QFlag>
|
||||
#include <QList>
|
||||
#include <QMapIterator>
|
||||
#include <QModelIndex>
|
||||
#include <QMouseEvent>
|
||||
#include <libcockatrice/protocol/pb/command_kick_from_game.pb.h>
|
||||
#include <QPalette>
|
||||
#include <QPointF>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QStringLiteral>
|
||||
#include <QVariant>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_playerproperties.pb.h>
|
||||
#include <libcockatrice/protocol/pb/session_commands.pb.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QModelIndex;
|
||||
class QObject;
|
||||
class QPoint;
|
||||
class QWidget;
|
||||
|
||||
PlayerListItemDelegate::PlayerListItemDelegate(QObject *const parent) : QStyledItemDelegate(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,18 +7,23 @@
|
|||
#ifndef PLAYERLISTWIDGET_H
|
||||
#define PLAYERLISTWIDGET_H
|
||||
|
||||
#include "../../game/player/player_logic.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QTreeWidget>
|
||||
#include <QTreeWidgetItem>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class ServerInfo_PlayerProperties;
|
||||
class TabSupervisor;
|
||||
class AbstractClient;
|
||||
class AbstractGame;
|
||||
class UserContextMenu;
|
||||
class QModelIndex;
|
||||
class QObject;
|
||||
class QPoint;
|
||||
class QWidget;
|
||||
|
||||
class PlayerListItemDelegate : public QStyledItemDelegate
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,43 @@
|
|||
#include "player_target.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "../board/abstract_counter.h"
|
||||
#include "../board/abstract_graphics_item.h"
|
||||
#include "../board/arrow_target.h"
|
||||
#include "../game_scene.h"
|
||||
#include "libcockatrice/settings/interface_settings.h"
|
||||
#include "user_level.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QFlag>
|
||||
#include <QFlags>
|
||||
#include <QFont>
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPen>
|
||||
#include <QPixmapCache>
|
||||
#include <QPointF>
|
||||
#include <QRadialGradient>
|
||||
#include <QRectF>
|
||||
#include <QSize>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <QtMath>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qnumeric.h>
|
||||
#include <string>
|
||||
#include <sys/types.h>
|
||||
|
||||
class CounterState;
|
||||
class QGraphicsItem;
|
||||
|
||||
PlayerCounter::PlayerCounter(CounterState *state, PlayerLogic *player, QGraphicsItem *parent)
|
||||
: AbstractCounter(state, player, false, false, parent)
|
||||
|
|
|
|||
|
|
@ -14,8 +14,12 @@
|
|||
|
||||
#include <QElapsedTimer>
|
||||
#include <QPixmap>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class CounterState;
|
||||
class QGraphicsItem;
|
||||
|
||||
class PlayerCounter : public AbstractCounter, public IAnimatedItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
#include <QCoreApplication>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QVariantList>
|
||||
#include <QtGlobal>
|
||||
#include <algorithm>
|
||||
|
||||
static int sumPowers(const QList<CardItem *> &cards)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
#define COCKATRICE_STATS_TALLY_H
|
||||
#include "tally.h"
|
||||
|
||||
#include <QList>
|
||||
|
||||
class CardItem;
|
||||
|
||||
/**
|
||||
* @brief Extracts and tallies stats from selected cards.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,9 +1,18 @@
|
|||
#include "subtype_tally.h"
|
||||
|
||||
#include "../board/card_item.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QStringLiteral>
|
||||
#include <algorithm>
|
||||
#include <compare>
|
||||
#include <iterator>
|
||||
#include <qnamespace.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include "tally.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
class CardItem;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#ifndef COCKATRICE_TALLY_H
|
||||
#define COCKATRICE_TALLY_H
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
class CardItem;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,18 @@
|
|||
#include "card_zone.h"
|
||||
|
||||
#include "../../game/board/card_list.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../board/abstract_graphics_item.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "view_zone.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QMenu>
|
||||
#include <qnamespace.h>
|
||||
|
||||
class QGraphicsItem;
|
||||
class QPoint;
|
||||
class QPointF;
|
||||
|
||||
CardZone::CardZone(CardZoneLogic *_logic, QGraphicsItem *parent)
|
||||
: AbstractGraphicsItem(parent), menu(nullptr), doubleClickAction(0), logic(_logic)
|
||||
|
|
|
|||
|
|
@ -7,12 +7,21 @@
|
|||
#ifndef CARDZONE_H
|
||||
#define CARDZONE_H
|
||||
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../board/abstract_graphics_item.h"
|
||||
#include "../board/graphics_item_type.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
#include <QString>
|
||||
#include <QPointF>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardDragItem;
|
||||
class CardItem;
|
||||
class CardZoneLogic;
|
||||
class QAction;
|
||||
class QGraphicsItem;
|
||||
class QMenu;
|
||||
class QPoint;
|
||||
template <typename T> class QList;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(CardZoneLog, "card_zone");
|
||||
|
||||
|
|
|
|||
|
|
@ -2,14 +2,27 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../game/zones/hand_zone_logic.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../card_dimensions.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QList>
|
||||
#include <QPainter>
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QRectF>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <string>
|
||||
|
||||
class QGraphicsItem;
|
||||
|
||||
HandZone::HandZone(HandZoneLogic *_logic, int _zoneHeight, QGraphicsItem *parent)
|
||||
: SelectZone(_logic, parent), zoneHeight(_zoneHeight)
|
||||
|
|
|
|||
|
|
@ -7,9 +7,16 @@
|
|||
#ifndef HANDZONE_H
|
||||
#define HANDZONE_H
|
||||
|
||||
#include "../../game/zones/hand_zone_logic.h"
|
||||
#include "../../game/board/card_list.h"
|
||||
#include "select_zone.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class HandZoneLogic;
|
||||
class QGraphicsItem;
|
||||
template <typename T> class QList;
|
||||
|
||||
class HandZone : public SelectZone
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,18 +1,33 @@
|
|||
#include "pile_zone.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game/board/card_list.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../game/zones/pile_zone_logic.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "view_zone.h"
|
||||
#include "../card_dimensions.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCursor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QList>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QRectF>
|
||||
#include <QString>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <qnamespace.h>
|
||||
#include <string>
|
||||
|
||||
PileZone::PileZone(PileZoneLogic *_logic, QGraphicsItem *parent) : CardZone(_logic, parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,9 +7,13 @@
|
|||
#ifndef PILEZONE_H
|
||||
#define PILEZONE_H
|
||||
|
||||
#include "../../game/zones/pile_zone_logic.h"
|
||||
#include "card_zone.h"
|
||||
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class PileZoneLogic;
|
||||
class QGraphicsItem;
|
||||
|
||||
/**
|
||||
* A CardZone where the cards are in a single pile instead of being laid out.
|
||||
* Usually only top card is accessible by clicking.
|
||||
|
|
|
|||
|
|
@ -1,13 +1,25 @@
|
|||
#include "select_zone.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game/board/card_list.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../game_scene.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsRectItem>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QPen>
|
||||
#include <QPoint>
|
||||
#include <QRectF>
|
||||
#include <QTransform>
|
||||
#include <QtGlobal>
|
||||
#include <QtMath>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qnumeric.h>
|
||||
|
||||
static qreal stackingOffset(qreal cardHeight)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,10 +9,16 @@
|
|||
|
||||
#include "card_zone.h"
|
||||
|
||||
#include <QPointF>
|
||||
#include <QSet>
|
||||
#include <QtGlobal>
|
||||
#include <optional>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QGraphicsRectItem;
|
||||
class CardItem;
|
||||
class CardZoneLogic;
|
||||
class QGraphicsItem;
|
||||
|
||||
/**
|
||||
* A CardZone where the cards are laid out, with each card directly interactable by clicking.
|
||||
|
|
|
|||
|
|
@ -1,15 +1,27 @@
|
|||
#include "stack_zone.h"
|
||||
|
||||
#include "../../game/board/card_list.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../game/zones/stack_zone_logic.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../card_dimensions.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QList>
|
||||
#include <QPainter>
|
||||
#include <QPoint>
|
||||
#include <QRectF>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <qnumeric.h>
|
||||
#include <string>
|
||||
|
||||
StackZone::StackZone(StackZoneLogic *_logic, int _zoneHeight, QGraphicsItem *parent)
|
||||
: SelectZone(_logic, parent), zoneHeight(_zoneHeight)
|
||||
|
|
|
|||
|
|
@ -7,9 +7,14 @@
|
|||
#ifndef STACKZONE_H
|
||||
#define STACKZONE_H
|
||||
|
||||
#include "../../game/zones/stack_zone_logic.h"
|
||||
#include "select_zone.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class QGraphicsItem;
|
||||
class StackZoneLogic;
|
||||
|
||||
class StackZone : public SelectZone
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -1,23 +1,50 @@
|
|||
#include "table_zone.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game/board/card_list.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../game/zones/table_zone_logic.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../board/arrow_item.h"
|
||||
#include "../board/abstract_card_item.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../z_values.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/protocol/pb/card_attributes.pb.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QGradient>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsScene>
|
||||
#include <QLinearGradient>
|
||||
#include <QList>
|
||||
#include <QListIterator>
|
||||
#include <QPainter>
|
||||
#include <QRectF>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_card_attr.pb.h>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
#include <string>
|
||||
|
||||
namespace google
|
||||
{
|
||||
namespace protobuf
|
||||
{
|
||||
class Message;
|
||||
} // namespace protobuf
|
||||
} // namespace google
|
||||
|
||||
const QColor TableZone::BACKGROUND_COLOR = QColor(100, 100, 100);
|
||||
const QColor TableZone::FADE_MASK = QColor(0, 0, 0, 80);
|
||||
|
|
|
|||
|
|
@ -7,12 +7,26 @@
|
|||
#ifndef TABLEZONE_H
|
||||
#define TABLEZONE_H
|
||||
|
||||
#include "../../game/zones/table_zone_logic.h"
|
||||
#include "../animated_item.h"
|
||||
#include "../board/abstract_card_item.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "select_zone.h"
|
||||
|
||||
#include <QElapsedTimer>
|
||||
#include <QMap>
|
||||
#include <QPixmap>
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QtGlobal>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
class CardDragItem;
|
||||
class CardItem;
|
||||
class CardZoneLogic;
|
||||
class QColor;
|
||||
class QGraphicsItem;
|
||||
class QPainter;
|
||||
class TableZoneLogic;
|
||||
template <typename T> class QList;
|
||||
|
||||
/**
|
||||
* @brief TableZone is the grid based rect where CardItems may be placed.
|
||||
|
|
|
|||
|
|
@ -2,16 +2,29 @@
|
|||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_info.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../game/zones/view_zone_logic.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "libcockatrice/card/printing/exact_card.h"
|
||||
#include "libcockatrice/filters/filter_string.h"
|
||||
#include "libcockatrice/protocol/pb/response.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_zone.pb.h"
|
||||
#include "libcockatrice/utility/card_ref.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QDebug>
|
||||
#include <QGraphicsSceneWheelEvent>
|
||||
#include <QMessageLogger>
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QSharedPointer>
|
||||
#include <QtGlobal>
|
||||
#include <QtMath>
|
||||
#include <functional>
|
||||
#include <libcockatrice/card/card_localization.h>
|
||||
#include <libcockatrice/protocol/pb/command_dump_zone.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
|
|
@ -19,6 +32,9 @@
|
|||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <string>
|
||||
|
||||
class QGraphicsItem;
|
||||
|
||||
/**
|
||||
* @param parent the parent QGraphicsWidget containing the reveal zone
|
||||
|
|
|
|||
|
|
@ -7,17 +7,29 @@
|
|||
#ifndef ZONEVIEWERZONE_H
|
||||
#define ZONEVIEWERZONE_H
|
||||
|
||||
#include "../../game/zones/view_zone_logic.h"
|
||||
#include "../../game/board/card_list.h"
|
||||
#include "select_zone.h"
|
||||
|
||||
#include <QGraphicsLayoutItem>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QRectF>
|
||||
#include <QSizeF>
|
||||
#include <QString>
|
||||
#include <libcockatrice/filters/filter_string.h>
|
||||
#include <libcockatrice/protocol/pb/commands.pb.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
// IWYU pragma: keep
|
||||
// ServerInfo_Card appears inside QList<...> in signal and slot
|
||||
// signatures, which the moc-generated code needs to be complete.
|
||||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
|
||||
class QGraphicsItem;
|
||||
class ZoneViewZoneLogic;
|
||||
|
||||
inline Q_LOGGING_CATEGORY(ViewZoneLog, "view_zone");
|
||||
|
||||
class ZoneViewWidget;
|
||||
class Response;
|
||||
class ServerInfo_Card;
|
||||
class QGraphicsSceneWheelEvent;
|
||||
|
|
|
|||
|
|
@ -1,28 +1,53 @@
|
|||
#include "view_zone_widget.h"
|
||||
|
||||
#include "../../client/settings/cache_settings.h"
|
||||
#include "../../client/translation.h"
|
||||
#include "../../filters/syntax_help.h"
|
||||
#include "../../game/board/card_list.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
#include "../../game/zones/view_zone_logic.h"
|
||||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../card_dimensions.h"
|
||||
#include "../z_values.h"
|
||||
#include "libcockatrice/utility/macros.h"
|
||||
#include "view_zone.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QCheckBox>
|
||||
#include <QCloseEvent>
|
||||
#include <QDebug>
|
||||
#include <QEvent>
|
||||
#include <QFlags>
|
||||
#include <QFrame>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsLayout>
|
||||
#include <QGraphicsLinearLayout>
|
||||
#include <QGraphicsProxyWidget>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QGraphicsSceneResizeEvent>
|
||||
#include <QGraphicsView>
|
||||
#include <QLabel>
|
||||
#include <QPainter>
|
||||
#include <QIcon>
|
||||
#include <QObject>
|
||||
#include <QRect>
|
||||
#include <QScrollBar>
|
||||
#include <QSizeF>
|
||||
#include <QSizePolicy>
|
||||
#include <QString>
|
||||
#include <QStringLiteral>
|
||||
#include <QStyle>
|
||||
#include <QStyleOption>
|
||||
#include <QStyleOptionTitleBar>
|
||||
#include <QTimer>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/protocol/pb/command_shuffle.pb.h>
|
||||
#include <libcockatrice/settings/cards_display_settings.h>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <qnamespace.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,30 +6,34 @@
|
|||
#ifndef ZONEVIEWWIDGET_H
|
||||
#define ZONEVIEWWIDGET_H
|
||||
|
||||
#include "../../game/zones/card_zone_logic.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QGraphicsProxyWidget>
|
||||
#include <QGraphicsWidget>
|
||||
#include <QLineEdit>
|
||||
#include <QList>
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QPointer>
|
||||
#include <QRectF>
|
||||
#include <QtGlobal>
|
||||
#include <libcockatrice/utility/macros.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
// IWYU pragma: keep
|
||||
// ServerInfo_Card appears inside QList<...> in signal and slot
|
||||
// signatures, which the moc-generated code needs to be complete.
|
||||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
class CardZone;
|
||||
class ZoneViewZone;
|
||||
class PlayerLogic;
|
||||
class CardDatabase;
|
||||
class QScrollBar;
|
||||
class GameScene;
|
||||
class ServerInfo_Card;
|
||||
class QGraphicsSceneMouseEvent;
|
||||
class QGraphicsSceneWheelEvent;
|
||||
class QStyleOption;
|
||||
class QGraphicsView;
|
||||
class QWidget;
|
||||
class CardZoneLogic;
|
||||
|
||||
class ScrollableGraphicsProxyWidget : public QGraphicsProxyWidget
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue