add logPlayerLeftMsg()
This commit is contained in:
@@ -95,6 +95,7 @@ void ServerGuiWrapper::logNewGameHandMsg(int gameID, int handID) {}
|
|||||||
void ServerGuiWrapper::logPlayerWinsMsg(int playerID, int pot) {}
|
void ServerGuiWrapper::logPlayerWinsMsg(int playerID, int pot) {}
|
||||||
void ServerGuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) {}
|
void ServerGuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) {}
|
||||||
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt, std::string showHas) {}
|
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt, std::string showHas) {}
|
||||||
|
void ServerGuiWrapper::logPlayerLeftMsg(int playerID) {}
|
||||||
|
|
||||||
void ServerGuiWrapper::SignalNetClientConnect(int actionID) { if (myClientcb) myClientcb->SignalNetClientConnect(actionID); }
|
void ServerGuiWrapper::SignalNetClientConnect(int actionID) { if (myClientcb) myClientcb->SignalNetClientConnect(actionID); }
|
||||||
void ServerGuiWrapper::SignalNetClientGameInfo(int actionID) { if (myClientcb) myClientcb->SignalNetClientGameInfo(actionID); }
|
void ServerGuiWrapper::SignalNetClientGameInfo(int actionID) { if (myClientcb) myClientcb->SignalNetClientGameInfo(actionID); }
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ public:
|
|||||||
void logPlayerWinsMsg(int playerID, int pot);
|
void logPlayerWinsMsg(int playerID, int pot);
|
||||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) ;
|
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) ;
|
||||||
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") ;
|
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") ;
|
||||||
|
void logPlayerLeftMsg(int playerID);
|
||||||
|
|
||||||
void SignalNetClientConnect(int actionID);
|
void SignalNetClientConnect(int actionID);
|
||||||
void SignalNetClientGameInfo(int actionID);
|
void SignalNetClientGameInfo(int actionID);
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ public:
|
|||||||
virtual void logPlayerWinsMsg(int playerID, int pot) = 0;
|
virtual void logPlayerWinsMsg(int playerID, int pot) = 0;
|
||||||
virtual void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) = 0;
|
virtual void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) = 0;
|
||||||
virtual void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") = 0;
|
virtual void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") = 0;
|
||||||
|
virtual void logPlayerLeftMsg(int playerID) =0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->signalLogNew
|
|||||||
void GuiWrapper::logPlayerWinsMsg(int playerID, int pot) { myLog->signalLogPlayerWinsMsg(playerID, pot); }
|
void GuiWrapper::logPlayerWinsMsg(int playerID, int pot) { myLog->signalLogPlayerWinsMsg(playerID, pot); }
|
||||||
void GuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) { myLog->signalLogDealBoardCardsMsg(roundID, card1, card2, card3, card4, card5); }
|
void GuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) { myLog->signalLogDealBoardCardsMsg(roundID, card1, card2, card3, card4, card5); }
|
||||||
void GuiWrapper::logFlipHoleCardsMsg(string playerName, int card1, int card2, int cardsValueInt, string showHas) { myLog->signalLogFlipHoleCardsMsg(playerName, card1, card2, cardsValueInt, showHas); }
|
void GuiWrapper::logFlipHoleCardsMsg(string playerName, int card1, int card2, int cardsValueInt, string showHas) { myLog->signalLogFlipHoleCardsMsg(playerName, card1, card2, cardsValueInt, showHas); }
|
||||||
|
void GuiWrapper::logPlayerLeftMsg(int playerID) { myLog->signalLogPlayerLeftMsg(playerID); }
|
||||||
|
|
||||||
void GuiWrapper::SignalNetClientConnect(int actionID) { myW->signalNetClientConnect(actionID); }
|
void GuiWrapper::SignalNetClientConnect(int actionID) { myW->signalNetClientConnect(actionID); }
|
||||||
void GuiWrapper::SignalNetClientGameInfo(int actionID) { myW->signalNetClientGameInfo(actionID); }
|
void GuiWrapper::SignalNetClientGameInfo(int actionID) { myW->signalNetClientGameInfo(actionID); }
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ public:
|
|||||||
void logPlayerWinsMsg(int playerID, int pot);
|
void logPlayerWinsMsg(int playerID, int pot);
|
||||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||||
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
||||||
|
void logPlayerLeftMsg(int playerID);
|
||||||
|
|
||||||
void SignalNetClientConnect(int actionID);
|
void SignalNetClientConnect(int actionID);
|
||||||
void SignalNetClientGameInfo(int actionID);
|
void SignalNetClientGameInfo(int actionID);
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ Log::Log(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), m
|
|||||||
connect(this, SIGNAL(signalLogPlayerWinsMsg(int, int)), this, SLOT(logPlayerWinsMsg(int, int)));
|
connect(this, SIGNAL(signalLogPlayerWinsMsg(int, int)), this, SLOT(logPlayerWinsMsg(int, int)));
|
||||||
connect(this, SIGNAL(signalLogDealBoardCardsMsg(int, int, int, int, int, int)), this, SLOT(logDealBoardCardsMsg(int, int, int, int, int, int)));
|
connect(this, SIGNAL(signalLogDealBoardCardsMsg(int, int, int, int, int, int)), this, SLOT(logDealBoardCardsMsg(int, int, int, int, int, int)));
|
||||||
connect(this, SIGNAL(signalLogFlipHoleCardsMsg(std::string, int, int, int, std::string)), this, SLOT(logFlipHoleCardsMsg(std::string, int, int, int, std::string)));
|
connect(this, SIGNAL(signalLogFlipHoleCardsMsg(std::string, int, int, int, std::string)), this, SLOT(logFlipHoleCardsMsg(std::string, int, int, int, std::string)));
|
||||||
|
connect(this, SIGNAL(signalLogPlayerLeftMsg(int)), this, SLOT(logPlayerLeftMsg(int)));
|
||||||
|
|
||||||
|
|
||||||
logFileStreamString = "";
|
logFileStreamString = "";
|
||||||
lastGameID = 0;
|
lastGameID = 0;
|
||||||
@@ -440,6 +442,24 @@ void Log::logFlipHoleCardsMsg(string playerName, int card1, int card2, int cards
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Log::logPlayerLeftMsg(int playerID) {
|
||||||
|
|
||||||
|
HandInterface *currentHand = myW->getSession().getCurrentGame()->getCurrentHand();
|
||||||
|
|
||||||
|
myW->textBrowser_Log->append( "<i>"+QString::fromUtf8(currentHand->getPlayerArray()[playerID]->getMyName().c_str())+" has left the game!</i>");
|
||||||
|
|
||||||
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
|
|
||||||
|
logFileStreamString += "<i>"+QString::fromUtf8(currentHand->getPlayerArray()[playerID]->getMyName().c_str())+" has left the game!</i><br>\n";
|
||||||
|
|
||||||
|
if(myConfig->readConfigInt("LogInterval") == 0) {
|
||||||
|
writeLogFileStream(logFileStreamString);
|
||||||
|
logFileStreamString = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QStringList Log::translateCardCode(int cardCode) {
|
QStringList Log::translateCardCode(int cardCode) {
|
||||||
|
|
||||||
int value = cardCode%13;
|
int value = cardCode%13;
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ public slots:
|
|||||||
void logPlayerWinsMsg(int playerID, int pot);
|
void logPlayerWinsMsg(int playerID, int pot);
|
||||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||||
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
||||||
|
void logPlayerLeftMsg(int playerID);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QStringList translateCardsValueCode(int cardsValueCode);
|
QStringList translateCardsValueCode(int cardsValueCode);
|
||||||
@@ -59,6 +61,7 @@ signals:
|
|||||||
void signalLogPlayerWinsMsg(int playerID, int pot);
|
void signalLogPlayerWinsMsg(int playerID, int pot);
|
||||||
void signalLogDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
void signalLogDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||||
void signalLogFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
void signalLogFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
||||||
|
void signalLogPlayerLeftMsg(int playerID);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -2510,9 +2510,7 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
|
|||||||
if (event->key() == Qt::Key_F11) { switchRightToolBox(); }
|
if (event->key() == Qt::Key_F11) { switchRightToolBox(); }
|
||||||
if (event->key() == Qt::Key_D) { setLabelArray[0]->startTimeOutAnimation(myConfig->readConfigInt("NetTimeOutPlayerAction")); } //f
|
if (event->key() == Qt::Key_D) { setLabelArray[0]->startTimeOutAnimation(myConfig->readConfigInt("NetTimeOutPlayerAction")); } //f
|
||||||
if (event->key() == Qt::Key_E) { setLabelArray[0]->stopTimeOutAnimation(); } //f
|
if (event->key() == Qt::Key_E) { setLabelArray[0]->stopTimeOutAnimation(); } //f
|
||||||
if (event->key() == Qt::Key_S) { if(myConfig->readConfigInt("PlaySoundEffects")) mySDLPlayer->playSound("call"); } //s
|
if (event->key() == Qt::Key_S) { mySession->getGui()->logPlayerLeftMsg(2); } //s
|
||||||
if (event->key() == Qt::Key_A) { if(myConfig->readConfigInt("PlaySoundEffects")) mySDLPlayer->playSound("raise"); } //s
|
|
||||||
if (event->key() == Qt::Key_X) { if(myConfig->readConfigInt("PlaySoundEffects")) mySDLPlayer->playSound(""); } //s
|
|
||||||
// if (event->key() == Qt::Key_W) { qApp->quit(); } //s
|
// if (event->key() == Qt::Key_W) { qApp->quit(); } //s
|
||||||
if (event->key() == 16777249) {
|
if (event->key() == 16777249) {
|
||||||
pushButton_break->click();
|
pushButton_break->click();
|
||||||
|
|||||||
Reference in New Issue
Block a user