3817866e14641d36b790ad35d1fc14a473fdd095
[multypo.git] / qt / player.h
1 #ifndef PLAYER_H
2 #define PLAYER_H
3
4 #include <QString>
5 #include <QLabel>
6
7 class Player
8 {
9 public:
10     enum State {
11         Naming,
12         Waiting,
13         Typing
14     };
15     
16         Player(QWidget* parent);
17     
18         void handleKey(QString);
19     State getState() { return state; }
20
21         void nextWord();
22     QString getCurrentWord();
23         void wordComplete(int points);
24     void showScore();
25
26 private:
27     int score;
28     QString name;
29     QString currentWord;
30     QLabel* theLabel;
31     
32     State state;
33     
34     void updateLabel();
35 };
36
37 #endif // PLAYER_H