qt5 refactoring ...

This commit is contained in:
doitux
2013-08-28 10:49:03 +02:00
parent 1d0b9fc5f2
commit 20840a2af0
90 changed files with 1910 additions and 3067 deletions
+2 -2
View File
@@ -35,7 +35,7 @@
#ifdef ANDROID
#ifndef ANDROID_TEST
#include <QPlatformNativeInterface>
#include "QtGui/5.1.0/QtGui/qpa/qplatformnativeinterface.h"
#include <jni.h>
#endif
#endif
@@ -72,7 +72,7 @@ aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
#ifdef ANDROID
int api = -2;
#ifndef ANDROID_TEST
JavaVM *currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForWidget("JavaVM", 0);
JavaVM *currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForIntegration("JavaVM");
JNIEnv* env;
if (currVM->AttachCurrentThread(&env, NULL)<0) {
qCritical()<<"AttachCurrentThread failed";
@@ -35,7 +35,7 @@
changeCompleteBlindsDialogImpl::changeCompleteBlindsDialogImpl(QWidget *parent, ConfigFile *c)
: QDialog(parent), myConfig(c), settingsCorrect(TRUE)
: QDialog(parent), myConfig(c), settingsCorrect(true)
{
#ifdef __APPLE__
setWindowModality(Qt::ApplicationModal);
@@ -50,11 +50,9 @@ changeCompleteBlindsDialogImpl::changeCompleteBlindsDialogImpl(QWidget *parent,
}
void changeCompleteBlindsDialogImpl::exec()
int changeCompleteBlindsDialogImpl::exec()
{
QDialog::exec();
return QDialog::exec();
}
void changeCompleteBlindsDialogImpl::updateSpinBoxInputMinimum(int value)
@@ -88,7 +86,7 @@ void changeCompleteBlindsDialogImpl::sortBlindsList()
int i;
QList<int> tempIntList;
QStringList tempStringList;
bool ok = TRUE;
bool ok = true;
for(i=0; i<listWidget_blinds->count(); i++) {
// std::cout << listWidget_blinds->item(i)->text().toInt(&ok,10) << "\n";
@@ -48,7 +48,7 @@ class changeCompleteBlindsDialogImpl: public QDialog, public Ui::changeCompleteB
public:
changeCompleteBlindsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
void exec();
int exec();
bool eventFilter(QObject *obj, QEvent *event);
public slots:
+1
View File
@@ -33,6 +33,7 @@
#include <string>
#include <QtCore>
#include <QtWidgets>
#include <QtGui>
#include <boost/shared_ptr.hpp>
@@ -41,12 +41,12 @@ connectToServerDialogImpl::connectToServerDialogImpl(QWidget *parent)
setupUi(this);
}
void connectToServerDialogImpl::exec()
int connectToServerDialogImpl::exec()
{
label_actionMessage->setText("");
progressBar->setValue(0);
QDialog::exec();
return QDialog::exec();
}
void connectToServerDialogImpl::refresh(int actionID)
@@ -47,7 +47,7 @@ class connectToServerDialogImpl: public QDialog, public Ui::connectToServerDialo
public:
connectToServerDialogImpl(QWidget *parent = 0);
void exec();
int exec();
public slots:
@@ -143,7 +143,7 @@ void createInternetGameDialogImpl::callChangeBlindsDialog(bool show)
myChangeCompleteBlindsDialog->exec();
if(myChangeCompleteBlindsDialog->result() == QDialog::Accepted ) {}
else {
radioButton_useSavedBlindsSettings->setChecked(TRUE);
radioButton_useSavedBlindsSettings->setChecked(true);
}
}
@@ -155,9 +155,9 @@ void createInternetGameDialogImpl::gameTypeChanged()
switch (comboBox_gameType->currentIndex()) {
case GAME_TYPE_NORMAL-1: {
checkBox_Password->setDisabled(FALSE);
spinBox_startCash->setDisabled(FALSE);
spinBox_quantityPlayers->setDisabled(FALSE);
checkBox_Password->setDisabled(false);
spinBox_startCash->setDisabled(false);
spinBox_quantityPlayers->setDisabled(false);
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
radioButton_useSavedBlindsSettings->show();
@@ -168,9 +168,9 @@ void createInternetGameDialogImpl::gameTypeChanged()
break;
case GAME_TYPE_REGISTERED_ONLY-1: {
checkBox_Password->setDisabled(FALSE);
spinBox_startCash->setDisabled(FALSE);
spinBox_quantityPlayers->setDisabled(FALSE);
checkBox_Password->setDisabled(false);
spinBox_startCash->setDisabled(false);
spinBox_quantityPlayers->setDisabled(false);
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
radioButton_useSavedBlindsSettings->show();
@@ -180,10 +180,10 @@ void createInternetGameDialogImpl::gameTypeChanged()
}
break;
case GAME_TYPE_INVITE_ONLY-1: {
checkBox_Password->setChecked(FALSE);
checkBox_Password->setDisabled(TRUE);
spinBox_startCash->setDisabled(FALSE);
spinBox_quantityPlayers->setDisabled(FALSE);
checkBox_Password->setChecked(false);
checkBox_Password->setDisabled(true);
spinBox_startCash->setDisabled(false);
spinBox_quantityPlayers->setDisabled(false);
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
radioButton_useSavedBlindsSettings->show();
@@ -194,13 +194,13 @@ void createInternetGameDialogImpl::gameTypeChanged()
}
break;
case GAME_TYPE_RANKING-1: {
checkBox_Password->setChecked(FALSE);
checkBox_Password->setDisabled(TRUE);
checkBox_Password->setChecked(false);
checkBox_Password->setDisabled(true);
spinBox_startCash->setValue(RANKING_GAME_START_CASH);
spinBox_startCash->setDisabled(TRUE);
spinBox_startCash->setDisabled(true);
spinBox_quantityPlayers->setValue(RANKING_GAME_NUMBER_OF_PLAYERS);
spinBox_quantityPlayers->setDisabled(TRUE);
spinBox_quantityPlayers->setDisabled(true);
radioButton_useSavedBlindsSettings->hide();
radioButton_changeBlindsSettings->hide();
startBlind->show();
@@ -213,11 +213,11 @@ void createInternetGameDialogImpl::gameTypeChanged()
if(comboBox_gameType->currentIndex() == GAME_TYPE_RANKING-1) {
//set static values
myChangeCompleteBlindsDialog->spinBox_firstSmallBlind->setValue(RANKING_GAME_START_SBLIND);
myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtHands->setChecked(TRUE);
myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtMinutes->setChecked(FALSE);
myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtHands->setChecked(true);
myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtMinutes->setChecked(false);
myChangeCompleteBlindsDialog->spinBox_raiseSmallBlindEveryHands->setValue(11);
myChangeCompleteBlindsDialog->radioButton_alwaysDoubleBlinds->setChecked(TRUE);
myChangeCompleteBlindsDialog->radioButton_manualBlindsOrder->setChecked(FALSE);
myChangeCompleteBlindsDialog->radioButton_alwaysDoubleBlinds->setChecked(true);
myChangeCompleteBlindsDialog->radioButton_manualBlindsOrder->setChecked(false);
myChangeCompleteBlindsDialog->listWidget_blinds->clear();
} else {
//read config values
@@ -56,10 +56,10 @@ createNetworkGameDialogImpl::createNetworkGameDialogImpl(QWidget *parent, Config
}
void createNetworkGameDialogImpl::exec()
int createNetworkGameDialogImpl::exec()
{
fillFormular();
QDialog::exec();
return QDialog::exec();
}
void createNetworkGameDialogImpl::createGame()
@@ -131,7 +131,7 @@ void createNetworkGameDialogImpl::callChangeBlindsDialog(bool show)
myChangeCompleteBlindsDialog->exec();
if(myChangeCompleteBlindsDialog->result() == QDialog::Accepted ) {}
else {
radioButton_useSavedBlindsSettings->setChecked(TRUE);
radioButton_useSavedBlindsSettings->setChecked(true);
}
}
@@ -51,7 +51,7 @@ class createNetworkGameDialogImpl: public QDialog, public Ui::createNetworkGameD
public:
createNetworkGameDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
void exec();
int exec();
changeCompleteBlindsDialogImpl* getChangeCompleteBlindsDialog() {
return myChangeCompleteBlindsDialog;
}
+409 -313
View File
@@ -20,15 +20,24 @@
<string>Internet Game Lobby</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<property name="horizontalSpacing">
<number>7</number>
</property>
<property name="verticalSpacing">
<number>4</number>
</property>
<property name="margin">
<number>5</number>
</property>
<item row="0" column="0">
<widget class="QLineEdit" name="lineEdit_searchForPlayers">
<property name="sizePolicy">
@@ -88,6 +97,281 @@
</item>
</widget>
</item>
<item row="5" column="0" colspan="3">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_connectedPlayersCounter">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_runningGamesCounter">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_openGamesCounter">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_rankings">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_pokerthDotNet">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="QTreeView" name="treeView_GameList">
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="indentation">
<number>5</number>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="pushButton_joinAnyGame">
<property name="text">
<string>Join &amp;any game</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/transform-rotate.png</normaloff>:/gfx/transform-rotate.png</iconset>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>181</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_CreateGame">
<property name="text">
<string>&amp;Create Game</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/list_add.png</normaloff>:/gfx/list_add.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_JoinGame">
<property name="text">
<string>&amp;Join Game</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/go-next-view.png</normaloff>:/gfx/go-next-view.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="1" rowspan="2">
<widget class="QGroupBox" name="groupBox_lobbyChat">
<property name="minimumSize">
<size>
<width>400</width>
<height>223</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>230</height>
</size>
</property>
<property name="title">
<string>Lobby-Chat</string>
</property>
<layout class="QGridLayout">
<property name="leftMargin">
<number>7</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>7</number>
</property>
<property name="bottomMargin">
<number>7</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser_ChatDisplay">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="lineEdit_ChatInput"/>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QComboBox" name="comboBox_nickListFilter">
<item>
<property name="text">
<string>Sort alphabetically</string>
</property>
</item>
<item>
<property name="text">
<string>Sort by country</string>
</property>
</item>
<item>
<property name="text">
<string>Display idle players</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0" rowspan="3">
<widget class="QTreeView" name="treeView_NickList">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>165</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>165</width>
<height>16777215</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2" rowspan="5">
<widget class="QGroupBox" name="groupBox_GameInfo">
<property name="enabled">
@@ -114,53 +398,122 @@
<property name="title">
<string>Game Info</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>3</number>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<property name="leftMargin">
<number>7</number>
<number>6</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>7</number>
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item>
<widget class="QTreeWidget" name="treeWidget_connectedPlayers">
<property name="minimumSize">
<size>
<width>221</width>
<height>237</height>
</size>
<property name="horizontalSpacing">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>1</number>
</property>
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget_playerSpectators">
<property name="currentIndex">
<number>0</number>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="midLineWidth">
<number>1</number>
</property>
<property name="iconSize">
<size>
<width>25</width>
<height>26</height>
</size>
</property>
<property name="indentation">
<number>15</number>
</property>
<column>
<property name="text">
<string>Connected Players</string>
</property>
</column>
<widget class="QWidget" name="tab_players">
<attribute name="title">
<string>Players</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QTreeWidget" name="treeWidget_connectedPlayers">
<property name="minimumSize">
<size>
<width>221</width>
<height>100</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="midLineWidth">
<number>1</number>
</property>
<property name="iconSize">
<size>
<width>25</width>
<height>26</height>
</size>
</property>
<property name="indentation">
<number>15</number>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>Connected Players</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_spectators">
<attribute name="title">
<string>Spectators</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QTreeWidget" name="treeWidget_connectedSpectators">
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<item row="1" column="0">
<widget class="QScrollArea" name="scrollArea_gameInfos">
<property name="minimumSize">
<size>
@@ -176,20 +529,29 @@
<rect>
<x>0</x>
<y>0</y>
<width>246</width>
<height>168</height>
<width>250</width>
<height>200</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout1">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<property name="horizontalSpacing">
<number>-1</number>
<number>6</number>
</property>
<property name="verticalSpacing">
<number>2</number>
</property>
<property name="margin">
<number>4</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_gameType">
<property name="text">
@@ -405,7 +767,7 @@
</widget>
</widget>
</item>
<item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="checkBox_fillUpWithComputerOpponents">
@@ -442,7 +804,7 @@
</item>
</layout>
</item>
<item>
<item row="3" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>3</number>
@@ -532,7 +894,7 @@
</item>
</layout>
</item>
<item>
<item row="4" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>0</number>
@@ -587,272 +949,6 @@
</layout>
</widget>
</item>
<item row="1" column="1">
<widget class="QTreeView" name="treeView_GameList">
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="indentation">
<number>5</number>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="pushButton_joinAnyGame">
<property name="text">
<string>Join &amp;any game</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/transform-rotate.png</normaloff>:/gfx/transform-rotate.png</iconset>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>181</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_CreateGame">
<property name="text">
<string>&amp;Create Game</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/list_add.png</normaloff>:/gfx/list_add.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_JoinGame">
<property name="text">
<string>&amp;Join Game</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/go-next-view.png</normaloff>:/gfx/go-next-view.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="1" rowspan="2">
<widget class="QGroupBox" name="groupBox_lobbyChat">
<property name="minimumSize">
<size>
<width>400</width>
<height>223</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>230</height>
</size>
</property>
<property name="title">
<string>Lobby-Chat</string>
</property>
<layout class="QGridLayout">
<property name="leftMargin">
<number>7</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>7</number>
</property>
<property name="bottomMargin">
<number>7</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser_ChatDisplay">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="lineEdit_ChatInput"/>
</item>
</layout>
</widget>
</item>
<item row="5" column="0" colspan="3">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_connectedPlayersCounter">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_runningGamesCounter">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_openGamesCounter">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_rankings">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_pokerthDotNet">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" rowspan="3">
<widget class="QTreeView" name="treeView_NickList">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>165</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>165</width>
<height>16777215</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QComboBox" name="comboBox_nickListFilter">
<item>
<property name="text">
<string>Sort alphabetically</string>
</property>
</item>
<item>
<property name="text">
<string>Sort by country</string>
</property>
</item>
<item>
<property name="text">
<string>Display idle players</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<tabstops>
@@ -90,13 +90,13 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
label_rankings->setText(clickToRanking);
waitStartGameMsgBoxTimer = new QTimer(this);
waitStartGameMsgBoxTimer->setSingleShot(TRUE);
waitStartGameMsgBoxTimer->setSingleShot(true);
blinkingButtonAnimationTimer = new QTimer(this);
blinkingButtonAnimationTimer->setInterval(1000);
autoStartTimer = new QTimer(this);
autoStartTimer->setInterval(1000);
showInfoMsgBoxTimer = new QTimer(this);
showInfoMsgBoxTimer->setSingleShot(TRUE);
showInfoMsgBoxTimer->setSingleShot(true);
//fetch button colors for blinking
groupBox_GameInfo->setEnabled(true);
@@ -111,12 +111,12 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
//prepare overlay
autoStartTimerOverlay = new QLabel(scrollArea_gameInfos);
autoStartTimerOverlay->hide();
autoStartTimerOverlay->setWordWrap(TRUE);
autoStartTimerOverlay->setWordWrap(true);
autoStartTimerOverlay->setMaximumWidth(190);
autoStartTimerOverlay->setMinimumWidth(190);
autoStartTimerOverlay->setTextFormat(Qt::RichText);
autoStartTimerOverlay->setAlignment(Qt::AlignCenter);
autoStartTimerOverlay->setAutoFillBackground(TRUE);
autoStartTimerOverlay->setAutoFillBackground(true);
autoStartTimerOverlay->setFrameStyle(QFrame::StyledPanel);
QPalette p;
p.setColor(QPalette::Background, QColor(255, 255, 255, 210));
@@ -126,7 +126,7 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
myGameListModel = new QStandardItemModel(this);
myGameListSortFilterProxyModel = new MyGameListSortFilterProxyModel(this);
myGameListSortFilterProxyModel->setSourceModel(myGameListModel);
myGameListSortFilterProxyModel->setDynamicSortFilter(TRUE);
myGameListSortFilterProxyModel->setDynamicSortFilter(true);
treeView_GameList->setModel(myGameListSortFilterProxyModel);
myGameListSelectionModel = treeView_GameList->selectionModel();
@@ -174,12 +174,12 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
treeView_GameList->setStyleSheet("QTreeView {background-color: white; background-image: url(\""+myAppDataPath +"gfx/gui/misc/background_gamelist.png\"); background-attachment: fixed; background-position: top center ; background-repeat: no-repeat;}");
#endif
treeView_GameList->setAutoFillBackground(TRUE);
treeView_GameList->setAutoFillBackground(true);
myNickListModel = new QStandardItemModel(this);
myNickListSortFilterProxyModel = new MyNickListSortFilterProxyModel(this);
myNickListSortFilterProxyModel->setSourceModel(myNickListModel);
myNickListSortFilterProxyModel->setDynamicSortFilter(TRUE);
myNickListSortFilterProxyModel->setDynamicSortFilter(true);
myNickListSortFilterProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
treeView_NickList->setModel(myNickListSortFilterProxyModel);
@@ -256,7 +256,7 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
}
void gameLobbyDialogImpl::exec()
int gameLobbyDialogImpl::exec()
{
if(myConfig->readConfigInt("UseLobbyChat")) {
@@ -276,10 +276,11 @@ void gameLobbyDialogImpl::exec()
#ifdef ANDROID
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
#endif
QDialog::exec();
int ret = QDialog::exec();
waitStartGameMsgBoxTimer->stop();
closeAllChildDialogs();
return ret;
}
@@ -328,7 +329,7 @@ void gameLobbyDialogImpl::createGame()
gameData.raiseMode = MANUAL_BLINDS_ORDER;
std::list<int> tempBlindList;
int i;
bool ok = TRUE;
bool ok = true;
for(i=0; i<myCreateInternetGameDialog->getChangeCompleteBlindsDialog()->listWidget_blinds->count(); i++) {
tempBlindList.push_back(myCreateInternetGameDialog->getChangeCompleteBlindsDialog()->listWidget_blinds->item(i)->text().toInt(&ok,10));
}
@@ -376,15 +377,11 @@ void gameLobbyDialogImpl::createGame()
break;
}
showGameDescription(TRUE);
showGameDescription(true);
label_SmallBlind->setText(QString("%L1").arg(gameData.firstSmallBlind));
label_StartCash->setText(QString("%L1").arg(gameData.startMoney));
QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
header->setText(0, tr("Connected players - max. %1").arg(gameData.maxNumberOfPlayers));
header->setData(0, Qt::UserRole, gameData.maxNumberOfPlayers);
updateDialogBlinds(gameData);
label_GameTiming->setText(QString::number(gameData.playerActionTimeoutSec)+" "+tr("sec (action)")+"\n"+QString::number(gameData.delayBetweenHandsSec)+" "+tr("sec (hand delay)"));
@@ -422,7 +419,7 @@ void gameLobbyDialogImpl::joinAnyGame()
if(comboBox_gameListFilter->currentIndex() != 3 && comboBox_gameListFilter->currentIndex() != 0 && comboBox_gameListFilter->currentIndex() != 5) comboBox_gameListFilter->setCurrentIndex(0);
bool found = FALSE;
bool found = false;
int it = 0;
int gameToJoinId = 0;
@@ -437,7 +434,7 @@ void gameLobbyDialogImpl::joinAnyGame()
mostConnectedPlayers = players;
gameToJoinId = it;
}
found = TRUE;
found = true;
}
it++;
}
@@ -550,7 +547,7 @@ void gameLobbyDialogImpl::gameSelected(const QModelIndex &index)
break;
}
showGameDescription(TRUE);
showGameDescription(true);
label_SmallBlind->setText(QString("%L1").arg(info.data.firstSmallBlind));
label_StartCash->setText(QString("%L1").arg(info.data.startMoney));
// label_MaximumNumberOfPlayers->setText(QString::number(info.data.maxNumberOfPlayers));s
@@ -568,9 +565,6 @@ void gameLobbyDialogImpl::gameSelected(const QModelIndex &index)
++i;
}
QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
header->setText(0, tr("Connected players - Max. %1").arg(info.data.maxNumberOfPlayers));
header->setData(0, Qt::UserRole, info.data.maxNumberOfPlayers);
#ifdef __APPLE__
// Dirty workaround for a Qt redraw bug on Mac OS.
treeWidget_connectedPlayers->setFocus();
@@ -743,8 +737,8 @@ void gameLobbyDialogImpl::refreshGameStats()
++it;
}
label_openGamesCounter->setText("| "+tr("running games: %1").arg(runningGamesCounter));
label_runningGamesCounter->setText("| "+tr("open games: %1").arg(openGamesCounter));
label_openGamesCounter->setText(" | "+tr("running games: %1").arg(runningGamesCounter));
label_runningGamesCounter->setText(" | "+tr("open games: %1").arg(openGamesCounter));
//refresh joinAnyGameButton state
joinAnyGameButtonRefresh();
@@ -796,6 +790,11 @@ void gameLobbyDialogImpl::gameAddPlayer(unsigned gameId, unsigned playerId)
}
}
void gameLobbyDialogImpl::gameAddSpectator(unsigned, unsigned)
{
qDebug("jojo GameADDSpecator");
}
void gameLobbyDialogImpl::gameRemovePlayer(unsigned gameId, unsigned playerId)
{
if (!inGame) {
@@ -832,6 +831,11 @@ void gameLobbyDialogImpl::gameRemovePlayer(unsigned gameId, unsigned playerId)
}
}
void gameLobbyDialogImpl::gameRemoveSpectator(unsigned, unsigned)
{
qDebug("jojo GameRemoveSpecator");
}
void gameLobbyDialogImpl::updateStats(ServerStats /*stats*/)
{
refreshPlayerStats();
@@ -843,11 +847,7 @@ void gameLobbyDialogImpl::clearDialog()
groupBox_GameInfo->setEnabled(false);
currentGameName = "";
QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
header->setText(0, tr("Connected players"));
header->setData(0, Qt::UserRole, 0);
showGameDescription(FALSE);
showGameDescription(false);
label_typeIcon->setText(" ");
label_typeText->setText(" ");
label_SmallBlind->setText("");
@@ -911,17 +911,18 @@ void gameLobbyDialogImpl::clearDialog()
isGameAdministrator = false;
myPlayerId = 0;
showGameDescription(FALSE);
showGameDescription(false);
label_connectedPlayersCounter->setText(tr("connected players: %1").arg(0));
label_openGamesCounter->setText("| "+tr("running games: %1").arg(0));
label_runningGamesCounter->setText("| "+tr("open games: %1").arg(0));
label_openGamesCounter->setText(" | "+tr("running games: %1").arg(0));
label_runningGamesCounter->setText(" | "+tr("open games: %1").arg(0));
readDialogSettings();
}
void gameLobbyDialogImpl::checkPlayerQuantity()
{
tabWidget_playerSpectators->setTabText(0, tr("Players (%1)").arg(treeWidget_connectedPlayers->topLevelItemCount()));
assert(mySession);
GameInfo info(mySession->getClientGameInfo(mySession->getClientCurrentGameId()));
@@ -935,7 +936,7 @@ void gameLobbyDialogImpl::checkPlayerQuantity()
if (treeWidget_connectedPlayers->topLevelItemCount() >= 2) {
pushButton_StartGame->setEnabled(true);
if(treeWidget_connectedPlayers->topLevelItemCount() == treeWidget_connectedPlayers->headerItem()->data(0, Qt::UserRole).toInt()) {
if(treeWidget_connectedPlayers->topLevelItemCount() == info.data.maxNumberOfPlayers) {
blinkingButtonAnimationTimer->start();
} else {
blinkingButtonAnimationTimer->stop();
@@ -951,7 +952,7 @@ void gameLobbyDialogImpl::checkPlayerQuantity()
}
//general actions
if(treeWidget_connectedPlayers->topLevelItemCount() < treeWidget_connectedPlayers->headerItem()->data(0, Qt::UserRole).toInt()) {
if(treeWidget_connectedPlayers->topLevelItemCount() < info.data.maxNumberOfPlayers) {
autoStartTimerOverlay->hide();
autoStartTimer->stop();
}
@@ -1040,6 +1041,17 @@ void gameLobbyDialogImpl::addConnectedPlayer(unsigned playerId, QString playerNa
refreshConnectedPlayerAvatars();
}
void gameLobbyDialogImpl::addConnectedSpectator(unsigned spectatorId, QString spectatorName) {
qDebug("JOJO add spect");
QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget_connectedSpectators, 0);
item->setData(0, Qt::UserRole, spectatorId);
item->setData(0, Qt::DisplayRole, spectatorName);
tabWidget_playerSpectators->setTabText(1, tr("Spectators (%1)").arg(treeWidget_connectedSpectators->topLevelItemCount()));
// if (inGame)
// refreshConnectedSpecatatorAvatars();
}
void gameLobbyDialogImpl::updatePlayer(unsigned playerId, QString newPlayerName)
{
@@ -1095,7 +1107,7 @@ void gameLobbyDialogImpl::updatePlayer(unsigned playerId, QString newPlayerName)
void gameLobbyDialogImpl::removePlayer(unsigned playerId, QString)
{
qDebug("JOJO remove player");
QTreeWidgetItemIterator it(treeWidget_connectedPlayers);
while (*it) {
if ((*it)->data(0, Qt::UserRole) == playerId) {
@@ -1104,9 +1116,22 @@ void gameLobbyDialogImpl::removePlayer(unsigned playerId, QString)
}
++it;
}
checkPlayerQuantity();
}
void gameLobbyDialogImpl::removeSpectator(unsigned spectatorId, QString)
{
qDebug("JOJO remove spect");
QTreeWidgetItemIterator it(treeWidget_connectedSpectators);
while (*it) {
if ((*it)->data(0, Qt::UserRole) == spectatorId) {
treeWidget_connectedSpectators->takeTopLevelItem(treeWidget_connectedSpectators->indexOfTopLevelItem(*it));
break;
}
++it;
}
tabWidget_playerSpectators->setTabText(1, tr("Spectators (%1)").arg(treeWidget_connectedSpectators->topLevelItemCount()));
}
void gameLobbyDialogImpl::playerLeftLobby(unsigned playerId)
@@ -1237,15 +1262,12 @@ void gameLobbyDialogImpl::joinedGameDialogUpdate()
break;
}
showGameDescription(TRUE);
showGameDescription(true);
label_SmallBlind->setText(QString("%L1").arg(info.data.firstSmallBlind));
label_StartCash->setText(QString("%L1").arg(info.data.startMoney));
updateDialogBlinds(info.data);
label_GameTiming->setText(QString::number(info.data.playerActionTimeoutSec)+" "+tr("sec (action)")+"\n"+QString::number(info.data.delayBetweenHandsSec)+" "+tr("sec (hand delay)"));
QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
header->setText(0, tr("Connected players - Max. %1").arg(info.data.maxNumberOfPlayers));
header->setData(0, Qt::UserRole, info.data.maxNumberOfPlayers);
}
void gameLobbyDialogImpl::leftGameDialogUpdate()
@@ -1258,11 +1280,7 @@ void gameLobbyDialogImpl::leftGameDialogUpdate()
groupBox_GameInfo->setEnabled(false);
currentGameName = "";
QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
header->setText(0, tr("Connected players"));
header->setData(0, Qt::UserRole, 0);
showGameDescription(FALSE);
showGameDescription(false);
label_typeIcon->setText(" ");
label_typeText->setText(" ");
label_SmallBlind->setText("");
@@ -1436,6 +1454,7 @@ void gameLobbyDialogImpl::showGameDescription(bool show)
label_gameDesc5->show();
label_gameDesc6->show();
label_gameDesc7->show();
checkPlayerQuantity();
} else {
label_gameType->hide();
label_gameDesc2->hide();
@@ -1444,6 +1463,9 @@ void gameLobbyDialogImpl::showGameDescription(bool show)
label_gameDesc5->hide();
label_gameDesc6->hide();
label_gameDesc7->hide();
tabWidget_playerSpectators->setTabText(0, tr("Players (%1)").arg(0));
tabWidget_playerSpectators->setTabText(1, tr("Spectators (%1)").arg(0));
}
}
@@ -1480,8 +1502,8 @@ void gameLobbyDialogImpl::joinAnyGameButtonRefresh()
++it;
}
if(openNonPrivateNonFullGamesCounter) pushButton_joinAnyGame->setEnabled(TRUE);
else pushButton_joinAnyGame->setEnabled(FALSE);
if(openNonPrivateNonFullGamesCounter) pushButton_joinAnyGame->setEnabled(true);
else pushButton_joinAnyGame->setEnabled(false);
}
void gameLobbyDialogImpl::reject()
@@ -64,7 +64,7 @@ public:
~gameLobbyDialogImpl();
void exec();
int exec();
ChatTools *getMyChat() {
return myChat;
@@ -162,6 +162,10 @@ public slots:
void reportBadGameName();
void adminActionCloseGame();
void adminActionTotalKickBan();
void addConnectedSpectator(unsigned spectatorId, QString spectatorName);
void removeSpectator(unsigned spectatorId, QString);
void gameAddSpectator(unsigned, unsigned);
void gameRemoveSpectator(unsigned, unsigned);
private:
@@ -33,6 +33,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class MyGameListTreeWidget : public QTreeWidget
{
+204 -204
View File
@@ -71,7 +71,7 @@
using namespace std;
gameTableImpl::gameTableImpl(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), guestMode(FALSE), myLastPreActionBetValue(0)
: 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), guestMode(false), myLastPreActionBetValue(0)
{
int i;
@@ -123,7 +123,7 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
}
//Flipside Animation noch nicht erledigt
flipHolecardsAllInAlreadyDone = FALSE;
flipHolecardsAllInAlreadyDone = false;
#ifndef GUI_800x480
//Toolboxen verstecken?
@@ -193,38 +193,38 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
voteOnKickTimeoutTimer = new QTimer(this);
enableCallCheckPushButtonTimer = 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);
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);
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);
postRiverRunAnimation3Timer->setSingleShot(TRUE);
postRiverRunAnimation5Timer->setSingleShot(TRUE);
postRiverRunAnimation6Timer->setSingleShot(TRUE);
postRiverAnimation1Timer->setSingleShot(true);
postRiverRunAnimation1Timer->setSingleShot(true);
postRiverRunAnimation2Timer->setSingleShot(true);
postRiverRunAnimation3Timer->setSingleShot(true);
postRiverRunAnimation5Timer->setSingleShot(true);
postRiverRunAnimation6Timer->setSingleShot(true);
enableCallCheckPushButtonTimer->setSingleShot(TRUE);
enableCallCheckPushButtonTimer->setSingleShot(true);
playerStarsArray[1][0]=label_Star10;
playerStarsArray[2][0]=label_Star20;
@@ -756,7 +756,7 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog)
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent7Name->text().toUtf8().constData());
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent8Name->text().toUtf8().constData());
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent9Name->text().toUtf8().constData());
mySettingsDialog->setPlayerNickIsChanged(FALSE);
mySettingsDialog->setPlayerNickIsChanged(false);
refreshPlayerName();
}
@@ -789,15 +789,15 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog)
if(currentState >= GAME_STATE_FLOP && currentState <= GAME_STATE_POST_RIVER)
for(int i=0; i<3; i++) {
QPixmap card = QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempBoardCardsArray[i], 10)+".png"));
boardCardsArray[i]->setPixmap(card, FALSE);
boardCardsArray[i]->setPixmap(card, false);
}
if(currentState >= GAME_STATE_TURN && currentState <= GAME_STATE_POST_RIVER) {
QPixmap card = QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempBoardCardsArray[3], 10)+".png"));
boardCardsArray[3]->setPixmap(card, FALSE);
boardCardsArray[3]->setPixmap(card, false);
}
if(currentState == GAME_STATE_RIVER || currentState == GAME_STATE_POST_RIVER) {
QPixmap card = QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempBoardCardsArray[4], 10)+".png"));
boardCardsArray[4]->setPixmap(card, FALSE);
boardCardsArray[4]->setPixmap(card, false);
}
}
@@ -811,7 +811,7 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog)
for (j=1; j<MAX_NUMBER_OF_PLAYERS; j++ ) {
for ( k=0; k<=1; k++ ) {
if (holeCardsArray[j][k]->getIsFlipside()) {
holeCardsArray[j][k]->setPixmap(flipside, TRUE);
holeCardsArray[j][k]->setPixmap(flipside, true);
}
}
}
@@ -827,17 +827,17 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog)
humanPlayer->getMyCards(tempCardsIntArray);
if(myConfig->readConfigInt("AntiPeekMode")) {
holeCardsArray[0][0]->setPixmap(flipside, TRUE);
holeCardsArray[0][0]->setPixmap(flipside, true);
tempCardsPixmapArray[0] = QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempCardsIntArray[0], 10)+".png"));
holeCardsArray[0][0]->setHiddenFrontPixmap(tempCardsPixmapArray[0]);
holeCardsArray[0][1]->setPixmap(flipside, TRUE);
holeCardsArray[0][1]->setPixmap(flipside, true);
tempCardsPixmapArray[1]= QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempCardsIntArray[1], 10)+".png"));
holeCardsArray[0][1]->setHiddenFrontPixmap(tempCardsPixmapArray[1]);
} else {
tempCardsPixmapArray[0]= QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempCardsIntArray[0], 10)+".png"));
holeCardsArray[0][0]->setPixmap(tempCardsPixmapArray[0],FALSE);
holeCardsArray[0][0]->setPixmap(tempCardsPixmapArray[0],false);
tempCardsPixmapArray[1]= QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempCardsIntArray[1], 10)+".png"));
holeCardsArray[0][1]->setPixmap(tempCardsPixmapArray[1],FALSE);
holeCardsArray[0][1]->setPixmap(tempCardsPixmapArray[1],false);
}
}
}
@@ -893,8 +893,8 @@ void gameTableImpl::initGui(int speed)
label_Sets->setText(BetsString);
label_Total->setText(TotalString);
tabs.groupBox_RightToolBox->setDisabled(FALSE);
tabs.groupBox_LeftToolBox->setDisabled(FALSE);
tabs.groupBox_RightToolBox->setDisabled(false);
tabs.groupBox_LeftToolBox->setDisabled(false);
//set minimum gui speed to prevent gui lags on fast inet games
if( myStartWindow->getSession()->isNetworkClientRunning() ) {
@@ -912,8 +912,8 @@ void gameTableImpl::initGui(int speed)
label_Pot->setText(PotString);
label_Total->setText(TotalString+":");
label_Sets->setText(BetsString+":");
groupBox_RightToolBox->setDisabled(FALSE);
groupBox_LeftToolBox->setDisabled(FALSE);
groupBox_RightToolBox->setDisabled(false);
groupBox_LeftToolBox->setDisabled(false);
//set minimum gui speed to prevent gui lags on fast inet games
if( myStartWindow->getSession()->isNetworkClientRunning() ) {
@@ -1036,15 +1036,15 @@ void gameTableImpl::refreshPlayerName()
switch(getCurrentSeatState((*it_c))) {
case SEAT_ACTIVE: {
playerNameLabelArray[(*it_c)->getMyID()]->setText(nick, FALSE, guest, computerPlayer );
playerNameLabelArray[(*it_c)->getMyID()]->setText(nick, false, guest, computerPlayer );
}
break;
case SEAT_AUTOFOLD: {
playerNameLabelArray[(*it_c)->getMyID()]->setText(nick, TRUE, guest, computerPlayer );
playerNameLabelArray[(*it_c)->getMyID()]->setText(nick, true, guest, computerPlayer );
}
break;
case SEAT_STAYONTABLE: {
playerNameLabelArray[(*it_c)->getMyID()]->setText(nick, TRUE, guest, computerPlayer );
playerNameLabelArray[(*it_c)->getMyID()]->setText(nick, true, guest, computerPlayer );
}
break;
case SEAT_CLEAR: {
@@ -1097,12 +1097,12 @@ void gameTableImpl::refreshPlayerAvatar()
break;
case SEAT_AUTOFOLD: {
// qDebug() << seatPlace << "AVATAR AUTOFOLD";
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmapAndCountry(avatarPic, countryString, seatPlace, TRUE);
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmapAndCountry(avatarPic, countryString, seatPlace, true);
}
break;
case SEAT_STAYONTABLE: {
// qDebug() << seatPlace << "AVATAR STAYONTABLE";
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmapAndCountry(avatarPic, countryString, seatPlace, TRUE);
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmapAndCountry(avatarPic, countryString, seatPlace, true);
}
break;
case SEAT_CLEAR: {
@@ -1165,8 +1165,8 @@ void gameTableImpl::refreshAction(int playerID, int playerAction)
if ((*it_c)->getMyAction()==1) {
if((*it_c)->getMyID() != 0) {
holeCardsArray[(*it_c)->getMyID()][0]->setPixmap(onePix, FALSE);
holeCardsArray[(*it_c)->getMyID()][1]->setPixmap(onePix, FALSE);
holeCardsArray[(*it_c)->getMyID()][0]->setPixmap(onePix, false);
holeCardsArray[(*it_c)->getMyID()][1]->setPixmap(onePix, false);
}
}
}
@@ -1190,8 +1190,8 @@ void gameTableImpl::refreshAction(int playerID, int playerAction)
holeCardsArray[0][0]->startFadeOut(10);
holeCardsArray[0][1]->startFadeOut(10);
} else {
holeCardsArray[playerID][0]->setPixmap(onePix, FALSE);
holeCardsArray[playerID][1]->setPixmap(onePix, FALSE);
holeCardsArray[playerID][0]->setPixmap(onePix, false);
holeCardsArray[playerID][1]->setPixmap(onePix, false);
}
}
}
@@ -1270,8 +1270,8 @@ void gameTableImpl::refreshGroupbox(int playerID, int status)
userWidgetsArray[j]->hide();
}
//disable anti-peek front after player is out
holeCardsArray[0][0]->signalFastFlipCards(FALSE);
holeCardsArray[0][1]->signalFastFlipCards(FALSE);
holeCardsArray[0][0]->signalFastFlipCards(false);
holeCardsArray[0][1]->signalFastFlipCards(false);
}
myGameTableStyle->setPlayerSeatInactiveStyle(groupBoxArray[(*it_c)->getMyID()]);
}
@@ -1288,8 +1288,8 @@ void gameTableImpl::refreshGroupbox(int playerID, int status)
userWidgetsArray[j]->hide();
}
//disable anti-peek front after player is out
holeCardsArray[0][0]->signalFastFlipCards(FALSE);
holeCardsArray[0][1]->signalFastFlipCards(FALSE);
holeCardsArray[0][0]->signalFastFlipCards(false);
holeCardsArray[0][1]->signalFastFlipCards(false);
}
myGameTableStyle->setPlayerSeatInactiveStyle(groupBoxArray[playerID]);
}
@@ -1412,7 +1412,7 @@ void gameTableImpl::dealHoleCards()
int i,k;
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++ ) {
for ( k=0; k<=1; k++ ) {
holeCardsArray[i][k]->setFadeOutAction(FALSE);
holeCardsArray[i][k]->setFadeOutAction(false);
holeCardsArray[i][k]->stopFlipCardsAnimation();
}
}
@@ -1436,26 +1436,26 @@ void gameTableImpl::dealHoleCards()
if (( (*it_c)->getMyID() == 0)/* || DEBUG_MODE*/) {
tempCardsPixmapArray[j].load(myCardDeckStyle->getCurrentDir()+QString::number(tempCardsIntArray[j], 10)+".png");
if(myConfig->readConfigInt("AntiPeekMode")) {
holeCardsArray[(*it_c)->getMyID()][j]->setPixmap(flipside, TRUE);
holeCardsArray[(*it_c)->getMyID()][j]->setPixmap(flipside, true);
holeCardsArray[(*it_c)->getMyID()][j]->setFront(flipside);
holeCardsArray[(*it_c)->getMyID()][j]->setHiddenFrontPixmap(tempCardsPixmapArray[j]);
} else {
holeCardsArray[(*it_c)->getMyID()][j]->setPixmap(tempCardsPixmapArray[j],FALSE);
holeCardsArray[(*it_c)->getMyID()][j]->setPixmap(tempCardsPixmapArray[j],false);
holeCardsArray[(*it_c)->getMyID()][j]->setFront(tempCardsPixmapArray[j]);
}
} else {
holeCardsArray[(*it_c)->getMyID()][j]->setPixmap(flipside, TRUE);
holeCardsArray[(*it_c)->getMyID()][j]->setPixmap(flipside, true);
holeCardsArray[(*it_c)->getMyID()][j]->setFlipsidePix(flipside);
}
} else {
holeCardsArray[(*it_c)->getMyID()][j]->setPixmap(onePix, FALSE);
holeCardsArray[(*it_c)->getMyID()][j]->setPixmap(onePix, false);
}
}
}
//fix press mouse button during bankrupt with anti-peek-mode
this->mouseOverFlipCards(FALSE);
this->mouseOverFlipCards(false);
//refresh CardsChanceMonitor Tool
refreshCardsChance(GAME_STATE_PREFLOP);
@@ -1465,12 +1465,12 @@ void gameTableImpl::dealBeRoCards(int myBeRoID)
{
uncheckMyButtons();
myButtonsCheckable(FALSE);
myButtonsCheckable(false);
resetMyButtonsCheckStateMemory();
clearMyButtons();
horizontalSlider_bet->setDisabled(TRUE);
spinBox_betValue->setDisabled(TRUE);
horizontalSlider_bet->setDisabled(true);
spinBox_betValue->setDisabled(true);
switch(myBeRoID) {
@@ -1501,21 +1501,21 @@ void gameTableImpl::dealFlopCards0()
void gameTableImpl::dealFlopCards1()
{
boardCardsArray[0]->setPixmap(flipside, TRUE);
boardCardsArray[0]->setPixmap(flipside, true);
dealFlopCards1Timer->start(dealCardsSpeed);
}
void gameTableImpl::dealFlopCards2()
{
boardCardsArray[1]->setPixmap(flipside, TRUE);
boardCardsArray[1]->setPixmap(flipside, true);
dealFlopCards2Timer->start(dealCardsSpeed);
}
void gameTableImpl::dealFlopCards3()
{
boardCardsArray[2]->setPixmap(flipside, TRUE);
boardCardsArray[2]->setPixmap(flipside, true);
dealFlopCards3Timer->start(dealCardsSpeed);
}
@@ -1534,7 +1534,7 @@ void gameTableImpl::dealFlopCards4()
} else {
//without Eye-Candy
boardCardsArray[0]->setFront(card);
boardCardsArray[0]->setPixmap(card, FALSE);
boardCardsArray[0]->setPixmap(card, false);
}
dealFlopCards4Timer->start(dealCardsSpeed);
}
@@ -1553,7 +1553,7 @@ void gameTableImpl::dealFlopCards5()
} else {
//without Eye-Candy
boardCardsArray[1]->setFront(card);
boardCardsArray[1]->setPixmap(card, FALSE);
boardCardsArray[1]->setPixmap(card, false);
}
dealFlopCards5Timer->start(dealCardsSpeed);
}
@@ -1572,7 +1572,7 @@ void gameTableImpl::dealFlopCards6()
} else {
//without Eye-Candy
boardCardsArray[2]->setFront(card);
boardCardsArray[2]->setPixmap(card, FALSE);
boardCardsArray[2]->setPixmap(card, false);
}
// stable
@@ -1598,7 +1598,7 @@ void gameTableImpl::dealTurnCards0()
void gameTableImpl::dealTurnCards1()
{
boardCardsArray[3]->setPixmap(flipside, TRUE);
boardCardsArray[3]->setPixmap(flipside, true);
dealTurnCards1Timer->start(dealCardsSpeed);
}
@@ -1616,7 +1616,7 @@ void gameTableImpl::dealTurnCards2()
} else {
//without Eye-Candy
boardCardsArray[3]->setFront(card);
boardCardsArray[3]->setPixmap(card, FALSE);
boardCardsArray[3]->setPixmap(card, false);
}
// stable
@@ -1641,7 +1641,7 @@ void gameTableImpl::dealRiverCards0()
void gameTableImpl::dealRiverCards1()
{
boardCardsArray[4]->setPixmap(flipside, TRUE);
boardCardsArray[4]->setPixmap(flipside, true);
// QTimer::singleShot(dealCardsSpeed, this, SLOT( dealRiverCards2() ));
dealRiverCards1Timer->start(dealCardsSpeed);
@@ -1661,7 +1661,7 @@ void gameTableImpl::dealRiverCards2()
} else {
//without Eye-Candy
boardCardsArray[4]->setFront(card);
boardCardsArray[4]->setPixmap(card, FALSE);
boardCardsArray[4]->setPixmap(card, false);
}
// stable
@@ -1700,15 +1700,15 @@ void gameTableImpl::provideMyActions(int mode)
pushButton_Fold->setText("");
pushButton_AllIn->setText("");
horizontalSlider_bet->setDisabled(TRUE);
spinBox_betValue->setDisabled(TRUE);
horizontalSlider_bet->setDisabled(true);
spinBox_betValue->setDisabled(true);
myButtonsCheckable(FALSE);
myButtonsCheckable(false);
refreshActionButtonFKeyIndicator(1);
} else {
horizontalSlider_bet->setEnabled(TRUE);
spinBox_betValue->setEnabled(TRUE);
horizontalSlider_bet->setEnabled(true);
spinBox_betValue->setEnabled(true);
//show available actions on buttons
if(currentHand->getCurrentRound() == 0) { // preflop
@@ -1766,10 +1766,10 @@ void gameTableImpl::provideMyActions(int mode)
pushButtonCallCheckString = "";
pushButtonFoldString = "";
pushButtonAllInString = "";
horizontalSlider_bet->setDisabled(TRUE);
spinBox_betValue->setDisabled(TRUE);
horizontalSlider_bet->setDisabled(true);
spinBox_betValue->setDisabled(true);
myButtonsCheckable(FALSE);
myButtonsCheckable(false);
}
}
@@ -1792,8 +1792,8 @@ void gameTableImpl::provideMyActions(int mode)
if(pushButtonBetRaiseString == "") {
horizontalSlider_bet->setDisabled(TRUE);
spinBox_betValue->setDisabled(TRUE);
horizontalSlider_bet->setDisabled(true);
spinBox_betValue->setDisabled(true);
}
pushButton_Fold->setText(pushButtonFoldString);
@@ -1859,10 +1859,10 @@ void gameTableImpl::provideMyActions(int mode)
void gameTableImpl::meInAction()
{
myButtonsCheckable(FALSE);
myButtonsCheckable(false);
horizontalSlider_bet->setEnabled(TRUE);
spinBox_betValue->setEnabled(TRUE);
horizontalSlider_bet->setEnabled(true);
spinBox_betValue->setEnabled(true);
#ifdef GUI_800x480
if((myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_INTERNET || myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_NETWORK) && tabs.lineEdit_ChatInput->text() == "" && myConfig->readConfigInt("EnableBetInputFocusSwitch")) {
@@ -1911,11 +1911,11 @@ void gameTableImpl::meInAction()
//do remembered action
if( pushButtonBetRaiseIsChecked ) {
pushButton_BetRaise->click();
pushButtonBetRaiseIsChecked = FALSE;
pushButtonBetRaiseIsChecked = false;
}
if( pushButtonCallCheckIsChecked ) {
pushButton_CallCheck->click();
pushButtonCallCheckIsChecked = FALSE;
pushButtonCallCheckIsChecked = false;
}
if( pushButtonFoldIsChecked ) {
if(lastPushButtonFoldString == CheckString+" /\n"+FoldString && pushButton_CallCheck->text() == CheckString) {
@@ -1923,11 +1923,11 @@ void gameTableImpl::meInAction()
} else {
pushButton_Fold->click();
}
pushButtonFoldIsChecked = FALSE;
pushButtonFoldIsChecked = false;
}
if( pushButtonAllInIsChecked ) {
pushButton_AllIn->click();
pushButtonAllInIsChecked = FALSE;
pushButtonAllInIsChecked = false;
}
//automatic mode
@@ -1953,9 +1953,9 @@ void gameTableImpl::startTimeoutAnimation(int playerId, int timeoutSec)
//beep for player 0
if(playerId) {
timeoutLabelArray[playerId]->startTimeOutAnimation(timeoutSec, FALSE);
timeoutLabelArray[playerId]->startTimeOutAnimation(timeoutSec, false);
} else {
timeoutLabelArray[playerId]->startTimeOutAnimation(timeoutSec, TRUE);
timeoutLabelArray[playerId]->startTimeOutAnimation(timeoutSec, true);
}
}
@@ -1973,8 +1973,8 @@ void gameTableImpl::disableMyButtons()
clearMyButtons();
//clear userWidgets
horizontalSlider_bet->setDisabled(TRUE);
spinBox_betValue->setDisabled(TRUE);
horizontalSlider_bet->setDisabled(true);
spinBox_betValue->setDisabled(true);
horizontalSlider_bet->setMinimum(0);
horizontalSlider_bet->setMaximum(humanPlayer->getMyCash());
spinBox_betValue->setMinimum(0);
@@ -2219,15 +2219,15 @@ void gameTableImpl::pushButtonBetRaiseClicked(bool checked)
if (pushButton_BetRaise->isCheckable()) {
if(checked) {
pushButton_CallCheck->setChecked(FALSE);
pushButton_Fold->setChecked(FALSE);
pushButton_AllIn->setChecked(FALSE);
pushButton_CallCheck->setChecked(false);
pushButton_Fold->setChecked(false);
pushButton_AllIn->setChecked(false);
pushButtonCallCheckIsChecked = FALSE;
pushButtonFoldIsChecked = FALSE;
pushButtonAllInIsChecked = FALSE;
pushButtonCallCheckIsChecked = false;
pushButtonFoldIsChecked = false;
pushButtonAllInIsChecked = false;
pushButtonBetRaiseIsChecked = TRUE;
pushButtonBetRaiseIsChecked = true;
#ifdef GUI_800x480
if(!tabs.radioButton_manualAction->isChecked())
@@ -2239,7 +2239,7 @@ void gameTableImpl::pushButtonBetRaiseClicked(bool checked)
// myLastPreActionBetValue = spinBox_betValue->value();
} else {
pushButtonBetRaiseIsChecked = FALSE;
pushButtonBetRaiseIsChecked = false;
myLastPreActionBetValue = 0;
}
} else {
@@ -2252,15 +2252,15 @@ void gameTableImpl::pushButtonCallCheckClicked(bool checked)
if (pushButton_CallCheck->isCheckable()) {
if(checked) {
pushButton_Fold->setChecked(FALSE);
pushButton_BetRaise->setChecked(FALSE);
pushButton_AllIn->setChecked(FALSE);
pushButton_Fold->setChecked(false);
pushButton_BetRaise->setChecked(false);
pushButton_AllIn->setChecked(false);
pushButtonAllInIsChecked = FALSE;
pushButtonFoldIsChecked = FALSE;
pushButtonBetRaiseIsChecked = FALSE;
pushButtonAllInIsChecked = false;
pushButtonFoldIsChecked = false;
pushButtonBetRaiseIsChecked = false;
pushButtonCallCheckIsChecked = TRUE;
pushButtonCallCheckIsChecked = true;
#ifdef GUI_800x480
if(!tabs.radioButton_manualAction->isChecked())
@@ -2270,7 +2270,7 @@ void gameTableImpl::pushButtonCallCheckClicked(bool checked)
radioButton_manualAction->click();
#endif
} else {
pushButtonCallCheckIsChecked = FALSE;
pushButtonCallCheckIsChecked = false;
}
} else {
myCallCheck();
@@ -2282,15 +2282,15 @@ void gameTableImpl::pushButtonFoldClicked(bool checked)
if (pushButton_Fold->isCheckable()) {
if(checked) {
pushButton_CallCheck->setChecked(FALSE);
pushButton_BetRaise->setChecked(FALSE);
pushButton_AllIn->setChecked(FALSE);
pushButton_CallCheck->setChecked(false);
pushButton_BetRaise->setChecked(false);
pushButton_AllIn->setChecked(false);
pushButtonAllInIsChecked = FALSE;
pushButtonCallCheckIsChecked = FALSE;
pushButtonBetRaiseIsChecked = FALSE;
pushButtonAllInIsChecked = false;
pushButtonCallCheckIsChecked = false;
pushButtonBetRaiseIsChecked = false;
pushButtonFoldIsChecked = TRUE;
pushButtonFoldIsChecked = true;
#ifdef GUI_800x480
if(!tabs.radioButton_manualAction->isChecked())
@@ -2300,7 +2300,7 @@ void gameTableImpl::pushButtonFoldClicked(bool checked)
radioButton_manualAction->click();
#endif
} else {
pushButtonFoldIsChecked = FALSE;
pushButtonFoldIsChecked = false;
}
} else {
myFold();
@@ -2312,15 +2312,15 @@ void gameTableImpl::pushButtonAllInClicked(bool checked)
if (pushButton_AllIn->isCheckable()) {
if(checked) {
pushButton_CallCheck->setChecked(FALSE);
pushButton_BetRaise->setChecked(FALSE);
pushButton_Fold->setChecked(FALSE);
pushButton_CallCheck->setChecked(false);
pushButton_BetRaise->setChecked(false);
pushButton_Fold->setChecked(false);
pushButtonFoldIsChecked = FALSE;
pushButtonCallCheckIsChecked = FALSE;
pushButtonBetRaiseIsChecked = FALSE;
pushButtonFoldIsChecked = false;
pushButtonCallCheckIsChecked = false;
pushButtonBetRaiseIsChecked = false;
pushButtonAllInIsChecked = TRUE;
pushButtonAllInIsChecked = true;
#ifdef GUI_800x480
if(!tabs.radioButton_manualAction->isChecked())
@@ -2330,7 +2330,7 @@ void gameTableImpl::pushButtonAllInClicked(bool checked)
radioButton_manualAction->click();
#endif
} else {
pushButtonAllInIsChecked = FALSE;
pushButtonAllInIsChecked = false;
}
} else {
myAllIn();
@@ -2499,12 +2499,12 @@ void gameTableImpl::postRiverRunAnimation2()
{
uncheckMyButtons();
myButtonsCheckable(FALSE);
myButtonsCheckable(false);
clearMyButtons();
resetMyButtonsCheckStateMemory();
horizontalSlider_bet->setDisabled(TRUE);
spinBox_betValue->setDisabled(TRUE);
horizontalSlider_bet->setDisabled(true);
spinBox_betValue->setDisabled(true);
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
@@ -2535,7 +2535,7 @@ void gameTableImpl::postRiverRunAnimation2()
}
}
//Wenn einmal umgedreht dann fertig!!
flipHolecardsAllInAlreadyDone = TRUE;
flipHolecardsAllInAlreadyDone = true;
} else {
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
@@ -2589,70 +2589,70 @@ void gameTableImpl::postRiverRunAnimation3()
int bestHandPos[5];
(*it_c)->getMyBestHandPosition(bestHandPos);
bool index0 = TRUE;
bool index0 = true;
for(j=0; j<5; j++) {
if (bestHandPos[j] == 0 ) {
index0 = FALSE;
index0 = false;
}
}
if (index0) {
holeCardsArray[(*it_c)->getMyID()][0]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index0" << endl;*/
}
//index 1 testen
bool index1 = TRUE;
bool index1 = true;
for(j=0; j<5; j++) {
if (bestHandPos[j] == 1 ) {
index1 = FALSE;
index1 = false;
}
}
if (index1) {
holeCardsArray[(*it_c)->getMyID()][1]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index1" << endl;*/
}
//index 2 testen
bool index2 = TRUE;
bool index2 = true;
for(j=0; j<5; j++) {
if (bestHandPos[j] == 2 ) {
index2 = FALSE;
index2 = false;
}
}
if (index2) {
boardCardsArray[0]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index2" << endl;*/
}
//index 3 testen
bool index3 = TRUE;
bool index3 = true;
for(j=0; j<5; j++) {
if (bestHandPos[j] == 3 ) {
index3 = FALSE;
index3 = false;
}
}
if (index3) {
boardCardsArray[1]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index3" << endl;*/
}
//index 4 testen
bool index4 = TRUE;
bool index4 = true;
for(j=0; j<5; j++) {
if (bestHandPos[j] == 4 ) {
index4 = FALSE;
index4 = false;
}
}
if (index4) {
boardCardsArray[2]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index4" << endl;*/
}
//index 5 testen
bool index5 = TRUE;
bool index5 = true;
for(j=0; j<5; j++) {
if (bestHandPos[j] == 5 ) {
index5 = FALSE;
index5 = false;
}
}
if (index5) {
boardCardsArray[3]->startFadeOut(guiGameSpeed); /*cout << "Fade Out index5" << endl;*/
}
//index 6 testen
bool index6 = TRUE;
bool index6 = true;
for(j=0; j<5; j++) {
if (bestHandPos[j] == 6 ) {
index6 = FALSE;
index6 = false;
}
}
if (index6) {
@@ -2798,11 +2798,11 @@ void gameTableImpl::postRiverRunAnimation6()
if( !DEBUG_MODE ) {
if(myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_LOCAL) {
currentGameOver = TRUE;
currentGameOver = true;
#ifdef GUI_800x480
tabs.pushButton_break->setDisabled(FALSE);
tabs.pushButton_break->setDisabled(false);
#else
pushButton_break->setDisabled(FALSE);
pushButton_break->setDisabled(false);
#endif
QFontMetrics tempMetrics = this->fontMetrics();
int width = tempMetrics.width(tr("Start"));
@@ -2846,7 +2846,7 @@ void gameTableImpl::showHoleCards(unsigned playerId, bool allIn)
holeCardsArray[(*it_c)->getMyID()][j]->startFlipCards(guiGameSpeed, QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempCardsIntArray[j], 10)+".png")), flipside);
} else { //without Eye-Candy
tempCardsPixmapArray[j] = QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempCardsIntArray[j], 10)+".png"));
holeCardsArray[(*it_c)->getMyID()][j]->setPixmap(tempCardsPixmapArray[j], FALSE);
holeCardsArray[(*it_c)->getMyID()][j]->setPixmap(tempCardsPixmapArray[j], false);
}
}
//set Player value (logging)
@@ -2883,7 +2883,7 @@ void gameTableImpl::flipHolecardsAllIn()
}
//Wenn einmal umgedreht dann fertig!!
flipHolecardsAllInAlreadyDone = TRUE;
flipHolecardsAllInAlreadyDone = true;
}
}
@@ -2898,9 +2898,9 @@ void gameTableImpl::startNewHand()
if(myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_LOCAL) {
#ifdef GUI_800x480
tabs.pushButton_break->setDisabled(FALSE);
tabs.pushButton_break->setDisabled(false);
#else
pushButton_break->setDisabled(FALSE);
pushButton_break->setDisabled(false);
#endif
QFontMetrics tempMetrics = this->fontMetrics();
@@ -2913,7 +2913,7 @@ void gameTableImpl::startNewHand()
pushButton_break->setText(tr("Start"));
#endif
breakAfterCurrentHand=FALSE;
breakAfterCurrentHand=false;
blinkingStartButtonAnimationTimer->start(500);
}
@@ -2933,15 +2933,15 @@ void gameTableImpl::nextRoundCleanGui()
// GUI bereinigen - Bilder löschen, Animationen unterbrechen
QPixmap onePix = QPixmap::fromImage(QImage(myAppDataPath +"gfx/gui/misc/1px.png"));
for (i=0; i<5; i++ ) {
boardCardsArray[i]->setPixmap(onePix, FALSE);
boardCardsArray[i]->setFadeOutAction(FALSE);
boardCardsArray[i]->setPixmap(onePix, false);
boardCardsArray[i]->setFadeOutAction(false);
boardCardsArray[i]->stopFlipCardsAnimation();
}
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++ ) {
timeoutLabelArray[i]->stopTimeOutAnimation();
for ( j=0; j<=1; j++ ) {
holeCardsArray[i][j]->setFadeOutAction(FALSE);
holeCardsArray[i][j]->setFadeOutAction(false);
holeCardsArray[i][j]->stopFlipCardsAnimation();
}
}
@@ -2955,10 +2955,10 @@ void gameTableImpl::nextRoundCleanGui()
refreshAll();
flipHolecardsAllInAlreadyDone = FALSE;
flipHolecardsAllInAlreadyDone = false;
//Wenn Pause zwischen den Hands in der Konfiguration steht den Stop Button drücken!
if (myConfig->readConfigInt("PauseBetweenHands") /*&& blinkingStartButtonAnimationTimer->isActive() == FALSE*/ && myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_LOCAL) {
if (myConfig->readConfigInt("PauseBetweenHands") /*&& blinkingStartButtonAnimationTimer->isActive() == false*/ && myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_LOCAL) {
#ifdef GUI_800x480
tabs.pushButton_break->click();
#else
@@ -2967,11 +2967,11 @@ void gameTableImpl::nextRoundCleanGui()
} else {
//FIX STRG+N Bug
#ifdef GUI_800x480
tabs.pushButton_break->setEnabled(TRUE);
tabs.pushButton_break->setEnabled(true);
#else
pushButton_break->setEnabled(TRUE);
pushButton_break->setEnabled(true);
#endif
breakAfterCurrentHand=FALSE;
breakAfterCurrentHand=false;
}
//Clean breakbutton
@@ -2997,13 +2997,13 @@ void gameTableImpl::nextRoundCleanGui()
// statusBar()->clearMessage();
//fix press mouse button during bankrupt with anti-peek-mode
this->mouseOverFlipCards(FALSE);
this->mouseOverFlipCards(false);
horizontalSlider_bet->setDisabled(TRUE);
spinBox_betValue->setDisabled(TRUE);
horizontalSlider_bet->setDisabled(true);
spinBox_betValue->setDisabled(true);
uncheckMyButtons();
myButtonsCheckable(FALSE);
myButtonsCheckable(false);
resetMyButtonsCheckStateMemory();
clearMyButtons();
pushButton_showMyCards->hide();
@@ -3067,8 +3067,8 @@ void gameTableImpl::breakButtonClicked()
#ifdef GUI_800x480
if (tabs.pushButton_break->text() == tr("Stop")) {
tabs.pushButton_break->setDisabled(TRUE);
breakAfterCurrentHand=TRUE;
tabs.pushButton_break->setDisabled(true);
breakAfterCurrentHand=true;
} else if (tabs.pushButton_break->text() == tr("Lobby")) {
tabsButtonClose();
leaveCurrentNetworkGame();
@@ -3084,8 +3084,8 @@ void gameTableImpl::breakButtonClicked()
tabs.pushButton_break->setText(tr("Stop"));
#else
if (pushButton_break->text() == tr("Stop")) {
pushButton_break->setDisabled(TRUE);
breakAfterCurrentHand=TRUE;
pushButton_break->setDisabled(true);
breakAfterCurrentHand=true;
} else if (pushButton_break->text() == tr("Lobby")) {
leaveCurrentNetworkGame();
} else if (pushButton_break->text() == tr("Start")) {
@@ -3104,7 +3104,7 @@ void gameTableImpl::breakButtonClicked()
//let the SoundEventHandler know that there is a new game
mySoundEventHandler->newGameStarts();
currentGameOver = FALSE;
currentGameOver = false;
myStartWindow->callNewGameDialog();
//Bei Cancel nichts machen!!!
} else {
@@ -3118,7 +3118,7 @@ void gameTableImpl::keyPressEvent ( QKeyEvent * event )
// cout << event->key() << endl;
//bool ctrlPressed = FALSE;
//bool ctrlPressed = false;
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return ) { /*ENTER*/
if(spinBox_betValue->hasFocus()) {
@@ -3171,7 +3171,7 @@ void gameTableImpl::keyPressEvent ( QKeyEvent * event )
if (event->key() == Qt::Key_Shift) {
if(myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_LOCAL) {
pushButton_break->click();
//ctrlPressed = TRUE;
//ctrlPressed = true;
}
}
// if (event->key() == Qt::Key_Escape && (myActionIsBet || myActionIsRaise)) {
@@ -3502,7 +3502,7 @@ void gameTableImpl::localGameModification()
int i;
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++ ) {
timeoutLabelArray[i]->stopTimeOutAnimation();
playerAvatarLabelArray[i]->setEnabledContextMenu(FALSE);
playerAvatarLabelArray[i]->setEnabledContextMenu(false);
}
#ifdef GUI_800x480
@@ -3560,9 +3560,9 @@ void gameTableImpl::networkGameModification()
int i;
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++ ) {
playerAvatarLabelArray[i]->setEnabledContextMenu(TRUE);
playerAvatarLabelArray[i]->setVoteOnKickContextMenuEnabled(TRUE);
playerAvatarLabelArray[i]->setVoteRunning(FALSE);
playerAvatarLabelArray[i]->setEnabledContextMenu(true);
playerAvatarLabelArray[i]->setVoteOnKickContextMenuEnabled(true);
playerAvatarLabelArray[i]->setVoteRunning(false);
}
if(myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_INTERNET) {
@@ -3635,11 +3635,11 @@ void gameTableImpl::updateMyButtonsState(int mode)
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
if(currentHand->getPreviousPlayerID() == 0) {
myButtonsCheckable(FALSE);
myButtonsCheckable(false);
clearMyButtons();
} else {
if(currentHand->getSeatsList()->front()->getMyAction() != PLAYER_ACTION_ALLIN) { // dont show pre-actions after flip cards when allin
myButtonsCheckable(TRUE);
myButtonsCheckable(true);
provideMyActions(mode);
}
}
@@ -3648,20 +3648,20 @@ void gameTableImpl::updateMyButtonsState(int mode)
void gameTableImpl::uncheckMyButtons()
{
pushButton_BetRaise->setChecked(FALSE);
pushButton_CallCheck->setChecked(FALSE);
pushButton_Fold->setChecked(FALSE);
pushButton_AllIn->setChecked(FALSE);
pushButton_BetRaise->setChecked(false);
pushButton_CallCheck->setChecked(false);
pushButton_Fold->setChecked(false);
pushButton_AllIn->setChecked(false);
}
void gameTableImpl::resetMyButtonsCheckStateMemory()
{
pushButtonCallCheckIsChecked = FALSE;
pushButtonFoldIsChecked = FALSE;
pushButtonAllInIsChecked = FALSE;
pushButtonBetRaiseIsChecked = FALSE;
pushButtonCallCheckIsChecked = false;
pushButtonFoldIsChecked = false;
pushButtonAllInIsChecked = false;
pushButtonBetRaiseIsChecked = false;
}
void gameTableImpl::clearMyButtons()
@@ -3685,23 +3685,23 @@ void gameTableImpl::myButtonsCheckable(bool state)
// exception: full bet rule
if(!currentHand->getCurrentBeRo()->getFullBetRule()) {
pushButton_BetRaise->setCheckable(TRUE);
pushButton_BetRaise->setCheckable(true);
}
pushButton_CallCheck->setCheckable(TRUE);
pushButton_Fold->setCheckable(TRUE);
pushButton_AllIn->setCheckable(TRUE);
pushButton_CallCheck->setCheckable(true);
pushButton_Fold->setCheckable(true);
pushButton_AllIn->setCheckable(true);
//design
myGameTableStyle->setButtonsStyle(pushButton_BetRaise, pushButton_CallCheck, pushButton_Fold, pushButton_AllIn, 2);
myButtonsAreCheckable = TRUE;
myButtonsAreCheckable = true;
} else {
//not checkable
pushButton_BetRaise->setCheckable(FALSE);
pushButton_CallCheck->setCheckable(FALSE);
pushButton_Fold->setCheckable(FALSE);
pushButton_AllIn->setCheckable(FALSE);
pushButton_BetRaise->setCheckable(false);
pushButton_CallCheck->setCheckable(false);
pushButton_Fold->setCheckable(false);
pushButton_AllIn->setCheckable(false);
QString hover;
if(pushButton_AllIn->text()==AllInString) {
@@ -3710,7 +3710,7 @@ void gameTableImpl::myButtonsCheckable(bool state)
myGameTableStyle->setButtonsStyle(pushButton_BetRaise, pushButton_CallCheck, pushButton_Fold, pushButton_AllIn, 1);
}
myButtonsAreCheckable = FALSE;
myButtonsAreCheckable = false;
}
}
@@ -3760,7 +3760,7 @@ void gameTableImpl::changeSpinBoxBetValue(int value)
{
if(betSliderChangedByInput) {
//prevent interval cutting of spinBox_betValue input from code below
betSliderChangedByInput = FALSE;
betSliderChangedByInput = false;
} else {
if(horizontalSlider_bet->value() == horizontalSlider_bet->maximum()) {
@@ -3798,16 +3798,16 @@ void gameTableImpl::spinBoxBetValueChanged(int value)
if(value > horizontalSlider_bet->maximum()) { // print the maximum
pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(horizontalSlider_bet->maximum()));
betSliderChangedByInput = TRUE;
betSliderChangedByInput = true;
horizontalSlider_bet->setValue(horizontalSlider_bet->maximum());
} else { // really print the value
pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(value));
betSliderChangedByInput = TRUE;
betSliderChangedByInput = true;
horizontalSlider_bet->setValue(value);
}
} else { // print the minimum
pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(horizontalSlider_bet->minimum()));
betSliderChangedByInput = TRUE;
betSliderChangedByInput = true;
horizontalSlider_bet->setValue(horizontalSlider_bet->minimum());
}
}
@@ -3882,7 +3882,7 @@ void gameTableImpl::startVoteOnKick(unsigned playerId, unsigned voteStarterPlaye
int i;
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++ ) {
playerAvatarLabelArray[i]->setVoteRunning(TRUE);
playerAvatarLabelArray[i]->setVoteRunning(true);
}
}
@@ -3924,7 +3924,7 @@ void gameTableImpl::endVoteOnKick()
int i;
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++ ) {
playerAvatarLabelArray[i]->setVoteRunning(FALSE);
playerAvatarLabelArray[i]->setVoteRunning(false);
}
}
+3
View File
@@ -44,6 +44,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class guiLog;
class ChatTools;
+3
View File
@@ -41,6 +41,9 @@
#include <QtCore>
#include <QtGui>
#include <QtSql>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
struct result_struct {
char **result_Session;
+3
View File
@@ -33,6 +33,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class GameTableStyleReader;
+7 -7
View File
@@ -42,7 +42,7 @@
using namespace std;
MyAvatarLabel::MyAvatarLabel(QGroupBox* parent)
: QLabel(parent), voteRunning(FALSE), transparent(FALSE)
: QLabel(parent), voteRunning(false), transparent(false)
{
myContextMenu = new QMenu;
@@ -86,9 +86,9 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event )
GameInfo info(myW->getSession()->getClientGameInfo(myW->getSession()->getClientCurrentGameId()));
if(activePlayerCounter > 2 && !voteRunning && info.data.gameType != GAME_TYPE_RANKING && !myW->getGuestMode()) {
setVoteOnKickContextMenuEnabled(TRUE);
setVoteOnKickContextMenuEnabled(true);
} else {
setVoteOnKickContextMenuEnabled(FALSE);
setVoteOnKickContextMenuEnabled(false);
}
action_IgnorePlayer->setEnabled(true);
@@ -110,9 +110,9 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event )
}
if(myW->getSession()->getGameType() == Session::GAME_TYPE_INTERNET && !((*it_c)->getMyAvatar().empty()) ) {
action_ReportBadAvatar->setVisible(TRUE);
action_ReportBadAvatar->setVisible(true);
} else {
action_ReportBadAvatar->setVisible(FALSE);
action_ReportBadAvatar->setVisible(false);
}
}
j++;
@@ -214,7 +214,7 @@ void MyAvatarLabel::refreshStars()
for (seatPlace=0,it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c, seatPlace++) {
for(int i=1; i<=5; i++)myW->playerStarsArray[i][seatPlace]->setText("");
if(myW->myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_INTERNET && !myW->getSession()->getClientPlayerInfo((*it_c)->getMyUniqueID()).isGuest && (*it_c)->getMyType() != PLAYER_TYPE_COMPUTER) {
if((*it_c)->getMyStayOnTableStatus() == TRUE && (*it_c)->getMyName()!="" && seatPlace!=0) {
if((*it_c)->getMyStayOnTableStatus() == true && (*it_c)->getMyName()!="" && seatPlace!=0) {
int playerStars=getPlayerRating(QString::fromUtf8((*it_c)->getMyName().c_str()));
for(int i=1; i<=5; i++) {
myW->playerStarsArray[i][seatPlace]->setText("<a style='color: #"+myW->getMyGameTableStyle()->getRatingStarsColor()+"; "+fontFamily+" font-size: "+fontSize+"px; text-decoration: none;' href='"+QString::fromUtf8((*it_c)->getMyName().c_str())+"\""+QString::number(i)+"'>&#9734;</a>");
@@ -234,7 +234,7 @@ void MyAvatarLabel::refreshTooltips()
int seatPlace;
PlayerList seatsList = currentGame->getSeatsList();
for (seatPlace=0,it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c, seatPlace++) {
if((*it_c)->getMyStayOnTableStatus() == TRUE || (*it_c)->getMyActiveStatus()) {
if((*it_c)->getMyStayOnTableStatus() == true || (*it_c)->getMyActiveStatus()) {
bool computerPlayer = false;
if((*it_c)->getMyType() == PLAYER_TYPE_COMPUTER) {
computerPlayer = true;
+5 -2
View File
@@ -35,6 +35,9 @@
#include "startwindowimpl.h"
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class gameTableImpl;
class startWindowImpl;
@@ -65,8 +68,8 @@ public slots:
void setVoteRunning ( bool theValue ) {
voteRunning = theValue;
}
void setPixmap ( const QPixmap &, const bool = FALSE);
void setPixmapAndCountry ( const QPixmap &, QString country, int seatPlace, const bool = FALSE);
void setPixmap ( const QPixmap &, const bool = false);
void setPixmapAndCountry ( const QPixmap &, QString country, int seatPlace, const bool = false);
void setPixmapPath ( const QString theValue) {
myPath = theValue;
}
+25 -25
View File
@@ -36,18 +36,18 @@ MyCardsPixmapLabel::MyCardsPixmapLabel(QGroupBox* parent)
: QLabel(parent), myW(NULL)
{
this->setMouseTracking(TRUE);
this->setMouseTracking(true);
fadeOutAction = FALSE;
flipCardsAction1 = FALSE;
flipCardsAction2 = FALSE;
fadeOutAction = false;
flipCardsAction1 = false;
flipCardsAction2 = false;
mousePress = FALSE;
fastFlipCardsFront = FALSE;
mousePress = false;
fastFlipCardsFront = false;
// rotationIntervall = 0.03;
isFlipside = FALSE;
isFlipside = false;
fadeOutTimer = new QTimer;
connect(fadeOutTimer, SIGNAL(timeout()), this, SLOT(nextFadeOutFrame()));
@@ -78,7 +78,7 @@ void MyCardsPixmapLabel::startFadeOut(int speed)
}
if(speed != 11) {
fadeOutAction = TRUE;
fadeOutAction = true;
frameOpacity = 1.0;
fadeOutTimer->start(40);
}
@@ -89,7 +89,7 @@ void MyCardsPixmapLabel::stopFadeOut()
{
fadeOutTimer->stop();
fadeOutAction = FALSE;
fadeOutAction = false;
frameOpacity = 1.0;
update();
}
@@ -105,7 +105,7 @@ void MyCardsPixmapLabel::nextFadeOutFrame()
} else {
fadeOutTimer->stop();
// fadeOutAction = FALSE;
// fadeOutAction = false;
}
}
@@ -115,8 +115,8 @@ void MyCardsPixmapLabel::startFlipCards(int speed, const QPixmap &frontPix, cons
stopFadeOut();
stopFlipCards = FALSE;
isFlipside = FALSE;
stopFlipCards = false;
isFlipside = false;
QLabel::setPixmap(frontPix);
@@ -140,7 +140,7 @@ void MyCardsPixmapLabel::startFlipCards(int speed, const QPixmap &frontPix, cons
}
if(speed != 11) {
flipCardsAction1 = TRUE;
flipCardsAction1 = true;
flipCardsTimer->start(40);
}
@@ -150,9 +150,9 @@ void MyCardsPixmapLabel::stopFlipCardsAnimation()
{
flipCardsTimer->stop();
flipCardsAction1 = FALSE;
flipCardsAction2 = FALSE;
stopFlipCards = TRUE;
flipCardsAction1 = false;
flipCardsAction2 = false;
stopFlipCards = true;
update();
}
@@ -165,15 +165,15 @@ void MyCardsPixmapLabel::nextFlipCardsFrame()
update();
} else {
if(flipCardsAction1) {
flipCardsAction1 = FALSE;
flipCardsAction2 = TRUE;
flipCardsAction1 = false;
flipCardsAction2 = true;
} else {
//dann front vergrößern
if (frameFlipCardsAction2Size < 0.95 ) {
frameFlipCardsAction2Size += flipCardsScaleIntervall;
update();
} else {
flipCardsAction2 = FALSE;
flipCardsAction2 = false;
flipCardsTimer->stop();
}
@@ -243,10 +243,10 @@ void MyCardsPixmapLabel::fastFlipCards(bool front)
{
if (front) {
fastFlipCardsFront = TRUE;
fastFlipCardsFront = true;
update();
} else {
fastFlipCardsFront = FALSE;
fastFlipCardsFront = false;
update();
}
}
@@ -255,8 +255,8 @@ void MyCardsPixmapLabel::mousePressEvent(QMouseEvent * event)
{
if (!mousePress && objectName().contains("pixmapLabel_card0")) {
mousePress = TRUE;
myW->mouseOverFlipCards(TRUE);
mousePress = true;
myW->mouseOverFlipCards(true);
}
@@ -267,8 +267,8 @@ void MyCardsPixmapLabel::mouseReleaseEvent(QMouseEvent * event)
{
if (mousePress && objectName().contains("pixmapLabel_card0")) {
mousePress = FALSE;
myW->mouseOverFlipCards(FALSE);
mousePress = false;
myW->mouseOverFlipCards(false);
}
QLabel::mouseReleaseEvent(event);
@@ -35,6 +35,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class gameTableImpl;
+3
View File
@@ -35,6 +35,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class gameTableImpl;
+3
View File
@@ -35,6 +35,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class gameTableImpl;
class GameTableStyleReader;
+3 -1
View File
@@ -33,7 +33,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class MyLeftTabWidget : public QTabWidget
{
+3
View File
@@ -33,6 +33,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class MyMenuBar : public QMenuBar
{
+4 -1
View File
@@ -35,6 +35,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class gameTableImpl;
@@ -51,7 +54,7 @@ public:
public slots:
void setText ( const QString &, bool = FALSE, bool = FALSE, bool = FALSE);
void setText ( const QString &, bool = false, bool = false, bool = false);
private:
QString myText;
+3
View File
@@ -33,6 +33,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class MyRightTabWidget : public QTabWidget
{
+3
View File
@@ -35,6 +35,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class gameTableImpl;
+4
View File
@@ -32,6 +32,10 @@
#define MYSLIDER_H
#include <QtGui>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
/*
* This QSlider Extension was sponsored by: AZEVEDO Filipe aka Nox P@sNox <pasnox@gmail.com>
* http://pasnox.tuxfamily.org
+5 -5
View File
@@ -37,7 +37,7 @@ MyStatusLabel::MyStatusLabel(QGroupBox* parent)
: QLabel(parent), myW(NULL), mousePress(false)
{
mousePress = FALSE;
mousePress = false;
}
@@ -49,8 +49,8 @@ void MyStatusLabel::mousePressEvent(QMouseEvent * event)
{
if (!mousePress && objectName().contains("textLabel_Status0")) {
mousePress = TRUE;
myW->mouseOverFlipCards(TRUE);
mousePress = true;
myW->mouseOverFlipCards(true);
}
@@ -61,8 +61,8 @@ void MyStatusLabel::mouseReleaseEvent(QMouseEvent * event)
{
if (mousePress && objectName().contains("textLabel_Status0")) {
mousePress = FALSE;
myW->mouseOverFlipCards(FALSE);
mousePress = false;
myW->mouseOverFlipCards(false);
}
QLabel::mouseReleaseEvent(event);
+3
View File
@@ -35,6 +35,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class gameTableImpl;
+6 -6
View File
@@ -35,7 +35,7 @@
using namespace std;
MyTimeoutLabel::MyTimeoutLabel(QGroupBox* parent)
: QLabel(parent), timeOutAnimation(FALSE), timeOutValue(0), timeOutFrame(0), waitFrames(0), timerIntervall(0), isBeep(0), isBeepPlayed(0)
: QLabel(parent), timeOutAnimation(false), timeOutValue(0), timeOutFrame(0), waitFrames(0), timerIntervall(0), isBeep(0), isBeepPlayed(0)
{
timeOutAnimationTimer = new QTimer;
@@ -52,7 +52,7 @@ void MyTimeoutLabel::startTimeOutAnimation(int secs, bool beep)
{
if (secs >= 4) { // smaller timeouts may lead to errors/endless loops below
isBeepPlayed = FALSE;
isBeepPlayed = false;
isBeep = beep;
timeOutValue = secs;
@@ -80,7 +80,7 @@ void MyTimeoutLabel::startTimeOutAnimation(int secs, bool beep)
realTimer.start();
// std::cout << timerIntervall << endl;
timeOutAnimation = TRUE;
timeOutAnimation = true;
timeOutAnimationTimer->start(timerIntervall);
}
}
@@ -88,7 +88,7 @@ void MyTimeoutLabel::startTimeOutAnimation(int secs, bool beep)
void MyTimeoutLabel::startTimeOutAnimationNow()
{
timeOutAnimation = TRUE;
timeOutAnimation = true;
timeOutAnimationTimer->start(83);
}
@@ -98,7 +98,7 @@ void MyTimeoutLabel::stopTimeOutAnimation()
// timeOutAnimationKickOnTimer->stop();
timeOutAnimationTimer->stop();
timeOutAnimation = FALSE;
timeOutAnimation = false;
update();
}
@@ -110,7 +110,7 @@ void MyTimeoutLabel::nextTimeOutAnimationFrame()
//play beep after waitFrames one time
if(isBeep && !isBeepPlayed) {
myW->getMySoundEventHandler()->playSound("yourturn",0);
isBeepPlayed = TRUE;
isBeepPlayed = true;
}
//save gfx ressources and never play more the 10 pps
unsigned int realTimerValue = realTimer.elapsed().total_milliseconds();
+3
View File
@@ -36,6 +36,9 @@
#include <QtGui>
#include <QtCore>
#include <third_party/boost/timers.hpp>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class gameTableImpl;
@@ -33,6 +33,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class StartSplash : public QSplashScreen
@@ -94,7 +94,7 @@ void internetGameLoginDialogImpl::guestUserToggled(bool b)
okButtonCheck();
}
void internetGameLoginDialogImpl::exec()
int internetGameLoginDialogImpl::exec()
{
if(myConfig->readConfigInt("InternetLoginMode") == 0) {
@@ -117,7 +117,7 @@ void internetGameLoginDialogImpl::exec()
lineEdit_password->setFocus();
}
QDialog::exec();
return QDialog::exec();
}
void internetGameLoginDialogImpl::accept()
@@ -46,7 +46,7 @@ class internetGameLoginDialogImpl : public QDialog, public Ui::internetGameLogin
public:
internetGameLoginDialogImpl(QWidget *parent = 0, ConfigFile *c =0);
void exec();
int exec();
void accept();
bool eventFilter(QObject *obj, QEvent *event);
@@ -51,9 +51,9 @@ joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent, ConfigFile
if (myConfig->readConfigInt("CLA_NoWriteAccess")) {
pushButton_save->setDisabled(TRUE);
pushButton_delete->setDisabled(TRUE);
treeWidget->setDisabled(TRUE);
pushButton_save->setDisabled(true);
pushButton_delete->setDisabled(true);
treeWidget->setDisabled(true);
}
connect( lineEdit_ipAddress, SIGNAL( editingFinished()), this, SLOT( checkIp() ) );
@@ -67,7 +67,7 @@ joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent, ConfigFile
}
void joinNetworkGameDialogImpl::exec()
int joinNetworkGameDialogImpl::exec()
{
bool toIntTrue;
@@ -79,7 +79,7 @@ void joinNetworkGameDialogImpl::exec()
QValidator *validator = new QRegExpValidator(rx, this);
lineEdit_profileName->setValidator(validator);
pushButton_delete->setDisabled(TRUE);
pushButton_delete->setDisabled(true);
lineEdit_ipAddress->setFocus();
@@ -114,7 +114,7 @@ void joinNetworkGameDialogImpl::exec()
connectButtonTest();
QDialog::exec();
return QDialog::exec();
}
@@ -126,14 +126,12 @@ void joinNetworkGameDialogImpl::startClient()
void joinNetworkGameDialogImpl::fillServerProfileList()
{
treeWidget->clear();
TiXmlDocument doc(QString::fromUtf8(myServerProfilesFile.c_str()).toStdString());
if(!doc.LoadFile()) {
MyMessageBox::warning(this, tr("Load Server-Profile-File Error"),
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
tr("Could not load server-profiles-file:\n%1").arg(QString::fromUtf8(myServerProfilesFile.c_str())),
QMessageBox::Close);
}
TiXmlHandle docHandle( &doc );
@@ -184,7 +182,7 @@ void joinNetworkGameDialogImpl::itemFillForm (QTreeWidgetItem* item, int /*colum
TiXmlDocument doc(QString::fromUtf8(myServerProfilesFile.c_str()).toStdString());
if(!doc.LoadFile()) {
MyMessageBox::warning(this, tr("Load Server-Profile-File Error"),
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
tr("Could not load server-profiles-file:\n%1").arg(QString::fromUtf8(myServerProfilesFile.c_str())),
QMessageBox::Close);
}
TiXmlHandle docHandle( &doc );
@@ -200,7 +198,7 @@ void joinNetworkGameDialogImpl::itemFillForm (QTreeWidgetItem* item, int /*colum
}
pushButton_delete->setEnabled(TRUE);
pushButton_delete->setEnabled(true);
}
void joinNetworkGameDialogImpl::saveServerProfile()
@@ -211,7 +209,7 @@ void joinNetworkGameDialogImpl::saveServerProfile()
TiXmlDocument doc(QString::fromUtf8(myServerProfilesFile.c_str()).toStdString());
if(!doc.LoadFile()) {
MyMessageBox::warning(this, tr("Load Server-Profile-File Error"),
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
tr("Could not load server-profiles-file:\n%1").arg(QString::fromUtf8(myServerProfilesFile.c_str())),
QMessageBox::Close);
}
TiXmlHandle docHandle( &doc );
@@ -268,7 +266,7 @@ void joinNetworkGameDialogImpl::saveServerProfile()
if(!doc.SaveFile()) {
MyMessageBox::warning(this, tr("Save Server-Profile-File Error"),
tr("Could not save server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
tr("Could not save server-profiles-file:\n%1").arg(QString::fromUtf8(myServerProfilesFile.c_str())),
QMessageBox::Close);
}
@@ -281,7 +279,7 @@ void joinNetworkGameDialogImpl::deleteServerProfile()
TiXmlDocument doc(QString::fromUtf8(myServerProfilesFile.c_str()).toStdString());
if(!doc.LoadFile()) {
MyMessageBox::warning(this, tr("Load Server-Profile-File Error"),
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
tr("Could not load server-profiles-file:\n%1").arg(QString::fromUtf8(myServerProfilesFile.c_str())),
QMessageBox::Close);
} else {
TiXmlHandle docHandle( &doc );
@@ -294,7 +292,7 @@ void joinNetworkGameDialogImpl::deleteServerProfile()
if(!doc.SaveFile()) {
MyMessageBox::warning(this, tr("Save Server-Profile-File Error"),
tr("Could not save server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
tr("Could not save server-profiles-file:\n%1").arg(QString::fromUtf8(myServerProfilesFile.c_str())),
QMessageBox::Close);
}
@@ -302,7 +300,7 @@ void joinNetworkGameDialogImpl::deleteServerProfile()
fillServerProfileList();
}
pushButton_delete->setDisabled(TRUE);
pushButton_delete->setDisabled(true);
}
void joinNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event )
@@ -327,8 +325,8 @@ void joinNetworkGameDialogImpl::connectButtonTest()
{
if(lineEdit_ipAddress->text().isEmpty()) {
pushButton_connect->setDisabled(TRUE);
pushButton_connect->setDisabled(true);
} else {
pushButton_connect->setDisabled(FALSE);
pushButton_connect->setDisabled(false);
}
}
@@ -54,7 +54,7 @@ public:
ConfigFile *myConfig;
std::string myServerProfilesFile;
void exec();
int exec();
public slots:
+9 -8
View File
@@ -70,13 +70,14 @@ LogFileDialog::~LogFileDialog()
delete ui;
}
void LogFileDialog::exec()
int LogFileDialog::exec()
{
uploader->Run();
refreshLogFileList();
QDialog::exec();
int ret = QDialog::exec();
uploader->SignalTermination();
uploader->Join(THREAD_WAIT_INFINITE);
return ret;
}
void LogFileDialog::UploadCompleted(const std::string &filename, const std::string &returnMessage)
@@ -99,7 +100,7 @@ void LogFileDialog::refreshLogFileList()
QFileInfo currentSqliteLogFile(QString::fromStdString(myGuiLog->getMySqliteLogFileName()));
ui->treeWidget_logFiles->blockSignals(TRUE);
ui->treeWidget_logFiles->blockSignals(true);
ui->treeWidget_logFiles->clear();
int i;
for (i=0; i < dbFilesList.size(); i++) {
@@ -119,7 +120,7 @@ void LogFileDialog::refreshLogFileList()
ui->treeWidget_logFiles->addTopLevelItem(item);
}
ui->treeWidget_logFiles->sortItems(0, Qt::DescendingOrder);
ui->treeWidget_logFiles->blockSignals(FALSE);
ui->treeWidget_logFiles->blockSignals(false);
ui->treeWidget_logFiles->setCurrentItem(ui->treeWidget_logFiles->topLevelItem(0));
}
@@ -200,14 +201,14 @@ void LogFileDialog::showLogFilePreview(ShowLogMode mode)
QTreeWidgetItem* selectedItem = ui->treeWidget_logFiles->currentItem();
if(mode == INIT_VIEW) {
ui->comboBox->blockSignals(TRUE);
ui->comboBox->blockSignals(true);
ui->comboBox->clear();
QList<int> gameIds = myGuiLog->getGameList(selectedItem->data(0, Qt::UserRole).toString());
QList<int>::const_iterator it;
for (it = gameIds.constBegin(); it != gameIds.constEnd(); ++it) {
ui->comboBox->addItem(QString::number(*it));
}
ui->comboBox->blockSignals(FALSE);
ui->comboBox->blockSignals(false);
}
if(selectedItem) {
@@ -249,7 +250,7 @@ void LogFileDialog::uploadFile()
void LogFileDialog::uploadInProgressAnimationStart()
{
//const QString buttonText(tr("Upload in progress"));
ui->pushButton_analyseLogfile->setDisabled(TRUE);
ui->pushButton_analyseLogfile->setDisabled(true);
QMovie *movie = new QMovie(":/gfx/loader.gif");
ui->label_animation->setMovie(movie);
@@ -261,7 +262,7 @@ void LogFileDialog::uploadInProgressAnimationStart()
void LogFileDialog::uploadInProgressAnimationStop()
{
ui->pushButton_analyseLogfile->setDisabled(FALSE);
ui->pushButton_analyseLogfile->setDisabled(false);
ui->label_animation->setMaximumWidth(0);
ui->horizontalLayout_animation->setSpacing(0);
+1 -1
View File
@@ -61,7 +61,7 @@ public:
void setGuiLog(guiLog *g) {
myGuiLog = g;
}
void exec();
int exec();
virtual void UploadCompleted(const std::string &filename, const std::string &returnMessage);
virtual void UploadError(const std::string &filename, const std::string &errorMessage);
@@ -47,7 +47,7 @@ newGameDialogImpl::newGameDialogImpl(QMainWindow *parent, ConfigFile *c)
}
void newGameDialogImpl::exec()
int newGameDialogImpl::exec()
{
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NumberOfPlayers"));
@@ -79,7 +79,7 @@ void newGameDialogImpl::exec()
myChangeCompleteBlindsDialog->spinBox_afterThisAlwaysRaiseValue->setValue(myConfig->readConfigInt("AfterMBAlwaysRaiseValue"));
myChangeCompleteBlindsDialog->radioButton_afterThisStayAtLastBlind->setChecked(myConfig->readConfigInt("AfterMBStayAtLastBlind"));
QDialog::exec();
return QDialog::exec();
}
void newGameDialogImpl::callChangeBlindsDialog(bool show)
@@ -89,7 +89,7 @@ void newGameDialogImpl::callChangeBlindsDialog(bool show)
myChangeCompleteBlindsDialog->exec();
if(myChangeCompleteBlindsDialog->result() == QDialog::Accepted ) {}
else {
radioButton_useSavedBlindsSettings->setChecked(TRUE);
radioButton_useSavedBlindsSettings->setChecked(true);
}
}
@@ -39,7 +39,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class ConfigFile;
class changeCompleteBlindsDialogImpl;
@@ -50,7 +52,7 @@ class newGameDialogImpl: public QDialog, public Ui::newGameDialog
public:
newGameDialogImpl(QMainWindow *parent = 0, ConfigFile* = 0);
void exec();
int exec();
changeCompleteBlindsDialogImpl* getChangeCompleteBlindsDialog() {
return myChangeCompleteBlindsDialog;
}
@@ -50,10 +50,9 @@ serverListDialogImpl::serverListDialogImpl(startWindowImpl *sw, QMainWindow *par
connect( this, SIGNAL( rejected() ), this, SLOT( closeNetworkClient() ));
}
void serverListDialogImpl::exec()
int serverListDialogImpl::exec()
{
QDialog::exec();
return QDialog::exec();
}
void serverListDialogImpl::clearList()
@@ -39,7 +39,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class ConfigFile;
class startWindowImpl;
@@ -52,7 +54,7 @@ public:
public slots:
void exec();
int exec();
void clearList();
void addServerItem(unsigned);
void connectToServer();
@@ -66,4 +68,4 @@ private:
};
#endif
void exec();
int exec();
@@ -35,7 +35,7 @@
manualBlindsOrderDialogImpl::manualBlindsOrderDialogImpl(QWidget *parent, ConfigFile *c)
: QDialog(parent), myConfig(c), settingsCorrect(TRUE)
: QDialog(parent), myConfig(c), settingsCorrect(true)
{
#ifdef __APPLE__
setWindowModality(Qt::ApplicationModal);
@@ -48,11 +48,9 @@ manualBlindsOrderDialogImpl::manualBlindsOrderDialogImpl(QWidget *parent, Config
}
void manualBlindsOrderDialogImpl::exec()
int manualBlindsOrderDialogImpl::exec()
{
QDialog::exec();
return QDialog::exec();
}
@@ -82,7 +80,7 @@ void manualBlindsOrderDialogImpl::sortBlindsList()
int i;
QList<int> tempIntList;
QStringList tempStringList;
bool ok = TRUE;
bool ok = true;
for(i=0; i<listWidget_blinds->count(); i++) {
// std::cout << listWidget_blinds->item(i)->text().toInt(&ok,10) << "\n";
@@ -48,7 +48,7 @@ class manualBlindsOrderDialogImpl: public QDialog, public Ui::manualBlindsOrderD
public:
manualBlindsOrderDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
void exec();
int exec();
public slots:
@@ -33,6 +33,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class MyAvatarButton : public QPushButton
{
@@ -33,6 +33,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class MyHPAvatarButton : public QPushButton
{
@@ -33,6 +33,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class MyStyleListItem : public QTreeWidgetItem
{
@@ -33,6 +33,9 @@
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
class MyAvatarListItem : public QListWidgetItem
{
@@ -36,7 +36,7 @@
selectAvatarDialogImpl::selectAvatarDialogImpl(QWidget *parent, ConfigFile *c)
: QDialog(parent), myConfig(c), settingsCorrect(TRUE), avatarDir("")
: QDialog(parent), myConfig(c), settingsCorrect(true), avatarDir("")
{
#ifdef __APPLE__
setWindowModality(Qt::ApplicationModal);
@@ -56,7 +56,7 @@ selectAvatarDialogImpl::selectAvatarDialogImpl(QWidget *parent, ConfigFile *c)
// listWidget->setFlow(QListView::TopToBottom);
// listWidget->setWrapping(true);
listWidget->setSpacing(20);
listWidget->setDragEnabled(FALSE);
listWidget->setDragEnabled(false);
listWidget->setResizeMode(QListView::Adjust);
@@ -174,14 +174,12 @@ selectAvatarDialogImpl::selectAvatarDialogImpl(QWidget *parent, ConfigFile *c)
}
void selectAvatarDialogImpl::exec()
int selectAvatarDialogImpl::exec()
{
//clear
lineEdit->setText("");
refreshAvatarView();
QDialog::exec();
return QDialog::exec();
}
void selectAvatarDialogImpl::refreshAvatarView()
@@ -217,12 +215,12 @@ void selectAvatarDialogImpl::refreshAvatarView()
void selectAvatarDialogImpl::toggleGroupBox1(bool /*toggleState*/)
{
if(groupBox->isChecked()) groupBox_2->setChecked(FALSE);
if(groupBox->isChecked()) groupBox_2->setChecked(false);
}
void selectAvatarDialogImpl::toggleGroupBox2(bool /*toggleState*/)
{
if(groupBox_2->isChecked()) groupBox->setChecked(FALSE);
if(groupBox_2->isChecked()) groupBox->setChecked(false);
}
QString selectAvatarDialogImpl::getAvatarLink()
@@ -247,15 +245,15 @@ void selectAvatarDialogImpl::isAccepted()
QList<QListWidgetItem *> myItemList = listWidget->selectedItems();
settingsCorrect = TRUE;
settingsCorrect = true;
if(groupBox->isChecked()) {
if(myItemList.size() == 0) {
MyMessageBox::warning(this, tr("Avatar File Error"),
tr("Please select an avatar from the list!"),
QMessageBox::Ok);
settingsCorrect = FALSE;
} else settingsCorrect = TRUE;;
settingsCorrect = false;
} else settingsCorrect = true;;
}
if(groupBox_2->isChecked()) {
@@ -264,13 +262,13 @@ void selectAvatarDialogImpl::isAccepted()
if(lineEditFile.size() <= 30720 ) {
externalAvatar = lineEdit->text();
settingsCorrect = TRUE;
settingsCorrect = true;
} else {
MyMessageBox::warning(this, tr("Avatar File Error"),
tr("The file size of the chosen picture is too big. (max. 30KB)\n"
"Please choose a smaller picture!"),
QMessageBox::Ok);
settingsCorrect = FALSE;
settingsCorrect = false;
externalAvatar = "";
}
@@ -279,7 +277,7 @@ void selectAvatarDialogImpl::isAccepted()
tr("The entered avatar picture doesn't exist.\n"
"Please enter an valid picture!"),
QMessageBox::Ok);
settingsCorrect = FALSE;
settingsCorrect = false;
externalAvatar = "";
}
}
@@ -292,7 +290,7 @@ void selectAvatarDialogImpl::isAccepted()
void selectAvatarDialogImpl::isRejected()
{
settingsCorrect = FALSE;
settingsCorrect = false;
}
void selectAvatarDialogImpl::setExternalAvatar()
@@ -36,7 +36,9 @@
#else
#include "ui_selectavatardialog.h"
#endif
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
#include <QtCore>
#include <QtGui>
@@ -49,7 +51,7 @@ class selectAvatarDialogImpl: public QDialog, public Ui::selectAvatarDialog
public:
selectAvatarDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
void exec();
int exec();
public slots:
@@ -65,7 +65,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
pushButton_openLogDir->setIcon(QIcon(QPixmap(myAppDataPath+"gfx/gui/misc/fileopen16.png")));
if (myConfig->readConfigInt("CLA_NoWriteAccess")) {
groupBox_logOnOff->setDisabled(TRUE);
groupBox_logOnOff->setDisabled(true);
}
comboBox_switchLanguage->addItem(QString(tr("Afrikaans")+" "+QString::fromUtf8("(Afrikaans)")),"af");
@@ -165,7 +165,7 @@ settingsDialogImpl::~settingsDialogImpl()
void settingsDialogImpl::prepareDialog()
{
playerNickIsChanged = FALSE;
playerNickIsChanged = false;
//Player Nicks
lineEdit_HumanPlayerName->setText(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()));
@@ -247,10 +247,10 @@ void settingsDialogImpl::prepareDialog()
if(myConfig->readConfigInt("UseAvatarServer")) {
lineEdit_avatarServerAddress->setText(QString::fromUtf8(myConfig->readConfigString("AvatarServerAddress").c_str()));
checkBox_useAvatarServer->setCheckState(Qt::Checked);
lineEdit_avatarServerAddress->setEnabled(TRUE);
lineEdit_avatarServerAddress->setEnabled(true);
} else {
checkBox_useAvatarServer->setCheckState(Qt::Unchecked);
lineEdit_avatarServerAddress->setEnabled(FALSE);
lineEdit_avatarServerAddress->setEnabled(false);
}
checkBox_UseInternetGamePassword->setChecked(myConfig->readConfigInt("UseInternetGamePassword"));
if(myConfig->readConfigInt("UseInternetGamePassword")) {
@@ -261,9 +261,9 @@ void settingsDialogImpl::prepareDialog()
comboBox_internetGameType->setCurrentIndex(myConfig->readConfigInt("InternetGameType"));
lineEdit_internetGameName->setText(QString::fromUtf8(myConfig->readConfigString("InternetGameName").c_str()));
if(myConfig->readConfigInt("InternetServerConfigMode")) {
groupBox_manualServerConfig->setChecked(TRUE);
groupBox_manualServerConfig->setChecked(true);
} else {
groupBox_automaticServerConfig->setChecked(TRUE);
groupBox_automaticServerConfig->setChecked(true);
}
std::list<std::string> playerIgnoreList = myConfig->readConfigStringList("PlayerIgnoreList");
@@ -379,13 +379,13 @@ void settingsDialogImpl::prepareDialog()
currentGameTableStyle.readStyleFile(QString::fromUtf8(myConfig->readConfigString("CurrentGameTableStyle").c_str()));
if(currentGameTableStyle.getLoadedSuccessfull()) {
int i;
bool currentGameTableFound(FALSE);
bool currentGameTableFound(false);
for(i=0; i < treeWidget_gameTableStyles->topLevelItemCount(); i++) {
QTreeWidgetItem *item = treeWidget_gameTableStyles->topLevelItem(i);
if(item->data(0, 15) == currentGameTableStyle.getCurrentFileName()) {
item->setIcon(0, QIcon(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"/gfx/gui/misc/rating.png"));
treeWidget_gameTableStyles->setCurrentItem(item);
currentGameTableFound=TRUE;
currentGameTableFound=true;
} else item->setIcon(0, QIcon());
}
if(!currentGameTableFound) {
@@ -480,13 +480,13 @@ void settingsDialogImpl::prepareDialog()
currentCardDeckStyle.readStyleFile(QString::fromUtf8(myConfig->readConfigString("CurrentCardDeckStyle").c_str()));
if(currentCardDeckStyle.getLoadedSuccessfull()) {
int j;
bool currentCardDeckFound(FALSE);
bool currentCardDeckFound(false);
for(j=0; j < treeWidget_cardDeckStyles->topLevelItemCount(); j++) {
QTreeWidgetItem *item = treeWidget_cardDeckStyles->topLevelItem(j);
if(item->data(0, 15) == currentCardDeckStyle.getCurrentFileName()) {
item->setIcon(0, QIcon(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"/gfx/gui/misc/rating.png"));
treeWidget_cardDeckStyles->setCurrentItem(item);
currentCardDeckFound=TRUE;
currentCardDeckFound=true;
} else item->setIcon(0, QIcon());
}
if(!currentCardDeckFound) {
@@ -521,8 +521,8 @@ void settingsDialogImpl::prepareDialog()
radioButton_flipsideTux->setChecked(myConfig->readConfigInt("FlipsideTux"));
radioButton_flipsideOwn->setChecked(myConfig->readConfigInt("FlipsideOwn"));
if(radioButton_flipsideOwn->isChecked()) {
lineEdit_OwnFlipsideFilename->setEnabled(TRUE);
pushButton_openFlipsidePicture->setEnabled(TRUE);
lineEdit_OwnFlipsideFilename->setEnabled(true);
pushButton_openFlipsidePicture->setEnabled(true);
}
lineEdit_OwnFlipsideFilename->setText(QString::fromUtf8(myConfig->readConfigString("FlipsideOwnFile").c_str()));
@@ -564,7 +564,7 @@ void settingsDialogImpl::prepareDialog()
setFirstSmallBlindMargin();
//set this AFTER switch combobox like config-settings. This IS a currentIndexChanged() ;-)
languageIsChanged = FALSE;
languageIsChanged = false;
//disable reset config button when dialog is called from ingame
if(calledIngame) {
@@ -587,7 +587,7 @@ void settingsDialogImpl::exec(bool in_game)
void settingsDialogImpl::isAccepted()
{
settingsCorrect = TRUE;
settingsCorrect = true;
// Player Nicks
//check if all player nicks are unique --> otherwise dont save
@@ -608,7 +608,7 @@ void settingsDialogImpl::isAccepted()
tr("The opponent names are not unique.\n"
"Please choose different names for each Opponent!"),
QMessageBox::Ok);
settingsCorrect = FALSE;
settingsCorrect = false;
} else {
//save nicks and avatars
myConfig->writeConfigString("MyName", lineEdit_HumanPlayerName->text().trimmed().toUtf8().constData());
@@ -689,7 +689,7 @@ void settingsDialogImpl::isAccepted()
tr("The entered server list address is not a valid URL.\n"
"Please enter a valid server list address!"),
QMessageBox::Ok);
settingsCorrect = FALSE;
settingsCorrect = false;
}
}
if(groupBox_manualServerConfig->isChecked()) {
@@ -755,7 +755,7 @@ void settingsDialogImpl::isAccepted()
tr("The entered flipside picture doesn't exist.\n"
"Please enter an valid picture!"),
QMessageBox::Ok);
settingsCorrect = FALSE;
settingsCorrect = false;
}
}
@@ -815,7 +815,7 @@ void settingsDialogImpl::isAccepted()
tr("The log file directory doesn't exist.\n"
"Please select an valid directory!"),
QMessageBox::Ok);
settingsCorrect = FALSE;
settingsCorrect = false;
}
myConfig->writeConfigInt("LogStoreDuration", spinBox_logStoreDuration->value());
@@ -1021,7 +1021,7 @@ void settingsDialogImpl::callManualBlindsOrderDialog()
myManualBlindsOrderDialog->exec();
if(myManualBlindsOrderDialog->result() == QDialog::Accepted) {
bool ok = TRUE;
bool ok = true;
int i;
myManualBlindsList.clear();
for(i=0; i<myManualBlindsOrderDialog->listWidget_blinds->count(); i++) {
@@ -1057,7 +1057,7 @@ void settingsDialogImpl::callNetManualBlindsOrderDialog()
myManualBlindsOrderDialog->exec();
if(myManualBlindsOrderDialog->result() == QDialog::Accepted) {
bool ok = TRUE;
bool ok = true;
int i;
myNetManualBlindsList.clear();
for(i=0; i<myManualBlindsOrderDialog->listWidget_blinds->count(); i++) {
@@ -1113,21 +1113,21 @@ void settingsDialogImpl::setFirstSmallBlindMargin()
void settingsDialogImpl::setLanguageChanged(int index)
{
languageIsChanged = TRUE;
languageIsChanged = true;
changedLanguageIndex = index;
}
void settingsDialogImpl::toggleGroupBoxAutomaticServerConfig(bool toggleState)
{
if(toggleState) groupBox_manualServerConfig->setChecked(FALSE);
else groupBox_manualServerConfig->setChecked(TRUE);
if(toggleState) groupBox_manualServerConfig->setChecked(false);
else groupBox_manualServerConfig->setChecked(true);
}
void settingsDialogImpl::toggleGroupBoxManualServerConfig(bool toggleState)
{
if(toggleState) groupBox_automaticServerConfig->setChecked(FALSE);
else groupBox_automaticServerConfig->setChecked(TRUE);
if(toggleState) groupBox_automaticServerConfig->setChecked(false);
else groupBox_automaticServerConfig->setChecked(true);
}
void settingsDialogImpl::showCurrentGameTableStylePreview()
@@ -1163,7 +1163,7 @@ void settingsDialogImpl::showCurrentGameTableStylePreview()
maintainerEMailString = "<b>"+MaintainerEMail+":</b> "+style.getStyleMaintainerEMail()+"<br>";
}
label_gameTableStyleInfo->setWordWrap(TRUE);
label_gameTableStyleInfo->setWordWrap(true);
label_gameTableStyleInfo->setText("<b>"+MaintainerName+":</b> "+style.getStyleMaintainerName()+"<br>"+maintainerEMailString+"<b>"+CreateDate+":</b> "+style.getStyleCreateDate()+"<br>"+windowsSubString+"<br><b>"+State+": </b>"+style.getMyStateToolTipInfo());
//active the current selected item directly
@@ -1171,9 +1171,9 @@ void settingsDialogImpl::showCurrentGameTableStylePreview()
//disable remove button for distributed styles
if(item->data(0, 16).toInt() == POKERTH_DISTRIBUTED_STYLE) {
pushButton_removeGameTableStyle->setDisabled(TRUE);
pushButton_removeGameTableStyle->setDisabled(true);
} else {
pushButton_removeGameTableStyle->setDisabled(FALSE);
pushButton_removeGameTableStyle->setDisabled(false);
}
}
@@ -1208,11 +1208,11 @@ void settingsDialogImpl::addGameTableStyle()
if (!fileName.isEmpty()) {
int i;
bool fileNameAlreadyFound(FALSE);
bool fileNameAlreadyFound(false);
for(i=0; i < treeWidget_gameTableStyles->topLevelItemCount(); i++) {
QTreeWidgetItem *item = treeWidget_gameTableStyles->topLevelItem(i);
if(item->data(0, 15).toString() == fileName)
fileNameAlreadyFound = TRUE;
fileNameAlreadyFound = true;
}
if(fileNameAlreadyFound) {
@@ -1290,7 +1290,7 @@ void settingsDialogImpl::showCurrentCardDeckStylePreview()
}
#ifdef GUI_800x480
label_cardDeckStyleInfo->setWordWrap(TRUE);
label_cardDeckStyleInfo->setWordWrap(true);
#endif
label_cardDeckStyleInfo->setText("<b>"+MaintainerName+":</b> "+style.getStyleMaintainerName()+"<br>"+maintainerEMailString+"<b>"+CreateDate+":</b> "+style.getStyleCreateDate()+"");
//active the current selected item directly
@@ -1298,9 +1298,9 @@ void settingsDialogImpl::showCurrentCardDeckStylePreview()
//disable remove button for distributed styles
if(item->data(0, 16).toInt() == POKERTH_DISTRIBUTED_STYLE) {
pushButton_removeCardDeckStyle->setDisabled(TRUE);
pushButton_removeCardDeckStyle->setDisabled(true);
} else {
pushButton_removeCardDeckStyle->setDisabled(FALSE);
pushButton_removeCardDeckStyle->setDisabled(false);
}
}
}
@@ -1334,11 +1334,11 @@ void settingsDialogImpl::addCardDeckStyle()
if (!fileName.isEmpty()) {
int i;
bool fileNameAlreadyFound(FALSE);
bool fileNameAlreadyFound(false);
for(i=0; i < treeWidget_cardDeckStyles->topLevelItemCount(); i++) {
QTreeWidgetItem *item = treeWidget_cardDeckStyles->topLevelItem(i);
if(item->data(0, 15).toString() == fileName)
fileNameAlreadyFound = TRUE;
fileNameAlreadyFound = true;
}
if(fileNameAlreadyFound) {
@@ -41,6 +41,9 @@
#include <QtCore>
#include <QtGui>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
#include <boost/shared_ptr.hpp>
#include <vector>
@@ -83,7 +86,7 @@ public slots:
void isAccepted();
void playerNickChanged() {
setPlayerNickIsChanged(TRUE);
setPlayerNickIsChanged(true);
};
void setFlipsidePicFileName();
void setLogDir();
+7 -7
View File
@@ -35,7 +35,7 @@
#include <QDebug>
AndroidAudio::AndroidAudio(ConfigFile *c, QObject *parent) :
QObject(parent), mEngineObject(NULL), mEngineEngine(NULL), mOutputMixObject(NULL), mSounds(), mSoundCount(0), mPlayerObject(NULL), myConfig(c), audioEnabled(FALSE)
QObject(parent), mEngineObject(NULL), mEngineEngine(NULL), mOutputMixObject(NULL), mSounds(), mSoundCount(0), mPlayerObject(NULL), myConfig(c), audioEnabled(false)
{
initAudio();
}
@@ -50,7 +50,7 @@ void AndroidAudio::initAudio()
if (!audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) {
createEngine();
startSoundPlayer();
audioEnabled = TRUE;
audioEnabled = true;
}
}
@@ -63,7 +63,7 @@ void AndroidAudio::closeAudio()
for (int32_t i = 0; i < mSoundCount; ++i) {
qDeleteAll(mSounds);
}
audioEnabled = FALSE;
audioEnabled = false;
}
}
@@ -82,7 +82,7 @@ void AndroidAudio::createEngine()
Q_ASSERT(SL_RESULT_SUCCESS == result);
// realize the engine
result = (*mEngineObject)->Realize(mEngineObject, SL_BOOLEAN_FALSE);
result = (*mEngineObject)->Realize(mEngineObject, SL_BOOLEAN_false);
Q_ASSERT(SL_RESULT_SUCCESS == result);
// get the engine interface, which is needed in order to create other objects
@@ -96,7 +96,7 @@ void AndroidAudio::createEngine()
Q_ASSERT(SL_RESULT_SUCCESS == result);
// realize the output mix
result = (*mOutputMixObject)->Realize(mOutputMixObject, SL_BOOLEAN_FALSE);
result = (*mOutputMixObject)->Realize(mOutputMixObject, SL_BOOLEAN_false);
Q_ASSERT(SL_RESULT_SUCCESS == result);
qDebug() << "Created Android Audio Engine";
@@ -171,7 +171,7 @@ void AndroidAudio::startSoundPlayer()
//Create the sound player
const SLuint32 lSoundPlayerIIDCount = 2;
const SLInterfaceID lSoundPlayerIIDs[] = { SL_IID_PLAY, SL_IID_BUFFERQUEUE };
const SLboolean lSoundPlayerReqs[] = { SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE };
const SLboolean lSoundPlayerReqs[] = { SL_BOOLEAN_true, SL_BOOLEAN_true };
// qDebug() << "Configured Sound Player";
@@ -180,7 +180,7 @@ void AndroidAudio::startSoundPlayer()
// qDebug() << "Created Sound Player";
lRes = (*mPlayerObject)->Realize(mPlayerObject, SL_BOOLEAN_FALSE);
lRes = (*mPlayerObject)->Realize(mPlayerObject, SL_BOOLEAN_false);
Q_ASSERT(SL_RESULT_SUCCESS == lRes);
qDebug() << "Realised Sound Player";
+1 -1
View File
@@ -39,7 +39,7 @@
using namespace std;
SDLPlayer::SDLPlayer(ConfigFile *c)
: sound(NULL), soundData(NULL), currentChannel(0), audioEnabled(FALSE), myConfig(c)
: sound(NULL), soundData(NULL), currentChannel(0), audioEnabled(false), myConfig(c)
{
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
SDL_Init(SDL_INIT_AUDIO);
@@ -62,10 +62,9 @@ startNetworkGameDialogImpl::startNetworkGameDialogImpl(startWindowImpl *parent,
clearDialog();
}
void startNetworkGameDialogImpl::exec()
int startNetworkGameDialogImpl::exec()
{
QDialog::exec();
return QDialog::exec();
}
void startNetworkGameDialogImpl::startGame()
@@ -92,7 +92,7 @@ public slots:
return maxPlayerNumber;
}
void exec();
int exec();
private:
+8 -8
View File
@@ -61,7 +61,7 @@
#ifdef ANDROID
#ifndef ANDROID_TEST
#include <QPlatformNativeInterface>
#include "QtGui/5.1.0/QtGui/qpa/qplatformnativeinterface.h"
#include <jni.h>
#endif
#endif
@@ -114,7 +114,7 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
}
this->showFullScreen();
//TODO HACK Missing QSystemScreenSaver::setScreenSaverInhibited(TRUE)
//TODO HACK Missing QSystemScreenSaver::setScreenSaverInhibited(true)
// #ifndef ANDROID_TEST
// JavaVM *currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForWidget("JavaVM", 0);
// JNIEnv* env;
@@ -215,8 +215,8 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
connect(this, SIGNAL(signalNetClientPlayerJoined(unsigned, QString, bool)), myGameLobbyDialog, SLOT(addConnectedPlayer(unsigned, QString, bool)));
connect(this, SIGNAL(signalNetClientPlayerChanged(unsigned, QString)), myGameLobbyDialog, SLOT(updatePlayer(unsigned, QString)));
connect(this, SIGNAL(signalNetClientPlayerLeft(unsigned, QString)), myGameLobbyDialog, SLOT(removePlayer(unsigned, QString)));
// TODO connect(this, SIGNAL(signalNetClientSpectatorJoined(unsigned, QString)), myGameLobbyDialog, SLOT(addConnectedSpectator(unsigned, QString)));
// TODO connect(this, SIGNAL(signalNetClientSpectatorLeft(unsigned, QString)), myGameLobbyDialog, SLOT(removeSpectator(unsigned, QString)));
connect(this, SIGNAL(signalNetClientSpectatorJoined(unsigned, QString)), myGameLobbyDialog, SLOT(addConnectedSpectator(unsigned, QString)));
connect(this, SIGNAL(signalNetClientSpectatorLeft(unsigned, QString)), myGameLobbyDialog, SLOT(removeSpectator(unsigned, QString)));
connect(this, SIGNAL(signalNetClientNewGameAdmin(unsigned, QString)), myGameLobbyDialog, SLOT(newGameAdmin(unsigned, QString)));
connect(this, SIGNAL(signalNetClientGameListNew(unsigned)), myGameLobbyDialog, SLOT(addGame(unsigned)));
@@ -225,8 +225,8 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
connect(this, SIGNAL(signalNetClientGameListUpdateAdmin(unsigned, unsigned)), myGameLobbyDialog, SLOT(updateGameAdmin(unsigned, unsigned)));
connect(this, SIGNAL(signalNetClientGameListPlayerJoined(unsigned, unsigned)), myGameLobbyDialog, SLOT(gameAddPlayer(unsigned, unsigned)));
connect(this, SIGNAL(signalNetClientGameListPlayerLeft(unsigned, unsigned)), myGameLobbyDialog, SLOT(gameRemovePlayer(unsigned, unsigned)));
// TODO connect(this, SIGNAL(signalNetClientGameListSpectatorJoined(unsigned, unsigned)), myGameLobbyDialog, SLOT(gameAddSpectator(unsigned, unsigned)));
// TODO connect(this, SIGNAL(signalNetClientGameListSpectatorLeft(unsigned, unsigned)), myGameLobbyDialog, SLOT(gameRemoveSpectator(unsigned, unsigned)));
connect(this, SIGNAL(signalNetClientGameListSpectatorJoined(unsigned, unsigned)), myGameLobbyDialog, SLOT(gameAddSpectator(unsigned, unsigned)));
connect(this, SIGNAL(signalNetClientGameListSpectatorLeft(unsigned, unsigned)), myGameLobbyDialog, SLOT(gameRemoveSpectator(unsigned, unsigned)));
connect(this, SIGNAL(signalNetClientRemovedFromGame(int)), myGameLobbyDialog, SLOT(removedFromGame(int)));
connect(this, SIGNAL(signalNetClientStatsUpdate(ServerStats)), myGameLobbyDialog, SLOT(updateStats(ServerStats)));
@@ -320,7 +320,7 @@ void startWindowImpl::startNewLocalGame(newGameDialogImpl *v)
gameData.raiseMode = MANUAL_BLINDS_ORDER;
list<int> tempBlindList;
int i;
bool ok = TRUE;
bool ok = true;
for(i=0; i<v->getChangeCompleteBlindsDialog()->listWidget_blinds->count(); i++) {
tempBlindList.push_back(v->getChangeCompleteBlindsDialog()->listWidget_blinds->item(i)->text().toInt(&ok,10));
}
@@ -534,7 +534,7 @@ void startWindowImpl::callCreateNetworkGameDialog()
gameData.raiseMode = MANUAL_BLINDS_ORDER;
std::list<int> tempBlindList;
int i;
bool ok = TRUE;
bool ok = true;
for(i=0; i<myCreateNetworkGameDialog->getChangeCompleteBlindsDialog()->listWidget_blinds->count(); i++) {
tempBlindList.push_back(myCreateNetworkGameDialog->getChangeCompleteBlindsDialog()->listWidget_blinds->item(i)->text().toInt(&ok,10));
}
+1 -1
View File
@@ -148,7 +148,7 @@ void CardDeckStyleReader::readStyleFile(QString file)
cardsLeft << "flipside.png";
}
// set loadedSuccessfull TRUE if everything works
// set loadedSuccessfull true if everything works
if(leftItems.isEmpty() && cardsLeft.isEmpty() && PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() == POKERTH_CD_STYLE_FILE_VERSION) {
myState = CD_STYLE_OK;
} else {
+5 -5
View File
@@ -1245,7 +1245,7 @@ void GameTableStyleReader::readStyleFile(QString file)
leftItems << "ChatLogTextSize";
}
//set loadedSuccessfull TRUE if everything works
//set loadedSuccessfull true if everything works
// qDebug() << "leftitem is empty: " << leftItems.isEmpty() << "pics left is empty: " << itemPicsLeft.isEmpty() << "stylefileversion is: " << PokerTHStyleFileVersion;
if(leftItems.isEmpty() && itemPicsLeft.isEmpty() && PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() == POKERTH_GT_STYLE_FILE_VERSION) {
myState = GT_STYLE_OK;
@@ -1637,9 +1637,9 @@ void GameTableStyleReader::setWindowsGeometry(gameTableImpl *gt)
int availableWidth = dw.screenGeometry().width();
int availableHeight = dw.screenGeometry().height();
if(availableWidth == FixedWindowWidth.toInt() && availableHeight == FixedWindowHeight.toInt()) {
gt->actionFullScreen->setEnabled(TRUE);
gt->actionFullScreen->setEnabled(true);
} else {
gt->actionFullScreen->setDisabled(TRUE);
gt->actionFullScreen->setDisabled(true);
if(gt->isFullScreen()) {
gt->showNormal();
gt->move(50,50);
@@ -1656,9 +1656,9 @@ void GameTableStyleReader::setWindowsGeometry(gameTableImpl *gt)
int availableWidth = dw.screenGeometry().width();
int availableHeight = dw.screenGeometry().height();
if(availableWidth <= MaximumWindowWidth.toInt() && availableHeight <= MaximumWindowHeight.toInt()) {
gt->actionFullScreen->setEnabled(TRUE);
gt->actionFullScreen->setEnabled(true);
} else {
gt->actionFullScreen->setDisabled(TRUE);
gt->actionFullScreen->setDisabled(true);
if(gt->isFullScreen()) {
gt->showNormal();
gt->move(50,50);
@@ -34,6 +34,9 @@
#include <QMessageBox>
#include <QtGui>
#include <QtCore>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif
#include <third_party/boost/timers.hpp>
#include "game_defs.h"