diff --git a/src/config/configfile.cpp b/src/config/configfile.cpp index fbf2e044..03e5425e 100644 --- a/src/config/configfile.cpp +++ b/src/config/configfile.cpp @@ -34,7 +34,7 @@ using namespace std; ConfigFile::ConfigFile() { // !!!! Revisionsnummer der Configdefaults !!!!! - configRev = 11; + configRev = 12; // Pfad und Dateinamen setzen #ifdef _WIN32 @@ -149,6 +149,9 @@ void ConfigFile::createDefaultConfig() { TiXmlElement * confElement4 = new TiXmlElement( "GameSpeed" ); config->LinkEndChild( confElement4 ); confElement4->SetAttribute("value", 4); + TiXmlElement * confElement32 = new TiXmlElement( "EngineVersion" ); + config->LinkEndChild( confElement32 ); + confElement32->SetAttribute("value", 0); TiXmlElement * confElement14 = new TiXmlElement( "PauseBetweenHands" ); config->LinkEndChild( confElement14 ); confElement14->SetAttribute("value", 0); @@ -171,6 +174,9 @@ void ConfigFile::createDefaultConfig() { TiXmlElement * confElement27 = new TiXmlElement( "NetGameSpeed" ); config->LinkEndChild( confElement27 ); confElement27->SetAttribute("value", 4); + TiXmlElement * confElement33 = new TiXmlElement( "NetEngineVersion" ); + config->LinkEndChild( confElement33 ); + confElement33->SetAttribute("value", 0); TiXmlElement * confElement28 = new TiXmlElement( "ServerPassword" ); config->LinkEndChild( confElement28 ); confElement28->SetAttribute("value", ""); diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui index 7e1c03b7..b747103d 100644 --- a/src/gui/qt/settingsdialog.ui +++ b/src/gui/qt/settingsdialog.ui @@ -5,8 +5,8 @@ 0 0 - 579 - 382 + 591 + 434 @@ -204,13 +204,76 @@ p, li { white-space: pre-wrap; } 6 - + Show Game Settings Dialog on every new Game + + + + 11 + + + 1 + + + 1 + + + + + + + 5 + + + 2 + + + + + + + Hands before raise Small Blind: + + + + + + + Number of Players: + + + + + + + Qt::Vertical + + + + 20 + 20 + + + + + + + + + 75 + true + + + + Local Game Default Settings + + + @@ -228,73 +291,6 @@ p, li { white-space: pre-wrap; } - - - - Number of Players: - - - - - - - 11 - - - 1 - - - 1 - - - - - - - Game-Speed: - - - - - - - Qt::Vertical - - - - 20 - 20 - - - - - - - - Pause between Hands (Press "Start" Button to go on) - - - - - - - Start Cash: - - - - - - - - 75 - true - - - - Local Game Default Settings - - - @@ -302,16 +298,6 @@ p, li { white-space: pre-wrap; } - - - - 5 - - - 2 - - - @@ -322,6 +308,27 @@ p, li { white-space: pre-wrap; } + + + + Game-Speed: + + + + + + + Start Cash: + + + + + + + Pause between Hands (Press "Start" Button to go on) + + + @@ -332,10 +339,24 @@ p, li { white-space: pre-wrap; } - - + + + + + 0.4 (actual - under development) + + + + + 0.3 (previous) + + + + + + - Hands before raise Small Blind: + Engine Version: @@ -433,23 +454,27 @@ p, li { white-space: pre-wrap; } 6 - - - - 1 - - - 9 + + + + Game-Speed for Computer Opponents: - - + + + + Start Cash: + + + + + - 5000 + 5 - 1000 + 2 @@ -470,13 +495,6 @@ p, li { white-space: pre-wrap; } - - - - Game-Speed for Computer Opponents: - - - @@ -484,6 +502,33 @@ p, li { white-space: pre-wrap; } + + + + 1 + + + 9 + + + + + + + 5000 + + + 1000 + + + + + + + Hands before raise Small Blind: + + + @@ -497,27 +542,24 @@ p, li { white-space: pre-wrap; } - - - - 5 - - - 2 - + + + + + 0.4 (actual - under development) + + + + + 0.3 (previous) + + - - + + - Start Cash: - - - - - - - Hands before raise Small Blind: + Engine Version: @@ -773,6 +815,12 @@ p, li { white-space: pre-wrap; } + + + 150 + 0 + + 150 diff --git a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp index 17ef63bf..bf054c15 100644 --- a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp +++ b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp @@ -48,6 +48,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent) spinBox_gameSpeed->setValue(myConfig.readConfigInt("GameSpeed")); checkBox_pauseBetweenHands->setChecked(myConfig.readConfigInt("PauseBetweenHands")); checkBox_showGameSettingsDialogOnNewGame->setChecked(myConfig.readConfigInt("ShowGameSettingsDialogOnNewGame")); + comboBox_engineVersion->setCurrentIndex(myConfig.readConfigInt("EngineVersion")); //Network Game Settings spinBox_netQuantityPlayers->setValue(myConfig.readConfigInt("NetNumberOfPlayers")); @@ -55,9 +56,11 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent) spinBox_netSmallBlind->setValue(myConfig.readConfigInt("NetSmallBlind")); spinBox_netHandsBeforeRaiseSmallBlind->setValue(myConfig.readConfigInt("NetHandsBeforeRaiseSmallBlind")); spinBox_netGameSpeed->setValue(myConfig.readConfigInt("NetGameSpeed")); + comboBox_netEngineVersion->setCurrentIndex(myConfig.readConfigInt("NetEngineVersion")); spinBox_serverPort->setValue(myConfig.readConfigInt("ServerPort")); lineEdit_serverPassword->setText(QString::fromStdString(myConfig.readConfigString("ServerPassword"))); checkBox_useIpv6->setChecked(myConfig.readConfigInt("ServerUseIpv6")); + //Interface checkBox_showLeftToolbox->setChecked(myConfig.readConfigInt("ShowLeftToolBox")); @@ -110,6 +113,7 @@ void settingsDialogImpl::isAccepted() { myConfig.writeConfigInt("SmallBlind", spinBox_smallBlind->value()); myConfig.writeConfigInt("HandsBeforeRaiseSmallBlind", spinBox_handsBeforeRaiseSmallBlind->value()); myConfig.writeConfigInt("GameSpeed", spinBox_gameSpeed->value()); + myConfig.writeConfigInt("EngineVersion", comboBox_engineVersion->currentIndex()); myConfig.writeConfigInt("PauseBetweenHands", checkBox_pauseBetweenHands->isChecked()); myConfig.writeConfigInt("ShowGameSettingsDialogOnNewGame", checkBox_showGameSettingsDialogOnNewGame->isChecked()); @@ -119,6 +123,7 @@ void settingsDialogImpl::isAccepted() { myConfig.writeConfigInt("NetSmallBlind", spinBox_netSmallBlind->value()); myConfig.writeConfigInt("NetHandsBeforeRaiseSmallBlind", spinBox_netHandsBeforeRaiseSmallBlind->value()); myConfig.writeConfigInt("NetGameSpeed", spinBox_netGameSpeed->value()); + myConfig.writeConfigInt("NetEngineVersion", comboBox_netEngineVersion->currentIndex()); myConfig.writeConfigInt("ServerPort", spinBox_serverPort->value()); myConfig.writeConfigString("ServerPassword", lineEdit_serverPassword->text().toStdString()); myConfig.writeConfigInt("ServerUseIpv6", checkBox_useIpv6->isChecked());