Subversion Repositories QTron

Rev

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