diff --git a/cmainwindow.cpp b/cmainwindow.cpp index 4fc49fe..57dc265 100644 --- a/cmainwindow.cpp +++ b/cmainwindow.cpp @@ -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 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() << iWidth1 << iWidth2); - delete lpDialog; - connect(ui->m_lpSeriesList1->selectionModel(), &QItemSelectionModel::selectionChanged, this, &cMainWindow::selectionChanged1); connect(ui->m_lpSeriesList2->selectionModel(), &QItemSelectionModel::selectionChanged, this, &cMainWindow::selectionChanged2); diff --git a/logo.jpg b/logo.jpg new file mode 100644 index 0000000..ccd0550 Binary files /dev/null and b/logo.jpg differ diff --git a/main.cpp b/main.cpp index d55c4be..5eeb3d0 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,11 @@ #include "cmainwindow.h" #include #include +#include + + +#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(); } diff --git a/qtMovies.pro b/qtMovies.pro index a55aa38..7af0c2b 100644 --- a/qtMovies.pro +++ b/qtMovies.pro @@ -103,7 +103,10 @@ FORMS += cmainwindow.ui \ DISTFILES += \ qtMovies.ico \ - Doxyfile + Doxyfile \ + logo.jpg \ + splash.jpg \ + splashEmpty.png RESOURCES += \ resource.qrc diff --git a/resource.qrc b/resource.qrc index cad2300..369e290 100644 --- a/resource.qrc +++ b/resource.qrc @@ -2,5 +2,7 @@ empty.db 128279.png + splash.jpg + splashEmpty.png diff --git a/splash.jpg b/splash.jpg new file mode 100644 index 0000000..112fc5e Binary files /dev/null and b/splash.jpg differ diff --git a/splashEmpty.png b/splashEmpty.png new file mode 100644 index 0000000..5329d63 Binary files /dev/null and b/splashEmpty.png differ