splash screen
This commit is contained in:
+1
-13
@@ -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);
|
||||
|
||||
|
||||
@@ -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
@@ -103,7 +103,10 @@ FORMS += cmainwindow.ui \
|
||||
|
||||
DISTFILES += \
|
||||
qtMovies.ico \
|
||||
Doxyfile
|
||||
Doxyfile \
|
||||
logo.jpg \
|
||||
splash.jpg \
|
||||
splashEmpty.png
|
||||
|
||||
RESOURCES += \
|
||||
resource.qrc
|
||||
|
||||
@@ -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
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Reference in New Issue
Block a user