diff --git a/src/gui/qt/changecompleteblindsdialog.ui b/src/gui/qt/changecompleteblindsdialog.ui
new file mode 100644
index 00000000..549afc1e
--- /dev/null
+++ b/src/gui/qt/changecompleteblindsdialog.ui
@@ -0,0 +1,359 @@
+
+ changeCompleteBlindsDialog
+
+
+
+ 0
+ 0
+ 435
+ 397
+
+
+
+ Change Blinds Settings
+
+
+ -
+
+
-
+
+
+ First small blind:
+
+
+
+ -
+
+
+ 5
+
+
+ 500
+
+
+
+
+
+ -
+
+
+ Raise blinds:
+
+
+
+ 9
+
+
+ 0
+
+
+ 9
+
+
-
+
+
+ Every:
+
+
+ true
+
+
+
+ -
+
+
+ 1
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ hands
+
+
+
+ -
+
+
+ Every:
+
+
+
+ -
+
+
+ 1
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ minutes
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Raise mode:
+
+
+
+ 0
+
+
-
+
+
+ Always double blinds
+
+
+ true
+
+
+
+ -
+
+
+ Manual blinds order:
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+ Manual blinds order:
+
+
+
-
+
+
+ 4
+
+
-
+
+
+ -
+
+
+ Delete
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 121
+
+
+
+
+ -
+
+
+ 9999
+
+
+
+ -
+
+
+ Add
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
+ After this:
+
+
+
+ 2
+
+
+ 2
+
+
-
+
+
+ Always double blinds
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+ Always raise about:
+
+
+
+ -
+
+
+ -
+
+
+ $
+
+
+
+
+
+ -
+
+
+ Stay at last blind
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok
+
+
+
+
+
+
+ listWidget_blinds
+ spinBox_input
+ pushButton_add
+ pushButton_delete
+ radioButton_afterThisAlwaysDoubleBlinds
+ radioButton_afterThisAlwaysRaiseAbout
+ spinBox_afterThisAlwaysRaiseValue
+ radioButton_afterThisStayAtLastBlind
+ buttonBox
+
+
+
+
+ buttonBox
+ accepted()
+ changeCompleteBlindsDialog
+ accept()
+
+
+ 237
+ 387
+
+
+ 157
+ 274
+
+
+
+
+ buttonBox
+ rejected()
+ changeCompleteBlindsDialog
+ reject()
+
+
+ 279
+ 387
+
+
+ 286
+ 274
+
+
+
+
+ radioButton_afterThisAlwaysRaiseAbout
+ toggled(bool)
+ spinBox_afterThisAlwaysRaiseValue
+ setEnabled(bool)
+
+
+ 327
+ 302
+
+
+ 389
+ 304
+
+
+
+
+ radioButton_manualBlindsOrder
+ toggled(bool)
+ groupBox_2
+ setEnabled(bool)
+
+
+ 297
+ 116
+
+
+ 306
+ 164
+
+
+
+
+
diff --git a/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.cpp b/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.cpp
new file mode 100644
index 00000000..134629b4
--- /dev/null
+++ b/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.cpp
@@ -0,0 +1,77 @@
+/***************************************************************************
+ * Copyright (C) 2006 by FThauer FHammer *
+ * f.thauer@web.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include "changecompleteblindsdialogimpl.h"
+#include "configfile.h"
+#include
+
+
+changeCompleteBlindsDialogImpl::changeCompleteBlindsDialogImpl(QWidget *parent, ConfigFile *c)
+ : QDialog(parent), myConfig(c), settingsCorrect(TRUE)
+{
+
+ setupUi(this);
+
+ connect( pushButton_add, SIGNAL( clicked() ), this, SLOT( addBlindValueToList() ) );
+ connect( pushButton_delete, SIGNAL( clicked() ), this, SLOT( removeBlindFromList() ) );
+
+}
+
+void changeCompleteBlindsDialogImpl::exec() {
+
+
+ QDialog::exec();
+}
+
+
+void changeCompleteBlindsDialogImpl::addBlindValueToList() {
+
+ listWidget_blinds->addItem(QString::number(spinBox_input->value(),10));
+ sortBlindsList();
+}
+
+void changeCompleteBlindsDialogImpl::removeBlindFromList() {
+
+ listWidget_blinds->takeItem(listWidget_blinds->currentRow());
+ sortBlindsList();
+}
+
+void changeCompleteBlindsDialogImpl::sortBlindsList() {
+
+ int i;
+ QList tempIntList;
+ QStringList tempStringList;
+ bool ok = TRUE;
+
+ for(i=0; icount(); i++) {
+// std::cout << listWidget_blinds->item(i)->text().toInt(&ok,10) << "\n";
+ tempIntList << listWidget_blinds->item(i)->text().toInt(&ok,10);
+ }
+
+ qStableSort(tempIntList.begin(), tempIntList.end());
+//
+ for(i=0; iclear();
+ listWidget_blinds->addItems(tempStringList);
+}
diff --git a/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.h b/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.h
new file mode 100644
index 00000000..e155950f
--- /dev/null
+++ b/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.h
@@ -0,0 +1,52 @@
+/***************************************************************************
+ * Copyright (C) 2006 by FThauer FHammer *
+ * f.thauer@web.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef CHANGECOMPLETEBLINDSDIALOGIMPL_H
+#define CHANGECOMPLETEBLINDSDIALOGIMPL_H
+
+#include "ui_changecompleteblindsdialog.h"
+
+#include
+#include
+
+class ConfigFile;
+
+class changeCompleteBlindsDialogImpl: public QDialog, public Ui::changeCompleteBlindsDialog {
+Q_OBJECT
+public:
+ changeCompleteBlindsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
+
+ void exec();
+
+
+public slots:
+ bool getSettingsCorrect() const { return settingsCorrect;}
+
+ void addBlindValueToList();
+ void removeBlindFromList();
+ void sortBlindsList();
+
+private:
+
+ ConfigFile* myConfig;
+
+ bool settingsCorrect;
+};
+
+#endif
diff --git a/src/gui/qt/createinternetgamedialog.ui b/src/gui/qt/createinternetgamedialog.ui
index ba8d5517..2f6056ef 100644
--- a/src/gui/qt/createinternetgamedialog.ui
+++ b/src/gui/qt/createinternetgamedialog.ui
@@ -5,12 +5,12 @@
0
0
- 303
- 316
+ 277
+ 341
- Create Game
+ Create Internet Game
@@ -34,68 +34,13 @@
-
- Game Settings
+ Internet Game Settings
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
-
- 6
-
-
-
-
+
-
+
- Game Speed for computer opponents:
-
-
-
- -
-
-
- 1
-
-
- 9
-
-
-
- -
-
-
- Hands before raise blinds:
-
-
-
- -
-
-
- Timeout for player action (sec):
-
-
-
- -
-
-
- 5
-
-
- 60
-
-
- 20
+ Maximum number of players:
@@ -112,6 +57,13 @@
+ -
+
+
+ Start Cash:
+
+
+
-
@@ -125,41 +77,43 @@
- -
-
+
-
+
+
+ Blinds
+
+
+
+ 0
+
+
-
+
+
+ Use saved blinds settings
+
+
+ true
+
+
+
+ -
+
+
+ Change blinds settings ...
+
+
+
+
+
+
+ -
+
- Maximum number of players:
+ Game Speed for computer opponents:
- -
-
-
- Start Cash:
-
-
-
- -
-
-
- Small Blind:
-
-
-
- -
-
-
- 5
-
-
- 500
-
-
- 10
-
-
-
- -
+
-
1
@@ -172,7 +126,27 @@
- -
+
-
+
+
+ Timeout for player action (sec):
+
+
+
+ -
+
+
+ 5
+
+
+ 60
+
+
+ 20
+
+
+
+ -
6
@@ -262,8 +236,6 @@
spinBox_quantityPlayers
spinBox_startCash
- spinBox_smallBlind
- spinBox_handsBeforeRaiseSmallBlind
spinBox_gameSpeed
spinBox_netTimeOutPlayerAction
pushButton_createGame
diff --git a/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp b/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp
index a56938fb..6ca2e881 100644
--- a/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp
+++ b/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp
@@ -20,6 +20,8 @@
#include "createinternetgamedialogimpl.h"
#include "session.h"
#include "configfile.h"
+#include "changecompleteblindsdialogimpl.h"
+
createInternetGameDialogImpl::createInternetGameDialogImpl(QWidget *parent, ConfigFile *c)
: QDialog(parent), myConfig(c)
@@ -27,11 +29,13 @@ createInternetGameDialogImpl::createInternetGameDialogImpl(QWidget *parent, Conf
setupUi(this);
+ myChangeCompleteBlindsDialog = new changeCompleteBlindsDialogImpl;
+
fillFormular();
+ connect( radioButton_changeBlindsSettings, SIGNAL( clicked(bool) ), this, SLOT( callChangeBlindsDialog(bool) ) );
connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
-
connect( checkBox_Password, SIGNAL( toggled(bool) ), this, SLOT( clearGamePassword(bool)) );
//temporarely unused until ai is enabled in network
// label_5->hide();
@@ -60,8 +64,6 @@ void createInternetGameDialogImpl::fillFormular() {
//Network Game Settings
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
- spinBox_smallBlind->setValue(myConfig->readConfigInt("NetFirstSmallBlind"));
- spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("NetRaiseSmallBlindEveryHands"));
//temporarely unused until ai is enabled in network
spinBox_gameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
@@ -70,6 +72,30 @@ void createInternetGameDialogImpl::fillFormular() {
lineEdit_Password->setText(QString::fromUtf8(myConfig->readConfigString("InternetGamePassword").c_str()));
}
+ //fill changeCompleteBlindsDialog
+ myChangeCompleteBlindsDialog->spinBox_firstSmallBlind->setValue(myConfig->readConfigInt("NetFirstSmallBlind"));
+ myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtHands->setChecked(myConfig->readConfigInt("NetRaiseBlindsAtHands"));
+ myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtMinutes->setChecked(myConfig->readConfigInt("NetRaiseBlindsAtMinutes"));
+ myChangeCompleteBlindsDialog->spinBox_raiseSmallBlindEveryHands->setValue(myConfig->readConfigInt("NetRaiseSmallBlindEveryHands"));
+ myChangeCompleteBlindsDialog->spinBox_raiseSmallBlindEveryMinutes->setValue(myConfig->readConfigInt("NetRaiseSmallBlindEveryMinutes"));
+ myChangeCompleteBlindsDialog->radioButton_alwaysDoubleBlinds->setChecked(myConfig->readConfigInt("NetAlwaysDoubleBlinds"));
+ myChangeCompleteBlindsDialog->radioButton_manualBlindsOrder->setChecked(myConfig->readConfigInt("NetManualBlindsOrder"));
+
+ myChangeCompleteBlindsDialog->listWidget_blinds->clear();
+ myChangeCompleteBlindsDialog->spinBox_input->setMinimum(myChangeCompleteBlindsDialog->spinBox_firstSmallBlind->value()+1);
+
+ std::list myBlindsList = myConfig->readConfigIntList("NetManualBlindsList");
+ std::list::iterator it1;
+
+ for(it1= myBlindsList.begin(); it1 != myBlindsList.end(); it1++) {
+ myChangeCompleteBlindsDialog->listWidget_blinds->addItem(QString::number(*it1,10));
+ }
+ myChangeCompleteBlindsDialog->sortBlindsList();
+
+ myChangeCompleteBlindsDialog->radioButton_afterThisAlwaysDoubleBlinds->setChecked(myConfig->readConfigInt("NetAfterMBAlwaysDoubleBlinds"));
+ myChangeCompleteBlindsDialog->radioButton_afterThisAlwaysRaiseAbout->setChecked(myConfig->readConfigInt("NetAfterMBAlwaysRaiseAbout"));
+ myChangeCompleteBlindsDialog->spinBox_afterThisAlwaysRaiseValue->setValue(myConfig->readConfigInt("NetAfterMBAlwaysRaiseValue"));
+ myChangeCompleteBlindsDialog->radioButton_afterThisStayAtLastBlind->setChecked(myConfig->readConfigInt("NetAfterMBStayAtLastBlind"));
}
void createInternetGameDialogImpl::showDialog() {
@@ -90,3 +116,14 @@ void createInternetGameDialogImpl::clearGamePassword(bool clear) {
if(!clear) { lineEdit_Password->clear(); }
}
+void createInternetGameDialogImpl::callChangeBlindsDialog(bool show) {
+
+ if(show) {
+ myChangeCompleteBlindsDialog->exec();
+ if(myChangeCompleteBlindsDialog->result() == QDialog::Accepted ) {}
+ else {
+ radioButton_useSavedBlindsSettings->setChecked(TRUE);
+ }
+
+ }
+}
diff --git a/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.h b/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.h
index b0229585..b3315cfd 100644
--- a/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.h
+++ b/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.h
@@ -27,6 +27,7 @@
class Session;
class ConfigFile;
+class changeCompleteBlindsDialogImpl;
class createInternetGameDialogImpl: public QDialog, public Ui::createInternetGameDialog {
Q_OBJECT
@@ -34,6 +35,7 @@ public:
createInternetGameDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
void exec();
+ changeCompleteBlindsDialogImpl* getChangeCompleteBlindsDialog() { return myChangeCompleteBlindsDialog; }
public slots:
@@ -44,9 +46,11 @@ public slots:
void keyPressEvent ( QKeyEvent * event );
void clearGamePassword(bool);
+ void callChangeBlindsDialog(bool);
private:
ConfigFile *myConfig;
+ changeCompleteBlindsDialogImpl *myChangeCompleteBlindsDialog;
};
#endif
diff --git a/src/gui/qt/createnetworkgamedialog.ui b/src/gui/qt/createnetworkgamedialog.ui
index ac476071..09a7536b 100644
--- a/src/gui/qt/createnetworkgamedialog.ui
+++ b/src/gui/qt/createnetworkgamedialog.ui
@@ -5,8 +5,8 @@
0
0
- 303
- 294
+ 277
+ 314
@@ -19,6 +19,9 @@
Network Game Settings
+
+ 9
+
-
@@ -59,51 +62,43 @@
- -
-
-
- Small Blind:
+
-
+
+
+ Blinds
+
+
+ 0
+
+
-
+
+
+ Use saved blinds settings
+
+
+ true
+
+
+
+ -
+
+
+ Change blinds settings ...
+
+
+
+
- -
-
-
- 5
-
-
- 500
-
-
- 10
-
-
-
- -
-
-
- Hands before raise blinds:
-
-
-
- -
-
-
- 1
-
-
- 9
-
-
-
- -
+
-
Game Speed for computer opponents:
- -
+
-
1
@@ -116,14 +111,14 @@
- -
+
-
Timeout for player action (sec):
- -
+
-
5
@@ -190,8 +185,6 @@
spinBox_quantityPlayers
spinBox_startCash
- spinBox_smallBlind
- spinBox_handsBeforeRaiseSmallBlind
spinBox_gameSpeed
spinBox_netTimeOutPlayerAction
pushButton_createGame
diff --git a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
index 548f687e..98154b0a 100644
--- a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
+++ b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
@@ -20,15 +20,19 @@
#include "createnetworkgamedialogimpl.h"
#include "session.h"
#include "configfile.h"
+#include "changecompleteblindsdialogimpl.h"
createNetworkGameDialogImpl::createNetworkGameDialogImpl(QWidget *parent, ConfigFile *c)
: QDialog(parent), myConfig(c)
{
setupUi(this);
+
+ myChangeCompleteBlindsDialog = new changeCompleteBlindsDialogImpl;
fillFormular();
+ connect( radioButton_changeBlindsSettings, SIGNAL( clicked(bool) ), this, SLOT( callChangeBlindsDialog(bool) ) );
connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
@@ -59,11 +63,34 @@ void createNetworkGameDialogImpl::fillFormular() {
//Network Game Settings
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
- spinBox_smallBlind->setValue(myConfig->readConfigInt("NetFirstSmallBlind"));
- spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("NetRaiseSmallBlindEveryHands"));
//temporarely unused until ai is enabled in network
spinBox_gameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
+
+ //fill changeCompleteBlindsDialog
+ myChangeCompleteBlindsDialog->spinBox_firstSmallBlind->setValue(myConfig->readConfigInt("NetFirstSmallBlind"));
+ myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtHands->setChecked(myConfig->readConfigInt("NetRaiseBlindsAtHands"));
+ myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtMinutes->setChecked(myConfig->readConfigInt("NetRaiseBlindsAtMinutes"));
+ myChangeCompleteBlindsDialog->spinBox_raiseSmallBlindEveryHands->setValue(myConfig->readConfigInt("NetRaiseSmallBlindEveryHands"));
+ myChangeCompleteBlindsDialog->spinBox_raiseSmallBlindEveryMinutes->setValue(myConfig->readConfigInt("NetRaiseSmallBlindEveryMinutes"));
+ myChangeCompleteBlindsDialog->radioButton_alwaysDoubleBlinds->setChecked(myConfig->readConfigInt("NetAlwaysDoubleBlinds"));
+ myChangeCompleteBlindsDialog->radioButton_manualBlindsOrder->setChecked(myConfig->readConfigInt("NetManualBlindsOrder"));
+
+ myChangeCompleteBlindsDialog->listWidget_blinds->clear();
+ myChangeCompleteBlindsDialog->spinBox_input->setMinimum(myChangeCompleteBlindsDialog->spinBox_firstSmallBlind->value()+1);
+
+ std::list myBlindsList = myConfig->readConfigIntList("NetManualBlindsList");
+ std::list::iterator it1;
+
+ for(it1= myBlindsList.begin(); it1 != myBlindsList.end(); it1++) {
+ myChangeCompleteBlindsDialog->listWidget_blinds->addItem(QString::number(*it1,10));
+ }
+ myChangeCompleteBlindsDialog->sortBlindsList();
+
+ myChangeCompleteBlindsDialog->radioButton_afterThisAlwaysDoubleBlinds->setChecked(myConfig->readConfigInt("NetAfterMBAlwaysDoubleBlinds"));
+ myChangeCompleteBlindsDialog->radioButton_afterThisAlwaysRaiseAbout->setChecked(myConfig->readConfigInt("NetAfterMBAlwaysRaiseAbout"));
+ myChangeCompleteBlindsDialog->spinBox_afterThisAlwaysRaiseValue->setValue(myConfig->readConfigInt("NetAfterMBAlwaysRaiseValue"));
+ myChangeCompleteBlindsDialog->radioButton_afterThisStayAtLastBlind->setChecked(myConfig->readConfigInt("NetAfterMBStayAtLastBlind"));
}
void createNetworkGameDialogImpl::showDialog() {
@@ -78,3 +105,15 @@ void createNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
if (event->key() == 16777220) { pushButton_createGame->click(); } //ENTER
}
+
+void createNetworkGameDialogImpl::callChangeBlindsDialog(bool show) {
+
+ if(show) {
+ myChangeCompleteBlindsDialog->exec();
+ if(myChangeCompleteBlindsDialog->result() == QDialog::Accepted ) {}
+ else {
+ radioButton_useSavedBlindsSettings->setChecked(TRUE);
+ }
+
+ }
+}
diff --git a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
index 3df153b0..ff6bc70b 100644
--- a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
+++ b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
@@ -27,6 +27,8 @@
class Session;
class ConfigFile;
+class changeCompleteBlindsDialogImpl;
+
class createNetworkGameDialogImpl: public QDialog, public Ui::createNetworkGameDialog {
Q_OBJECT
@@ -34,6 +36,7 @@ public:
createNetworkGameDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
void exec();
+ changeCompleteBlindsDialogImpl* getChangeCompleteBlindsDialog() { return myChangeCompleteBlindsDialog; }
public slots:
@@ -42,9 +45,12 @@ public slots:
void fillFormular();
void showDialog();
void keyPressEvent ( QKeyEvent * event );
+
+ void callChangeBlindsDialog(bool);
private:
ConfigFile *myConfig;
+ changeCompleteBlindsDialogImpl *myChangeCompleteBlindsDialog;
};
#endif
diff --git a/src/gui/qt/gamelobbydialog.ui b/src/gui/qt/gamelobbydialog.ui
index cf8f34ce..65eb5f85 100644
--- a/src/gui/qt/gamelobbydialog.ui
+++ b/src/gui/qt/gamelobbydialog.ui
@@ -58,6 +58,11 @@
Players
+
+
+ State
+
+
Private
diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp
index 5fa26d6e..775bba36 100644
--- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp
+++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp
@@ -11,6 +11,7 @@
//
#include "gamelobbydialogimpl.h"
#include "lobbychat.h"
+#include "changecompleteblindsdialogimpl.h"
#include "session.h"
#include "configfile.h"
#include "gamedata.h"
@@ -72,8 +73,9 @@ void gameLobbyDialogImpl::createGame()
// Set Game Data
gameData.maxNumberOfPlayers = myCreateInternetGameDialog->spinBox_quantityPlayers->value();
gameData.startMoney = myCreateInternetGameDialog->spinBox_startCash->value();
- gameData.smallBlind = myCreateInternetGameDialog->spinBox_smallBlind->value();
- gameData.handsBeforeRaise = myCreateInternetGameDialog->spinBox_handsBeforeRaiseSmallBlind->value();
+ gameData.smallBlind = myCreateInternetGameDialog->getChangeCompleteBlindsDialog()->spinBox_firstSmallBlind->value();
+ gameData.handsBeforeRaise = myCreateInternetGameDialog->getChangeCompleteBlindsDialog()->spinBox_raiseSmallBlindEveryHands->value();
+ gameData.guiSpeed = myCreateInternetGameDialog->spinBox_gameSpeed->value();
gameData.guiSpeed = myCreateInternetGameDialog->spinBox_gameSpeed->value();
gameData.playerActionTimeoutSec = myCreateInternetGameDialog->spinBox_netTimeOutPlayerAction->value();
@@ -258,9 +260,10 @@ void gameLobbyDialogImpl::clearDialog()
pushButton_JoinGame->show();
pushButton_JoinGame->setEnabled(false);
- treeWidget_GameList->setColumnWidth(0,250);
- treeWidget_GameList->setColumnWidth(1,75);
+ treeWidget_GameList->setColumnWidth(0,195);
+ treeWidget_GameList->setColumnWidth(1,70);
treeWidget_GameList->setColumnWidth(2,70);
+ treeWidget_GameList->setColumnWidth(3,60);
pushButton_CreateGame->clearFocus();
lineEdit_ChatInput->setFocus();
diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp
index 3edfadc4..26a6b49b 100755
--- a/src/gui/qt/mainwindow/mainwindowimpl.cpp
+++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp
@@ -28,6 +28,7 @@
#include "createnetworkgamedialogimpl.h"
#include "startnetworkgamedialogimpl.h"
#include "changehumanplayernamedialogimpl.h"
+#include "changecompleteblindsdialogimpl.h"
#include "gamelobbydialogimpl.h"
#include "startsplash.h"
@@ -716,8 +717,8 @@ void mainWindowImpl::startNewLocalGame(newGameDialogImpl *v) {
// Set Game Data
gameData.maxNumberOfPlayers = v->spinBox_quantityPlayers->value();
gameData.startMoney = v->spinBox_startCash->value();
- gameData.smallBlind = v->spinBox_smallBlind->value();
- gameData.handsBeforeRaise = v->spinBox_handsBeforeRaiseSmallBlind->value();
+ gameData.smallBlind = v->getChangeCompleteBlindsDialog()->spinBox_firstSmallBlind->value();
+ gameData.handsBeforeRaise = v->getChangeCompleteBlindsDialog()->spinBox_raiseSmallBlindEveryHands->value();
//Speeds
gameData.guiSpeed = v->spinBox_gameSpeed->value();
}
@@ -774,9 +775,9 @@ void mainWindowImpl::callCreateNetworkGameDialog() {
GameData gameData;
gameData.maxNumberOfPlayers = myCreateNetworkGameDialog->spinBox_quantityPlayers->value();
gameData.startMoney = myCreateNetworkGameDialog->spinBox_startCash->value();
- gameData.smallBlind = myCreateNetworkGameDialog->spinBox_smallBlind->value();
- gameData.handsBeforeRaise = myCreateNetworkGameDialog->spinBox_handsBeforeRaiseSmallBlind->value();
- gameData.guiSpeed = myCreateNetworkGameDialog->spinBox_gameSpeed->value();
+ gameData.smallBlind = myCreateNetworkGameDialog->getChangeCompleteBlindsDialog()->spinBox_firstSmallBlind->value();
+ gameData.handsBeforeRaise = myCreateNetworkGameDialog->getChangeCompleteBlindsDialog()->spinBox_raiseSmallBlindEveryHands->value();
+ gameData.guiSpeed = myCreateNetworkGameDialog->spinBox_gameSpeed->value();
gameData.playerActionTimeoutSec = myCreateNetworkGameDialog->spinBox_netTimeOutPlayerAction->value();
myGameLobbyDialog->setSession(&getSession());
diff --git a/src/gui/qt/manualblindsorderdialog.ui b/src/gui/qt/manualblindsorderdialog.ui
index 109731c3..0589d0d0 100644
--- a/src/gui/qt/manualblindsorderdialog.ui
+++ b/src/gui/qt/manualblindsorderdialog.ui
@@ -6,7 +6,7 @@
0
0
248
- 426
+ 392
diff --git a/src/gui/qt/newgamedialog.ui b/src/gui/qt/newgamedialog.ui
index de00a95e..e5f89cff 100755
--- a/src/gui/qt/newgamedialog.ui
+++ b/src/gui/qt/newgamedialog.ui
@@ -5,96 +5,24 @@
0
0
- 280
- 249
+ 236
+ 278
Start Local Game
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
-
- 6
-
-
Local Game Settings
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
-
- 6
-
-
-
-
-
- 1
-
-
- 11
-
-
- 4
-
-
-
- -
-
+
-
+
- Game Speed:
-
-
-
- -
-
-
- 1
-
-
- 9
-
-
-
- -
-
-
- 5
-
-
- 500
-
-
- 10
+ Number of players:
@@ -111,13 +39,6 @@
- -
-
-
- Number of players:
-
-
-
-
@@ -125,13 +46,6 @@
- -
-
-
- Small Blind:
-
-
-
-
@@ -145,10 +59,52 @@
+ -
+
+
+ Blinds
+
+
+
+ 0
+
+
-
+
+
+ Use saved blinds settings
+
+
+ true
+
+
+
+ -
+
+
+ Change blinds settings ...
+
+
+
+
+
+
-
-
+
- Hands before raise blinds:
+ Game Speed:
+
+
+
+ -
+
+
+ 1
+
+
+ 11
+
+
+ 4
@@ -170,8 +126,6 @@
spinBox_quantityPlayers
spinBox_startCash
- spinBox_smallBlind
- spinBox_handsBeforeRaiseSmallBlind
spinBox_gameSpeed
buttonBox
diff --git a/src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp b/src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp
index c10cf414..9894d514 100755
--- a/src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp
+++ b/src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp
@@ -18,14 +18,18 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "newgamedialogimpl.h"
+#include "changecompleteblindsdialogimpl.h"
#include "configfile.h"
newGameDialogImpl::newGameDialogImpl(QWidget *parent, ConfigFile *c)
: QDialog(parent), myConfig(c)
{
- setupUi(this);
+ setupUi(this);
+
+ myChangeCompleteBlindsDialog = new changeCompleteBlindsDialogImpl;
+ connect( radioButton_changeBlindsSettings, SIGNAL( clicked(bool) ), this, SLOT( callChangeBlindsDialog(bool) ) );
}
@@ -33,10 +37,45 @@ void newGameDialogImpl::exec() {
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("StartCash"));
- spinBox_smallBlind->setValue(myConfig->readConfigInt("FirstSmallBlind"));
spinBox_gameSpeed->setValue(myConfig->readConfigInt("GameSpeed"));
- spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("RaiseSmallBlindEveryHands"));
+
+ //fill changeCompleteBlindsDialog
+ myChangeCompleteBlindsDialog->spinBox_firstSmallBlind->setValue(myConfig->readConfigInt("FirstSmallBlind"));
+ myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtHands->setChecked(myConfig->readConfigInt("RaiseBlindsAtHands"));
+ myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtMinutes->setChecked(myConfig->readConfigInt("RaiseBlindsAtMinutes"));
+ myChangeCompleteBlindsDialog->spinBox_raiseSmallBlindEveryHands->setValue(myConfig->readConfigInt("RaiseSmallBlindEveryHands"));
+ myChangeCompleteBlindsDialog->spinBox_raiseSmallBlindEveryMinutes->setValue(myConfig->readConfigInt("RaiseSmallBlindEveryMinutes"));
+ myChangeCompleteBlindsDialog->radioButton_alwaysDoubleBlinds->setChecked(myConfig->readConfigInt("AlwaysDoubleBlinds"));
+ myChangeCompleteBlindsDialog->radioButton_manualBlindsOrder->setChecked(myConfig->readConfigInt("ManualBlindsOrder"));
+
+ myChangeCompleteBlindsDialog->listWidget_blinds->clear();
+ myChangeCompleteBlindsDialog->spinBox_input->setMinimum(myChangeCompleteBlindsDialog->spinBox_firstSmallBlind->value()+1);
+
+ std::list myBlindsList = myConfig->readConfigIntList("ManualBlindsList");
+ std::list::iterator it1;
+
+ for(it1= myBlindsList.begin(); it1 != myBlindsList.end(); it1++) {
+ myChangeCompleteBlindsDialog->listWidget_blinds->addItem(QString::number(*it1,10));
+ }
+ myChangeCompleteBlindsDialog->sortBlindsList();
+
+ myChangeCompleteBlindsDialog->radioButton_afterThisAlwaysDoubleBlinds->setChecked(myConfig->readConfigInt("AfterMBAlwaysDoubleBlinds"));
+ myChangeCompleteBlindsDialog->radioButton_afterThisAlwaysRaiseAbout->setChecked(myConfig->readConfigInt("AfterMBAlwaysRaiseAbout"));
+ myChangeCompleteBlindsDialog->spinBox_afterThisAlwaysRaiseValue->setValue(myConfig->readConfigInt("AfterMBAlwaysRaiseValue"));
+ myChangeCompleteBlindsDialog->radioButton_afterThisStayAtLastBlind->setChecked(myConfig->readConfigInt("AfterMBStayAtLastBlind"));
QDialog::exec();
}
+
+void newGameDialogImpl::callChangeBlindsDialog(bool show) {
+
+ if(show) {
+ myChangeCompleteBlindsDialog->exec();
+ if(myChangeCompleteBlindsDialog->result() == QDialog::Accepted ) {}
+ else {
+ radioButton_useSavedBlindsSettings->setChecked(TRUE);
+ }
+
+ }
+}
diff --git a/src/gui/qt/newlocalgamedialog/newgamedialogimpl.h b/src/gui/qt/newlocalgamedialog/newgamedialogimpl.h
index 1ef9d18f..6904dde1 100755
--- a/src/gui/qt/newlocalgamedialog/newgamedialogimpl.h
+++ b/src/gui/qt/newlocalgamedialog/newgamedialogimpl.h
@@ -25,7 +25,9 @@
#include
#include
+
class ConfigFile;
+class changeCompleteBlindsDialogImpl;
class newGameDialogImpl: public QDialog, public Ui::newGameDialog {
Q_OBJECT
@@ -33,12 +35,16 @@ public:
newGameDialogImpl(QWidget *parent = 0, ConfigFile* = 0);
void exec();
+ changeCompleteBlindsDialogImpl* getChangeCompleteBlindsDialog() { return myChangeCompleteBlindsDialog; }
public slots:
+ void callChangeBlindsDialog(bool);
+
private:
ConfigFile *myConfig;
+ changeCompleteBlindsDialogImpl *myChangeCompleteBlindsDialog;
};
diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui
index 75a7b8b6..f616673b 100644
--- a/src/gui/qt/settingsdialog.ui
+++ b/src/gui/qt/settingsdialog.ui
@@ -505,7 +505,11 @@ p, li { white-space: pre-wrap; }
-
-
+
+
+ 1
+
+
-
@@ -528,7 +532,11 @@ p, li { white-space: pre-wrap; }
-
-
+
+
+ 1
+
+
-
@@ -773,7 +781,11 @@ p, li { white-space: pre-wrap; }
-
-
+
+
+ 1
+
+
-
@@ -796,7 +808,11 @@ p, li { white-space: pre-wrap; }
-
-
+
+
+ 1
+
+
-