start implementing ingame votekick gui signals
This commit is contained in:
+38
-36
@@ -1782,54 +1782,43 @@
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>Vote id:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLabel" name="label_kickVoteId" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Vote Timeout:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_kickVoteTimeout" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Timeout:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLabel" name="label_kickVoteTimeout" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_kickUser" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Do you want to kick %1
|
||||
from this game?</string>
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<item row="2" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_voteOnKickYes" >
|
||||
@@ -1847,6 +1836,19 @@ from this game?</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>27</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
@@ -578,7 +578,7 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
|
||||
connect(this, SIGNAL(signalPostRiverRunAnimation1()), this, SLOT(postRiverRunAnimation1()));
|
||||
connect(this, SIGNAL(signalFlipHolecardsAllIn()), this, SLOT(flipHolecardsAllIn()));
|
||||
connect(this, SIGNAL(signalNextRoundCleanGui()), this, SLOT(nextRoundCleanGui()));
|
||||
connect(this, SIGNAL(signalStartVoteOnKick()), this, SLOT(startVoteOnKick()));
|
||||
connect(this, SIGNAL(signalStartVoteOnKick(int, int)), this, SLOT(startVoteOnKick(int, int)));
|
||||
connect(this, SIGNAL(signalEndVoteOnKick()), this, SLOT(endVoteOnKick()));
|
||||
|
||||
}
|
||||
@@ -3059,12 +3059,17 @@ void gameTableImpl::triggerVoteOnKick(int id) {
|
||||
// myStartWindow->getSession()->sendVoteKickSignal(id);
|
||||
}
|
||||
|
||||
void gameTableImpl::startVoteOnKick()
|
||||
void gameTableImpl::startVoteOnKick(int playerId, int timeoutSec)
|
||||
{
|
||||
if(tabWidget_Left->widget(2) != tab_Kick)
|
||||
tabWidget_Left->insertTab(2, tab_Chat, QString(tr("Kick")));
|
||||
|
||||
tabWidget_Left->setCurrentIndex(2);
|
||||
|
||||
PlayerInfo info(myStartWindow->getSession()->getClientPlayerInfo(playerId));
|
||||
label_kickUser->setText(tr("Do you want to kick %1 \nfrom this game?").arg(QString::fromUtf8(info.playerName.c_str())));
|
||||
|
||||
// TODO timeout timer
|
||||
}
|
||||
|
||||
void gameTableImpl::endVoteOnKick()
|
||||
|
||||
@@ -119,7 +119,7 @@ signals:
|
||||
|
||||
void signalNextRoundCleanGui();
|
||||
|
||||
void signalStartVoteOnKick();
|
||||
void signalStartVoteOnKick(int playerId, int timeoutSec);
|
||||
void signalEndVoteOnKick();
|
||||
|
||||
public slots:
|
||||
@@ -279,7 +279,7 @@ public slots:
|
||||
void showMaximized ();
|
||||
void closeGameTable();
|
||||
|
||||
void startVoteOnKick();
|
||||
void startVoteOnKick(int playerId, int timeoutSec);
|
||||
void endVoteOnKick();
|
||||
void voteOnKickYes();
|
||||
void voteOnKickNo();
|
||||
|
||||
@@ -105,7 +105,7 @@ void GuiWrapper::disableMyButtons() { myW->signalDisableMyButtons(); }
|
||||
void GuiWrapper::startTimeoutAnimation(int playerId, int timeoutSec) { myW->signalStartTimeoutAnimation(playerId, timeoutSec); }
|
||||
void GuiWrapper::stopTimeoutAnimation(int playerId) { myW->signalStopTimeoutAnimation(playerId); }
|
||||
|
||||
void GuiWrapper::startVoteOnKick() { myW->signalStartVoteOnKick(); }
|
||||
void GuiWrapper::startVoteOnKick(int playerId, int timeoutSec) { myW->signalStartVoteOnKick(playerId, timeoutSec); }
|
||||
void GuiWrapper::endVoteOnKick() { myW->signalEndVoteOnKick(); }
|
||||
|
||||
void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue) { myLog->signalLogPlayerActionMsg(QString::fromUtf8(playerName.c_str()), action, setValue); }
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
void startTimeoutAnimation(int playerId, int timeoutSec);
|
||||
void stopTimeoutAnimation(int playerId);
|
||||
|
||||
void startVoteOnKick();
|
||||
void startVoteOnKick(int playerId, int timeoutSec);
|
||||
void endVoteOnKick();
|
||||
|
||||
void logPlayerActionMsg(std::string playerName, int action, int setValue) ;
|
||||
|
||||
Reference in New Issue
Block a user