This commit is contained in:
@@ -50,9 +50,6 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
|
|||||||
{
|
{
|
||||||
// Schriftart laden
|
// Schriftart laden
|
||||||
QFontDatabase::addApplicationFont ("src/gui/qt/fonts/n019003l.pfb");
|
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);
|
QFont tmpFont("Nimbus Sans L",9);
|
||||||
QApplication::setFont(tmpFont);
|
QApplication::setFont(tmpFont);
|
||||||
|
|
||||||
@@ -68,11 +65,10 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
|
|||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
startSplashFrameNo = 0;
|
|
||||||
|
|
||||||
//Toolbox verstecken?
|
//Toolbox verstecken?
|
||||||
if (!myConfig->readConfigInt("ShowToolBox", 1)) { groupBox_tools->hide(); }
|
if (!myConfig->readConfigInt("ShowToolBox", 1)) { groupBox_tools->hide(); }
|
||||||
// if (myConfig->readConfigInt("ShowIntro", 1)) { paintStartSplash(); }
|
if (myConfig->readConfigInt("ShowIntro", 1)) { QTimer::singleShot(100, this, SLOT( paintStartSplash() )); }
|
||||||
|
|
||||||
|
|
||||||
pushButton_raise->setDisabled(TRUE);
|
pushButton_raise->setDisabled(TRUE);
|
||||||
@@ -103,7 +99,7 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
|
|||||||
userWidgetsArray[i]->setPalette(tempPalette);
|
userWidgetsArray[i]->setPalette(tempPalette);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Timer Objekte erstellen
|
//Timer Objekt erstellen
|
||||||
dealFlopCards0Timer = new QTimer(this);
|
dealFlopCards0Timer = new QTimer(this);
|
||||||
dealFlopCards1Timer = new QTimer(this);
|
dealFlopCards1Timer = new QTimer(this);
|
||||||
dealFlopCards2Timer = new QTimer(this);
|
dealFlopCards2Timer = new QTimer(this);
|
||||||
@@ -136,9 +132,6 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
|
|||||||
potDistributeTimer = new QTimer(this);
|
potDistributeTimer = new QTimer(this);
|
||||||
postRiverRunAnimation6Timer = new QTimer(this);
|
postRiverRunAnimation6Timer = new QTimer(this);
|
||||||
|
|
||||||
startSplashAnimationTimer = new QTimer(this);
|
|
||||||
|
|
||||||
|
|
||||||
dealFlopCards0Timer->setSingleShot(TRUE);
|
dealFlopCards0Timer->setSingleShot(TRUE);
|
||||||
dealFlopCards1Timer->setSingleShot(TRUE);
|
dealFlopCards1Timer->setSingleShot(TRUE);
|
||||||
dealFlopCards2Timer->setSingleShot(TRUE);
|
dealFlopCards2Timer->setSingleShot(TRUE);
|
||||||
@@ -268,8 +261,6 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
|
|||||||
connect(potDistributeTimer, SIGNAL(timeout()), this, SLOT(postRiverRunAnimation5()));
|
connect(potDistributeTimer, SIGNAL(timeout()), this, SLOT(postRiverRunAnimation5()));
|
||||||
connect(postRiverRunAnimation5Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation6() ));
|
connect(postRiverRunAnimation5Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation6() ));
|
||||||
connect(postRiverRunAnimation6Timer, SIGNAL(timeout()), this, SLOT( startNewHand() ));
|
connect(postRiverRunAnimation6Timer, SIGNAL(timeout()), this, SLOT( startNewHand() ));
|
||||||
|
|
||||||
connect(startSplashAnimationTimer, SIGNAL(timeout()), this, SLOT( startSplashNextFrame() ));
|
|
||||||
|
|
||||||
connect( actionNewGame, SIGNAL( activated() ), this, SLOT( callNewGameDialog() ) );
|
connect( actionNewGame, SIGNAL( activated() ), this, SLOT( callNewGameDialog() ) );
|
||||||
connect( actionAboutPokerth, SIGNAL( activated() ), this, SLOT( callAboutPokerthDialog() ) );
|
connect( actionAboutPokerth, SIGNAL( activated() ), this, SLOT( callAboutPokerthDialog() ) );
|
||||||
@@ -1254,12 +1245,6 @@ void mainWindowImpl::postRiverRunAnimation6() {
|
|||||||
postRiverRunAnimation6Timer->start(newRoundSpeed);
|
postRiverRunAnimation6Timer->start(newRoundSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::startSplashNextFrame() {
|
|
||||||
|
|
||||||
++startSplashFrameNo;
|
|
||||||
this->update();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void mainWindowImpl::startNewHand() {
|
void mainWindowImpl::startNewHand() {
|
||||||
|
|
||||||
@@ -1397,12 +1382,20 @@ void mainWindowImpl::breakButtonClicked() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::paintStartSplash() { startSplashAnimationTimer->start(40); }
|
void mainWindowImpl::paintStartSplash() {
|
||||||
|
|
||||||
|
StartSplash *mySplash = new StartSplash();
|
||||||
|
|
||||||
|
mySplash->setMaximumSize(400,250);
|
||||||
|
mySplash->setMinimumSize(400,250);
|
||||||
|
mySplash->setWindowFlags(Qt::SplashScreen);
|
||||||
|
mySplash->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
|
void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
|
||||||
|
|
||||||
cout << event->key() << endl;
|
// cout << event->key() << endl;
|
||||||
|
|
||||||
|
|
||||||
if (event->key() == 16777265) { switchToolBox(); }
|
if (event->key() == 16777265) { switchToolBox(); }
|
||||||
@@ -1417,21 +1410,6 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::paintEvent(QPaintEvent* event) {
|
|
||||||
|
|
||||||
QMainWindow::paintEvent(event);
|
|
||||||
/* do your overlay painting here */
|
|
||||||
|
|
||||||
// StartSplash startSplashPainter(this, startSplashFrameNo);
|
|
||||||
// startSplashPainter.animateStartSplash();
|
|
||||||
|
|
||||||
QPainter p(this);
|
|
||||||
p.setBrush(QColor(0,0,0));
|
|
||||||
p.drawRect(200,200,399,249);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void mainWindowImpl::switchToolBox() {
|
void mainWindowImpl::switchToolBox() {
|
||||||
|
|
||||||
if (groupBox_tools->isHidden()) { groupBox_tools->show(); }
|
if (groupBox_tools->isHidden()) { groupBox_tools->show(); }
|
||||||
|
|||||||
@@ -136,8 +136,6 @@ public slots:
|
|||||||
void postRiverRunAnimation5();
|
void postRiverRunAnimation5();
|
||||||
void postRiverRunAnimation6();
|
void postRiverRunAnimation6();
|
||||||
|
|
||||||
void startSplashNextFrame();
|
|
||||||
|
|
||||||
void handSwitchRounds();
|
void handSwitchRounds();
|
||||||
|
|
||||||
void startNewHand();
|
void startNewHand();
|
||||||
@@ -150,9 +148,8 @@ public slots:
|
|||||||
void breakButtonClicked();
|
void breakButtonClicked();
|
||||||
|
|
||||||
void keyPressEvent ( QKeyEvent * event );
|
void keyPressEvent ( QKeyEvent * event );
|
||||||
void paintEvent(QPaintEvent* event);
|
|
||||||
|
|
||||||
void switchToolBox();
|
void switchToolBox();
|
||||||
|
|
||||||
void paintStartSplash();
|
void paintStartSplash();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -196,9 +193,6 @@ private:
|
|||||||
QTimer *postRiverRunAnimation3Timer;
|
QTimer *postRiverRunAnimation3Timer;
|
||||||
QTimer *postRiverRunAnimation5Timer;
|
QTimer *postRiverRunAnimation5Timer;
|
||||||
QTimer *postRiverRunAnimation6Timer;
|
QTimer *postRiverRunAnimation6Timer;
|
||||||
|
|
||||||
QTimer *startSplashAnimationTimer;
|
|
||||||
|
|
||||||
|
|
||||||
QWidget *userWidgetsArray[8];
|
QWidget *userWidgetsArray[8];
|
||||||
QLabel *buttonLabelArray[5];
|
QLabel *buttonLabelArray[5];
|
||||||
@@ -213,7 +207,6 @@ private:
|
|||||||
int maxQuantityPlayers;
|
int maxQuantityPlayers;
|
||||||
|
|
||||||
int distributePotAnimCounter;
|
int distributePotAnimCounter;
|
||||||
int startSplashFrameNo;
|
|
||||||
|
|
||||||
//Speed
|
//Speed
|
||||||
int guiGameSpeed;
|
int guiGameSpeed;
|
||||||
|
|||||||
@@ -19,13 +19,19 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "startsplash.h"
|
#include "startsplash.h"
|
||||||
|
|
||||||
StartSplash::StartSplash(QMainWindow *parent, int frameNumber)
|
StartSplash::StartSplash()
|
||||||
: QPainter(parent), frameNo(frameNumber)
|
: QDialog()
|
||||||
{
|
{
|
||||||
frameNo += 51;
|
QFontDatabase::addApplicationFont ("src/gui/qt/fonts/c059013l.pfb");
|
||||||
|
QFontDatabase::addApplicationFont ("src/gui/qt/fonts/andybold.ttf");
|
||||||
|
|
||||||
|
frameNo = 52;
|
||||||
opacityCounter = 13;
|
opacityCounter = 13;
|
||||||
opacity = 1.0;
|
opacity = 1.0;
|
||||||
|
|
||||||
|
QTimer *timer = new QTimer;
|
||||||
|
connect(timer, SIGNAL(timeout()), this, SLOT(nextAnimationFrame()));
|
||||||
|
timer->start(40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -33,196 +39,204 @@ StartSplash::~StartSplash()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartSplash::animateStartSplash() {
|
void StartSplash::nextAnimationFrame() {
|
||||||
|
|
||||||
|
++frameNo;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartSplash::paintEvent(QPaintEvent * event) {
|
||||||
|
|
||||||
|
QPainter painter(this);
|
||||||
QFont welcomeFont("Century Schoolbook L",29);
|
QFont welcomeFont("Century Schoolbook L",29);
|
||||||
QFont haveFont("Andy MT",30);
|
QFont haveFont("Andy MT",30);
|
||||||
QPixmap logo(":/graphics/graphics/logo-140-100.png");
|
QPixmap logo(":/graphics/graphics/logo-140-100.png");
|
||||||
|
|
||||||
if(frameNo >= 52 && frameNo < 65) {
|
if(frameNo >= 52 && frameNo < 65) {
|
||||||
|
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 65 && frameNo < 68) {
|
if(frameNo >= 65 && frameNo < 68) {
|
||||||
|
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"W");
|
painter.drawText(48,30,300,40,4,"W");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 68 && frameNo < 71) {
|
if(frameNo >= 68 && frameNo < 71) {
|
||||||
|
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"We");
|
painter.drawText(48,30,300,40,4,"We");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 71 && frameNo < 74) {
|
if(frameNo >= 71 && frameNo < 74) {
|
||||||
|
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Wel");
|
painter.drawText(48,30,300,40,4,"Wel");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 74 && frameNo < 77) {
|
if(frameNo >= 74 && frameNo < 77) {
|
||||||
|
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Welc");
|
painter.drawText(48,30,300,40,4,"Welc");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 77 && frameNo < 80) {
|
if(frameNo >= 77 && frameNo < 80) {
|
||||||
|
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Welco");
|
painter.drawText(48,30,300,40,4,"Welco");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 80 && frameNo < 83) {
|
if(frameNo >= 80 && frameNo < 83) {
|
||||||
|
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Welcom");
|
painter.drawText(48,30,300,40,4,"Welcom");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 83 && frameNo < 92) {
|
if(frameNo >= 83 && frameNo < 92) {
|
||||||
|
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Welcome");
|
painter.drawText(48,30,300,40,4,"Welcome");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 92 && frameNo < 95) {
|
if(frameNo >= 92 && frameNo < 95) {
|
||||||
|
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Welcome t");
|
painter.drawText(48,30,300,40,4,"Welcome t");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 95 && frameNo < 120 ) {
|
if(frameNo >= 95 && frameNo < 120 ) {
|
||||||
|
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Welcome to");
|
painter.drawText(48,30,300,40,4,"Welcome to");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 120 && frameNo < 132) {
|
if(frameNo >= 120 && frameNo < 132) {
|
||||||
|
//
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Welcome to");
|
painter.drawText(48,30,300,40,4,"Welcome to");
|
||||||
|
|
||||||
--opacityCounter;
|
--opacityCounter;
|
||||||
// std::cout << opacity << " " << opacityCounter << "\n";
|
// std::cout << opacity << " " << opacityCounter << "\n";
|
||||||
opacity = 1.0/opacityCounter;
|
opacity = 1.0/opacityCounter;
|
||||||
// std::cout << opacity << "\n";
|
// std::cout << opacity << "\n";
|
||||||
setOpacity(opacity);
|
painter.setOpacity(opacity);
|
||||||
drawPixmap(130,85,140,100,logo);
|
painter.drawPixmap(130,85,140,100,logo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 132 && frameNo < 145) {
|
if(frameNo >= 132 && frameNo < 155) {
|
||||||
|
//
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Welcome to");
|
painter.drawText(48,30,300,40,4,"Welcome to");
|
||||||
|
|
||||||
drawPixmap(130,85,140,100,logo);
|
painter.drawPixmap(130,85,140,100,logo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 145 && frameNo < 185) {
|
if(frameNo >= 155 && frameNo < 195) {
|
||||||
|
//
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Welcome to");
|
painter.drawText(48,30,300,40,4,"Welcome to");
|
||||||
|
|
||||||
drawPixmap(130,85,140,100,logo);
|
painter.drawPixmap(130,85,140,100,logo);
|
||||||
|
|
||||||
setFont(haveFont);
|
painter.setFont(haveFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,190,300,40,4,"Have a lot of fun!");
|
painter.drawText(48,190,300,40,4,"Have a lot of fun!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frameNo >= 185 && frameNo < 260) {
|
if(frameNo >= 195 && frameNo < 245) {
|
||||||
|
//
|
||||||
setBrush(QColor(40,80,46));
|
painter.setBrush(QColor(40,80,46));
|
||||||
drawRect(0,0,399,249);
|
painter.drawRect(0,0,399,249);
|
||||||
|
|
||||||
setRenderHint(QPainter::Antialiasing, TRUE);
|
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||||
setFont(welcomeFont);
|
painter.setFont(welcomeFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,30,300,40,4,"Welcome to");
|
painter.drawText(48,30,300,40,4,"Welcome to");
|
||||||
|
|
||||||
drawPixmap(130,85,140,100,logo);
|
painter.drawPixmap(130,85,140,100,logo);
|
||||||
|
|
||||||
setFont(haveFont);
|
painter.setFont(haveFont);
|
||||||
setPen(QColor(255,255,255));
|
painter.setPen(QColor(255,255,255));
|
||||||
drawText(48,190,300,40,4,"Have a lot of fun! ;-)");
|
painter.drawText(48,190,300,40,4,"Have a lot of fun! ;-)");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(frameNo >= 260 ) { this->hide(); }
|
if(frameNo >= 245) { this->hide(); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,19 +17,24 @@
|
|||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
|
||||||
class StartSplash : public QPainter
|
class StartSplash : public QDialog
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
StartSplash(QMainWindow *parent = 0, int =0);
|
StartSplash();
|
||||||
|
|
||||||
virtual ~StartSplash();
|
~StartSplash();
|
||||||
|
|
||||||
int frameNo;
|
int frameNo;
|
||||||
int opacityCounter;
|
int opacityCounter;
|
||||||
qreal opacity;
|
qreal opacity;
|
||||||
|
|
||||||
void animateStartSplash();
|
void paintEvent(QPaintEvent * event);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
void nextAnimationFrame();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user