mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-14 19:18:55 -07:00
phases
This commit is contained in:
parent
cb90463530
commit
1d400e195d
15 changed files with 507 additions and 204 deletions
|
|
@ -5,15 +5,19 @@
|
|||
#include <QList>
|
||||
#include <QPushButton>
|
||||
|
||||
class Player;
|
||||
|
||||
class PhaseButton : public QPushButton {
|
||||
Q_OBJECT
|
||||
private:
|
||||
QString phaseText;
|
||||
bool active;
|
||||
public:
|
||||
PhaseButton();
|
||||
PhaseButton(QIcon);
|
||||
void setPhaseText(const QString &_phaseText);
|
||||
QString getPhaseText() const { return phaseText; }
|
||||
void setActive(bool _active) { active = _active; update(); }
|
||||
public slots:
|
||||
void update();
|
||||
protected:
|
||||
|
|
@ -22,11 +26,18 @@ protected:
|
|||
|
||||
class PhasesToolbar : public QFrame {
|
||||
Q_OBJECT
|
||||
private:
|
||||
QList<PhaseButton *> buttonList;
|
||||
public:
|
||||
PhasesToolbar(QWidget *parent = 0);
|
||||
void retranslateUi();
|
||||
private:
|
||||
QList<PhaseButton *> buttonList;
|
||||
public slots:
|
||||
void setActivePhase(int phase);
|
||||
private slots:
|
||||
void phaseButtonClicked();
|
||||
signals:
|
||||
void signalSetPhase(int phase);
|
||||
void signalNextTurn();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue