fix guestlogin ok button bug; remove passwort fields for networkgame and

internetserver
This commit is contained in:
doitux
2009-11-15 14:36:56 +00:00
parent f5d0b19320
commit c68e59dad7
5 changed files with 284 additions and 444 deletions
@@ -16,6 +16,7 @@ internetGameLoginDialogImpl::internetGameLoginDialogImpl(QWidget *parent, Config
void internetGameLoginDialogImpl::regUserToggled(bool b) { void internetGameLoginDialogImpl::regUserToggled(bool b) {
checkBox_guest->setChecked(!b); checkBox_guest->setChecked(!b);
okButtonCheck();
} }
void internetGameLoginDialogImpl::guestUserToggled(bool b) { void internetGameLoginDialogImpl::guestUserToggled(bool b) {
@@ -27,6 +28,8 @@ void internetGameLoginDialogImpl::guestUserToggled(bool b) {
lineEdit_password->clear(); lineEdit_password->clear();
lineEdit_username->clear(); lineEdit_username->clear();
} }
okButtonCheck();
} }
void internetGameLoginDialogImpl::exec() { void internetGameLoginDialogImpl::exec() {
+236 -348
View File
@@ -1,7 +1,8 @@
<ui version="4.0" > <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>joinNetworkGameDialog</class> <class>joinNetworkGameDialog</class>
<widget class="QDialog" name="joinNetworkGameDialog" > <widget class="QDialog" name="joinNetworkGameDialog">
<property name="geometry" > <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
@@ -9,254 +10,156 @@
<height>458</height> <height>458</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle">
<string>Join Network Game</string> <string>Join Network Game</string>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout">
<property name="leftMargin" > <property name="margin">
<number>9</number> <number>9</number>
</property> </property>
<property name="topMargin" > <property name="spacing">
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<property name="horizontalSpacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="verticalSpacing" > <item row="1" column="0">
<number>6</number> <layout class="QHBoxLayout">
</property> <property name="spacing">
<item row="0" column="0" > <number>6</number>
<widget class="QGroupBox" name="groupBox" > </property>
<property name="title" > <property name="margin">
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_connect">
<property name="minimumSize">
<size>
<width>198</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Connect</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_close">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Connect to Network Game</string> <string>Connect to Network Game</string>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin" > <item row="0" column="0">
<number>9</number> <widget class="QLabel" name="label_4">
</property> <property name="text">
<property name="topMargin" > <string>Profile Name:</string>
<number>9</number> </property>
</property> <property name="buddy">
<property name="rightMargin" > <cstring>lineEdit_profileName</cstring>
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="3" column="0" colspan="5" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Server Profiles</string>
</property> </property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QTreeWidget" name="treeWidget" >
<property name="alternatingRowColors" >
<bool>true</bool>
</property>
<property name="indentation" >
<number>15</number>
</property>
<property name="rootIsDecorated" >
<bool>false</bool>
</property>
<property name="sortingEnabled" >
<bool>true</bool>
</property>
<property name="animated" >
<bool>true</bool>
</property>
<property name="allColumnsShowFocus" >
<bool>true</bool>
</property>
<column>
<property name="text" >
<string>Name</string>
</property>
</column>
<column>
<property name="text" >
<string>Address</string>
</property>
</column>
<column>
<property name="text" >
<string>Port</string>
</property>
</column>
<column>
<property name="text" >
<string>IPv6</string>
</property>
</column>
<column>
<property name="text" >
<string>SCTP</string>
</property>
</column>
</widget>
</item>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="pushButton_save" >
<property name="text" >
<string>Save</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_delete" >
<property name="text" >
<string>Delete</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="2" column="3" colspan="2" > <item row="0" column="1" colspan="2">
<layout class="QHBoxLayout" > <widget class="QLineEdit" name="lineEdit_profileName">
<property name="spacing" > <property name="text">
<number>6</number> <string>myServerProfile1</string>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property> </property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QCheckBox" name="checkBox_sctp" > <widget class="QLabel" name="label">
<property name="text" > <property name="text">
<string>Use SCTP</string> <string>IP Address / Domain Name:</string>
</property>
<property name="buddy">
<cstring>lineEdit_ipAddress</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_6" > <widget class="QLineEdit" name="lineEdit_ipAddress"/>
<property name="text" > </item>
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <item>
p, li { white-space: pre-wrap; } <widget class="QLabel" name="label_2">
&lt;/style>&lt;/head>&lt;body style=" font-weight:400; font-style:normal; text-decoration:none;"> <property name="text">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> &lt;a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">&lt;span style=" text-decoration: underline; color:#0000ff;">What is this?&lt;/span>&lt;/a>&lt;/p>&lt;/body>&lt;/html></string> <string>Port:</string>
</property> </property>
<property name="openExternalLinks" > <property name="buddy">
<bool>true</bool> <cstring>spinBox_port</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer> <widget class="QSpinBox" name="spinBox_port">
<property name="orientation" > <property name="minimum">
<enum>Qt::Horizontal</enum> <number>80</number>
</property> </property>
<property name="sizeHint" > <property name="maximum">
<size> <number>65535</number>
<width>40</width>
<height>20</height>
</size>
</property> </property>
</spacer> <property name="value">
<number>7234</number>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="0" colspan="2" > <item row="2" column="0" colspan="2">
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<property name="leftMargin" > <property name="margin">
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QCheckBox" name="checkBox_ipv6" > <widget class="QCheckBox" name="checkBox_ipv6">
<property name="text" > <property name="text">
<string>Use IPv6</string> <string>Use IPv6</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_5" > <widget class="QLabel" name="label_5">
<property name="text" > <property name="text">
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-weight:400; font-style:normal; text-decoration:none;"> &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> &lt;a href="http://en.wikipedia.org/wiki/Ipv6">&lt;span style=" text-decoration: underline; color:#0000ff;">What is this?&lt;/span>&lt;/a>&lt;/p>&lt;/body>&lt;/html></string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Ipv6&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;What is this?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="openExternalLinks" > <property name="openExternalLinks">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>131</width> <width>131</width>
<height>20</height> <height>20</height>
@@ -266,157 +169,142 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</item> </item>
<item rowspan="2" row="0" column="2" > <item row="2" column="2">
<spacer> <layout class="QHBoxLayout">
<property name="orientation" > <property name="spacing">
<enum>Qt::Horizontal</enum> <number>6</number>
</property> </property>
<property name="sizeType" > <property name="margin">
<enum>QSizePolicy::Fixed</enum> <number>0</number>
</property> </property>
<property name="sizeHint" > <item>
<size> <widget class="QCheckBox" name="checkBox_sctp">
<width>16</width> <property name="text">
<height>57</height> <string>Use SCTP</string>
</size> </property>
</property> </widget>
</spacer> </item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;What is this?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
<item row="0" column="1" > <item row="3" column="0" colspan="3">
<widget class="QLineEdit" name="lineEdit_ipAddress" /> <widget class="QGroupBox" name="groupBox_2">
</item> <property name="title">
<item row="0" column="4" > <string>Server Profiles</string>
<widget class="QLineEdit" name="lineEdit_password" >
<property name="maxLength" >
<number>60</number>
</property>
<property name="echoMode" >
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="0" column="3" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Password (optional):</string>
</property>
<property name="buddy" >
<cstring>lineEdit_password</cstring>
</property>
</widget>
</item>
<item row="1" column="4" >
<widget class="QSpinBox" name="spinBox_port" >
<property name="minimum" >
<number>80</number>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" >
<number>7234</number>
</property>
</widget>
</item>
<item row="1" column="3" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Port:</string>
</property>
<property name="buddy" >
<cstring>spinBox_port</cstring>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>IP Address / Domain Name:</string>
</property>
<property name="buddy" >
<cstring>lineEdit_ipAddress</cstring>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Profile Name:</string>
</property>
<property name="buddy" >
<cstring>lineEdit_profileName</cstring>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="lineEdit_profileName" >
<property name="text" >
<string>myServerProfile1</string>
</property> </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="QTreeWidget" name="treeWidget">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="indentation">
<number>15</number>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<property name="animated">
<bool>true</bool>
</property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<column>
<property name="text">
<string>Name</string>
</property>
</column>
<column>
<property name="text">
<string>Address</string>
</property>
</column>
<column>
<property name="text">
<string>Port</string>
</property>
</column>
<column>
<property name="text">
<string>IPv6</string>
</property>
</column>
<column>
<property name="text">
<string>SCTP</string>
</property>
</column>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="pushButton_save">
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_delete">
<property name="text">
<string>Delete</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_connect" >
<property name="minimumSize" >
<size>
<width>198</width>
<height>0</height>
</size>
</property>
<property name="text" >
<string>Connect</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_close" >
<property name="text" >
<string>Close</string>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>lineEdit_ipAddress</tabstop> <tabstop>lineEdit_ipAddress</tabstop>
<tabstop>lineEdit_password</tabstop>
<tabstop>lineEdit_profileName</tabstop>
<tabstop>spinBox_port</tabstop>
<tabstop>checkBox_ipv6</tabstop> <tabstop>checkBox_ipv6</tabstop>
<tabstop>checkBox_sctp</tabstop> <tabstop>checkBox_sctp</tabstop>
<tabstop>treeWidget</tabstop> <tabstop>treeWidget</tabstop>
@@ -433,11 +321,11 @@ p, li { white-space: pre-wrap; }
<receiver>joinNetworkGameDialog</receiver> <receiver>joinNetworkGameDialog</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel" > <hint type="sourcelabel">
<x>376</x> <x>376</x>
<y>447</y> <y>447</y>
</hint> </hint>
<hint type="destinationlabel" > <hint type="destinationlabel">
<x>33</x> <x>33</x>
<y>422</y> <y>422</y>
</hint> </hint>
@@ -449,11 +337,11 @@ p, li { white-space: pre-wrap; }
<receiver>joinNetworkGameDialog</receiver> <receiver>joinNetworkGameDialog</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel" > <hint type="sourcelabel">
<x>548</x> <x>548</x>
<y>429</y> <y>429</y>
</hint> </hint>
<hint type="destinationlabel" > <hint type="destinationlabel">
<x>483</x> <x>483</x>
<y>428</y> <y>428</y>
</hint> </hint>
@@ -465,11 +353,11 @@ p, li { white-space: pre-wrap; }
<receiver>pushButton_connect</receiver> <receiver>pushButton_connect</receiver>
<slot>click()</slot> <slot>click()</slot>
<hints> <hints>
<hint type="sourcelabel" > <hint type="sourcelabel">
<x>113</x> <x>113</x>
<y>206</y> <y>206</y>
</hint> </hint>
<hint type="destinationlabel" > <hint type="destinationlabel">
<x>394</x> <x>394</x>
<y>427</y> <y>427</y>
</hint> </hint>
@@ -170,7 +170,6 @@ void joinNetworkGameDialogImpl::itemFillForm (QTreeWidgetItem* item, int /*colum
lineEdit_profileName->setText(QString::fromUtf8(profile->Attribute("Name"))); lineEdit_profileName->setText(QString::fromUtf8(profile->Attribute("Name")));
lineEdit_ipAddress->setText(QString::fromUtf8(profile->Attribute("Address"))); lineEdit_ipAddress->setText(QString::fromUtf8(profile->Attribute("Address")));
lineEdit_password->setText(QString::fromUtf8(profile->Attribute("Password")));
spinBox_port->setValue(QString::fromUtf8(profile->Attribute("Port")).toInt(&toIntTrue, 10)); spinBox_port->setValue(QString::fromUtf8(profile->Attribute("Port")).toInt(&toIntTrue, 10));
checkBox_ipv6->setChecked(QString::fromUtf8(profile->Attribute("IsIpv6")).toInt(&toIntTrue, 10)); checkBox_ipv6->setChecked(QString::fromUtf8(profile->Attribute("IsIpv6")).toInt(&toIntTrue, 10));
checkBox_sctp->setChecked(QString::fromUtf8(profile->Attribute("IsSctp")).toInt(&toIntTrue, 10)); checkBox_sctp->setChecked(QString::fromUtf8(profile->Attribute("IsSctp")).toInt(&toIntTrue, 10));
@@ -211,8 +210,7 @@ void joinNetworkGameDialogImpl::saveServerProfile() {
TiXmlElement * profile1 = new TiXmlElement( lineEdit_profileName->text().toUtf8().constData() ); TiXmlElement * profile1 = new TiXmlElement( lineEdit_profileName->text().toUtf8().constData() );
profiles->LinkEndChild( profile1 ); profiles->LinkEndChild( profile1 );
profile1->SetAttribute("Name", lineEdit_profileName->text().toUtf8().constData()); profile1->SetAttribute("Name", lineEdit_profileName->text().toUtf8().constData());
profile1->SetAttribute("Address", lineEdit_ipAddress->text().toUtf8().constData()); profile1->SetAttribute("Address", lineEdit_ipAddress->text().toUtf8().constData());
profile1->SetAttribute("Password", lineEdit_password->text().toUtf8().constData());
profile1->SetAttribute("Port", spinBox_port->value()); profile1->SetAttribute("Port", spinBox_port->value());
profile1->SetAttribute("IsIpv6", checkBox_ipv6->isChecked()); profile1->SetAttribute("IsIpv6", checkBox_ipv6->isChecked());
profile1->SetAttribute("IsSctp", checkBox_sctp->isChecked()); profile1->SetAttribute("IsSctp", checkBox_sctp->isChecked());
@@ -233,7 +231,6 @@ void joinNetworkGameDialogImpl::saveServerProfile() {
profiles->LinkEndChild( profile2 ); profiles->LinkEndChild( profile2 );
profile2->SetAttribute("Name", lineEdit_profileName->text().toUtf8().constData()); profile2->SetAttribute("Name", lineEdit_profileName->text().toUtf8().constData());
profile2->SetAttribute("Address", lineEdit_ipAddress->text().toUtf8().constData()); profile2->SetAttribute("Address", lineEdit_ipAddress->text().toUtf8().constData());
profile2->SetAttribute("Password", lineEdit_password->text().toUtf8().constData());
profile2->SetAttribute("Port", spinBox_port->value()); profile2->SetAttribute("Port", spinBox_port->value());
profile2->SetAttribute("IsIpv6", checkBox_ipv6->isChecked()); profile2->SetAttribute("IsIpv6", checkBox_ipv6->isChecked());
profile2->SetAttribute("IsSctp", checkBox_sctp->isChecked()); profile2->SetAttribute("IsSctp", checkBox_sctp->isChecked());
+44 -88
View File
@@ -125,7 +125,7 @@
<item> <item>
<widget class="QStackedWidget" name="stackedWidget"> <widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>5</number>
</property> </property>
<widget class="QWidget" name="page"> <widget class="QWidget" name="page">
<layout class="QGridLayout" name="gridLayout_8"> <layout class="QGridLayout" name="gridLayout_8">
@@ -1363,80 +1363,48 @@ p, li { white-space: pre-wrap; }
<property name="title"> <property name="title">
<string>Network Server Settings</string> <string>Network Server Settings</string>
</property> </property>
<layout class="QGridLayout"> <layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin"> <item row="0" column="0" colspan="2">
<number>6</number> <layout class="QHBoxLayout" name="horizontalLayout_5">
</property> <item>
<property name="topMargin"> <widget class="QLabel" name="label_16">
<number>0</number> <property name="text">
</property> <string>Server Port:</string>
<property name="rightMargin"> </property>
<number>6</number> <property name="buddy">
</property> <cstring>spinBox_serverPort</cstring>
<property name="bottomMargin"> </property>
<number>6</number> </widget>
</property> </item>
<property name="spacing"> <item>
<number>6</number> <widget class="QSpinBox" name="spinBox_serverPort">
</property> <property name="sizePolicy">
<item row="1" column="1"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<widget class="QLineEdit" name="lineEdit_serverPassword"> <horstretch>0</horstretch>
<property name="maxLength"> <verstretch>0</verstretch>
<number>60</number> </sizepolicy>
</property> </property>
<property name="echoMode"> <property name="minimum">
<enum>QLineEdit::Password</enum> <number>80</number>
</property> </property>
</widget> <property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>7234</number>
</property>
</widget>
</item>
</layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_37">
<property name="text">
<string>Server Password:</string>
</property>
<property name="buddy">
<cstring>lineEdit_serverPassword</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBox_serverPort">
<property name="minimum">
<number>80</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>7234</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Server Port:</string>
</property>
<property name="buddy">
<cstring>spinBox_serverPort</cstring>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="checkBox_useSctp">
<property name="text">
<string>Use SCTP</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="checkBox_useIpv6"> <widget class="QCheckBox" name="checkBox_useIpv6">
<property name="text"> <property name="text">
<string>Use IPv6</string> <string>Use IPv6</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="1" column="1">
<widget class="QLabel" name="label_22"> <widget class="QLabel" name="label_22">
<property name="text"> <property name="text">
<string>&lt;a href=&quot;http://en.wikipedia.org/wiki/Ipv6&quot;&gt;What is this?&lt;/a&gt;</string> <string>&lt;a href=&quot;http://en.wikipedia.org/wiki/Ipv6&quot;&gt;What is this?&lt;/a&gt;</string>
@@ -1446,7 +1414,14 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="2" column="0">
<widget class="QCheckBox" name="checkBox_useSctp">
<property name="text">
<string>Use SCTP</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_24"> <widget class="QLabel" name="label_24">
<property name="text"> <property name="text">
<string>&lt;a href=&quot;http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol&quot;&gt;What is this?&lt;/a&gt;</string> <string>&lt;a href=&quot;http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol&quot;&gt;What is this?&lt;/a&gt;</string>
@@ -1611,30 +1586,13 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="label_44">
<property name="text">
<string>Server Password:</string>
</property>
<property name="buddy">
<cstring>lineEdit_InternetServerPassword</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_InternetServerPassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="checkBox_useAvatarServer"> <widget class="QCheckBox" name="checkBox_useAvatarServer">
<property name="text"> <property name="text">
<string>Avatar Server:</string> <string>Avatar Server:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_avatarServerAddress"/> <widget class="QLineEdit" name="lineEdit_avatarServerAddress"/>
</item> </item>
</layout> </layout>
@@ -3390,7 +3348,6 @@ p, li { white-space: pre-wrap; }
<tabstop>spinBox_netDelayBetweenHands</tabstop> <tabstop>spinBox_netDelayBetweenHands</tabstop>
<tabstop>spinBox_netTimeOutPlayerAction</tabstop> <tabstop>spinBox_netTimeOutPlayerAction</tabstop>
<tabstop>spinBox_serverPort</tabstop> <tabstop>spinBox_serverPort</tabstop>
<tabstop>lineEdit_serverPassword</tabstop>
<tabstop>checkBox_useIpv6</tabstop> <tabstop>checkBox_useIpv6</tabstop>
<tabstop>checkBox_useSctp</tabstop> <tabstop>checkBox_useSctp</tabstop>
<tabstop>groupBox_automaticServerConfig</tabstop> <tabstop>groupBox_automaticServerConfig</tabstop>
@@ -3398,7 +3355,6 @@ p, li { white-space: pre-wrap; }
<tabstop>groupBox_manualServerConfig</tabstop> <tabstop>groupBox_manualServerConfig</tabstop>
<tabstop>lineEdit_InternetServerAddress</tabstop> <tabstop>lineEdit_InternetServerAddress</tabstop>
<tabstop>spinBox_InternetServerPort</tabstop> <tabstop>spinBox_InternetServerPort</tabstop>
<tabstop>lineEdit_InternetServerPassword</tabstop>
<tabstop>checkBox_useAvatarServer</tabstop> <tabstop>checkBox_useAvatarServer</tabstop>
<tabstop>lineEdit_avatarServerAddress</tabstop> <tabstop>lineEdit_avatarServerAddress</tabstop>
<tabstop>checkBox_InternetServerUseIpv6</tabstop> <tabstop>checkBox_InternetServerUseIpv6</tabstop>
@@ -183,7 +183,6 @@ void settingsDialogImpl::exec() {
spinBox_netDelayBetweenHands->setValue(myConfig->readConfigInt("NetDelayBetweenHands")); spinBox_netDelayBetweenHands->setValue(myConfig->readConfigInt("NetDelayBetweenHands"));
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction")); spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
spinBox_serverPort->setValue(myConfig->readConfigInt("ServerPort")); spinBox_serverPort->setValue(myConfig->readConfigInt("ServerPort"));
lineEdit_serverPassword->setText(QString::fromUtf8(myConfig->readConfigString("ServerPassword").c_str()));
checkBox_useIpv6->setChecked(myConfig->readConfigInt("ServerUseIpv6")); checkBox_useIpv6->setChecked(myConfig->readConfigInt("ServerUseIpv6"));
checkBox_useSctp->setChecked(myConfig->readConfigInt("ServerUseSctp")); checkBox_useSctp->setChecked(myConfig->readConfigInt("ServerUseSctp"));
@@ -193,7 +192,6 @@ void settingsDialogImpl::exec() {
lineEdit_InternetServerListAddress->setText(QString::fromUtf8(myConfig->readConfigString("InternetServerListAddress").c_str())); lineEdit_InternetServerListAddress->setText(QString::fromUtf8(myConfig->readConfigString("InternetServerListAddress").c_str()));
lineEdit_InternetServerAddress->setText(QString::fromUtf8(myConfig->readConfigString("InternetServerAddress").c_str())); lineEdit_InternetServerAddress->setText(QString::fromUtf8(myConfig->readConfigString("InternetServerAddress").c_str()));
spinBox_InternetServerPort->setValue(myConfig->readConfigInt("InternetServerPort")); spinBox_InternetServerPort->setValue(myConfig->readConfigInt("InternetServerPort"));
lineEdit_InternetServerPassword->setText(QString::fromUtf8(myConfig->readConfigString("InternetServerPassword").c_str()));
checkBox_InternetServerUseIpv6->setChecked(myConfig->readConfigInt("InternetServerUseIpv6")); checkBox_InternetServerUseIpv6->setChecked(myConfig->readConfigInt("InternetServerUseIpv6"));
checkBox_InternetServerUseSctp->setChecked(myConfig->readConfigInt("InternetServerUseSctp")); checkBox_InternetServerUseSctp->setChecked(myConfig->readConfigInt("InternetServerUseSctp"));
if(myConfig->readConfigInt("UseAvatarServer")) { if(myConfig->readConfigInt("UseAvatarServer")) {
@@ -486,7 +484,6 @@ void settingsDialogImpl::isAccepted() {
myConfig->writeConfigInt("NetDelayBetweenHands", spinBox_netDelayBetweenHands->value()); myConfig->writeConfigInt("NetDelayBetweenHands", spinBox_netDelayBetweenHands->value());
myConfig->writeConfigInt("NetTimeOutPlayerAction", spinBox_netTimeOutPlayerAction->value()); myConfig->writeConfigInt("NetTimeOutPlayerAction", spinBox_netTimeOutPlayerAction->value());
myConfig->writeConfigInt("ServerPort", spinBox_serverPort->value()); myConfig->writeConfigInt("ServerPort", spinBox_serverPort->value());
myConfig->writeConfigString("ServerPassword", lineEdit_serverPassword->text().toUtf8().constData());
myConfig->writeConfigInt("ServerUseIpv6", checkBox_useIpv6->isChecked()); myConfig->writeConfigInt("ServerUseIpv6", checkBox_useIpv6->isChecked());
myConfig->writeConfigInt("ServerUseSctp", checkBox_useSctp->isChecked()); myConfig->writeConfigInt("ServerUseSctp", checkBox_useSctp->isChecked());
@@ -516,7 +513,6 @@ void settingsDialogImpl::isAccepted() {
myConfig->writeConfigInt("InternetServerConfigMode", 1); myConfig->writeConfigInt("InternetServerConfigMode", 1);
myConfig->writeConfigString("InternetServerAddress", lineEdit_InternetServerAddress->text().toUtf8().constData()); myConfig->writeConfigString("InternetServerAddress", lineEdit_InternetServerAddress->text().toUtf8().constData());
myConfig->writeConfigInt("InternetServerPort", spinBox_InternetServerPort->value()); myConfig->writeConfigInt("InternetServerPort", spinBox_InternetServerPort->value());
myConfig->writeConfigString("InternetServerPassword", lineEdit_InternetServerPassword->text().toUtf8().constData());
} }
if(checkBox_useAvatarServer->isChecked()) { if(checkBox_useAvatarServer->isChecked()) {
myConfig->writeConfigInt("UseAvatarServer", 1); myConfig->writeConfigInt("UseAvatarServer", 1);