shows new blinds settings in lobby dialog
This commit is contained in:
+137
-82
@@ -98,7 +98,7 @@
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>259</width>
|
||||
<width>270</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -163,111 +163,166 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<layout class="QGridLayout" >
|
||||
<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 name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="label_gameDesc4" >
|
||||
<property name="text" >
|
||||
<string>Hands before raise blinds:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLabel" name="label_SmallBlind" >
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_gameDesc1" >
|
||||
<property name="text" >
|
||||
<string>Maximum number of players:</string>
|
||||
<string>Maximum number of players: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_gameDesc3" >
|
||||
<property name="text" >
|
||||
<string>Small Blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLabel" name="label_StartCash" >
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_MaximumNumberOfPlayers" >
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLabel" name="label_HandsToRaiseSmallBlind" >
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_gameDesc2" >
|
||||
<property name="text" >
|
||||
<string>Start Cash:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="label_gameDesc5" >
|
||||
<property name="text" >
|
||||
<string>Timeout for player action (sec):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QLabel" name="label_TimeoutForPlayerAction" >
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_gameDesc2" >
|
||||
<property name="text" >
|
||||
<string>Start Cash: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_StartCash" >
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_gameDesc3" >
|
||||
<property name="text" >
|
||||
<string>First small blind: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_SmallBlind" >
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_gameDesc4" >
|
||||
<property name="text" >
|
||||
<string>Blinds raise intervall: </string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_blindsRaiseIntervall" >
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_gameDesc5" >
|
||||
<property name="text" >
|
||||
<string>Blinds raise mode: </string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_blindsRaiseMode" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="8" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_gameDesc6" >
|
||||
<property name="text" >
|
||||
<string>Manual blinds list:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_blindsList" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="9" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_gameDesc7" >
|
||||
<property name="text" >
|
||||
<string>Timeout for player action (sec): </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_TimeoutForPlayerAction" >
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="10" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>125</width>
|
||||
<height>71</height>
|
||||
<width>248</width>
|
||||
<height>91</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<item row="11" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
|
||||
@@ -123,7 +123,28 @@ void gameLobbyDialogImpl::createGame()
|
||||
label_SmallBlind->setText(QString::number(gameData.smallBlind));
|
||||
label_StartCash->setText(QString::number(gameData.startMoney));
|
||||
label_MaximumNumberOfPlayers->setText(QString::number(gameData.maxNumberOfPlayers));
|
||||
label_HandsToRaiseSmallBlind->setText(QString::number(gameData.handsBeforeRaise));
|
||||
|
||||
if(gameData.raiseIntervalMode == RAISE_ON_HANDNUMBER) { label_blindsRaiseIntervall->setText(QString::number(gameData.raiseSmallBlindEveryHandsValue)+" "+tr("hands")); }
|
||||
else { label_blindsRaiseIntervall->setText(QString::number(gameData.raiseSmallBlindEveryMinutesValue)+" "+tr("minutes")); }
|
||||
if(gameData.raiseMode == DOUBLE_BLINDS) {
|
||||
label_blindsRaiseMode->setText(tr("double blinds"));
|
||||
label_blindsList->hide();
|
||||
label_gameDesc6->hide();
|
||||
}
|
||||
else {
|
||||
label_blindsRaiseMode->setText(tr("manual blinds order"));
|
||||
label_blindsList->show();
|
||||
label_gameDesc6->show();
|
||||
|
||||
QString blindsListString;
|
||||
std::list<int>::iterator it1;
|
||||
for(it1= gameData.manualBlindsList.begin(); it1 != gameData.manualBlindsList.end(); it1++) {
|
||||
blindsListString.append(QString::number(*it1,10)).append(", ");
|
||||
}
|
||||
blindsListString.remove(blindsListString.length()-2,2);
|
||||
label_blindsList->setText(blindsListString);
|
||||
}
|
||||
|
||||
label_TimeoutForPlayerAction->setText(QString::number(gameData.playerActionTimeoutSec));
|
||||
|
||||
mySession->clientCreateGame(gameData, myConfig->readConfigString("MyName") + "'s "+ gameString.toUtf8().constData(), myCreateInternetGameDialog->lineEdit_Password->text().toUtf8().constData());
|
||||
@@ -184,7 +205,28 @@ void gameLobbyDialogImpl::gameSelected(QTreeWidgetItem* item, QTreeWidgetItem*)
|
||||
label_SmallBlind->setText(QString::number(info.data.smallBlind));
|
||||
label_StartCash->setText(QString::number(info.data.startMoney));
|
||||
label_MaximumNumberOfPlayers->setText(QString::number(info.data.maxNumberOfPlayers));
|
||||
label_HandsToRaiseSmallBlind->setText(QString::number(info.data.handsBeforeRaise));
|
||||
|
||||
if(info.data.raiseIntervalMode == RAISE_ON_HANDNUMBER) { label_blindsRaiseIntervall->setText(QString::number(info.data.raiseSmallBlindEveryHandsValue)+" "+tr("hands")); }
|
||||
else { label_blindsRaiseIntervall->setText(QString::number(info.data.raiseSmallBlindEveryMinutesValue)+" "+tr("minutes")); }
|
||||
if(info.data.raiseMode == DOUBLE_BLINDS) {
|
||||
label_blindsRaiseMode->setText(tr("double blinds"));
|
||||
label_blindsList->hide();
|
||||
label_gameDesc6->hide();
|
||||
}
|
||||
else {
|
||||
label_blindsRaiseMode->setText(tr("manual blinds order"));
|
||||
label_blindsList->show();
|
||||
label_gameDesc6->show();
|
||||
|
||||
QString blindsListString;
|
||||
std::list<int>::iterator it1;
|
||||
for(it1= info.data.manualBlindsList.begin(); it1 != info.data.manualBlindsList.end(); it1++) {
|
||||
blindsListString.append(QString::number(*it1,10)).append(", ");
|
||||
}
|
||||
blindsListString.remove(blindsListString.length()-2,2);
|
||||
label_blindsList->setText(blindsListString);
|
||||
}
|
||||
|
||||
label_TimeoutForPlayerAction->setText(QString::number(info.data.playerActionTimeoutSec));
|
||||
|
||||
treeWidget_connectedPlayers->clear();
|
||||
@@ -311,7 +353,9 @@ void gameLobbyDialogImpl::clearDialog()
|
||||
label_SmallBlind->setText("");
|
||||
label_StartCash->setText("");
|
||||
label_MaximumNumberOfPlayers->setText("");
|
||||
label_HandsToRaiseSmallBlind->setText("");
|
||||
label_blindsRaiseIntervall->setText("");
|
||||
label_blindsRaiseMode->setText("");
|
||||
label_blindsList->setText("");
|
||||
label_TimeoutForPlayerAction->setText("");
|
||||
|
||||
treeWidget_GameList->clear();
|
||||
@@ -435,7 +479,9 @@ void gameLobbyDialogImpl::leftGameDialogUpdate() {
|
||||
label_SmallBlind->setText("");
|
||||
label_StartCash->setText("");
|
||||
label_MaximumNumberOfPlayers->setText("");
|
||||
label_HandsToRaiseSmallBlind->setText("");
|
||||
label_blindsRaiseIntervall->setText("");
|
||||
label_blindsRaiseMode->setText("");
|
||||
label_blindsList->setText("");
|
||||
label_TimeoutForPlayerAction->setText("");
|
||||
|
||||
treeWidget_connectedPlayers->clear();
|
||||
@@ -504,7 +550,8 @@ void gameLobbyDialogImpl::hideShowGameDescription(bool show) {
|
||||
label_gameDesc3->show();
|
||||
label_gameDesc4->show();
|
||||
label_gameDesc5->show();
|
||||
|
||||
label_gameDesc6->show();
|
||||
label_gameDesc7->show();
|
||||
}
|
||||
else {
|
||||
label_gameDesc1->hide();
|
||||
@@ -512,5 +559,7 @@ void gameLobbyDialogImpl::hideShowGameDescription(bool show) {
|
||||
label_gameDesc3->hide();
|
||||
label_gameDesc4->hide();
|
||||
label_gameDesc5->hide();
|
||||
label_gameDesc6->hide();
|
||||
label_gameDesc7->hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "sdlplayer.h"
|
||||
#include "mainwindowimpl.h"
|
||||
|
||||
|
||||
class Session;
|
||||
class ConfigFile;
|
||||
class LobbyChat;
|
||||
|
||||
Reference in New Issue
Block a user