splash screen

This commit is contained in:
2018-11-12 13:14:42 +01:00
parent 775e183721
commit b8c816af8d
7 changed files with 25 additions and 14 deletions
+1 -13
View File
@@ -12,6 +12,7 @@
#include "cmovieedit.h"
#include "cthemoviedbv3.h"
#include "ctheaudiodbv1.h"
#include "cmovieviewitemdelegate.h"
@@ -78,9 +79,6 @@ static bool movieSort(cMovie* s1, cMovie* s2)
return(title1 < title2);
}
#include "ctheaudiodbv1.h"
#include "cartist.h"
cMainWindow::cMainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::cMainWindow),
@@ -96,16 +94,8 @@ cMainWindow::cMainWindow(QWidget *parent) :
m_lpFileExportAction(0),
m_lpFileExitAction(0)
{
cTheAudioDBV1 theAudioDBV1;
QList<cArtist*> artistList = theAudioDBV1.searchArtist("Wolfgang Ambros");
QSettings settings;
cMessageAnimateDialog* lpDialog = new cMessageAnimateDialog(this);
lpDialog->setTitle("Initializing");
lpDialog->setMessage("Initializing");
lpDialog->show();
ui->setupUi(this);
m_lpFileMenu = menuBar()->addMenu(tr("&File"));
@@ -177,8 +167,6 @@ cMainWindow::cMainWindow(QWidget *parent) :
ui->m_lpSplitter->setSizes(QList<int>() << iWidth1 << iWidth2);
delete lpDialog;
connect(ui->m_lpSeriesList1->selectionModel(), &QItemSelectionModel::selectionChanged, this, &cMainWindow::selectionChanged1);
connect(ui->m_lpSeriesList2->selectionModel(), &QItemSelectionModel::selectionChanged, this, &cMainWindow::selectionChanged2);
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

+18
View File
@@ -1,6 +1,11 @@
#include "cmainwindow.h"
#include <QApplication>
#include <QSettings>
#include <QSplashScreen>
#define SHOW_SPLASH
int main(int argc, char *argv[])
{
@@ -12,11 +17,24 @@ int main(int argc, char *argv[])
QSettings settings;
#ifdef SHOW_SPLASH
QPixmap pixmap(":/splash.jpg");
#else
QPixmap pixmap(":/splashEmpty.png");
#endif
QSplashScreen splash(pixmap);
splash.show();
splash.showMessage("initializing...");
a.processEvents();
cMainWindow w;
if(settings.value("main/maximized").toBool())
w.showMaximized();
else
w.show();
splash.finish(&w);
return a.exec();
}
+4 -1
View File
@@ -103,7 +103,10 @@ FORMS += cmainwindow.ui \
DISTFILES += \
qtMovies.ico \
Doxyfile
Doxyfile \
logo.jpg \
splash.jpg \
splashEmpty.png
RESOURCES += \
resource.qrc
+2
View File
@@ -2,5 +2,7 @@
<qresource prefix="/">
<file>empty.db</file>
<file>128279.png</file>
<file>splash.jpg</file>
<file>splashEmpty.png</file>
</qresource>
</RCC>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB