X-Git-Url: https://git.ralfj.de/multypo.git/blobdiff_plain/e6207dc52430a9fcbfd7df03f46c2876fc05154b..318e322c3cd72e6a7f692c6f7c7770c0e15720c8:/qt/player.h?ds=sidebyside diff --git a/qt/player.h b/qt/player.h index 7b78283..3817866 100644 --- a/qt/player.h +++ b/qt/player.h @@ -6,20 +6,32 @@ class Player { -private: - QString name; - QString currentLine; - QLabel* theLabel; - bool modifyable; public: + enum State { + Naming, + Waiting, + Typing + }; + Player(QWidget* parent); + void handleKey(QString); - void resetText(); - bool hasName(); - QString getName(); - QString getCurrentLine(); - int score; - void setWaiting(QString labeltext); + State getState() { return state; } + + void nextWord(); + QString getCurrentWord(); + void wordComplete(int points); + void showScore(); + +private: + int score; + QString name; + QString currentWord; + QLabel* theLabel; + + State state; + + void updateLabel(); }; #endif // PLAYER_H