tschakkaaaaaaaaaa

This commit is contained in:
doitux
2007-03-31 00:04:36 +00:00
parent c223328738
commit 745d244151
7 changed files with 193 additions and 94 deletions
+11 -3
View File
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>485</width>
<height>291</height>
<width>487</width>
<height>365</height>
</rect>
</property>
<property name="windowTitle" >
@@ -97,8 +97,16 @@ p, li { white-space: pre-wrap; }
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Authors: &lt;/span>&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Felix Hammer (&lt;a href="mailto:doitux@pokerth.net">&lt;span style=" text-decoration: underline; color:#0000ff;">doitux@pokerth.net&lt;/span>&lt;/a>)&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> - initial idea, basic architecture, gui implementation, webmaster@pokerth.net&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Florian Thauer (&lt;a href="mailto:floty@pokerth.net">&lt;span style=" text-decoration: underline; color:#0000ff;">floty@pokerth.net&lt;/span>&lt;/a>)&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Lothar May (&lt;a href="mailto:lotodore@pokerth.net">&lt;span style=" text-decoration: underline; color:#0000ff;">lotodore@pokerth.net&lt;/span>&lt;/a>)&lt;/p>&lt;/body>&lt;/html></string>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> - initial idea, basic architecture, engine development&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Lothar May (&lt;a href="mailto:lotodore@pokerth.net">&lt;span style=" text-decoration: underline; color:#0000ff;">lotodore@pokerth.net&lt;/span>&lt;/a>)&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> - network development&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Oskar Lindqvist (&lt;a href="mailto:tranberry@pokerth.net">&lt;span style=" text-decoration: underline; color:#0000ff;">tranberry@pokerth.net&lt;/span>&lt;/a>)&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> - gui graphics design, webdesign&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
+21 -26
View File
@@ -38,7 +38,7 @@ Log::Log(mainWindowImpl* w) : myW(w)
myLogFile = new QFile(myLogDir->absolutePath()+"/pokerth-log-"+QDateTime::currentDateTime().toString("yyyy-MM-dd_hh.mm.ss")+".html");
//Logo-Pixmap extrahieren
QPixmap::QPixmap(":graphics/graphics/logo-140-100.png").save(myLogDir->absolutePath()+"/logo.png");
QPixmap::QPixmap(":graphics/resources/graphics/logoChip3D.png").save(myLogDir->absolutePath()+"/logo.png");
// myW->textBrowser_Log->append(myLogFile->fileName());
@@ -132,7 +132,7 @@ void Log::logPlayerActionMsg(string playerName, int action, int setValue) {
void Log::logNewGameHandMsg(int gameID, int handID) {
int i;
int i, j ,k;
myW->textBrowser_Log->append("<b>## Game: "+QString::number(gameID,10)+" | Hand: "+QString::number(handID,10)+" ##</b>");
@@ -143,59 +143,54 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
stream << "<p><b>####################&#160;&#160;&#160;Game: "+QString::number(gameID,10)+" | Hand: "+QString::number(handID,10)+"&#160;&#160;&#160;####################</b></br>";
stream << "CASH: ";
int k = 0;
//Aktive Spieler zählen
int activePlayersCounter = 0;
for (k=0; k<myW->getMaxQuantityPlayers(); k++) {
if (myW->getActualHand()->getPlayerArray()[k]->getMyActiveStatus() == 1) activePlayersCounter++;
}
k = 0;
if(activePlayersCounter > 2) {
for(i=0; i<myW->getActualHand()->getStartQuantityPlayers(); i++) {
if(myW->getActualHand()->getPlayerArray()[i]->getMyButton() == 1) {
if(i == myW->getActualHand()->getStartQuantityPlayers()-1) {
if(myW->getActualHand()->getPlayerArray()[i]->getMyActiveStatus()) {
//print cash only for active players
if(myW->getActualHand()->getPlayerArray()[i]->getMyButton() == 1) {
if(k==1) { stream << ", "; }
k=1;
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+" (Dealer): "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash(),10)+"$";
}
else {
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+" (Dealer): "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash(),10)+"$, ";
}
}
else {
if(i == myW->getActualHand()->getStartQuantityPlayers()-1) {
if(k==1) { stream << ", "; }
k=1;
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+": "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash()+myW->getActualHand()->getPlayerArray()[i]->getMySet(),10)+"$";
}
else {
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+": "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash()+myW->getActualHand()->getPlayerArray()[i]->getMySet(),10)+"$, ";
}
}
}
}
else {
for(i=0; i<myW->getActualHand()->getStartQuantityPlayers(); i++) {
if(myW->getActualHand()->getPlayerArray()[i]->getMyButton() == 3) {
if(i == myW->getActualHand()->getStartQuantityPlayers()-1) {
if(myW->getActualHand()->getPlayerArray()[i]->getMyActiveStatus()) {
//print cash only for active players
if(myW->getActualHand()->getPlayerArray()[i]->getMyButton() == 3) {
if(k==1) { stream << ", "; }
k=1;
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+" (Dealer): "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash(),10)+"$";
}
else {
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+" (Dealer): "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash(),10)+"$, ";
}
}
else {
if(i == myW->getActualHand()->getStartQuantityPlayers()-1) {
if(k==1) { stream << ", "; }
k=1;
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+": "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash()+myW->getActualHand()->getPlayerArray()[i]->getMySet(),10)+"$";
}
else {
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+": "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash()+myW->getActualHand()->getPlayerArray()[i]->getMySet(),10)+"$, ";
}
}
}
}
stream << "</br>BLINDS: ";
for(i=0; i<myW->getMaxQuantityPlayers(); i++) {
int j,k = 0;
j = 0;
//Aktive Spieler zählen
int activePlayersCounter = 0;
for (k=0; k<myW->getMaxQuantityPlayers(); k++) {
+24 -5
View File
@@ -472,7 +472,9 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
this->setFocus();
//Statusbar
statusBar()->showMessage(tr("Ctrl+N to start a new Game"));
if(myConfig->readConfigInt("ShowStatusbarMessages")) {
statusBar()->showMessage(tr("Ctrl+N to start a new game"));
}
//Dialoge
myJoinNetworkGameDialog = new joinNetworkGameDialogImpl(this);
@@ -1249,6 +1251,10 @@ void mainWindowImpl::dealRiverCards2() {
void mainWindowImpl::meInAction() {
if(myConfig->readConfigInt("ShowStatusbarMessages")) {
statusBar()->showMessage(tr("F1 - Fold/All-In | F2 - Check/Call | F3 - Bet/Raise"), 15000);
}
switch (actualHand->getActualRound()) {
case 0: {
@@ -1353,6 +1359,8 @@ void mainWindowImpl::myFold(){
//set that i was the last active player. need this for unhighlighting groupbox
actualHand->setLastPlayersTurn(0);
statusBar()->clearMessage();
//Spiel läuft weiter
nextPlayerAnimation();
}
@@ -1370,6 +1378,8 @@ void mainWindowImpl::myCheck() {
//set that i was the last active player. need this for unhighlighting groupbox
actualHand->setLastPlayersTurn(0);
statusBar()->clearMessage();
//Spiel läuft weiter
nextPlayerAnimation();
}
@@ -1413,6 +1423,8 @@ void mainWindowImpl::myCall(){
//set that i was the last active player. need this for unhighlighting groupbox
actualHand->setLastPlayersTurn(0);
statusBar()->clearMessage();
//Spiel läuft weiter
nextPlayerAnimation();
}
@@ -1502,6 +1514,8 @@ void mainWindowImpl::mySet(){
disableMyButtons();
statusBar()->clearMessage();
//set that i was the last active player. need this for unhighlighting groupbox
actualHand->setLastPlayersTurn(0);
@@ -1538,6 +1552,8 @@ void mainWindowImpl::myAllIn(){
disableMyButtons();
statusBar()->clearMessage();
//set that i was the last active player. need this for unhighlighting groupbox
actualHand->setLastPlayersTurn(0);
@@ -2151,16 +2167,19 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
bool ctrlPressed = FALSE;
if (event->key() == 16777220) { if(spinBox_set->hasFocus()) pushButton_CallCheckSet->click(); } //ENTER
if (event->key() == 16777265) { switchLeftToolBox(); } //F2
if (event->key() == 16777266) { switchRightToolBox(); } //F3
if (event->key() == Qt::Key_F1) { pushButton_FoldAllin->click(); }
if (event->key() == Qt::Key_F2) { pushButton_CallCheckSet->click(); }
if (event->key() == Qt::Key_F3) { pushButton_BetRaise->click(); }
if (event->key() == Qt::Key_F10) { switchLeftToolBox(); }
if (event->key() == Qt::Key_F11) { switchRightToolBox(); }
if (event->key() == Qt::Key_F) { switchFullscreen(); } //f
if (event->key() == Qt::Key_S) { showMyCards(); } //f
// if (event->key() == Qt::Key_S) { showMyCards(); } //f
if (event->key() == 16777249) {
pushButton_break->click();
ctrlPressed = TRUE;
// QTimer::SingleShot
} //CTRL
if (event->key() == 65) { pixmapLabel_card0a->setUpdatesEnabled(FALSE); }
// if (event->key() == 65) { pixmapLabel_card0a->setUpdatesEnabled(FALSE); }
// if (event->key() == 66) { label_logo->hide(); }
}
+51 -44
View File
@@ -32,34 +32,6 @@
<property name="spacing" >
<number>6</number>
</property>
<item row="6" column="0" >
<widget class="QCheckBox" name="checkBox_showFlipCardsAnimation" >
<property name="text" >
<string>Show Flip-Card Animation</string>
</property>
</widget>
</item>
<item row="5" 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="1" column="0" >
<widget class="Line" name="line_6" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="checkBox_showRightToolbox" >
<property name="text" >
<string>Show right Toolbox (F3 to switch on/off)</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_19" >
<property name="font" >
@@ -73,14 +45,27 @@
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="checkBox_showIntro" >
<item row="9" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="0" >
<widget class="QCheckBox" name="checkBox_showFlipCardsAnimation" >
<property name="text" >
<string>Show Intro on Startup</string>
<string>Show Flip-Card Animation</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<item row="8" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Flipside of Cards</string>
@@ -174,25 +159,47 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="checkBox_showLeftToolbox" >
<item row="6" column="0" >
<widget class="QCheckBox" name="checkBox_showFadeOutCardsAnimation" >
<property name="text" >
<string>Show left Toolbox (F2 to switch on/off)</string>
<string>Show Fade-Out Animation for Non-Winning Cards</string>
</property>
</widget>
</item>
<item row="8" column="0" >
<spacer>
<item row="2" column="0" >
<widget class="QCheckBox" name="checkBox_showIntro" >
<property name="text" >
<string>Show Intro on Startup</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="Line" name="line_6" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="checkBox_showRightToolbox" >
<property name="text" >
<string>Show right Toolbox (F11 to switch on/off)</string>
</property>
</spacer>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="checkBox_showLeftToolbox" >
<property name="text" >
<string>Show left Toolbox (F10 to switch on/off)</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="checkBox_showStatusbarMessages" >
<property name="text" >
<string>Show Statusbar Messages</string>
</property>
</widget>
</item>
</layout>
</widget>
@@ -78,6 +78,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent)
//Interface
checkBox_showLeftToolbox->setChecked(myConfig.readConfigInt("ShowLeftToolBox"));
checkBox_showRightToolbox->setChecked(myConfig.readConfigInt("ShowRightToolBox"));
checkBox_showStatusbarMessages->setChecked(myConfig.readConfigInt("ShowStatusbarMessages"));
checkBox_showIntro->setChecked(myConfig.readConfigInt("ShowIntro"));
checkBox_showFadeOutCardsAnimation->setChecked(myConfig.readConfigInt("ShowFadeOutCardsAnimation"));
checkBox_showFlipCardsAnimation->setChecked(myConfig.readConfigInt("ShowFlipCardsAnimation"));
@@ -221,6 +222,7 @@ void settingsDialogImpl::isAccepted() {
// Interface
myConfig.writeConfigInt("ShowLeftToolBox", checkBox_showLeftToolbox->isChecked());
myConfig.writeConfigInt("ShowRightToolBox", checkBox_showRightToolbox->isChecked());
myConfig.writeConfigInt("ShowStatusbarMessages", checkBox_showStatusbarMessages->isChecked());
myConfig.writeConfigInt("ShowIntro", checkBox_showIntro->isChecked());
myConfig.writeConfigInt("ShowFadeOutCardsAnimation", checkBox_showFadeOutCardsAnimation->isChecked());
myConfig.writeConfigInt("ShowFlipCardsAnimation", checkBox_showFlipCardsAnimation->isChecked());