add internetgamesettings
This commit is contained in:
@@ -169,6 +169,12 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
|
||||
configList.push_back(ConfigInfo("ServerUseIpv6", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("ServerUseSctp", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("ServerPort", CONFIG_TYPE_INT, "7234"));
|
||||
configList.push_back(ConfigInfo("InternetServerAddress", CONFIG_TYPE_STRING, "pokerth.dyndns.org"));
|
||||
configList.push_back(ConfigInfo("InternetServerPort", CONFIG_TYPE_INT, "7234"));
|
||||
configList.push_back(ConfigInfo("InternetServerUseIpv6", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("InternetServerUseSctp", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("UseInternetGamePassword", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("InternetGamePassword", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("MyName", CONFIG_TYPE_STRING, "Human Player"));
|
||||
configList.push_back(ConfigInfo("MyAvatar", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("Opponent1Name", CONFIG_TYPE_STRING, "Player 1"));
|
||||
|
||||
@@ -168,6 +168,9 @@
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="echoMode" >
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -764,7 +764,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="5" column="0" >
|
||||
<item row="7" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -777,6 +777,26 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_43" >
|
||||
<property name="text" >
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Default </span><span style=" font-weight:600; font-style:italic;">Game Settings</span><span style=" font-style:italic;"> like "</span>Maximum number of players", "<span style=" font-style:italic;">Start Cash" and "Small Blind" will be used </span><span style=" font-weight:600; font-style:italic;">from Network Game Settings.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="Line" name="line_9" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox_4" >
|
||||
<property name="title" >
|
||||
@@ -821,9 +841,6 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="maxLength" >
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="echoMode" >
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
@@ -879,6 +896,33 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_UseInternetGamePassword" >
|
||||
<property name="text" >
|
||||
<string>Use password for private game:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_InternetGamePassword" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="echoMode" >
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_30" >
|
||||
<property name="font" >
|
||||
@@ -892,25 +936,21 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="Line" name="line_9" >
|
||||
<item row="5" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_43" >
|
||||
<property name="text" >
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: </span><span style=" font-weight:600; font-style:italic;">Game Settings</span><span style=" font-style:italic;"> like "</span>Maximum number of players", "<span style=" font-style:italic;">Start Cash" and "Small Blind" will be used </span><span style=" font-weight:600; font-style:italic;">from Network Game Settings.</span></p></body></html></string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -2271,6 +2311,23 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="Line" name="line" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<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>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QListWidget" name="listWidget" >
|
||||
<property name="minimumSize" >
|
||||
@@ -2322,23 +2379,6 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<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>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="Line" name="line" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
@@ -2489,5 +2529,21 @@ p, li { white-space: pre-wrap; }
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>checkBox_UseInternetGamePassword</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>lineEdit_InternetGamePassword</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>294</x>
|
||||
<y>299</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>462</x>
|
||||
<y>300</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
||||
@@ -118,7 +118,13 @@ void settingsDialogImpl::exec() {
|
||||
checkBox_useIpv6->setChecked(myConfig->readConfigInt("ServerUseIpv6"));
|
||||
checkBox_useSctp->setChecked(myConfig->readConfigInt("ServerUseSctp"));
|
||||
|
||||
|
||||
//Internet Game Settings
|
||||
lineEdit_InternetServerAddress->setText(QString::fromUtf8(myConfig->readConfigString("InternetServerAddress").c_str()));
|
||||
spinBox_InternetServerPort->setValue(myConfig->readConfigInt("InternetServerPort"));
|
||||
checkBox_InternetServerUseIpv6->setChecked(myConfig->readConfigInt("InternetServerUseIpv6"));
|
||||
checkBox_InternetServerUseSctp->setChecked(myConfig->readConfigInt("InternetServerUseSctp"));
|
||||
checkBox_UseInternetGamePassword->setChecked(myConfig->readConfigInt("UseInternetGamePassword"));
|
||||
lineEdit_InternetGamePassword->setText(QString::fromUtf8(myConfig->readConfigString("InternetGamePassword").c_str()));
|
||||
|
||||
//Interface
|
||||
checkBox_showLeftToolbox->setChecked(myConfig->readConfigInt("ShowLeftToolBox"));
|
||||
@@ -200,6 +206,14 @@ void settingsDialogImpl::isAccepted() {
|
||||
myConfig->writeConfigString("ServerPassword", lineEdit_serverPassword->text().toUtf8().constData());
|
||||
myConfig->writeConfigInt("ServerUseIpv6", checkBox_useIpv6->isChecked());
|
||||
myConfig->writeConfigInt("ServerUseSctp", checkBox_useSctp->isChecked());
|
||||
|
||||
//Internet Game Settings
|
||||
myConfig->writeConfigString("InternetServerAddress", lineEdit_InternetServerAddress->text().toUtf8().constData());
|
||||
myConfig->writeConfigInt("InternetServerPort", spinBox_InternetServerPort->value());
|
||||
myConfig->writeConfigInt("InternetServerUseIpv6", checkBox_InternetServerUseIpv6->isChecked());
|
||||
myConfig->writeConfigInt("InternetServerUseSctp", checkBox_InternetServerUseSctp->isChecked());
|
||||
myConfig->writeConfigInt("UseInternetGamePassword", checkBox_UseInternetGamePassword->isChecked());
|
||||
myConfig->writeConfigString("InternetGamePassword", lineEdit_InternetGamePassword->text().toUtf8().constData());
|
||||
|
||||
// Interface
|
||||
myConfig->writeConfigInt("ShowLeftToolBox", checkBox_showLeftToolbox->isChecked());
|
||||
|
||||
Reference in New Issue
Block a user