logPlayerWinMsg
This commit is contained in:
@@ -37,6 +37,7 @@ Log::Log(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), m
|
||||
connect(this, SIGNAL(signalLogDealBoardCardsMsg(int, int, int, int, int, int)), this, SLOT(logDealBoardCardsMsg(int, int, int, int, int, int)));
|
||||
connect(this, SIGNAL(signalLogFlipHoleCardsMsg(QString, int, int, int, QString)), this, SLOT(logFlipHoleCardsMsg(QString, int, int, int, QString)));
|
||||
connect(this, SIGNAL(signalLogPlayerLeftMsg(QString)), this, SLOT(logPlayerLeftMsg(QString)));
|
||||
connect(this, SIGNAL(signalLogPlayerWinGame(QString, int)), this, SLOT(logPlayerWinGame(QString, int)));
|
||||
|
||||
|
||||
logFileStreamString = "";
|
||||
@@ -457,6 +458,21 @@ void Log::logPlayerLeftMsg(QString playerName) {
|
||||
}
|
||||
}
|
||||
|
||||
void Log::logPlayerWinGame(QString playerName, int gameID) {
|
||||
|
||||
myW->textBrowser_Log->append( "<i><b>"+playerName+" wins game no. " + QString::number(gameID,10) +"!</i></b>");
|
||||
|
||||
if(myConfig->readConfigInt("LogOnOff")) {
|
||||
|
||||
logFileStreamString += "<i><b>"+playerName+" wins game no. " + QString::number(gameID,10) +"!</i></b><br>\n";
|
||||
|
||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
||||
writeLogFileStream(logFileStreamString);
|
||||
logFileStreamString = "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
QStringList Log::translateCardCode(int cardCode) {
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ public slots:
|
||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||
void logFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
||||
void logPlayerLeftMsg(QString playerName);
|
||||
void logPlayerWinGame(QString playerName, int gameID);
|
||||
|
||||
|
||||
public:
|
||||
@@ -61,6 +62,7 @@ signals:
|
||||
void signalLogDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||
void signalLogFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
||||
void signalLogPlayerLeftMsg(QString playerName);
|
||||
void signalLogPlayerWinGame(QString playerName, int gameID);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user