Rev 9 | Go to most recent revision | Details | 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> |
||
9 | |||
10 | #include "bike.h" |
||
11 | |||
12 | namespace Ui |
||
13 | { |
||
14 | class MainWindow; |
||
15 | } |
||
16 | |||
17 | class MainWindow : public QMainWindow |
||
18 | { |
||
19 | Q_OBJECT |
||
20 | |||
21 | public: |
||
22 | MainWindow(QWidget *parent = 0); |
||
23 | ~MainWindow(); |
||
24 | void reset(); |
||
25 | |||
26 | protected: |
||
27 | void changeEvent(QEvent *e); |
||
28 | void paintEvent(QPaintEvent *e); |
||
29 | |||
30 | private: |
||
31 | Ui::MainWindow *ui; |
||
32 | QTcpServer *server; |
||
33 | QList<Bike *> bikes; |
||
34 | QTimer *timer; |
||
35 | int id; |
||
36 | |||
37 | private slots: |
||
38 | void newConnection(); |
||
39 | void checkClients(); |
||
40 | }; |
||
41 | |||
42 | #endif // MAINWINDOW_H |