Subversion Repositories QTron

Rev

Rev 31 | Rev 36 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPaintEvent>
#include <QTcpServer>
#include <QList>
#include <QTimer>
#include <QGLWidget>

#include "bike.h"

class MainWindow : public QGLWidget
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void reset();

protected:
    void paintEvent(QPaintEvent *e);

private:
    QTcpServer *server;
    QList<Bike *> bikes;
    QTimer *timer;
    int id;
        QTimer *suddenDeathTimer;
        bool suddenDeath;

        private slots:
    void newConnection();
    void checkClients();
        void chat(QString name, QString message);
        void activateSuddenDeath();
};

#endif // MAINWINDOW_H