mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-09 11:33:25 -08:00
[Refactor] Emit phase toolbar intent instead of protobuf commands (#7419)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
095b135640
commit
73d5a2a0ab
5 changed files with 49 additions and 49 deletions
|
|
@ -17,14 +17,6 @@
|
|||
class QAction;
|
||||
class QTimer;
|
||||
|
||||
namespace google
|
||||
{
|
||||
namespace protobuf
|
||||
{
|
||||
class Message;
|
||||
}
|
||||
} // namespace google
|
||||
|
||||
class PhaseButton : public QObject, public QGraphicsItem
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -95,11 +87,16 @@ public slots:
|
|||
void triggerPhaseAction(int phase);
|
||||
private slots:
|
||||
void phaseButtonClicked();
|
||||
void actNextTurn();
|
||||
void actUntapAll();
|
||||
void actDrawCard();
|
||||
signals:
|
||||
void sendGameCommand(const ::google::protobuf::Message &command, int playerId);
|
||||
/** @name Intent signals
|
||||
* The view reports what the user asked for; GameEventHandler builds the commands.
|
||||
* @{
|
||||
*/
|
||||
void setActivePhaseRequested(int phase);
|
||||
void nextTurnRequested();
|
||||
void untapAllRequested();
|
||||
void drawCardRequested();
|
||||
/** @} */
|
||||
|
||||
protected:
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue