This commit is contained in:
doitux
2007-02-28 20:51:43 +00:00
parent 55cb71508b
commit eae5f68f89
14 changed files with 50 additions and 17 deletions
@@ -35,6 +35,8 @@ joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent)
QValidator *validator = new QRegExpValidator(rx, this);
lineEdit_profileName->setValidator(validator);
pushButton_delete->setDisabled(TRUE);
lineEdit_ipAddress->setFocus();
myServerProfilesFile = myConfig.readConfigString("DataDir")+"serverprofiles.xml";
@@ -141,6 +143,8 @@ void joinNetworkGameDialogImpl::itemFillForm (QTreeWidgetItem* item, int column)
checkBox_ipv6->setChecked(QString::fromStdString(profile->Attribute("IsIpv6")).toInt(&toIntTrue, 10));
}
pushButton_delete->setEnabled(TRUE);
}
void joinNetworkGameDialogImpl::saveServerProfile() {
@@ -202,22 +206,21 @@ void joinNetworkGameDialogImpl::deleteServerProfile() {
TiXmlElement* profile = docHandle.FirstChild( "PokerTH" ).FirstChild( "ServerProfiles" ).FirstChild( treeWidget->currentItem()->data(0,0).toString().toStdString() ).ToElement();
if ( profile ) {
cout << profile->Attribute("Name") << "\n";
profile->Parent()->RemoveChild(profile);
}
else { cout << "nööö" << "\n"; }
if ( profile ) { profile->Parent()->RemoveChild(profile); }
if(!doc.SaveFile()) { QMessageBox::warning(this, tr("Save Server-Profile-File Error"),
tr("Could not save Server-Profiles-File:\n"+QString::fromStdString(myServerProfilesFile).toAscii()),
QMessageBox::Close); }
//Liste Füllen
fillServerProfileList();
}
pushButton_delete->setDisabled(TRUE);
}
void joinNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
// std::cout << "key" << event->key();
if (event->key() == 16777220) { pushButton_connect->click(); } //ENTER
}
+24 -1
View File
@@ -1499,11 +1499,12 @@ void mainWindowImpl::postRiverRunAnimation2() {
for(j=0; j<2; j++) {
holeCardsArray[i][j]->startFlipCards(guiGameSpeed, QPixmap(":/cards/graphics/cards/"+QString::number(tempCardsIntArray[j], 10)+".png"), flipside);
}
}
//Karten umdrehen Loggen
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], actualHand->getPlayerArray()[i]->getMyCardsValueInt());
actualHand->getPlayerArray()[i]->setMyCardsFlip(1);
}
}
}
@@ -1530,6 +1531,8 @@ void mainWindowImpl::postRiverRunAnimation2() {
}
//Karten umdrehen Loggen
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], actualHand->getPlayerArray()[i]->getMyCardsValueInt() );
actualHand->getPlayerArray()[i]->setMyCardsFlip(1);
}
}
}
@@ -1757,6 +1760,8 @@ void mainWindowImpl::flipHolecardsAllIn() {
}
//Karten umdrehen Loggen
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1]);
actualHand->getPlayerArray()[i]->setMyCardsFlip(1);
}
}
@@ -1784,6 +1789,8 @@ void mainWindowImpl::flipHolecardsAllIn() {
}
//Karten umdrehen Loggen
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), temp2CardsIntArray[0], temp2CardsIntArray[1] );
actualHand->getPlayerArray()[i]->setMyCardsFlip(1);
}
}
}
@@ -1794,6 +1801,21 @@ void mainWindowImpl::flipHolecardsAllIn() {
flipHolecardsAllInAlreadyDone = TRUE;
}
void mainWindowImpl::showMyCards() {
//TempArrays
int tempCardsIntArray[2];
actualHand->getPlayerArray()[0]->getMyCards(tempCardsIntArray);
if( actualHand->getPlayerArray()[0]->getMyCardsFlip() == 0 && actualHand->getActualRound() == 4 && actualHand->getPlayerArray()[0]->getMyActiveStatus() && actualHand->getPlayerArray()[0]->getMyAction() != 1) {
//Karten umdrehen Loggen
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[0]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], actualHand->getPlayerArray()[0]->getMyCardsValueInt() );
actualHand->getPlayerArray()[0]->setMyCardsFlip(1);
}
}
void mainWindowImpl::startNewHand() {
if( !breakAfterActualHand){ actualGame->startHand();
@@ -1971,6 +1993,7 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
if (event->key() == 16777265) { switchLeftToolBox(); } //F2
if (event->key() == 16777266) { switchRightToolBox(); } //F3
if (event->key() == Qt::Key_F) { switchFullscreen(); } //f
if (event->key() == Qt::Key_S) { showMyCards(); } //f
if (event->key() == 16777249) {
pushButton_break->click();
ctrlPressed = TRUE;
+1
View File
@@ -158,6 +158,7 @@ public slots:
void postRiverRunAnimation6();
void flipHolecardsAllIn();
void showMyCards();
void handSwitchRounds();