This commit is contained in:
doitux
2007-01-26 12:19:48 +00:00
parent 8ad10fea14
commit f62c734979
3 changed files with 7 additions and 22 deletions
+1 -6
View File
@@ -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);
}
+3 -15
View File
@@ -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);
+3 -1
View File
@@ -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: