9220df841240d0602427d1b481e551b079aede51
[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 };
33
34 #endif // MULTIKBD_H