X-Git-Url: https://git.ralfj.de/multypo.git/blobdiff_plain/036922ba5e90ae7f6f6abe3f99b1783dec5132fc..7a18f439db0b8a7d55ffd0368bb0159afa79ab62:/qt/player.h?ds=inline diff --git a/qt/player.h b/qt/player.h index f725069..f28028f 100644 --- a/qt/player.h +++ b/qt/player.h @@ -4,15 +4,39 @@ #include #include +#define BASE_COLOR "green" +#define READY_COLOR "orange" +#define BASE_SIZE "45pt" +#define SMALL_SIZE "25pt" + class Player { -private: - QString name; - QString currentLine; - QLabel* theLabel; public: + enum State { + Naming, + Waiting, + Typing + }; + Player(QWidget* parent); + void handleKey(QString); + 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 setLabel(QString body, QString color, QString header = ""); }; #endif // PLAYER_H