works now, only game over screen missing
[multypo.git] / qt / multypo.h
1 #ifndef MULTIKBD_H
2 #define MULTIKBD_H
3
4 #include <QWidget>
5 #include <QMap>
6 #include <QFile>
7
8 #include "player.h"
9
10 class MultypoWindow : public QWidget
11 {
12         Q_OBJECT
13         
14 public:
15         explicit MultypoWindow(QWidget *parent = 0);
16         ~MultypoWindow();
17
18         bool handleX11Event(XEvent *event);
19
20 private:
21         void handleKeyPress(int device, QString string);
22         void nextWord();
23         void resetPlayerText();
24
25 private:
26         bool xiInited;
27         int xiOpcode;
28         bool gameStarted;
29         QLabel *mainLabel;
30         QFile words;
31         QMap<int, Player*> players;
32         int typingPlayers; // how many are not ready yet
33 };
34
35 #endif // MULTIKBD_H