timoutcallback to mainwindow

This commit is contained in:
doitux
2007-05-30 07:21:24 +00:00
parent ba82acbd06
commit 1f70aeeefe
4 changed files with 28 additions and 3 deletions
+10 -1
View File
@@ -364,6 +364,7 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
setLabelArray[4] = textLabel_Set4;
setLabelArray[5] = textLabel_Set5;
setLabelArray[6] = textLabel_Set6;
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) { setLabelArray[i]->setMyW(this); }
// statusLabelArray init
actionLabelArray[0] = textLabel_Status0;
@@ -1762,6 +1763,15 @@ void mainWindowImpl::myAllIn(){
myActionDone();
}
void mainWindowImpl::userActionTimeOutReached() {
//TODO
// automatic check, fold
cout << "timeoutaction" << endl;
}
void mainWindowImpl::myActionDone() {
// If a network client is running, we need
@@ -2624,4 +2634,3 @@ void mainWindowImpl::playSound() {
}
+2
View File
@@ -251,6 +251,8 @@ public slots:
void localGameModification();
void networkGameModification();
void userActionTimeOutReached();
//SOUND TESTING
void playSound();
void musicDone();
+8 -2
View File
@@ -11,7 +11,9 @@
//
#include "mysetlabel.h"
// using namespace std;
#include "mainwindowimpl.h"
using namespace std;
MySetLabel::MySetLabel(QGroupBox* parent)
: QLabel(parent), timeOutAnimation(FALSE), timeOutValue(0), timeOutFrame(0)
@@ -54,7 +56,11 @@ void MySetLabel::nextTimeOutAnimationFrame() {
timeOutFrame++;
update();
}
else stopTimeOutAnimation();
else {
stopTimeOutAnimation();
//callback
myW->userActionTimeOutReached();
}
}
+8
View File
@@ -17,6 +17,9 @@
#include <iostream>
class mainWindowImpl;
class MySetLabel : public QLabel
{
Q_OBJECT
@@ -25,6 +28,9 @@ public:
~MySetLabel();
void setMyW ( mainWindowImpl* theValue ) { myW = theValue; }
void startTimeOutAnimation(int secs);
void stopTimeOutAnimation();
@@ -33,9 +39,11 @@ public:
public slots:
void nextTimeOutAnimationFrame();
private:
mainWindowImpl *myW;
QTimer *timeOutAnimationTimer;
bool timeOutAnimation;