start manual blinds order feature

This commit is contained in:
doitux
2007-09-21 00:13:47 +00:00
parent df169fda1a
commit b7bbd17951
12 changed files with 926 additions and 422 deletions
+15 -48
View File
@@ -55,7 +55,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
if(strcmp(argv[i], "--nowriteaccess") == 0) { noWriteAccess = 1; }
}
// !!!! Revisionsnummer der Configdefaults !!!!!
configRev = 35;
configRev = 37;
//standard defaults
logOnOffDefault = "1";
@@ -168,16 +168,26 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
configList.push_back(ConfigInfo("FlipsideOwnFile", CONFIG_TYPE_STRING, ""));
configList.push_back(ConfigInfo("NumberOfPlayers", CONFIG_TYPE_INT, "7"));
configList.push_back(ConfigInfo("StartCash", CONFIG_TYPE_INT, "3000"));
configList.push_back(ConfigInfo("SmallBlind", CONFIG_TYPE_INT, "10"));
configList.push_back(ConfigInfo("HandsBeforeRaiseSmallBlind", CONFIG_TYPE_INT, "8"));
configList.push_back(ConfigInfo("FirstSmallBlind", CONFIG_TYPE_INT, "10"));
configList.push_back(ConfigInfo("RaiseBlindsAtHands", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("RaiseBlindsAtMinutes", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("RaiseSmallBlindEveryHands", CONFIG_TYPE_INT, "8"));
configList.push_back(ConfigInfo("RaiseSmallBlindEveryMinutes", CONFIG_TYPE_INT, "5"));
configList.push_back(ConfigInfo("AlwaysDoubleBlinds", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("ManualBlindsOrder", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("GameSpeed", CONFIG_TYPE_INT, "4"));
configList.push_back(ConfigInfo("EngineVersion", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("PauseBetweenHands", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("ShowGameSettingsDialogOnNewGame", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("NetNumberOfPlayers", CONFIG_TYPE_INT, "7"));
configList.push_back(ConfigInfo("NetStartCash", CONFIG_TYPE_INT, "3000"));
configList.push_back(ConfigInfo("NetSmallBlind", CONFIG_TYPE_INT, "10"));
configList.push_back(ConfigInfo("NetHandsBeforeRaiseSmallBlind", CONFIG_TYPE_INT, "8"));
configList.push_back(ConfigInfo("NetFirstSmallBlind", CONFIG_TYPE_INT, "10"));
configList.push_back(ConfigInfo("NetRaiseBlindsAtHands", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("NetRaiseBlindsAtMinutes", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("NetRaiseSmallBlindEveryHands", CONFIG_TYPE_INT, "8"));
configList.push_back(ConfigInfo("NetRaiseSmallBlindEveryMinutes", CONFIG_TYPE_INT, "5"));
configList.push_back(ConfigInfo("NetAlwaysDoubleBlinds", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("NetManualBlindsOrder", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("NetGameSpeed", CONFIG_TYPE_INT, "4"));
configList.push_back(ConfigInfo("NetEngineVersion", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("NetTimeOutPlayerAction", CONFIG_TYPE_INT, "20"));
@@ -429,26 +439,6 @@ string ConfigFile::readConfigString(string varName) const
size_t i;
string tempString("");
// TiXmlDocument doc(configFileName);
// if(!doc.LoadFile()) { cout << "Could Not Load Config-File!!! " << configFileName << "\n"; }
// TiXmlHandle docHandle( &doc );
//
// TiXmlElement* conf = docHandle.FirstChild( "PokerTH" ).FirstChild( "Configuration" ).FirstChild( varName ).ToElement();
// if ( conf ) {
// const char *tmpStr = conf->Attribute("value");
// if (tmpStr) tempString = tmpStr;
// } /*else {
// //Wenn nicht gefunden eines neues Anlegen
// TiXmlElement* config = docHandle.FirstChild( "PokerTH" ).FirstChild( "Configuration" ).ToElement();
// if ( config ) {
// TiXmlElement * confElement1 = new TiXmlElement( varName );
// config->LinkEndChild( confElement1 );
// confElement1->SetAttribute("value", defaultValue);
// if(!doc.SaveFile()) { cout << "Could Not Save Config-File!!! " << configFileName << "\n"; }
//
// return readConfigString(varName, defaultValue);
// }
// }*/
for (i=0; i<configBufferList.size(); i++) {
if (configBufferList[i].name == varName) {
@@ -467,29 +457,6 @@ int ConfigFile::readConfigInt(string varName) const
string tempString("");
int tempInt=0;
// cout << varName << " : " << tempInt << "\n";
// TiXmlDocument doc(configFileName);
// if(!doc.LoadFile()) { cout << "Could Not Load Config-File!!! " << configFileName << "\n"; }
// TiXmlHandle docHandle( &doc );
//
// TiXmlElement* conf = docHandle.FirstChild( "PokerTH" ).FirstChild( "Configuration" ).FirstChild( varName ).ToElement();
// if ( conf ) {
// // cout << varName << " : " << tempInt << "\n";
// conf->QueryIntAttribute("value", &tempInt );
// // cout << varName << " : " << tempInt << "\n";
// } /*else {
// // Wenn nicht gefunden eines neues Anlegen
// TiXmlElement* config = docHandle.FirstChild( "PokerTH" ).FirstChild( "Configuration" ).ToElement();
// if ( config ) {
// TiXmlElement * confElement1 = new TiXmlElement( varName );
// config->LinkEndChild( confElement1 );
// confElement1->SetAttribute("value", defaultValue);
// if(!doc.SaveFile()) { cout << "Could Not Save Config-File!!! " << configFileName << "\n"; }
//
// return readConfigInt(varName, defaultValue);
// }
// }*/
for (i=0; i<configBufferList.size(); i++) {
if (configBufferList[i].name == varName) {
@@ -60,8 +60,8 @@ void createInternetGameDialogImpl::fillFormular() {
//Network Game Settings
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
spinBox_smallBlind->setValue(myConfig->readConfigInt("NetSmallBlind"));
spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("NetHandsBeforeRaiseSmallBlind"));
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"));
@@ -59,8 +59,8 @@ void createNetworkGameDialogImpl::fillFormular() {
//Network Game Settings
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
spinBox_smallBlind->setValue(myConfig->readConfigInt("NetSmallBlind"));
spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("NetHandsBeforeRaiseSmallBlind"));
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"));
+2 -2
View File
@@ -724,8 +724,8 @@ void mainWindowImpl::startNewLocalGame(newGameDialogImpl *v) {
// Set Game Data
gameData.maxNumberOfPlayers = myConfig->readConfigInt("NumberOfPlayers");
gameData.startMoney = myConfig->readConfigInt("StartCash");
gameData.smallBlind = myConfig->readConfigInt("SmallBlind");
gameData.handsBeforeRaise = myConfig->readConfigInt("HandsBeforeRaiseSmallBlind");
gameData.smallBlind = myConfig->readConfigInt("FirstSmallBlind");
gameData.handsBeforeRaise = myConfig->readConfigInt("RaiseSmallBlindEveryHands");
//Speeds
gameData.guiSpeed = myConfig->readConfigInt("GameSpeed");
}
+185
View File
@@ -0,0 +1,185 @@
<ui version="4.0" >
<class>manualBlindsOrderDialog</class>
<widget class="QDialog" name="manualBlindsOrderDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>248</width>
<height>407</height>
</rect>
</property>
<property name="windowTitle" >
<string>Manual Blinds Order</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<layout class="QGridLayout" >
<property name="horizontalSpacing" >
<number>4</number>
</property>
<item rowspan="2" row="0" column="0" >
<widget class="QListWidget" name="listWidget_blinds" >
<property name="sortingEnabled" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="pushButton_delete" >
<property name="text" >
<string>Delete</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>121</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" >
<widget class="QSpinBox" name="spinBox_input" >
<property name="maximum" >
<number>9999</number>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QPushButton" name="pushButton_add" >
<property name="text" >
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>After this:</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QRadioButton" name="radioButton_alwaysDoubleBlinds" >
<property name="text" >
<string>Always double blinds</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<item>
<widget class="QRadioButton" name="radioButton_alwaysRaiseAbout" >
<property name="text" >
<string>Always raise about:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_AfterThisAlwaysRaiseValue" />
</item>
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<string>$</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" >
<widget class="QRadioButton" name="radioButton_stayAtLastBlind" >
<property name="text" >
<string>Stay at last blind</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" >
<widget class="QDialogButtonBox" name="buttonBox" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons" >
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>listWidget_blinds</tabstop>
<tabstop>spinBox_input</tabstop>
<tabstop>pushButton_add</tabstop>
<tabstop>pushButton_delete</tabstop>
<tabstop>radioButton_alwaysDoubleBlinds</tabstop>
<tabstop>radioButton_alwaysRaiseAbout</tabstop>
<tabstop>spinBox_AfterThisAlwaysRaiseValue</tabstop>
<tabstop>radioButton_stayAtLastBlind</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>manualBlindsOrderDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>228</x>
<y>394</y>
</hint>
<hint type="destinationlabel" >
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>manualBlindsOrderDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>270</x>
<y>400</y>
</hint>
<hint type="destinationlabel" >
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>radioButton_alwaysRaiseAbout</sender>
<signal>toggled(bool)</signal>
<receiver>spinBox_AfterThisAlwaysRaiseValue</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>109</x>
<y>307</y>
</hint>
<hint type="destinationlabel" >
<x>173</x>
<y>303</y>
</hint>
</hints>
</connection>
</connections>
</ui>
@@ -33,9 +33,9 @@ void newGameDialogImpl::exec() {
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("StartCash"));
spinBox_smallBlind->setValue(myConfig->readConfigInt("SmallBlind"));
spinBox_smallBlind->setValue(myConfig->readConfigInt("FirstSmallBlind"));
spinBox_gameSpeed->setValue(myConfig->readConfigInt("GameSpeed"));
spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("HandsBeforeRaiseSmallBlind"));
spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("RaiseSmallBlindEveryHands"));
QDialog::exec();
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,53 @@
/***************************************************************************
* 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 "manualblindsorderdialogimpl.h"
#include "configfile.h"
#include <iostream>
manualBlindsOrderDialogImpl::manualBlindsOrderDialogImpl(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 manualBlindsOrderDialogImpl::exec() {
QDialog::exec();
}
void manualBlindsOrderDialogImpl::addBlindValueToList() {
listWidget_blinds->addItem(QString::number(spinBox_input->value(),10));
listWidget_blinds->sortItems();
}
void manualBlindsOrderDialogImpl::removeBlindFromList() {
listWidget_blinds->removeItemWidget(listWidget_blinds->currentItem());
listWidget_blinds->sortItems();
}
@@ -0,0 +1,51 @@
/***************************************************************************
* 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 MANUALBLINDSORDERDIALOGIMPL_H
#define MANUALBLINDSORDERDIALOGIMPL_H
#include "ui_manualblindsorderdialog.h"
#include <QtCore>
#include <QtGui>
class ConfigFile;
class manualBlindsOrderDialogImpl: public QDialog, public Ui::manualBlindsOrderDialog {
Q_OBJECT
public:
manualBlindsOrderDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
void exec();
public slots:
bool getSettingsCorrect() const { return settingsCorrect;}
void addBlindValueToList();
void removeBlindFromList();
private:
ConfigFile* myConfig;
bool settingsCorrect;
};
#endif
@@ -31,6 +31,8 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
setupUi(this);
myManualBlindsOrderDialog = new manualBlindsOrderDialogImpl;
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
pushButton_openFlipsidePicture->setIcon(QIcon(QPixmap(myAppDataPath+"gfx/gui/misc/fileopen16.png")));
@@ -56,6 +58,9 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
connect( pushButton_Opponent5Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile5()) );
connect( pushButton_Opponent6Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile6()) );
connect( pushButton_editManualBlindsOrder, SIGNAL( clicked() ), this, SLOT( callManualBlindsOrderDialog()) );
connect( pushButton_netEditManualBlindsOrder, SIGNAL( clicked() ), this, SLOT( callNetManualBlindsOrderDialog()) );
connect( checkBox_UseInternetGamePassword, SIGNAL( toggled(bool) ), this, SLOT( clearInternetGamePassword(bool)) );
//temporarely unused until ai is enabled in network
@@ -103,8 +108,13 @@ void settingsDialogImpl::exec() {
//Local Game Settings
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("StartCash"));
spinBox_smallBlind->setValue(myConfig->readConfigInt("SmallBlind"));
spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("HandsBeforeRaiseSmallBlind"));
spinBox_firstSmallBlind->setValue(myConfig->readConfigInt("FirstSmallBlind"));
radioButton_raiseBlindsAtHands->setChecked(myConfig->readConfigInt("RaiseBlindsAtHands"));
radioButton_raiseBlindsAtMinutes->setChecked(myConfig->readConfigInt("RaiseBlindsAtMinutes"));
spinBox_raiseSmallBlindEveryHands->setValue(myConfig->readConfigInt("RaiseSmallBlindEveryHands"));
spinBox_raiseSmallBlindEveryMinutes->setValue(myConfig->readConfigInt("RaiseSmallBlindEveryMinutes"));
radioButton_alwaysDoubleBlinds->setChecked(myConfig->readConfigInt("AlwaysDoubleBlinds"));
radioButton_manualBlindsOrder->setChecked(myConfig->readConfigInt("ManualBlindsOrder"));
spinBox_gameSpeed->setValue(myConfig->readConfigInt("GameSpeed"));
checkBox_pauseBetweenHands->setChecked(myConfig->readConfigInt("PauseBetweenHands"));
checkBox_showGameSettingsDialogOnNewGame->setChecked(myConfig->readConfigInt("ShowGameSettingsDialogOnNewGame"));
@@ -113,8 +123,13 @@ void settingsDialogImpl::exec() {
//Network Game Settings
spinBox_netQuantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_netStartCash->setValue(myConfig->readConfigInt("NetStartCash"));
spinBox_netSmallBlind->setValue(myConfig->readConfigInt("NetSmallBlind"));
spinBox_netHandsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("NetHandsBeforeRaiseSmallBlind"));
spinBox_netFirstSmallBlind->setValue(myConfig->readConfigInt("NetFirstSmallBlind"));
radioButton_netRaiseBlindsAtHands->setChecked(myConfig->readConfigInt("NetRaiseBlindsAtHands"));
radioButton_netRaiseBlindsAtMinutes->setChecked(myConfig->readConfigInt("NetRaiseBlindsAtMinutes"));
spinBox_netRaiseSmallBlindEveryHands->setValue(myConfig->readConfigInt("NetRaiseSmallBlindEveryHands"));
spinBox_netRaiseSmallBlindEveryMinutes->setValue(myConfig->readConfigInt("NetRaiseSmallBlindEveryMinutes"));
radioButton_netAlwaysDoubleBlinds->setChecked(myConfig->readConfigInt("NetAlwaysDoubleBlinds"));
radioButton_netManualBlindsOrder->setChecked(myConfig->readConfigInt("NetManualBlindsOrder"));
spinBox_netGameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
comboBox_netEngineVersion->setCurrentIndex(myConfig->readConfigInt("NetEngineVersion"));
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
@@ -200,8 +215,13 @@ void settingsDialogImpl::isAccepted() {
// Local Game Settings
myConfig->writeConfigInt("NumberOfPlayers", spinBox_quantityPlayers->value());
myConfig->writeConfigInt("StartCash", spinBox_startCash->value());
myConfig->writeConfigInt("SmallBlind", spinBox_smallBlind->value());
myConfig->writeConfigInt("HandsBeforeRaiseSmallBlind", spinBox_handsBeforeRaiseSmallBlind->value());
myConfig->writeConfigInt("FirstSmallBlind", spinBox_firstSmallBlind->value());
myConfig->writeConfigInt("RaiseBlindsAtHands", radioButton_raiseBlindsAtHands->isChecked());
myConfig->writeConfigInt("RaiseBlindsAtMinutes", radioButton_raiseBlindsAtMinutes->isChecked());
myConfig->writeConfigInt("RaiseSmallBlindEveryHands", spinBox_raiseSmallBlindEveryHands->value());
myConfig->writeConfigInt("RaiseSmallBlindEveryMinutes", spinBox_raiseSmallBlindEveryMinutes->value());
myConfig->writeConfigInt("AlwaysDoubleBlinds", radioButton_alwaysDoubleBlinds->isChecked());
myConfig->writeConfigInt("ManualBlindsOrder", radioButton_manualBlindsOrder->isChecked());
myConfig->writeConfigInt("GameSpeed", spinBox_gameSpeed->value());
myConfig->writeConfigInt("EngineVersion", comboBox_engineVersion->currentIndex());
myConfig->writeConfigInt("PauseBetweenHands", checkBox_pauseBetweenHands->isChecked());
@@ -210,8 +230,13 @@ void settingsDialogImpl::isAccepted() {
//Network Game Settings
myConfig->writeConfigInt("NetNumberOfPlayers", spinBox_netQuantityPlayers->value());
myConfig->writeConfigInt("NetStartCash", spinBox_netStartCash->value());
myConfig->writeConfigInt("NetSmallBlind", spinBox_netSmallBlind->value());
myConfig->writeConfigInt("NetHandsBeforeRaiseSmallBlind", spinBox_netHandsBeforeRaiseSmallBlind->value());
myConfig->writeConfigInt("NetFirstSmallBlind", spinBox_netFirstSmallBlind->value());
myConfig->writeConfigInt("NetRaiseBlindsAtHands", radioButton_netRaiseBlindsAtHands->isChecked());
myConfig->writeConfigInt("NetRaiseBlindsAtMinutes", radioButton_netRaiseBlindsAtMinutes->isChecked());
myConfig->writeConfigInt("NetRaiseSmallBlindEveryHands", spinBox_netRaiseSmallBlindEveryHands->value());
myConfig->writeConfigInt("NetRaiseSmallBlindEveryMinutes", spinBox_netRaiseSmallBlindEveryMinutes->value());
myConfig->writeConfigInt("NetAlwaysDoubleBlinds", radioButton_netAlwaysDoubleBlinds->isChecked());
myConfig->writeConfigInt("NetManualBlindsOrder", radioButton_netManualBlindsOrder->isChecked());
myConfig->writeConfigInt("NetGameSpeed", spinBox_netGameSpeed->value());
myConfig->writeConfigInt("NetEngineVersion", comboBox_netEngineVersion->currentIndex());
myConfig->writeConfigInt("NetTimeOutPlayerAction", spinBox_netTimeOutPlayerAction->value());
@@ -371,3 +396,5 @@ void settingsDialogImpl::clearInternetGamePassword(bool clear) {
if(!clear) { lineEdit_InternetGamePassword->clear(); }
}
void settingsDialogImpl::callManualBlindsOrderDialog() { myManualBlindsOrderDialog->exec(); }
void settingsDialogImpl::callNetManualBlindsOrderDialog() { myManualBlindsOrderDialog->exec(); }
@@ -22,12 +22,14 @@
#include "ui_settingsdialog.h"
#include "selectavatardialogimpl.h"
#include "manualblindsorderdialogimpl.h"
#include <QtCore>
#include <QtGui>
class ConfigFile;
class selectAvatarDialogImpl;
class manualBlindsOrderDialogImpl;
class settingsDialogImpl: public QDialog, public Ui::settingsDialog {
Q_OBJECT
@@ -55,10 +57,15 @@ public slots:
void setAvatarFile5();
void setAvatarFile6();
void callManualBlindsOrderDialog();
void callNetManualBlindsOrderDialog();
void callSelectAvatarDialog() { mySelectAvatarDialogImpl->exec(); }
void clearInternetGamePassword(bool);
private:
bool playerNickIsChanged;
@@ -66,6 +73,7 @@ private:
ConfigFile* myConfig;
selectAvatarDialogImpl* mySelectAvatarDialogImpl;
manualBlindsOrderDialogImpl* myManualBlindsOrderDialog;
QString myAppDataPath;
};