mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
format
This commit is contained in:
parent
fe0e061bfe
commit
64bbde08b6
24 changed files with 52 additions and 51 deletions
|
|
@ -3,12 +3,12 @@
|
|||
#include "card_database.h"
|
||||
#include "parser/cockatrice_xml_3.h"
|
||||
#include "parser/cockatrice_xml_4.h"
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDirIterator>
|
||||
#include <QFile>
|
||||
#include <QTime>
|
||||
#include <libcockatrice/settings/cache_settings.h>
|
||||
|
||||
CardDatabaseLoader::CardDatabaseLoader(QObject *parent, CardDatabase *db) : QObject(parent), database(db)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
#include "../card_database_display_model.h"
|
||||
#include "../card_database_model.h"
|
||||
#include <libcockatrice/utility/levenshtein.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <libcockatrice/utility/levenshtein.h>
|
||||
|
||||
CardSearchModel::CardSearchModel(CardDatabaseDisplayModel *sourceModel, QObject *parent)
|
||||
: QAbstractListModel(parent), sourceModel(sourceModel)
|
||||
|
|
|
|||
|
|
@ -7,9 +7,10 @@
|
|||
#ifndef CARD_SEARCH_MODEL_H
|
||||
#define CARD_SEARCH_MODEL_H
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include "../card_database_display_model.h"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
class CardSearchModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -7,9 +7,10 @@
|
|||
#ifndef CARDDATABASE_PARSER_H
|
||||
#define CARDDATABASE_PARSER_H
|
||||
|
||||
#include "../../card_info.h"
|
||||
|
||||
#include <QIODevice>
|
||||
#include <QString>
|
||||
#include "../../card_info.h"
|
||||
|
||||
#define COCKATRICE_XML_XSI_NAMESPACE "http://www.w3.org/2001/XMLSchema-instance"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
#ifndef CARD_INFO_H
|
||||
#define CARD_INFO_H
|
||||
|
||||
#include "card_printing/printing_info.h"
|
||||
|
||||
#include <QDate>
|
||||
#include <QHash>
|
||||
#include <QList>
|
||||
|
|
@ -16,7 +18,6 @@
|
|||
#include <QSharedPointer>
|
||||
#include <QStringList>
|
||||
#include <QVariant>
|
||||
#include "card_printing/printing_info.h"
|
||||
#include <utility>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(CardInfoLog, "card_info");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "card_relation.h"
|
||||
|
||||
#include "card_relation_type.h"
|
||||
|
||||
CardRelation::CardRelation(const QString &_name,
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@
|
|||
#define DECKLIST_H
|
||||
|
||||
#include "inner_deck_list_node.h"
|
||||
#include <libcockatrice/protocol/pb/move_card_to_zone.pb.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
|
||||
#include <QMap>
|
||||
#include <QVector>
|
||||
#include <QtCore/QXmlStreamReader>
|
||||
#include <QtCore/QXmlStreamWriter>
|
||||
#include <libcockatrice/protocol/pb/move_card_to_zone.pb.h>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
|
||||
class AbstractDecklistNode;
|
||||
class DecklistCardNode;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#define COCKATRICE_DECK_LIST_CARD_NODE_H
|
||||
|
||||
#include "abstract_deck_list_card_node.h"
|
||||
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -21,12 +21,12 @@
|
|||
|
||||
#include "server_cardzone.h"
|
||||
#include "server_player.h"
|
||||
|
||||
#include <QVariant>
|
||||
#include <libcockatrice/protocol/pb/event_set_card_attr.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_set_card_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_card.pb.h>
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
Server_Card::Server_Card(const CardRef &cardRef, int _id, int _coord_x, int _coord_y, Server_CardZone *_zone)
|
||||
: zone(_zone), id(_id), coord_x(_coord_x), coord_y(_coord_y), cardRef(cardRef), tapped(false), attacking(false),
|
||||
facedown(false), destroyOnZoneChange(false), doesntUntap(false), parentCard(0), stashedCard(nullptr)
|
||||
|
|
|
|||
|
|
@ -20,12 +20,11 @@
|
|||
#ifndef SERVER_CARDZONE_H
|
||||
#define SERVER_CARDZONE_H
|
||||
|
||||
#include <libcockatrice/protocol/pb/serverinfo_zone.pb.h>
|
||||
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_zone.pb.h>
|
||||
|
||||
class Server_Card;
|
||||
class Server_AbstractPlayer;
|
||||
|
|
|
|||
|
|
@ -20,9 +20,8 @@
|
|||
#ifndef SERVER_COUNTER_H
|
||||
#define SERVER_COUNTER_H
|
||||
|
||||
#include <libcockatrice/protocol/pb/color.pb.h>
|
||||
|
||||
#include <QString>
|
||||
#include <libcockatrice/protocol/pb/color.pb.h>
|
||||
|
||||
class ServerInfo_Counter;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,16 +19,20 @@
|
|||
***************************************************************************/
|
||||
#include "server_game.h"
|
||||
|
||||
#include "../server.h"
|
||||
#include "../server_database_interface.h"
|
||||
#include "../server_protocolhandler.h"
|
||||
#include "../server_room.h"
|
||||
#include "server_abstract_player.h"
|
||||
#include "server_arrow.h"
|
||||
#include "server_card.h"
|
||||
#include "server_cardzone.h"
|
||||
#include "server_player.h"
|
||||
#include "server_spectator.h"
|
||||
#include "../server.h"
|
||||
#include "../server_database_interface.h"
|
||||
#include "../server_protocolhandler.h"
|
||||
#include "../server_room.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/protocol/pb/context_connection_state_changed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/context_deck_select.pb.h>
|
||||
|
|
@ -48,10 +52,6 @@
|
|||
#include <libcockatrice/protocol/pb/game_replay.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_playerping.pb.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
|
||||
Server_Game::Server_Game(const ServerInfo_User &_creatorInfo,
|
||||
int _gameId,
|
||||
const QString &_description,
|
||||
|
|
|
|||
|
|
@ -21,9 +21,6 @@
|
|||
#define SERVERGAME_H
|
||||
|
||||
#include "../server_response_containers.h"
|
||||
#include <libcockatrice/protocol/pb/event_leave.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_game.pb.h>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QMap>
|
||||
|
|
@ -31,6 +28,9 @@
|
|||
#include <QObject>
|
||||
#include <QSet>
|
||||
#include <QStringList>
|
||||
#include <libcockatrice/protocol/pb/event_leave.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_game.pb.h>
|
||||
|
||||
class QTimer;
|
||||
class GameEventContainer;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "server_cardzone.h"
|
||||
#include "server_counter.h"
|
||||
#include "server_game.h"
|
||||
#include "server_move_card_struct.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QRegularExpression>
|
||||
|
|
@ -85,7 +86,6 @@
|
|||
#include <libcockatrice/rng/rng_abstract.h>
|
||||
#include <libcockatrice/utility/color.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
#include "server_move_card_struct.h"
|
||||
|
||||
Server_Player::Server_Player(Server_Game *_game,
|
||||
int _playerId,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,8 @@
|
|||
// https://github.com/protocolbuffers/protobuf/issues/119
|
||||
#undef TYPE_BOOL
|
||||
#endif
|
||||
#include <libcockatrice/protocol/pb/event_room_say.pb.h>
|
||||
|
||||
#include <QFlags>
|
||||
#include <libcockatrice/protocol/pb/event_room_say.pb.h>
|
||||
|
||||
Q_DECLARE_FLAGS(RoomMessageTypeFlags, Event_RoomSay::RoomMessageType)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(RoomMessageTypeFlags)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@
|
|||
#include "server_protocolhandler.h"
|
||||
#include "server_remoteuserinterface.h"
|
||||
#include "server_room.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QThread>
|
||||
#include <libcockatrice/protocol/pb/event_connection_closed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_list_rooms.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_user_joined.pb.h>
|
||||
|
|
@ -34,10 +38,6 @@
|
|||
#include <libcockatrice/protocol/pb/session_event.pb.h>
|
||||
#include <libcockatrice/utility/featureset.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QThread>
|
||||
|
||||
Server::Server(QObject *parent) : QObject(parent), nextLocalGameId(0), tcpUserCount(0), webSocketUserCount(0)
|
||||
{
|
||||
qRegisterMetaType<ServerInfo_Ban>("ServerInfo_Ban");
|
||||
|
|
|
|||
|
|
@ -1,11 +1,6 @@
|
|||
#ifndef SERVER_H
|
||||
#define SERVER_H
|
||||
|
||||
#include <libcockatrice/protocol/pb/commands.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_ban.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_chat_message.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_warning.pb.h>
|
||||
#include "server_player_reference.h"
|
||||
|
||||
#include <QMap>
|
||||
|
|
@ -14,6 +9,11 @@
|
|||
#include <QObject>
|
||||
#include <QReadWriteLock>
|
||||
#include <QStringList>
|
||||
#include <libcockatrice/protocol/pb/commands.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_ban.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_chat_message.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_warning.pb.h>
|
||||
|
||||
class Server_DatabaseInterface;
|
||||
class Server_Game;
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
#include "server_player_reference.h"
|
||||
#include "server_response_containers.h"
|
||||
#include "server_room.h"
|
||||
#include <libcockatrice/protocol/pb/event_game_joined.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_state_changed.pb.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
#include <QPair>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_joined.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_state_changed.pb.h>
|
||||
|
||||
void Server_AbstractUserInterface::sendProtocolItemByType(ServerMessage::MessageType type,
|
||||
const ::google::protobuf::Message &item)
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
#define SERVER_ABSTRACTUSERINTERFACE
|
||||
|
||||
#include "serverinfo_user_container.h"
|
||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||
#include <libcockatrice/protocol/pb/server_message.pb.h>
|
||||
|
||||
#include <QMap>
|
||||
#include <QMutex>
|
||||
#include <QPair>
|
||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||
#include <libcockatrice/protocol/pb/server_message.pb.h>
|
||||
|
||||
class SessionEvent;
|
||||
class GameEventContainer;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,11 @@
|
|||
#include "get_pb_extension.h"
|
||||
#include "server_database_interface.h"
|
||||
#include "server_room.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QtMath>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <libcockatrice/protocol/pb/commands.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_joined.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_list_rooms.pb.h>
|
||||
|
|
@ -23,11 +28,6 @@
|
|||
#include <libcockatrice/utility/featureset.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QtMath>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
|
||||
Server_ProtocolHandler::Server_ProtocolHandler(Server *_server,
|
||||
Server_DatabaseInterface *_databaseInterface,
|
||||
QObject *parent)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#ifndef SERVER_PROTOCOLHANDLER_H
|
||||
#define SERVER_PROTOCOLHANDLER_H
|
||||
|
||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||
#include <libcockatrice/protocol/pb/server_message.pb.h>
|
||||
#include "server.h"
|
||||
#include "server_abstractuserinterface.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||
#include <libcockatrice/protocol/pb/server_message.pb.h>
|
||||
|
||||
class Features;
|
||||
class Server_DatabaseInterface;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "server_remoteuserinterface.h"
|
||||
|
||||
#include "server.h"
|
||||
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
|
||||
void Server_RemoteUserInterface::sendProtocolItem(const Response &item)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
#ifndef SERVER_RESPONSE_CONTAINERS_H
|
||||
#define SERVER_RESPONSE_CONTAINERS_H
|
||||
|
||||
#include <libcockatrice/protocol/pb/server_message.pb.h>
|
||||
|
||||
#include <QList>
|
||||
#include <QPair>
|
||||
#include <libcockatrice/protocol/pb/server_message.pb.h>
|
||||
|
||||
namespace google
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,9 +6,8 @@
|
|||
// https://github.com/protocolbuffers/protobuf/issues/119
|
||||
#undef TYPE_BOOL
|
||||
#endif
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
|
||||
#include <QFlags>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
|
||||
Q_DECLARE_FLAGS(UserLevelFlags, ServerInfo_User::UserLevelFlag)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(UserLevelFlags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue