add InternetServerPassword

This commit is contained in:
doitux
2007-08-26 11:40:39 +00:00
parent cdab2c2840
commit ba811cee6f
4 changed files with 60 additions and 40 deletions
+2 -1
View File
@@ -51,7 +51,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
if(strcmp(argv[i], "--nowriteaccess") == 0) { noWriteAccess = 1; }
}
// !!!! Revisionsnummer der Configdefaults !!!!!
configRev = 27;
configRev = 28;
//standard defaults
logOnOffDefault = "1";
@@ -171,6 +171,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(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("InternetServerPassword", CONFIG_TYPE_STRING, ""));
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"));
+13 -10
View File
@@ -6186,19 +6186,12 @@
<property name="text" >
<string>Internet Game ...</string>
</property>
<property name="shortcut" >
<string>Ctrl+I</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>MyRightTabWidget</class>
<extends>QTabWidget</extends>
<header>myrighttabwidget.h</header>
</customwidget>
<customwidget>
<class>MyStatusLabel</class>
<extends>QLabel</extends>
<header>mystatuslabel.h</header>
</customwidget>
<customwidget>
<class>MySetLabel</class>
<extends>QLabel</extends>
@@ -6209,6 +6202,16 @@
<extends>QTabWidget</extends>
<header>mylefttabwidget.h</header>
</customwidget>
<customwidget>
<class>MyRightTabWidget</class>
<extends>QTabWidget</extends>
<header>myrighttabwidget.h</header>
</customwidget>
<customwidget>
<class>MyStatusLabel</class>
<extends>QLabel</extends>
<header>mystatuslabel.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>spinBox_set</tabstop>
+43 -29
View File
@@ -809,10 +809,27 @@ p, li { white-space: pre-wrap; }
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="label_41" >
<item row="4" column="0" >
<widget class="QCheckBox" name="checkBox_InternetServerUseSctp" >
<property name="text" >
<string>Server Address:</string>
<string>Use SCTP</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="checkBox_InternetServerUseIpv6" >
<property name="text" >
<string>Use IPv6</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLabel" name="label_32" >
<property name="text" >
<string>&lt;a href="http://en.wikipedia.org/wiki/Ipv6">What is this?&lt;/a></string>
</property>
<property name="openExternalLinks" >
<bool>true</bool>
</property>
</widget>
</item>
@@ -823,6 +840,16 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLabel" name="label_42" >
<property name="text" >
<string>&lt;a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?&lt;/a></string>
</property>
<property name="openExternalLinks" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QSpinBox" name="spinBox_InternetServerPort" >
<property name="maximum" >
@@ -836,6 +863,13 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_41" >
<property name="text" >
<string>Server Address:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="lineEdit_InternetServerAddress" >
<property name="maxLength" >
@@ -843,37 +877,17 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLabel" name="label_42" >
<item row="2" column="0" >
<widget class="QLabel" name="label_44" >
<property name="text" >
<string>&lt;a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?&lt;/a></string>
</property>
<property name="openExternalLinks" >
<bool>true</bool>
<string>Server Password:</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="label_32" >
<property name="text" >
<string>&lt;a href="http://en.wikipedia.org/wiki/Ipv6">What is this?&lt;/a></string>
</property>
<property name="openExternalLinks" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="checkBox_InternetServerUseIpv6" >
<property name="text" >
<string>Use IPv6</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="checkBox_InternetServerUseSctp" >
<property name="text" >
<string>Use SCTP</string>
<widget class="QLineEdit" name="lineEdit_InternetServerPassword" >
<property name="echoMode" >
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
@@ -121,6 +121,7 @@ void settingsDialogImpl::exec() {
//Internet Game Settings
lineEdit_InternetServerAddress->setText(QString::fromUtf8(myConfig->readConfigString("InternetServerAddress").c_str()));
spinBox_InternetServerPort->setValue(myConfig->readConfigInt("InternetServerPort"));
lineEdit_InternetServerPassword->setText(QString::fromUtf8(myConfig->readConfigString("InternetServerPassword").c_str()));
checkBox_InternetServerUseIpv6->setChecked(myConfig->readConfigInt("InternetServerUseIpv6"));
checkBox_InternetServerUseSctp->setChecked(myConfig->readConfigInt("InternetServerUseSctp"));
checkBox_UseInternetGamePassword->setChecked(myConfig->readConfigInt("UseInternetGamePassword"));
@@ -212,6 +213,7 @@ void settingsDialogImpl::isAccepted() {
//Internet Game Settings
myConfig->writeConfigString("InternetServerAddress", lineEdit_InternetServerAddress->text().toUtf8().constData());
myConfig->writeConfigInt("InternetServerPort", spinBox_InternetServerPort->value());
myConfig->writeConfigString("InternetServerPassword", lineEdit_InternetServerPassword->text().toUtf8().constData());
myConfig->writeConfigInt("InternetServerUseIpv6", checkBox_InternetServerUseIpv6->isChecked());
myConfig->writeConfigInt("InternetServerUseSctp", checkBox_InternetServerUseSctp->isChecked());
myConfig->writeConfigInt("UseInternetGamePassword", checkBox_UseInternetGamePassword->isChecked());