next startwindow steps
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
@@ -111,9 +111,9 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Intro abspielen?
|
//Intro abspielen?
|
||||||
if (myConfig->readConfigInt("ShowIntro")) {
|
// if (myConfig->readConfigInt("ShowIntro")) {
|
||||||
// label_logo->hide();
|
// // label_logo->hide();
|
||||||
QTimer::singleShot(100, this, SLOT( paintStartSplash() )); }
|
// QTimer::singleShot(100, this, SLOT( paintStartSplash() )); }
|
||||||
|
|
||||||
// userWidgetsArray init
|
// userWidgetsArray init
|
||||||
userWidgetsArray[0] = pushButton_BetRaise;
|
userWidgetsArray[0] = pushButton_BetRaise;
|
||||||
@@ -3045,16 +3045,16 @@ void gameTableImpl::breakButtonClicked() {
|
|||||||
|
|
||||||
void gameTableImpl::paintStartSplash() {
|
void gameTableImpl::paintStartSplash() {
|
||||||
|
|
||||||
StartSplash *mySplash = new StartSplash(this, myConfig);
|
// StartSplash *mySplash = new StartSplash(this, myConfig);
|
||||||
|
//
|
||||||
#ifdef __APPLE__
|
// #ifdef __APPLE__
|
||||||
int offset = 305;
|
// int offset = 305;
|
||||||
#else
|
// #else
|
||||||
int offset = 237;
|
// int offset = 237;
|
||||||
#endif
|
// #endif
|
||||||
mySplash->setGeometry(this->pos().x()+offset,this->pos().y()+210,400,250);
|
// mySplash->setGeometry(this->pos().x()+offset,this->pos().y()+210,400,250);
|
||||||
// mySplash->setWindowFlags(Qt::SplashScreen);
|
// // mySplash->setWindowFlags(Qt::SplashScreen);
|
||||||
mySplash->show();
|
// mySplash->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,25 +19,10 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "startsplash.h"
|
#include "startsplash.h"
|
||||||
|
|
||||||
#include "configfile.h"
|
StartSplash::StartSplash(QPixmap &p)
|
||||||
#include "gametableimpl.h"
|
: QSplashScreen(p)
|
||||||
|
|
||||||
StartSplash::StartSplash(gameTableImpl *parent, ConfigFile *c)
|
|
||||||
: QSplashScreen(parent), myW(parent), myConfig(c)
|
|
||||||
{
|
{
|
||||||
|
QTimer::singleShot(3000, this, SLOT(closeThis()));
|
||||||
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
|
||||||
|
|
||||||
logo = myAppDataPath+"gfx/gui/misc/logoChip3D.png";
|
|
||||||
|
|
||||||
|
|
||||||
frameNo = 52;
|
|
||||||
opacityCounter = 13;
|
|
||||||
opacity = 1.0;
|
|
||||||
|
|
||||||
QTimer *timer = new QTimer;
|
|
||||||
connect(timer, SIGNAL(timeout()), this, SLOT(nextAnimationFrame()));
|
|
||||||
timer->start(40);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -45,238 +30,4 @@ StartSplash::~StartSplash()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartSplash::nextAnimationFrame() {
|
void StartSplash::closeThis() { this->close(); }
|
||||||
|
|
||||||
++frameNo;
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void StartSplash::paintEvent(QPaintEvent * /*event*/) {
|
|
||||||
|
|
||||||
QPainter painter(this);
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
QFont welcomeFont;
|
|
||||||
welcomeFont.setFamily("Times New Roman");
|
|
||||||
welcomeFont.setPixelSize(42);
|
|
||||||
#else
|
|
||||||
#ifdef __APPLE__
|
|
||||||
QFont welcomeFont;
|
|
||||||
welcomeFont.setFamily("Century Schoolbook L");
|
|
||||||
welcomeFont.setPixelSize(42);
|
|
||||||
#else
|
|
||||||
QFont welcomeFont;
|
|
||||||
welcomeFont.setFamily("Century Schoolbook L");
|
|
||||||
welcomeFont.setPixelSize(35);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifdef __APPLE__
|
|
||||||
QFont haveFont;
|
|
||||||
haveFont.setFamily("Century Schoolbook L");
|
|
||||||
haveFont.setPixelSize(24);
|
|
||||||
#else
|
|
||||||
QFont haveFont;
|
|
||||||
haveFont.setFamily("Century Schoolbook L");
|
|
||||||
haveFont.setPixelSize(24);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QFont versionFont;
|
|
||||||
versionFont.setFamily("Nimbus Sans L");
|
|
||||||
versionFont.setPixelSize(12);
|
|
||||||
|
|
||||||
if(frameNo >= 52 && frameNo < 55) {
|
|
||||||
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 55 && frameNo < 57) {
|
|
||||||
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"W");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 57 && frameNo < 59) {
|
|
||||||
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"We");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 59 && frameNo < 61) {
|
|
||||||
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Wel");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 61 && frameNo < 63) {
|
|
||||||
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Welc");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 63 && frameNo < 65) {
|
|
||||||
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Welco");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 65 && frameNo < 67) {
|
|
||||||
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Welcom");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 67 && frameNo < 72) {
|
|
||||||
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Welcome");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 72 && frameNo < 74) {
|
|
||||||
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Welcome t");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 74 && frameNo < 79 ) {
|
|
||||||
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Welcome to");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 79 && frameNo < 91) {
|
|
||||||
//
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Welcome to");
|
|
||||||
|
|
||||||
--opacityCounter;
|
|
||||||
// std::cout << opacity << " " << opacityCounter << "\n";
|
|
||||||
opacity = 1.0/opacityCounter;
|
|
||||||
// std::cout << opacity << "\n";
|
|
||||||
painter.setOpacity(opacity);
|
|
||||||
painter.drawPixmap(150,85,100,100,logo);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 91 && frameNo < 106) {
|
|
||||||
//
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Welcome to");
|
|
||||||
|
|
||||||
painter.drawPixmap(150,85,100,100,logo);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(frameNo >= 106 && frameNo < 136) {
|
|
||||||
//
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Welcome to");
|
|
||||||
|
|
||||||
painter.drawPixmap(150,85,100,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 >= 136 && frameNo < 190) {
|
|
||||||
//
|
|
||||||
painter.setBrush(QColor(35,71,0));
|
|
||||||
painter.drawRect(0,0,399,249);
|
|
||||||
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing, TRUE);
|
|
||||||
painter.setFont(welcomeFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(48,27,300,45,4,"Welcome to");
|
|
||||||
|
|
||||||
painter.drawPixmap(150,85,100,100,logo);
|
|
||||||
|
|
||||||
painter.setFont(haveFont);
|
|
||||||
painter.setPen(QColor(255,255,255));
|
|
||||||
painter.drawText(3,190,390,40,4,"Have a lot of fun! ;-)");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//even draw version number
|
|
||||||
painter.setOpacity(1.0);
|
|
||||||
painter.setFont(versionFont);
|
|
||||||
painter.setPen(QColor(153,213,0));
|
|
||||||
painter.drawText(309,227,100,20,4,QString("Version %1").arg(POKERTH_BETA_RELEASE_STRING));
|
|
||||||
painter.setOpacity(opacity);
|
|
||||||
|
|
||||||
if(frameNo >=190) {
|
|
||||||
this->close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,32 +15,18 @@
|
|||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
|
||||||
class gameTableImpl;
|
|
||||||
class ConfigFile;
|
|
||||||
class StartSplash : public QSplashScreen
|
class StartSplash : public QSplashScreen
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
StartSplash(gameTableImpl *, ConfigFile*);
|
StartSplash(QPixmap& p);
|
||||||
|
|
||||||
~StartSplash();
|
~StartSplash();
|
||||||
|
|
||||||
int frameNo;
|
|
||||||
int opacityCounter;
|
|
||||||
qreal opacity;
|
|
||||||
|
|
||||||
void paintEvent(QPaintEvent * event);
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
void nextAnimationFrame();
|
void closeThis();
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
gameTableImpl *myW;
|
|
||||||
QString myAppDataPath;
|
|
||||||
QPixmap logo;
|
|
||||||
ConfigFile *myConfig;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -23,18 +23,22 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "chat.h"
|
#include "chat.h"
|
||||||
#include "gametableimpl.h"
|
#include "gametableimpl.h"
|
||||||
|
#include "startwindowimpl.h"
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
GuiWrapper::GuiWrapper(ConfigFile *c) : myLog(0), myW(0), myConfig(c)
|
GuiWrapper::GuiWrapper(ConfigFile *c) : myLog(NULL), myW(NULL), myConfig(c), myStartWindow(NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
myW = new gameTableImpl(myConfig);
|
myW = new gameTableImpl(myConfig);
|
||||||
myW->show();
|
myW->show();
|
||||||
myLog = new Log(myW, myConfig);
|
myLog = new Log(myW, myConfig);
|
||||||
|
|
||||||
|
myStartWindow = new startWindowImpl(myW, myConfig);
|
||||||
|
// myStartWindow-> show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
class Session;
|
class Session;
|
||||||
class gameTableImpl;
|
class gameTableImpl;
|
||||||
|
class startWindowImpl;
|
||||||
class Log;
|
class Log;
|
||||||
class Chat;
|
class Chat;
|
||||||
class ConfigFile;
|
class ConfigFile;
|
||||||
@@ -146,6 +147,7 @@ private:
|
|||||||
Chat *myChat;
|
Chat *myChat;
|
||||||
gameTableImpl *myW;
|
gameTableImpl *myW;
|
||||||
ConfigFile *myConfig;
|
ConfigFile *myConfig;
|
||||||
|
startWindowImpl *myStartWindow;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+9
-5
@@ -18,18 +18,17 @@
|
|||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/////// can be removed for non-qt-guis ////////////
|
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <QMacStyle>
|
#include <QMacStyle>
|
||||||
#endif
|
#endif
|
||||||
///////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#include "session.h"
|
#include "session.h"
|
||||||
#include "guiwrapper.h"
|
#include "guiwrapper.h"
|
||||||
#include "startwindowimpl.h"
|
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
|
#include "startsplash.h"
|
||||||
|
#include "game_defs.h"
|
||||||
#include <net/socket_startup.h>
|
#include <net/socket_startup.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@@ -105,6 +104,12 @@ int main( int argc, char **argv )
|
|||||||
// #endif
|
// #endif
|
||||||
a.setStyleSheet("QApplication, QWidget, QDialog { " + font1String + " font-size: 12px; }");
|
a.setStyleSheet("QApplication, QWidget, QDialog { " + font1String + " font-size: 12px; }");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QPixmap *pixmap = new QPixmap(myAppDataPath + "gfx/gui/misc/welcomepokerth.png");
|
||||||
|
StartSplash splash(*pixmap);
|
||||||
|
splash.show();
|
||||||
|
splash.showMessage(QString("Version %1").arg(POKERTH_BETA_RELEASE_STRING), 0x0042, QColor(153,213,0));
|
||||||
|
|
||||||
//Set translations
|
//Set translations
|
||||||
QTranslator qtTranslator;
|
QTranslator qtTranslator;
|
||||||
qtTranslator.load(QString(myAppDataPath +"translations/qt_") + QString::fromStdString(myConfig->readConfigString("Language")));
|
qtTranslator.load(QString(myAppDataPath +"translations/qt_") + QString::fromStdString(myConfig->readConfigString("Language")));
|
||||||
@@ -135,11 +140,10 @@ int main( int argc, char **argv )
|
|||||||
myGuiInterface->setSession(session);
|
myGuiInterface->setSession(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
// boost::shared_ptr<startWindowImpl> myStartWindow(new startWindowImpl(myGuiInterface.get(), myConfig));
|
|
||||||
|
|
||||||
int retVal = a.exec();
|
int retVal = a.exec();
|
||||||
|
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
socket_cleanup();
|
socket_cleanup();
|
||||||
return retVal;
|
return retVal;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user