Reformatting code using Kernighan & Ritchie style, tabs, tab width=4.
Command line: astyle --style=kr --indent=force-tab=4 --lineend=linux -n -r <file names>
This commit is contained in:
@@ -28,7 +28,7 @@ using namespace std;
|
||||
|
||||
CardDeckStyleReader::CardDeckStyleReader(ConfigFile *c, QWidget *w) : myConfig(c), myW(w), fallBack(0), loadedSuccessfull(0)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ CardDeckStyleReader::~CardDeckStyleReader()
|
||||
{
|
||||
}
|
||||
|
||||
void CardDeckStyleReader::readStyleFile(QString file) {
|
||||
void CardDeckStyleReader::readStyleFile(QString file)
|
||||
{
|
||||
|
||||
//if style file failed --> default style fallback
|
||||
if(QFile(file).exists()) {
|
||||
if(QFile(file).exists()) {
|
||||
currentFileName = file;
|
||||
}
|
||||
else {
|
||||
currentFileName = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/cards/default/defaultdeckstyle.xml";
|
||||
} else {
|
||||
currentFileName = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/cards/default/defaultdeckstyle.xml";
|
||||
fallBack = 1;
|
||||
}
|
||||
|
||||
@@ -54,106 +54,121 @@ void CardDeckStyleReader::readStyleFile(QString file) {
|
||||
QFileInfo info(currentFileName);
|
||||
currentDir = info.absolutePath()+"/";
|
||||
|
||||
//start reading the file and fill vars
|
||||
//start reading the file and fill vars
|
||||
string tempString1("");
|
||||
|
||||
TiXmlDocument doc;
|
||||
TiXmlDocument doc;
|
||||
doc.Parse(fileContent.constData());
|
||||
|
||||
if(doc.RootElement()) {
|
||||
TiXmlHandle docHandle( &doc );
|
||||
TiXmlHandle docHandle( &doc );
|
||||
|
||||
TiXmlElement *GameTableElement = docHandle.FirstChild( "PokerTH" ).FirstChild( "TableStyle" ).ToElement();
|
||||
if(GameTableElement) {
|
||||
QMessageBox::warning(myW, tr("Card Deck Style Error"),
|
||||
tr("A game table style was selected instead of a card deck style.\nPlease select a card deck style and try again!"),
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
else {
|
||||
TiXmlElement *GameTableElement = docHandle.FirstChild( "PokerTH" ).FirstChild( "TableStyle" ).ToElement();
|
||||
if(GameTableElement) {
|
||||
QMessageBox::warning(myW, tr("Card Deck Style Error"),
|
||||
tr("A game table style was selected instead of a card deck style.\nPlease select a card deck style and try again!"),
|
||||
QMessageBox::Ok);
|
||||
} else {
|
||||
|
||||
TiXmlElement* itemsList = docHandle.FirstChild( "PokerTH" ).FirstChild( "CardDeck" ).FirstChild().ToElement();
|
||||
for( ; itemsList; itemsList=itemsList->NextSiblingElement()) {
|
||||
const char *tmpStr1 = itemsList->Attribute("value");
|
||||
if (tmpStr1) {
|
||||
tempString1 = tmpStr1;
|
||||
TiXmlElement* itemsList = docHandle.FirstChild( "PokerTH" ).FirstChild( "CardDeck" ).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() == "StyleMaintainerName") { StyleMaintainerName = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if(itemsList->ValueStr() == "StyleMaintainerEMail") { StyleMaintainerEMail = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if(itemsList->ValueStr() == "StyleCreateDate") { StyleCreateDate = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if(itemsList->ValueStr() == "PokerTHStyleFileVersion") { PokerTHStyleFileVersion = QString::fromUtf8(tempString1.c_str()); }
|
||||
else if (itemsList->ValueStr() == "Preview") { Preview = currentDir+QString::fromUtf8(tempString1.c_str()); }
|
||||
}
|
||||
}
|
||||
//check if style items are left and show warning
|
||||
leftItems.clear();
|
||||
if(itemsList->ValueStr() == "StyleDescription") {
|
||||
StyleDescription = QString::fromUtf8(tempString1.c_str());
|
||||
} else if(itemsList->ValueStr() == "StyleMaintainerName") {
|
||||
StyleMaintainerName = QString::fromUtf8(tempString1.c_str());
|
||||
} else if(itemsList->ValueStr() == "StyleMaintainerEMail") {
|
||||
StyleMaintainerEMail = QString::fromUtf8(tempString1.c_str());
|
||||
} else if(itemsList->ValueStr() == "StyleCreateDate") {
|
||||
StyleCreateDate = QString::fromUtf8(tempString1.c_str());
|
||||
} else if(itemsList->ValueStr() == "PokerTHStyleFileVersion") {
|
||||
PokerTHStyleFileVersion = QString::fromUtf8(tempString1.c_str());
|
||||
} else if (itemsList->ValueStr() == "Preview") {
|
||||
Preview = currentDir+QString::fromUtf8(tempString1.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
//check if style items are left and show warning
|
||||
leftItems.clear();
|
||||
|
||||
if(StyleDescription == "") { leftItems << "StyleDescription"; }
|
||||
if(StyleMaintainerName == "") { leftItems << "StyleMaintainerName"; }
|
||||
if(StyleMaintainerEMail == "") { leftItems << "StyleMaintainerEMail"; }
|
||||
if(StyleCreateDate == "") { leftItems << "StyleCreateDate"; }
|
||||
if(PokerTHStyleFileVersion == "") { leftItems << "PokerTHStyleFileVersion"; }
|
||||
if(StyleDescription == "") {
|
||||
leftItems << "StyleDescription";
|
||||
}
|
||||
if(StyleMaintainerName == "") {
|
||||
leftItems << "StyleMaintainerName";
|
||||
}
|
||||
if(StyleMaintainerEMail == "") {
|
||||
leftItems << "StyleMaintainerEMail";
|
||||
}
|
||||
if(StyleCreateDate == "") {
|
||||
leftItems << "StyleCreateDate";
|
||||
}
|
||||
if(PokerTHStyleFileVersion == "") {
|
||||
leftItems << "PokerTHStyleFileVersion";
|
||||
}
|
||||
|
||||
//check if all files are there
|
||||
cardsLeft.clear();
|
||||
int i;
|
||||
for(i=0; i<52; i++) {
|
||||
QString cardString(QString::number(i)+".png");
|
||||
if(!QDir(currentDir).exists(cardString)) {
|
||||
cardsLeft << cardString;
|
||||
}
|
||||
}
|
||||
if(!QDir(currentDir).exists("flipside.png")) {
|
||||
cardsLeft << "flipside.png";
|
||||
}
|
||||
//check if all files are there
|
||||
cardsLeft.clear();
|
||||
int i;
|
||||
for(i=0; i<52; i++) {
|
||||
QString cardString(QString::number(i)+".png");
|
||||
if(!QDir(currentDir).exists(cardString)) {
|
||||
cardsLeft << cardString;
|
||||
}
|
||||
}
|
||||
if(!QDir(currentDir).exists("flipside.png")) {
|
||||
cardsLeft << "flipside.png";
|
||||
}
|
||||
|
||||
// set loadedSuccessfull TRUE if everything works
|
||||
if(leftItems.isEmpty() && cardsLeft.isEmpty() && PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() == POKERTH_CD_STYLE_FILE_VERSION)
|
||||
loadedSuccessfull = 1;
|
||||
else
|
||||
loadedSuccessfull = 0;
|
||||
// set loadedSuccessfull TRUE if everything works
|
||||
if(leftItems.isEmpty() && cardsLeft.isEmpty() && PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() == POKERTH_CD_STYLE_FILE_VERSION)
|
||||
loadedSuccessfull = 1;
|
||||
else
|
||||
loadedSuccessfull = 0;
|
||||
|
||||
if(!leftItems.isEmpty() && myW != 0) showLeftItemsErrorMessage(StyleDescription, leftItems, StyleMaintainerEMail);
|
||||
else {
|
||||
if(!cardsLeft.isEmpty() && myW != 0) showCardsLeftErrorMessage(StyleDescription, cardsLeft, StyleMaintainerEMail);
|
||||
//check for style file version
|
||||
if(PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() != POKERTH_CD_STYLE_FILE_VERSION) {
|
||||
QString EMail;
|
||||
if(StyleMaintainerEMail != "NULL") EMail = StyleMaintainerEMail;
|
||||
QMessageBox::warning(myW, tr("Card Deck Style Error"),
|
||||
tr("Selected card deck style \"%1\" seems to be outdated. \n The current PokerTH card deck style version is \"%2\", but this style has version \"%3\" set. \n\nPlease contact the card deck style builder %4.").arg(StyleDescription).arg(POKERTH_CD_STYLE_FILE_VERSION).arg(PokerTHStyleFileVersion).arg(EMail),
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
loadedSuccessfull = 0;
|
||||
QMessageBox::warning(myW, tr("Card Deck Style Error"),
|
||||
tr("Cannot load card deck style file: %1 \n\nPlease check the style file or choose another style!").arg(currentFileName),
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
if(!leftItems.isEmpty() && myW != 0) showLeftItemsErrorMessage(StyleDescription, leftItems, StyleMaintainerEMail);
|
||||
else {
|
||||
if(!cardsLeft.isEmpty() && myW != 0) showCardsLeftErrorMessage(StyleDescription, cardsLeft, StyleMaintainerEMail);
|
||||
//check for style file version
|
||||
if(PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() != POKERTH_CD_STYLE_FILE_VERSION) {
|
||||
QString EMail;
|
||||
if(StyleMaintainerEMail != "NULL") EMail = StyleMaintainerEMail;
|
||||
QMessageBox::warning(myW, tr("Card Deck Style Error"),
|
||||
tr("Selected card deck style \"%1\" seems to be outdated. \n The current PokerTH card deck style version is \"%2\", but this style has version \"%3\" set. \n\nPlease contact the card deck style builder %4.").arg(StyleDescription).arg(POKERTH_CD_STYLE_FILE_VERSION).arg(PokerTHStyleFileVersion).arg(EMail),
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
loadedSuccessfull = 0;
|
||||
QMessageBox::warning(myW, tr("Card Deck Style Error"),
|
||||
tr("Cannot load card deck style file: %1 \n\nPlease check the style file or choose another style!").arg(currentFileName),
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CardDeckStyleReader::showLeftItemsErrorMessage(QString style, QStringList failedItems, QString email)
|
||||
{
|
||||
QString items = failedItems.join(", ");
|
||||
QString EMail;
|
||||
if(email != "NULL") EMail = email;
|
||||
QString EMail;
|
||||
if(email != "NULL") EMail = email;
|
||||
|
||||
QMessageBox::warning(myW, tr("Card Deck Style Error"),
|
||||
tr("Selected card deck style \"%1\" seems to be incomplete or defective. \n\nThe value(s) of \"%2\" is/are missing. \n\nPlease contact the card deck style builder %3.").arg(style).arg(items).arg(EMail),
|
||||
QMessageBox::Ok);
|
||||
tr("Selected card deck style \"%1\" seems to be incomplete or defective. \n\nThe value(s) of \"%2\" is/are missing. \n\nPlease contact the card deck style builder %3.").arg(style).arg(items).arg(EMail),
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
|
||||
void CardDeckStyleReader::showCardsLeftErrorMessage(QString style, QStringList failedItems, QString email)
|
||||
{
|
||||
QString items = failedItems.join(", ");
|
||||
QString EMail;
|
||||
if(email != "NULL") EMail = email;
|
||||
QString EMail;
|
||||
if(email != "NULL") EMail = email;
|
||||
|
||||
QMessageBox::warning(myW, tr("Card Deck Style Error"),
|
||||
tr("Selected card deck style \"%1\" seems to be incomplete or defective. \nThe card picture(s) \"%2\" is/are not available. \n\nPlease contact the card deck style builder %3.").arg(style).arg(items).arg(EMail),
|
||||
QMessageBox::Ok);
|
||||
tr("Selected card deck style \"%1\" seems to be incomplete or defective. \nThe card picture(s) \"%2\" is/are not available. \n\nPlease contact the card deck style builder %3.").arg(style).arg(items).arg(EMail),
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
|
||||
@@ -29,39 +29,58 @@
|
||||
#define POKERTH_CD_STYLE_FILE_VERSION 1
|
||||
|
||||
enum CdStyleState {
|
||||
CD_STYLE_OK = 0,
|
||||
CD_STYLE_OUTDATED,
|
||||
CD_STYLE_FIELDS_EMPTY,
|
||||
CD_STYLE_PICTURES_MISSING,
|
||||
CD_STYLE_OK = 0,
|
||||
CD_STYLE_OUTDATED,
|
||||
CD_STYLE_FIELDS_EMPTY,
|
||||
CD_STYLE_PICTURES_MISSING,
|
||||
};
|
||||
|
||||
class CardDeckStyleReader : public QObject {
|
||||
Q_OBJECT
|
||||
class CardDeckStyleReader : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CardDeckStyleReader(ConfigFile *c, QWidget *w );
|
||||
CardDeckStyleReader(ConfigFile *c, QWidget *w );
|
||||
~CardDeckStyleReader();
|
||||
|
||||
|
||||
void readStyleFile(QString);
|
||||
|
||||
QString getStyleDescription() const { return StyleDescription; }
|
||||
QString getStyleMaintainerName() const { return StyleMaintainerName; }
|
||||
QString getStyleMaintainerEMail() const { return StyleMaintainerEMail; }
|
||||
QString getStyleCreateDate() const { return StyleCreateDate; }
|
||||
QString getStyleDescription() const {
|
||||
return StyleDescription;
|
||||
}
|
||||
QString getStyleMaintainerName() const {
|
||||
return StyleMaintainerName;
|
||||
}
|
||||
QString getStyleMaintainerEMail() const {
|
||||
return StyleMaintainerEMail;
|
||||
}
|
||||
QString getStyleCreateDate() const {
|
||||
return StyleCreateDate;
|
||||
}
|
||||
|
||||
QString getCurrentFileName() const { return currentFileName; }
|
||||
QString getCurrentDir() const { return currentDir; }
|
||||
|
||||
QString getPreview() const { return Preview; }
|
||||
QString getCurrentFileName() const {
|
||||
return currentFileName;
|
||||
}
|
||||
QString getCurrentDir() const {
|
||||
return currentDir;
|
||||
}
|
||||
|
||||
bool getFallBack() const { return fallBack; }
|
||||
bool getLoadedSuccessfull() const { return loadedSuccessfull; }
|
||||
QString getPreview() const {
|
||||
return Preview;
|
||||
}
|
||||
|
||||
bool getFallBack() const {
|
||||
return fallBack;
|
||||
}
|
||||
bool getLoadedSuccessfull() const {
|
||||
return loadedSuccessfull;
|
||||
}
|
||||
|
||||
void showLeftItemsErrorMessage(QString, QStringList, QString);
|
||||
void showCardsLeftErrorMessage(QString, QStringList, QString);
|
||||
|
||||
private:
|
||||
|
||||
QString StyleDescription;
|
||||
QString StyleDescription;
|
||||
QString StyleMaintainerName;
|
||||
QString StyleMaintainerEMail;
|
||||
QString StyleCreateDate;
|
||||
@@ -76,10 +95,10 @@ private:
|
||||
QStringList leftItems;
|
||||
|
||||
ConfigFile *myConfig;
|
||||
QWidget *myW;
|
||||
QWidget *myW;
|
||||
|
||||
bool fallBack;
|
||||
bool loadedSuccessfull;
|
||||
bool loadedSuccessfull;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -32,290 +32,393 @@
|
||||
#define POKERTH_GT_STYLE_FILE_VERSION 3
|
||||
|
||||
enum GtStyleState {
|
||||
GT_STYLE_OK = 0,
|
||||
GT_STYLE_OUTDATED,
|
||||
GT_STYLE_FIELDS_EMPTY,
|
||||
GT_STYLE_PICTURES_MISSING,
|
||||
GT_STYLE_OK = 0,
|
||||
GT_STYLE_OUTDATED,
|
||||
GT_STYLE_FIELDS_EMPTY,
|
||||
GT_STYLE_PICTURES_MISSING,
|
||||
GT_STYLE_UNDEFINED
|
||||
};
|
||||
|
||||
class gameTableImpl;
|
||||
|
||||
class GameTableStyleReader : public QObject {
|
||||
Q_OBJECT
|
||||
class GameTableStyleReader : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GameTableStyleReader(ConfigFile *c, QWidget *w);
|
||||
~GameTableStyleReader();
|
||||
GameTableStyleReader(ConfigFile *c, QWidget *w);
|
||||
~GameTableStyleReader();
|
||||
|
||||
void readStyleFile(QString);
|
||||
void readStyleFile(QString);
|
||||
|
||||
void showErrorMessage();
|
||||
void showLeftItemsErrorMessage();
|
||||
void showItemPicsLeftErrorMessage();
|
||||
void showOutdatedErrorMessage();
|
||||
void showErrorMessage();
|
||||
void showLeftItemsErrorMessage();
|
||||
void showItemPicsLeftErrorMessage();
|
||||
void showOutdatedErrorMessage();
|
||||
|
||||
QString getStyleDescription() const { return StyleDescription; }
|
||||
QString getStyleMaintainerName() const { return StyleMaintainerName; }
|
||||
QString getStyleMaintainerEMail() const { return StyleMaintainerEMail; }
|
||||
QString getStyleCreateDate() const { return StyleCreateDate; }
|
||||
QString getStyleDescription() const {
|
||||
return StyleDescription;
|
||||
}
|
||||
QString getStyleMaintainerName() const {
|
||||
return StyleMaintainerName;
|
||||
}
|
||||
QString getStyleMaintainerEMail() const {
|
||||
return StyleMaintainerEMail;
|
||||
}
|
||||
QString getStyleCreateDate() const {
|
||||
return StyleCreateDate;
|
||||
}
|
||||
|
||||
QString getCurrentFileName() const { return currentFileName; }
|
||||
QString getPreview() const { return Preview; }
|
||||
QString getDefaultAvatar() const { return DefaultAvatar; }
|
||||
QString getDealerPuck() const { return DealerPuck; }
|
||||
QString getSmallBlindPuck() const { return SmallBlindPuck; }
|
||||
QString getBigBlindPuck() const { return BigBlindPuck; }
|
||||
QString getHandRanking() const { return HandRanking; }
|
||||
QString getActionPic(int);
|
||||
QString getCurrentFileName() const {
|
||||
return currentFileName;
|
||||
}
|
||||
QString getPreview() const {
|
||||
return Preview;
|
||||
}
|
||||
QString getDefaultAvatar() const {
|
||||
return DefaultAvatar;
|
||||
}
|
||||
QString getDealerPuck() const {
|
||||
return DealerPuck;
|
||||
}
|
||||
QString getSmallBlindPuck() const {
|
||||
return SmallBlindPuck;
|
||||
}
|
||||
QString getBigBlindPuck() const {
|
||||
return BigBlindPuck;
|
||||
}
|
||||
QString getHandRanking() const {
|
||||
return HandRanking;
|
||||
}
|
||||
QString getActionPic(int);
|
||||
|
||||
QString getFKeyIndicatorColor() const { return FKeyIndicatorColor; }
|
||||
QString getChanceLabelImpossibleColor() const { return ChanceLabelImpossibleColor; }
|
||||
QString getChanceLabelPossibleColor() const { return ChanceLabelPossibleColor; }
|
||||
QString getChatLogTextColor() const { return ChatLogTextColor; }
|
||||
QString getChatTextNickNotifyColor() const { return ChatTextNickNotifyColor; }
|
||||
QString getLogWinnerMainPotColor() const { return LogWinnerMainPotColor; }
|
||||
QString getLogWinnerSidePotColor() const { return LogWinnerSidePotColor; }
|
||||
QString getLogPlayerSitsOutColor() const { return LogPlayerSitsOutColor; }
|
||||
QString getLogNewGameAdminColor() const { return LogNewGameAdminColor; }
|
||||
QString getBreakLobbyButtonBgColor() const { return BreakLobbyButtonBgColor; }
|
||||
QString getRatingStarsColor() const { return RatingStarsColor; }
|
||||
QString getPlayerInfoHintTextColor() const { return PlayerInfoHintTextColor; }
|
||||
QString getFKeyIndicatorColor() const {
|
||||
return FKeyIndicatorColor;
|
||||
}
|
||||
QString getChanceLabelImpossibleColor() const {
|
||||
return ChanceLabelImpossibleColor;
|
||||
}
|
||||
QString getChanceLabelPossibleColor() const {
|
||||
return ChanceLabelPossibleColor;
|
||||
}
|
||||
QString getChatLogTextColor() const {
|
||||
return ChatLogTextColor;
|
||||
}
|
||||
QString getChatTextNickNotifyColor() const {
|
||||
return ChatTextNickNotifyColor;
|
||||
}
|
||||
QString getLogWinnerMainPotColor() const {
|
||||
return LogWinnerMainPotColor;
|
||||
}
|
||||
QString getLogWinnerSidePotColor() const {
|
||||
return LogWinnerSidePotColor;
|
||||
}
|
||||
QString getLogPlayerSitsOutColor() const {
|
||||
return LogPlayerSitsOutColor;
|
||||
}
|
||||
QString getLogNewGameAdminColor() const {
|
||||
return LogNewGameAdminColor;
|
||||
}
|
||||
QString getBreakLobbyButtonBgColor() const {
|
||||
return BreakLobbyButtonBgColor;
|
||||
}
|
||||
QString getRatingStarsColor() const {
|
||||
return RatingStarsColor;
|
||||
}
|
||||
QString getPlayerInfoHintTextColor() const {
|
||||
return PlayerInfoHintTextColor;
|
||||
}
|
||||
|
||||
QString getPlayerNickTextColor() const { return PlayerNickTextColor; }
|
||||
QString getPlayerNameLabelFontSize() const { return playerNameLabelFontSize; }
|
||||
QString getFont2String() const { return font2String; }
|
||||
QString getPlayerNickTextColor() const {
|
||||
return PlayerNickTextColor;
|
||||
}
|
||||
QString getPlayerNameLabelFontSize() const {
|
||||
return playerNameLabelFontSize;
|
||||
}
|
||||
QString getFont2String() const {
|
||||
return font2String;
|
||||
}
|
||||
|
||||
QString getMinimumWindowWidth() const { return MinimumWindowWidth; }
|
||||
QString getMinimumWindowHeight() const { return MinimumWindowHeight; }
|
||||
QString getMaximumWindowWidth() const { return MaximumWindowWidth; }
|
||||
QString getMaximumWindowHeight() const { return MaximumWindowHeight; }
|
||||
QString getFixedWindowWidth() const { return FixedWindowWidth; }
|
||||
QString getFixedWindowHeight() const { return FixedWindowHeight; }
|
||||
QString getIfFixedWindowSize() const { return IfFixedWindowSize; }
|
||||
QString getMinimumWindowWidth() const {
|
||||
return MinimumWindowWidth;
|
||||
}
|
||||
QString getMinimumWindowHeight() const {
|
||||
return MinimumWindowHeight;
|
||||
}
|
||||
QString getMaximumWindowWidth() const {
|
||||
return MaximumWindowWidth;
|
||||
}
|
||||
QString getMaximumWindowHeight() const {
|
||||
return MaximumWindowHeight;
|
||||
}
|
||||
QString getFixedWindowWidth() const {
|
||||
return FixedWindowWidth;
|
||||
}
|
||||
QString getFixedWindowHeight() const {
|
||||
return FixedWindowHeight;
|
||||
}
|
||||
QString getIfFixedWindowSize() const {
|
||||
return IfFixedWindowSize;
|
||||
}
|
||||
|
||||
bool getFallBack() const { return fallBack; }
|
||||
bool getLoadedSuccessfull() const { return loadedSuccessfull; }
|
||||
GtStyleState getState() const { return myState; }
|
||||
bool getFallBack() const {
|
||||
return fallBack;
|
||||
}
|
||||
bool getLoadedSuccessfull() const {
|
||||
return loadedSuccessfull;
|
||||
}
|
||||
GtStyleState getState() const {
|
||||
return myState;
|
||||
}
|
||||
|
||||
//set pictures
|
||||
void setTableBackground(gameTableImpl*);
|
||||
void setCardHolderStyle(QLabel*, int /*bero*/);
|
||||
void setPlayerSeatActiveStyle(QGroupBox*);
|
||||
void setPlayerSeatInactiveStyle(QGroupBox*);
|
||||
void setToolBoxBackground(QGroupBox*);
|
||||
//set pictures
|
||||
void setTableBackground(gameTableImpl*);
|
||||
void setCardHolderStyle(QLabel*, int /*bero*/);
|
||||
void setPlayerSeatActiveStyle(QGroupBox*);
|
||||
void setPlayerSeatInactiveStyle(QGroupBox*);
|
||||
void setToolBoxBackground(QGroupBox*);
|
||||
|
||||
//set fonts + colors
|
||||
void setChatLogStyle(QTextBrowser*);
|
||||
//set fonts + colors
|
||||
void setChatLogStyle(QTextBrowser*);
|
||||
void setChatLogStyle(QPlainTextEdit*);
|
||||
void setChatInputStyle(QLineEdit*);
|
||||
void setCashLabelStyle(QLabel*);
|
||||
void setSetLabelStyle(QLabel*);
|
||||
void setPlayerNameLabelStyle(QLabel*);
|
||||
void setSmallFontBoardStyle(QLabel*);
|
||||
void setBigFontBoardStyle(QLabel*);
|
||||
void setMenuBarStyle(QMenuBar*);
|
||||
void setBreakButtonStyle(QPushButton*, int);
|
||||
void setSpeedStringStyle(QLabel*);
|
||||
void setVoteButtonStyle(QPushButton*);
|
||||
void setVoteStringsStyle(QLabel*);
|
||||
void setBetValueInputStyle(QSpinBox*);
|
||||
void setSliderStyle(QSlider*);
|
||||
void setChatInputStyle(QLineEdit*);
|
||||
void setCashLabelStyle(QLabel*);
|
||||
void setSetLabelStyle(QLabel*);
|
||||
void setPlayerNameLabelStyle(QLabel*);
|
||||
void setSmallFontBoardStyle(QLabel*);
|
||||
void setBigFontBoardStyle(QLabel*);
|
||||
void setMenuBarStyle(QMenuBar*);
|
||||
void setBreakButtonStyle(QPushButton*, int);
|
||||
void setSpeedStringStyle(QLabel*);
|
||||
void setVoteButtonStyle(QPushButton*);
|
||||
void setVoteStringsStyle(QLabel*);
|
||||
void setBetValueInputStyle(QSpinBox*);
|
||||
void setSliderStyle(QSlider*);
|
||||
|
||||
void setTabWidgetStyle(QTabWidget*, QTabBar*);
|
||||
void setTabWidgetStyle(QTabWidget*, QTabBar*);
|
||||
|
||||
void setWindowsGeometry(gameTableImpl*);
|
||||
void setWindowsGeometry(gameTableImpl*);
|
||||
|
||||
//set pics and fonts and colors
|
||||
void setButtonsStyle(MyActionButton*, MyActionButton*, MyActionButton*, MyActionButton*, int);
|
||||
void setShowMyCardsButtonStyle( MyActionButton *sc);
|
||||
void setAwayRadioButtonsStyle(QRadioButton*);
|
||||
//set pics and fonts and colors
|
||||
void setButtonsStyle(MyActionButton*, MyActionButton*, MyActionButton*, MyActionButton*, int);
|
||||
void setShowMyCardsButtonStyle( MyActionButton *sc);
|
||||
void setAwayRadioButtonsStyle(QRadioButton*);
|
||||
|
||||
QString getActionAllInI18NString() const { return ActionAllInI18NString; }
|
||||
QString getActionRaiseI18NString() const { return ActionRaiseI18NString; }
|
||||
QString getActionBetI18NString() const { return ActionBetI18NString; }
|
||||
QString getActionCallI18NString() const { return ActionCallI18NString; }
|
||||
QString getActionCheckI18NString() const { return ActionCheckI18NString; }
|
||||
QString getActionFoldI18NString() const { return ActionFoldI18NString; }
|
||||
QString getRiverI18NString() const { return RiverI18NString; }
|
||||
QString getTurnI18NString() const { return TurnI18NString; }
|
||||
QString getFlopI18NString() const { return FlopI18NString; }
|
||||
QString getPreflopI18NString() const { return PreflopI18NString; }
|
||||
QString getHandI18NString() const { return HandI18NString; }
|
||||
QString getGameI18NString() const { return GameI18NString; }
|
||||
QString getBetsI18NString() const { return BetsI18NString; }
|
||||
QString getTotalI18NString() const { return TotalI18NString; }
|
||||
QString getPotI18NString() const { return PotI18NString; }
|
||||
QString getActionAllInI18NString() const {
|
||||
return ActionAllInI18NString;
|
||||
}
|
||||
QString getActionRaiseI18NString() const {
|
||||
return ActionRaiseI18NString;
|
||||
}
|
||||
QString getActionBetI18NString() const {
|
||||
return ActionBetI18NString;
|
||||
}
|
||||
QString getActionCallI18NString() const {
|
||||
return ActionCallI18NString;
|
||||
}
|
||||
QString getActionCheckI18NString() const {
|
||||
return ActionCheckI18NString;
|
||||
}
|
||||
QString getActionFoldI18NString() const {
|
||||
return ActionFoldI18NString;
|
||||
}
|
||||
QString getRiverI18NString() const {
|
||||
return RiverI18NString;
|
||||
}
|
||||
QString getTurnI18NString() const {
|
||||
return TurnI18NString;
|
||||
}
|
||||
QString getFlopI18NString() const {
|
||||
return FlopI18NString;
|
||||
}
|
||||
QString getPreflopI18NString() const {
|
||||
return PreflopI18NString;
|
||||
}
|
||||
QString getHandI18NString() const {
|
||||
return HandI18NString;
|
||||
}
|
||||
QString getGameI18NString() const {
|
||||
return GameI18NString;
|
||||
}
|
||||
QString getBetsI18NString() const {
|
||||
return BetsI18NString;
|
||||
}
|
||||
QString getTotalI18NString() const {
|
||||
return TotalI18NString;
|
||||
}
|
||||
QString getPotI18NString() const {
|
||||
return PotI18NString;
|
||||
}
|
||||
|
||||
QString getFallBackFieldContent(QString field, int type); // type: 0 = string, 1= picture
|
||||
QString getMyStateToolTipInfo();
|
||||
QString getFallBackFieldContent(QString field, int type); // type: 0 = string, 1= picture
|
||||
QString getMyStateToolTipInfo();
|
||||
|
||||
private:
|
||||
//style values
|
||||
// INFOS
|
||||
QString StyleDescription;
|
||||
QString StyleMaintainerName;
|
||||
QString StyleMaintainerEMail;
|
||||
QString StyleCreateDate;
|
||||
QString PokerTHStyleFileVersion;
|
||||
// WINDOWS SETTINGS
|
||||
QString IfFixedWindowSize;
|
||||
QString FixedWindowWidth;
|
||||
QString FixedWindowHeight;
|
||||
QString MinimumWindowWidth;
|
||||
QString MinimumWindowHeight;
|
||||
QString MaximumWindowWidth;
|
||||
QString MaximumWindowHeight;
|
||||
// PICS
|
||||
QString Preview;
|
||||
QString ActionAllInI18NPic;
|
||||
QString ActionRaiseI18NPic;
|
||||
QString ActionBetI18NPic;
|
||||
QString ActionCallI18NPic;
|
||||
QString ActionCheckI18NPic;
|
||||
QString ActionFoldI18NPic;
|
||||
QString ActionWinnerI18NPic;
|
||||
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 RadioButtonPressed;
|
||||
QString RadioButtonChecked;
|
||||
QString RadioButtonCheckedHover;
|
||||
QString RadioButtonUnchecked;
|
||||
QString RadioButtonUncheckedHover;
|
||||
QString PlayerTopSeatInactive;
|
||||
QString PlayerTopSeatActive;
|
||||
QString PlayerBottomSeatInactive;
|
||||
QString PlayerBottomSeatActive;
|
||||
QString Table;
|
||||
QString HandRanking;
|
||||
QString ToolBoxBackground;
|
||||
QString ShowMyCardsButtonDefault;
|
||||
QString ShowMyCardsButtonHover;
|
||||
//style values
|
||||
// INFOS
|
||||
QString StyleDescription;
|
||||
QString StyleMaintainerName;
|
||||
QString StyleMaintainerEMail;
|
||||
QString StyleCreateDate;
|
||||
QString PokerTHStyleFileVersion;
|
||||
// WINDOWS SETTINGS
|
||||
QString IfFixedWindowSize;
|
||||
QString FixedWindowWidth;
|
||||
QString FixedWindowHeight;
|
||||
QString MinimumWindowWidth;
|
||||
QString MinimumWindowHeight;
|
||||
QString MaximumWindowWidth;
|
||||
QString MaximumWindowHeight;
|
||||
// PICS
|
||||
QString Preview;
|
||||
QString ActionAllInI18NPic;
|
||||
QString ActionRaiseI18NPic;
|
||||
QString ActionBetI18NPic;
|
||||
QString ActionCallI18NPic;
|
||||
QString ActionCheckI18NPic;
|
||||
QString ActionFoldI18NPic;
|
||||
QString ActionWinnerI18NPic;
|
||||
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 RadioButtonPressed;
|
||||
QString RadioButtonChecked;
|
||||
QString RadioButtonCheckedHover;
|
||||
QString RadioButtonUnchecked;
|
||||
QString RadioButtonUncheckedHover;
|
||||
QString PlayerTopSeatInactive;
|
||||
QString PlayerTopSeatActive;
|
||||
QString PlayerBottomSeatInactive;
|
||||
QString PlayerBottomSeatActive;
|
||||
QString Table;
|
||||
QString HandRanking;
|
||||
QString ToolBoxBackground;
|
||||
QString ShowMyCardsButtonDefault;
|
||||
QString ShowMyCardsButtonHover;
|
||||
|
||||
// I18N ACTION STRINGS
|
||||
QString ActionAllInI18NString;
|
||||
QString ActionRaiseI18NString;
|
||||
QString ActionBetI18NString;
|
||||
QString ActionCallI18NString;
|
||||
QString ActionCheckI18NString;
|
||||
QString ActionFoldI18NString;
|
||||
QString PotI18NString;
|
||||
QString TotalI18NString;
|
||||
QString BetsI18NString;
|
||||
QString GameI18NString;
|
||||
QString HandI18NString;
|
||||
QString PreflopI18NString;
|
||||
QString FlopI18NString;
|
||||
QString TurnI18NString;
|
||||
QString RiverI18NString;
|
||||
// I18N ACTION STRINGS
|
||||
QString ActionAllInI18NString;
|
||||
QString ActionRaiseI18NString;
|
||||
QString ActionBetI18NString;
|
||||
QString ActionCallI18NString;
|
||||
QString ActionCheckI18NString;
|
||||
QString ActionFoldI18NString;
|
||||
QString PotI18NString;
|
||||
QString TotalI18NString;
|
||||
QString BetsI18NString;
|
||||
QString GameI18NString;
|
||||
QString HandI18NString;
|
||||
QString PreflopI18NString;
|
||||
QString FlopI18NString;
|
||||
QString TurnI18NString;
|
||||
QString RiverI18NString;
|
||||
|
||||
// COLORS
|
||||
QString FKeyIndicatorColor;
|
||||
QString ChanceLabelPossibleColor;
|
||||
QString ChanceLabelImpossibleColor;
|
||||
QString ChatTextNickNotifyColor;
|
||||
QString ChatLogTextColor;
|
||||
QString ChatLogBgColor;
|
||||
QString ChatLogScrollBarBorderColor;
|
||||
QString ChatLogScrollBarBgColor;
|
||||
QString ChatLogScrollBarHandleBorderColor;
|
||||
QString ChatLogScrollBarHandleBgColor;
|
||||
QString ChatLogScrollBarArrowBorderColor;
|
||||
QString ChatLogScrollBarArrowBgColor;
|
||||
QString LogWinnerMainPotColor;
|
||||
QString LogWinnerSidePotColor;
|
||||
QString LogPlayerSitsOutColor;
|
||||
QString LogNewGameAdminColor;
|
||||
QString TabWidgetBorderColor;
|
||||
QString TabWidgetBgColor;
|
||||
QString TabWidgetTextColor;
|
||||
QString MenuBgColor;
|
||||
QString MenuTextColor;
|
||||
QString BreakLobbyButtonBgColor;
|
||||
QString BreakLobbyButtonTextColor;
|
||||
QString BreakLobbyButtonBgDisabledColor;
|
||||
QString BreakLobbyButtonTextDisabledColor;
|
||||
QString BreakLobbyButtonBgBlinkColor;
|
||||
QString BreakLobbyButtonTextBlinkColor;
|
||||
QString PlayerCashTextColor;
|
||||
QString PlayerBetTextColor;
|
||||
QString PlayerNickTextColor;
|
||||
QString BoardBigTextColor;
|
||||
QString BoardSmallTextColor;
|
||||
QString SpeedTextColor;
|
||||
QString VoteButtonBgColor;
|
||||
QString VoteButtonTextColor;
|
||||
QString BetInputTextColor;
|
||||
QString BetInputBgColor;
|
||||
QString BetInputDisabledTextColor;
|
||||
QString BetInputDisabledBgColor;
|
||||
QString FoldButtonTextColor;
|
||||
QString FoldButtonCheckableTextColor;
|
||||
QString CheckCallButtonTextColor;
|
||||
QString CheckCallButtonCheckableTextColor;
|
||||
QString BetRaiseButtonTextColor;
|
||||
QString BetRaiseButtonCheckableTextColor;
|
||||
QString AllInButtonTextColor;
|
||||
QString AllInButtonCheckableTextColor;
|
||||
QString BetSpeedSliderGrooveBgColor;
|
||||
QString BetSpeedSliderGrooveBorderColor;
|
||||
QString BetSpeedSliderHandleBgColor;
|
||||
QString BetSpeedSliderHandleBorderColor;
|
||||
QString ShowMyCardsButtonTextColor;
|
||||
// COLORS
|
||||
QString FKeyIndicatorColor;
|
||||
QString ChanceLabelPossibleColor;
|
||||
QString ChanceLabelImpossibleColor;
|
||||
QString ChatTextNickNotifyColor;
|
||||
QString ChatLogTextColor;
|
||||
QString ChatLogBgColor;
|
||||
QString ChatLogScrollBarBorderColor;
|
||||
QString ChatLogScrollBarBgColor;
|
||||
QString ChatLogScrollBarHandleBorderColor;
|
||||
QString ChatLogScrollBarHandleBgColor;
|
||||
QString ChatLogScrollBarArrowBorderColor;
|
||||
QString ChatLogScrollBarArrowBgColor;
|
||||
QString LogWinnerMainPotColor;
|
||||
QString LogWinnerSidePotColor;
|
||||
QString LogPlayerSitsOutColor;
|
||||
QString LogNewGameAdminColor;
|
||||
QString TabWidgetBorderColor;
|
||||
QString TabWidgetBgColor;
|
||||
QString TabWidgetTextColor;
|
||||
QString MenuBgColor;
|
||||
QString MenuTextColor;
|
||||
QString BreakLobbyButtonBgColor;
|
||||
QString BreakLobbyButtonTextColor;
|
||||
QString BreakLobbyButtonBgDisabledColor;
|
||||
QString BreakLobbyButtonTextDisabledColor;
|
||||
QString BreakLobbyButtonBgBlinkColor;
|
||||
QString BreakLobbyButtonTextBlinkColor;
|
||||
QString PlayerCashTextColor;
|
||||
QString PlayerBetTextColor;
|
||||
QString PlayerNickTextColor;
|
||||
QString BoardBigTextColor;
|
||||
QString BoardSmallTextColor;
|
||||
QString SpeedTextColor;
|
||||
QString VoteButtonBgColor;
|
||||
QString VoteButtonTextColor;
|
||||
QString BetInputTextColor;
|
||||
QString BetInputBgColor;
|
||||
QString BetInputDisabledTextColor;
|
||||
QString BetInputDisabledBgColor;
|
||||
QString FoldButtonTextColor;
|
||||
QString FoldButtonCheckableTextColor;
|
||||
QString CheckCallButtonTextColor;
|
||||
QString CheckCallButtonCheckableTextColor;
|
||||
QString BetRaiseButtonTextColor;
|
||||
QString BetRaiseButtonCheckableTextColor;
|
||||
QString AllInButtonTextColor;
|
||||
QString AllInButtonCheckableTextColor;
|
||||
QString BetSpeedSliderGrooveBgColor;
|
||||
QString BetSpeedSliderGrooveBorderColor;
|
||||
QString BetSpeedSliderHandleBgColor;
|
||||
QString BetSpeedSliderHandleBorderColor;
|
||||
QString ShowMyCardsButtonTextColor;
|
||||
QString RatingStarsColor;
|
||||
QString PlayerInfoHintTextColor;
|
||||
|
||||
// SIZES
|
||||
QString ChatLogTextSize;
|
||||
// SIZES
|
||||
QString ChatLogTextSize;
|
||||
|
||||
//internal
|
||||
QString font2String;
|
||||
QString font1String;
|
||||
QString textBrowserFontsize;
|
||||
QString cashFontSize;
|
||||
QString setLabelFontSize;
|
||||
QString playerNameLabelFontSize;
|
||||
QString smallBoardFontSize;
|
||||
QString bigBoardFontSize;
|
||||
QString humanPlayerButtonFontSize;
|
||||
QString betValueFontSize;
|
||||
//internal
|
||||
QString font2String;
|
||||
QString font1String;
|
||||
QString textBrowserFontsize;
|
||||
QString cashFontSize;
|
||||
QString setLabelFontSize;
|
||||
QString playerNameLabelFontSize;
|
||||
QString smallBoardFontSize;
|
||||
QString bigBoardFontSize;
|
||||
QString humanPlayerButtonFontSize;
|
||||
QString betValueFontSize;
|
||||
|
||||
QString tabBarPaddingTop;
|
||||
QString tabBarPaddingSide;
|
||||
QString tabBarPaddingTop;
|
||||
QString tabBarPaddingSide;
|
||||
|
||||
QByteArray fileContent;
|
||||
QString currentFileName;
|
||||
QString currentDir;
|
||||
QByteArray fileContent;
|
||||
QString currentFileName;
|
||||
QString currentDir;
|
||||
|
||||
QStringList leftItems;
|
||||
QStringList itemPicsLeft;
|
||||
QStringList leftItems;
|
||||
QStringList itemPicsLeft;
|
||||
|
||||
ConfigFile *myConfig;
|
||||
QWidget *myW;
|
||||
ConfigFile *myConfig;
|
||||
QWidget *myW;
|
||||
|
||||
bool fallBack;
|
||||
bool loadedSuccessfull;
|
||||
GtStyleState myState;
|
||||
bool fallBack;
|
||||
bool loadedSuccessfull;
|
||||
GtStyleState myState;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user