flipcards animation complete (with config-entry)

This commit is contained in:
doitux
2007-01-31 01:17:13 +00:00
parent 267b554d9a
commit 14c1b2064c
8 changed files with 266 additions and 136 deletions
+4 -1
View File
@@ -31,7 +31,7 @@ using namespace std;
ConfigFile::ConfigFile() ConfigFile::ConfigFile()
{ {
// !!!! Revisionsnummer der Configdefaults !!!!! // !!!! Revisionsnummer der Configdefaults !!!!!
configRev = 2; configRev = 3;
// Pfad und Dateinamen setzen // Pfad und Dateinamen setzen
#ifdef _WIN32 #ifdef _WIN32
@@ -131,6 +131,9 @@ void ConfigFile::createDefaultConfig() {
TiXmlElement * confElement15 = new TiXmlElement( "ShowFadeOutCardsAnimation" ); TiXmlElement * confElement15 = new TiXmlElement( "ShowFadeOutCardsAnimation" );
config->LinkEndChild( confElement15 ); config->LinkEndChild( confElement15 );
confElement15->SetAttribute("value", 1); confElement15->SetAttribute("value", 1);
TiXmlElement * confElement19 = new TiXmlElement( "ShowFlipCardsAnimation" );
config->LinkEndChild( confElement19 );
confElement19->SetAttribute("value", 1);
TiXmlElement * confElement16 = new TiXmlElement( "FlipsideTux" ); TiXmlElement * confElement16 = new TiXmlElement( "FlipsideTux" );
config->LinkEndChild( confElement16 ); config->LinkEndChild( confElement16 );
confElement16->SetAttribute("value", 1); confElement16->SetAttribute("value", 1);
+8 -6
View File
@@ -73,20 +73,22 @@ void MyCardsPixmapLabel::nextFadeOutFrame() {
void MyCardsPixmapLabel::startFlipCards(int speed, QPixmap frontPix, QPixmap *flipsidePix) { void MyCardsPixmapLabel::startFlipCards(int speed, QPixmap frontPix, QPixmap *flipsidePix) {
QLabel::setPixmap(frontPix);
frameFlipCardsAction1Size = 1.0; frameFlipCardsAction1Size = 1.0;
frameFlipCardsAction2Size = 0.0; frameFlipCardsAction2Size = 0.0;
*front = frontPix; *front = frontPix;
flipside = flipsidePix; flipside = flipsidePix;
// if(speed <= 4) { opacityRaiseIntervall = 0.01; }
// if(speed > 4 && speed <= 7) { opacityRaiseIntervall = 0.02; } if(speed <= 4) { flipCardsScaleIntervall = 0.1; }
// if(speed > 7 && speed <= 10) { opacityRaiseIntervall = 0.04; } if(speed > 4 && speed <= 6) { flipCardsScaleIntervall = 0.20; }
if(speed > 6 && speed <= 8) { flipCardsScaleIntervall = 0.25; }
if(speed > 8 && speed <= 10) { flipCardsScaleIntervall = 0.5; }
// //
flipCardsScaleIntervall = 0.1;
if(speed != 11) { if(speed != 11) {
flipCardsAction1 = TRUE; flipCardsAction1 = TRUE;
// frameOpacity = 0.0;
flipCardsTimer->start(40); flipCardsTimer->start(40);
} }
@@ -105,7 +107,7 @@ void MyCardsPixmapLabel::nextFlipCardsFrame() {
flipCardsAction2 = TRUE; flipCardsAction2 = TRUE;
} }
else { else {
//dann front aufdecken //dann front vergrößern
if (frameFlipCardsAction2Size < 0.9 ) { if (frameFlipCardsAction2Size < 0.9 ) {
frameFlipCardsAction2Size += flipCardsScaleIntervall; frameFlipCardsAction2Size += flipCardsScaleIntervall;
+5
View File
@@ -28,6 +28,9 @@ public:
void setIsFlipside(bool theValue){ isFlipside = theValue;} void setIsFlipside(bool theValue){ isFlipside = theValue;}
bool getIsFlipside() const{ return isFlipside;} bool getIsFlipside() const{ return isFlipside;}
void setFadeOutAction(bool theValue) { fadeOutAction = theValue; }
bool getFadeOutAction() const { return fadeOutAction;}
void startFadeOut(int); void startFadeOut(int);
void startFlipCards(int, QPixmap, QPixmap*); void startFlipCards(int, QPixmap, QPixmap*);
@@ -40,6 +43,8 @@ public slots:
void nextFadeOutFrame(); void nextFadeOutFrame();
void nextFlipCardsFrame(); void nextFlipCardsFrame();
private: private:
qreal frameOpacity; qreal frameOpacity;
+3 -19
View File
@@ -3992,7 +3992,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>874</width> <width>874</width>
<height>29</height> <height>30</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuSpiel" > <widget class="QMenu" name="menuSpiel" >
@@ -4061,24 +4061,8 @@
<y>616</y> <y>616</y>
</hint> </hint>
<hint type="destinationlabel" > <hint type="destinationlabel" >
<x>716</x> <x>721</x>
<y>627</y> <y>626</y>
</hint>
</hints>
</connection>
<connection>
<sender>spinBox_set</sender>
<signal>editingFinished()</signal>
<receiver>pushButton_set</receiver>
<slot>click()</slot>
<hints>
<hint type="sourcelabel" >
<x>572</x>
<y>498</y>
</hint>
<hint type="destinationlabel" >
<x>533</x>
<y>501</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
+168 -56
View File
@@ -171,6 +171,9 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
} }
else { flipside->load(":/othercards/cards/othercards/flipside.png"); } else { flipside->load(":/othercards/cards/othercards/flipside.png"); }
//Flipside Animation noch nicht erledigt
flipHolecardsAllInAlreadyDone = FALSE;
//Toolbox verstecken? //Toolbox verstecken?
if (!myConfig->readConfigInt("ShowToolBox", 1)) { groupBox_tools->hide(); } if (!myConfig->readConfigInt("ShowToolBox", 1)) { groupBox_tools->hide(); }
@@ -759,7 +762,7 @@ void mainWindowImpl::dealHoleCards() {
refreshGroupbox(); refreshGroupbox();
} }
void mainWindowImpl::dealFlopCards0() { dealFlopCards0Timer->start(dealCardsSpeed*2); } void mainWindowImpl::dealFlopCards0() { dealFlopCards0Timer->start(preDealCardsSpeed); }
void mainWindowImpl::dealFlopCards1() { void mainWindowImpl::dealFlopCards1() {
@@ -792,8 +795,16 @@ void mainWindowImpl::dealFlopCards4() {
actualHand->getBoard()->getMyCards(tempBoardCardsArray); actualHand->getBoard()->getMyCards(tempBoardCardsArray);
tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[0], 10)+".png"); tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[0], 10)+".png");
QPixmap card(tempCardsPixmap); QPixmap card(tempCardsPixmap);
boardCardsArray[0]->setPixmap(card, FALSE);
//Config? mit oder ohne Eye-Candy?
if(myConfig->readConfigInt("ShowFlipCardsAnimation", 1)) {
//mit Eye-Candy
boardCardsArray[0]->startFlipCards(guiGameSpeed, card, flipside);
}
else {
//ohne Eye-Candy
boardCardsArray[0]->setPixmap(card, FALSE);
}
dealFlopCards4Timer->start(dealCardsSpeed); dealFlopCards4Timer->start(dealCardsSpeed);
} }
@@ -804,8 +815,16 @@ void mainWindowImpl::dealFlopCards5() {
actualHand->getBoard()->getMyCards(tempBoardCardsArray); actualHand->getBoard()->getMyCards(tempBoardCardsArray);
tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[1], 10)+".png"); tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[1], 10)+".png");
QPixmap card(tempCardsPixmap); QPixmap card(tempCardsPixmap);
boardCardsArray[1]->setPixmap(card, FALSE);
//Config? mit oder ohne Eye-Candy?
if(myConfig->readConfigInt("ShowFlipCardsAnimation", 1)) {
//mit Eye-Candy
boardCardsArray[1]->startFlipCards(guiGameSpeed, card, flipside);
}
else {
//ohne Eye-Candy
boardCardsArray[1]->setPixmap(card, FALSE);
}
dealFlopCards5Timer->start(dealCardsSpeed); dealFlopCards5Timer->start(dealCardsSpeed);
} }
@@ -817,17 +836,26 @@ void mainWindowImpl::dealFlopCards6() {
actualHand->getBoard()->getMyCards(tempBoardCardsArray); actualHand->getBoard()->getMyCards(tempBoardCardsArray);
tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[2], 10)+".png"); tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[2], 10)+".png");
QPixmap card(tempCardsPixmap); QPixmap card(tempCardsPixmap);
boardCardsArray[2]->setPixmap(card, FALSE);
//Config? mit oder ohne Eye-Candy?
if(myConfig->readConfigInt("ShowFlipCardsAnimation", 1)) {
//mit Eye-Candy
boardCardsArray[2]->startFlipCards(guiGameSpeed, card, flipside);
}
else {
//ohne Eye-Candy
boardCardsArray[2]->setPixmap(card, FALSE);
}
// stable // stable
// wenn alle All In // wenn alle All In
if(actualHand->getAllInCondition()) { dealFlopCards6Timer->start(dealCardsSpeed*4); } if(actualHand->getAllInCondition()) { dealFlopCards6Timer->start(AllInDealCardsSpeed); }
// sonst normale Variante // sonst normale Variante
else { dealFlopCards6Timer->start(dealCardsSpeed);} else { dealFlopCards6Timer->start(postDealCardsSpeed);}
} }
void mainWindowImpl::dealTurnCards0() { dealTurnCards0Timer->start(dealCardsSpeed*2); } void mainWindowImpl::dealTurnCards0() { dealTurnCards0Timer->start(preDealCardsSpeed); }
void mainWindowImpl::dealTurnCards1() { void mainWindowImpl::dealTurnCards1() {
@@ -843,17 +871,26 @@ void mainWindowImpl::dealTurnCards2() {
actualHand->getBoard()->getMyCards(tempBoardCardsArray); actualHand->getBoard()->getMyCards(tempBoardCardsArray);
tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[3], 10)+".png"); tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[3], 10)+".png");
QPixmap card(tempCardsPixmap); QPixmap card(tempCardsPixmap);
boardCardsArray[3]->setPixmap(card, FALSE);
//Config? mit oder ohne Eye-Candy?
if(myConfig->readConfigInt("ShowFlipCardsAnimation", 1)) {
//mit Eye-Candy
boardCardsArray[3]->startFlipCards(guiGameSpeed, card, flipside);
}
else {
//ohne Eye-Candy
boardCardsArray[3]->setPixmap(card, FALSE);
}
// stable // stable
// wenn alle All In // wenn alle All In
if(actualHand->getAllInCondition()) { dealTurnCards2Timer->start(dealCardsSpeed*4); if(actualHand->getAllInCondition()) { dealTurnCards2Timer->start(AllInDealCardsSpeed);
} }
// sonst normale Variante // sonst normale Variante
else { dealTurnCards2Timer->start(dealCardsSpeed); } else { dealTurnCards2Timer->start(postDealCardsSpeed); }
} }
void mainWindowImpl::dealRiverCards0() { dealRiverCards0Timer->start(dealCardsSpeed*2); } void mainWindowImpl::dealRiverCards0() { dealRiverCards0Timer->start(preDealCardsSpeed); }
void mainWindowImpl::dealRiverCards1() { void mainWindowImpl::dealRiverCards1() {
@@ -870,19 +907,23 @@ void mainWindowImpl::dealRiverCards2() {
actualHand->getBoard()->getMyCards(tempBoardCardsArray); actualHand->getBoard()->getMyCards(tempBoardCardsArray);
tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[4], 10)+".png"); tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[4], 10)+".png");
QPixmap card(tempCardsPixmap); QPixmap card(tempCardsPixmap);
boardCardsArray[4]->setPixmap(card, FALSE);
//Config? mit oder ohne Eye-Candy?
if(myConfig->readConfigInt("ShowFlipCardsAnimation", 1)) {
//mit Eye-Candy
boardCardsArray[4]->startFlipCards(guiGameSpeed, card, flipside);
}
else {
//ohne Eye-Candy
boardCardsArray[4]->setPixmap(card, FALSE);
}
// stable // stable
// wenn alle All In // wenn alle All In
if(actualHand->getAllInCondition()) { if(actualHand->getAllInCondition()) { dealRiverCards2Timer->start(AllInDealCardsSpeed); }
// QTimer::singleShot(dealCardsSpeed*4, this, SLOT( handSwitchRounds() ));
dealRiverCards2Timer->start(dealCardsSpeed*4);
}
// sonst normale Variante // sonst normale Variante
else { else {
// QTimer::singleShot(dealCardsSpeed, this, SLOT( handSwitchRounds() )); dealRiverCards2Timer->start(postDealCardsSpeed);
dealRiverCards2Timer->start(dealCardsSpeed);
} }
@@ -1252,28 +1293,58 @@ void mainWindowImpl::postRiverRunAnimation2() {
if(activePlayersCounter!=1) { if(activePlayersCounter!=1) {
//Karten der aktiven Spieler umdrehen if(!flipHolecardsAllInAlreadyDone) {
QPixmap onePix(":/graphics/cards/1px.png");
//TempArrays //Config? mit oder ohne Eye-Candy?
QPixmap tempCardsPixmapArray[2]; if(myConfig->readConfigInt("ShowFlipCardsAnimation", 1)) {
int tempCardsIntArray[2]; // mit Eye-Candy
int i, j; //TempArrays
for(i=1; i<maxQuantityPlayers; i++) { int tempCardsIntArray[2];
actualHand->getPlayerArray()[i]->getMyCards(tempCardsIntArray);
for(j=0; j<2; j++) {
if(actualHand->getPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1) {
tempCardsPixmapArray[j].load(":/othercards/cards/othercards/"+QString::number(tempCardsIntArray[j], 10)+".png"); int i, j;
holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j], FALSE);
for(i=1; i<maxQuantityPlayers; i++) {
actualHand->getPlayerArray()[i]->getMyCards(tempCardsIntArray);
for(j=0; j<2; j++) {
if(actualHand->getPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1) {
holeCardsArray[i][j]->startFlipCards(guiGameSpeed, QPixmap(":/othercards/cards/othercards/"+QString::number(tempCardsIntArray[j], 10)+".png"), flipside);
}
}
} }
} }
else {
//Ohne Eye-Candy
//Karten der aktiven Spieler umdrehen
QPixmap onePix(":/graphics/cards/1px.png");
//TempArrays
QPixmap tempCardsPixmapArray[2];
int tempCardsIntArray[2];
int i, j;
for(i=1; i<maxQuantityPlayers; i++) {
actualHand->getPlayerArray()[i]->getMyCards(tempCardsIntArray);
for(j=0; j<2; j++) {
if(actualHand->getPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1) {
tempCardsPixmapArray[j].load(":/othercards/cards/othercards/"+QString::number(tempCardsIntArray[j], 10)+".png");
holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j], FALSE);
}
}
}
}
//Wenn einmal umgedreht dann fertig!!
flipHolecardsAllInAlreadyDone = TRUE;
} }
postRiverRunAnimation2Timer->start(postRiverRunAnimationSpeed); postRiverRunAnimation2Timer->start(postRiverRunAnimationSpeed);
} }
else { postRiverRunAnimation3(); } else { postRiverRunAnimation3(); }
} }
void mainWindowImpl::postRiverRunAnimation3() { void mainWindowImpl::postRiverRunAnimation3() {
@@ -1431,37 +1502,65 @@ void mainWindowImpl::postRiverRunAnimation6() {
void mainWindowImpl::flipHolecardsAllIn() { void mainWindowImpl::flipHolecardsAllIn() {
int i; int i;
//Aktive Spieler zählen --> wenn nur noch einer nicht-folded dann keine Karten umdrehen if(!flipHolecardsAllInAlreadyDone) {
int activePlayersCounter = 0; //Aktive Spieler zählen --> wenn nur noch einer nicht-folded dann keine Karten umdrehen
for (i=0; i<maxQuantityPlayers; i++) { int activePlayersCounter = 0;
if (actualHand->getPlayerArray()[i]->getMyAction() != 1 && actualHand->getPlayerArray()[i]->getMyActiveStatus() == 1) activePlayersCounter++; for (i=0; i<maxQuantityPlayers; i++) {
} if (actualHand->getPlayerArray()[i]->getMyAction() != 1 && actualHand->getPlayerArray()[i]->getMyActiveStatus() == 1) activePlayersCounter++;
}
if(activePlayersCounter!=1) { if(activePlayersCounter!=1) {
//Karten der aktiven Spieler umdrehen //Config? mit oder ohne Eye-Candy?
QPixmap onePix(":/graphics/cards/1px.png"); if(myConfig->readConfigInt("ShowFlipCardsAnimation", 1)) {
// mit Eye-Candy
//TempArrays //TempArrays
QPixmap tempCardsPixmapArray[2]; int tempCardsIntArray[2];
int tempCardsIntArray[2];
int i, j; int i, j;
for(i=1; i<maxQuantityPlayers; i++) {
actualHand->getPlayerArray()[i]->getMyCards(tempCardsIntArray);
for(j=0; j<2; j++) {
if(actualHand->getPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1) {
tempCardsPixmapArray[j].load(":/othercards/cards/othercards/"+QString::number(tempCardsIntArray[j], 10)+".png"); for(i=1; i<maxQuantityPlayers; i++) {
holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j], FALSE); actualHand->getPlayerArray()[i]->getMyCards(tempCardsIntArray);
for(j=0; j<2; j++) {
if(actualHand->getPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1) {
holeCardsArray[i][j]->startFlipCards(guiGameSpeed, QPixmap(":/othercards/cards/othercards/"+QString::number(tempCardsIntArray[j], 10)+".png"), flipside);
}
}
}
}
else {
//Ohne Eye-Candy
//Karten der aktiven Spieler umdrehen
QPixmap onePix(":/graphics/cards/1px.png");
//TempArrays
QPixmap tempCardsPixmapArray[2];
int temp2CardsIntArray[2];
int i, j;
for(i=1; i<maxQuantityPlayers; i++) {
actualHand->getPlayerArray()[i]->getMyCards(temp2CardsIntArray);
for(j=0; j<2; j++) {
if(actualHand->getPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1) {
tempCardsPixmapArray[j].load(":/othercards/cards/othercards/"+QString::number(temp2CardsIntArray[j], 10)+".png");
holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j], FALSE);
}
}
} }
} }
} }
} }
//Wenn einmal umgedreht dann fertig!!
flipHolecardsAllInAlreadyDone = TRUE;
} }
void mainWindowImpl::startNewHand() { void mainWindowImpl::startNewHand() {
@@ -1481,11 +1580,20 @@ void mainWindowImpl::handSwitchRounds() { actualHand->switchRounds(); }
void mainWindowImpl::nextRoundCleanGui() { void mainWindowImpl::nextRoundCleanGui() {
int i; int i,j;
// GUI bereinigen // GUI bereinigen - Bilder löschen, Animationen unterbrechen
QPixmap onePix(":/graphics/cards/1px.png"); QPixmap onePix(":/graphics/cards/1px.png");
for (i=0; i<5; i++ ) { boardCardsArray[i]->setPixmap(onePix, FALSE); } for (i=0; i<5; i++ ) {
boardCardsArray[i]->setPixmap(onePix, FALSE);
boardCardsArray[i]->setFadeOutAction(FALSE);
}
for (i=1; i<=4; i++ ) {
for ( j=0; j<=1; j++ ) { holeCardsArray[i][j]->setFadeOutAction(FALSE);}
}
QColor c(0,0,0); QColor c(0,0,0);
for(i=0; i<maxQuantityPlayers; i++) { for(i=0; i<maxQuantityPlayers; i++) {
@@ -1512,6 +1620,8 @@ void mainWindowImpl::nextRoundCleanGui() {
refreshAll(); refreshAll();
flipHolecardsAllInAlreadyDone = FALSE;
//Wenn Pause zwischen den Hands in der Konfiguration steht den Stop Button drücken! //Wenn Pause zwischen den Hands in der Konfiguration steht den Stop Button drücken!
if (myConfig->readConfigInt("PauseBetweenHands", 0)) { pushButton_break->click(); } if (myConfig->readConfigInt("PauseBetweenHands", 0)) { pushButton_break->click(); }
@@ -1579,6 +1689,9 @@ void mainWindowImpl::setSpeeds() {
gameSpeed = (11-guiGameSpeed)*10; gameSpeed = (11-guiGameSpeed)*10;
dealCardsSpeed = (gameSpeed/2)*10; //milliseconds dealCardsSpeed = (gameSpeed/2)*10; //milliseconds
preDealCardsSpeed = dealCardsSpeed*2; //Zeit for Karten aufdecken auf dem Board (Flop, Turn, River)
postDealCardsSpeed = dealCardsSpeed*2; //Zeit nach Karten aufdecken auf dem Board (Flop, Turn, River)
AllInDealCardsSpeed = dealCardsSpeed*4; //Zeit nach Karten aufdecken auf dem Board (Flop, Turn, River) bei AllIn
postRiverRunAnimationSpeed = gameSpeed*18; postRiverRunAnimationSpeed = gameSpeed*18;
winnerBlinkSpeed = gameSpeed*3; //milliseconds winnerBlinkSpeed = gameSpeed*3; //milliseconds
newRoundSpeed = gameSpeed*35; newRoundSpeed = gameSpeed*35;
@@ -1612,12 +1725,11 @@ void mainWindowImpl::paintStartSplash() {
void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) { void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
// cout << event->key() << endl; cout << event->key() << endl;
if (event->key() == 16777220) { if(spinBox_set->hasFocus()) pushButton_set->click(); } //ENTER
if (event->key() == 16777265) { switchToolBox(); } if (event->key() == 16777265) { switchToolBox(); } //F2
if (event->key() == 65) { if (event->key() == 65) {
pixmapLabel_card1a->startFlipCards(4, QPixmap(":/othercards/cards/othercards/44.png"), flipside);
} }
if (event->key() == 66) { if (event->key() == 66) {
+5
View File
@@ -234,6 +234,9 @@ private:
int guiGameSpeed; int guiGameSpeed;
int gameSpeed; int gameSpeed;
int dealCardsSpeed; int dealCardsSpeed;
int preDealCardsSpeed;
int postDealCardsSpeed;
int AllInDealCardsSpeed;
int postRiverRunAnimationSpeed; int postRiverRunAnimationSpeed;
int winnerBlinkSpeed; int winnerBlinkSpeed;
int newRoundSpeed; int newRoundSpeed;
@@ -247,6 +250,8 @@ private:
bool debugMode; bool debugMode;
bool breakAfterActualHand; bool breakAfterActualHand;
bool flipHolecardsAllInAlreadyDone;
QColor active; QColor active;
QColor inactive; QColor inactive;
QColor highlight; QColor highlight;
+52 -35
View File
@@ -177,6 +177,26 @@
<property name="spacing" > <property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<item row="3" column="0" >
<widget class="QCheckBox" name="checkBox_showToolbox" >
<property name="text" >
<string>Show Toolbox (F2 to switch on/off)</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_13" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Interface</string>
</property>
</widget>
</item>
<item row="1" column="0" > <item row="1" column="0" >
<widget class="Line" name="line_5" > <widget class="Line" name="line_5" >
<property name="orientation" > <property name="orientation" >
@@ -184,20 +204,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0" > <item row="4" column="0" >
<spacer> <widget class="QCheckBox" name="checkBox_showFadeOutCardsAnimation" >
<property name="orientation" > <property name="text" >
<enum>Qt::Vertical</enum> <string>Show Fade-Out Animation for Non-Winning Cards</string>
</property> </property>
<property name="sizeHint" > </widget>
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item> </item>
<item row="5" column="0" > <item row="6" column="0" >
<widget class="QGroupBox" name="groupBox" > <widget class="QGroupBox" name="groupBox" >
<property name="title" > <property name="title" >
<string>Flipside of Cards</string> <string>Flipside of Cards</string>
@@ -291,20 +305,6 @@ p, li { white-space: pre-wrap; }
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="4" column="0" >
<widget class="QCheckBox" name="checkBox_showFadeOutCardsAnimation" >
<property name="text" >
<string>Show Fade-Out Animation for Non-Winning Cards</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="checkBox_showToolbox" >
<property name="text" >
<string>Show Toolbox (F2 to switch on/off)</string>
</property>
</widget>
</item>
<item row="2" column="0" > <item row="2" column="0" >
<widget class="QCheckBox" name="checkBox_showIntro" > <widget class="QCheckBox" name="checkBox_showIntro" >
<property name="text" > <property name="text" >
@@ -312,16 +312,23 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" > <item row="7" column="0" >
<widget class="QLabel" name="label_13" > <spacer>
<property name="font" > <property name="orientation" >
<font> <enum>Qt::Vertical</enum>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="checkBox_showFlipCardsAnimation" >
<property name="text" > <property name="text" >
<string>Interface</string> <string>Show Flip-Card Animation</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -519,14 +526,24 @@ p, li { white-space: pre-wrap; }
<tabstop>spinBox_quantityPlayers</tabstop> <tabstop>spinBox_quantityPlayers</tabstop>
<tabstop>spinBox_startCash</tabstop> <tabstop>spinBox_startCash</tabstop>
<tabstop>spinBox_smallBlind</tabstop> <tabstop>spinBox_smallBlind</tabstop>
<tabstop>spinBox_handsBeforeRaiseSmallBlind</tabstop>
<tabstop>spinBox_gameSpeed</tabstop> <tabstop>spinBox_gameSpeed</tabstop>
<tabstop>checkBox_pauseBetweenHands</tabstop>
<tabstop>checkBox_showGameSettingsDialogOnNewGame</tabstop> <tabstop>checkBox_showGameSettingsDialogOnNewGame</tabstop>
<tabstop>buttonBox</tabstop> <tabstop>checkBox_showIntro</tabstop>
<tabstop>checkBox_showToolbox</tabstop>
<tabstop>checkBox_showFadeOutCardsAnimation</tabstop>
<tabstop>checkBox_showFlipCardsAnimation</tabstop>
<tabstop>radioButton_flipsideTux</tabstop>
<tabstop>radioButton_flipsideOwn</tabstop>
<tabstop>lineEdit_OwnFlipsideFilename</tabstop>
<tabstop>pushButton_openFlipsidePicture</tabstop>
<tabstop>lineEdit_humanPlayerName</tabstop> <tabstop>lineEdit_humanPlayerName</tabstop>
<tabstop>lineEdit_Opponent1Name</tabstop> <tabstop>lineEdit_Opponent1Name</tabstop>
<tabstop>lineEdit_Opponent2Name</tabstop> <tabstop>lineEdit_Opponent2Name</tabstop>
<tabstop>lineEdit_Opponent3Name</tabstop> <tabstop>lineEdit_Opponent3Name</tabstop>
<tabstop>lineEdit_Opponent4Name</tabstop> <tabstop>lineEdit_Opponent4Name</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="deck.qrc" /> <include location="deck.qrc" />
+2
View File
@@ -53,6 +53,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, const char *name)
checkBox_showToolbox->setChecked(myConfig.readConfigInt("ShowToolBox", 1)); checkBox_showToolbox->setChecked(myConfig.readConfigInt("ShowToolBox", 1));
checkBox_showIntro->setChecked(myConfig.readConfigInt("ShowIntro", 1)); checkBox_showIntro->setChecked(myConfig.readConfigInt("ShowIntro", 1));
checkBox_showFadeOutCardsAnimation->setChecked(myConfig.readConfigInt("ShowFadeOutCardsAnimation", 1)); checkBox_showFadeOutCardsAnimation->setChecked(myConfig.readConfigInt("ShowFadeOutCardsAnimation", 1));
checkBox_showFlipCardsAnimation->setChecked(myConfig.readConfigInt("ShowFlipCardsAnimation", 1));
radioButton_flipsideTux->setChecked(myConfig.readConfigInt("FlipsideTux", 1)); radioButton_flipsideTux->setChecked(myConfig.readConfigInt("FlipsideTux", 1));
radioButton_flipsideOwn->setChecked(myConfig.readConfigInt("FlipsideOwn", 0)); radioButton_flipsideOwn->setChecked(myConfig.readConfigInt("FlipsideOwn", 0));
if(radioButton_flipsideOwn->isChecked()) { if(radioButton_flipsideOwn->isChecked()) {
@@ -98,6 +99,7 @@ void settingsDialogImpl::isAccepted() {
myConfig.writeConfigInt("ShowToolBox", checkBox_showToolbox->isChecked()); myConfig.writeConfigInt("ShowToolBox", checkBox_showToolbox->isChecked());
myConfig.writeConfigInt("ShowIntro", checkBox_showIntro->isChecked()); myConfig.writeConfigInt("ShowIntro", checkBox_showIntro->isChecked());
myConfig.writeConfigInt("ShowFadeOutCardsAnimation", checkBox_showFadeOutCardsAnimation->isChecked()); myConfig.writeConfigInt("ShowFadeOutCardsAnimation", checkBox_showFadeOutCardsAnimation->isChecked());
myConfig.writeConfigInt("ShowFlipCardsAnimation", checkBox_showFlipCardsAnimation->isChecked());
myConfig.writeConfigInt("FlipsideTux", radioButton_flipsideTux->isChecked()); myConfig.writeConfigInt("FlipsideTux", radioButton_flipsideTux->isChecked());
myConfig.writeConfigInt("FlipsideOwn", radioButton_flipsideOwn->isChecked()); myConfig.writeConfigInt("FlipsideOwn", radioButton_flipsideOwn->isChecked());
myConfig.writeConfigString("FlipsideOwnFile", lineEdit_OwnFlipsideFilename->text().toStdString()); myConfig.writeConfigString("FlipsideOwnFile", lineEdit_OwnFlipsideFilename->text().toStdString());