initial commit
This commit is contained in:
@@ -3,12 +3,23 @@
|
||||
|
||||
#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("pictureLibrary");
|
||||
a.setOrganizationName("WIN-DESIGN");
|
||||
a.setOrganizationDomain("windesign.at");
|
||||
a.setApplicationName("pictureLibrary");
|
||||
|
||||
QSettings settings;
|
||||
|
||||
QFile f(":qdarkstyle/style.qss");
|
||||
if (!f.exists())
|
||||
{
|
||||
@@ -21,8 +32,24 @@ int main(int argc, char *argv[])
|
||||
a.setStyleSheet(ts.readAll());
|
||||
}
|
||||
|
||||
cMainWindow w;
|
||||
w.showMaximized();
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user