Vote kick kind of working. Only the forward case - no timeout, no error handling, no display update.

This commit is contained in:
lotodore
2008-11-25 22:18:17 +00:00
parent 10ba70291e
commit b236fa9d62
13 changed files with 109 additions and 15 deletions
+6 -2
View File
@@ -2676,8 +2676,8 @@ void gameTableImpl::keyPressEvent ( QKeyEvent * event ) {
else { keyUpDownChatCounter = 0; }
//TESTING UNIT
if (event->key() == Qt::Key_M) { startVoteOnKick(3,60, 6); }
if (event->key() == Qt::Key_N) { endVoteOnKick(); }
//if (event->key() == Qt::Key_M) { startVoteOnKick(3,60, 6); }
//if (event->key() == Qt::Key_N) { endVoteOnKick(); }
}
void gameTableImpl::changePlayingMode() {
@@ -3150,10 +3150,14 @@ void gameTableImpl::endVoteOnKick()
void gameTableImpl::voteOnKickYes()
{
changeVoteOnKickButtonsState(false);
myStartWindow->getSession()->voteKick(true);
}
void gameTableImpl::voteOnKickNo()
{
changeVoteOnKickButtonsState(false);
myStartWindow->getSession()->voteKick(false);
}
void gameTableImpl::startVoteOnKickTimeout()
+1 -1
View File
@@ -282,7 +282,7 @@ public slots:
void showMaximized ();
void closeGameTable();
void startVoteOnKick(unsigned int playerId, int timeoutSec, int numVotesNeededToKick);
void startVoteOnKick(unsigned playerId, int timeoutSec, int numVotesNeededToKick);
void changeVoteOnKickButtonsState(bool showHide);
void endVoteOnKick();
void voteOnKickYes();
+1 -1
View File
@@ -106,7 +106,7 @@ void GuiWrapper::startTimeoutAnimation(int playerNum, int timeoutSec) { myW->sig
void GuiWrapper::stopTimeoutAnimation(int playerNum) { myW->signalStopTimeoutAnimation(playerNum); }
void GuiWrapper::startVoteOnKick(unsigned playerId, int timeoutSec, int numVotesNeededToKick) { myW->signalStartVoteOnKick(playerId, timeoutSec, numVotesNeededToKick); }
void GuiWrapper::changeVoteOnKickButtonsState(bool showHide) { myW->changeVoteOnKickButtonsState(showHide); }
void GuiWrapper::changeVoteOnKickButtonsState(bool showHide) { myW->signalChangeVoteOnKickButtonsState(showHide); }
void GuiWrapper::refreshVotesMonitor(int currentVotes, int numVotesNeededToKick) { myW->refreshVotesMonitor(currentVotes, numVotesNeededToKick); }
void GuiWrapper::endVoteOnKick() { myW->signalEndVoteOnKick(); }