diff --git a/pokerth.pro b/pokerth.pro
index 2b6c533e..f323d98d 100755
--- a/pokerth.pro
+++ b/pokerth.pro
@@ -12,7 +12,9 @@ FORMS += mainwindow.ui \
settingsdialog.ui \
joinnetworkgamedialog.ui \
connecttoserverdialog.ui \
- waitforservertostartgamedialog.ui
+ waitforservertostartgamedialog.ui \
+ createnetworkgamedialog.ui \
+ startnetworkgamedialog.ui
HEADERS += tinystr.h \
tinyxml.h \
mainwindowimpl.h \
@@ -22,6 +24,8 @@ HEADERS += tinystr.h \
joinnetworkgamedialogimpl.h \
connecttoserverdialogimpl.h \
waitforservertostartgamedialogimpl.h \
+ createnetworkgamedialogimpl.h \
+ startnetworkgamedialogimpl.h \
configfile.h \
log.h \
guiinterface.h \
@@ -68,6 +72,8 @@ SOURCES += pokerth.cpp \
joinnetworkgamedialogimpl.cpp \
connecttoserverdialogimpl.cpp \
waitforservertostartgamedialogimpl.cpp \
+ createnetworkgamedialogimpl.cpp \
+ startnetworkgamedialogimpl.cpp \
configfile.cpp \
log.cpp \
guiinterface.cpp \
@@ -105,8 +111,8 @@ SOURCES += pokerth.cpp \
TEMPLATE = vcapp
RESOURCES = src/gui/qt/deck.qrc
TEMPLATE = app
-DEPENDPATH += . src uics src/config src/config/tinyxml src/gui src/gui/qt src/gui/qt/mainwindow/startsplash src/gui/qt/mainwindow src/gui/qt/aboutpokerth src/gui/qt/joinnetworkgamedialog src/gui/qt/connecttoserverdialog src/gui/qt/newlocalgamedialog src/gui/qt/settingsdialog src/gui/qt/waitforservertostartgamedialog src/gui/qt/log src/engine src/engine/local_engine src/net src/net/common src/core/
-INCLUDEPATH += . src uics src/config src/config/tinyxml src/gui src/gui/qt src/gui/qt/mainwindow/startsplash src/gui/qt/mainwindow src/gui/qt/aboutpokerth src/gui/qt/joinnetworkgamedialog src/gui/qt/connecttoserverdialog src/gui/qt/newlocalgamedialog src/gui/qt/settingsdialog src/gui/qt/waitforservertostartgamedialog src/gui/qt/log src/engine src/engine/local_engine src/net src/net/common src/core/
+DEPENDPATH += . src uics src/config src/config/tinyxml src/gui src/gui/qt src/gui/qt/mainwindow/startsplash src/gui/qt/mainwindow src/gui/qt/aboutpokerth src/gui/qt/joinnetworkgamedialog src/gui/qt/connecttoserverdialog src/gui/qt/newlocalgamedialog src/gui/qt/settingsdialog src/gui/qt/waitforservertostartgamedialog src/gui/qt/startnetworkgamedialog src/gui/qt/createnetworkgamedialog src/gui/qt/log src/engine src/engine/local_engine src/net src/net/common src/core/
+INCLUDEPATH += . src uics src/config src/config/tinyxml src/gui src/gui/qt src/gui/qt/mainwindow/startsplash src/gui/qt/mainwindow src/gui/qt/aboutpokerth src/gui/qt/joinnetworkgamedialog src/gui/qt/connecttoserverdialog src/gui/qt/newlocalgamedialog src/gui/qt/settingsdialog src/gui/qt/waitforservertostartgamedialog src/gui/qt/startnetworkgamedialog src/gui/qt/createnetworkgamedialog src/gui/qt/log src/engine src/engine/local_engine src/net src/net/common src/core/
win32 {
DEPENDPATH += src/net/win32/
INCLUDEPATH += ../boost/
diff --git a/src/gui/qt/createnetworkgamedialog.ui b/src/gui/qt/createnetworkgamedialog.ui
new file mode 100644
index 00000000..ba03829d
--- /dev/null
+++ b/src/gui/qt/createnetworkgamedialog.ui
@@ -0,0 +1,217 @@
+
+ createNetworkGameDialog
+
+
+
+ 0
+ 0
+ 314
+ 243
+
+
+
+ Create Network Game
+
+
+
+ 9
+
+
+ 6
+
+ -
+
+
+ 0
+
+
+ 6
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 181
+ 20
+
+
+
+
+ -
+
+
+ Create Game
+
+
+
+ -
+
+
+ Cancel
+
+
+
+
+
+ -
+
+
+ Network Game Settings
+
+
+
+ 9
+
+
+ 6
+
+
-
+
+
+ 11
+
+
+ 1
+
+
+ 4
+
+
+
+ -
+
+
+ 1
+
+
+ 9
+
+
+
+ -
+
+
+ Hands before raise Small Blind:
+
+
+
+ -
+
+
+ Start Cash:
+
+
+
+ -
+
+
+ Small Blind:
+
+
+
+ -
+
+
+ Number of Players:
+
+
+
+ -
+
+
+ Game Speed for Computer Opponent:
+
+
+
+ -
+
+
+ 500
+
+
+ 5
+
+
+ 10
+
+
+
+ -
+
+
+ 5000
+
+
+ 1000
+
+
+ 2000
+
+
+
+ -
+
+
+ 5
+
+
+ 2
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ spinBox_quantityPlayers
+ spinBox_startCash
+ spinBox_smallBlind
+ spinBox_handsBeforeRaiseSmallBlind
+ spinBox_gameSpeed
+ pushButton_createGame
+ pushButton_cancel
+
+
+
+
+ pushButton_createGame
+ clicked()
+ createNetworkGameDialog
+ accept()
+
+
+ 168
+ 217
+
+
+ 87
+ 215
+
+
+
+
+ pushButton_cancel
+ clicked()
+ createNetworkGameDialog
+ reject()
+
+
+ 284
+ 222
+
+
+ 311
+ 190
+
+
+
+
+
diff --git a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
new file mode 100644
index 00000000..8ac0d701
--- /dev/null
+++ b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
@@ -0,0 +1,48 @@
+/***************************************************************************
+ * 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 "createnetworkgamedialogimpl.h"
+#include "session.h"
+// #include "configfile.h"
+
+createNetworkGameDialogImpl::createNetworkGameDialogImpl(QWidget *parent)
+ : QDialog(parent)
+{
+
+ setupUi(this);
+
+ connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
+ connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
+
+}
+
+void createNetworkGameDialogImpl::createGame() {
+
+}
+
+void createNetworkGameDialogImpl::cancel() {
+
+}
+
+void createNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
+
+
+ if (event->key() == 16777220) { pushButton_createGame->click(); } //ENTER
+
+}
diff --git a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
new file mode 100644
index 00000000..16cc5876
--- /dev/null
+++ b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
@@ -0,0 +1,43 @@
+/***************************************************************************
+ * 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 CREATENETWORKGAMEDIALOGIMPL_H
+#define CREATENETWORKGAMEDIALOGIMPL_H
+
+#include "ui_createnetworkgamedialog.h"
+
+#include
+#include
+#include
+
+class Session;
+
+class createNetworkGameDialogImpl: public QDialog, public Ui::createNetworkGameDialog {
+Q_OBJECT
+public:
+ createNetworkGameDialogImpl(QWidget *parent = 0);
+
+public slots:
+
+ void createGame();
+ void cancel();
+ void keyPressEvent ( QKeyEvent * event );
+};
+
+#endif
diff --git a/src/gui/qt/mainwindow.ui b/src/gui/qt/mainwindow.ui
index 53744227..645e4693 100644
--- a/src/gui/qt/mainwindow.ui
+++ b/src/gui/qt/mainwindow.ui
@@ -4207,7 +4207,7 @@
- Start new local Game ...
+ Start local Game ...
Ctrl+N
diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp
index 5b9382a5..d8f8da19 100755
--- a/src/gui/qt/mainwindow/mainwindowimpl.cpp
+++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp
@@ -24,12 +24,12 @@
#include "settingsdialogimpl.h"
#include "joinnetworkgamedialogimpl.h"
#include "connecttoserverdialogimpl.h"
-
+#include "createnetworkgamedialogimpl.h"
+#include "startnetworkgamedialogimpl.h"
#include "startsplash.h"
#include "mycardspixmaplabel.h"
-
#include "playerinterface.h"
#include "boardinterface.h"
@@ -419,6 +419,8 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
//Dialoge
myJoinNetworkGameDialog = new joinNetworkGameDialogImpl();
myConnectToServerDialog = new connectToServerDialogImpl();
+ myStartNetworkGameDialog = new startNetworkGameDialogImpl();
+ myCreateNetworkGameDialog = new createNetworkGameDialogImpl();
//Connects
connect(dealFlopCards0Timer, SIGNAL(timeout()), this, SLOT( dealFlopCards1() ));
@@ -457,8 +459,8 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
connect( actionAboutPokerth, SIGNAL( triggered() ), this, SLOT( callAboutPokerthDialog() ) );
connect( actionSettings, SIGNAL( triggered() ), this, SLOT( callSettingsDialog() ) );
connect( actionJoin_network_Game, SIGNAL( triggered() ), this, SLOT( callJoinNetworkGameDialog() ) );
+ connect( actionCreate_network_Game, SIGNAL( triggered() ), this, SLOT( callCreateNetworkGameDialog() ) );
connect( actionQuit, SIGNAL( triggered() ), qApp, SLOT( quit() ) );
- actionCreate_network_Game->setVisible(FALSE);
connect( pushButton_raise, SIGNAL( clicked() ), this, SLOT( myRaise() ) );
connect( pushButton_call, SIGNAL( clicked() ), this, SLOT( myCall() ) );
@@ -572,6 +574,33 @@ void mainWindowImpl::callAboutPokerthDialog() {
v->exec();
}
+void mainWindowImpl::callCreateNetworkGameDialog() {
+
+ myCreateNetworkGameDialog->exec();
+//
+ if (myCreateNetworkGameDialog->result() == QDialog::Accepted ) {
+//
+// mySession->terminateNetworkClient();
+//
+// // Maybe use QUrl::toPunycode.
+// mySession->startNetworkClient(
+// myJoinNetworkGameDialog->lineEdit_ipAddress->text().toUtf8().constData(),
+// myJoinNetworkGameDialog->spinBox_port->value(),
+// myJoinNetworkGameDialog->checkBox_ipv6->isChecked(),
+// myJoinNetworkGameDialog->lineEdit_password->text().toUtf8().constData());
+//
+// //Dialog mit Statusbalken
+// myConnectToServerDialog->exec();
+//
+// if (myConnectToServerDialog->result() == QDialog::Rejected ) {
+// mySession->terminateNetworkClient();
+// actionJoin_network_Game->trigger(); // re-trigger
+// }
+//
+ }
+
+}
+
void mainWindowImpl::callJoinNetworkGameDialog() {
myJoinNetworkGameDialog->exec();
diff --git a/src/gui/qt/mainwindow/mainwindowimpl.h b/src/gui/qt/mainwindow/mainwindowimpl.h
index 18263c48..cc455d3f 100755
--- a/src/gui/qt/mainwindow/mainwindowimpl.h
+++ b/src/gui/qt/mainwindow/mainwindowimpl.h
@@ -40,7 +40,8 @@ class PlayerInterface;
class MyCardsPixmapLabel;
class joinNetworkGameDialogImpl;
class connectToServerDialogImpl;
-
+class createNetworkGameDialogImpl;
+class startNetworkGameDialogImpl;
class QColor;
@@ -97,6 +98,7 @@ public slots:
void callNewGameDialog() ;
void callAboutPokerthDialog();
void callSettingsDialog();
+ void callCreateNetworkGameDialog();
void callJoinNetworkGameDialog();
void myFold();
@@ -252,6 +254,9 @@ private:
//Dialoge
joinNetworkGameDialogImpl *myJoinNetworkGameDialog;
connectToServerDialogImpl *myConnectToServerDialog;
+ startNetworkGameDialogImpl *myStartNetworkGameDialog;
+ createNetworkGameDialogImpl *myCreateNetworkGameDialog;
+
int maxQuantityPlayers;
int distributePotAnimCounter;
diff --git a/src/gui/qt/newgamedialog.ui b/src/gui/qt/newgamedialog.ui
index 932e1417..c9bbd911 100755
--- a/src/gui/qt/newgamedialog.ui
+++ b/src/gui/qt/newgamedialog.ui
@@ -10,7 +10,7 @@
- Start New Game
+ Start Local Game
@@ -22,7 +22,7 @@
-
- Game-Settings
+ Local Game Settings
diff --git a/src/gui/qt/startnetworkgamedialog.ui b/src/gui/qt/startnetworkgamedialog.ui
new file mode 100644
index 00000000..b2ebc608
--- /dev/null
+++ b/src/gui/qt/startnetworkgamedialog.ui
@@ -0,0 +1,131 @@
+
+ startNetworkGameDialog
+
+
+
+ 0
+ 0
+ 280
+ 236
+
+
+
+ Start Network Game
+
+
+
+ 9
+
+
+ 6
+
+
-
+
+
+ Maximal Player Number:
+
+
+
+ -
+
+
+ 0
+
+
+ 6
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 181
+ 20
+
+
+
+
+ -
+
+
+ Start Game
+
+
+
+ -
+
+
+ Cancel
+
+
+
+
+
+ -
+
+
+
+ Connected Player
+
+
+
+
+ -
+
+
+ 0
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+
+
+
+ treeWidget
+ pushButton_startGame
+ pushButton_cancel
+
+
+
+
+ pushButton_startGame
+ clicked()
+ startNetworkGameDialog
+ accept()
+
+
+ 140
+ 213
+
+
+ 75
+ 211
+
+
+
+
+ pushButton_cancel
+ clicked()
+ startNetworkGameDialog
+ reject()
+
+
+ 235
+ 220
+
+
+ 276
+ 163
+
+
+
+
+
diff --git a/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp b/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp
new file mode 100644
index 00000000..ba49705b
--- /dev/null
+++ b/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp
@@ -0,0 +1,49 @@
+/***************************************************************************
+ * 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 "startnetworkgamedialogimpl.h"
+#include "session.h"
+// #include "configfile.h"
+
+startNetworkGameDialogImpl::startNetworkGameDialogImpl(QWidget *parent)
+ : QDialog(parent)
+{
+
+ setupUi(this);
+
+ connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
+ connect( pushButton_startGame, SIGNAL( clicked() ), this, SLOT( startGame() ) );
+
+}
+
+void startNetworkGameDialogImpl::startGame() {
+
+}
+
+void startNetworkGameDialogImpl::cancel() {
+
+}
+
+
+void startNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
+
+
+ if (event->key() == 16777220) { pushButton_startGame->click(); } //ENTER
+
+}
diff --git a/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.h b/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.h
new file mode 100644
index 00000000..bbec61cb
--- /dev/null
+++ b/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.h
@@ -0,0 +1,43 @@
+/***************************************************************************
+ * 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 STARTNETWORKGAMEDIALOGIMPL_H
+#define STARTNETWORKGAMEDIALOGIMPL_H
+
+#include "ui_startnetworkgamedialog.h"
+
+#include
+#include
+#include
+
+class Session;
+
+class startNetworkGameDialogImpl: public QDialog, public Ui::startNetworkGameDialog {
+Q_OBJECT
+public:
+ startNetworkGameDialogImpl(QWidget *parent = 0);
+
+public slots:
+
+ void startGame();
+ void cancel();
+ void keyPressEvent ( QKeyEvent * event );
+};
+
+#endif
diff --git a/src/gui/qt/waitforservertostartgamedialog.ui b/src/gui/qt/waitforservertostartgamedialog.ui
index 3253dbc1..b7781e07 100644
--- a/src/gui/qt/waitforservertostartgamedialog.ui
+++ b/src/gui/qt/waitforservertostartgamedialog.ui
@@ -10,7 +10,7 @@
- Dialog
+ Waiting for Server ...