diff --git a/src/config/configfile.cpp b/src/config/configfile.cpp
index 0c2369b4..f6a880da 100644
--- a/src/config/configfile.cpp
+++ b/src/config/configfile.cpp
@@ -34,7 +34,7 @@ using namespace std;
ConfigFile::ConfigFile()
{
// !!!! Revisionsnummer der Configdefaults !!!!!
- configRev = 8;
+ configRev = 10;
// Pfad und Dateinamen setzen
#ifdef _WIN32
@@ -170,6 +170,9 @@ void ConfigFile::createDefaultConfig() {
TiXmlElement * confElement29 = new TiXmlElement( "ServerUseIpv6" );
config->LinkEndChild( confElement29 );
confElement29->SetAttribute("value", 0);
+ TiXmlElement * confElement30 = new TiXmlElement( "ServerPort" );
+ config->LinkEndChild( confElement30 );
+ confElement30->SetAttribute("value", 7234);
TiXmlElement * confElement6 = new TiXmlElement( "MyName" );
config->LinkEndChild( confElement6 );
diff --git a/src/gui/qt/createnetworkgamedialog.ui b/src/gui/qt/createnetworkgamedialog.ui
index d85abac0..7a4b6518 100644
--- a/src/gui/qt/createnetworkgamedialog.ui
+++ b/src/gui/qt/createnetworkgamedialog.ui
@@ -5,8 +5,8 @@
0
0
- 300
- 281
+ 289
+ 241
@@ -31,50 +31,61 @@
6
- -
-
-
- QLineEdit::Password
+
-
+
+
+ 11
+
+
+ 1
+
+
+ 4
- -
-
+
-
+
+
+ 1
+
+
+ 9
+
+
+
+ -
+
- Server Password:
+ Hands before raise Small Blind:
- -
-
-
- Qt::Horizontal
+
-
+
+
+ Start Cash:
- -
-
-
- 5
-
-
- 2
-
-
- 5
+
-
+
+
+ Small Blind:
- -
-
-
- 5000
+
-
+
+
+ Number of Players:
-
- 1000
-
-
- 2000
+
+
+ -
+
+
+ Game Speed for Computer Opponent:
@@ -91,61 +102,26 @@
- -
-
-
- Game Speed for Computer Opponent:
-
-
-
- -
-
-
- Number of Players:
-
-
-
- -
-
-
- Small Blind:
-
-
-
- -
-
-
- Start Cash:
-
-
-
- -
-
-
- Hands before raise Small Blind:
-
-
-
- -
-
-
- 1
-
-
- 9
-
-
-
- -
-
+
-
+
- 11
+ 5000
- 1
+ 1000
- 4
+ 2000
+
+
+
+ -
+
+
+ 5
+
+
+ 2
@@ -225,11 +201,11 @@
reject()
- 284
- 222
+ 278
+ 230
- 311
+ 288
190
diff --git a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
index 8b062982..953cb4a3 100644
--- a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
+++ b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
@@ -27,20 +27,12 @@ createNetworkGameDialogImpl::createNetworkGameDialogImpl(QWidget *parent)
setupUi(this);
- //Formulare Füllen
- ConfigFile myConfig;
-
- //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_gameSpeed->setValue(myConfig.readConfigInt("NetGameSpeed"));
- lineEdit_serverPassword->setText(QString::fromStdString(myConfig.readConfigString("ServerPassword")));
+ fillFormular();
connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
+
}
void createNetworkGameDialogImpl::createGame() {
@@ -51,6 +43,25 @@ void createNetworkGameDialogImpl::cancel() {
}
+void createNetworkGameDialogImpl::fillFormular() {
+
+ //Formulare Füllen
+ ConfigFile myConfig;
+
+ //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_gameSpeed->setValue(myConfig.readConfigInt("NetGameSpeed"));
+}
+
+void createNetworkGameDialogImpl::showDialog() {
+
+ fillFormular();
+ exec();
+}
+
void createNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
diff --git a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
index 16cc5876..db8f06ac 100644
--- a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
+++ b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
@@ -37,6 +37,8 @@ public slots:
void createGame();
void cancel();
+ void fillFormular();
+ void showDialog();
void keyPressEvent ( QKeyEvent * event );
};
diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp
index 7215ec3e..1840da5c 100755
--- a/src/gui/qt/mainwindow/mainwindowimpl.cpp
+++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp
@@ -576,7 +576,7 @@ void mainWindowImpl::callAboutPokerthDialog() {
void mainWindowImpl::callCreateNetworkGameDialog() {
- myCreateNetworkGameDialog->exec();
+ myCreateNetworkGameDialog->showDialog();
//
if (myCreateNetworkGameDialog->result() == QDialog::Accepted ) {
mySession->terminateNetworkServer();
diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui
index 2d1e3f9f..eb524091 100644
--- a/src/gui/qt/settingsdialog.ui
+++ b/src/gui/qt/settingsdialog.ui
@@ -5,8 +5,8 @@
0
0
- 582
- 386
+ 544
+ 381
@@ -22,7 +22,7 @@
-
- 2
+ 0
@@ -349,59 +349,70 @@ p, li { white-space: pre-wrap; }
6
-
-
-
-
- Game-Speed for Computer Opponents:
-
-
-
- -
-
-
- Hands before raise Small Blind:
-
-
-
-
-
-
- Small Blind:
+
+
+ Server Settings
+
+
+ 9
+
+
+ 6
+
+
-
+
+
+ 65535
+
+
+ 80
+
+
+ 80
+
+
+
+ -
+
+
+ QLineEdit::Password
+
+
+
+ -
+
+
+ Server Port:
+
+
+
+ -
+
+
+ Use IPv6
+
+
+
+ -
+
+
+ Server Password:
+
+
+
+
- -
-
-
- Start Cash:
-
-
-
- -
-
-
- Number of Players:
-
-
-
- -
-
-
- 5
-
-
- 2
-
-
-
- -
+
-
Qt::Horizontal
- -
+
-
@@ -414,86 +425,112 @@ p, li { white-space: pre-wrap; }
- -
-
-
- Server Settings
+
-
+
+
+ 0
-
-
- 9
-
-
- 6
-
-
-
-
-
- QLineEdit::Password
-
-
-
- -
-
-
- Server Password:
-
-
-
- -
-
-
- Use IPv6
-
-
-
-
-
+
+ 6
+
+ -
+
+
+ 1
+
+
+ 9
+
+
+
+ -
+
+
+ 5000
+
+
+ 1000
+
+
+
+ -
+
+
+ 500
+
+
+ 5
+
+
+
+ -
+
+
+ Number of Players:
+
+
+
+ -
+
+
+ Game-Speed for Computer Opponents:
+
+
+
+ -
+
+
+ Small Blind:
+
+
+
+ -
+
+
+ 11
+
+
+ 1
+
+
+ 1
+
+
+
+ -
+
+
+ 5
+
+
+ 2
+
+
+
+ -
+
+
+ Start Cash:
+
+
+
+ -
+
+
+ Hands before raise Small Blind:
+
+
+
+
- -
-
-
- 1
-
-
- 9
+
-
+
+
+ Qt::Horizontal
- -
-
-
- 5000
-
-
- 1000
-
-
-
- -
-
-
- 11
-
-
- 1
-
-
- 1
-
-
-
- -
-
-
- 500
-
-
- 5
-
-
-
- -
+
-
Qt::Vertical
@@ -501,18 +538,11 @@ p, li { white-space: pre-wrap; }
20
- 20
+ 40
- -
-
-
- Qt::Horizontal
-
-
-
diff --git a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp
index 3fcfcb96..4db4fd36 100644
--- a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp
+++ b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp
@@ -55,6 +55,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent)
spinBox_netSmallBlind->setValue(myConfig.readConfigInt("NetSmallBlind"));
spinBox_netHandsBeforeRaiseSmallBlind->setValue(myConfig.readConfigInt("NetHandsBeforeRaiseSmallBlind"));
spinBox_netGameSpeed->setValue(myConfig.readConfigInt("NetGameSpeed"));
+ spinBox_serverPort->setValue(myConfig.readConfigInt("ServerPort"));
lineEdit_serverPassword->setText(QString::fromStdString(myConfig.readConfigString("ServerPassword")));
checkBox_useIpv6->setChecked(myConfig.readConfigInt("ServerUseIpv6"));
@@ -118,6 +119,7 @@ void settingsDialogImpl::isAccepted() {
myConfig.writeConfigInt("NetSmallBlind", spinBox_netSmallBlind->value());
myConfig.writeConfigInt("NetHandsBeforeRaiseSmallBlind", spinBox_netHandsBeforeRaiseSmallBlind->value());
myConfig.writeConfigInt("NetGameSpeed", spinBox_netGameSpeed->value());
+ myConfig.writeConfigInt("ServerPort", spinBox_serverPort->value());
myConfig.writeConfigString("ServerPassword", lineEdit_serverPassword->text().toStdString());
myConfig.writeConfigInt("ServerUseIpv6", checkBox_useIpv6->isChecked());