summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2012-11-01 16:17:55 +0100
committerArno <am@disconnect.de>2012-11-01 16:17:55 +0100
commitd2758ae9c4fc6a25c7aaf4afce7f9dd371094266 (patch)
tree5674246d34d1921edec5f08f81081a9b985ec8c6
parente4dec47385eb6e6906ddfa6b439e161a9b38c59a (diff)
downloadSheMov-d2758ae9c4fc6a25c7aaf4afce7f9dd371094266.tar.gz
SheMov-d2758ae9c4fc6a25c7aaf4afce7f9dd371094266.tar.bz2
SheMov-d2758ae9c4fc6a25c7aaf4afce7f9dd371094266.zip
Fix Splash1.1.0
Actually display splash screen and show what we're doing.
-rw-r--r--main.cpp7
-rw-r--r--shemov.cpp18
2 files changed, 19 insertions, 6 deletions
diff --git a/main.cpp b/main.cpp
index 07c3f53..3606d17 100644
--- a/main.cpp
+++ b/main.cpp
@@ -6,7 +6,6 @@
*/
#include <QApplication>
-#include <QSplashScreen>
#include "shemov.h"
@@ -16,10 +15,6 @@ int main(int argc, char **argv){
QCoreApplication::setOrganizationDomain("hadante.servebeer.com");
QCoreApplication::setApplicationName("SheMov");
QCoreApplication::setApplicationVersion("1.0 TreeVersion");
- QPixmap splash(":/shemov_splash.png");
- QSplashScreen sp(splash);
- sp.show();
- SheMov *sm = new SheMov;
- sp.finish(sm);
+ (void) new SheMov;
return app.exec();
}
diff --git a/shemov.cpp b/shemov.cpp
index 2703a56..817c808 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -31,6 +31,7 @@
#include <QHeaderView>
#include <QDir>
#include <QFileInfo>
+#include <QSplashScreen>
#include <sys/vfs.h>
@@ -62,11 +63,17 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
//application icon
qApp->setWindowIcon(QIcon(":/shemov.png"));
setAttribute(Qt::WA_DeleteOnClose);
+ QSplashScreen splash(QPixmap(":/shemov_splash.png"));
+ splash.show();
//init database as early as possible
+ splash.showMessage(tr("Initializing globals..."), Qt::AlignHCenter, Qt::yellow);
+ qApp->processEvents();
(void) SmGlobals::instance();
//FileSystemWidget + TabWidget
+ splash.showMessage(tr("Constructing Filemanager..."), Qt::AlignHCenter, Qt::yellow);
+ qApp->processEvents();
mFSWidget = new FilesystemWidget;
setWindowTitle(mFSWidget->windowTitle());
mTab = new QTabWidget;
@@ -74,6 +81,8 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
connect(this, SIGNAL(configChanged()), mFSWidget, SLOT(configChanged()));
//ArchiveTreeView
+ splash.showMessage(tr("Creating Archive..."), Qt::AlignHCenter, Qt::yellow);
+ qApp->processEvents();
mATree = new ArchiveTreeView;
mTab->addTab(mATree, "Archive");
connect(mATree->filesWidget(), SIGNAL(statusMessage(QString)), this, SLOT(statusbarMessage(QString)));
@@ -84,6 +93,8 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
connect(this, SIGNAL(configChanged()), mATree, SLOT(readSettings()));
//pictures
+ splash.showMessage(tr("Creating Picture Archive..."), Qt::AlignHCenter, Qt::yellow);
+ qApp->processEvents();
mPicWidget = new PicturesWidget;
mTab->addTab(mPicWidget, tr("Pictures"));
connect(mPicWidget, SIGNAL(needWindowTitleChange(QString)), this, SLOT(setWindowTitle(QString)));
@@ -93,6 +104,8 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
PictureViewer2 *picViewer = SmGlobals::instance()->pictureViewer();
//newmoviewizard + dbanalyzer
+ splash.showMessage(tr("Creating misc. Dialogs..."), Qt::AlignHCenter, Qt::yellow);
+ qApp->processEvents();
mNewMovieWizard = new NewMovieWizard(this);
connect(mNewMovieWizard, SIGNAL(seriesAdded(QString,int)), mATree->seriesWidget(), SLOT(seriesAdded(QString,int)));
mDbAnalyzerDialog = new DbAnalyzerDialog(this);
@@ -102,12 +115,16 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(mTab);
+ splash.showMessage(tr("Creating Menus and Statusbar..."), Qt::AlignHCenter, Qt::yellow);
+ qApp->processEvents();
createStatusbar();
createActions();
createMenus();
createToolBar();
setFsFree();
+ splash.showMessage(tr("Finishing..."), Qt::AlignHCenter, Qt::yellow);
+ qApp->processEvents();
connect(mFSWidget->fileView(), SIGNAL(selectedSize(qint64)), this, SLOT(setSize(qint64)));
connect(mFSWidget->fileView(), SIGNAL(numSelected(int)), this, SLOT(updateSelectedCount(int)));
connect(mFSWidget, SIGNAL(windowTitle(QString)), this, SLOT(setWindowTitle(QString)));
@@ -126,6 +143,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
centralWidget->setLayout(mainLayout);
setCentralWidget(centralWidget);
show();
+ splash.finish(this);
mATree->seriesWidget()->readSettings();
mATree->filesWidget()->filesTree()->readSettings();
mFSWidget->readSettings();