forked from dngulin/ttyhlauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
45 lines (34 loc) · 880 Bytes
/
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
44
45
#include "launcherwindow.h"
#include "logger.h"
#include "settings.h"
#include <QApplication>
#include <QSplashScreen>
#include <QBitmap>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTranslator t;
QDate today = QDate::currentDate();
if ( today.month() == 4 && today.day() == 1 )
{
t.load(":/translations/koi7.qm");
}
else
{
t.load(":/translations/ru.qm");
}
QApplication::installTranslator(&t);
Settings::instance();
Logger::logger();
QPixmap logo(":/resources/logo.png");
QSplashScreen *splash =
new QSplashScreen(logo, Qt::FramelessWindowHint | Qt::SplashScreen);
splash->setMask( logo.mask() );
splash->show();
Settings::instance()->updateLocalData();
splash->close();
delete splash;
LauncherWindow w;
w.show();
return a.exec();
}