Rev 36 | Rev 40 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | muzer | 1 | #ifndef MAINWINDOW_H |
2 | #define MAINWINDOW_H |
||
3 | |||
4 | #include <QMainWindow> |
||
5 | #include <QPaintEvent> |
||
6 | #include <QTcpServer> |
||
7 | #include <QList> |
||
8 | #include <QTimer> |
||
3 | tom | 9 | #include <QGLWidget> |
1 | muzer | 10 | |
35 | muzer | 11 | |
1 | muzer | 12 | #include "bike.h" |
13 | |||
3 | tom | 14 | class MainWindow : public QGLWidget |
1 | muzer | 15 | { |
16 | Q_OBJECT |
||
17 | |||
9 | muzer | 18 | public: |
19 | MainWindow(QWidget *parent = 0); |
||
20 | ~MainWindow(); |
||
21 | void reset(); |
||
1 | muzer | 22 | |
9 | muzer | 23 | protected: |
24 | void paintEvent(QPaintEvent *e); |
||
1 | muzer | 25 | |
9 | muzer | 26 | private: |
27 | QTcpServer *server; |
||
28 | QList<Bike *> bikes; |
||
29 | QTimer *timer; |
||
30 | int id; |
||
36 | muzer | 31 | QTimer *suddenDeathTimer; |
32 | QTimer *timer2; |
||
33 | bool suddenDeath; |
||
1 | muzer | 34 | |
36 | muzer | 35 | private slots: |
9 | muzer | 36 | void newConnection(); |
37 | void checkClients(); |
||
36 | muzer | 38 | void chat(QString name, QString message); |
39 | void activateSuddenDeath(); |
||
40 | void clientTimeOut(); |
||
1 | muzer | 41 | }; |
42 | |||
43 | #endif // MAINWINDOW_H |