-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (28 loc) · 775 Bytes
/
main.cpp
File metadata and controls
37 lines (28 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "simulator.h"
#include "MyGraphicsScene.h"
#include "MyGraphicsView.h"
#include <qtimeline.h>
#include <time.h>
#include <qapplication.h>
#include <qgraphicsview.h>
#include "async.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
qsrand(time(0));
MyGraphicsScene scene;
scene.setItemIndexMethod(QGraphicsScene::NoIndex);
scene.setBackgroundBrush(Qt::white);
scene.setSceneRect(0, 0, 740, 540);
MyGraphicsView view(&scene);
view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
view.setRenderHint(QPainter::Antialiasing);
view.show();
Simulator simulator(&scene);
simulator.start();
Async bye;
bye.Receive("127.0.0.1",30011);
bye.show();
bye.hide();
return app.exec();
}