-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (36 loc) · 1.91 KB
/
main.cpp
File metadata and controls
38 lines (36 loc) · 1.91 KB
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
/****************************************************************************
** **
** Copyright (C) 2008-2014 Victor Zinkevich. All rights reserved. **
** Contact: vicking@yandex.ru **
** **
** This file is part of the Algorithm Flowchart Editor project. **
** **
** This file may be used under the terms of the GNU **
** General Public License versions 2.0 or 3.0 as published by the Free **
** Software Foundation and appearing in the file LICENSE included in **
** the packaging of this file. **
** You can find license at http://www.gnu.org/licenses/gpl.html **
** **
****************************************************************************/
#include <QtGui>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QSettings settings("afce", "application");
QString localeName = settings.value("locale", QLocale::system().name()).toString();
qDebug() << "Available languages: " << MainWindow::enumLanguages();
setApplicationLocale(localeName);
#if defined(Q_WS_X11) or defined(Q_OS_LINUX)
qDebug() << "Application dir path:" << QString(PROGRAM_DATA_DIR);
#else
qDebug() << "Application dir path:" << app.applicationDirPath();
#endif
qDebug() << "Version: " << afceVersion();
qDebug() << "Supported image formats to write: " << QImageWriter::supportedImageFormats();
QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf-8"));
MainWindow w;
w.setLocale(QLocale(localeName));
w.show();
return app.exec();
}