diff --git a/src/config/configfile.cpp b/src/config/configfile.cpp index befd375e..effe0d44 100644 --- a/src/config/configfile.cpp +++ b/src/config/configfile.cpp @@ -31,7 +31,7 @@ using namespace std; ConfigFile::ConfigFile() { // !!!! Revisionsnummer der Configdefaults !!!!! - configRev = 1; + configRev = 2; // Pfad und Dateinamen setzen #ifdef _WIN32 @@ -101,6 +101,9 @@ void ConfigFile::createDefaultConfig() { TiXmlElement * confElement4 = new TiXmlElement( "GameSpeed" ); config->LinkEndChild( confElement4 ); confElement4->SetAttribute("value", 4); + TiXmlElement * confElement14 = new TiXmlElement( "PauseBetweenHands" ); + config->LinkEndChild( confElement14 ); + confElement14->SetAttribute("value", 0); TiXmlElement * confElement5 = new TiXmlElement( "ShowGameSettingsDialogOnNewGame" ); config->LinkEndChild( confElement5 ); confElement5->SetAttribute("value", 1); @@ -125,6 +128,9 @@ void ConfigFile::createDefaultConfig() { TiXmlElement * confElement13 = new TiXmlElement( "ShowIntro" ); config->LinkEndChild( confElement13 ); confElement13->SetAttribute("value", 1); + TiXmlElement * confElement15 = new TiXmlElement( "ShowFadeOutCardsAnimation" ); + config->LinkEndChild( confElement15 ); + confElement15->SetAttribute("value", 1); doc.SaveFile( configFileName ); diff --git a/src/engine/handinterface.h b/src/engine/handinterface.h index a3d46dfa..cca1bcd7 100644 --- a/src/engine/handinterface.h +++ b/src/engine/handinterface.h @@ -62,6 +62,9 @@ public: virtual void setStartCash(const int& theValue) =0; virtual int getStartCash() const =0; + virtual void setActivePlayersCounter(const int& theValue) =0; + virtual int getActivePlayersCounter() const =0; + virtual void assignButtons() =0; virtual void highlightRoundLabel() =0; diff --git a/src/engine/local_engine/localhand.cpp b/src/engine/local_engine/localhand.cpp index 16934bca..f53c5991 100755 --- a/src/engine/local_engine/localhand.cpp +++ b/src/engine/local_engine/localhand.cpp @@ -165,7 +165,7 @@ void LocalHand::switchRounds() { // cout << "switchrounds" << endl; //Aktive Spieler z�len --> wenn nur noch einer nicht-folded dann gleich den Pot verteilen - int activePlayersCounter = 0; + activePlayersCounter = 0; for (i=0; igetMaxQuantityPlayers(); i++) { if (playerArray[i]->getMyAction() != 1 && playerArray[i]->getMyActiveStatus() == 1) activePlayersCounter++; } diff --git a/src/engine/local_engine/localhand.h b/src/engine/local_engine/localhand.h index 90fc87eb..b6157eaa 100755 --- a/src/engine/local_engine/localhand.h +++ b/src/engine/local_engine/localhand.h @@ -72,11 +72,17 @@ public: void setStartCash(const int& theValue) { startCash = theValue; } int getStartCash() const { return startCash; } + void setActivePlayersCounter(const int& theValue) { activePlayersCounter = theValue; } + int getActivePlayersCounter() const { return activePlayersCounter; } + + void assignButtons(); void highlightRoundLabel(); void switchRounds(); + + @@ -99,7 +105,8 @@ private: int actualRound; //0 = preflop, 1 = flop, 2 = turn, 3 = river int smallBlind; int startCash; - + int activePlayersCounter; + bool allInCondition; }; diff --git a/src/gui/qt/cards/mycardspixmaplabel.cpp b/src/gui/qt/cards/mycardspixmaplabel.cpp index 6035c437..407bf417 100644 --- a/src/gui/qt/cards/mycardspixmaplabel.cpp +++ b/src/gui/qt/cards/mycardspixmaplabel.cpp @@ -18,6 +18,7 @@ MyCardsPixmapLabel::MyCardsPixmapLabel(QFrame* parent) { fadeOutAction = FALSE; frameOpacity = 0.0; + opacityRaiseIntervall = 0.01; timer = new QTimer; connect(timer, SIGNAL(timeout()), this, SLOT(nextFadeOutFrame())); @@ -29,18 +30,25 @@ MyCardsPixmapLabel::~MyCardsPixmapLabel() { } -void MyCardsPixmapLabel::startFadeOut() { - fadeOutAction = TRUE; - frameOpacity = 0.0; - timer->start(40); +void MyCardsPixmapLabel::startFadeOut(int speed) { + + if(speed <= 4) { opacityRaiseIntervall = 0.01; } + if(speed > 4 && speed <= 7) { opacityRaiseIntervall = 0.02; } + if(speed > 7 && speed <= 10) { opacityRaiseIntervall = 0.04; } + + if(speed != 11) { + fadeOutAction = TRUE; + frameOpacity = 0.0; + timer->start(40); + } } void MyCardsPixmapLabel::nextFadeOutFrame() { - if (frameOpacity < 0.7) { - frameOpacity += 0.01; + if (frameOpacity < 0.65) { + frameOpacity += opacityRaiseIntervall; update(); } else { diff --git a/src/gui/qt/cards/mycardspixmaplabel.h b/src/gui/qt/cards/mycardspixmaplabel.h index 1f32af59..bf5b3733 100644 --- a/src/gui/qt/cards/mycardspixmaplabel.h +++ b/src/gui/qt/cards/mycardspixmaplabel.h @@ -26,10 +26,11 @@ public: ~MyCardsPixmapLabel(); qreal frameOpacity; + qreal opacityRaiseIntervall; QTimer *timer; bool fadeOutAction; - void startFadeOut(); + void startFadeOut(int); void paintEvent(QPaintEvent * event); public slots: diff --git a/src/gui/qt/mainwindow.ui b/src/gui/qt/mainwindow.ui index e063d03f..2920044a 100644 --- a/src/gui/qt/mainwindow.ui +++ b/src/gui/qt/mainwindow.ui @@ -515,1973 +515,6 @@ 6 - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - - 20 - 20 - - - - - - - - - 566 - 136 - - - - - 566 - 136 - - - - - - - - - 0 - 0 - 0 - - - - - - - 221 - 223 - 228 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 85 - 85 - 85 - - - - - - - 199 - 199 - 199 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 74 - 131 - 83 - - - - - - - 0 - 0 - 0 - - - - - - - 103 - 141 - 178 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 238 - - - - - - - 82 - 24 - 139 - - - - - - - 232 - 232 - 232 - - - - - - - - - 0 - 0 - 0 - - - - - - - 221 - 223 - 228 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 85 - 85 - 85 - - - - - - - 199 - 199 - 199 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 74 - 131 - 83 - - - - - - - 0 - 0 - 0 - - - - - - - 103 - 141 - 178 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 238 - - - - - - - 82 - 24 - 139 - - - - - - - 232 - 232 - 232 - - - - - - - - - 128 - 128 - 128 - - - - - - - 221 - 223 - 228 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 85 - 85 - 85 - - - - - - - 199 - 199 - 199 - - - - - - - 199 - 199 - 199 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 74 - 131 - 83 - - - - - - - 74 - 131 - 83 - - - - - - - 0 - 0 - 0 - - - - - - - 86 - 117 - 148 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 238 - - - - - - - 82 - 24 - 139 - - - - - - - 232 - 232 - 232 - - - - - - - - true - - - - - - - 9 - - - 6 - - - - - - 0 - 0 - 0 - 0 - - - - - 331 - 102 - - - - - 331 - 102 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 9 - - - 6 - - - - - - - - - 0 - 0 - 0 - 0 - - - - - 104 - 114 - - - - true - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 4 - - - 4 - - - - - true - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 4 - - - 0 - - - - - - 0 - 30 - - - - - 16777215 - 30 - - - - true - - - - - - - - - - - 0 - 25 - - - - - 16777215 - 25 - - - - true - - - - - - - - - - 0 - - - 4 - - - - - - 0 - 26 - - - - - 16777215 - 26 - - - - - - - - - 0 - 26 - - - - - 16777215 - 26 - - - - - - - - - - - - - 0 - - - 6 - - - - - - 95 - 16 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 12 - - - - Qt::AlignCenter - - - - - - - - - - - 95 - 36 - - - - true - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 3 - - - 0 - - - - - - 15 - 75 - true - - - - Qt::AlignCenter - - - - - - - - - - - - - - - Qt::Horizontal - - - - 20 - 20 - - - - - - - - - - 0 - - - 6 - - - - - false - - - - 209 - 162 - - - - - 209 - 5555555 - - - - true - - - - - - - 9 - - - 6 - - - - - - 127 - 92 - - - - - 127 - 92 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 3 - - - - - - - - - 54 - 60 - - - - - 16777215 - 60 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 3 - - - 0 - - - - - - 35 - 0 - - - - - - - - - 35 - 0 - - - - - - - - - - - 0 - - - 6 - - - - - - 16 - 28 - - - - - 28 - 16777215 - - - - false - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - 20 - 16777215 - - - - true - - - - - - - - - - - - - - 16 - 28 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - - - - - - - - - - 16 - 28 - - - - true - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - - - - - - - - - - - QFrame::HLine - - - QFrame::Sunken - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 46 - 28 - - - - - - - - - - - false - - - - 209 - 162 - - - - - 209 - 5555555 - - - - true - - - - - - - 9 - - - 6 - - - - - - 127 - 92 - - - - - 127 - 92 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 3 - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 46 - 28 - - - - - - - - QFrame::HLine - - - QFrame::Sunken - - - Qt::Horizontal - - - - - - - 0 - - - 6 - - - - - - 16 - 28 - - - - - 28 - 16777215 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - 20 - 16777215 - - - - - - - - - - - - - - - 16 - 28 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - - - - - - - - - - 16 - 28 - - - - true - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - - - - - - - - - - - - 54 - 60 - - - - - 16777215 - 60 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 3 - - - 0 - - - - - - 35 - 0 - - - - - - - - - 35 - 0 - - - - - - - - - - - - - - false - - - - 209 - 162 - - - - - 209 - 5555555 - - - - true - - - - - - - 9 - - - 6 - - - - - - 127 - 92 - - - - - 127 - 92 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 3 - - - - - - - - QFrame::HLine - - - QFrame::Sunken - - - Qt::Horizontal - - - - - - - 0 - - - 6 - - - - - - 16 - 28 - - - - - 28 - 16777215 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - 20 - 16777215 - - - - - - - - - - - - - - - 16 - 28 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - - - - - - - - - - 16 - 28 - - - - true - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 46 - 28 - - - - - - - - - 54 - 60 - - - - - 16777215 - 60 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 3 - - - 0 - - - - - - 35 - 0 - - - - - - - - - 35 - 0 - - - - - - - - - - - - - - false - - - - 209 - 162 - - - - - 209 - 7777777 - - - - true - - - - - - - 9 - - - 6 - - - - - - 127 - 92 - - - - - 127 - 92 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 3 - - - - - - - - 0 - - - 6 - - - - - - 16 - 28 - - - - - 28 - 16777215 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - 20 - 16777215 - - - - - - - - - - - - - - - 16 - 28 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - - - - - - - - - - 16 - 28 - - - - true - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - - - - - - - - - - - QFrame::HLine - - - QFrame::Sunken - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 46 - 28 - - - - - - - - - 54 - 60 - - - - - 16777215 - 60 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 3 - - - 0 - - - - - - 35 - 0 - - - - - - - - - 35 - 0 - - - - - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 20 - - - - @@ -3066,82 +1099,7 @@ 6 - - - - QFrame::HLine - - - QFrame::Sunken - - - Qt::Horizontal - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - - - - - - Qt::AlignCenter - - - - - - - - - - - 56 - 16777215 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 5 - - - 0 - - - - - - - - Qt::AlignCenter - - - - - - - + 0 @@ -3155,7 +1113,7 @@ 0 - 3 + 2 @@ -3240,7 +1198,7 @@ - + 192 @@ -3261,23 +1219,29 @@ - 11 + 9 6 + + + + + + - + 0 6 - + 0 @@ -3323,7 +1287,7 @@ - + @@ -3363,37 +1327,128 @@ - - - - true - + + - QFrame::StyledPanel + QFrame::HLine - QFrame::Raised + QFrame::Sunken + + + Qt::Horizontal - - - 3 - - - 0 - - - - - - - - Qt::AlignCenter - - - - + + + + 0 + + + 6 + + + + + + 55 + 16 + + + + + 55 + 16777215 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 5 + + + 0 + + + + + + + + Qt::AlignCenter + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 0 + + + + + + + + Qt::AlignCenter + + + + + + + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + + + Qt::AlignCenter + + + + + + + + @@ -3923,6 +1978,2012 @@ + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + + 20 + 20 + + + + + + + + + 566 + 136 + + + + + 566 + 136 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 74 + 131 + 83 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 74 + 131 + 83 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 128 + 128 + 128 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 199 + 199 + 199 + + + + + + + 255 + 255 + 255 + + + + + + + 128 + 128 + 128 + + + + + + + 74 + 131 + 83 + + + + + + + 74 + 131 + 83 + + + + + + + 0 + 0 + 0 + + + + + + + 86 + 117 + 148 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + true + + + + + + + 9 + + + 6 + + + + + + 0 + 0 + 0 + 0 + + + + + 331 + 102 + + + + + 331 + 102 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 9 + + + 6 + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + + 104 + 114 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 4 + + + 4 + + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 4 + + + 0 + + + + + + 0 + 30 + + + + + 16777215 + 30 + + + + true + + + + + + + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + true + + + + + + + + + + 0 + + + 4 + + + + + + 0 + 26 + + + + + 16777215 + 26 + + + + + + + + + 0 + 26 + + + + + 16777215 + 26 + + + + + + + + + + + + + 0 + + + 6 + + + + + + 95 + 16 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 12 + + + + Qt::AlignCenter + + + + + + + + + + + 95 + 36 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 15 + 75 + true + + + + Qt::AlignCenter + + + + + + + + + + + + + + + Qt::Horizontal + + + + 20 + 20 + + + + + + + + + + 0 + + + 6 + + + + + false + + + + 209 + 162 + + + + + 209 + 5555555 + + + + true + + + + + + + 9 + + + 6 + + + + + + 127 + 92 + + + + + 127 + 92 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 3 + + + + + + + + + + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + + 28 + 16777215 + + + + false + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + 20 + 16777215 + + + + true + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + + + + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + + + + false + + + + 209 + 162 + + + + + 209 + 5555555 + + + + true + + + + + + + 9 + + + 6 + + + + + + 127 + 92 + + + + + 127 + 92 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 3 + + + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + + 28 + 16777215 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + 20 + 16777215 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + + + + + + + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + + + + false + + + + 209 + 162 + + + + + 209 + 5555555 + + + + true + + + + + + + 9 + + + 6 + + + + + + 127 + 92 + + + + + 127 + 92 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 3 + + + + + + + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + + 28 + 16777215 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + 20 + 16777215 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + + + + false + + + + 209 + 162 + + + + + 209 + 7777777 + + + + true + + + + + + + 9 + + + 6 + + + + + + 127 + 92 + + + + + 127 + 92 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 3 + + + + + + + + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + + 28 + 16777215 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + 20 + 16777215 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + + + + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 20 + 20 + + + + diff --git a/src/gui/qt/mainwindowimpl.cpp b/src/gui/qt/mainwindowimpl.cpp index adeeaf5e..b8d659c1 100755 --- a/src/gui/qt/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindowimpl.cpp @@ -71,31 +71,31 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name) pixmapLabel_cardBoard0->setObjectName(QString::fromUtf8("pixmapLabel_cardBoard0")); pixmapLabel_cardBoard0->setMinimumSize(QSize(57, 80)); pixmapLabel_cardBoard0->setMaximumSize(QSize(57, 80)); - gridLayout2->addWidget(pixmapLabel_cardBoard0, 0, 0, 1, 1); + gridLayout11->addWidget(pixmapLabel_cardBoard0, 0, 0, 1, 1); MyCardsPixmapLabel *pixmapLabel_cardBoard1 = new MyCardsPixmapLabel(frame_5); pixmapLabel_cardBoard1->setObjectName(QString::fromUtf8("pixmapLabel_cardBoard1")); pixmapLabel_cardBoard1->setMinimumSize(QSize(57, 80)); pixmapLabel_cardBoard1->setMaximumSize(QSize(57, 80)); - gridLayout2->addWidget(pixmapLabel_cardBoard1, 0, 1, 1, 1); + gridLayout11->addWidget(pixmapLabel_cardBoard1, 0, 1, 1, 1); MyCardsPixmapLabel *pixmapLabel_cardBoard2 = new MyCardsPixmapLabel(frame_5); pixmapLabel_cardBoard2->setObjectName(QString::fromUtf8("pixmapLabel_cardBoard2")); pixmapLabel_cardBoard2->setMinimumSize(QSize(57, 80)); pixmapLabel_cardBoard2->setMaximumSize(QSize(57, 80)); - gridLayout2->addWidget(pixmapLabel_cardBoard2, 0, 2, 1, 1); + gridLayout11->addWidget(pixmapLabel_cardBoard2, 0, 2, 1, 1); MyCardsPixmapLabel *pixmapLabel_cardBoard3 = new MyCardsPixmapLabel(frame_5); pixmapLabel_cardBoard3->setObjectName(QString::fromUtf8("pixmapLabel_cardBoard3")); pixmapLabel_cardBoard3->setMinimumSize(QSize(57, 80)); pixmapLabel_cardBoard3->setMaximumSize(QSize(57, 80)); - gridLayout2->addWidget(pixmapLabel_cardBoard3, 0, 3, 1, 1); + gridLayout11->addWidget(pixmapLabel_cardBoard3, 0, 3, 1, 1); MyCardsPixmapLabel *pixmapLabel_cardBoard4 = new MyCardsPixmapLabel(frame_5); pixmapLabel_cardBoard4->setObjectName(QString::fromUtf8("pixmapLabel_cardBoard4")); pixmapLabel_cardBoard4->setMinimumSize(QSize(57, 80)); pixmapLabel_cardBoard4->setMaximumSize(QSize(57, 80)); - gridLayout2->addWidget(pixmapLabel_cardBoard4, 0, 4, 1, 1); + gridLayout11->addWidget(pixmapLabel_cardBoard4, 0, 4, 1, 1); MyCardsPixmapLabel *pixmapLabel_card0a = new MyCardsPixmapLabel(frame5); pixmapLabel_card0a->setObjectName(QString::fromUtf8("pixmapLabel_card0a")); @@ -107,7 +107,7 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name) pixmapLabel_card0a->setMinimumSize(QSize(80, 112)); pixmapLabel_card0a->setMaximumSize(QSize(80, 112)); pixmapLabel_card0a->setScaledContents(true); - gridLayout35->addWidget(pixmapLabel_card0a, 0, 0, 1, 1); + gridLayout2->addWidget(pixmapLabel_card0a, 0, 0, 1, 1); MyCardsPixmapLabel *pixmapLabel_card0b = new MyCardsPixmapLabel(frame5); pixmapLabel_card0b->setObjectName(QString::fromUtf8("pixmapLabel_card0b")); @@ -119,55 +119,55 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name) pixmapLabel_card0b->setMinimumSize(QSize(80, 112)); pixmapLabel_card0b->setMaximumSize(QSize(80, 112)); pixmapLabel_card0b->setScaledContents(true); - gridLayout35->addWidget(pixmapLabel_card0b, 0, 1, 1, 1); + gridLayout2->addWidget(pixmapLabel_card0b, 0, 1, 1, 1); MyCardsPixmapLabel *pixmapLabel_card1a = new MyCardsPixmapLabel(frame8_2_2_2_5); pixmapLabel_card1a->setObjectName(QString::fromUtf8("pixmapLabel_card1a")); pixmapLabel_card1a->setMinimumSize(QSize(57, 80)); pixmapLabel_card1a->setMaximumSize(QSize(57, 80)); - gridLayout9->addWidget(pixmapLabel_card1a, 0, 0, 1, 1); + gridLayout18->addWidget(pixmapLabel_card1a, 0, 0, 1, 1); MyCardsPixmapLabel *pixmapLabel_card1b = new MyCardsPixmapLabel(frame8_2_2_2_5); pixmapLabel_card1b->setObjectName(QString::fromUtf8("pixmapLabel_card1b")); pixmapLabel_card1b->setMinimumSize(QSize(57, 80)); pixmapLabel_card1b->setMaximumSize(QSize(57, 80)); - gridLayout9->addWidget(pixmapLabel_card1b, 0, 1, 1, 1); + gridLayout18->addWidget(pixmapLabel_card1b, 0, 1, 1, 1); MyCardsPixmapLabel *pixmapLabel_card2a = new MyCardsPixmapLabel(frame8_2_2_2_4); pixmapLabel_card2a->setObjectName(QString::fromUtf8("pixmapLabel_card2a")); pixmapLabel_card2a->setMinimumSize(QSize(57, 80)); pixmapLabel_card2a->setMaximumSize(QSize(57, 80)); - gridLayout15->addWidget(pixmapLabel_card2a, 0, 0, 1, 1); + gridLayout24->addWidget(pixmapLabel_card2a, 0, 0, 1, 1); MyCardsPixmapLabel *pixmapLabel_card2b = new MyCardsPixmapLabel(frame8_2_2_2_4); pixmapLabel_card2b->setObjectName(QString::fromUtf8("pixmapLabel_card2b")); pixmapLabel_card2b->setMinimumSize(QSize(57, 80)); pixmapLabel_card2b->setMaximumSize(QSize(57, 80)); - gridLayout15->addWidget(pixmapLabel_card2b, 0, 1, 1, 1); + gridLayout24->addWidget(pixmapLabel_card2b, 0, 1, 1, 1); MyCardsPixmapLabel *pixmapLabel_card3a = new MyCardsPixmapLabel(frame8_2_2_2_6); pixmapLabel_card3a->setObjectName(QString::fromUtf8("pixmapLabel_card3a")); pixmapLabel_card3a->setMinimumSize(QSize(57, 80)); pixmapLabel_card3a->setMaximumSize(QSize(57, 80)); - gridLayout21->addWidget(pixmapLabel_card3a, 0, 0, 1, 1); + gridLayout30->addWidget(pixmapLabel_card3a, 0, 0, 1, 1); MyCardsPixmapLabel *pixmapLabel_card3b = new MyCardsPixmapLabel(frame8_2_2_2_6); pixmapLabel_card3b->setObjectName(QString::fromUtf8("pixmapLabel_card3b")); pixmapLabel_card3b->setMinimumSize(QSize(57, 80)); pixmapLabel_card3b->setMaximumSize(QSize(57, 80)); - gridLayout21->addWidget(pixmapLabel_card3b, 0, 1, 1, 1); + gridLayout30->addWidget(pixmapLabel_card3b, 0, 1, 1, 1); MyCardsPixmapLabel *pixmapLabel_card4a = new MyCardsPixmapLabel(frame8_2_2_2_7); pixmapLabel_card4a->setObjectName(QString::fromUtf8("pixmapLabel_card4a")); pixmapLabel_card4a->setMinimumSize(QSize(57, 80)); pixmapLabel_card4a->setMaximumSize(QSize(57, 80)); - gridLayout27->addWidget(pixmapLabel_card4a, 0, 0, 1, 1); + gridLayout36->addWidget(pixmapLabel_card4a, 0, 0, 1, 1); MyCardsPixmapLabel *pixmapLabel_card4b = new MyCardsPixmapLabel(frame8_2_2_2_7); pixmapLabel_card4b->setObjectName(QString::fromUtf8("pixmapLabel_card4b")); pixmapLabel_card4b->setMinimumSize(QSize(57, 80)); pixmapLabel_card4b->setMaximumSize(QSize(57, 80)); - gridLayout27->addWidget(pixmapLabel_card4b, 0, 1, 1, 1); + gridLayout36->addWidget(pixmapLabel_card4b, 0, 1, 1, 1); int i; @@ -490,11 +490,21 @@ void mainWindowImpl::callSettingsDialog() { //Toolbox verstecken? if (!myConfig->readConfigInt("ShowToolBox", 1)) { groupBox_tools->hide(); } else { groupBox_tools->show(); } - + + //Falls Spielernamen geändert wurden --> neu zeichnen --> erst beim nächsten Neustart neu ausgelesen + if (v->getPlayerNickIsChanged()) { + cout << "wurst" << endl; + actualHand->getPlayerArray()[1]->setMyName(v->lineEdit_Opponent1Name->text().toStdString()); + actualHand->getPlayerArray()[2]->setMyName(v->lineEdit_Opponent2Name->text().toStdString()); + actualHand->getPlayerArray()[3]->setMyName(v->lineEdit_Opponent3Name->text().toStdString()); + actualHand->getPlayerArray()[4]->setMyName(v->lineEdit_Opponent4Name->text().toStdString()); + v->setPlayerNickIsChanged(FALSE); + + refreshPlayerName(); + } } } - void mainWindowImpl::setGame(Game *g) { actualGame = g; } void mainWindowImpl::setHand(HandInterface* br) { actualHand = br; } @@ -647,7 +657,6 @@ void mainWindowImpl::highlightRoundLabel(string tempround) { } - void mainWindowImpl::refreshAll() { refreshSet(); @@ -674,7 +683,6 @@ void mainWindowImpl::refreshPot() { } - void mainWindowImpl::dealHoleCards() { QPixmap flipside(":/othercards/cards/othercards/flipside.png"); @@ -799,7 +807,6 @@ void mainWindowImpl::dealFlopCards6() { } - void mainWindowImpl::dealTurnCards0() { dealTurnCards0Timer->start(dealCardsSpeed*2); } void mainWindowImpl::dealTurnCards1() { @@ -827,7 +834,6 @@ void mainWindowImpl::dealTurnCards2() { else { dealTurnCards2Timer->start(dealCardsSpeed); } } - void mainWindowImpl::dealRiverCards0() { dealRiverCards0Timer->start(dealCardsSpeed*2); } void mainWindowImpl::dealRiverCards1() { @@ -983,6 +989,7 @@ void mainWindowImpl::myCheck() { //Spiel läuft weiter nextPlayerAnimation(); } + void mainWindowImpl::myCall(){ int tempHighestSet = 0; @@ -1266,53 +1273,54 @@ void mainWindowImpl::postRiverRunAnimation3() { actionLabelArray[i]->setText("

- Winner -

"); //nicht gewonnene Karten ausblenden - int j; + if ( actualHand->getActivePlayersCounter() != 1 && myConfig->readConfigInt("ShowFadeOutCardsAnimation", 1)) { - //index 0 testen - bool index0 = TRUE; - for(j=0; j<=4; j++) { - -// cout << (actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] << endl; - if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 0 ) { index0 = FALSE; } - } - if (index0) { holeCardsArray[i][0]->startFadeOut(); /*cout << "Fade Out index0" << endl;*/} - //index 1 testen - bool index1 = TRUE; - for(j=0; j<=4; j++) { - if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 1 ) { index1 = FALSE; } - } - if (index1) { holeCardsArray[i][1]->startFadeOut(); /*cout << "Fade Out index1" << endl;*/} - //index 2 testen - bool index2 = TRUE; - for(j=0; j<=4; j++) { - if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 2 ) { index2 = FALSE; } - } - if (index2) { boardCardsArray[0]->startFadeOut(); /*cout << "Fade Out index2" << endl;*/} - //index 3 testen - bool index3 = TRUE; - for(j=0; j<=4; j++) { - if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 3 ) { index3 = FALSE; } - } - if (index3) { boardCardsArray[1]->startFadeOut(); /*cout << "Fade Out index3" << endl;*/} - //index 4 testen - bool index4 = TRUE; - for(j=0; j<=4; j++) { - if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 4 ) { index4 = FALSE; } - } - if (index4) { boardCardsArray[2]->startFadeOut(); /*cout << "Fade Out index4" << endl;*/} - //index 5 testen - bool index5 = TRUE; - for(j=0; j<=4; j++) { - if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 5 ) { index5 = FALSE; } - } - if (index5) { boardCardsArray[3]->startFadeOut(); /*cout << "Fade Out index5" << endl;*/} - //index 6 testen - bool index6 = TRUE; - for(j=0; j<=4; j++) { - if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 6 ) { index6 = FALSE; } - } - if (index6) { boardCardsArray[4]->startFadeOut(); /*cout << "Fade Out index6" << endl;*/} - + int j; + + //index 0 testen --> Karte darf nicht im MyBestHand Position Array drin sein, es darf nicht nur ein Spieler Aktiv sein, die Config fordert die Animation + bool index0 = TRUE; + for(j=0; j<=4; j++) { + // cout << (actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] << endl; + if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 0 ) { index0 = FALSE; } + } + if (index0) { holeCardsArray[i][0]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index0" << endl;*/} + //index 1 testen + bool index1 = TRUE; + for(j=0; j<=4; j++) { + if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 1 ) { index1 = FALSE; } + } + if (index1) { holeCardsArray[i][1]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index1" << endl;*/} + //index 2 testen + bool index2 = TRUE; + for(j=0; j<=4; j++) { + if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 2 ) { index2 = FALSE; } + } + if (index2) { boardCardsArray[0]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index2" << endl;*/} + //index 3 testen + bool index3 = TRUE; + for(j=0; j<=4; j++) { + if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 3 ) { index3 = FALSE; } + } + if (index3) { boardCardsArray[1]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index3" << endl;*/} + //index 4 testen + bool index4 = TRUE; + for(j=0; j<=4; j++) { + if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 4 ) { index4 = FALSE; } + } + if (index4) { boardCardsArray[2]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index4" << endl;*/} + //index 5 testen + bool index5 = TRUE; + for(j=0; j<=4; j++) { + if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 5 ) { index5 = FALSE; } + } + if (index5) { boardCardsArray[3]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index5" << endl;*/} + //index 6 testen + bool index6 = TRUE; + for(j=0; j<=4; j++) { + if ((actualHand->getPlayerArray()[i]->getMyBestHandPosition())[j] == 6 ) { index6 = FALSE; } + } + if (index6) { boardCardsArray[4]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index6" << endl;*/} + } } } @@ -1404,7 +1412,6 @@ void mainWindowImpl::postRiverRunAnimation6() { postRiverRunAnimation6Timer->start(newRoundSpeed); } - void mainWindowImpl::startNewHand() { if( !breakAfterActualHand){ actualGame->startHand(); @@ -1420,7 +1427,6 @@ else { void mainWindowImpl::handSwitchRounds() { actualHand->switchRounds(); } - void mainWindowImpl::nextRoundCleanGui() { int i; @@ -1454,6 +1460,9 @@ void mainWindowImpl::nextRoundCleanGui() { refreshAll(); + //Wenn Pause zwischen den Hands in der Konfiguration steht den Stop Button drücken! + if (myConfig->readConfigInt("PauseBetweenHands", 0)) { pushButton_break->click(); } + } void mainWindowImpl::stopTimer() { @@ -1492,7 +1501,6 @@ void mainWindowImpl::stopTimer() { } - void mainWindowImpl::userWidgetsBackgroudColor() { @@ -1515,7 +1523,6 @@ void mainWindowImpl::userWidgetsBackgroudColor() { } } - void mainWindowImpl::setSpeeds() { gameSpeed = (11-guiGameSpeed)*10; @@ -1551,7 +1558,6 @@ void mainWindowImpl::paintStartSplash() { mySplash->show(); } - void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) { // cout << event->key() << endl; diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui index e21b8253..91884b1a 100644 --- a/src/gui/qt/settingsdialog.ui +++ b/src/gui/qt/settingsdialog.ui @@ -5,422 +5,420 @@ 0 0 - 487 - 339 + 528 + 343 PokerTH - Settings - - - - 9 - 302 - 469 - 28 - + + + 9 - - Qt::Horizontal + + 6 - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - 9 - 9 - 150 - 278 - - - - - 150 - 16777215 - - - - - Game Settings - - - - - Interface - - - - - Player Nicks - - - - - Log Messages - - - - - - - 9 - 293 - 469 - 16 - - - - Qt::Horizontal - - - - - - 170 - 20 - 313 - 275 - - - - 0 - - - - - 9 + + + + 0 - - 6 - - - - - 1 - - + + + 9 - - - - - - Game-Speed + + 6 - - - - - - 11 + + + + Show Game Settings Dialog on every new Game + + + + + + + Pause between Hands (Press "Start" Button to go on) + + + + + + + Qt::Horizontal + + + + + + + Small Blind + + + + + + + + 75 + true + + + + Game Settings + + + + + + + Hands before raise Small Blind + + + + + + + Game-Speed + + + + + + + Number of Players + + + + + + + Qt::Vertical + + + + 20 + 20 + + + + + + + + Start Cash + + + + + + + 11 + + + 1 + + + 1 + + + + + + + 1 + + + 9 + + + + + + + 500 + + + 5 + + + + + + + 5000 + + + 1000 + + + + + + + 5 + + + 2 + + + + + + + + + 9 - - 1 + + 6 - - 1 + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Show Fade-Out Animation for Non-Winning Cards + + + + + + + Show Toolbox (F2 to switch on/off) + + + + + + + Show Intro on Startup + + + + + + + Qt::Horizontal + + + + + + + + 75 + true + + + + Interface + + + + + + + + + 9 - - - - - - Hands before raise Small Blind + + 6 - - - - - - 5 + + + + + 75 + true + + + + Player Nicks + + + + + + + Qt::Vertical + + + + 295 + 51 + + + + + + + + Human Player: + + + + + + + Opponent 2: + + + + + + + Opponent 4: + + + + + + + Opponent 3: + + + + + + + Opponent 1: + + + + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + + + 9 - - 2 + + 6 - - - - - - 5000 - - - 1000 - - - - - - - - 75 - true - - - - Game Settings - - - - - - - Number of Players - - - - - - - Small Blind - - - - - - - Start Cash - - - - - - - 500 - - - 5 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Show Game Settings Dialog on every new Game - - - - - - - Qt::Horizontal - - - - - - - - - 9 + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + + + + + 75 + true + + + + Log Messages + + + + + +
+ + + + + + 150 + 16777215 + - - 6 + + + Game Settings + + + + + Interface + + + + + Player Nicks + + + + + Log Messages + + + + + + + + Qt::Horizontal - - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Show Toolbox (F2 to switch on/off) - - - - - - - - 75 - true - - - - Interface - - - - - - - Show Intro on Startup - - - - - - - - - 9 + + + + + + Qt::Horizontal - - 6 + + QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - 75 - true - - - - Player Nicks - - - - - - - Qt::Vertical - - - - 295 - 51 - - - - - - - - Human Player: - - - - - - - Opponent 2: - - - - - - - Opponent 4: - - - - - - - Opponent 3: - - - - - - - Opponent 1: - - - - - - - - - - - - - - - - - - - - - - Qt::Horizontal - - - - - - - - - 9 - - - 6 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - - - - - 75 - true - - - - Log Messages - - - - - - + + + listWidget diff --git a/src/gui/qt/settingsdialogimpl.cpp b/src/gui/qt/settingsdialogimpl.cpp index f0defdb1..9c4dde81 100644 --- a/src/gui/qt/settingsdialogimpl.cpp +++ b/src/gui/qt/settingsdialogimpl.cpp @@ -28,6 +28,8 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, const char *name) setupUi(this); + playerNickIsChanged = FALSE; + //Formulare Füllen ConfigFile myConfig; @@ -44,13 +46,20 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, const char *name) spinBox_smallBlind->setValue(myConfig.readConfigInt("SmallBlind", 10)); spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig.readConfigInt("HandsBeforeRaiseSmallBlind", 9)); spinBox_gameSpeed->setValue(myConfig.readConfigInt("GameSpeed", 4)); + checkBox_pauseBetweenHands->setChecked(myConfig.readConfigInt("PauseBetweenHands", 0)); checkBox_showGameSettingsDialogOnNewGame->setChecked(myConfig.readConfigInt("ShowGameSettingsDialogOnNewGame", 1)); - + //Interface checkBox_showToolbox->setChecked(myConfig.readConfigInt("ShowToolBox", 1)); checkBox_showIntro->setChecked(myConfig.readConfigInt("ShowIntro", 1)); + checkBox_showFadeOutCardsAnimation->setChecked(myConfig.readConfigInt("ShowFadeOutCardsAnimation", 1)); connect( buttonBox, SIGNAL( accepted() ), this, SLOT( isAccepted() ) ); + connect( lineEdit_humanPlayerName, SIGNAL( textChanged( const QString &) ), this, SLOT( playerNickChanged() ) ); + connect( lineEdit_Opponent1Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) ); + connect( lineEdit_Opponent2Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) ); + connect( lineEdit_Opponent3Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) ); + connect( lineEdit_Opponent4Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) ); } @@ -73,10 +82,12 @@ void settingsDialogImpl::isAccepted() { myConfig.writeConfigInt("SmallBlind", spinBox_smallBlind->value()); myConfig.writeConfigInt("HandsBeforeRaiseSmallBlind", spinBox_handsBeforeRaiseSmallBlind->value()); myConfig.writeConfigInt("GameSpeed", spinBox_gameSpeed->value()); + myConfig.writeConfigInt("PauseBetweenHands", checkBox_pauseBetweenHands->isChecked()); myConfig.writeConfigInt("ShowGameSettingsDialogOnNewGame", checkBox_showGameSettingsDialogOnNewGame->isChecked()); // Interface myConfig.writeConfigInt("ShowToolBox", checkBox_showToolbox->isChecked()); myConfig.writeConfigInt("ShowIntro", checkBox_showIntro->isChecked()); + myConfig.writeConfigInt("ShowFadeOutCardsAnimation", checkBox_showFadeOutCardsAnimation->isChecked()); } diff --git a/src/gui/qt/settingsdialogimpl.h b/src/gui/qt/settingsdialogimpl.h index 1c4e9c92..450f5706 100644 --- a/src/gui/qt/settingsdialogimpl.h +++ b/src/gui/qt/settingsdialogimpl.h @@ -22,15 +22,26 @@ #include "ui_settingsdialog.h" +class QLineEdit; + class settingsDialogImpl: public QDialog, public Ui::settingsDialog { Q_OBJECT public: settingsDialogImpl(QWidget *parent = 0, const char *name = 0); + void setPlayerNickIsChanged(bool theValue) { playerNickIsChanged = theValue; } + bool getPlayerNickIsChanged() const { return playerNickIsChanged; } + public slots: void isAccepted(); + void playerNickChanged() { setPlayerNickIsChanged(TRUE); }; + +private: + + bool playerNickIsChanged; + }; #endif