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);
|
||||
|
||||
+1111
-1110
File diff suppressed because it is too large
Load Diff
@@ -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