-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
36 lines (33 loc) · 847 Bytes
/
main.cpp
File metadata and controls
36 lines (33 loc) · 847 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
#include "View/view.h"
#include "Delegate/delegate.h"
#include "Model/zoomwidget.h"
#include <QApplication>
#include <QLocale>
#include <QTranslator>
int main(int argc, char *argv[])
{
// a = new View();
// b = new delegate(&a);
QApplication a(argc, argv);
QTranslator translator;
const QStringList uiLanguages = QLocale::system().uiLanguages();
for (const QString &locale : uiLanguages) {
const QString baseName = "Paint_" + QLocale(locale).name();
if (translator.load(":/i18n/" + baseName)) {
a.installTranslator(&translator);
break;
}
}
a.setApplicationName("Zoom widget");
#if 0
ZoomWidget w;
w.show();
#endif
#if 1
View view;
Delegate *delegate = new Delegate();
delegate->start(view);
view.show();
#endif
return a.exec();
}