checkBox_fillUpWithComputerOpponents added; some startnetworkgamedialog behaviour changes

This commit is contained in:
doitux
2007-09-03 22:51:00 +00:00
parent dee51b3df2
commit 95467e0b96
9 changed files with 104 additions and 67 deletions
+2 -1
View File
@@ -145,7 +145,8 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
configList.push_back(ConfigInfo("ShowFadeOutCardsAnimation", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("ShowFlipCardsAnimation", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("ShowBlindButtons", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("AntiPeekMode", CONFIG_TYPE_INT, "0")); configList.push_back(ConfigInfo("PlaySoundEffects", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("AntiPeekMode", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("PlaySoundEffects", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("SoundVolume", CONFIG_TYPE_INT, "8"));
configList.push_back(ConfigInfo("FlipsideTux", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("FlipsideOwn", CONFIG_TYPE_INT, "0"));
+11 -4
View File
@@ -187,7 +187,7 @@
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="3" column="0" >
<item row="4" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
@@ -215,7 +215,7 @@
</column>
</widget>
</item>
<item row="1" column="0" >
<item row="2" column="0" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>6</number>
@@ -277,14 +277,14 @@
</item>
</layout>
</item>
<item row="4" column="0" >
<item row="5" column="0" >
<widget class="QPushButton" name="pushButton_Leave" >
<property name="text" >
<string>Leave</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<item row="3" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
@@ -391,6 +391,13 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="checkBox_fillUpWithComputerOpponents" >
<property name="text" >
<string>Fill up with computer opponents</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -174,6 +174,7 @@ void gameLobbyDialogImpl::clearDialog()
pushButton_Leave->hide();
pushButton_Kick->hide();
pushButton_StartGame->hide();
checkBox_fillUpWithComputerOpponents->hide();
treeWidget_GameList->setColumnWidth(0,250);
treeWidget_GameList->setColumnWidth(1,75);
+6 -37
View File
@@ -164,6 +164,9 @@
</property>
<item row="0" column="0" >
<widget class="MyLeftTabWidget" name="tabWidget_Left" >
<property name="focusPolicy" >
<enum>Qt::NoFocus</enum>
</property>
<property name="currentIndex" >
<number>0</number>
</property>
@@ -947,6 +950,9 @@
</property>
<item row="0" column="0" >
<widget class="MyRightTabWidget" name="tabWidget_Right" >
<property name="focusPolicy" >
<enum>Qt::NoFocus</enum>
</property>
<property name="currentIndex" >
<number>0</number>
</property>
@@ -975,43 +981,6 @@
</property>
<item row="0" column="0" >
<widget class="QTextBrowser" name="textBrowser_Log" >
<property name="palette" >
<palette>
<active>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>30</red>
<green>80</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>30</red>
<green>80</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>30</red>
<green>80</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="focusPolicy" >
<enum>Qt::NoFocus</enum>
</property>
+2
View File
@@ -414,6 +414,8 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
textBrowser_Log->setStyleSheet("QTextBrowser { "+ font1String +" font-size: 11px; color: white; background-color: #1D3B00; border:none; }");
#else
textBrowser_Log->setStyleSheet("QTextBrowser { "+ font1String +" font-size: 10px; color: white; background-color: #1D3B00; border:none; }");
// textBrowser_Log->verticalScrollBar()->setStyleSheet("background: yellow");
// textBrowser_Log->verticalScrollBar()->setAutoFillBackground ( TRUE );
textBrowser_Chat->setStyleSheet("QTextBrowser { "+ font1String +" font-size: 10px; color: white; background-color: #1D3B00; border:none; }");
lineEdit_ChatInput->setStyleSheet("QLineEdit { "+ font1String +" font-size: 10px; color: white; background-color: #1D3B00; border-top: 2px solid #286400; }");
#endif
+64 -15
View File
@@ -6,29 +6,53 @@
<x>0</x>
<y>0</y>
<width>311</width>
<height>470</height>
<height>547</height>
</rect>
</property>
<property name="windowTitle" >
<string>Start Network Game</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<property name="leftMargin" >
<number>9</number>
</property>
<property name="spacing" >
<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>
<item row="2" column="0" >
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="3" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Lobby-Chat</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<property name="leftMargin" >
<number>7</number>
</property>
<property name="spacing" >
<property name="topMargin" >
<number>7</number>
</property>
<property name="rightMargin" >
<number>7</number>
</property>
<property name="bottomMargin" >
<number>7</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
@@ -40,21 +64,30 @@
</layout>
</widget>
</item>
<item row="3" column="0" >
<item row="4" column="0" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0" >
<item row="5" column="0" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<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" >
@@ -93,14 +126,23 @@
</column>
</widget>
</item>
<item row="1" column="0" >
<item row="2" column="0" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<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="QLabel" name="label" >
<property name="text" >
@@ -137,6 +179,13 @@
</item>
</layout>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="checkBox_fillUpWithComputerOpponents" >
<property name="text" >
<string>Fill up with computer opponents</string>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
@@ -138,20 +138,28 @@ void startNetworkGameDialogImpl::kickPlayer() {
void startNetworkGameDialogImpl::checkPlayerQuantity() {
if (treeWidget->topLevelItemCount() >= 2 && isAdmin) {
pushButton_startGame->setEnabled(true);
if(isAdmin){
pushButton_Kick->show();
pushButton_startGame->show();
checkBox_fillUpWithComputerOpponents->show();
if (treeWidget->topLevelItemCount() >= 2) {
pushButton_startGame->setEnabled(true);
}
else {
pushButton_startGame->setEnabled(false);
}
}
else {
pushButton_startGame->setEnabled(false);
}
}
void startNetworkGameDialogImpl::clearDialog()
{
pushButton_Kick->hide();
pushButton_startGame->hide();
pushButton_Kick->setEnabled(false);
pushButton_startGame->setEnabled(false);
treeWidget->clear();
checkBox_fillUpWithComputerOpponents->hide();
}
void startNetworkGameDialogImpl::setSession(Session *session)