some settingsdialog fixes. lobby changes

This commit is contained in:
doitux
2007-08-26 08:02:07 +00:00
parent a4a62597ca
commit 1246a68c84
5 changed files with 154 additions and 40 deletions
@@ -64,6 +64,11 @@ void createInternetGameDialogImpl::fillFormular() {
//temporarely unused until ai is enabled in network
spinBox_gameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
checkBox_Password->setChecked(myConfig->readConfigInt("UseInternetGamePassword"));
if(myConfig->readConfigInt("UseInternetGamePassword")) {
lineEdit_Password->setText(QString::fromUtf8(myConfig->readConfigString("InternetGamePassword").c_str()));
}
}
void createInternetGameDialogImpl::showDialog() {
+134 -34
View File
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>476</width>
<height>470</height>
<width>636</width>
<height>584</height>
</rect>
</property>
<property name="windowTitle" >
@@ -19,13 +19,124 @@
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QTreeWidget" name="treeWidget_GameList" >
<column>
<property name="text" >
<string>Game</string>
<item rowspan="4" row="0" column="1" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Game Info</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
</column>
<property name="spacing" >
<number>6</number>
</property>
<item row="3" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" colspan="2" >
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="1" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="label_6" >
<property name="text" >
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Hands to raise small blind:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Small Blind:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Start Cash:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" colspan="2" >
<widget class="QTreeWidget" name="treeWidget" >
<property name="minimumSize" >
<size>
<width>221</width>
<height>0</height>
</size>
</property>
<column>
<property name="text" >
<string>In Game</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" >
@@ -56,6 +167,20 @@
</layout>
</widget>
</item>
<item row="0" column="0" >
<widget class="QTreeWidget" name="treeWidget_GameList" >
<column>
<property name="text" >
<string>Game</string>
</property>
</column>
<column>
<property name="text" >
<string>Player</string>
</property>
</column>
</widget>
</item>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<property name="margin" >
@@ -91,13 +216,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_Cancel" >
<property name="text" >
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
@@ -105,25 +223,7 @@
<tabstops>
<tabstop>treeWidget_GameList</tabstop>
<tabstop>pushButton_CreateGame</tabstop>
<tabstop>pushButton_Cancel</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>pushButton_Cancel</sender>
<signal>clicked()</signal>
<receiver>gameLobbyDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>465</x>
<y>213</y>
</hint>
<hint type="destinationlabel" >
<x>276</x>
<y>163</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>
+4 -4
View File
@@ -2536,12 +2536,12 @@ p, li { white-space: pre-wrap; }
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>294</x>
<y>299</y>
<x>409</x>
<y>334</y>
</hint>
<hint type="destinationlabel" >
<x>462</x>
<y>300</y>
<x>580</x>
<y>336</y>
</hint>
</hints>
</connection>
@@ -51,7 +51,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
connect( pushButton_Opponent5Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile5()) );
connect( pushButton_Opponent6Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile6()) );
// connect( checkBox_showIntro, SIGNAL( clicked() ), this, SLOT( callSelectAvatarDialog()) );
connect( checkBox_UseInternetGamePassword, SIGNAL( toggled(bool) ), this, SLOT( clearInternetGamePassword(bool)) );
//temporarely unused until ai is enabled in network
// label_36->hide();
@@ -124,7 +124,9 @@ void settingsDialogImpl::exec() {
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()));
if(myConfig->readConfigInt("UseInternetGamePassword")) {
lineEdit_InternetGamePassword->setText(QString::fromUtf8(myConfig->readConfigString("InternetGamePassword").c_str()));
}
//Interface
checkBox_showLeftToolbox->setChecked(myConfig->readConfigInt("ShowLeftToolBox"));
@@ -346,3 +348,8 @@ void settingsDialogImpl::setLogDir()
if (!dir.isEmpty()) lineEdit_logDir->setText(dir);
}
void settingsDialogImpl::clearInternetGamePassword(bool clear) {
if(!clear) { lineEdit_InternetGamePassword->clear(); }
}
@@ -57,6 +57,8 @@ public slots:
void callSelectAvatarDialog() { mySelectAvatarDialogImpl->exec(); }
void clearInternetGamePassword(bool);
private:
bool playerNickIsChanged;