2011-03-28 23:36:26 +00:00
|
|
|
#include <QApplication>
|
2011-05-03 13:09:21 +00:00
|
|
|
#include <QDir>
|
2011-05-10 20:47:08 +00:00
|
|
|
#include <QFile>
|
2011-03-28 23:36:26 +00:00
|
|
|
|
2011-04-07 21:57:03 +00:00
|
|
|
#include "maindialog.hpp"
|
2011-03-28 23:36:26 +00:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
|
2011-05-03 13:09:21 +00:00
|
|
|
// Now we make sure the current dir is set to application path
|
|
|
|
QDir dir(QCoreApplication::applicationDirPath());
|
2011-05-10 20:47:08 +00:00
|
|
|
|
|
|
|
#if defined(Q_OS_MAC)
|
|
|
|
if (dir.dirName() == "MacOS") {
|
2011-05-03 13:09:21 +00:00
|
|
|
dir.cdUp();
|
|
|
|
dir.cdUp();
|
|
|
|
dir.cdUp();
|
|
|
|
}
|
2011-05-10 20:47:08 +00:00
|
|
|
#endif
|
2011-05-03 13:09:21 +00:00
|
|
|
|
|
|
|
QDir::setCurrent(dir.absolutePath());
|
2011-05-10 20:47:08 +00:00
|
|
|
|
|
|
|
// Load the stylesheet
|
|
|
|
QFile file("./launcher.qss");
|
|
|
|
|
|
|
|
file.open(QFile::ReadOnly);
|
|
|
|
QString styleSheet = QLatin1String(file.readAll());
|
|
|
|
app.setStyleSheet(styleSheet);
|
|
|
|
|
2011-03-28 23:36:26 +00:00
|
|
|
MainDialog dialog;
|
|
|
|
return dialog.exec();
|
|
|
|
|
|
|
|
}
|
|
|
|
|