-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
43 lines (32 loc) · 1.04 KB
/
main.cpp
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
38
39
40
41
42
43
#include <QtGui/QApplication>
#include <QTextCodec>
#include <time.h>
#include "mainwidget.h"
#include "gamerecord.h"
#include "statistic.h"
#include "achievements.h"
#include "publicgamesounds.h"
GameRecord gameRecord;
Statistic statistic;
Achievements achievements;
int main(int argc, char *argv[])
{
PublicGameSounds::init();
srand ( time(NULL) );
QTextCodec *codec = QTextCodec::codecForName("utf8");
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
QApplication a(argc, argv);
QObject::connect(&statistic,
SIGNAL(statisticChanged(Statistic::StatisticType,int,int)),
&achievements,
SLOT(statisticChanged(Statistic::StatisticType,int,int)));
MainWidget w;
// w.setAttribute(Qt::WA_PaintOnScreen);
w.setGeometry(QRect(100,100,1024,600));
// Accept touch event so that we can use 2 mouses
w.setAttribute(Qt::WA_AcceptTouchEvents);
w.show();
return a.exec();
}