adds createInternetGameDialog
This commit is contained in:
@@ -28,6 +28,7 @@ INCLUDEPATH += . \
|
||||
src/gui/qt/mainwindow/chat \
|
||||
src/gui/qt/aboutpokerth \
|
||||
src/gui/qt/createnetworkgamedialog \
|
||||
src/gui/qt/createinternetgamedialog \
|
||||
src/gui/qt/joinnetworkgamedialog \
|
||||
src/gui/qt/newlocalgamedialog \
|
||||
src/gui/qt/settingsdialog \
|
||||
@@ -56,6 +57,7 @@ DEPENDPATH += . \
|
||||
src/gui/qt/mainwindow/chat \
|
||||
src/gui/qt/aboutpokerth \
|
||||
src/gui/qt/connecttoserverdialog \
|
||||
src/gui/qt/createinternetgamedialog \
|
||||
src/gui/qt/createnetworkgamedialog \
|
||||
src/gui/qt/joinnetworkgamedialog \
|
||||
src/gui/qt/qttools \
|
||||
@@ -129,6 +131,7 @@ HEADERS += \
|
||||
src/gui/qt/aboutpokerth/aboutpokerthimpl.h \
|
||||
src/gui/qt/connecttoserverdialog/connecttoserverdialogimpl.h \
|
||||
src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h \
|
||||
src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.h \
|
||||
src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialogimpl.h \
|
||||
src/gui/qt/newlocalgamedialog/newgamedialogimpl.h \
|
||||
src/gui/qt/settingsdialog/settingsdialogimpl.h \
|
||||
@@ -149,6 +152,7 @@ FORMS += \
|
||||
src/gui/qt/aboutpokerth.ui \
|
||||
src/gui/qt/connecttoserverdialog.ui \
|
||||
src/gui/qt/createnetworkgamedialog.ui \
|
||||
src/gui/qt/createinternetgamedialog.ui \
|
||||
src/gui/qt/joinnetworkgamedialog.ui \
|
||||
src/gui/qt/newgamedialog.ui \
|
||||
src/gui/qt/settingsdialog.ui \
|
||||
@@ -173,6 +177,7 @@ SOURCES += \
|
||||
src/gui/qt/aboutpokerth/aboutpokerthimpl.cpp \
|
||||
src/gui/qt/connecttoserverdialog/connecttoserverdialogimpl.cpp \
|
||||
src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp \
|
||||
src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp \
|
||||
src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialogimpl.cpp \
|
||||
src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp \
|
||||
src/gui/qt/settingsdialog/settingsdialogimpl.cpp \
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
<ui version="4.0" >
|
||||
<class>createInternetGameDialog</class>
|
||||
<widget class="QDialog" name="createInternetGameDialog" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>297</width>
|
||||
<height>305</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Create Game</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="title" >
|
||||
<string>Game Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="4" column="0" colspan="3" >
|
||||
<widget class="QLabel" name="label_5" >
|
||||
<property name="text" >
|
||||
<string>Game Speed for computer opponents:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2" >
|
||||
<widget class="QSpinBox" name="spinBox_handsBeforeRaiseSmallBlind" >
|
||||
<property name="minimum" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<string>Hands before raise small blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
<string>Timeout for player action (sec):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" colspan="2" >
|
||||
<widget class="QSpinBox" name="spinBox_netTimeOutPlayerAction" >
|
||||
<property name="maximum" >
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_quantityPlayers" >
|
||||
<property name="maximum" >
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_startCash" >
|
||||
<property name="maximum" >
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>2000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>Maximum number of players:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Start Cash:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<string>Small Blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_smallBlind" >
|
||||
<property name="maximum" >
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3" >
|
||||
<widget class="QSpinBox" name="spinBox_gameSpeed" >
|
||||
<property name="maximum" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="4" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_Password" >
|
||||
<property name="text" >
|
||||
<string>Password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Password" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>181</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_createGame" >
|
||||
<property name="text" >
|
||||
<string>Create Game</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_cancel" >
|
||||
<property name="text" >
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>spinBox_quantityPlayers</tabstop>
|
||||
<tabstop>spinBox_startCash</tabstop>
|
||||
<tabstop>spinBox_smallBlind</tabstop>
|
||||
<tabstop>spinBox_handsBeforeRaiseSmallBlind</tabstop>
|
||||
<tabstop>spinBox_gameSpeed</tabstop>
|
||||
<tabstop>spinBox_netTimeOutPlayerAction</tabstop>
|
||||
<tabstop>pushButton_createGame</tabstop>
|
||||
<tabstop>pushButton_cancel</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>pushButton_createGame</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>createInternetGameDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>205</x>
|
||||
<y>294</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>87</x>
|
||||
<y>215</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pushButton_cancel</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>createInternetGameDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>286</x>
|
||||
<y>294</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>288</x>
|
||||
<y>190</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>checkBox_Password</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>lineEdit_Password</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>76</x>
|
||||
<y>239</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>146</x>
|
||||
<y>235</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,80 @@
|
||||
/***************************************************************************
|
||||
* 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 "createinternetgamedialogimpl.h"
|
||||
#include "session.h"
|
||||
#include "configfile.h"
|
||||
|
||||
createInternetGameDialogImpl::createInternetGameDialogImpl(QWidget *parent, ConfigFile *c)
|
||||
: QDialog(parent), myConfig(c)
|
||||
{
|
||||
|
||||
setupUi(this);
|
||||
|
||||
fillFormular();
|
||||
|
||||
connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
|
||||
connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
|
||||
|
||||
//temporarely unused until ai is enabled in network
|
||||
// label_5->hide();
|
||||
// spinBox_gameSpeed->hide();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void createInternetGameDialogImpl::exec() {
|
||||
|
||||
fillFormular();
|
||||
QDialog::exec();
|
||||
}
|
||||
|
||||
void createInternetGameDialogImpl::createGame() {
|
||||
|
||||
}
|
||||
|
||||
void createInternetGameDialogImpl::cancel() {
|
||||
|
||||
}
|
||||
|
||||
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"));
|
||||
//temporarely unused until ai is enabled in network
|
||||
spinBox_gameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
|
||||
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
|
||||
}
|
||||
|
||||
void createInternetGameDialogImpl::showDialog() {
|
||||
|
||||
fillFormular();
|
||||
exec();
|
||||
}
|
||||
|
||||
void createInternetGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
|
||||
|
||||
|
||||
if (event->key() == 16777220) { pushButton_createGame->click(); } //ENTER
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/***************************************************************************
|
||||
* 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 CREATEINTERNETGAMEDIALOGIMPL_H
|
||||
#define CREATEINTERNETGAMEDIALOGIMPL_H
|
||||
|
||||
#include "ui_createinternetgamedialog.h"
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
class Session;
|
||||
class ConfigFile;
|
||||
|
||||
class createInternetGameDialogImpl: public QDialog, public Ui::createInternetGameDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
createInternetGameDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
|
||||
|
||||
void exec();
|
||||
|
||||
public slots:
|
||||
|
||||
void createGame();
|
||||
void cancel();
|
||||
void fillFormular();
|
||||
void showDialog();
|
||||
void keyPressEvent ( QKeyEvent * event );
|
||||
private:
|
||||
|
||||
ConfigFile *myConfig;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>315</width>
|
||||
<height>274</height>
|
||||
<width>290</width>
|
||||
<height>272</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@@ -31,76 +31,34 @@
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="4" column="3" >
|
||||
<widget class="QSpinBox" name="spinBox_gameSpeed" >
|
||||
<property name="maximum" >
|
||||
<number>11</number>
|
||||
<item row="4" column="0" colspan="3" >
|
||||
<widget class="QLabel" name="label_5" >
|
||||
<property name="text" >
|
||||
<string>Game Speed for computer opponents:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2" >
|
||||
<widget class="QSpinBox" name="spinBox_handsBeforeRaiseSmallBlind" >
|
||||
<property name="minimum" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>4</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_smallBlind" >
|
||||
<property name="maximum" >
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<string>Small Blind:</string>
|
||||
<string>Hands before raise small blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
<string>Start Cash:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>Maximum number of players:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_startCash" >
|
||||
<property name="maximum" >
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>2000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_quantityPlayers" >
|
||||
<property name="maximum" >
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>7</number>
|
||||
<string>Timeout for player action (sec):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -117,34 +75,76 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
<string>Timeout for player action (sec):</string>
|
||||
<item row="0" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_quantityPlayers" >
|
||||
<property name="maximum" >
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<string>Hands before raise small blind:</string>
|
||||
<item row="1" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_startCash" >
|
||||
<property name="maximum" >
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>2000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2" >
|
||||
<widget class="QSpinBox" name="spinBox_handsBeforeRaiseSmallBlind" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>Maximum number of players:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Start Cash:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<string>Small Blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_smallBlind" >
|
||||
<property name="maximum" >
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3" >
|
||||
<widget class="QSpinBox" name="spinBox_gameSpeed" >
|
||||
<property name="maximum" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3" >
|
||||
<widget class="QLabel" name="label_5" >
|
||||
<property name="text" >
|
||||
<string>Game Speed for computer opponents:</string>
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -209,8 +209,8 @@
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>168</x>
|
||||
<y>217</y>
|
||||
<x>223</x>
|
||||
<y>292</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>87</x>
|
||||
@@ -225,8 +225,8 @@
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>278</x>
|
||||
<y>230</y>
|
||||
<x>304</x>
|
||||
<y>292</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>288</x>
|
||||
|
||||
@@ -33,8 +33,8 @@ createNetworkGameDialogImpl::createNetworkGameDialogImpl(QWidget *parent, Config
|
||||
connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
|
||||
|
||||
//temporarely unused until ai is enabled in network
|
||||
label_5->hide();
|
||||
spinBox_gameSpeed->hide();
|
||||
// label_5->hide();
|
||||
// spinBox_gameSpeed->hide();
|
||||
|
||||
|
||||
}
|
||||
@@ -62,7 +62,7 @@ void createNetworkGameDialogImpl::fillFormular() {
|
||||
spinBox_smallBlind->setValue(myConfig->readConfigInt("NetSmallBlind"));
|
||||
spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("NetHandsBeforeRaiseSmallBlind"));
|
||||
//temporarely unused until ai is enabled in network
|
||||
// spinBox_gameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
|
||||
spinBox_gameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
|
||||
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
|
||||
}
|
||||
|
||||
|
||||
@@ -125,21 +125,5 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pushButton_CreateGame</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>gameLobbyDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>271</x>
|
||||
<y>193</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>125</x>
|
||||
<y>188</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
||||
@@ -46,18 +46,24 @@ void gameLobbyDialogImpl::createGame()
|
||||
{
|
||||
assert(mySession);
|
||||
|
||||
// TODO: don't use hardcoded values
|
||||
GameData gameData;
|
||||
// Set Game Data
|
||||
gameData.maxNumberOfPlayers = myConfig->readConfigInt("NumberOfPlayers");
|
||||
gameData.startMoney = myConfig->readConfigInt("StartCash");
|
||||
gameData.smallBlind = myConfig->readConfigInt("SmallBlind");
|
||||
gameData.handsBeforeRaise = myConfig->readConfigInt("HandsBeforeRaiseSmallBlind");
|
||||
//Speeds
|
||||
gameData.guiSpeed = myConfig->readConfigInt("GameSpeed");
|
||||
|
||||
mySession->clientCreateGame(gameData, myConfig->readConfigString("MyName") + "'s game", "");
|
||||
myCreateInternetGameDialog = new createInternetGameDialogImpl(this, myConfig);
|
||||
myCreateInternetGameDialog->exec();
|
||||
|
||||
if (myCreateInternetGameDialog->result() == QDialog::Accepted ) {
|
||||
|
||||
GameData gameData;
|
||||
// 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.guiSpeed = myCreateInternetGameDialog->spinBox_gameSpeed->value();
|
||||
gameData.playerActionTimeoutSec = myCreateInternetGameDialog->spinBox_netTimeOutPlayerAction->value();
|
||||
|
||||
mySession->clientCreateGame(gameData, myConfig->readConfigString("MyName") + "'s game", "");
|
||||
|
||||
accept();
|
||||
}
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::joinGame()
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
#include "createinternetgamedialogimpl.h"
|
||||
|
||||
class Session;
|
||||
class ConfigFile;
|
||||
|
||||
@@ -48,6 +50,8 @@ private:
|
||||
|
||||
ConfigFile *myConfig;
|
||||
Session *mySession;
|
||||
|
||||
createInternetGameDialogImpl *myCreateInternetGameDialog;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -755,9 +755,7 @@ void mainWindowImpl::callCreateNetworkGameDialog() {
|
||||
gameData.startMoney = myCreateNetworkGameDialog->spinBox_startCash->value();
|
||||
gameData.smallBlind = myCreateNetworkGameDialog->spinBox_smallBlind->value();
|
||||
gameData.handsBeforeRaise = myCreateNetworkGameDialog->spinBox_handsBeforeRaiseSmallBlind->value();
|
||||
//temporarely static until ai is enabled in network
|
||||
// gameData.guiSpeed = myCreateNetworkGameDialog->spinBox_gameSpeed->value();
|
||||
gameData.guiSpeed = 4;
|
||||
gameData.guiSpeed = myCreateNetworkGameDialog->spinBox_gameSpeed->value();
|
||||
gameData.playerActionTimeoutSec = myCreateNetworkGameDialog->spinBox_netTimeOutPlayerAction->value();
|
||||
|
||||
myStartNetworkGameDialog->setSession(&getSession());
|
||||
|
||||
@@ -54,11 +54,11 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
|
||||
// connect( checkBox_showIntro, SIGNAL( clicked() ), this, SLOT( callSelectAvatarDialog()) );
|
||||
|
||||
//temporarely unused until ai is enabled in network
|
||||
label_36->hide();
|
||||
spinBox_netGameSpeed->hide();
|
||||
|
||||
label_18->hide();
|
||||
comboBox_netEngineVersion->hide();
|
||||
// label_36->hide();
|
||||
// spinBox_netGameSpeed->hide();
|
||||
//
|
||||
// label_18->hide();
|
||||
// comboBox_netEngineVersion->hide();
|
||||
}
|
||||
|
||||
void settingsDialogImpl::exec() {
|
||||
@@ -110,9 +110,8 @@ void settingsDialogImpl::exec() {
|
||||
spinBox_netStartCash->setValue(myConfig->readConfigInt("NetStartCash"));
|
||||
spinBox_netSmallBlind->setValue(myConfig->readConfigInt("NetSmallBlind"));
|
||||
spinBox_netHandsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("NetHandsBeforeRaiseSmallBlind"));
|
||||
//temporarely unused until ai is enabled in network
|
||||
// spinBox_netGameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
|
||||
// comboBox_netEngineVersion->setCurrentIndex(myConfig->readConfigInt("NetEngineVersion"));
|
||||
spinBox_netGameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
|
||||
comboBox_netEngineVersion->setCurrentIndex(myConfig->readConfigInt("NetEngineVersion"));
|
||||
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
|
||||
spinBox_serverPort->setValue(myConfig->readConfigInt("ServerPort"));
|
||||
lineEdit_serverPassword->setText(QString::fromUtf8(myConfig->readConfigString("ServerPassword").c_str()));
|
||||
@@ -194,9 +193,8 @@ void settingsDialogImpl::isAccepted() {
|
||||
myConfig->writeConfigInt("NetStartCash", spinBox_netStartCash->value());
|
||||
myConfig->writeConfigInt("NetSmallBlind", spinBox_netSmallBlind->value());
|
||||
myConfig->writeConfigInt("NetHandsBeforeRaiseSmallBlind", spinBox_netHandsBeforeRaiseSmallBlind->value());
|
||||
//temporarely unused until ai is enabled in network
|
||||
// myConfig->writeConfigInt("NetGameSpeed", spinBox_netGameSpeed->value());
|
||||
// myConfig->writeConfigInt("NetEngineVersion", comboBox_netEngineVersion->currentIndex());
|
||||
myConfig->writeConfigInt("NetGameSpeed", spinBox_netGameSpeed->value());
|
||||
myConfig->writeConfigInt("NetEngineVersion", comboBox_netEngineVersion->currentIndex());
|
||||
myConfig->writeConfigInt("NetTimeOutPlayerAction", spinBox_netTimeOutPlayerAction->value());
|
||||
myConfig->writeConfigInt("ServerPort", spinBox_serverPort->value());
|
||||
myConfig->writeConfigString("ServerPassword", lineEdit_serverPassword->text().toUtf8().constData());
|
||||
|
||||
Reference in New Issue
Block a user