\n";
- stream << QString("Game: "+QString::number(gameID,10)+" | Hand: "+QString::number(handID,10)+" |
(X)" -#define FORMATRIGHT(X) "(X)
" - -using namespace std; - -mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent) - : QMainWindow(parent), myChat(NULL), myConfig(c), gameSpeed(0), myActionIsBet(0), myActionIsRaise(0), pushButtonBetRaiseIsChecked(FALSE), pushButtonCallCheckIsChecked(FALSE), pushButtonFoldIsChecked(FALSE), pushButtonAllInIsChecked(FALSE), myButtonsAreCheckable(FALSE), breakAfterCurrentHand(FALSE), currentGameOver(FALSE), betSliderChangedByInput(FALSE), myLastPreActionBetValue(0) -{ - int i; - -// this->setStyle(new QPlastiqueStyle); - - //for statistic development - for(i=0; i<15; i++) { - statisticArray[i] = 0; - } - //////////////////////////// - - myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str()); - - setupUi(this); - - //Sound - mySDLPlayer = new SDLPlayer(myConfig); - - //styleSheetReader -// myStyleSheetReader = new StyleSheetReader(QString(myAppDataPath+"gfx/stylesheet.xml").toStdString()); - - //Player0 pixmapCardsLabel needs Myw - pixmapLabel_card0b->setMyW(this); - pixmapLabel_card0a->setMyW(this); - - //Flipside festlegen; - if (myConfig->readConfigInt("FlipsideOwn") && myConfig->readConfigString("FlipsideOwnFile") != "") { - flipside = new QPixmap(QString::fromUtf8(myConfig->readConfigString("FlipsideOwnFile").c_str())); - } - else { - flipside = new QPixmap(myAppDataPath +"gfx/cards/default/flipside.png"); - } - - //Flipside Animation noch nicht erledigt - flipHolecardsAllInAlreadyDone = FALSE; - - //Toolboxen verstecken? - if (!myConfig->readConfigInt("ShowRightToolBox")) { - groupBox_RightToolBox->hide(); - } - if (!myConfig->readConfigInt("ShowLeftToolBox")) { - groupBox_LeftToolBox->hide(); - } - - //Intro abspielen? - if (myConfig->readConfigInt("ShowIntro")) { -// label_logo->hide(); - QTimer::singleShot(100, this, SLOT( paintStartSplash() )); } - - // userWidgetsArray init - userWidgetsArray[0] = pushButton_BetRaise; - userWidgetsArray[1] = pushButton_CallCheck; - userWidgetsArray[2] = pushButton_Fold; - userWidgetsArray[3] = lineEdit_betValue; - userWidgetsArray[4] = horizontalSlider_bet; - userWidgetsArray[5] = pushButton_AllIn; - - //hide userWidgets - for(i=0; i<6; i++) { - userWidgetsArray[i]->hide(); - } - - //Timer Objekt erstellen - dealFlopCards0Timer = new QTimer(this); - dealFlopCards1Timer = new QTimer(this); - dealFlopCards2Timer = new QTimer(this); - dealFlopCards3Timer = new QTimer(this); - dealFlopCards4Timer = new QTimer(this); - dealFlopCards5Timer = new QTimer(this); - dealFlopCards6Timer = new QTimer(this); - dealTurnCards0Timer = new QTimer(this); - dealTurnCards1Timer = new QTimer(this); - dealTurnCards2Timer = new QTimer(this); - dealRiverCards0Timer = new QTimer(this); - dealRiverCards1Timer = new QTimer(this); - dealRiverCards2Timer = new QTimer(this); - - nextPlayerAnimationTimer = new QTimer(this); - preflopAnimation1Timer = new QTimer(this); - preflopAnimation2Timer = new QTimer(this); - flopAnimation1Timer = new QTimer(this); - flopAnimation2Timer = new QTimer(this); - turnAnimation1Timer = new QTimer(this); - turnAnimation2Timer = new QTimer(this); - riverAnimation1Timer = new QTimer(this); - riverAnimation2Timer = new QTimer(this); - - postRiverAnimation1Timer = new QTimer(this); - postRiverRunAnimation1Timer = new QTimer(this); - postRiverRunAnimation2Timer = new QTimer(this); - postRiverRunAnimation2_flipHoleCards1Timer = new QTimer(this); - postRiverRunAnimation2_flipHoleCards2Timer = new QTimer(this); - postRiverRunAnimation3Timer = new QTimer(this); - postRiverRunAnimation5Timer = new QTimer(this); - potDistributeTimer = new QTimer(this); - postRiverRunAnimation6Timer = new QTimer(this); - - blinkingStartButtonAnimationTimer = new QTimer(this); - - dealFlopCards0Timer->setSingleShot(TRUE); - dealFlopCards1Timer->setSingleShot(TRUE); - dealFlopCards2Timer->setSingleShot(TRUE); - dealFlopCards3Timer->setSingleShot(TRUE); - dealFlopCards4Timer->setSingleShot(TRUE); - dealFlopCards5Timer->setSingleShot(TRUE); - dealFlopCards6Timer->setSingleShot(TRUE); - dealTurnCards0Timer->setSingleShot(TRUE); - dealTurnCards1Timer->setSingleShot(TRUE); - dealTurnCards2Timer->setSingleShot(TRUE); - dealRiverCards0Timer->setSingleShot(TRUE); - dealRiverCards1Timer->setSingleShot(TRUE); - dealRiverCards2Timer->setSingleShot(TRUE); - - nextPlayerAnimationTimer->setSingleShot(TRUE); - preflopAnimation1Timer->setSingleShot(TRUE); - preflopAnimation2Timer->setSingleShot(TRUE); - flopAnimation1Timer->setSingleShot(TRUE); - flopAnimation2Timer->setSingleShot(TRUE); - turnAnimation1Timer->setSingleShot(TRUE); - turnAnimation2Timer->setSingleShot(TRUE); - riverAnimation1Timer->setSingleShot(TRUE); - riverAnimation2Timer->setSingleShot(TRUE); - - postRiverAnimation1Timer->setSingleShot(TRUE); - postRiverRunAnimation1Timer->setSingleShot(TRUE); - postRiverRunAnimation2Timer->setSingleShot(TRUE); - postRiverRunAnimation2_flipHoleCards1Timer->setSingleShot(TRUE); - postRiverRunAnimation2_flipHoleCards2Timer->setSingleShot(TRUE); - postRiverRunAnimation3Timer->setSingleShot(TRUE); - postRiverRunAnimation5Timer->setSingleShot(TRUE); - postRiverRunAnimation6Timer->setSingleShot(TRUE); - - // buttonLabelArray init - buttonLabelArray[0] = textLabel_Button0; - buttonLabelArray[1] = textLabel_Button1; - buttonLabelArray[2] = textLabel_Button2; - buttonLabelArray[3] = textLabel_Button3; - buttonLabelArray[4] = textLabel_Button4; - buttonLabelArray[5] = textLabel_Button5; - buttonLabelArray[6] = textLabel_Button6; - - // cashLabelArray init - cashLabelArray[0] = textLabel_Cash0; - cashLabelArray[1] = textLabel_Cash1; - cashLabelArray[2] = textLabel_Cash2; - cashLabelArray[3] = textLabel_Cash3; - cashLabelArray[4] = textLabel_Cash4; - cashLabelArray[5] = textLabel_Cash5; - cashLabelArray[6] = textLabel_Cash6; - - // cashTopLabelArray init - cashTopLabelArray[0] = textLabel_TopCash0; - cashTopLabelArray[1] = textLabel_TopCash1; - cashTopLabelArray[2] = textLabel_TopCash2; - cashTopLabelArray[3] = textLabel_TopCash3; - cashTopLabelArray[4] = textLabel_TopCash4; - cashTopLabelArray[5] = textLabel_TopCash5; - cashTopLabelArray[6] = textLabel_TopCash6; - - // playerNameLabelArray init - playerNameLabelArray[0] = label_PlayerName0; - playerNameLabelArray[1] = label_PlayerName1; - playerNameLabelArray[2] = label_PlayerName2; - playerNameLabelArray[3] = label_PlayerName3; - playerNameLabelArray[4] = label_PlayerName4; - playerNameLabelArray[5] = label_PlayerName5; - playerNameLabelArray[6] = label_PlayerName6; - - // playerAvatarLabelArray init - playerAvatarLabelArray[0] = label_Avatar0; - playerAvatarLabelArray[1] = label_Avatar1; - playerAvatarLabelArray[2] = label_Avatar2; - playerAvatarLabelArray[3] = label_Avatar3; - playerAvatarLabelArray[4] = label_Avatar4; - playerAvatarLabelArray[5] = label_Avatar5; - playerAvatarLabelArray[6] = label_Avatar6; - - // setLabelArray init - setLabelArray[0] = textLabel_Set0; - setLabelArray[1] = textLabel_Set1; - setLabelArray[2] = textLabel_Set2; - setLabelArray[3] = textLabel_Set3; - setLabelArray[4] = textLabel_Set4; - setLabelArray[5] = textLabel_Set5; - setLabelArray[6] = textLabel_Set6; - for (i=0; i