This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,295 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2006 by FThauer FHammer *
|
||||
* f.thauer@web.de *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#ifndef MAINWINDOWIMPL_H
|
||||
#define MAINWINDOWIMPL_H
|
||||
|
||||
#include "ui_mainwindowv2.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
#include "handinterface.h"
|
||||
|
||||
class Game;
|
||||
class Session;
|
||||
class Log;
|
||||
class ConfigFile;
|
||||
|
||||
class BoardInterface;
|
||||
// class HandInterface;
|
||||
class PlayerInterface;
|
||||
class MyCardsPixmapLabel;
|
||||
class joinNetworkGameDialogImpl;
|
||||
class connectToServerDialogImpl;
|
||||
class createNetworkGameDialogImpl;
|
||||
class startNetworkGameDialogImpl;
|
||||
|
||||
class QColor;
|
||||
|
||||
|
||||
class mainWindowImpl: public QMainWindow, public Ui::mainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
mainWindowImpl(QMainWindow *parent = 0 );
|
||||
|
||||
~mainWindowImpl();
|
||||
|
||||
void setGame(Game*);
|
||||
void setHand(HandInterface*);
|
||||
void setSession(Session*);
|
||||
void setLog(Log*);
|
||||
|
||||
int getMaxQuantityPlayers() const { return maxQuantityPlayers; }
|
||||
|
||||
void setActualHand(HandInterface* theValue) { actualHand = theValue;}
|
||||
HandInterface* getActualHand() const { return actualHand;}
|
||||
|
||||
|
||||
//refresh-Funktionen
|
||||
void refreshSet();
|
||||
void refreshButton();
|
||||
void refreshPlayerName();
|
||||
void refreshAction();
|
||||
void refreshCash();
|
||||
void refreshGroupbox();
|
||||
void refreshAll();
|
||||
void refreshChangePlayer();
|
||||
void refreshPot();
|
||||
|
||||
// Karten-Funktionen
|
||||
void dealHoleCards();
|
||||
|
||||
//Spieler-Funktionen
|
||||
void meInAction();
|
||||
void disableMyButtons();
|
||||
|
||||
void highlightRoundLabel(std::string);
|
||||
|
||||
void setSpeeds();
|
||||
|
||||
signals:
|
||||
void SignalNetSuccess(int actionID);
|
||||
void SignalNetError(int errorID, int osErrorID);
|
||||
|
||||
public slots:
|
||||
|
||||
void setGameSpeed(const int theValue) { guiGameSpeed = theValue; setSpeeds(); } // Achtung Faktor 10!!!
|
||||
|
||||
void callNewGameDialog() ;
|
||||
void callAboutPokerthDialog();
|
||||
void callSettingsDialog();
|
||||
void callCreateNetworkGameDialog();
|
||||
void callJoinNetworkGameDialog();
|
||||
|
||||
void myFold();
|
||||
void myCheck();
|
||||
void myCall();
|
||||
void myBet();
|
||||
void mySet();
|
||||
void myRaise();
|
||||
void myAllIn();
|
||||
|
||||
void dealFlopCards0();
|
||||
void dealFlopCards1();
|
||||
void dealFlopCards2();
|
||||
void dealFlopCards3();
|
||||
void dealFlopCards4();
|
||||
void dealFlopCards5();
|
||||
void dealFlopCards6();
|
||||
|
||||
void dealTurnCards0();
|
||||
void dealTurnCards1();
|
||||
void dealTurnCards2();
|
||||
|
||||
void dealRiverCards0();
|
||||
void dealRiverCards1();
|
||||
void dealRiverCards2();
|
||||
|
||||
void nextPlayerAnimation();
|
||||
|
||||
void preflopAnimation1();
|
||||
void preflopAnimation1Action();
|
||||
void preflopAnimation2();
|
||||
void preflopAnimation2Action();
|
||||
|
||||
void flopAnimation1();
|
||||
void flopAnimation1Action();
|
||||
void flopAnimation2();
|
||||
void flopAnimation2Action();
|
||||
|
||||
void turnAnimation1();
|
||||
void turnAnimation1Action();
|
||||
void turnAnimation2();
|
||||
void turnAnimation2Action();
|
||||
|
||||
void riverAnimation1();
|
||||
void riverAnimation1Action();
|
||||
void riverAnimation2();
|
||||
void riverAnimation2Action();
|
||||
|
||||
void postRiverAnimation1();
|
||||
void postRiverAnimation1Action();
|
||||
|
||||
void postRiverRunAnimation1();
|
||||
void postRiverRunAnimation2();
|
||||
void postRiverRunAnimation3();
|
||||
void postRiverRunAnimation4();
|
||||
void postRiverRunAnimation5();
|
||||
void postRiverRunAnimation6();
|
||||
|
||||
void flipHolecardsAllIn();
|
||||
void showMyCards();
|
||||
|
||||
void handSwitchRounds();
|
||||
|
||||
void startNewHand();
|
||||
|
||||
void stopTimer();
|
||||
|
||||
void nextRoundCleanGui();
|
||||
|
||||
void userWidgetsBackgroudColor();
|
||||
void breakButtonClicked();
|
||||
|
||||
void keyPressEvent ( QKeyEvent * event );
|
||||
void switchLeftToolBox();
|
||||
void switchRightToolBox();
|
||||
void switchFullscreen();
|
||||
|
||||
void paintStartSplash();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Game *actualGame;
|
||||
HandInterface *actualHand;
|
||||
Session *mySession;
|
||||
Log *myLog;
|
||||
ConfigFile *myConfig;
|
||||
|
||||
//Logo
|
||||
QLabel *label_logoleft;
|
||||
QLabel *label_logoright;
|
||||
|
||||
//MyPixmapCardsLabel
|
||||
MyCardsPixmapLabel *pixmapLabel_cardBoard0;
|
||||
MyCardsPixmapLabel *pixmapLabel_cardBoard1;
|
||||
MyCardsPixmapLabel *pixmapLabel_cardBoard2;
|
||||
MyCardsPixmapLabel *pixmapLabel_cardBoard3;
|
||||
MyCardsPixmapLabel *pixmapLabel_cardBoard4;
|
||||
MyCardsPixmapLabel *pixmapLabel_card0a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card0b;
|
||||
MyCardsPixmapLabel *pixmapLabel_card1a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card1b;
|
||||
MyCardsPixmapLabel *pixmapLabel_card2a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card2b;
|
||||
MyCardsPixmapLabel *pixmapLabel_card3a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card3b;
|
||||
MyCardsPixmapLabel *pixmapLabel_card4a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card4b;
|
||||
//Timer
|
||||
QTimer *potDistributeTimer;
|
||||
QTimer *timer;
|
||||
QTimer *dealFlopCards0Timer;
|
||||
QTimer *dealFlopCards1Timer;
|
||||
QTimer *dealFlopCards2Timer;
|
||||
QTimer *dealFlopCards3Timer;
|
||||
QTimer *dealFlopCards4Timer;
|
||||
QTimer *dealFlopCards5Timer;
|
||||
QTimer *dealFlopCards6Timer;
|
||||
QTimer *dealTurnCards0Timer;
|
||||
QTimer *dealTurnCards1Timer;
|
||||
QTimer *dealTurnCards2Timer;
|
||||
QTimer *dealRiverCards0Timer;
|
||||
QTimer *dealRiverCards1Timer;
|
||||
QTimer *dealRiverCards2Timer;
|
||||
|
||||
QTimer *nextPlayerAnimationTimer;
|
||||
QTimer *preflopAnimation1Timer;
|
||||
QTimer *preflopAnimation2Timer;
|
||||
QTimer *flopAnimation1Timer;
|
||||
QTimer *flopAnimation2Timer;
|
||||
QTimer *turnAnimation1Timer;
|
||||
QTimer *turnAnimation2Timer;
|
||||
QTimer *riverAnimation1Timer;
|
||||
QTimer *riverAnimation2Timer;
|
||||
|
||||
QTimer *postRiverAnimation1Timer;
|
||||
QTimer *postRiverRunAnimation1Timer;
|
||||
QTimer *postRiverRunAnimation2Timer;
|
||||
QTimer *postRiverRunAnimation3Timer;
|
||||
QTimer *postRiverRunAnimation5Timer;
|
||||
QTimer *postRiverRunAnimation6Timer;
|
||||
|
||||
QWidget *userWidgetsArray[8];
|
||||
QLabel *buttonLabelArray[5];
|
||||
QLabel *cashLabelArray[5];
|
||||
QLabel *cashTopLabelArray[5];
|
||||
QLabel *setLabelArray[5];
|
||||
QLabel *actionLabelArray[5];
|
||||
QGroupBox *groupBoxArray[5];
|
||||
MyCardsPixmapLabel *boardCardsArray[5];
|
||||
MyCardsPixmapLabel *holeCardsArray[5][2];
|
||||
|
||||
QPixmap *flipside;
|
||||
|
||||
//Dialoge
|
||||
joinNetworkGameDialogImpl *myJoinNetworkGameDialog;
|
||||
connectToServerDialogImpl *myConnectToServerDialog;
|
||||
startNetworkGameDialogImpl *myStartNetworkGameDialog;
|
||||
createNetworkGameDialogImpl *myCreateNetworkGameDialog;
|
||||
|
||||
int maxQuantityPlayers;
|
||||
|
||||
int distributePotAnimCounter;
|
||||
|
||||
//Speed
|
||||
int guiGameSpeed;
|
||||
int gameSpeed;
|
||||
int dealCardsSpeed;
|
||||
int preDealCardsSpeed;
|
||||
int postDealCardsSpeed;
|
||||
int AllInDealCardsSpeed;
|
||||
int postRiverRunAnimationSpeed;
|
||||
int winnerBlinkSpeed;
|
||||
int newRoundSpeed;
|
||||
int nextPlayerSpeed1;
|
||||
int nextPlayerSpeed2;
|
||||
int nextPlayerSpeed3;
|
||||
int preflopNextPlayerSpeed;
|
||||
int nextOpponentSpeed;
|
||||
|
||||
|
||||
bool debugMode;
|
||||
bool breakAfterActualHand;
|
||||
|
||||
bool flipHolecardsAllInAlreadyDone;
|
||||
|
||||
QColor active;
|
||||
QColor inactive;
|
||||
QColor highlight;
|
||||
|
||||
friend class GuiWrapper;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,179 +0,0 @@
|
||||
//
|
||||
// C++ Implementation: mycardspixmaplabel
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
//
|
||||
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
|
||||
//
|
||||
// Copyright: See COPYING file that comes with this distribution
|
||||
//
|
||||
//
|
||||
#include "mycardspixmaplabel.h"
|
||||
|
||||
// using namespace std;
|
||||
|
||||
MyCardsPixmapLabel::MyCardsPixmapLabel(QFrame* parent)
|
||||
: QLabel(parent)
|
||||
{
|
||||
fadeOutAction = FALSE;
|
||||
flipCardsAction1 = FALSE;
|
||||
flipCardsAction2 = FALSE;
|
||||
|
||||
|
||||
|
||||
// rotationIntervall = 0.03;
|
||||
|
||||
isFlipside = FALSE;
|
||||
|
||||
front = new QPixmap;
|
||||
flipside = new QPixmap;
|
||||
|
||||
fadeOutTimer = new QTimer;
|
||||
connect(fadeOutTimer, SIGNAL(timeout()), this, SLOT(nextFadeOutFrame()));
|
||||
flipCardsTimer = new QTimer;
|
||||
connect(flipCardsTimer, SIGNAL(timeout()), this, SLOT(nextFlipCardsFrame()));
|
||||
}
|
||||
|
||||
|
||||
MyCardsPixmapLabel::~MyCardsPixmapLabel()
|
||||
{
|
||||
}
|
||||
|
||||
void MyCardsPixmapLabel::startFadeOut(int speed) {
|
||||
|
||||
|
||||
frameOpacity = 0.0;
|
||||
|
||||
if(speed <= 4) { opacityRaiseIntervall = 0.01; }
|
||||
if(speed > 4 && speed <= 7) { opacityRaiseIntervall = 0.02; }
|
||||
if(speed > 7 && speed <= 10) { opacityRaiseIntervall = 0.04; }
|
||||
|
||||
if(speed != 11) {
|
||||
fadeOutAction = TRUE;
|
||||
frameOpacity = 0.0;
|
||||
fadeOutTimer->start(40);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MyCardsPixmapLabel::nextFadeOutFrame() {
|
||||
|
||||
if (frameOpacity < 0.65) {
|
||||
frameOpacity += opacityRaiseIntervall;
|
||||
update();
|
||||
}
|
||||
else {
|
||||
fadeOutTimer->stop();
|
||||
fadeOutAction = FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MyCardsPixmapLabel::startFlipCards(int speed, QPixmap frontPix, QPixmap *flipsidePix) {
|
||||
|
||||
QLabel::setPixmap(frontPix);
|
||||
|
||||
frameFlipCardsAction1Size = 1.0;
|
||||
frameFlipCardsAction2Size = 0.0;
|
||||
|
||||
*front = frontPix;
|
||||
flipside = flipsidePix;
|
||||
|
||||
if(speed <= 4) { flipCardsScaleIntervall = 0.1; }
|
||||
if(speed > 4 && speed <= 6) { flipCardsScaleIntervall = 0.20; }
|
||||
if(speed > 6 && speed <= 8) { flipCardsScaleIntervall = 0.25; }
|
||||
if(speed > 8 && speed <= 10) { flipCardsScaleIntervall = 0.5; }
|
||||
//
|
||||
|
||||
if(speed != 11) {
|
||||
flipCardsAction1 = TRUE;
|
||||
flipCardsTimer->start(40);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MyCardsPixmapLabel::nextFlipCardsFrame() {
|
||||
|
||||
if (frameFlipCardsAction1Size > 0.1 ) {
|
||||
//erst flipside verkleinern
|
||||
frameFlipCardsAction1Size -= flipCardsScaleIntervall;
|
||||
update();
|
||||
}
|
||||
else {
|
||||
if(flipCardsAction1) {
|
||||
flipCardsAction1 = FALSE;
|
||||
flipCardsAction2 = TRUE;
|
||||
}
|
||||
else {
|
||||
//dann front vergrößern
|
||||
if (frameFlipCardsAction2Size < 0.9 ) {
|
||||
|
||||
frameFlipCardsAction2Size += flipCardsScaleIntervall;
|
||||
update();
|
||||
}
|
||||
else {
|
||||
flipCardsAction2 = FALSE;
|
||||
flipCardsTimer->stop();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MyCardsPixmapLabel::setPixmap(const QPixmap &pic, const bool flipsideIs) {
|
||||
|
||||
QLabel::setPixmap(pic);
|
||||
isFlipside = flipsideIs;
|
||||
|
||||
}
|
||||
|
||||
void MyCardsPixmapLabel::paintEvent(QPaintEvent * event) {
|
||||
|
||||
if (!(flipCardsAction1 || flipCardsAction2)) {
|
||||
QLabel::paintEvent(event);
|
||||
}
|
||||
|
||||
if (fadeOutAction) {
|
||||
|
||||
QPainter painter(this);
|
||||
// painter.setPen(QColor(74,131,83));
|
||||
painter.setBrush(QColor(74,131,83));
|
||||
// painter.setBrush(palette().color(QPalette::Background));
|
||||
// painter.setBrush(QColor(0,0,0));
|
||||
|
||||
painter.setOpacity(frameOpacity);
|
||||
// painter.drawRect(this->geometry());
|
||||
if(objectName()=="pixmapLabel_card0b" || objectName()=="pixmapLabel_card0a")
|
||||
painter.drawRect(-1,-1,81,113);
|
||||
else
|
||||
painter.drawRect(-1,-1,58,81);
|
||||
|
||||
}
|
||||
|
||||
if (flipCardsAction1) {
|
||||
QPainter painter2(this);
|
||||
QPixmap tmpFlipside = flipside->scaled(width(), height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
QPointF center(tmpFlipside.width()/2.0, tmpFlipside.height()/2.0);
|
||||
|
||||
painter2.translate(center);
|
||||
painter2.scale(frameFlipCardsAction1Size ,1);
|
||||
painter2.translate(-center);
|
||||
painter2.drawPixmap(0,0, tmpFlipside);
|
||||
}
|
||||
|
||||
if (flipCardsAction2) {
|
||||
QPainter painter3(this);
|
||||
QPixmap tmpFront = front->scaled(width(), height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
QPointF center(tmpFront.width()/2.0, tmpFront.height()/2.0);
|
||||
|
||||
painter3.translate(center);
|
||||
painter3.scale(frameFlipCardsAction2Size ,1);
|
||||
painter3.translate(-center);
|
||||
|
||||
painter3.drawPixmap(0,0, tmpFront);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
//
|
||||
// C++ Interface: mycardspixmaplabel
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
//
|
||||
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
|
||||
//
|
||||
// Copyright: See COPYING file that comes with this distribution
|
||||
//
|
||||
//
|
||||
#ifndef MYCARDSPIXMAPLABEL_H
|
||||
#define MYCARDSPIXMAPLABEL_H
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class MyCardsPixmapLabel : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MyCardsPixmapLabel(QFrame*);
|
||||
|
||||
~MyCardsPixmapLabel();
|
||||
|
||||
void setIsFlipside(bool theValue){ isFlipside = theValue;}
|
||||
bool getIsFlipside() const{ return isFlipside;}
|
||||
|
||||
void setFadeOutAction(bool theValue) { fadeOutAction = theValue; }
|
||||
bool getFadeOutAction() const { return fadeOutAction;}
|
||||
|
||||
void startFadeOut(int);
|
||||
void startFlipCards(int, QPixmap, QPixmap*);
|
||||
|
||||
void paintEvent(QPaintEvent * event);
|
||||
|
||||
QPixmap *front;
|
||||
QPixmap *flipside;
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
void setPixmap ( const QPixmap &, const bool );
|
||||
void nextFadeOutFrame();
|
||||
void nextFlipCardsFrame();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
qreal frameOpacity;
|
||||
qreal opacityRaiseIntervall;
|
||||
|
||||
qreal flipCardsScaleIntervall;
|
||||
qreal frameFlipCardsAction1Size;
|
||||
qreal frameFlipCardsAction2Size;
|
||||
|
||||
QTimer *fadeOutTimer;
|
||||
QTimer *flipCardsTimer;
|
||||
|
||||
|
||||
bool isFlipside;
|
||||
bool fadeOutAction;
|
||||
bool flipCardsAction1;
|
||||
bool flipCardsAction2;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,258 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2006 by FThauer FHammer *
|
||||
* f.thauer@web.de *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#include "startsplash.h"
|
||||
|
||||
StartSplash::StartSplash(mainWindowImpl *parent)
|
||||
: QSplashScreen(parent), myW(parent)
|
||||
{
|
||||
QFontDatabase::addApplicationFont (":fonts/resources/fonts/c059013l.pfb");
|
||||
QFontDatabase::addApplicationFont (":fonts/resources/fonts/andybold.ttf");
|
||||
|
||||
frameNo = 52;
|
||||
opacityCounter = 13;
|
||||
opacity = 1.0;
|
||||
|
||||
QTimer *timer = new QTimer;
|
||||
connect(timer, SIGNAL(timeout()), this, SLOT(nextAnimationFrame()));
|
||||
timer->start(40);
|
||||
}
|
||||
|
||||
|
||||
StartSplash::~StartSplash()
|
||||
{
|
||||
}
|
||||
|
||||
void StartSplash::nextAnimationFrame() {
|
||||
|
||||
++frameNo;
|
||||
update();
|
||||
}
|
||||
|
||||
void StartSplash::paintEvent(QPaintEvent * event) {
|
||||
|
||||
QPainter painter(this);
|
||||
|
||||
#ifdef _WIN32
|
||||
QFont welcomeFont;
|
||||
welcomeFont.setFamily("Times New Roman");
|
||||
welcomeFont.setPixelSize(42);
|
||||
#else
|
||||
QFont welcomeFont;
|
||||
welcomeFont.setFamily("Century Schoolbook L");
|
||||
welcomeFont.setPixelSize(35);
|
||||
#endif
|
||||
QFont haveFont;
|
||||
haveFont.setFamily("Andy MT");
|
||||
haveFont.setPixelSize(36);
|
||||
|
||||
QPixmap logo(":/graphics/resources/graphics/logo-140-100.png");
|
||||
|
||||
if(frameNo >= 52 && frameNo < 65) {
|
||||
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
}
|
||||
|
||||
if(frameNo >= 65 && frameNo < 68) {
|
||||
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"W");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 68 && frameNo < 71) {
|
||||
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"We");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 71 && frameNo < 74) {
|
||||
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"Wel");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 74 && frameNo < 77) {
|
||||
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"Welc");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 77 && frameNo < 80) {
|
||||
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"Welco");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 80 && frameNo < 83) {
|
||||
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"Welcom");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 83 && frameNo < 92) {
|
||||
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"Welcome");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 92 && frameNo < 95) {
|
||||
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"Welcome t");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 95 && frameNo < 120 ) {
|
||||
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"Welcome to");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 120 && frameNo < 132) {
|
||||
//
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
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";
|
||||
painter.setOpacity(opacity);
|
||||
painter.drawPixmap(130,85,140,100,logo);
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 132 && frameNo < 155) {
|
||||
//
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"Welcome to");
|
||||
|
||||
painter.drawPixmap(130,85,140,100,logo);
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 155 && frameNo < 195) {
|
||||
//
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"Welcome to");
|
||||
|
||||
painter.drawPixmap(130,85,140,100,logo);
|
||||
|
||||
painter.setFont(haveFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(3,190,390,40,4,"Have a lot of fun!");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 195 && frameNo < 245) {
|
||||
//
|
||||
painter.setBrush(QColor(40,80,46));
|
||||
painter.drawRect(0,0,399,249);
|
||||
|
||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
||||
painter.setFont(welcomeFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(48,30,300,40,4,"Welcome to");
|
||||
|
||||
painter.drawPixmap(130,85,140,100,logo);
|
||||
|
||||
painter.setFont(haveFont);
|
||||
painter.setPen(QColor(255,255,255));
|
||||
painter.drawText(3,190,390,40,4,"Have a lot of fun! ;-)");
|
||||
|
||||
}
|
||||
|
||||
if(frameNo >= 245) {
|
||||
this->hide();
|
||||
// myW->label_logo->show();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
//
|
||||
// C++ Interface: startsplash
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
//
|
||||
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
|
||||
//
|
||||
// Copyright: See COPYING file that comes with this distribution
|
||||
//
|
||||
//
|
||||
#ifndef STARTSPLASH_H
|
||||
#define STARTSPLASH_H
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "mainwindowimpl.h"
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
class StartSplash : public QSplashScreen
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
StartSplash(mainWindowImpl *);
|
||||
|
||||
~StartSplash();
|
||||
|
||||
int frameNo;
|
||||
int opacityCounter;
|
||||
qreal opacity;
|
||||
|
||||
void paintEvent(QPaintEvent * event);
|
||||
|
||||
public slots:
|
||||
|
||||
void nextAnimationFrame();
|
||||
|
||||
private:
|
||||
|
||||
mainWindowImpl *myW;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user