You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.1 KiB
C++
63 lines
1.1 KiB
C++
/*!
|
|
\file main.cpp
|
|
|
|
*/
|
|
|
|
#include "cmainwindow.h"
|
|
|
|
#include <QApplication>
|
|
|
|
#include <QFile>
|
|
#include <QTextStream>
|
|
#include <QSettings>
|
|
|
|
#include "csplashscreen.h"
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
|
|
a.setApplicationVersion(APP_VERSION);
|
|
a.setApplicationDisplayName("picturePrint");
|
|
a.setOrganizationName("WIN-DESIGN");
|
|
a.setOrganizationDomain("windesign.at");
|
|
a.setApplicationName("picturePrint");
|
|
|
|
QSettings settings;
|
|
|
|
QFile f(":qdarkstyle/style.qss");
|
|
if (!f.exists())
|
|
{
|
|
printf("Unable to set stylesheet, file not found\n");
|
|
}
|
|
else
|
|
{
|
|
f.open(QFile::ReadOnly | QFile::Text);
|
|
QTextStream ts(&f);
|
|
a.setStyleSheet(ts.readAll());
|
|
}
|
|
|
|
QPixmap pixmap(":/images/splash.png");
|
|
QFont splashFont;
|
|
cSplashScreen* lpSplash = new cSplashScreen(pixmap, splashFont);
|
|
|
|
lpSplash->show();
|
|
a.processEvents();
|
|
|
|
lpSplash->showStatusMessage(QObject::tr("<center>initializing...</denter>"));
|
|
|
|
cMainWindow w(lpSplash);
|
|
|
|
|
|
if(settings.value("main/maximized").toBool())
|
|
w.showMaximized();
|
|
else
|
|
w.show();
|
|
|
|
lpSplash->finish(&w);
|
|
delete lpSplash;
|
|
|
|
return a.exec();
|
|
}
|