next steps skinning implementation (TESTING!!!)
This commit is contained in:
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 665 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,7 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<PokerTH>
|
||||
<TableStyle>
|
||||
<StyleDescription value="default table style" />
|
||||
<StyleDescription value="PokerTH default table style" />
|
||||
<StyleMaintainerEMail value="webmaster@pokerth.net" />
|
||||
<Preview value="preview.png" />
|
||||
<IfFixedWindowSize value="0" />
|
||||
<FixedWindowWidth value="1024" />
|
||||
<FixedWindowHeight value="600" />
|
||||
@@ -15,7 +17,6 @@
|
||||
<ActionCall value="action_call.png" />
|
||||
<ActionCheck value="action_check.png" />
|
||||
<ActionFold value="action_fold.png" />
|
||||
<ActionSet value="action_set.png" />
|
||||
<ActionWinner value="action_winner.png" />
|
||||
<BigBlindPuck value="bigblindPuck.png" />
|
||||
<SmallBlindPuck value="smallblindPuck.png" />
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -52,6 +52,7 @@ INCLUDEPATH += . \
|
||||
src/gui/qt/settingsdialog/manualblindsorderdialog \
|
||||
src/gui/qt/startnetworkgamedialog \
|
||||
src/gui/qt/startwindow \
|
||||
src/gui/qt/styles \
|
||||
src/gui/qt/changehumanplayernamedialog \
|
||||
src/gui/qt/changecompleteblindsdialog \
|
||||
src/gui/qt/mymessagedialog \
|
||||
@@ -91,6 +92,7 @@ DEPENDPATH += . \
|
||||
src/gui/qt/settingsdialog/manualblindsorderdialog \
|
||||
src/gui/qt/startnetworkgamedialog \
|
||||
src/gui/qt/startwindow \
|
||||
src/gui/qt/styles \
|
||||
src/gui/qt/changehumanplayernamedialog \
|
||||
src/gui/qt/changecompleteblindsdialog \
|
||||
src/gui/qt/mymessagedialog \
|
||||
@@ -175,6 +177,7 @@ HEADERS += \
|
||||
src/gui/qt/settingsdialog/manualblindsorderdialog/manualblindsorderdialogimpl.h \
|
||||
src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.h \
|
||||
src/gui/qt/startwindow/startwindowimpl.h \
|
||||
src/gui/qt/styles/gametablestylereader.h \
|
||||
src/gui/qt/changehumanplayernamedialog/changehumanplayernamedialogimpl.h \
|
||||
src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.h \
|
||||
src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h \
|
||||
@@ -238,6 +241,7 @@ SOURCES += \
|
||||
src/gui/qt/settingsdialog/manualblindsorderdialog/manualblindsorderdialogimpl.cpp \
|
||||
src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp \
|
||||
src/gui/qt/startwindow/startwindowimpl.cpp \
|
||||
src/gui/qt/styles/gametablestylereader.cpp \
|
||||
src/gui/qt/changehumanplayernamedialog/changehumanplayernamedialogimpl.cpp \
|
||||
src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.cpp \
|
||||
src/gui/qt/mymessagedialog/mymessagedialogimpl.cpp \
|
||||
|
||||
@@ -102,12 +102,6 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
mkdir(dataDir.c_str());
|
||||
mkdir(cacheDir.c_str());
|
||||
|
||||
////define GameTableStyle
|
||||
defaultGameTableStyle = myQtToolsInterface->getDataPathStdString(myArgv0)+"gfx\\gui\\table\\default\\defaulttablestyle.xml";
|
||||
gameTableStyleList.push_back(defaultGameTableStyle);
|
||||
////define CardDeck
|
||||
defaultCardDeck = myQtToolsInterface->getDataPathStdString(myArgv0)+"gfx\\cards\\default\\defaultcarddeck.xml";
|
||||
cardDeckList.push_back(defaultCardDeck);
|
||||
#else
|
||||
//define app-dir
|
||||
const char *homePath = getenv("HOME");
|
||||
@@ -130,12 +124,6 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
mkdir(cacheDir.c_str(), MODUS);
|
||||
}
|
||||
|
||||
////define GameTableStyle
|
||||
defaultGameTableStyle = myQtToolsInterface->getDataPathStdString(myArgv0)+"gfx/gui/table/default/defaulttablestyle.xml";
|
||||
gameTableStyleList.push_back(defaultGameTableStyle);
|
||||
////define CardDeck
|
||||
defaultCardDeck = myQtToolsInterface->getDataPathStdString(myArgv0)+"gfx/cards/default/defaultcarddeck.xml";
|
||||
cardDeckList.push_back(defaultCardDeck);
|
||||
#endif
|
||||
|
||||
ostringstream tempIntToString;
|
||||
@@ -158,10 +146,10 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
configList.push_back(ConfigInfo("FlipsideTux", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("FlipsideOwn", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("FlipsideOwnFile", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("GameTableStylesList", CONFIG_TYPE_STRING_LIST, "GameTableStyles", gameTableStyleList));
|
||||
configList.push_back(ConfigInfo("CurrentGameTableStyle", CONFIG_TYPE_STRING, defaultGameTableStyle));
|
||||
configList.push_back(ConfigInfo("CardDecksList", CONFIG_TYPE_STRING_LIST, "CardDecks", cardDeckList));
|
||||
configList.push_back(ConfigInfo("CurrentCardDeck", CONFIG_TYPE_STRING, defaultCardDeck));
|
||||
configList.push_back(ConfigInfo("GameTableStylesList", CONFIG_TYPE_STRING_LIST, "GameTableStyles"));
|
||||
configList.push_back(ConfigInfo("CurrentGameTableStyle", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("CardDecksList", CONFIG_TYPE_STRING_LIST, "CardDecks"));
|
||||
configList.push_back(ConfigInfo("CurrentCardDeck", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("PlaySoundEffects", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("SoundVolume", CONFIG_TYPE_INT, "8"));
|
||||
configList.push_back(ConfigInfo("PlayGameActions", CONFIG_TYPE_INT, "1"));
|
||||
@@ -298,7 +286,6 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fillBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,8 +74,6 @@ private:
|
||||
std::string cacheDir;
|
||||
std::string defaultGameTableStyle;
|
||||
std::string defaultCardDeck;
|
||||
std::list<std::string> gameTableStyleList;
|
||||
std::list<std::string> cardDeckList;
|
||||
|
||||
int configRev;
|
||||
bool noWriteAccess;
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include "configfile.h"
|
||||
#include "sdlplayer.h"
|
||||
// #include "stylesheetreader.h"
|
||||
#include "gametablestylereader.h"
|
||||
|
||||
#include <gamedata.h>
|
||||
#include <generic/serverguiwrapper.h>
|
||||
@@ -75,8 +75,9 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
|
||||
//Sound
|
||||
mySDLPlayer = new SDLPlayer(myConfig);
|
||||
|
||||
//styleSheetReader
|
||||
// myStyleSheetReader = new StyleSheetReader(QString(myAppDataPath+"gfx/stylesheet.xml").toStdString());
|
||||
// gameTableStyleReader
|
||||
GameTableStyleReader myGameTableStyleReader(myConfig, this);
|
||||
myGameTableStyleReader.readStyleFile(QString::fromUtf8(myConfig->readConfigString("CurrentGameTableStyle").c_str()));
|
||||
|
||||
//Player0 pixmapCardsLabel needs Myw
|
||||
pixmapLabel_card0b->setMyW(this);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>settingsDialog</class>
|
||||
<widget class="QDialog" name="settingsDialog">
|
||||
@@ -340,10 +341,10 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="text">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style="font-weight:400; font-style:normal; text-decoration:none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Best quality with image ratio like </span><span style=" font-weight:600; font-style:italic;">width=100, height=140.</span></p></body></html></string>
|
||||
</style></head><body style="font-weight:400; font-style:normal; text-decoration:none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Best quality with image ratio like </span><span style=" font-weight:600; font-style:italic;">width=100, height=140.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -405,15 +406,12 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Game Table Styles</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_13">
|
||||
<item row="0" column="0" >
|
||||
<widget class="QListView" name="listView" />
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_selectGameTableStyle">
|
||||
<property name="text">
|
||||
<string>Auswählen</string>
|
||||
<string>Select</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -433,14 +431,14 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_addGameTableStyle">
|
||||
<property name="text">
|
||||
<string>Hinzufügen ...</string>
|
||||
<string>Add ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_delGameTableStyle">
|
||||
<property name="text">
|
||||
<string>Löschen</string>
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -449,7 +447,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="2">
|
||||
<widget class="QGroupBox" name="groupBox_13">
|
||||
<property name="title">
|
||||
<string>Vorschau:</string>
|
||||
<string>Preview:</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_15">
|
||||
<item row="0" column="0">
|
||||
@@ -474,6 +472,9 @@ p, li { white-space: pre-wrap; }
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QListWidget" name="listWidget_gameTableStyles"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -483,15 +484,12 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Card Decks</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_14">
|
||||
<item row="0" column="0" >
|
||||
<widget class="QListView" name="listView_2" />
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_selectCardDeck">
|
||||
<property name="text">
|
||||
<string>Auswählen</string>
|
||||
<string>Select</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -511,14 +509,14 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_addCardDeck">
|
||||
<property name="text">
|
||||
<string>Hinzufügen ...</string>
|
||||
<string>Add ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_delCardDeck">
|
||||
<property name="text">
|
||||
<string>Löschen</string>
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -527,7 +525,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="2">
|
||||
<widget class="QGroupBox" name="groupBox_14">
|
||||
<property name="title">
|
||||
<string>Vorschau:</string>
|
||||
<string>Preview:</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_16">
|
||||
<item row="0" column="0">
|
||||
@@ -552,6 +550,9 @@ p, li { white-space: pre-wrap; }
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QListWidget" name="listWidget_2"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -646,7 +647,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_playGameActions">
|
||||
<property name="text">
|
||||
<string>Play game actions sounds like "check", "call", "raise"</string>
|
||||
<string>Play game actions sounds like "check", "call", "raise"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -660,7 +661,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_playNetworkGameNotification">
|
||||
<property name="text">
|
||||
<string>Play network/internet game notifications like "player joined the game"</string>
|
||||
<string>Play network/internet game notifications like "player joined the game"</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
@@ -828,7 +829,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_47">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -855,7 +856,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_50">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -884,7 +885,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -958,7 +959,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_pauseBetweenHands">
|
||||
<property name="text">
|
||||
<string>Pause between hands (press "start" button to go on)</string>
|
||||
<string>Pause between hands (press "start" button to go on)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1133,7 +1134,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_51">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -1160,7 +1161,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_52">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -1189,7 +1190,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -1386,7 +1387,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="text">
|
||||
<string><a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a></string>
|
||||
<string><a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
@@ -1396,7 +1397,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_24">
|
||||
<property name="text">
|
||||
<string><a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a></string>
|
||||
<string><a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
@@ -1443,17 +1444,17 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_43">
|
||||
<property name="text">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style="font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Default </span><span style=" font-weight:600; font-style:italic;">Game Settings</span><span style=" font-style:italic;"> like "Maximum number of players", "Start Cash" and "Small Blind" will be used </span><span style=" font-weight:600; font-style:italic;">from Network Game Settings.</span></p></body></html></string>
|
||||
</style></head><body style="font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Default </span><span style=" font-weight:600; font-style:italic;">Game Settings</span><span style=" font-style:italic;"> like "Maximum number of players", "Start Cash" and "Small Blind" will be used </span><span style=" font-weight:600; font-style:italic;">from Network Game Settings.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="3" column="0" >
|
||||
<item row="3" column="0" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -1591,7 +1592,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_32">
|
||||
<property name="text">
|
||||
<string><a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a></string>
|
||||
<string><a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
@@ -1608,7 +1609,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_42">
|
||||
<property name="text">
|
||||
<string><a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a></string>
|
||||
<string><a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
@@ -1660,7 +1661,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_IRCServerPort">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -1713,7 +1714,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_45">
|
||||
<property name="text">
|
||||
<string><a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a></string>
|
||||
<string><a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
@@ -1822,7 +1823,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="1" colspan="3">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -1925,7 +1926,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="lineEdit_HumanPlayerName">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -1981,7 +1982,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent1Name">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2006,7 +2007,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2058,7 +2059,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="MyAvatarButton" name="pushButton_Opponent1Avatar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Ignored" hsizetype="Ignored" >
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2114,7 +2115,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent2Name">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2139,7 +2140,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2191,7 +2192,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="MyAvatarButton" name="pushButton_Opponent2Avatar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Ignored" hsizetype="Ignored" >
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2247,7 +2248,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2275,7 +2276,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent3Name">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2324,7 +2325,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="MyAvatarButton" name="pushButton_Opponent3Avatar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Ignored" hsizetype="Ignored" >
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2380,7 +2381,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent4Name">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2405,7 +2406,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2457,7 +2458,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="MyAvatarButton" name="pushButton_Opponent4Avatar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Ignored" hsizetype="Ignored" >
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2513,7 +2514,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2565,7 +2566,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="MyAvatarButton" name="pushButton_Opponent5Avatar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Ignored" hsizetype="Ignored" >
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2611,7 +2612,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent5Name">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2674,7 +2675,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="MyAvatarButton" name="pushButton_Opponent6Avatar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Ignored" hsizetype="Ignored" >
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2720,7 +2721,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent6Name">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2745,7 +2746,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2807,7 +2808,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="MyAvatarButton" name="pushButton_Opponent7Avatar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Ignored" hsizetype="Ignored" >
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2853,7 +2854,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent7Name">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2878,7 +2879,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_33">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2940,7 +2941,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="MyAvatarButton" name="pushButton_Opponent8Avatar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Ignored" hsizetype="Ignored" >
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -2986,7 +2987,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent8Name">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -3011,7 +3012,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_53">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -3073,7 +3074,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="MyAvatarButton" name="pushButton_Opponent9Avatar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Ignored" hsizetype="Ignored" >
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -3119,7 +3120,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent9Name">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -3144,7 +3145,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_54">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -3179,10 +3180,10 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_38">
|
||||
<property name="text">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style="font-weight:400; font-style:normal; text-decoration:none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Best avatar quality with image ratio like </span><span style=" font-weight:600; font-style:italic;">width=50, height=50.</span></p></body></html></string>
|
||||
</style></head><body style="font-weight:400; font-style:normal; text-decoration:none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Best avatar quality with image ratio like </span><span style=" font-weight:600; font-style:italic;">width=50, height=50.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -3306,7 +3307,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboBox_logInterval">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
***************************************************************************/
|
||||
#include "settingsdialogimpl.h"
|
||||
#include "myavatarlistitem.h"
|
||||
#include "gametablestylereader.h"
|
||||
|
||||
#include "configfile.h"
|
||||
#include <net/socket_startup.h>
|
||||
@@ -225,6 +226,29 @@ void settingsDialogImpl::exec() {
|
||||
}
|
||||
lineEdit_OwnFlipsideFilename->setText(QString::fromUtf8(myConfig->readConfigString("FlipsideOwnFile").c_str()));
|
||||
|
||||
//S t y l e
|
||||
// define PokerTH default GameTableStyle
|
||||
// GameTableStyleReader defaultStyle(myConfig);
|
||||
// defaultStyle.readStyleFile(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"/gfx/gui/table/default/defaulttablestyle.xml");
|
||||
//
|
||||
// QListWidgetItem *defaultItem = new QListWidgetItem(defaultStyle.getStyleDescription(),listWidget_gameTableStyles);
|
||||
// defaultItem->setData(15, QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"/gfx/gui/table/default/defaulttablestyle.xml");
|
||||
// defaultItem->setIcon(QIcon(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"/gfx/gui/misc/rating.png"));
|
||||
|
||||
//load secondary styles into list
|
||||
|
||||
|
||||
//show selected gametablestyles preview
|
||||
// QFileInfo info(defaultGameTableStyleFile);
|
||||
// QPixmap preview(info.absolutePath()+"/"+defaultStyle.getPreview());
|
||||
// if(preview.height() > 160 || preview.width() > 120) label_gameTableStylePreview->setPixmap(preview.scaled(160,120,Qt::KeepAspectRatio,Qt::SmoothTransformation));
|
||||
// else label_gameTableStylePreview->setPixmap(preview);
|
||||
|
||||
|
||||
//define PokerTH default CardDeck
|
||||
// defaultCardDeck = myQtToolsInterface->getDataPathStdString(myArgv0)+"gfx/cards/default/defaultcarddeck.xml";
|
||||
|
||||
|
||||
//Sound
|
||||
groupBox_playSoundEffects->setChecked(myConfig->readConfigInt("PlaySoundEffects"));
|
||||
horizontalSlider_soundVolume->setValue(myConfig->readConfigInt("SoundVolume"));
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2006 by Felix Hammer *
|
||||
* f.hammer@web.de *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#include "gametablestylereader.h"
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
GameTableStyleReader::GameTableStyleReader(ConfigFile *c, gameTableImpl *w) : myConfig(c), myW(w)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
GameTableStyleReader::~GameTableStyleReader()
|
||||
{
|
||||
}
|
||||
|
||||
void GameTableStyleReader::readStyleFile(QString file) {
|
||||
|
||||
string tinyFileName;
|
||||
|
||||
//if style file failed --> default style fallback
|
||||
if(QFile(file).exists()) {
|
||||
currentFileName = QFile(file).fileName();
|
||||
tinyFileName = currentFileName.toStdString();
|
||||
|
||||
QMessageBox::warning(myW, tr("WORKS"),
|
||||
currentFileName,
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
else {
|
||||
currentFileName = QFile(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"/gfx/gui/table/default/defaulttablestyle.xml").fileName();
|
||||
tinyFileName = currentFileName.toStdString();
|
||||
QMessageBox::warning(myW, tr("FALLBACK"),
|
||||
currentFileName,
|
||||
QMessageBox::Ok);
|
||||
|
||||
}
|
||||
QFileInfo info(currentFileName);
|
||||
currentFileDir = info.absolutePath();
|
||||
|
||||
//start reading the file and fill vars
|
||||
string tempString1("");
|
||||
TiXmlDocument doc(tinyFileName);
|
||||
|
||||
if(doc.LoadFile()) {
|
||||
TiXmlHandle docHandle( &doc );
|
||||
|
||||
TiXmlElement* itemsList = docHandle.FirstChild( "PokerTH" ).FirstChild( "TableStyle" ).FirstChild().ToElement();
|
||||
for( ; itemsList; itemsList=itemsList->NextSiblingElement()) {
|
||||
const char *tmpStr1 = itemsList->Attribute("value");
|
||||
if (tmpStr1) {
|
||||
tempString1 = tmpStr1;
|
||||
|
||||
if(itemsList->ValueStr() == "StyleDescription") { StyleDescription = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if(itemsList->ValueStr() == "StyleMaintainerEMail") { StyleMaintainerEMail = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "Preview") { Preview = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "IfFixedWindowSize") { IfFixedWindowSize = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "FixedWindowWidth") { FixedWindowWidth = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "FixedWindowHeight") { FixedWindowHeight = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "MinimumWindowWidth") { MinimumWindowWidth = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "MinimumWindowHeight") { MinimumWindowHeight = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "MaximumWindowWidth") { MaximumWindowWidth = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "MaximumWindowHeight") { MaximumWindowHeight = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "ActionAllIn") { ActionAllIn = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "ActionRaise") { ActionRaise = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "ActionBet") { ActionBet = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "ActionCall") { ActionCall = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "ActionCheck") { ActionCheck = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "ActionFold") { ActionFold = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "ActionWinner") { ActionWinner = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "BigBlindPuck") { BigBlindPuck = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "SmallBlindPuck") { SmallBlindPuck = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "DealerPuck") { DealerPuck = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "DefaultAvatar") { DefaultAvatar = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "CardHolderFlop") { CardHolderFlop = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "CardHolderTurn") { CardHolderTurn = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "CardHolderRiver") { CardHolderRiver = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "FoldButtonDefault") { FoldButtonDefault = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "FoldButtonHover") { FoldButtonHover = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "FoldButtonChecked") { FoldButtonChecked = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "FoldButtonCheckedHover") { FoldButtonCheckedHover = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "CheckCallButtonDefault") { CheckCallButtonDefault = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "CheckCallButtonHover") { CheckCallButtonHover = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "CheckCallButtonChecked") { CheckCallButtonChecked = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "CheckCallButtonCheckedHover") { CheckCallButtonCheckedHover = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "BetRaiseButtonDefault") { BetRaiseButtonDefault = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "BetRaiseButtonHover") { BetRaiseButtonHover = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "BetRaiseButtonChecked") { BetRaiseButtonChecked = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "BetRaiseButtonCheckedHover") { BetRaiseButtonCheckedHover = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "AllInButtonDefault") { AllInButtonDefault = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "AllInButtonHover") { AllInButtonHover = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "AllInButtonChecked") { AllInButtonChecked = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "AllInButtonCheckedHover") { AllInButtonCheckedHover = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "PlayerSeatInActive") { PlayerSeatInActive = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "PlayerSeatActive") { PlayerSeatActive = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "Table") { Table = QString::fromUtf8(tempString1.c_str()); }
|
||||
|
||||
// std::cout << "ÖLP" << itemsList->ValueStr() <<"§4s"<< itemsList->ValueStr()<<"§89"<< endl;
|
||||
}
|
||||
}
|
||||
wrongItems.clear();
|
||||
|
||||
if(IfFixedWindowSize == "") { wrongItems << "IfFixedWindowSize"; }
|
||||
if(FixedWindowWidth == "") { wrongItems << "FixedWindowWidth"; }
|
||||
if(FixedWindowHeight == "") { wrongItems << "FixedWindowHeight"; }
|
||||
if(MinimumWindowWidth == "") { wrongItems << "MinimumWindowWidth"; }
|
||||
if(MinimumWindowHeight == "") { wrongItems << "MinimumWindowHeight"; }
|
||||
if(MaximumWindowWidth == "") { wrongItems << "MaximumWindowWidth"; }
|
||||
if(MaximumWindowHeight == "") { wrongItems << "MaximumWindowHeight"; }
|
||||
if(ActionAllIn == "") { wrongItems << "ActionAllIn"; }
|
||||
if(ActionRaise == "") { wrongItems << "ActionRaise"; }
|
||||
if(ActionBet == "") { wrongItems << "ActionBet"; }
|
||||
if(ActionCall == "") { wrongItems << "ActionCall"; }
|
||||
if(ActionCheck == "") { wrongItems << "ActionCheck"; }
|
||||
if(ActionFold == "") { wrongItems << "ActionFold"; }
|
||||
if(ActionWinner == "") { wrongItems << "ActionWinner"; }
|
||||
if(BigBlindPuck == "") { wrongItems << "BigBlindPuck"; }
|
||||
if(SmallBlindPuck == "") { wrongItems << "SmallBlindPuck"; }
|
||||
if(DealerPuck == "") { wrongItems << "DealerPuck"; }
|
||||
if(DefaultAvatar == "") { wrongItems << "DefaultAvatar"; }
|
||||
if(CardHolderFlop == "") { wrongItems << "CardHolderFlop"; }
|
||||
if(CardHolderTurn == "") { wrongItems << "CardHolderTurn"; }
|
||||
if(CardHolderRiver == "") { wrongItems << "CardHolderRiver"; }
|
||||
if(FoldButtonDefault == "") { wrongItems << "FoldButtonDefault"; }
|
||||
if(FoldButtonHover == "") { wrongItems << "FoldButtonHover"; }
|
||||
if(FoldButtonChecked == "") { wrongItems << "FoldButtonChecked"; }
|
||||
if(FoldButtonCheckedHover == "") { wrongItems << "FoldButtonCheckedHover"; }
|
||||
if(CheckCallButtonDefault == "") { wrongItems << "CheckCallButtonDefault"; }
|
||||
if(CheckCallButtonHover == "") { wrongItems << "CheckCallButtonHover"; }
|
||||
if(CheckCallButtonChecked == "") { wrongItems << "CheckCallButtonChecked"; }
|
||||
if(CheckCallButtonCheckedHover == "") { wrongItems << "CheckCallButtonCheckedHover"; }
|
||||
if(BetRaiseButtonDefault == "") { wrongItems << "BetRaiseButtonDefault"; }
|
||||
if(BetRaiseButtonHover == "") { wrongItems << "BetRaiseButtonHover"; }
|
||||
if(BetRaiseButtonChecked == "") { wrongItems << "BetRaiseButtonChecked"; }
|
||||
if(BetRaiseButtonCheckedHover == "") { wrongItems << "BetRaiseButtonCheckedHover"; }
|
||||
if(AllInButtonDefault == "") { wrongItems << "AllInButtonDefault"; }
|
||||
if(AllInButtonHover == "") { wrongItems << "AllInButtonHover"; }
|
||||
if(AllInButtonChecked == "") { wrongItems << "AllInButtonChecked"; }
|
||||
if(AllInButtonCheckedHover == "") { wrongItems << "AllInButtonCheckedHover"; }
|
||||
if(PlayerSeatActive == "") { wrongItems << "PlayerSeatActive"; }
|
||||
if(PlayerSeatInActive == "") { wrongItems << "PlayerSeatInActive"; }
|
||||
if(Table == "") { wrongItems << "Table"; }
|
||||
|
||||
//if one or more items are wrong or left show detailed error message
|
||||
if(!wrongItems.isEmpty() && myW != 0) showErrorMessage(StyleDescription, wrongItems, StyleMaintainerEMail);
|
||||
}
|
||||
}
|
||||
|
||||
void GameTableStyleReader::showErrorMessage(QString style, QStringList failedItems, QString email)
|
||||
{
|
||||
QString items = failedItems.join(", ");
|
||||
|
||||
QMessageBox::warning(myW, tr("Game Table Style Error"),
|
||||
tr("Selected game table style \"%1\" seems to be incomplete or defective. \nThe value of \"%2\" is wrong or left. Please contact the style builder %3.").arg(style).arg(items).arg(email),
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Felix Hammer *
|
||||
* f.hammer@web.de *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#ifndef GAMETABLESTYLEREADER_H
|
||||
#define GAMETABLESTYLEREADER_H
|
||||
|
||||
#include "tinyxml.h"
|
||||
#include "gametableimpl.h"
|
||||
#include "configfile.h"
|
||||
#include <string>
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
|
||||
class GameTableStyleReader : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
GameTableStyleReader(ConfigFile *c, gameTableImpl *w =0 );
|
||||
~GameTableStyleReader();
|
||||
|
||||
void readStyleFile(QString);
|
||||
|
||||
void showErrorMessage(QString, QStringList, QString);
|
||||
|
||||
QString getStyleDescription() const { return StyleDescription; }
|
||||
QString getPreview() const { return Preview; }
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
QString StyleDescription;
|
||||
QString StyleMaintainerEMail;
|
||||
QString Preview;
|
||||
QString IfFixedWindowSize;
|
||||
QString FixedWindowWidth;
|
||||
QString FixedWindowHeight;
|
||||
QString MinimumWindowWidth;
|
||||
QString MinimumWindowHeight;
|
||||
QString MaximumWindowWidth;
|
||||
QString MaximumWindowHeight;
|
||||
QString ActionAllIn;
|
||||
QString ActionRaise;
|
||||
QString ActionBet;
|
||||
QString ActionCall;
|
||||
QString ActionCheck;
|
||||
QString ActionFold;
|
||||
QString ActionWinner;
|
||||
QString BigBlindPuck;
|
||||
QString SmallBlindPuck;
|
||||
QString DealerPuck;
|
||||
QString DefaultAvatar;
|
||||
QString CardHolderFlop;
|
||||
QString CardHolderTurn;
|
||||
QString CardHolderRiver;
|
||||
QString FoldButtonDefault;
|
||||
QString FoldButtonHover;
|
||||
QString FoldButtonChecked;
|
||||
QString FoldButtonCheckedHover;
|
||||
QString CheckCallButtonDefault;
|
||||
QString CheckCallButtonHover;
|
||||
QString CheckCallButtonChecked;
|
||||
QString CheckCallButtonCheckedHover;
|
||||
QString BetRaiseButtonDefault;
|
||||
QString BetRaiseButtonHover;
|
||||
QString BetRaiseButtonChecked;
|
||||
QString BetRaiseButtonCheckedHover;
|
||||
QString AllInButtonDefault;
|
||||
QString AllInButtonHover;
|
||||
QString AllInButtonChecked;
|
||||
QString AllInButtonCheckedHover;
|
||||
QString PlayerSeatInActive;
|
||||
QString PlayerSeatActive;
|
||||
QString Table;
|
||||
|
||||
QString currentFileName;
|
||||
QString currentFileDir;
|
||||
|
||||
QStringList wrongItems;
|
||||
|
||||
ConfigFile *myConfig;
|
||||
gameTableImpl *myW;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user