mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 11:33:55 -07:00
Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212)
--------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
parent
be1403c920
commit
1ef07309d6
605 changed files with 3812 additions and 3408 deletions
|
|
@ -7,13 +7,13 @@
|
|||
#ifndef COCKATRICE_ABSTRACT_GAME_H
|
||||
#define COCKATRICE_ABSTRACT_GAME_H
|
||||
|
||||
#include "../../../common/pb/game_replay.pb.h"
|
||||
#include "game_event_handler.h"
|
||||
#include "game_meta_info.h"
|
||||
#include "game_state.h"
|
||||
#include "player/player_manager.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <libcockatrice/protocol/pb/game_replay.pb.h>
|
||||
|
||||
class CardItem;
|
||||
class TabGame;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
#include "abstract_card_drag_item.h"
|
||||
|
||||
#include "../../settings/cache_settings.h"
|
||||
|
||||
#include <QCursor>
|
||||
#include <QDebug>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
static const float CARD_WIDTH_HALF = CARD_WIDTH / 2;
|
||||
static const float CARD_HEIGHT_HALF = CARD_HEIGHT / 2;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
#include "abstract_card_item.h"
|
||||
|
||||
#include "../../database/card_database.h"
|
||||
#include "../../database/card_database_manager.h"
|
||||
#include "../../picture_loader/picture_loader.h"
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../game_scene.h"
|
||||
|
||||
#include <QCursor>
|
||||
|
|
@ -11,6 +8,9 @@
|
|||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/card/card_database/card_database.h>
|
||||
#include <libcockatrice/card/card_database/card_database_manager.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
AbstractCardItem::AbstractCardItem(QGraphicsItem *parent, const CardRef &cardRef, Player *_owner, int _id)
|
||||
: ArrowTarget(_owner, parent), id(_id), cardRef(cardRef), tapped(false), facedown(false), tapAngle(0),
|
||||
|
|
@ -119,11 +119,11 @@ void AbstractCardItem::paintPicture(QPainter *painter, const QSizeF &translatedS
|
|||
|
||||
if (facedown || cardRef.name.isEmpty()) {
|
||||
// never reveal card color, always paint the card back
|
||||
PictureLoader::getCardBackPixmap(translatedPixmap, translatedSize.toSize());
|
||||
CardPictureLoader::getCardBackPixmap(translatedPixmap, translatedSize.toSize());
|
||||
} else {
|
||||
// don't even spend time trying to load the picture if our size is too small
|
||||
if (translatedSize.width() > 10) {
|
||||
PictureLoader::getPixmap(translatedPixmap, exactCard, translatedSize.toSize());
|
||||
CardPictureLoader::getPixmap(translatedPixmap, exactCard, translatedSize.toSize());
|
||||
if (translatedPixmap.isNull())
|
||||
paintImage = false;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -7,11 +7,12 @@
|
|||
#ifndef ABSTRACTCARDITEM_H
|
||||
#define ABSTRACTCARDITEM_H
|
||||
|
||||
#include "../../card/exact_card.h"
|
||||
#include "arrow_target.h"
|
||||
#include "card_ref.h"
|
||||
#include "graphics_item_type.h"
|
||||
|
||||
#include <libcockatrice/card/card_printing/exact_card.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
|
||||
class Player;
|
||||
|
||||
const int CARD_WIDTH = 72;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
#include "abstract_counter.h"
|
||||
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "../../tabs/tab_game.h"
|
||||
#include "../player/player.h"
|
||||
#include "expression.h"
|
||||
#include "pb/command_inc_counter.pb.h"
|
||||
#include "pb/command_set_counter.pb.h"
|
||||
#include "translate_counter_name.h"
|
||||
|
||||
#include <QAction>
|
||||
|
|
@ -16,6 +12,10 @@
|
|||
#include <QMenu>
|
||||
#include <QPainter>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/command_inc_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_counter.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/expression.h>
|
||||
|
||||
AbstractCounter::AbstractCounter(Player *_player,
|
||||
int _id,
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
#define _USE_MATH_DEFINES
|
||||
#include "arrow_item.h"
|
||||
|
||||
#include "../../card/card_info.h"
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "../player/player.h"
|
||||
#include "../player/player_target.h"
|
||||
#include "../zones/card_zone.h"
|
||||
#include "card_item.h"
|
||||
#include "color.h"
|
||||
#include "pb/command_attach_card.pb.h"
|
||||
#include "pb/command_create_arrow.pb.h"
|
||||
#include "pb/command_delete_arrow.pb.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QPainter>
|
||||
#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/cache_settings.h>
|
||||
#include <libcockatrice/utility/color.h>
|
||||
|
||||
ArrowItem::ArrowItem(Player *_player, int _id, ArrowTarget *_startItem, ArrowTarget *_targetItem, const QColor &_color)
|
||||
: QGraphicsItem(), player(_player), id(_id), startItem(_startItem), targetItem(_targetItem), targetLocked(false),
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
#include "card_item.h"
|
||||
|
||||
#include "../../card/card_info.h"
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "../../settings/card_counter_settings.h"
|
||||
#include "../../tabs/tab_game.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../player/player.h"
|
||||
|
|
@ -12,12 +9,15 @@
|
|||
#include "../zones/view_zone.h"
|
||||
#include "arrow_item.h"
|
||||
#include "card_drag_item.h"
|
||||
#include "pb/serverinfo_card.pb.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QMenu>
|
||||
#include <QPainter>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/settings/card_counter_settings.h>
|
||||
|
||||
CardItem::CardItem(Player *_owner, QGraphicsItem *parent, const CardRef &cardRef, int _cardid, CardZoneLogic *_zone)
|
||||
: AbstractCardItem(parent, cardRef, _owner, _cardid), zone(_zone), attacking(false), destroyOnZoneChange(false),
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
|
||||
#include "../zones/logic/card_zone_logic.h"
|
||||
#include "abstract_card_item.h"
|
||||
#include "server/game/server_card.h"
|
||||
|
||||
#include <libcockatrice/network/server/remote/game/server_card.h>
|
||||
|
||||
class CardDatabase;
|
||||
class CardDragItem;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "card_list.h"
|
||||
|
||||
#include "../../card/card_info.h"
|
||||
#include "card_item.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
|
||||
CardList::CardList(bool _contentsKnown) : QList<CardItem *>(), contentsKnown(_contentsKnown)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
#include "deck_view.h"
|
||||
|
||||
#include "../../card/card_info.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "deck_list.h"
|
||||
#include "deck_list_card_node.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QtMath>
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/deck_list/deck_list_card_node.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
DeckViewCardDragItem::DeckViewCardDragItem(DeckViewCard *_item,
|
||||
const QPointF &_hotSpot,
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
#define DECKVIEW_H
|
||||
|
||||
#include "../board/abstract_card_drag_item.h"
|
||||
#include "pb/move_card_to_zone.pb.h"
|
||||
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsView>
|
||||
#include <QMap>
|
||||
#include <QMultiMap>
|
||||
#include <QPixmap>
|
||||
#include <libcockatrice/protocol/pb/move_card_to_zone.pb.h>
|
||||
|
||||
class DeckList;
|
||||
class InnerDecklistNode;
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
#include "deck_view_container.h"
|
||||
|
||||
#include "../../database/card_database.h"
|
||||
#include "../../database/card_database_manager.h"
|
||||
#include "../../deck/deck_loader.h"
|
||||
#include "../../dialogs/dlg_load_deck.h"
|
||||
#include "../../dialogs/dlg_load_deck_from_clipboard.h"
|
||||
#include "../../dialogs/dlg_load_deck_from_website.h"
|
||||
#include "../../dialogs/dlg_load_remote_deck.h"
|
||||
#include "../../picture_loader/picture_loader.h"
|
||||
#include "../../server/pending_command.h"
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "../../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../../tabs/tab_game.h"
|
||||
#include "../game_scene.h"
|
||||
#include "deck_view.h"
|
||||
#include "pb/command_deck_select.pb.h"
|
||||
#include "pb/command_ready_start.pb.h"
|
||||
#include "pb/command_set_sideboard_lock.pb.h"
|
||||
#include "pb/command_set_sideboard_plan.pb.h"
|
||||
#include "pb/response_deck_download.pb.h"
|
||||
#include "trice_limits.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QMouseEvent>
|
||||
#include <QToolButton>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <libcockatrice/card/card_database/card_database.h>
|
||||
#include <libcockatrice/card/card_database/card_database_manager.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_select.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_ready_start.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_sideboard_lock.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_sideboard_plan.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_deck_download.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
ToggleButton::ToggleButton(QWidget *parent) : QPushButton(parent), state(false)
|
||||
{
|
||||
|
|
@ -332,7 +332,7 @@ void DeckViewContainer::deckSelectFinished(const Response &r)
|
|||
{
|
||||
const Response_DeckDownload &resp = r.GetExtension(Response_DeckDownload::ext);
|
||||
DeckLoader newDeck(QString::fromStdString(resp.deck()));
|
||||
PictureLoader::cacheCardPixmaps(CardDatabaseManager::query()->getCards(newDeck.getCardRefList()));
|
||||
CardPictureLoader::cacheCardPixmaps(CardDatabaseManager::query()->getCards(newDeck.getCardRefList()));
|
||||
setDeck(newDeck);
|
||||
switchToDeckLoadedView();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,7 @@
|
|||
#include "dlg_create_token.h"
|
||||
|
||||
#include "../../database/card_database_manager.h"
|
||||
#include "../../database/model/card_database_model.h"
|
||||
#include "../../database/model/token/token_display_model.h"
|
||||
#include "../../interface/widgets/cards/card_info_picture_widget.h"
|
||||
#include "../../main.h"
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "deck_list.h"
|
||||
#include "trice_limits.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QCloseEvent>
|
||||
|
|
@ -22,6 +16,12 @@
|
|||
#include <QRadioButton>
|
||||
#include <QTreeView>
|
||||
#include <QVBoxLayout>
|
||||
#include <libcockatrice/card/card_database/card_database_manager.h>
|
||||
#include <libcockatrice/card/card_database/model/card_database_model.h>
|
||||
#include <libcockatrice/card/card_database/model/token/token_display_model.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DlgCreateToken::DlgCreateToken(const QStringList &_predefinedTokens, QWidget *parent)
|
||||
: QDialog(parent), predefinedTokens(_predefinedTokens)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
#include "dlg_move_top_cards_until.h"
|
||||
|
||||
#include "../../database/card_database.h"
|
||||
#include "../../database/card_database_manager.h"
|
||||
#include "../../filters/filter_string.h"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
|
|
@ -12,6 +10,8 @@
|
|||
#include <QString>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/card/card_database/card_database.h>
|
||||
#include <libcockatrice/card/card_database/card_database_manager.h>
|
||||
|
||||
DlgMoveTopCardsUntil::DlgMoveTopCardsUntil(QWidget *parent, QStringList exprs, uint _numberOfHits, bool autoPlay)
|
||||
: QDialog(parent)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
#include "dlg_roll_dice.h"
|
||||
|
||||
#include "trice_limits.h"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLabel>
|
||||
#include <QSpinBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
DlgRollDice::DlgRollDice(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#include "game.h"
|
||||
|
||||
#include "../tabs/tab_game.h"
|
||||
#include "pb/event_game_joined.pb.h"
|
||||
|
||||
#include <libcockatrice/protocol/pb/event_game_joined.pb.h>
|
||||
|
||||
Game::Game(TabGame *_tab,
|
||||
QList<AbstractClient *> &_clients,
|
||||
|
|
|
|||
|
|
@ -1,33 +1,34 @@
|
|||
#include "game_event_handler.h"
|
||||
|
||||
#include "../server/abstract_client.h"
|
||||
#include "../server/pending_command.h"
|
||||
#include "../tabs/tab_game.h"
|
||||
#include "abstract_game.h"
|
||||
#include "get_pb_extension.h"
|
||||
#include "log/message_log_widget.h"
|
||||
#include "pb/command_concede.pb.h"
|
||||
#include "pb/command_delete_arrow.pb.h"
|
||||
#include "pb/command_game_say.pb.h"
|
||||
#include "pb/command_leave_game.pb.h"
|
||||
#include "pb/command_next_turn.pb.h"
|
||||
#include "pb/command_reverse_turn.pb.h"
|
||||
#include "pb/command_set_active_phase.pb.h"
|
||||
#include "pb/context_connection_state_changed.pb.h"
|
||||
#include "pb/context_deck_select.pb.h"
|
||||
#include "pb/context_ping_changed.pb.h"
|
||||
#include "pb/event_game_closed.pb.h"
|
||||
#include "pb/event_game_host_changed.pb.h"
|
||||
#include "pb/event_game_say.pb.h"
|
||||
#include "pb/event_game_state_changed.pb.h"
|
||||
#include "pb/event_join.pb.h"
|
||||
#include "pb/event_kicked.pb.h"
|
||||
#include "pb/event_leave.pb.h"
|
||||
#include "pb/event_player_properties_changed.pb.h"
|
||||
#include "pb/event_reverse_turn.pb.h"
|
||||
#include "pb/event_set_active_phase.pb.h"
|
||||
#include "pb/event_set_active_player.pb.h"
|
||||
#include "pb/game_event_container.pb.h"
|
||||
|
||||
#include <libcockatrice/network/client/abstract/abstract_client.h>
|
||||
#include <libcockatrice/protocol/get_pb_extension.h>
|
||||
#include <libcockatrice/protocol/pb/command_concede.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_delete_arrow.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_game_say.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_leave_game.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_next_turn.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_reverse_turn.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_active_phase.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_connection_state_changed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_deck_select.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_ping_changed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_closed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_host_changed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_say.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_state_changed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_join.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_kicked.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_leave.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_player_properties_changed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_reverse_turn.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_set_active_phase.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_set_active_player.pb.h>
|
||||
#include <libcockatrice/protocol/pb/game_event_container.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
|
||||
GameEventHandler::GameEventHandler(AbstractGame *_game) : QObject(_game), game(_game)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
#ifndef COCKATRICE_GAME_EVENT_HANDLER_H
|
||||
#define COCKATRICE_GAME_EVENT_HANDLER_H
|
||||
|
||||
#include "pb/event_leave.pb.h"
|
||||
#include "pb/serverinfo_player.pb.h"
|
||||
#include "player/event_processing_options.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
#include <QObject>
|
||||
#include <libcockatrice/protocol/pb/event_leave.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_player.pb.h>
|
||||
|
||||
class AbstractClient;
|
||||
class Response;
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@
|
|||
#ifndef GAME_META_INFO_H
|
||||
#define GAME_META_INFO_H
|
||||
|
||||
#include "pb/serverinfo_game.pb.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_game.pb.h>
|
||||
|
||||
// Translation layer class to expose protobuf safely and hook it up to Qt Signals.
|
||||
// This class de-couples the domain object (i.e. the GameMetaInfo) from the network object.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#include "game_scene.h"
|
||||
|
||||
#include "../settings/cache_settings.h"
|
||||
#include "board/card_item.h"
|
||||
#include "phases_toolbar.h"
|
||||
#include "player/player.h"
|
||||
|
|
@ -15,6 +14,7 @@
|
|||
#include <QGraphicsView>
|
||||
#include <QSet>
|
||||
#include <QtMath>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <numeric>
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -7,11 +7,10 @@
|
|||
#ifndef COCKATRICE_GAME_STATE_H
|
||||
#define COCKATRICE_GAME_STATE_H
|
||||
|
||||
#include "../server/abstract_client.h"
|
||||
#include "pb/serverinfo_game.pb.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/network/client/abstract/abstract_client.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_game.pb.h>
|
||||
|
||||
class AbstractGame;
|
||||
class ServerInfo_PlayerProperties;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#include "game_view.h"
|
||||
|
||||
#include "../settings/cache_settings.h"
|
||||
#include "game_scene.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QResizeEvent>
|
||||
#include <QRubberBand>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
GameView::GameView(GameScene *scene, QWidget *parent) : QGraphicsView(scene, parent), rubberBand(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
#include "message_log_widget.h"
|
||||
|
||||
#include "../../client/sound_engine.h"
|
||||
#include "../../settings/card_counter_settings.h"
|
||||
#include "../../tabs/tab_game.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../board/translate_counter_name.h"
|
||||
#include "../phase.h"
|
||||
#include "../player/player.h"
|
||||
#include "../zones/card_zone.h"
|
||||
#include "pb/context_move_card.pb.h"
|
||||
#include "pb/context_mulligan.pb.h"
|
||||
#include "pb/serverinfo_user.pb.h"
|
||||
|
||||
#include <libcockatrice/protocol/pb/context_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_mulligan.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/settings/card_counter_settings.h>
|
||||
#include <utility>
|
||||
|
||||
static const QString TABLE_ZONE_NAME = "table";
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
#include "../../client/translation.h"
|
||||
#include "../../server/chat_view/chat_view.h"
|
||||
#include "../zones/logic/card_zone_logic.h"
|
||||
#include "user_level.h"
|
||||
|
||||
#include <libcockatrice/network/server/remote/user_level.h>
|
||||
|
||||
class AbstractGame;
|
||||
class CardItem;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
#include "phases_toolbar.h"
|
||||
|
||||
#include "../interface/pixel_map_generator.h"
|
||||
#include "pb/command_draw_cards.pb.h"
|
||||
#include "pb/command_next_turn.pb.h"
|
||||
#include "pb/command_set_active_phase.pb.h"
|
||||
#include "pb/command_set_card_attr.pb.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QTimer>
|
||||
#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>
|
||||
|
||||
PhaseButton::PhaseButton(const QString &_name, QGraphicsItem *parent, QAction *_doubleClickAction, bool _highlightable)
|
||||
: QObject(), QGraphicsItem(parent), name(_name), active(false), highlightable(_highlightable),
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
#include "card_menu.h"
|
||||
|
||||
#include "../../../card/card_relation.h"
|
||||
#include "../../../database/card_database_manager.h"
|
||||
#include "../../../settings/card_counter_settings.h"
|
||||
#include "../../../tabs/tab_game.h"
|
||||
#include "../../board/card_item.h"
|
||||
#include "../../zones/logic/view_zone_logic.h"
|
||||
|
|
@ -12,6 +9,10 @@
|
|||
#include "move_menu.h"
|
||||
#include "pt_menu.h"
|
||||
|
||||
#include <libcockatrice/card/card_database/card_database_manager.h>
|
||||
#include <libcockatrice/card/card_relation/card_relation.h>
|
||||
#include <libcockatrice/settings/card_counter_settings.h>
|
||||
|
||||
CardMenu::CardMenu(Player *_player, const CardItem *_card, bool _shortcutsActive)
|
||||
: player(_player), card(_card), shortcutsActive(_shortcutsActive)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
#include "hand_menu.h"
|
||||
|
||||
#include "../../../settings/cache_settings.h"
|
||||
#include "../../../settings/shortcuts_settings.h"
|
||||
#include "../../abstract_game.h"
|
||||
#include "../../zones/hand_zone.h"
|
||||
#include "../player.h"
|
||||
|
|
@ -9,6 +7,8 @@
|
|||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/settings/shortcuts_settings.h>
|
||||
|
||||
HandMenu::HandMenu(Player *_player, PlayerActions *actions, QWidget *parent) : TearOffMenu(parent), player(_player)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
#include "library_menu.h"
|
||||
|
||||
#include "../../../settings/cache_settings.h"
|
||||
#include "../../../settings/shortcuts_settings.h"
|
||||
#include "../../../tabs/tab_game.h"
|
||||
#include "../../abstract_game.h"
|
||||
#include "../player.h"
|
||||
|
|
@ -9,6 +7,8 @@
|
|||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
#include <libcockatrice/settings/shortcuts_settings.h>
|
||||
|
||||
LibraryMenu::LibraryMenu(Player *_player, QWidget *parent) : TearOffMenu(parent), player(_player)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
#include "player_menu.h"
|
||||
|
||||
#include "../../../common/pb/command_reveal_cards.pb.h"
|
||||
#include "../../../database/card_database_manager.h"
|
||||
#include "../../../tabs/tab_game.h"
|
||||
#include "../../board/card_item.h"
|
||||
#include "../../zones/hand_zone.h"
|
||||
|
|
@ -10,6 +8,9 @@
|
|||
#include "card_menu.h"
|
||||
#include "hand_menu.h"
|
||||
|
||||
#include <libcockatrice/card/card_database/card_database_manager.h>
|
||||
#include <libcockatrice/protocol/pb/command_reveal_cards.pb.h>
|
||||
|
||||
PlayerMenu::PlayerMenu(Player *_player) : player(_player)
|
||||
{
|
||||
playerMenu = new TearOffMenu();
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
#include "say_menu.h"
|
||||
|
||||
#include "../../../settings/cache_settings.h"
|
||||
#include "../player.h"
|
||||
#include "../player_actions.h"
|
||||
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
SayMenu::SayMenu(Player *_player) : player(_player)
|
||||
{
|
||||
connect(&SettingsCache::instance().messages(), &MessageSettings::messageMacrosChanged, this, &SayMenu::initSayMenu);
|
||||
|
|
|
|||
|
|
@ -12,15 +12,6 @@
|
|||
#include "../zones/stack_zone.h"
|
||||
#include "../zones/table_zone.h"
|
||||
#include "../zones/view_zone.h"
|
||||
#include "color.h"
|
||||
#include "pb/command_attach_card.pb.h"
|
||||
#include "pb/command_set_card_counter.pb.h"
|
||||
#include "pb/event_create_arrow.pb.h"
|
||||
#include "pb/event_create_counter.pb.h"
|
||||
#include "pb/event_draw_cards.pb.h"
|
||||
#include "pb/serverinfo_player.pb.h"
|
||||
#include "pb/serverinfo_user.pb.h"
|
||||
#include "pb/serverinfo_zone.pb.h"
|
||||
#include "player_target.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
|
@ -28,6 +19,15 @@
|
|||
#include <QMetaType>
|
||||
#include <QPainter>
|
||||
#include <QtConcurrent>
|
||||
#include <libcockatrice/protocol/pb/command_attach_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_card_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_create_arrow.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_create_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_draw_cards.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_player.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_zone.pb.h>
|
||||
#include <libcockatrice/utility/color.h>
|
||||
|
||||
Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, AbstractGame *_parent)
|
||||
: QObject(_parent), game(_parent), playerInfo(new PlayerInfo(info, _id, _local, _judge)),
|
||||
|
|
|
|||
|
|
@ -7,14 +7,11 @@
|
|||
#ifndef PLAYER_H
|
||||
#define PLAYER_H
|
||||
|
||||
#include "../../card/card_info.h"
|
||||
#include "../../filters/filter_string.h"
|
||||
#include "../../interface/tearoff_menu.h"
|
||||
#include "../board/abstract_graphics_item.h"
|
||||
#include "../dialogs/dlg_create_token.h"
|
||||
#include "menu/player_menu.h"
|
||||
#include "pb/card_attributes.pb.h"
|
||||
#include "pb/game_event.pb.h"
|
||||
#include "player_actions.h"
|
||||
#include "player_area.h"
|
||||
#include "player_event_handler.h"
|
||||
|
|
@ -26,6 +23,9 @@
|
|||
#include <QMap>
|
||||
#include <QPoint>
|
||||
#include <QTimer>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/protocol/pb/card_attributes.pb.h>
|
||||
#include <libcockatrice/protocol/pb/game_event.pb.h>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(PlayerLog, "player");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,31 +1,32 @@
|
|||
#include "player_actions.h"
|
||||
|
||||
#include "../../../common/pb/context_move_card.pb.h"
|
||||
#include "../../card/card_relation.h"
|
||||
#include "../../client/get_text_with_max.h"
|
||||
#include "../../database/card_database_manager.h"
|
||||
#include "../../tabs/tab_game.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../dialogs/dlg_move_top_cards_until.h"
|
||||
#include "../dialogs/dlg_roll_dice.h"
|
||||
#include "../zones/logic/view_zone_logic.h"
|
||||
#include "card_menu_action_type.h"
|
||||
#include "pb/command_attach_card.pb.h"
|
||||
#include "pb/command_change_zone_properties.pb.h"
|
||||
#include "pb/command_concede.pb.h"
|
||||
#include "pb/command_create_token.pb.h"
|
||||
#include "pb/command_draw_cards.pb.h"
|
||||
#include "pb/command_flip_card.pb.h"
|
||||
#include "pb/command_game_say.pb.h"
|
||||
#include "pb/command_move_card.pb.h"
|
||||
#include "pb/command_mulligan.pb.h"
|
||||
#include "pb/command_reveal_cards.pb.h"
|
||||
#include "pb/command_roll_die.pb.h"
|
||||
#include "pb/command_set_card_attr.pb.h"
|
||||
#include "pb/command_set_card_counter.pb.h"
|
||||
#include "pb/command_shuffle.pb.h"
|
||||
#include "pb/command_undo_draw.pb.h"
|
||||
#include "trice_limits.h"
|
||||
|
||||
#include <libcockatrice/card/card_database/card_database_manager.h>
|
||||
#include <libcockatrice/card/card_relation/card_relation.h>
|
||||
#include <libcockatrice/protocol/pb/command_attach_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_change_zone_properties.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_concede.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_create_token.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_draw_cards.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_flip_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_game_say.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_mulligan.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_reveal_cards.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_roll_die.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_card_attr.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_set_card_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_shuffle.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_undo_draw.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_move_card.pb.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
// milliseconds in between triggers of the move top cards until action
|
||||
static constexpr int MOVE_TOP_CARD_UNTIL_INTERVAL = 100;
|
||||
|
|
|
|||
|
|
@ -7,12 +7,13 @@
|
|||
|
||||
#ifndef COCKATRICE_PLAYER_ACTIONS_H
|
||||
#define COCKATRICE_PLAYER_ACTIONS_H
|
||||
#include "../../card/card_relation_type.h"
|
||||
#include "event_processing_options.h"
|
||||
#include "player.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QObject>
|
||||
#include <libcockatrice/card/card_relation/card_relation_type.h>
|
||||
#include <libcockatrice/protocol/pb/card_attributes.pb.h>
|
||||
|
||||
namespace google
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,30 +5,31 @@
|
|||
#include "../board/card_item.h"
|
||||
#include "../board/card_list.h"
|
||||
#include "../zones/view_zone.h"
|
||||
#include "pb/command_set_card_attr.pb.h"
|
||||
#include "pb/context_move_card.pb.h"
|
||||
#include "pb/context_undo_draw.pb.h"
|
||||
#include "pb/event_attach_card.pb.h"
|
||||
#include "pb/event_change_zone_properties.pb.h"
|
||||
#include "pb/event_create_arrow.pb.h"
|
||||
#include "pb/event_create_counter.pb.h"
|
||||
#include "pb/event_create_token.pb.h"
|
||||
#include "pb/event_del_counter.pb.h"
|
||||
#include "pb/event_delete_arrow.pb.h"
|
||||
#include "pb/event_destroy_card.pb.h"
|
||||
#include "pb/event_draw_cards.pb.h"
|
||||
#include "pb/event_dump_zone.pb.h"
|
||||
#include "pb/event_flip_card.pb.h"
|
||||
#include "pb/event_game_say.pb.h"
|
||||
#include "pb/event_move_card.pb.h"
|
||||
#include "pb/event_reveal_cards.pb.h"
|
||||
#include "pb/event_roll_die.pb.h"
|
||||
#include "pb/event_set_card_attr.pb.h"
|
||||
#include "pb/event_set_card_counter.pb.h"
|
||||
#include "pb/event_set_counter.pb.h"
|
||||
#include "pb/event_shuffle.pb.h"
|
||||
#include "player.h"
|
||||
|
||||
#include <libcockatrice/protocol/pb/command_set_card_attr.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_undo_draw.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_attach_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_change_zone_properties.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_create_arrow.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_create_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_create_token.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_del_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_delete_arrow.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_destroy_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_draw_cards.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_dump_zone.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_flip_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_say.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_reveal_cards.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_roll_die.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_set_card_attr.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_set_card_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_set_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_shuffle.pb.h>
|
||||
|
||||
PlayerEventHandler::PlayerEventHandler(Player *_player) : player(_player)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
#include "event_processing_options.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <pb/game_event.pb.h>
|
||||
#include <pb/game_event_context.pb.h>
|
||||
#include <libcockatrice/protocol/pb/game_event.pb.h>
|
||||
#include <libcockatrice/protocol/pb/game_event_context.pb.h>
|
||||
|
||||
class CardItem;
|
||||
class CardZoneLogic;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#ifndef COCKATRICE_PLAYER_INFO_H
|
||||
#define COCKATRICE_PLAYER_INFO_H
|
||||
|
||||
#include "../../../common/pb/serverinfo_user.pb.h"
|
||||
#include "../../deck/deck_loader.h"
|
||||
#include "../zones/hand_zone.h"
|
||||
#include "../zones/pile_zone.h"
|
||||
|
|
@ -16,6 +15,7 @@
|
|||
#include "player_target.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
|
||||
class PlayerInfo : public QObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
#include "player_list_widget.h"
|
||||
|
||||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "../../server/abstract_client.h"
|
||||
#include "../../server/user/user_context_menu.h"
|
||||
#include "../../server/user/user_list_manager.h"
|
||||
#include "../../server/user/user_list_widget.h"
|
||||
#include "../../tabs/tab_account.h"
|
||||
#include "../../tabs/tab_game.h"
|
||||
#include "../../tabs/tab_supervisor.h"
|
||||
#include "pb/command_kick_from_game.pb.h"
|
||||
#include "pb/serverinfo_playerproperties.pb.h"
|
||||
#include "pb/session_commands.pb.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QHeaderView>
|
||||
#include <QMenu>
|
||||
#include <QMouseEvent>
|
||||
#include <libcockatrice/network/client/abstract/abstract_client.h>
|
||||
#include <libcockatrice/protocol/pb/command_kick_from_game.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_playerproperties.pb.h>
|
||||
#include <libcockatrice/protocol/pb/session_commands.pb.h>
|
||||
|
||||
PlayerListItemDelegate::PlayerListItemDelegate(QObject *const parent) : QStyledItemDelegate(parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@
|
|||
#ifndef COCKATRICE_PLAYER_MANAGER_H
|
||||
#define COCKATRICE_PLAYER_MANAGER_H
|
||||
|
||||
#include "pb/serverinfo_playerproperties.pb.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_playerproperties.pb.h>
|
||||
|
||||
class AbstractGame;
|
||||
class Player;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#include "player_target.h"
|
||||
|
||||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "pb/serverinfo_user.pb.h"
|
||||
#include "player.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
#include <QPixmapCache>
|
||||
#include <QtMath>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
|
||||
PlayerCounter::PlayerCounter(Player *_player, int _id, const QString &_name, int _value, QGraphicsItem *parent)
|
||||
: AbstractCounter(_player, _id, _name, false, _value, false, parent)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#include "hand_zone.h"
|
||||
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../player/player.h"
|
||||
#include "pb/command_move_card.pb.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
HandZone::HandZone(HandZoneLogic *_logic, int _zoneHeight, QGraphicsItem *parent)
|
||||
: SelectZone(_logic, parent), zoneHeight(_zoneHeight)
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
#include "card_zone_logic.h"
|
||||
|
||||
#include "../../../database/card_database_manager.h"
|
||||
#include "../../board/card_item.h"
|
||||
#include "../../player/player.h"
|
||||
#include "../pile_zone.h"
|
||||
#include "../view_zone.h"
|
||||
#include "pb/command_move_card.pb.h"
|
||||
#include "pb/serverinfo_user.pb.h"
|
||||
#include "view_zone_logic.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QDebug>
|
||||
#include <libcockatrice/card/card_database/card_database_manager.h>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
|
||||
/**
|
||||
* @param _player the player that the zone belongs to
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#include "view_zone_logic.h"
|
||||
|
||||
#include "../../../settings/cache_settings.h"
|
||||
#include "../../board/card_item.h"
|
||||
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
/**
|
||||
* @param _player the player that the cards are revealed to.
|
||||
* @param _origZone the zone the cards were revealed from.
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
#include "../board/card_item.h"
|
||||
#include "../player/player.h"
|
||||
#include "logic/pile_zone_logic.h"
|
||||
#include "pb/command_move_card.pb.h"
|
||||
#include "view_zone.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
|
||||
PileZone::PileZone(PileZoneLogic *_logic, QGraphicsItem *parent) : CardZone(_logic, parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#include "select_zone.h"
|
||||
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../game_scene.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
qreal divideCardSpaceInZone(qreal index, int cardCount, qreal totalHeight, qreal cardHeight, bool reverse)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
#include "stack_zone.h"
|
||||
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "../board/arrow_item.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../player/player.h"
|
||||
#include "logic/stack_zone_logic.h"
|
||||
#include "pb/command_move_card.pb.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QSet>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
StackZone::StackZone(StackZoneLogic *_logic, int _zoneHeight, QGraphicsItem *parent)
|
||||
: SelectZone(_logic, parent), zoneHeight(_zoneHeight)
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
#include "table_zone.h"
|
||||
|
||||
#include "../../card/card_info.h"
|
||||
#include "../../interface/theme_manager.h"
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "../board/arrow_item.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../player/player.h"
|
||||
#include "logic/table_zone_logic.h"
|
||||
#include "pb/command_move_card.pb.h"
|
||||
#include "pb/command_set_card_attr.pb.h"
|
||||
|
||||
#include <QGraphicsScene>
|
||||
#include <QPainter>
|
||||
#include <QSet>
|
||||
#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/cache_settings.h>
|
||||
|
||||
const QColor TableZone::BACKGROUND_COLOR = QColor(100, 100, 100);
|
||||
const QColor TableZone::FADE_MASK = QColor(0, 0, 0, 80);
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
#include "view_zone.h"
|
||||
|
||||
#include "../../card/card_info.h"
|
||||
#include "../../server/pending_command.h"
|
||||
#include "../board/card_drag_item.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../player/player.h"
|
||||
#include "logic/view_zone_logic.h"
|
||||
#include "pb/command_dump_zone.pb.h"
|
||||
#include "pb/command_move_card.pb.h"
|
||||
#include "pb/response_dump_zone.pb.h"
|
||||
#include "pb/serverinfo_card.pb.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QDebug>
|
||||
#include <QGraphicsSceneWheelEvent>
|
||||
#include <QPainter>
|
||||
#include <QtMath>
|
||||
#include <libcockatrice/card/card_info.h>
|
||||
#include <libcockatrice/protocol/pb/command_dump_zone.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_move_card.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_dump_zone.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
#include <libcockatrice/protocol/pending_command.h>
|
||||
|
||||
/**
|
||||
* @param parent the parent QGraphicsWidget containing the reveal zone
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <QGraphicsLayoutItem>
|
||||
#include <QLoggingCategory>
|
||||
#include <pb/commands.pb.h>
|
||||
#include <libcockatrice/protocol/pb/commands.pb.h>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(ViewZoneLog, "view_zone");
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,9 @@
|
|||
|
||||
#include "../../filters/syntax_help.h"
|
||||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "../../settings/cache_settings.h"
|
||||
#include "../board/card_item.h"
|
||||
#include "../game_scene.h"
|
||||
#include "../player/player.h"
|
||||
#include "pb/command_shuffle.pb.h"
|
||||
#include "view_zone.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
|
|
@ -18,6 +16,8 @@
|
|||
#include <QScrollBar>
|
||||
#include <QStyleOption>
|
||||
#include <QStyleOptionTitleBar>
|
||||
#include <libcockatrice/protocol/pb/command_shuffle.pb.h>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
/**
|
||||
* @param _player the player the cards were revealed to.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#ifndef ZONEVIEWWIDGET_H
|
||||
#define ZONEVIEWWIDGET_H
|
||||
|
||||
#include "../../utility/macros.h"
|
||||
#include "logic/card_zone_logic.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
|
|
@ -15,6 +14,7 @@
|
|||
#include <QGraphicsProxyWidget>
|
||||
#include <QGraphicsWidget>
|
||||
#include <QLineEdit>
|
||||
#include <libcockatrice/utility/macros.h>
|
||||
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue