highlightRoundLabel --> refreshGameLabels

This commit is contained in:
doitux
2007-05-29 18:37:49 +00:00
parent 41b0a0129a
commit ccb339be04
12 changed files with 147 additions and 171 deletions
-1
View File
@@ -76,7 +76,6 @@ public:
virtual void setLastPlayersTurn(const int& theValue) =0; virtual void setLastPlayersTurn(const int& theValue) =0;
virtual int getLastPlayersTurn() const =0; virtual int getLastPlayersTurn() const =0;
virtual void highlightRoundLabel() =0;
virtual void switchRounds() =0; virtual void switchRounds() =0;
}; };
+1 -25
View File
@@ -353,7 +353,7 @@ void LocalHand::switchRounds() {
//unhighlight actual players groupbox //unhighlight actual players groupbox
if(playerArray[lastPlayersTurn]->getMyActiveStatus() == 1) myGui->refreshGroupbox(lastPlayersTurn,1); if(playerArray[lastPlayersTurn]->getMyActiveStatus() == 1) myGui->refreshGroupbox(lastPlayersTurn,1);
highlightRoundLabel(); myGui->refreshGameLabels(actualRound);
// /*/*/*/*cout <<*/*/*/*/ "NextPlayerSpeed1 stop" << endl; // /*/*/*/*cout <<*/*/*/*/ "NextPlayerSpeed1 stop" << endl;
// //
// cout << "NextPlayerSpeed2 start" << endl; // cout << "NextPlayerSpeed2 start" << endl;
@@ -388,27 +388,3 @@ void LocalHand::switchRounds() {
} }
} }
void LocalHand::highlightRoundLabel() {
switch(actualRound) {
case 0: {
myGui->highlightRoundLabel("Preflop");
} break;
case 1: {
myGui->highlightRoundLabel("Flop");
} break;
case 2: {
myGui->highlightRoundLabel("Turn");
} break;
case 3: {
myGui->highlightRoundLabel("River");
} break;
case 4: {
myGui->highlightRoundLabel("");
} break;
default: {
myGui->highlightRoundLabel("!!! FEHLER !!!");
}
}
}
-1
View File
@@ -82,7 +82,6 @@ public:
void assignButtons(); void assignButtons();
void highlightRoundLabel();
void switchRounds(); void switchRounds();
+1 -4
View File
@@ -74,8 +74,5 @@ ClientHand::switchRounds()
{ {
} }
void
ClientHand::highlightRoundLabel()
{
}
-2
View File
@@ -79,8 +79,6 @@ public:
void setLastPlayersTurn(const int& theValue) { lastPlayersTurn = theValue; } void setLastPlayersTurn(const int& theValue) { lastPlayersTurn = theValue; }
int getLastPlayersTurn() const { return lastPlayersTurn; } int getLastPlayersTurn() const { return lastPlayersTurn; }
void highlightRoundLabel();
void switchRounds(); void switchRounds();
+1 -1
View File
@@ -66,7 +66,7 @@ void ServerGuiWrapper::dealFlopCards() {}
void ServerGuiWrapper::dealTurnCard() {} void ServerGuiWrapper::dealTurnCard() {}
void ServerGuiWrapper::dealRiverCard() {} void ServerGuiWrapper::dealRiverCard() {}
void ServerGuiWrapper::highlightRoundLabel(string round) const {} void ServerGuiWrapper::refreshGameLabels(int round) const {}
void ServerGuiWrapper::nextPlayerAnimation() {} void ServerGuiWrapper::nextPlayerAnimation() {}
+1 -2
View File
@@ -44,14 +44,13 @@ public:
void refreshAll() const; void refreshAll() const;
void refreshPlayerName() const; void refreshPlayerName() const;
void refreshButton() const; void refreshButton() const;
void refreshGameLabels(int round) const;
void dealHoleCards(); void dealHoleCards();
void dealFlopCards(); void dealFlopCards();
void dealTurnCard(); void dealTurnCard();
void dealRiverCard(); void dealRiverCard();
void highlightRoundLabel(std::string round) const;
void nextPlayerAnimation(); void nextPlayerAnimation();
void preflopAnimation1(); void preflopAnimation1();
+1 -1
View File
@@ -56,7 +56,7 @@ public:
virtual void dealTurnCard()=0; virtual void dealTurnCard()=0;
virtual void dealRiverCard()=0; virtual void dealRiverCard()=0;
virtual void highlightRoundLabel(std::string) const=0; virtual void refreshGameLabels(int) const=0;
virtual void nextPlayerAnimation()=0; virtual void nextPlayerAnimation()=0;
+1 -3
View File
@@ -58,15 +58,13 @@ void GuiWrapper::refreshPot() const { myW->signalRefreshPot(); }
void GuiWrapper::refreshGroupbox(int playerID, int status) const { myW->signalRefreshGroupbox(playerID, status); } void GuiWrapper::refreshGroupbox(int playerID, int status) const { myW->signalRefreshGroupbox(playerID, status); }
void GuiWrapper::refreshPlayerName() const { myW->signalRefreshPlayerName(); } void GuiWrapper::refreshPlayerName() const { myW->signalRefreshPlayerName(); }
void GuiWrapper::refreshButton() const { myW->signalRefreshButton(); } void GuiWrapper::refreshButton() const { myW->signalRefreshButton(); }
void GuiWrapper::refreshGameLabels(int round) const { myW->signalRefreshGameLabels(round); }
void GuiWrapper::dealHoleCards() { myW->signalDealHoleCards(); } void GuiWrapper::dealHoleCards() { myW->signalDealHoleCards(); }
void GuiWrapper::dealFlopCards() { myW->signalDealFlopCards0(); } void GuiWrapper::dealFlopCards() { myW->signalDealFlopCards0(); }
void GuiWrapper::dealTurnCard() { myW->signalDealTurnCards0(); } void GuiWrapper::dealTurnCard() { myW->signalDealTurnCards0(); }
void GuiWrapper::dealRiverCard() { myW->signalDealRiverCards0(); } void GuiWrapper::dealRiverCard() { myW->signalDealRiverCards0(); }
void GuiWrapper::highlightRoundLabel(string round) const { myW->signalHighlightRoundLabel(QString::fromUtf8(round.c_str())); }
void GuiWrapper::nextPlayerAnimation() { myW->signalNextPlayerAnimation(); } void GuiWrapper::nextPlayerAnimation() { myW->signalNextPlayerAnimation(); }
void GuiWrapper::preflopAnimation1() { myW->signalPreflopAnimation1(); } void GuiWrapper::preflopAnimation1() { myW->signalPreflopAnimation1(); }
+1 -1
View File
@@ -58,7 +58,7 @@ public:
void dealTurnCard(); void dealTurnCard();
void dealRiverCard(); void dealRiverCard();
void highlightRoundLabel(std::string round) const; void refreshGameLabels(int round) const;
void nextPlayerAnimation(); void nextPlayerAnimation();
+24 -12
View File
@@ -591,7 +591,7 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
connect(this, SIGNAL(signalDealTurnCards0()), this, SLOT(dealTurnCards0())); connect(this, SIGNAL(signalDealTurnCards0()), this, SLOT(dealTurnCards0()));
connect(this, SIGNAL(signalDealRiverCards0()), this, SLOT(dealRiverCards0())); connect(this, SIGNAL(signalDealRiverCards0()), this, SLOT(dealRiverCards0()));
connect(this, SIGNAL(signalHighlightRoundLabel(QString)), this, SLOT(highlightRoundLabel(QString))); connect(this, SIGNAL(signalRefreshGameLabels(int)), this, SLOT(refreshGameLabels(int)));
connect(this, SIGNAL(signalNextPlayerAnimation()), this, SLOT(nextPlayerAnimation())); connect(this, SIGNAL(signalNextPlayerAnimation()), this, SLOT(nextPlayerAnimation()));
connect(this, SIGNAL(signalPreflopAnimation1()), this, SLOT(preflopAnimation1())); connect(this, SIGNAL(signalPreflopAnimation1()), this, SLOT(preflopAnimation1()));
@@ -1204,19 +1204,31 @@ void mainWindowImpl::refreshGroupbox(int playerID, int status) {
} }
} }
void mainWindowImpl::highlightRoundLabel(QString round) { void mainWindowImpl::refreshGameLabels(int round) {
// für PostRiverRun (alte Runden stehen lassen) switch(round) {
if(round != "") { case 0: {
textLabel_handLabel->setText("Preflop");
// QPalette tempPalette = frame_handLabel->palette(); } break;
// tempPalette.setColor(QPalette::Window, highlight); case 1: {
// frame_handLabel->setPalette(tempPalette); textLabel_handLabel->setText("Flop");
} break;
textLabel_handLabel->setText(round); case 2: {
textLabel_handNumber->setText(QString::number(mySession->getCurrentGame()->getCurrentHand()->getMyID(),10)); textLabel_handLabel->setText("Turn");
textLabel_gameNumber->setText(QString::number(mySession->getCurrentGame()->getMyGameID(),10)); } break;
case 3: {
textLabel_handLabel->setText("River");
} break;
case 4: {
textLabel_handLabel->setText("");
} break;
default: {
textLabel_handLabel->setText("!!! ERROR !!!");
}
} }
textLabel_handNumber->setText(QString::number(mySession->getCurrentGame()->getCurrentHand()->getMyID(),10));
textLabel_gameNumber->setText(QString::number(mySession->getCurrentGame()->getMyGameID(),10));
} }
void mainWindowImpl::refreshAll() { void mainWindowImpl::refreshAll() {
+2 -4
View File
@@ -94,7 +94,7 @@ signals:
void signalDealTurnCards0(); void signalDealTurnCards0();
void signalDealRiverCards0(); void signalDealRiverCards0();
void signalHighlightRoundLabel(QString); void signalRefreshGameLabels(int);
void signalNextPlayerAnimation(); void signalNextPlayerAnimation();
void signalPreflopAnimation1(); void signalPreflopAnimation1();
@@ -133,7 +133,7 @@ public slots:
void refreshGroupbox(int =-1, int =-1); void refreshGroupbox(int =-1, int =-1);
void refreshAll(); void refreshAll();
void refreshPlayerName(); void refreshPlayerName();
void refreshGameLabels(int);
void refreshButton(); void refreshButton();
void refreshPlayerAvatar(); void refreshPlayerAvatar();
@@ -144,8 +144,6 @@ public slots:
void meInAction(); void meInAction();
void disableMyButtons(); void disableMyButtons();
void highlightRoundLabel(QString);
void setGameSpeed(const int theValue) { guiGameSpeed = theValue; setSpeeds(); } // Achtung Faktor 10!!! void setGameSpeed(const int theValue) { guiGameSpeed = theValue; setSpeeds(); } // Achtung Faktor 10!!!
void callNewGameDialog() ; void callNewGameDialog() ;