From 685fe05def77b039221edf06c74af74915d536c5 Mon Sep 17 00:00:00 2001 From: Samu Laaksonen Date: Tue, 25 Sep 2012 20:00:41 +0300 Subject: Initial code commit Added some stuff for project base - tiled sources - few Qt based classes for gfx --- src/main.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/main.cpp (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..5691abc --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,33 @@ +#include +#include + +#include "MainWindow.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + + QApplication::setApplicationName("prism"); + QApplication::setOrganizationName("aarg"); + QApplication::setOrganizationDomain("aarg.eu"); + + QSettings::setDefaultFormat(QSettings::IniFormat); + + // set some default settings + + QSettings s; + + if (!s.contains("path/data")) + { + const QString &app_path = QApplication::applicationDirPath(); + + s.setValue("path/data", app_path); + s.setValue("path/gfx", app_path + "/gfx"); + s.setValue("path/levels", app_path + "/levels"); + } + + MainWindow mw; + mw.show(); + + return a.exec(); +} -- cgit v1.2.3