X-Git-Url: https://git.ralfj.de/multypo.git/blobdiff_plain/d06ad1b372082777c92dbc4065c0a355bc2bef93..HEAD:/qt/multypo.h diff --git a/qt/multypo.h b/qt/multypo.h index f10a5d4..66728a6 100644 --- a/qt/multypo.h +++ b/qt/multypo.h @@ -2,29 +2,42 @@ #define MULTIKBD_H #include +#include +#include -class QLabel; +#include "player.h" class MultypoWindow : public QWidget { Q_OBJECT public: + enum State { + Naming, + Playing, + Scoring + }; + explicit MultypoWindow(QWidget *parent = 0); ~MultypoWindow(); bool handleX11Event(XEvent *event); -protected: - virtual void showEvent (QShowEvent *); - private: void handleKeyPress(int device, QString string); - -private: + void nextWord(); + bool allPlayersWaiting(); + int typingPlayers(); + void setLabel(QString text, QString color); + + State state; // naming iff (no players or any player is naming) + QString currentWord; // defined iff state == Playing + QMap players; + bool xiInited; int xiOpcode; QLabel *mainLabel; + QFile words; }; #endif // MULTIKBD_H