diff --git a/src/gui/qt/mainwindow.ui b/src/gui/qt/mainwindow.ui
index 0c47ff34..d599fb75 100644
--- a/src/gui/qt/mainwindow.ui
+++ b/src/gui/qt/mainwindow.ui
@@ -1567,7 +1567,7 @@
5
-
-
+
@@ -1605,6 +1605,9 @@
+
+ 1
+
10
@@ -4028,7 +4031,7 @@
pushButton_set
spinBox_set
pushButton_allin
- horizontalSlider
+ horizontalSlider_speed
pushButton
tabWidget
textBrowser_Log
@@ -4038,7 +4041,7 @@
- horizontalSlider
+ horizontalSlider_speed
valueChanged(int)
label_2
setNum(int)
diff --git a/src/gui/qt/mainwindowimpl.cpp b/src/gui/qt/mainwindowimpl.cpp
index 255aeb75..36fa3fff 100755
--- a/src/gui/qt/mainwindowimpl.cpp
+++ b/src/gui/qt/mainwindowimpl.cpp
@@ -44,7 +44,7 @@ const int maxQuantityPlayersConst = 5;
using namespace std;
mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
- : QMainWindow(parent, name), actualGame(0), actualHand(0), mySession(0), maxQuantityPlayers(maxQuantityPlayersConst), gameSpeed(1), debugMode(0)
+ : QMainWindow(parent, name), actualGame(0), actualHand(0), mySession(0), maxQuantityPlayers(maxQuantityPlayersConst), gameSpeed(0), debugMode(0)
{
setupUi(this);
@@ -81,6 +81,26 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
//Timer Objekt erstellen
potDistributeTimer = new QTimer(this);
+
+// gameSpeed = new int;
+// dealCardsSpeed = new int;
+// postRiverRunAnimationSpeed = new int;
+// winnerBlinkSpeed = new int;
+// newRoundSpeed = new int;
+// nextPlayerSpeed1 = new int;
+// nextPlayerSpeed2 = new int;
+// nextPlayerSpeed3 = new int;
+// preflopNextPlayerSpeed = new int;
+// nextOpponentSpeed = new int;
+// // int *dealCardsSpeed;
+// // int *postRiverRunAnimationSpeed;
+// // int *winnerBlinkSpeed;
+// // int *newRoundSpeed;
+// // int *nextPlayerSpeed1;
+// // int *nextPlayerSpeed2;
+// // int *nextPlayerSpeed3;
+// // int *preflopNextPlayerSpeed;
+// // int *nextOpponentSpeed;
// buttonLabelArray init
@@ -166,8 +186,8 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
connect( pushButton_fold, SIGNAL( clicked() ), this, SLOT( myFold() ) );
connect( pushButton_check, SIGNAL( clicked() ), this, SLOT( myCheck() ) );
connect( pushButton_allin, SIGNAL( clicked() ), this, SLOT( myAllIn() ) );
-
-// connect ( horizontalSlider_speed, (SIGNAL( valueChanged(int value), this, SLOT textLabel_speedSlider
+
+ connect ( horizontalSlider_speed, SIGNAL( valueChanged(int)), this, SLOT ( setGameSpeed(int) ) );
// tabWidget_2->hide();
}
@@ -198,15 +218,9 @@ void mainWindowImpl::callNewGameDialog() {
// debugMode = v->checkBox_debugMode->isChecked();
//Speeds
- dealCardsSpeed = (gameSpeed/2)*10; //milliseconds
- postRiverRunAnimationSpeed = gameSpeed*18;
- winnerBlinkSpeed = gameSpeed*3; //milliseconds
- newRoundSpeed = gameSpeed*35;
- nextPlayerSpeed1 = 10; // Zeit zwischen dem Setzen des Spielers und dem Verdunkeln
- nextPlayerSpeed2 = 4; // Zeit zwischen Verdunkeln des einen und aufhellen des anderen Spielers
- nextPlayerSpeed3 = 7; // Zeit bis zwischen Aufhellen und Aktion
- preflopNextPlayerSpeed = 10; // Zeit bis zwischen Aufhellen und Aktion im Preflop (etwas langsamer da nicht gerechnet wird. )
-
+ setSpeeds();
+
+ //Start Game!!!
mySession->startGame(v->spinBox_quantityPlayers->value(), v->spinBox_startCash->value(), v->spinBox_smallBlind->value());
}
@@ -934,38 +948,38 @@ void mainWindowImpl::nextPlayerAnimation() {
refreshChangePlayer();
//weiter mit switchrounds in Hand
- QTimer::singleShot(gameSpeed*nextPlayerSpeed1, this, SLOT( handSwitchRounds() ));
+ QTimer::singleShot(nextPlayerSpeed1, this, SLOT( handSwitchRounds() ));
}
-void mainWindowImpl::preflopAnimation1() { QTimer::singleShot(gameSpeed*nextPlayerSpeed2, this, SLOT(preflopAnimation1Action())); }
+void mainWindowImpl::preflopAnimation1() { QTimer::singleShot(nextPlayerSpeed2, this, SLOT(preflopAnimation1Action())); }
void mainWindowImpl::preflopAnimation1Action() { actualHand->getPreflop()->preflopRun(); }
-void mainWindowImpl::preflopAnimation2() { QTimer::singleShot(gameSpeed*preflopNextPlayerSpeed, this, SLOT(preflopAnimation2Action())); }
+void mainWindowImpl::preflopAnimation2() { QTimer::singleShot(preflopNextPlayerSpeed, this, SLOT(preflopAnimation2Action())); }
void mainWindowImpl::preflopAnimation2Action() { actualHand->getPreflop()->nextPlayer2(); }
-void mainWindowImpl::flopAnimation1() { QTimer::singleShot(gameSpeed*nextPlayerSpeed2, this, SLOT(flopAnimation1Action())); }
+void mainWindowImpl::flopAnimation1() { QTimer::singleShot(nextPlayerSpeed2, this, SLOT(flopAnimation1Action())); }
void mainWindowImpl::flopAnimation1Action() { actualHand->getFlop()->flopRun(); }
-void mainWindowImpl::flopAnimation2() { QTimer::singleShot(gameSpeed*nextPlayerSpeed3, this, SLOT(flopAnimation2Action())); }
+void mainWindowImpl::flopAnimation2() { QTimer::singleShot(nextPlayerSpeed3, this, SLOT(flopAnimation2Action())); }
void mainWindowImpl::flopAnimation2Action() { actualHand->getFlop()->nextPlayer2(); }
-void mainWindowImpl::turnAnimation1() { QTimer::singleShot(gameSpeed*nextPlayerSpeed2, this, SLOT(turnAnimation1Action())); }
+void mainWindowImpl::turnAnimation1() { QTimer::singleShot(nextPlayerSpeed2, this, SLOT(turnAnimation1Action())); }
void mainWindowImpl::turnAnimation1Action() { actualHand->getTurn()->turnRun(); }
-void mainWindowImpl::turnAnimation2() { QTimer::singleShot(gameSpeed*nextPlayerSpeed3, this, SLOT(turnAnimation2Action())); }
+void mainWindowImpl::turnAnimation2() { QTimer::singleShot(nextPlayerSpeed3, this, SLOT(turnAnimation2Action())); }
void mainWindowImpl::turnAnimation2Action() { actualHand->getTurn()->nextPlayer2(); }
-void mainWindowImpl::riverAnimation1() { QTimer::singleShot(gameSpeed*nextPlayerSpeed2, this, SLOT(riverAnimation1Action())); }
+void mainWindowImpl::riverAnimation1() { QTimer::singleShot(nextPlayerSpeed2, this, SLOT(riverAnimation1Action())); }
void mainWindowImpl::riverAnimation1Action() { actualHand->getRiver()->riverRun(); }
-void mainWindowImpl::riverAnimation2() { QTimer::singleShot(gameSpeed*nextPlayerSpeed3, this, SLOT(riverAnimation2Action())); }
+void mainWindowImpl::riverAnimation2() { QTimer::singleShot(nextPlayerSpeed3, this, SLOT(riverAnimation2Action())); }
void mainWindowImpl::riverAnimation2Action() { actualHand->getRiver()->nextPlayer2(); }
-void mainWindowImpl::postRiverAnimation1() { QTimer::singleShot(gameSpeed*nextPlayerSpeed2, this, SLOT(postRiverAnimation1Action())); }
+void mainWindowImpl::postRiverAnimation1() { QTimer::singleShot(nextPlayerSpeed2, this, SLOT(postRiverAnimation1Action())); }
void mainWindowImpl::postRiverAnimation1Action() { actualHand->getRiver()->postRiverRun(); }
@@ -1229,3 +1243,15 @@ void mainWindowImpl::timerBlockerFalse() {
newRoundTimerBlock=FALSE;
}
+
+void mainWindowImpl::setSpeeds() {
+
+ dealCardsSpeed = (gameSpeed/2)*10; //milliseconds
+ postRiverRunAnimationSpeed = gameSpeed*18;
+ winnerBlinkSpeed = gameSpeed*3; //milliseconds
+ newRoundSpeed = gameSpeed*35;
+ nextPlayerSpeed1 = gameSpeed*10; // Zeit zwischen dem Setzen des Spielers und dem Verdunkeln
+ nextPlayerSpeed2 = gameSpeed*4; // Zeit zwischen Verdunkeln des einen und aufhellen des anderen Spielers
+ 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. )
+}
diff --git a/src/gui/qt/mainwindowimpl.h b/src/gui/qt/mainwindowimpl.h
index 7160ec19..538adcfa 100755
--- a/src/gui/qt/mainwindowimpl.h
+++ b/src/gui/qt/mainwindowimpl.h
@@ -48,12 +48,17 @@ public:
int getMaxQuantityPlayers() const { return maxQuantityPlayers; }
- int getGameSpeed() const { return gameSpeed; }
- int getPreflopNextPlayerSpeed() const { return preflopNextPlayerSpeed; }
- int getNextPlayerSpeed1() const { return nextPlayerSpeed1; }
- int getNextPlayerSpeed2() const { return nextPlayerSpeed2; }
- int getNextPlayerSpeed3() const { return nextPlayerSpeed3; }
+// int getGameSpeed() const { return gameSpeed; }
+
+// int getPreflopNextPlayerSpeed() const { return preflopNextPlayerSpeed; }
+// int getNextPlayerSpeed1() const { return nextPlayerSpeed1; }
+// int getNextPlayerSpeed2() const { return nextPlayerSpeed2; }
+// int getNextPlayerSpeed3() const { return nextPlayerSpeed3; }
+
+
+
+
//refresh-Funktionen
void refreshSet();
void refreshButton();
@@ -74,8 +79,12 @@ public:
void highlightRoundLabel(std::string);
+ void setSpeeds();
+
public slots:
+ void setGameSpeed(const int theValue) { gameSpeed = theValue*10; setSpeeds(); } // Achtung Faktor 10!!!
+
void callNewGameDialog() ;
void callAboutPokerthDialog();
void myFold();
@@ -142,7 +151,6 @@ public slots:
void userWidgetsBackgroudColor();
void timerBlockerFalse();
-
private:
Game *actualGame;
@@ -177,6 +185,17 @@ private:
int nextPlayerSpeed3;
int preflopNextPlayerSpeed;
int nextOpponentSpeed;
+/*
+ int *gameSpeed;
+ int *dealCardsSpeed;
+ int *postRiverRunAnimationSpeed;
+ int *winnerBlinkSpeed;
+ int *newRoundSpeed;
+ int *nextPlayerSpeed1;
+ int *nextPlayerSpeed2;
+ int *nextPlayerSpeed3;
+ int *preflopNextPlayerSpeed;
+ int *nextOpponentSpeed; */
bool firstCallNewGame;
bool newRoundTimerBlock;