Subversion Repositories QTron

Rev

Rev 32 | Rev 36 | 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;
32 tom 31
        QTimer *suddenDeathTimer;
32
        bool suddenDeath;
1 muzer 33
 
34
        private slots:
9 muzer 35
    void newConnection();
36
    void checkClients();
31 tom 37
        void chat(QString name, QString message);
32 tom 38
        void activateSuddenDeath();
1 muzer 39
};
40
 
41
#endif // MAINWINDOW_H