summaryrefslogtreecommitdiff
path: root/client/splashscreen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/splashscreen.cc')
-rw-r--r--client/splashscreen.cc34
1 files changed, 18 insertions, 16 deletions
diff --git a/client/splashscreen.cc b/client/splashscreen.cc
index c4acb25..7b23609 100644
--- a/client/splashscreen.cc
+++ b/client/splashscreen.cc
@@ -27,9 +27,22 @@
#include "config.h"
#include "splashscreen.h"
-SplashScreen::SplashScreen()
+#include <QApplication>
+#include <QLayout>
+
+SplashScreen::SplashScreen(QWidget *mainwindow)
{
- start();
+ setPixmap(QPixmap(PIXMAP_SPLASH));
+ finish(mainwindow);
+
+ progbar = new QProgressBar(this);
+ progbar->setRange(0,100);
+ progbar->setValue(0);
+ progbar->move(100,100);
+ progbar->resize(100,20);
+ progbar->show();
+
+ show();
}
SplashScreen::~SplashScreen()
@@ -38,18 +51,7 @@ SplashScreen::~SplashScreen()
void SplashScreen::setProgress(QString text, unsigned int pct)
{
- // progbartext->text = text;
- // progbar->setValue(pct);
-}
-
-void SplashScreen::run()
-{
- /*
- QDialog splash;
- splash.setModal(true);
- progbar = new QProgressBar(&splash);
- progbar->setRange(0, 100);
- progbar->setTextVisible(true);
- splash.exec();
- */
+ showMessage(text);
+ qApp->processEvents();
+ progbar->setValue(pct);
}