From: Akos Polster Date: Sun, 7 Nov 2010 02:55:13 +0000 (+0100) Subject: Show splash screen on Symbian. X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=55ab437381d1dd363c347ee16b8c06452e23b1e4;p=dorian Show splash screen on Symbian. --- diff --git a/dorian.pro b/dorian.pro index 5eca6d9..56489aa 100644 --- a/dorian.pro +++ b/dorian.pro @@ -39,7 +39,8 @@ SOURCES += \ widgets/listview.cpp \ searchresultsdialog.cpp \ searchresultinfodialog.cpp \ - widgets/progressdialog.cpp + widgets/progressdialog.cpp \ + widgets/splash.cpp HEADERS += \ mainwindow.h \ @@ -80,7 +81,8 @@ HEADERS += \ widgets/flickable.h \ searchresultsdialog.h \ searchresultinfodialog.h \ - widgets/progressdialog.h + widgets/progressdialog.h \ + widgets/splash.h RESOURCES += \ dorian.qrc diff --git a/dorian.qrc b/dorian.qrc index f8ad9d3..bd63085 100644 --- a/dorian.qrc +++ b/dorian.qrc @@ -48,5 +48,6 @@ icons/symbian/style-day.png icons/symbian/style-default.png icons/symbian/style-night.png + icons/splash.jpg diff --git a/icons/splash.jpg b/icons/splash.jpg new file mode 100755 index 0000000..c6bf552 Binary files /dev/null and b/icons/splash.jpg differ diff --git a/main.cpp b/main.cpp index 1676a8e..e50a753 100644 --- a/main.cpp +++ b/main.cpp @@ -8,6 +8,7 @@ #include "bookdb.h" #include "search.h" #include "platform.h" +#include "splash.h" #ifdef Q_OS_SYMBIAN # include "mediakeysobserver.h" @@ -39,8 +40,17 @@ int main(int argc, char *argv[]) value("tracelevel", (int)DORIAN_DEFAULT_TRACE_LEVEL).toInt(); qInstallMsgHandler(Trace::messageHandler); +#ifdef Q_OS_SYMBIAN + Splash *splash = new Splash(); + splash->showFullScreen(); + a.processEvents(); +#endif + { MainWindow w; +#ifdef Q_OS_SYMBIAN + splash->close(); +#endif ret = a.exec(); } diff --git a/mainwindow.cpp b/mainwindow.cpp index bfb9007..72f14ef 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -118,10 +118,12 @@ MainWindow::MainWindow(QWidget *parent): connect(library, SIGNAL(upgrading(const QString &)), this, SLOT(onUpgrading(const QString &))); connect(library, SIGNAL(endUpgrade()), this, SLOT(onEndUpgrade())); +#ifndef Q_OS_SYMBIAN connect(library, SIGNAL(beginLoad(int)), this, SLOT(onBeginLoad(int))); connect(library, SIGNAL(loading(const QString &)), this, SLOT(onLoading(const QString &))); connect(library, SIGNAL(endLoad()), this, SLOT(onEndLoad())); +#endif library->upgrade(); library->load(); diff --git a/pkg/changelog b/pkg/changelog index db4909d..60026e5 100644 --- a/pkg/changelog +++ b/pkg/changelog @@ -3,6 +3,7 @@ dorian (0.3.4-1) unstable; urgency=low * On Symbian, display confirmation after downloading a book * Navigate with volume keys on Symbian, too * Speed up startup, load books on demand + * Show splash screen on Symbian -- Akos Polster Fri, 5 Nov 2010 02:00:00 +0100 diff --git a/widgets/splash.cpp b/widgets/splash.cpp new file mode 100755 index 0000000..998a0de --- /dev/null +++ b/widgets/splash.cpp @@ -0,0 +1,14 @@ +#include + +#include "splash.h" + +Splash::Splash(QWidget *parent): QMainWindow(parent) +{ + QLabel *label = new QLabel(this); + QRect geo = QApplication::desktop()->geometry(); + label->setGeometry(geo); + label->setStyleSheet("background-color: black; color: black"); + label->setPixmap(QPixmap(":/icons/splash.jpg").scaled(geo.width(), + geo.height(), Qt::KeepAspectRatio, Qt::SmoothTransformation)); + setCentralWidget(label); +} diff --git a/widgets/splash.h b/widgets/splash.h new file mode 100755 index 0000000..204e223 --- /dev/null +++ b/widgets/splash.h @@ -0,0 +1,14 @@ +#ifndef SPLASH_H +#define SPLASH_H + +#include + +class Splash: public QMainWindow +{ + Q_OBJECT + +public: + explicit Splash(QWidget *parent = 0); +}; + +#endif // SPLASH_H