This commit is contained in:
doitux
2007-01-27 01:20:51 +00:00
parent f62c734979
commit f9becff196
4 changed files with 57 additions and 39 deletions
+31 -7
View File
@@ -50,6 +50,9 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
{
// Schriftart laden
QFontDatabase::addApplicationFont ("src/gui/qt/fonts/n019003l.pfb");
QFontDatabase::addApplicationFont ("src/gui/qt/fonts/c059013l.pfb");
QFontDatabase::addApplicationFont ("src/gui/qt/fonts/andybold.ttf");
QFont tmpFont("Nimbus Sans L",9);
QApplication::setFont(tmpFont);
@@ -65,6 +68,7 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
setupUi(this);
int i;
startSplashFrameNo = 0;
//Toolbox verstecken?
if (!myConfig->readConfigInt("ShowToolBox", 1)) { groupBox_tools->hide(); }
@@ -99,7 +103,7 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
userWidgetsArray[i]->setPalette(tempPalette);
}
//Timer Objekt erstellen
//Timer Objekte erstellen
dealFlopCards0Timer = new QTimer(this);
dealFlopCards1Timer = new QTimer(this);
dealFlopCards2Timer = new QTimer(this);
@@ -132,6 +136,9 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
potDistributeTimer = new QTimer(this);
postRiverRunAnimation6Timer = new QTimer(this);
startSplashAnimationTimer = new QTimer(this);
dealFlopCards0Timer->setSingleShot(TRUE);
dealFlopCards1Timer->setSingleShot(TRUE);
dealFlopCards2Timer->setSingleShot(TRUE);
@@ -261,6 +268,8 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
connect(potDistributeTimer, SIGNAL(timeout()), this, SLOT(postRiverRunAnimation5()));
connect(postRiverRunAnimation5Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation6() ));
connect(postRiverRunAnimation6Timer, SIGNAL(timeout()), this, SLOT( startNewHand() ));
connect(startSplashAnimationTimer, SIGNAL(timeout()), this, SLOT( startSplashNextFrame() ));
connect( actionNewGame, SIGNAL( activated() ), this, SLOT( callNewGameDialog() ) );
connect( actionAboutPokerth, SIGNAL( activated() ), this, SLOT( callAboutPokerthDialog() ) );
@@ -1245,6 +1254,12 @@ void mainWindowImpl::postRiverRunAnimation6() {
postRiverRunAnimation6Timer->start(newRoundSpeed);
}
void mainWindowImpl::startSplashNextFrame() {
++startSplashFrameNo;
update();
}
void mainWindowImpl::startNewHand() {
@@ -1384,17 +1399,18 @@ void mainWindowImpl::breakButtonClicked() {
void mainWindowImpl::paintStartSplash() {
StartSplash *mySplash = new StartSplash(this->geometry());
mySplash->setGeometry(0,0,400,250);
mySplash->setWindowFlags(Qt::SplashScreen);
mySplash->show();
// std::cout << this->geometry().x() << this->geometry().y() << "\n";
/*
StartSplash *mySplash = new StartSplash(this);
mySplash->show();*/
}
void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
// cout << event->key() << endl;
cout << event->key() << endl;
if (event->key() == 16777265) { switchToolBox(); }
@@ -1409,6 +1425,14 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
}
void mainWindowImpl::paintEvent(QPaintEvent* event) {
QMainWindow::paintEvent(event);
StartSplash startSplashPainter(this);
startSplashPainter.setFrameNo(startSplashFrameNo);
/* do your overlay painting here */
}
void mainWindowImpl::switchToolBox() {
if (groupBox_tools->isHidden()) { groupBox_tools->show(); }