diff --git a/data/gfx/gui/misc/rating.png b/data/gfx/gui/misc/rating.png new file mode 100755 index 00000000..b47a7d60 Binary files /dev/null and b/data/gfx/gui/misc/rating.png differ diff --git a/data/gfx/gui/table/default/action_set.png b/data/gfx/gui/table/default/action_set.png deleted file mode 100644 index bb655fb1..00000000 Binary files a/data/gfx/gui/table/default/action_set.png and /dev/null differ diff --git a/data/gfx/gui/table/default/defaulttablestyle.xml b/data/gfx/gui/table/default/defaulttablestyle.xml index 4eccd0f8..54dfe6b4 100644 --- a/data/gfx/gui/table/default/defaulttablestyle.xml +++ b/data/gfx/gui/table/default/defaulttablestyle.xml @@ -1,7 +1,9 @@ - + + + @@ -15,7 +17,6 @@ - diff --git a/data/gfx/gui/table/default/preview.png b/data/gfx/gui/table/default/preview.png new file mode 100644 index 00000000..6fb9ad93 Binary files /dev/null and b/data/gfx/gui/table/default/preview.png differ diff --git a/pokerth_game.pro b/pokerth_game.pro index d4cf40ad..c2b9f4cc 100644 --- a/pokerth_game.pro +++ b/pokerth_game.pro @@ -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 \ diff --git a/src/config/configfile.cpp b/src/config/configfile.cpp index 9c7cbb5f..e24d022c 100644 --- a/src/config/configfile.cpp +++ b/src/config/configfile.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(); } } diff --git a/src/config/configfile.h b/src/config/configfile.h index ff2cd534..50d29993 100644 --- a/src/config/configfile.h +++ b/src/config/configfile.h @@ -74,8 +74,6 @@ private: std::string cacheDir; std::string defaultGameTableStyle; std::string defaultCardDeck; - std::list gameTableStyleList; - std::list cardDeckList; int configRev; bool noWriteAccess; diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index c6c47bf1..8d73bf88 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -41,7 +41,7 @@ #include "configfile.h" #include "sdlplayer.h" -// #include "stylesheetreader.h" +#include "gametablestylereader.h" #include #include @@ -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); diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui index fc0a67ae..ad4d6fa4 100644 --- a/src/gui/qt/settingsdialog.ui +++ b/src/gui/qt/settingsdialog.ui @@ -1,7 +1,8 @@ - + + settingsDialog - - + + 0 0 @@ -9,163 +10,163 @@ 530 - + 785 530 - + Settings - - - + + + - - + + 190 0 - + 190 16777215 - + 32 32 - + false - + true - + Interface - - + + :/gfx/preferences-desktop.png:/gfx/preferences-desktop.png - + Style - - + + :/gfx/fill-color.png:/gfx/fill-color.png - + Sound - - + + :/gfx/speaker.png:/gfx/speaker.png - + Local Game - - + + :/gfx/swbuttonlocalgame.png:/gfx/swbuttonlocalgame.png - + Network Game - - + + :/gfx/swbuttonjoinnetworkgame.png:/gfx/swbuttonjoinnetworkgame.png - + Internet Game - - + + :/gfx/swbuttoninternetgame.png:/gfx/swbuttoninternetgame.png - + Nicks/Avatars - - + + :/gfx/system_users.png:/gfx/system_users.png - + Log Messages - - + + :/gfx/utilities-log-viewer.png:/gfx/utilities-log-viewer.png - - + + 1 - - - - - - QLabel { font-weight: bold; } + + + + + + QLabel { font-weight: bold; } - + Interface - - - + + + Qt::Horizontal - - + + - - + + Language: - + comboBox_switchLanguage - + - + Qt::Horizontal - + 40 20 @@ -175,89 +176,89 @@ - - - - - + + + + + Show intro on startup - - - + + + Show left toolbox - - - + + + Show right toolbox - - - + + + Show statusbar messages - - - + + + Show fade-out animation for non-winning cards - - - + + + Show flip-card animation - - - + + + Reverse order of F-Keys (F1 - F4) - - - + + + Show own cards only on mouse click - - - + + + Show cards chance monitor - - - + + + Show buttons for small blind and big blind - - - + + + Network / Internet Game - - - - + + + + Switch keyboard focus to bet-input-field if it's your turn @@ -265,69 +266,69 @@ - - - + + + Flipside of Cards - - + + 9 - + 0 - + 9 - + 9 - + 6 - - - + + + 0 - + 0 - - + + 2 - + 0 - - + + Own flipside picture: - - + + false - - + + false - + 27 26 - + 27 26 @@ -338,26 +339,26 @@ - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + <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> +</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> - + true - - - + + + Default - + true @@ -365,12 +366,12 @@ p, li { white-space: pre-wrap; } - + - + Qt::Vertical - + 400 111 @@ -380,49 +381,46 @@ p, li { white-space: pre-wrap; } - - - - - - QLabel { font-weight: bold; } + + + + + + QLabel { font-weight: bold; } - + Style - - - + + + Qt::Horizontal - - - + + + Game Table Styles - - - - - - + + + - - - Auswählen + + + Select - - + + Qt::Vertical - + 20 17 @@ -431,42 +429,42 @@ p, li { white-space: pre-wrap; } - - - Hinzufügen ... + + + Add ... - - - Löschen + + + Remove - - - - Vorschau: + + + + Preview: - - - - + + + + 160 120 - + 160 120 - + @@ -474,33 +472,33 @@ p, li { white-space: pre-wrap; } + + + - - - + + + Card Decks - - - - - - + + + - - - Auswählen + + + Select - - + + Qt::Vertical - + 20 17 @@ -509,42 +507,42 @@ p, li { white-space: pre-wrap; } - - - Hinzufügen ... + + + Add ... - - - Löschen + + + Remove - - - - Vorschau: + + + + Preview: - - - - + + + + 160 120 - + 160 120 - + @@ -552,117 +550,120 @@ p, li { white-space: pre-wrap; } + + + - - - - - - QLabel { font-weight: bold; } + + + + + + QLabel { font-weight: bold; } - + Sound - - - + + + Qt::Horizontal - - - + + + Play sound effects - + true - + true - - - - + + + + 6 - + 0 - - + + Sound Volume: - - + + 20 0 - + 10 - - + + 1 - + 10 - + 8 - + Qt::Horizontal - - - + + + Sound Categories - - + + 0 - - - - Play game actions sounds like "check", "call", "raise" + + + + Play game actions sounds like "check", "call", "raise" - - - + + + Play lobby chat notifications - - - - Play network/internet game notifications like "player joined the game" + + + + Play network/internet game notifications like "player joined the game" - + false @@ -673,12 +674,12 @@ p, li { white-space: pre-wrap; } - + - + Qt::Vertical - + 400 321 @@ -688,46 +689,46 @@ p, li { white-space: pre-wrap; } - - + + - - - QLabel { font-weight: bold; } + + + QLabel { font-weight: bold; } - + Local Game Settings - - + + Qt::Horizontal - + - - + + Number of players: - + spinBox_quantityPlayers - - + + 2 - + 10 - + 10 @@ -735,29 +736,29 @@ p, li { white-space: pre-wrap; } - + - - + + Start Cash: - + spinBox_startCash - - + + $ - + 1000 - + 1000000 - + 50 @@ -765,26 +766,26 @@ p, li { white-space: pre-wrap; } - + - - + + First small blind: - + spinBox_firstSmallBlind - - + + $ - + 5 - + 500 @@ -792,85 +793,85 @@ p, li { white-space: pre-wrap; } - + - - + + Raise blinds: - - + + 9 - + 0 - + 9 - - - + + + Every: - + true - - - + + + 1 - - - - + + + + 0 0 - + hands - - - + + + Every: - - - + + + 1 - - - - + + + + 0 0 - + minutes - + - + Qt::Vertical - + 20 5 @@ -882,43 +883,43 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + Raise mode: - - + + 0 - - - + + + Always double blinds - + true - - - + + + Manual blinds order: - - - + + + false - + Edit ... @@ -929,26 +930,26 @@ p, li { white-space: pre-wrap; } - + - - + + Game Speed: - + spinBox_gameSpeed - - + + 1 - + 11 - + 1 @@ -956,25 +957,25 @@ p, li { white-space: pre-wrap; } - - - Pause between hands (press "start" button to go on) + + + Pause between hands (press "start" button to go on) - - + + Show game settings dialog on every new game - + Qt::Vertical - + 437 285 @@ -984,46 +985,46 @@ p, li { white-space: pre-wrap; } - - + + - - - QLabel { font-weight: bold; } + + + QLabel { font-weight: bold; } - + Network Game Settings - - + + Qt::Horizontal - + - - + + Maximum number of players: - + spinBox_netQuantityPlayers - - + + 2 - + 10 - + 10 @@ -1031,29 +1032,29 @@ p, li { white-space: pre-wrap; } - + - - + + Start Cash: - + spinBox_netStartCash - - + + $ - + 1000 - + 1000000 - + 50 @@ -1061,26 +1062,26 @@ p, li { white-space: pre-wrap; } - + - - + + First small blind: - + spinBox_netFirstSmallBlind - - + + $ - + 5 - + 500 @@ -1088,94 +1089,94 @@ p, li { white-space: pre-wrap; } - + - - + + 16777215 105 - + Raise blinds: - - + + 6 - + 0 - + 6 - + 6 - - - + + + Every: - + true - - - + + + 1 - - - - + + + + 0 0 - + hands - - - + + + Every: - - - + + + 1 - - - - + + + + 0 0 - + minutes - + - + Qt::Vertical - + 20 10 @@ -1187,58 +1188,58 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + 16777215 105 - + Raise mode: - - + + 6 - + 0 - + 6 - + 6 - - - + + + Always double blinds - + true - - - + + + Manual blinds order: - - - + + + false - + Edit ... @@ -1249,26 +1250,26 @@ p, li { white-space: pre-wrap; } - + - - + + Game Speed for computer opponents: - + spinBox_netGameSpeed - - + + 1 - + 11 - + 1 @@ -1276,29 +1277,29 @@ p, li { white-space: pre-wrap; } - + - - + + Timeout for player action: - + spinBox_netTimeOutPlayerAction - - + + s - + 5 - + 60 - + 20 @@ -1306,99 +1307,99 @@ p, li { white-space: pre-wrap; } - - + + Network Server Settings - - + + 6 - + 0 - + 6 - + 6 - + 6 - - - + + + 60 - + QLineEdit::Password - - - + + + Server Password: - + lineEdit_serverPassword - - - + + + 80 - + 65535 - + 7234 - - - + + + Server Port: - + spinBox_serverPort - - - + + + Use SCTP - - - + + + Use IPv6 - - - - <a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a> + + + + <a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a> - + true - - - - <a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a> + + + + <a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a> - + true @@ -1407,11 +1408,11 @@ p, li { white-space: pre-wrap; } - - + + Qt::Vertical - + 20 40 @@ -1421,196 +1422,196 @@ p, li { white-space: pre-wrap; } - - - - - - QLabel { font-weight: bold; } + + + + + + QLabel { font-weight: bold; } - + Internet Game Settings - - - + + + Qt::Horizontal - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + + <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> +</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> - + true - - - + + + 300 0 - + 300 16777215 - + Internet Server - - - - + + + + Automatic Server Configuration URL - + true - - - - + + + + Serverlist Address: - - + + - - - + + + 0 116 - + Manual Server Configuration - + true - + false - - - - + + + + Server Address: - + lineEdit_InternetServerAddress - - - + + + 60 - - - + + + Server Port: - + spinBox_InternetServerPort - - - + + + 80 - + 65535 - + 7234 - - - + + + Server Password: - + lineEdit_InternetServerPassword - - - + + + QLineEdit::Password - - - + + + Avatar Server: - - + + - - - + + + Use IPv6 - - - - <a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a> + + + + <a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a> - + true - - - + + + Use SCTP - - - - <a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a> + + + + <a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a> - + true @@ -1618,111 +1619,111 @@ p, li { white-space: pre-wrap; } - - - + + + Lobby Chat (IRC) - + true - - - - + + + + Server Address: - + lineEdit_IRCServerAddress - - - + + + chat.freenode.net - + 60 - - - + + + Server Port: - + spinBox_IRCServerPort - - - - + + + + 0 0 - + 80 - + 65535 - + 6667 - - - + + + Channel: - + lineEdit_IRCChannel - - - + + + Password: - + lineEdit_IRCChannelPassword - - - + + + QLineEdit::Password - - - + + + Use IPv6 - - - - <a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a> + + + + <a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a> - + true - - - + + + #pokerth @@ -1730,12 +1731,12 @@ p, li { white-space: pre-wrap; } - - - + + + Qt::Vertical - + 20 98 @@ -1743,36 +1744,36 @@ p, li { white-space: pre-wrap; } - - - + + + 0 - - + + Use password for private game: - - + + false - + QLineEdit::Password - + - + Qt::Vertical - + 437 16 @@ -1782,36 +1783,36 @@ p, li { white-space: pre-wrap; } - - - - - - QLabel { font-weight: bold; } + + + + + + QLabel { font-weight: bold; } - + Player Nicks/Avatars - - - + + + Qt::Horizontal - - - + + + 0 - - - + + + Qt::Horizontal - + 40 20 @@ -1819,34 +1820,34 @@ p, li { white-space: pre-wrap; } - - - - + + + + 0 0 - + 200 16777215 - + Human Player: - + Qt::AlignCenter - - - + + + Qt::Horizontal - + 40 20 @@ -1854,14 +1855,14 @@ p, li { white-space: pre-wrap; } - - + + - - + + Qt::Horizontal - + 40 20 @@ -1870,23 +1871,23 @@ p, li { white-space: pre-wrap; } - - + + 60 60 - + 60 60 - + - + 50 50 @@ -1895,11 +1896,11 @@ p, li { white-space: pre-wrap; } - - + + Qt::Horizontal - + 40 20 @@ -1909,12 +1910,12 @@ p, li { white-space: pre-wrap; } - - - + + + Qt::Horizontal - + 78 20 @@ -1922,37 +1923,37 @@ p, li { white-space: pre-wrap; } - - - - + + + + 0 0 - + 100 25 - + 100 25 - + 12 - - - + + + Qt::Horizontal - + 88 20 @@ -1962,92 +1963,92 @@ p, li { white-space: pre-wrap; } - - - + + + Computer Engine - - - + + + - - + + 0 - + 0 - - - - + + + + 0 0 - + 100 25 - + 100 25 - + 12 - - - - + + + + 0 0 - + 100 0 - + 100 16777215 - + Opponent 1: - + Qt::AlignCenter - - - + + + 6 - + 0 - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2056,26 +2057,26 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + 60 60 - + 60 60 - + 50 50 @@ -2085,13 +2086,13 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2104,83 +2105,83 @@ p, li { white-space: pre-wrap; } - - + + 0 - + 0 - - - - + + + + 0 0 - + 100 25 - + 100 25 - + 12 - - - - + + + + 0 0 - + 100 0 - + 100 16777215 - + Opponent 2: - + Qt::AlignCenter - - - + + + 6 - + 0 - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2189,26 +2190,26 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + 60 60 - + 60 60 - + 50 50 @@ -2218,13 +2219,13 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2237,83 +2238,83 @@ p, li { white-space: pre-wrap; } - - + + 0 - + 0 - - - - + + + + 0 0 - + 100 0 - + 100 16777215 - + Opponent 3: - + Qt::AlignCenter - - - - + + + + 0 0 - + 100 25 - + 100 25 - + 12 - - - + + + 6 - + 0 - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2322,26 +2323,26 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + 60 60 - + 60 60 - + 50 50 @@ -2351,13 +2352,13 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2370,83 +2371,83 @@ p, li { white-space: pre-wrap; } - - + + 0 - + 0 - - - - + + + + 0 0 - + 100 25 - + 100 25 - + 12 - - - - + + + + 0 0 - + 100 0 - + 100 16777215 - + Opponent 4: - + Qt::AlignCenter - - - + + + 6 - + 0 - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2455,26 +2456,26 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + 60 60 - + 60 60 - + 50 50 @@ -2484,13 +2485,13 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2503,58 +2504,58 @@ p, li { white-space: pre-wrap; } - - + + 0 - + 0 - - - - + + + + 0 0 - + 100 0 - + 100 16777215 - + Opponent 5: - + Qt::AlignCenter - - - + + + 6 - + 0 - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2563,26 +2564,26 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + 60 60 - + 60 60 - + 50 50 @@ -2592,13 +2593,13 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2608,27 +2609,27 @@ p, li { white-space: pre-wrap; } - - - - + + + + 0 0 - + 100 25 - + 100 25 - + 12 @@ -2637,33 +2638,33 @@ p, li { white-space: pre-wrap; } - - + + - - + + 0 - + 0 - - - + + + 6 - + 0 - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2672,26 +2673,26 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + 60 60 - + 60 60 - + 50 50 @@ -2701,13 +2702,13 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2717,55 +2718,55 @@ p, li { white-space: pre-wrap; } - - - - + + + + 0 0 - + 100 25 - + 100 25 - + 12 - - - - + + + + 0 0 - + 100 0 - + 100 16777215 - + Opponent 6: - + Qt::AlignCenter @@ -2773,30 +2774,30 @@ p, li { white-space: pre-wrap; } - - + + 0 - + 0 - - - + + + 6 - + 0 - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2805,26 +2806,26 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + 60 60 - + 60 60 - + 50 50 @@ -2834,13 +2835,13 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2850,55 +2851,55 @@ p, li { white-space: pre-wrap; } - - - - + + + + 0 0 - + 100 25 - + 100 25 - + 12 - - - - + + + + 0 0 - + 100 0 - + 100 16777215 - + Opponent 7: - + Qt::AlignCenter @@ -2906,30 +2907,30 @@ p, li { white-space: pre-wrap; } - - + + 0 - + 0 - - - + + + 6 - + 0 - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2938,26 +2939,26 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + 60 60 - + 60 60 - + 50 50 @@ -2967,13 +2968,13 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -2983,55 +2984,55 @@ p, li { white-space: pre-wrap; } - - - - + + + + 0 0 - + 100 25 - + 100 25 - + 12 - - - - + + + + 0 0 - + 100 0 - + 100 16777215 - + Opponent 8: - + Qt::AlignCenter @@ -3039,30 +3040,30 @@ p, li { white-space: pre-wrap; } - - + + 0 - + 0 - - - + + + 6 - + 0 - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -3071,26 +3072,26 @@ p, li { white-space: pre-wrap; } - - - + + + 0 0 - + 60 60 - + 60 60 - + 50 50 @@ -3100,13 +3101,13 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + QSizePolicy::Fixed - + 3 20 @@ -3116,55 +3117,55 @@ p, li { white-space: pre-wrap; } - - - - + + + + 0 0 - + 100 25 - + 100 25 - + 12 - - - - + + + + 0 0 - + 100 0 - + 100 16777215 - + Opponent 10: - + Qt::AlignCenter @@ -3176,25 +3177,25 @@ p, li { white-space: pre-wrap; } - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + + <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> +</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> - + true - + - + Qt::Vertical - + 20 40 @@ -3204,59 +3205,59 @@ p, li { white-space: pre-wrap; } - - - + + + 9 - + 6 - - - + + + Enable/Disable Logging - + true - + true - - - - + + + + Log File Directory: - + lineEdit_logDir - - - + + + 2 - + - - + + 27 26 - + 27 26 - + ../../../../../../.designer/backup../../../../../../.designer/backup @@ -3264,65 +3265,65 @@ p, li { white-space: pre-wrap; } - - - + + + Store log files for - + spinBox_logStoreDuration - - - + + + Day(s) - + 1 - + 7 - + 2 - - - + + + Write log after every: - + false - + comboBox_logInterval - - - - + + + + 0 0 - + action (high frequent disc access) - + hand (medium disc access) - + game (low disc access) @@ -3331,29 +3332,29 @@ p, li { white-space: pre-wrap; } - - - - QLabel { font-weight: bold; } + + + + QLabel { font-weight: bold; } - + Log Messages - - - + + + Qt::Horizontal - + - + Qt::Vertical - + 20 40 @@ -3367,19 +3368,19 @@ p, li { white-space: pre-wrap; } - - - + + + Qt::Horizontal - - - + + + Qt::Horizontal - + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -3478,7 +3479,7 @@ p, li { white-space: pre-wrap; } buttonBox - + @@ -3487,11 +3488,11 @@ p, li { white-space: pre-wrap; } stackedWidget setCurrentIndex(int) - + 127 60 - + 281 85 @@ -3503,11 +3504,11 @@ p, li { white-space: pre-wrap; } lineEdit_OwnFlipsideFilename setEnabled(bool) - + 360 373 - + 723 374 @@ -3519,11 +3520,11 @@ p, li { white-space: pre-wrap; } pushButton_openFlipsidePicture setEnabled(bool) - + 360 373 - + 752 375 @@ -3535,11 +3536,11 @@ p, li { white-space: pre-wrap; } settingsDialog reject() - + 595 520 - + 599 497 @@ -3551,11 +3552,11 @@ p, li { white-space: pre-wrap; } lineEdit_InternetGamePassword setEnabled(bool) - + 411 443 - + 717 444 @@ -3567,11 +3568,11 @@ p, li { white-space: pre-wrap; } label_soundVolume setNum(int) - + 648 98 - + 336 99 @@ -3583,11 +3584,11 @@ p, li { white-space: pre-wrap; } pushButton_editManualBlindsOrder setEnabled(bool) - + 753 220 - + 753 256 @@ -3599,11 +3600,11 @@ p, li { white-space: pre-wrap; } pushButton_netEditManualBlindsOrder setEnabled(bool) - + 756 218 - + 756 245 @@ -3615,11 +3616,11 @@ p, li { white-space: pre-wrap; } lineEdit_avatarServerAddress setEnabled(bool) - + 314 318 - + 366 320 diff --git a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp index d77018db..da19f754 100644 --- a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp +++ b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp @@ -19,6 +19,7 @@ ***************************************************************************/ #include "settingsdialogimpl.h" #include "myavatarlistitem.h" +#include "gametablestylereader.h" #include "configfile.h" #include @@ -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")); diff --git a/src/gui/qt/styles/gametablestylereader.cpp b/src/gui/qt/styles/gametablestylereader.cpp new file mode 100644 index 00000000..5580106d --- /dev/null +++ b/src/gui/qt/styles/gametablestylereader.cpp @@ -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 +#include +#include +#include + + +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); +} + diff --git a/src/gui/qt/styles/gametablestylereader.h b/src/gui/qt/styles/gametablestylereader.h new file mode 100644 index 00000000..e44ae146 --- /dev/null +++ b/src/gui/qt/styles/gametablestylereader.h @@ -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 +#include +#include + +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