"+round+"
"); - textLabel_gameNumber->setText("Game: "+QString::number(actualHand->getMyID(),10)+"
"); + textLabel_gameNumber->setText("Hand: "+QString::number(actualHand->getMyID(),10)+"
"); } @@ -465,7 +453,7 @@ void mainWindowImpl::dealFlopCards0() { if( !newRoundTimerBlock ){ - QTimer::singleShot(500, this, SLOT( dealFlopCards1() )); + QTimer::singleShot(dealCardsSpeed*2, this, SLOT( dealFlopCards1() )); } else { newRoundTimerBlock=FALSE; } } @@ -554,11 +542,11 @@ if( !newRoundTimerBlock ){ // stable // wenn alle All In if(actualHand->getAllInCondition()) { - QTimer::singleShot(1000, this, SLOT( handSwitchRounds() )); + QTimer::singleShot(dealCardsSpeed*4, this, SLOT( handSwitchRounds() )); } // sonst normale Variante else { - QTimer::singleShot(1, this, SLOT( handSwitchRounds() )); + QTimer::singleShot(dealCardsSpeed, this, SLOT( handSwitchRounds() )); } } @@ -571,7 +559,7 @@ void mainWindowImpl::dealTurnCards0() { if( !newRoundTimerBlock ){ - QTimer::singleShot(500, this, SLOT( dealTurnCards1() )); + QTimer::singleShot(dealCardsSpeed*2, this, SLOT( dealTurnCards1() )); } else { newRoundTimerBlock=FALSE; } } @@ -603,11 +591,11 @@ if( !newRoundTimerBlock ){ // stable // wenn alle All In if(actualHand->getAllInCondition()) { - QTimer::singleShot(1000, this, SLOT( handSwitchRounds() )); + QTimer::singleShot(dealCardsSpeed*4, this, SLOT( handSwitchRounds() )); } // sonst normale Variante else { - QTimer::singleShot(1, this, SLOT( handSwitchRounds() )); + QTimer::singleShot(dealCardsSpeed, this, SLOT( handSwitchRounds() )); } } else { newRoundTimerBlock=FALSE; } @@ -619,7 +607,7 @@ void mainWindowImpl::dealRiverCards0() { if( !newRoundTimerBlock ){ - QTimer::singleShot(500, this, SLOT( dealRiverCards1() )); + QTimer::singleShot(dealCardsSpeed*2, this, SLOT( dealRiverCards1() )); } else { newRoundTimerBlock=FALSE; } } @@ -652,11 +640,11 @@ if( !newRoundTimerBlock ){ // stable // wenn alle All In if(actualHand->getAllInCondition()) { - QTimer::singleShot(1000, this, SLOT( handSwitchRounds() )); + QTimer::singleShot(dealCardsSpeed*4, this, SLOT( handSwitchRounds() )); } // sonst normale Variante else { - QTimer::singleShot(1, this, SLOT( handSwitchRounds() )); + QTimer::singleShot(dealCardsSpeed, this, SLOT( handSwitchRounds() )); } } @@ -762,6 +750,9 @@ void mainWindowImpl::myFold(){ actualHand->getPlayerArray()[0]->setMyAction(1); actualHand->getPlayerArray()[0]->setMyTurn(0); + //Action in LogWindow + myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + disableMyButtons(); //Spiel läuft weiter @@ -773,6 +764,9 @@ void mainWindowImpl::myCheck() { actualHand->getPlayerArray()[0]->setMyAction(2); actualHand->getPlayerArray()[0]->setMyTurn(0); + //Action in LogWindow + myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + disableMyButtons(); //Spiel läuft weiter @@ -809,6 +803,9 @@ void mainWindowImpl::myCall(){ actualHand->getBoard()->collectSets(); refreshPot(); + //Action in LogWindow + myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + disableMyButtons(); //Spiel läuft weiter @@ -909,6 +906,9 @@ void mainWindowImpl::mySet(){ actualHand->getBoard()->collectSets(); refreshPot(); + //Action in LogWindow + myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + disableMyButtons(); //Spiel läuft weiter @@ -939,8 +939,11 @@ void mainWindowImpl::myAllIn(){ actualHand->getBoard()->collectSets(); refreshPot(); - disableMyButtons(); + //Action in LogWindow + myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + disableMyButtons(); + //Spiel läuft weiter nextPlayerAnimation(); } @@ -1173,11 +1176,16 @@ else { newRoundTimerBlock=FALSE; } void mainWindowImpl::startNewHand() { -if( !newRoundTimerBlock ){ +if( !newRoundTimerBlock && !breakAfterActualHand){ actualGame->startHand(); } -else { newRoundTimerBlock=FALSE; } +else { + newRoundTimerBlock=FALSE; + pushButton_break->setDisabled(FALSE); + breakAfterActualHand=FALSE; +} + } @@ -1257,3 +1265,10 @@ void mainWindowImpl::setSpeeds() { nextPlayerSpeed3 = gameSpeed*7; // Zeit bis zwischen Aufhellen und Aktion preflopNextPlayerSpeed = gameSpeed*10; // Zeit bis zwischen Aufhellen und Aktion im Preflop (etwas langsamer da nicht gerechnet wird. ) } + +void mainWindowImpl::breakAfterThisHand() { + + pushButton_break->setDisabled(TRUE); + breakAfterActualHand=TRUE; +} + diff --git a/src/gui/qt/mainwindowimpl.h b/src/gui/qt/mainwindowimpl.h index 538adcfa..66484fc2 100755 --- a/src/gui/qt/mainwindowimpl.h +++ b/src/gui/qt/mainwindowimpl.h @@ -29,6 +29,7 @@ class Game; class Session; +class Log; class BoardInterface; class HandInterface; @@ -41,10 +42,11 @@ class mainWindowImpl: public QMainWindow, public Ui::mainWindow { Q_OBJECT public: mainWindowImpl(QMainWindow *parent = 0, const char *name = 0 ); + void setGame(Game*); void setHand(HandInterface*); void setSession(Session*); - + void setLog(Log*); int getMaxQuantityPlayers() const { return maxQuantityPlayers; } @@ -150,12 +152,14 @@ public slots: void userWidgetsBackgroudColor(); void timerBlockerFalse(); + void breakAfterThisHand(); private: Game *actualGame; HandInterface *actualHand; Session *mySession; + Log *myLog; QTimer *potDistributeTimer; @@ -200,6 +204,7 @@ private: bool firstCallNewGame; bool newRoundTimerBlock; bool debugMode; + bool breakAfterActualHand; QColor active; QColor inactive;