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