All gui calls through guiwrapper are now thread safe.
This commit is contained in:
+37
-37
@@ -47,59 +47,59 @@ void GuiWrapper::initGui(int speed) { myW->initGui(speed); }
|
|||||||
Session &GuiWrapper::getSession() { return myW->getSession(); }
|
Session &GuiWrapper::getSession() { return myW->getSession(); }
|
||||||
void GuiWrapper::setSession(boost::shared_ptr<Session> session) { myW->setSession(session); }
|
void GuiWrapper::setSession(boost::shared_ptr<Session> session) { myW->setSession(session); }
|
||||||
|
|
||||||
void GuiWrapper::refreshSet() const { myW->refreshSet(); }
|
void GuiWrapper::refreshSet() const { myW->signalRefreshSet(); }
|
||||||
void GuiWrapper::refreshCash() const { myW->refreshCash(); }
|
void GuiWrapper::refreshCash() const { myW->signalRefreshCash(); }
|
||||||
void GuiWrapper::refreshAction(int playerID, int playerAction) const { myW->refreshAction(playerID, playerAction); }
|
void GuiWrapper::refreshAction(int playerID, int playerAction) const { myW->signalRefreshAction(playerID, playerAction); }
|
||||||
void GuiWrapper::refreshChangePlayer() const { myW->refreshChangePlayer(); }
|
void GuiWrapper::refreshChangePlayer() const { myW->signalRefreshChangePlayer(); }
|
||||||
void GuiWrapper::refreshAll() const { myW->refreshAll(); }
|
void GuiWrapper::refreshAll() const { myW->signalRefreshAll(); }
|
||||||
void GuiWrapper::refreshPot() const { myW->refreshPot(); }
|
void GuiWrapper::refreshPot() const { myW->signalRefreshPot(); }
|
||||||
void GuiWrapper::refreshGroupbox(int playerID, int status) const { myW->refreshGroupbox(playerID, status); }
|
void GuiWrapper::refreshGroupbox(int playerID, int status) const { myW->signalRefreshGroupbox(playerID, status); }
|
||||||
void GuiWrapper::refreshPlayerName() const { myW->refreshPlayerName(); }
|
void GuiWrapper::refreshPlayerName() const { myW->signalRefreshPlayerName(); }
|
||||||
|
|
||||||
void GuiWrapper::dealHoleCards() { myW->dealHoleCards(); }
|
void GuiWrapper::dealHoleCards() { myW->signalDealHoleCards(); }
|
||||||
void GuiWrapper::dealFlopCards() { myW->dealFlopCards0(); }
|
void GuiWrapper::dealFlopCards() { myW->signalDealFlopCards0(); }
|
||||||
void GuiWrapper::dealTurnCard() { myW->dealTurnCards0(); }
|
void GuiWrapper::dealTurnCard() { myW->signalDealTurnCards0(); }
|
||||||
void GuiWrapper::dealRiverCard() { myW->dealRiverCards0(); }
|
void GuiWrapper::dealRiverCard() { myW->signalDealRiverCards0(); }
|
||||||
|
|
||||||
void GuiWrapper::highlightRoundLabel(string round) const { myW->highlightRoundLabel(round); }
|
void GuiWrapper::highlightRoundLabel(string round) const { myW->signalHighlightRoundLabel(QString::fromUtf8(round.c_str())); }
|
||||||
|
|
||||||
|
|
||||||
void GuiWrapper::nextPlayerAnimation() { myW->nextPlayerAnimation(); }
|
void GuiWrapper::nextPlayerAnimation() { myW->signalNextPlayerAnimation(); }
|
||||||
|
|
||||||
void GuiWrapper::preflopAnimation1() { myW->preflopAnimation1(); }
|
void GuiWrapper::preflopAnimation1() { myW->signalPreflopAnimation1(); }
|
||||||
void GuiWrapper::preflopAnimation2() { myW->preflopAnimation2(); }
|
void GuiWrapper::preflopAnimation2() { myW->signalPreflopAnimation2(); }
|
||||||
|
|
||||||
void GuiWrapper::flopAnimation1() { myW->flopAnimation1(); }
|
void GuiWrapper::flopAnimation1() { myW->signalFlopAnimation1(); }
|
||||||
void GuiWrapper::flopAnimation2() { myW->flopAnimation2(); }
|
void GuiWrapper::flopAnimation2() { myW->signalFlopAnimation2(); }
|
||||||
|
|
||||||
void GuiWrapper::turnAnimation1() { myW->turnAnimation1(); }
|
void GuiWrapper::turnAnimation1() { myW->signalTurnAnimation1(); }
|
||||||
void GuiWrapper::turnAnimation2() { myW->turnAnimation2(); }
|
void GuiWrapper::turnAnimation2() { myW->signalTurnAnimation2(); }
|
||||||
|
|
||||||
void GuiWrapper::riverAnimation1() { myW->riverAnimation1(); }
|
void GuiWrapper::riverAnimation1() { myW->signalRiverAnimation1(); }
|
||||||
void GuiWrapper::riverAnimation2() { myW->riverAnimation2(); }
|
void GuiWrapper::riverAnimation2() { myW->signalRiverAnimation2(); }
|
||||||
|
|
||||||
void GuiWrapper::postRiverAnimation1() { myW->postRiverAnimation1(); }
|
void GuiWrapper::postRiverAnimation1() { myW->signalPostRiverAnimation1(); }
|
||||||
void GuiWrapper::postRiverRunAnimation1() { myW->postRiverRunAnimation1(); }
|
void GuiWrapper::postRiverRunAnimation1() { myW->signalPostRiverRunAnimation1(); }
|
||||||
|
|
||||||
void GuiWrapper::flipHolecardsAllIn() { myW->flipHolecardsAllIn(); }
|
void GuiWrapper::flipHolecardsAllIn() { myW->signalFlipHolecardsAllIn(); }
|
||||||
|
|
||||||
void GuiWrapper::nextRoundCleanGui() { myW->nextRoundCleanGui(); }
|
void GuiWrapper::nextRoundCleanGui() { myW->signalNextRoundCleanGui(); }
|
||||||
|
|
||||||
void GuiWrapper::meInAction() { myW->meInAction(); }
|
void GuiWrapper::meInAction() { myW->signalMeInAction(); }
|
||||||
|
|
||||||
void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue) { myLog->logPlayerActionMsg(playerName, action, setValue); }
|
void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue) { myLog->signalLogPlayerActionMsg(QString::fromUtf8(playerName.c_str()), action, setValue); }
|
||||||
void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->logNewGameHandMsg(gameID, handID); }
|
void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->signalLogNewGameHandMsg(gameID, handID); }
|
||||||
|
|
||||||
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); }
|
||||||
void GuiWrapper::SignalNetClientError(int errorID, int osErrorID) { myW->SignalNetClientError(errorID, osErrorID); }
|
void GuiWrapper::SignalNetClientError(int errorID, int osErrorID) { myW->signalNetClientError(errorID, osErrorID); }
|
||||||
void GuiWrapper::SignalNetClientPlayerJoined(const string &playerName) { myW->SignalNetClientPlayerJoined(QString::fromUtf8(playerName.c_str())); }
|
void GuiWrapper::SignalNetClientPlayerJoined(const string &playerName) { myW->signalNetClientPlayerJoined(QString::fromUtf8(playerName.c_str())); }
|
||||||
void GuiWrapper::SignalNetClientPlayerLeft(const string &playerName) { myW->SignalNetClientPlayerLeft(QString::fromUtf8(playerName.c_str())); }
|
void GuiWrapper::SignalNetClientPlayerLeft(const string &playerName) { myW->signalNetClientPlayerLeft(QString::fromUtf8(playerName.c_str())); }
|
||||||
void GuiWrapper::SignalNetClientGameStart(const GameData &gameData) { myW->SignalNetClientGameStart(); }
|
void GuiWrapper::SignalNetClientGameStart(const GameData &gameData) { myW->signalNetClientGameStart(); }
|
||||||
|
|
||||||
void GuiWrapper::SignalNetServerSuccess(int actionID) { }
|
void GuiWrapper::SignalNetServerSuccess(int actionID) { }
|
||||||
void GuiWrapper::SignalNetServerError(int errorID, int osErrorID) { }
|
void GuiWrapper::SignalNetServerError(int errorID, int osErrorID) { }
|
||||||
void GuiWrapper::SignalNetServerPlayerJoined(const string &playerName) { myW->SignalNetServerPlayerJoined(QString::fromUtf8(playerName.c_str())); }
|
void GuiWrapper::SignalNetServerPlayerJoined(const string &playerName) { myW->signalNetServerPlayerJoined(QString::fromUtf8(playerName.c_str())); }
|
||||||
void GuiWrapper::SignalNetServerPlayerLeft(const string &playerName) { myW->SignalNetServerPlayerLeft(QString::fromUtf8(playerName.c_str())); }
|
void GuiWrapper::SignalNetServerPlayerLeft(const string &playerName) { myW->signalNetServerPlayerLeft(QString::fromUtf8(playerName.c_str())); }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ Log::Log(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), m
|
|||||||
{
|
{
|
||||||
myW->setLog(this);
|
myW->setLog(this);
|
||||||
|
|
||||||
|
connect(this, SIGNAL(signalLogPlayerActionMsg(QString, int, int)), this, SLOT(logPlayerActionMsg(QString, int, int)));
|
||||||
|
connect(this, SIGNAL(signalLogNewGameHandMsg(int, int)), this, SLOT(logNewGameHandMsg(int, int)));
|
||||||
|
|
||||||
logFileStreamString = "";
|
logFileStreamString = "";
|
||||||
lastGameID = 0;
|
lastGameID = 0;
|
||||||
|
|
||||||
@@ -99,10 +102,7 @@ Log::~Log()
|
|||||||
myConfig = 0;
|
myConfig = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Log::logPlayerActionMsg(string playerName, int action, int setValue) {
|
void Log::logPlayerActionMsg(QString msg, int action, int setValue) {
|
||||||
|
|
||||||
QString msg;
|
|
||||||
msg = QString::fromUtf8(playerName.c_str());
|
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ void Log::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Log::logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt, string showHas) {
|
void Log::logFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt, string showHas) {
|
||||||
|
|
||||||
if (cardsValueInt != -1) {
|
if (cardsValueInt != -1) {
|
||||||
|
|
||||||
@@ -407,12 +407,12 @@ void Log::logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int
|
|||||||
default: {}
|
default: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
myW->textBrowser_Log->append(QString::fromUtf8(playerName.c_str())+" "+QString::fromUtf8(showHas.c_str())+" \""+tempHandName+"\"");
|
myW->textBrowser_Log->append(playerName+" "+QString::fromUtf8(showHas.c_str())+" \""+tempHandName+"\"");
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
//if write logfiles is enabled
|
//if write logfiles is enabled
|
||||||
|
|
||||||
logFileStreamString += QString::fromUtf8(playerName.c_str())+" "+QString::fromUtf8(showHas.c_str())+" [ <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+"] - "+tempHandName+"</br>\n";
|
logFileStreamString += playerName+" "+QString::fromUtf8(showHas.c_str())+" [ <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+"] - "+tempHandName+"</br>\n";
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
if(myConfig->readConfigInt("LogInterval") == 0) {
|
||||||
writeLogFileStream(logFileStreamString);
|
writeLogFileStream(logFileStreamString);
|
||||||
@@ -422,12 +422,12 @@ void Log::logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myW->textBrowser_Log->append(QString::fromUtf8(playerName.c_str())+" "+QString::fromUtf8(showHas.c_str())+" ["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+"]");
|
myW->textBrowser_Log->append(playerName+" "+QString::fromUtf8(showHas.c_str())+" ["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+"]");
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
//if write logfiles is enabled
|
//if write logfiles is enabled
|
||||||
|
|
||||||
logFileStreamString += QString::fromUtf8(playerName.c_str())+" "+QString::fromUtf8(showHas.c_str())+" [<b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+"]"+"</br>\n";
|
logFileStreamString += playerName+" "+QString::fromUtf8(showHas.c_str())+" [<b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+"]"+"</br>\n";
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
if(myConfig->readConfigInt("LogInterval") == 0) {
|
||||||
writeLogFileStream(logFileStreamString);
|
writeLogFileStream(logFileStreamString);
|
||||||
logFileStreamString = "";
|
logFileStreamString = "";
|
||||||
|
|||||||
+15
-6
@@ -31,24 +31,32 @@
|
|||||||
class mainWindowImpl;
|
class mainWindowImpl;
|
||||||
|
|
||||||
|
|
||||||
class Log{
|
class Log : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Log(mainWindowImpl*, ConfigFile *c);
|
Log(mainWindowImpl*, ConfigFile *c);
|
||||||
|
|
||||||
~Log();
|
~Log();
|
||||||
|
|
||||||
|
public slots:
|
||||||
void logPlayerActionMsg(std::string playerName, int action, int setValue);
|
void logPlayerActionMsg(QString playerName, int action, int setValue);
|
||||||
void logNewGameHandMsg(int gameID, int handID);
|
void logNewGameHandMsg(int gameID, int handID);
|
||||||
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(QString playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
||||||
|
|
||||||
|
public:
|
||||||
QStringList translateCardsValueCode(int cardsValueCode);
|
QStringList translateCardsValueCode(int cardsValueCode);
|
||||||
QStringList translateCardCode(int cardCode);
|
QStringList translateCardCode(int cardCode);
|
||||||
|
|
||||||
void writeLogFileStream(QString string);
|
void writeLogFileStream(QString string);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void signalLogPlayerActionMsg(QString playerName, int action, int setValue);
|
||||||
|
void signalLogNewGameHandMsg(int gameID, int handID);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int lastGameID;
|
int lastGameID;
|
||||||
|
|
||||||
@@ -59,6 +67,7 @@ private:
|
|||||||
QFile *myLogFile;
|
QFile *myLogFile;
|
||||||
QString logFileStreamString;
|
QString logFileStreamString;
|
||||||
|
|
||||||
|
friend class GuiWrapper;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -556,17 +556,51 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
connect ( pushButton_break, SIGNAL( clicked()), this, SLOT ( breakButtonClicked() ) ); // auch wieder starten!!!!
|
connect ( pushButton_break, SIGNAL( clicked()), this, SLOT ( breakButtonClicked() ) ); // auch wieder starten!!!!
|
||||||
|
|
||||||
//Nachrichten Thread-Save
|
//Nachrichten Thread-Save
|
||||||
connect(this, SIGNAL(SignalNetClientConnect(int)), myConnectToServerDialog, SLOT(refresh(int)));
|
connect(this, SIGNAL(signalRefreshSet()), this, SLOT(refreshSet()));
|
||||||
connect(this, SIGNAL(SignalNetClientGameInfo(int)), myWaitingForServerGameDialog, SLOT(refresh(int)));
|
connect(this, SIGNAL(signalRefreshCash()), this, SLOT(refreshCash()));
|
||||||
connect(this, SIGNAL(SignalNetClientPlayerJoined(QString)), myWaitingForServerGameDialog, SLOT(addConnectedPlayer(QString)));
|
connect(this, SIGNAL(signalRefreshAction(int, int)), this, SLOT(refreshAction(int, int)));
|
||||||
connect(this, SIGNAL(SignalNetClientPlayerLeft(QString)), myWaitingForServerGameDialog, SLOT(removePlayer(QString)));
|
connect(this, SIGNAL(signalRefreshChangePlayer()), this, SLOT(refreshChangePlayer()));
|
||||||
|
connect(this, SIGNAL(signalRefreshPot()), this, SLOT(refreshPot()));
|
||||||
|
connect(this, SIGNAL(signalRefreshGroupbox(int, int)), this, SLOT(refreshGroupbox(int, int)));
|
||||||
|
connect(this, SIGNAL(signalRefreshAll()), this, SLOT(refreshAll()));
|
||||||
|
connect(this, SIGNAL(signalRefreshPlayerName()), this, SLOT(refreshPlayerName()));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(signalMeInAction()), this, SLOT(meInAction()));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(signalDealHoleCards()), this, SLOT(dealHoleCards()));
|
||||||
|
connect(this, SIGNAL(signalDealFlopCards0()), this, SLOT(dealFlopCards0()));
|
||||||
|
connect(this, SIGNAL(signalDealTurnCards0()), this, SLOT(dealTurnCards0()));
|
||||||
|
connect(this, SIGNAL(signalDealRiverCards0()), this, SLOT(dealRiverCards0()));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(signalHighlightRoundLabel(QString)), this, SLOT(highlightRoundLabel(QString)));
|
||||||
|
connect(this, SIGNAL(signalNextPlayerAnimation()), this, SLOT(nextPlayerAnimation()));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(signalPreflopAnimation1()), this, SLOT(preflopAnimation1()));
|
||||||
|
connect(this, SIGNAL(signalPreflopAnimation2()), this, SLOT(preflopAnimation2()));
|
||||||
|
connect(this, SIGNAL(signalFlopAnimation1()), this, SLOT(flopAnimation1()));
|
||||||
|
connect(this, SIGNAL(signalFlopAnimation2()), this, SLOT(flopAnimation2()));
|
||||||
|
connect(this, SIGNAL(signalTurnAnimation1()), this, SLOT(turnAnimation1()));
|
||||||
|
connect(this, SIGNAL(signalTurnAnimation2()), this, SLOT(turnAnimation2()));
|
||||||
|
connect(this, SIGNAL(signalRiverAnimation1()), this, SLOT(riverAnimation1()));
|
||||||
|
connect(this, SIGNAL(signalRiverAnimation2()), this, SLOT(riverAnimation2()));
|
||||||
|
connect(this, SIGNAL(signalPostRiverAnimation1()), this, SLOT(postRiverAnimation1()));
|
||||||
|
connect(this, SIGNAL(signalPostRiverRunAnimation1()), this, SLOT(postRiverRunAnimation1()));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(signalFlipHolecardsAllIn()), this, SLOT(flipHolecardsAllIn()));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(signalNextRoundCleanGui()), this, SLOT(nextRoundCleanGui()));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(signalNetClientConnect(int)), myConnectToServerDialog, SLOT(refresh(int)));
|
||||||
|
connect(this, SIGNAL(signalNetClientGameInfo(int)), myWaitingForServerGameDialog, SLOT(refresh(int)));
|
||||||
|
connect(this, SIGNAL(signalNetClientPlayerJoined(QString)), myWaitingForServerGameDialog, SLOT(addConnectedPlayer(QString)));
|
||||||
|
connect(this, SIGNAL(signalNetClientPlayerLeft(QString)), myWaitingForServerGameDialog, SLOT(removePlayer(QString)));
|
||||||
|
|
||||||
// Errors are handled globally, not within one dialog.
|
// Errors are handled globally, not within one dialog.
|
||||||
connect(this, SIGNAL(SignalNetClientError(int, int)), this, SLOT(networkError(int, int)));
|
connect(this, SIGNAL(signalNetClientError(int, int)), this, SLOT(networkError(int, int)));
|
||||||
connect(this, SIGNAL(SignalNetClientGameStart()), this, SLOT(networkStart()));
|
connect(this, SIGNAL(signalNetClientGameStart()), this, SLOT(networkStart()));
|
||||||
|
|
||||||
connect(this, SIGNAL(SignalNetServerPlayerJoined(QString)), myStartNetworkGameDialog, SLOT(addConnectedPlayer(QString)));
|
connect(this, SIGNAL(signalNetServerPlayerJoined(QString)), myStartNetworkGameDialog, SLOT(addConnectedPlayer(QString)));
|
||||||
connect(this, SIGNAL(SignalNetServerPlayerLeft(QString)), myStartNetworkGameDialog, SLOT(removePlayer(QString)));
|
connect(this, SIGNAL(signalNetServerPlayerLeft(QString)), myStartNetworkGameDialog, SLOT(removePlayer(QString)));
|
||||||
|
|
||||||
|
|
||||||
// textBrowser_Log->append(QString::number(this->pos().x(),10)+" "+QString::number(this->pos().y(),10));
|
// textBrowser_Log->append(QString::number(this->pos().x(),10)+" "+QString::number(this->pos().y(),10));
|
||||||
@@ -1098,9 +1132,7 @@ void mainWindowImpl::refreshGroupbox(int playerID, int status) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::highlightRoundLabel(string tempround) {
|
void mainWindowImpl::highlightRoundLabel(QString round) {
|
||||||
|
|
||||||
QString round (QString::fromUtf8(tempround.c_str()));
|
|
||||||
|
|
||||||
// für PostRiverRun (alte Runden stehen lassen)
|
// für PostRiverRun (alte Runden stehen lassen)
|
||||||
if(round != "") {
|
if(round != "") {
|
||||||
@@ -1452,7 +1484,7 @@ void mainWindowImpl::myFold(){
|
|||||||
currentHand->getPlayerArray()[0]->setMyTurn(0);
|
currentHand->getPlayerArray()[0]->setMyTurn(0);
|
||||||
|
|
||||||
//Action in LogWindow
|
//Action in LogWindow
|
||||||
myLog->logPlayerActionMsg(currentHand->getPlayerArray()[0]->getMyName(), currentHand->getPlayerArray()[0]->getMyAction(), currentHand->getPlayerArray()[0]->getMySet());
|
myLog->logPlayerActionMsg(QString::fromUtf8(currentHand->getPlayerArray()[0]->getMyName().c_str()), currentHand->getPlayerArray()[0]->getMyAction(), currentHand->getPlayerArray()[0]->getMySet());
|
||||||
|
|
||||||
holeCardsArray[0][0]->startFadeOut(10);
|
holeCardsArray[0][0]->startFadeOut(10);
|
||||||
holeCardsArray[0][1]->startFadeOut(10);
|
holeCardsArray[0][1]->startFadeOut(10);
|
||||||
@@ -1473,7 +1505,7 @@ void mainWindowImpl::myCheck() {
|
|||||||
currentHand->getPlayerArray()[0]->setMyTurn(0);
|
currentHand->getPlayerArray()[0]->setMyTurn(0);
|
||||||
|
|
||||||
//Action in LogWindow
|
//Action in LogWindow
|
||||||
myLog->logPlayerActionMsg(currentHand->getPlayerArray()[0]->getMyName(), currentHand->getPlayerArray()[0]->getMyAction(), currentHand->getPlayerArray()[0]->getMySet());
|
myLog->logPlayerActionMsg(QString::fromUtf8(currentHand->getPlayerArray()[0]->getMyName().c_str()), currentHand->getPlayerArray()[0]->getMyAction(), currentHand->getPlayerArray()[0]->getMySet());
|
||||||
|
|
||||||
disableMyButtons();
|
disableMyButtons();
|
||||||
|
|
||||||
@@ -1519,7 +1551,7 @@ void mainWindowImpl::myCall(){
|
|||||||
refreshPot();
|
refreshPot();
|
||||||
|
|
||||||
//Action in LogWindow
|
//Action in LogWindow
|
||||||
myLog->logPlayerActionMsg(currentHand->getPlayerArray()[0]->getMyName(), currentHand->getPlayerArray()[0]->getMyAction(), currentHand->getPlayerArray()[0]->getMySet());
|
myLog->logPlayerActionMsg(QString::fromUtf8(currentHand->getPlayerArray()[0]->getMyName().c_str()), currentHand->getPlayerArray()[0]->getMyAction(), currentHand->getPlayerArray()[0]->getMySet());
|
||||||
|
|
||||||
disableMyButtons();
|
disableMyButtons();
|
||||||
|
|
||||||
@@ -1617,7 +1649,7 @@ void mainWindowImpl::mySet(){
|
|||||||
refreshPot();
|
refreshPot();
|
||||||
|
|
||||||
//Action in LogWindow
|
//Action in LogWindow
|
||||||
myLog->logPlayerActionMsg(currentHand->getPlayerArray()[0]->getMyName(), currentHand->getPlayerArray()[0]->getMyAction(), currentHand->getPlayerArray()[0]->getMySet());
|
myLog->logPlayerActionMsg(QString::fromUtf8(currentHand->getPlayerArray()[0]->getMyName().c_str()), currentHand->getPlayerArray()[0]->getMyAction(), currentHand->getPlayerArray()[0]->getMySet());
|
||||||
|
|
||||||
disableMyButtons();
|
disableMyButtons();
|
||||||
|
|
||||||
@@ -1655,7 +1687,7 @@ void mainWindowImpl::myAllIn(){
|
|||||||
refreshPot();
|
refreshPot();
|
||||||
|
|
||||||
//Action in LogWindow
|
//Action in LogWindow
|
||||||
myLog->logPlayerActionMsg(currentHand->getPlayerArray()[0]->getMyName(), currentHand->getPlayerArray()[0]->getMyAction(), currentHand->getPlayerArray()[0]->getMySet());
|
myLog->logPlayerActionMsg(QString::fromUtf8(currentHand->getPlayerArray()[0]->getMyName().c_str()), currentHand->getPlayerArray()[0]->getMyAction(), currentHand->getPlayerArray()[0]->getMySet());
|
||||||
|
|
||||||
disableMyButtons();
|
disableMyButtons();
|
||||||
|
|
||||||
@@ -1757,7 +1789,7 @@ void mainWindowImpl::postRiverRunAnimation2() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Karten umdrehen Loggen
|
//Karten umdrehen Loggen
|
||||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[i]->getMyCardsValueInt());
|
myLog->logFlipHoleCardsMsg(QString::fromUtf8(currentHand->getPlayerArray()[i]->getMyName().c_str()), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[i]->getMyCardsValueInt());
|
||||||
|
|
||||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||||
}
|
}
|
||||||
@@ -1785,7 +1817,7 @@ void mainWindowImpl::postRiverRunAnimation2() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Karten umdrehen Loggen
|
//Karten umdrehen Loggen
|
||||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[i]->getMyCardsValueInt() );
|
myLog->logFlipHoleCardsMsg(QString::fromUtf8(currentHand->getPlayerArray()[i]->getMyName().c_str()), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[i]->getMyCardsValueInt() );
|
||||||
|
|
||||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||||
}
|
}
|
||||||
@@ -1802,7 +1834,7 @@ void mainWindowImpl::postRiverRunAnimation2() {
|
|||||||
if(currentHand->getPlayerArray()[i]->getMyActiveStatus() && currentHand->getPlayerArray()[i]->getMyAction() != 1) {
|
if(currentHand->getPlayerArray()[i]->getMyActiveStatus() && currentHand->getPlayerArray()[i]->getMyAction() != 1) {
|
||||||
|
|
||||||
//Kartenwerte Loggen
|
//Kartenwerte Loggen
|
||||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[i]->getMyCardsValueInt(), "has");
|
myLog->logFlipHoleCardsMsg(QString::fromUtf8(currentHand->getPlayerArray()[i]->getMyName().c_str()), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[i]->getMyCardsValueInt(), "has");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2015,7 +2047,7 @@ void mainWindowImpl::flipHolecardsAllIn() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Karten umdrehen Loggen
|
//Karten umdrehen Loggen
|
||||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1]);
|
myLog->logFlipHoleCardsMsg(QString::fromUtf8(currentHand->getPlayerArray()[i]->getMyName().c_str()), tempCardsIntArray[0], tempCardsIntArray[1]);
|
||||||
|
|
||||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||||
|
|
||||||
@@ -2044,7 +2076,7 @@ void mainWindowImpl::flipHolecardsAllIn() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Karten umdrehen Loggen
|
//Karten umdrehen Loggen
|
||||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[i]->getMyName(), temp2CardsIntArray[0], temp2CardsIntArray[1] );
|
myLog->logFlipHoleCardsMsg(QString::fromUtf8(currentHand->getPlayerArray()[i]->getMyName().c_str()), temp2CardsIntArray[0], temp2CardsIntArray[1] );
|
||||||
|
|
||||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||||
}
|
}
|
||||||
@@ -2066,7 +2098,7 @@ void mainWindowImpl::showMyCards() {
|
|||||||
currentHand->getPlayerArray()[0]->getMyCards(tempCardsIntArray);
|
currentHand->getPlayerArray()[0]->getMyCards(tempCardsIntArray);
|
||||||
if( currentHand->getPlayerArray()[0]->getMyCardsFlip() == 0 && currentHand->getActualRound() == 4 && currentHand->getPlayerArray()[0]->getMyActiveStatus() && currentHand->getPlayerArray()[0]->getMyAction() != 1) {
|
if( currentHand->getPlayerArray()[0]->getMyCardsFlip() == 0 && currentHand->getActualRound() == 4 && currentHand->getPlayerArray()[0]->getMyActiveStatus() && currentHand->getPlayerArray()[0]->getMyAction() != 1) {
|
||||||
//Karten umdrehen Loggen
|
//Karten umdrehen Loggen
|
||||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[0]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[0]->getMyCardsValueInt() );
|
myLog->logFlipHoleCardsMsg(QString::fromUtf8(currentHand->getPlayerArray()[0]->getMyName().c_str()), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[0]->getMyCardsValueInt() );
|
||||||
|
|
||||||
currentHand->getPlayerArray()[0]->setMyCardsFlip(1);
|
currentHand->getPlayerArray()[0]->setMyCardsFlip(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,17 +66,67 @@ public:
|
|||||||
|
|
||||||
void setLog(Log*);
|
void setLog(Log*);
|
||||||
|
|
||||||
|
void setSpeeds();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void signalRefreshSet();
|
||||||
|
void signalRefreshCash();
|
||||||
|
void signalRefreshAction(int =-1, int=-1);
|
||||||
|
void signalRefreshChangePlayer();
|
||||||
|
void signalRefreshPot();
|
||||||
|
void signalRefreshGroupbox(int =-1, int =-1);
|
||||||
|
void signalRefreshAll();
|
||||||
|
void signalRefreshPlayerName();
|
||||||
|
|
||||||
|
void signalMeInAction();
|
||||||
|
|
||||||
|
void signalDealHoleCards();
|
||||||
|
void signalDealFlopCards0();
|
||||||
|
void signalDealTurnCards0();
|
||||||
|
void signalDealRiverCards0();
|
||||||
|
|
||||||
|
void signalHighlightRoundLabel(QString);
|
||||||
|
void signalNextPlayerAnimation();
|
||||||
|
|
||||||
|
void signalPreflopAnimation1();
|
||||||
|
void signalPreflopAnimation2();
|
||||||
|
void signalFlopAnimation1();
|
||||||
|
void signalFlopAnimation2();
|
||||||
|
void signalTurnAnimation1();
|
||||||
|
void signalTurnAnimation2();
|
||||||
|
void signalRiverAnimation1();
|
||||||
|
void signalRiverAnimation2();
|
||||||
|
void signalPostRiverAnimation1();
|
||||||
|
void signalPostRiverRunAnimation1();
|
||||||
|
|
||||||
|
void signalFlipHolecardsAllIn();
|
||||||
|
|
||||||
|
void signalNextRoundCleanGui();
|
||||||
|
|
||||||
|
void signalNetClientConnect(int actionID);
|
||||||
|
void signalNetClientGameInfo(int actionID);
|
||||||
|
void signalNetClientError(int errorID, int osErrorID);
|
||||||
|
void signalNetClientPlayerJoined(QString playerName);
|
||||||
|
void signalNetClientPlayerLeft(QString playerName);
|
||||||
|
void signalNetClientGameStart();
|
||||||
|
void signalNetServerPlayerJoined(QString playerName);
|
||||||
|
void signalNetServerPlayerLeft(QString playerName);
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
//refresh-Funktionen
|
//refresh-Funktionen
|
||||||
void refreshSet();
|
void refreshSet();
|
||||||
void refreshButton();
|
|
||||||
void refreshPlayerName();
|
|
||||||
void refreshPlayerAvatar();
|
|
||||||
void refreshAction(int =-1, int=-1);
|
|
||||||
void refreshCash();
|
void refreshCash();
|
||||||
void refreshGroupbox(int =-1, int =-1);
|
void refreshAction(int =-1, int=-1);
|
||||||
void refreshAll();
|
|
||||||
void refreshChangePlayer();
|
void refreshChangePlayer();
|
||||||
void refreshPot();
|
void refreshPot();
|
||||||
|
void refreshGroupbox(int =-1, int =-1);
|
||||||
|
void refreshAll();
|
||||||
|
void refreshPlayerName();
|
||||||
|
|
||||||
|
void refreshButton();
|
||||||
|
void refreshPlayerAvatar();
|
||||||
|
|
||||||
// Karten-Funktionen
|
// Karten-Funktionen
|
||||||
void dealHoleCards();
|
void dealHoleCards();
|
||||||
@@ -85,22 +135,7 @@ public:
|
|||||||
void meInAction();
|
void meInAction();
|
||||||
void disableMyButtons();
|
void disableMyButtons();
|
||||||
|
|
||||||
void highlightRoundLabel(std::string);
|
void highlightRoundLabel(QString);
|
||||||
|
|
||||||
void setSpeeds();
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void SignalNetClientConnect(int actionID);
|
|
||||||
void SignalNetClientGameInfo(int actionID);
|
|
||||||
void SignalNetClientError(int errorID, int osErrorID);
|
|
||||||
void SignalNetClientPlayerJoined(QString playerName);
|
|
||||||
void SignalNetClientPlayerLeft(QString playerName);
|
|
||||||
void SignalNetClientGameStart();
|
|
||||||
void SignalNetServerPlayerJoined(QString playerName);
|
|
||||||
void SignalNetServerPlayerLeft(QString playerName);
|
|
||||||
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
|
|
||||||
void setGameSpeed(const int theValue) { guiGameSpeed = theValue; setSpeeds(); } // Achtung Faktor 10!!!
|
void setGameSpeed(const int theValue) { guiGameSpeed = theValue; setSpeeds(); } // Achtung Faktor 10!!!
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user