From f62c734979449864adda39fccfc7f345ccf32bb5 Mon Sep 17 00:00:00 2001 From: doitux Date: Fri, 26 Jan 2007 12:19:48 +0000 Subject: [PATCH] --- src/gui/qt/mainwindowimpl.cpp | 7 +------ src/gui/qt/startsplash/startsplash.cpp | 18 +++--------------- src/gui/qt/startsplash/startsplash.h | 4 +++- 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/gui/qt/mainwindowimpl.cpp b/src/gui/qt/mainwindowimpl.cpp index bf6ac1be..9f0a0668 100755 --- a/src/gui/qt/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindowimpl.cpp @@ -1384,16 +1384,11 @@ void mainWindowImpl::breakButtonClicked() { void mainWindowImpl::paintStartSplash() { - StartSplash *mySplash = new StartSplash(); + StartSplash *mySplash = new StartSplash(this->geometry()); mySplash->setGeometry(0,0,400,250); mySplash->setWindowFlags(Qt::SplashScreen); mySplash->show(); - -// QTimer *timer = new QTimer(this); -// connect(timer, SIGNAL(timeout()), mySplash, SLOT(/*StartSp*/lash::nextAnimationFrame())); -// timer->start(100); - } diff --git a/src/gui/qt/startsplash/startsplash.cpp b/src/gui/qt/startsplash/startsplash.cpp index 725f3fdd..e3329c4b 100644 --- a/src/gui/qt/startsplash/startsplash.cpp +++ b/src/gui/qt/startsplash/startsplash.cpp @@ -19,8 +19,8 @@ ***************************************************************************/ #include "startsplash.h" -StartSplash::StartSplash() - : QWidget() +StartSplash::StartSplash(const QRect &rect) + : QWidget(), parentsGeo(rect) { QFontDatabase::addApplicationFont ("src/gui/qt/fonts/c059013l.pfb"); QFontDatabase::addApplicationFont ("src/gui/qt/fonts/andybold.ttf"); @@ -52,13 +52,6 @@ void StartSplash::paintEvent(QPaintEvent * event) { QFont haveFont("Andy MT",30); QPixmap logo(":/graphics/graphics/logo-140-100.png"); -// if(frameNo < 40) { -// -// painter.setBrush(QColor(0+frameNo,40+frameNo,6+frameNo)); -// painter.drawRect(0,0,399,249); -// -// } - if(frameNo >= 52 && frameNo < 65) { painter.setBrush(QColor(40,80,46)); @@ -184,15 +177,10 @@ void StartSplash::paintEvent(QPaintEvent * event) { painter.setPen(QColor(255,255,255)); painter.drawText(48,30,300,40,4,"Welcome to"); - - - - --opacityCounter; // std::cout << opacity << " " << opacityCounter << "\n"; opacity = 1.0/opacityCounter; - - std::cout << opacity << "\n"; +// std::cout << opacity << "\n"; painter.setOpacity(opacity); painter.drawPixmap(130,85,140,100,logo); diff --git a/src/gui/qt/startsplash/startsplash.h b/src/gui/qt/startsplash/startsplash.h index 67756c66..e1edab99 100644 --- a/src/gui/qt/startsplash/startsplash.h +++ b/src/gui/qt/startsplash/startsplash.h @@ -21,7 +21,7 @@ class StartSplash : public QWidget { Q_OBJECT public: - StartSplash(); + StartSplash(const QRect&); ~StartSplash(); @@ -29,6 +29,8 @@ public: int opacityCounter; qreal opacity; + QRect parentsGeo; + void paintEvent(QPaintEvent * event); public slots: