mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 19:47:46 -07:00
Convert rest of source to 4-space indent
This commit is contained in:
parent
a171df744d
commit
1bc48a7849
146 changed files with 12810 additions and 12810 deletions
|
|
@ -10,62 +10,62 @@ class Player;
|
|||
class GameCommand;
|
||||
|
||||
class PhaseButton : public QObject, public QGraphicsItem {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
private:
|
||||
QString name;
|
||||
bool active, highlightable;
|
||||
int activeAnimationCounter;
|
||||
QTimer *activeAnimationTimer;
|
||||
QAction *doubleClickAction;
|
||||
double width;
|
||||
|
||||
void updatePixmap(QPixmap &pixmap);
|
||||
QString name;
|
||||
bool active, highlightable;
|
||||
int activeAnimationCounter;
|
||||
QTimer *activeAnimationTimer;
|
||||
QAction *doubleClickAction;
|
||||
double width;
|
||||
|
||||
void updatePixmap(QPixmap &pixmap);
|
||||
private slots:
|
||||
void updateAnimation();
|
||||
void updateAnimation();
|
||||
public:
|
||||
PhaseButton(const QString &_name, QGraphicsItem *parent = 0, QAction *_doubleClickAction = 0, bool _highlightable = true);
|
||||
QRectF boundingRect() const;
|
||||
void setWidth(double _width);
|
||||
void setActive(bool _active);
|
||||
bool getActive() const { return active; }
|
||||
void triggerDoubleClickAction();
|
||||
PhaseButton(const QString &_name, QGraphicsItem *parent = 0, QAction *_doubleClickAction = 0, bool _highlightable = true);
|
||||
QRectF boundingRect() const;
|
||||
void setWidth(double _width);
|
||||
void setActive(bool _active);
|
||||
bool getActive() const { return active; }
|
||||
void triggerDoubleClickAction();
|
||||
signals:
|
||||
void clicked();
|
||||
void clicked();
|
||||
protected:
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
||||
};
|
||||
|
||||
class PhasesToolbar : public QObject, public QGraphicsItem {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
private:
|
||||
QList<PhaseButton *> buttonList;
|
||||
PhaseButton *nextTurnButton;
|
||||
double width, height, ySpacing, symbolSize;
|
||||
static const int buttonCount = 12;
|
||||
static const int spaceCount = 6;
|
||||
static const double marginSize;
|
||||
void rearrangeButtons();
|
||||
QList<PhaseButton *> buttonList;
|
||||
PhaseButton *nextTurnButton;
|
||||
double width, height, ySpacing, symbolSize;
|
||||
static const int buttonCount = 12;
|
||||
static const int spaceCount = 6;
|
||||
static const double marginSize;
|
||||
void rearrangeButtons();
|
||||
public:
|
||||
PhasesToolbar(QGraphicsItem *parent = 0);
|
||||
QRectF boundingRect() const;
|
||||
void retranslateUi();
|
||||
void setHeight(double _height);
|
||||
double getWidth() const { return width; }
|
||||
int phaseCount() const { return buttonList.size(); }
|
||||
QString getLongPhaseName(int phase) const;
|
||||
PhasesToolbar(QGraphicsItem *parent = 0);
|
||||
QRectF boundingRect() const;
|
||||
void retranslateUi();
|
||||
void setHeight(double _height);
|
||||
double getWidth() const { return width; }
|
||||
int phaseCount() const { return buttonList.size(); }
|
||||
QString getLongPhaseName(int phase) const;
|
||||
public slots:
|
||||
void setActivePhase(int phase);
|
||||
void setActivePhase(int phase);
|
||||
private slots:
|
||||
void phaseButtonClicked();
|
||||
void actNextTurn();
|
||||
void actUntapAll();
|
||||
void actDrawCard();
|
||||
void phaseButtonClicked();
|
||||
void actNextTurn();
|
||||
void actUntapAll();
|
||||
void actDrawCard();
|
||||
signals:
|
||||
void sendGameCommand(const ::google::protobuf::Message &command, int playerId);
|
||||
void sendGameCommand(const ::google::protobuf::Message &command, int playerId);
|
||||
protected:
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/);
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue