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