Rev 31 | Rev 35 | 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 | |
11 | #include "bike.h" |
||
12 | |||
3 | tom | 13 | class MainWindow : public QGLWidget |
1 | muzer | 14 | { |
15 | Q_OBJECT |
||
16 | |||
9 | muzer | 17 | public: |
18 | MainWindow(QWidget *parent = 0); |
||
19 | ~MainWindow(); |
||
20 | void reset(); |
||
1 | muzer | 21 | |
9 | muzer | 22 | protected: |
23 | void paintEvent(QPaintEvent *e); |
||
1 | muzer | 24 | |
9 | muzer | 25 | private: |
26 | QTcpServer *server; |
||
27 | QList<Bike *> bikes; |
||
28 | QTimer *timer; |
||
29 | int id; |
||
32 | tom | 30 | QTimer *suddenDeathTimer; |
31 | bool suddenDeath; |
||
1 | muzer | 32 | |
33 | private slots: |
||
9 | muzer | 34 | void newConnection(); |
35 | void checkClients(); |
||
31 | tom | 36 | void chat(QString name, QString message); |
32 | tom | 37 | void activateSuddenDeath(); |
1 | muzer | 38 | }; |
39 | |||
40 | #endif // MAINWINDOW_H |