This commit is contained in:
+2
-2
@@ -78,8 +78,8 @@ SOURCES += pokerth.cpp \
|
|||||||
TEMPLATE = vcapp
|
TEMPLATE = vcapp
|
||||||
RESOURCES = src/gui/qt/deck.qrc
|
RESOURCES = src/gui/qt/deck.qrc
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
DEPENDPATH += . src uics src/config src/config/tinyxml src/gui src/gui/qt src/engine src/engine/local_engine src/engine/network_engine
|
DEPENDPATH += . src uics src/config src/config/tinyxml src/gui src/gui/qt src/gui/qt/startsplash src/engine src/engine/local_engine src/engine/network_engine
|
||||||
INCLUDEPATH += . src uics src/config src/config/tinyxml src/gui src/gui/qt src/engine src/engine/local_engine src/engine/network_engine
|
INCLUDEPATH += . src uics src/config src/config/tinyxml src/gui src/gui/qt src/gui/qt/startsplash src/engine src/engine/local_engine src/engine/network_engine
|
||||||
CONFIG += qt release
|
CONFIG += qt release
|
||||||
UI_DIR = uics
|
UI_DIR = uics
|
||||||
TARGET = bin/pokerth
|
TARGET = bin/pokerth
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<qresource prefix="/graphics" >
|
<qresource prefix="/graphics" >
|
||||||
<file>cards/dealerbutton.png</file>
|
<file>cards/dealerbutton.png</file>
|
||||||
<file>cards/logo1-140x100_neu.png</file>
|
<file>cards/logo1-140x100_neu.png</file>
|
||||||
|
<file>graphics/logo-140-100.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/mycards" >
|
<qresource prefix="/mycards" >
|
||||||
<file>cards/mycards/0.png</file>
|
<file>cards/mycards/0.png</file>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include "newgamedialogimpl.h"
|
#include "newgamedialogimpl.h"
|
||||||
#include "aboutpokerthimpl.h"
|
#include "aboutpokerthimpl.h"
|
||||||
#include "settingsdialogimpl.h"
|
#include "settingsdialogimpl.h"
|
||||||
|
#include "startsplash.h"
|
||||||
|
|
||||||
#include "handinterface.h"
|
#include "handinterface.h"
|
||||||
#include "playerinterface.h"
|
#include "playerinterface.h"
|
||||||
@@ -1380,33 +1381,33 @@ void mainWindowImpl::breakButtonClicked() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mainWindowImpl::paintStartSplash() {
|
||||||
|
|
||||||
|
StartSplash *mySplash = new StartSplash();
|
||||||
|
|
||||||
|
mySplash->setGeometry(0,0,300,200);
|
||||||
|
mySplash->setWindowFlags(Qt::SplashScreen);
|
||||||
|
mySplash->show();
|
||||||
|
|
||||||
|
// QTimer *timer = new QTimer(this);
|
||||||
|
// connect(timer, SIGNAL(timeout()), mySplash, SLOT(/*StartSp*/lash::nextAnimationFrame()));
|
||||||
|
// timer->start(100);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
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(); }
|
||||||
if (event->key() == 65) {
|
if (event->key() == 65) {
|
||||||
|
paintStartSplash();
|
||||||
|
|
||||||
QWidget *myWidget = new QWidget(this, Qt::SplashScreen);
|
|
||||||
myWidget->setGeometry(100,100,100,100);
|
|
||||||
// myWidget->setMask(QRegion(3,3,40,40));
|
|
||||||
myWidget->show();
|
|
||||||
|
|
||||||
// QPicture picture;
|
|
||||||
QPainter painter(this);
|
|
||||||
// painter.begin(this); // paint in picture
|
|
||||||
painter.drawEllipse(10,20, 80,70); // draw an ellipse
|
|
||||||
painter.end();
|
|
||||||
}
|
}
|
||||||
if (event->key() == 66) {
|
if (event->key() == 66) {
|
||||||
|
|
||||||
// myWidget->hide();
|
|
||||||
|
|
||||||
/*QPicture picture;
|
|
||||||
QPainter painter;
|
|
||||||
painter.begin(this); // paint in picture
|
|
||||||
painter.drawEllipse(10,20, 80,70); // draw an ellipse
|
|
||||||
painter.end(); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ public slots:
|
|||||||
void keyPressEvent ( QKeyEvent * event );
|
void keyPressEvent ( QKeyEvent * event );
|
||||||
void switchToolBox();
|
void switchToolBox();
|
||||||
|
|
||||||
|
void paintStartSplash();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,12 @@
|
|||||||
StartSplash::StartSplash()
|
StartSplash::StartSplash()
|
||||||
: QWidget()
|
: QWidget()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
frameNo = 0;
|
||||||
|
|
||||||
|
QTimer *timer = new QTimer;
|
||||||
|
connect(timer, SIGNAL(timeout()), this, SLOT(nextAnimationFrame()));
|
||||||
|
timer->start(40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -21,4 +27,27 @@ StartSplash::~StartSplash()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StartSplash::nextAnimationFrame() {
|
||||||
|
|
||||||
|
++frameNo;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartSplash::paintEvent(QPaintEvent * event) {
|
||||||
|
|
||||||
|
QPainter painter(this);
|
||||||
|
|
||||||
|
if(frameNo < 51) {
|
||||||
|
|
||||||
|
painter.setBrush(QColor(0+frameNo,40+frameNo,6+frameNo));
|
||||||
|
painter.drawRect(0,0,299,199);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(frameNo >= 51) {
|
||||||
|
|
||||||
|
painter.setBrush(QColor(51,91,57));
|
||||||
|
painter.drawRect(0,0,299,199);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,18 +12,25 @@
|
|||||||
#ifndef STARTSPLASH_H
|
#ifndef STARTSPLASH_H
|
||||||
#define STARTSPLASH_H
|
#define STARTSPLASH_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QtGui>
|
||||||
|
#include <QtCore>
|
||||||
|
|
||||||
/**
|
|
||||||
@author FThauer FHammer <f.thauer@web.de>
|
|
||||||
*/
|
|
||||||
class StartSplash : public QWidget
|
class StartSplash : public QWidget
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
StartSplash();
|
StartSplash();
|
||||||
|
|
||||||
~StartSplash();
|
~StartSplash();
|
||||||
|
|
||||||
|
int frameNo;
|
||||||
|
|
||||||
|
void paintEvent(QPaintEvent * event);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
void nextAnimationFrame();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user