diff --git a/data/gfx/cards/default/defaultdeckstyle.xml b/data/gfx/cards/default/defaultdeckstyle.xml
index 405cd2a3..ca079807 100644
--- a/data/gfx/cards/default/defaultdeckstyle.xml
+++ b/data/gfx/cards/default/defaultdeckstyle.xml
@@ -2,7 +2,10 @@
+
+
+
\ No newline at end of file
diff --git a/data/gfx/cards/default4c/default4cdeckstyle.xml b/data/gfx/cards/default4c/default4cdeckstyle.xml
index 109a29ce..f48b50d2 100644
--- a/data/gfx/cards/default4c/default4cdeckstyle.xml
+++ b/data/gfx/cards/default4c/default4cdeckstyle.xml
@@ -2,7 +2,10 @@
+
+
+
\ No newline at end of file
diff --git a/data/gfx/gui/table/danuxi1/danuxi1tablestyle.xml b/data/gfx/gui/table/danuxi1/danuxi1tablestyle.xml
index e8c978c8..e996ff29 100644
--- a/data/gfx/gui/table/danuxi1/danuxi1tablestyle.xml
+++ b/data/gfx/gui/table/danuxi1/danuxi1tablestyle.xml
@@ -1,8 +1,10 @@
-
+
+
+
diff --git a/data/gfx/gui/table/danuxi1/preview.png b/data/gfx/gui/table/danuxi1/preview.png
index a5b91957..63cc4a9c 100644
Binary files a/data/gfx/gui/table/danuxi1/preview.png and b/data/gfx/gui/table/danuxi1/preview.png differ
diff --git a/data/gfx/gui/table/default/defaulttablestyle.xml b/data/gfx/gui/table/default/defaulttablestyle.xml
index f8974df7..23e5aa20 100644
--- a/data/gfx/gui/table/default/defaulttablestyle.xml
+++ b/data/gfx/gui/table/default/defaulttablestyle.xml
@@ -2,7 +2,9 @@
-
+
+
+
diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui
index 7ecab172..ecd0842d 100644
--- a/src/gui/qt/settingsdialog.ui
+++ b/src/gui/qt/settingsdialog.ui
@@ -393,159 +393,210 @@ p, li { white-space: pre-wrap; }
-
-
-
- Game Table Styles
+
+
+ 0
-
-
-
-
-
-
-
-
- Activate
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 17
-
-
-
-
- -
-
-
- Add ...
-
-
-
- -
-
-
- Remove
-
-
-
-
-
- -
-
-
- Preview:
-
-
-
-
-
-
-
- 160
- 120
-
-
-
-
- 160
- 120
-
-
+
+
+ Game Table Styles
+
+
+
-
+
+
+ -
+
+
-
+
-
+ Activate
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 17
+
+
+
+
+ -
+
+
+ Add ...
+
+
+
+ -
+
+
+ Remove
-
-
- -
-
-
-
-
-
- -
-
-
- Card Deck Styles
-
-
-
-
-
-
-
-
-
- Activate
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 17
-
-
-
-
- -
-
-
- Add ...
-
-
-
- -
-
-
- Remove
-
-
-
-
-
- -
-
-
- Preview:
-
-
-
-
-
-
-
- 160
- 120
-
-
-
-
- 160
- 120
-
-
+
+ -
+
+
+ Preview - Information:
+
+
+
-
+
+
+
+ 160
+ 120
+
+
+
+
+ 160
+ 120
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+ Qt::RichText
+
+
+
+
+
+
+ -
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Nimbus Sans L'; font-size:8pt; 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;"><a href="http://gtstyles.pokerth.net/"><span style=" text-decoration: underline; color:#0000ff;">Get new PokerTH game table styles ...</span></a></p></body></html>
+
+
+ true
+
+
+
+
+
+
+
+ Card Deck Styles
+
+
+ -
+
+
+ -
+
+
-
+
-
+ Activate
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 17
+
+
+
+
+ -
+
+
+ Add ...
+
+
+
+ -
+
+
+ Remove
-
-
- -
-
-
-
+
+ -
+
+
+ Preview - Information:
+
+
+
-
+
+
+
+ 160
+ 120
+
+
+
+
+ 160
+ 120
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+ Qt::RichText
+
+
+
+
+
+
+ -
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Nimbus Sans L'; font-size:8pt; 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;"><a href="http://cdstyles.pokerth.net/"><span style=" text-decoration: underline; color:#0000ff;">Get new PokerTH card deck styles ...</span></a></p></body></html>
+
+
+ true
+
+
+
+
+
@@ -3400,11 +3451,8 @@ p, li { white-space: pre-wrap; }
radioButton_flipsideOwn
lineEdit_OwnFlipsideFilename
pushButton_openFlipsidePicture
- listWidget_gameTableStyles
- pushButton_activateGameTableStyle
pushButton_addGameTableStyle
pushButton_removeGameTableStyle
- listWidget_cardDeckStyles
pushButton_activateCardDeckStyle
pushButton_addCardDeckStyle
pushButton_removeCardDeckStyle
diff --git a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp
index 43a19916..cc84c64b 100644
--- a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp
+++ b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp
@@ -866,6 +866,12 @@ void settingsDialogImpl::showCurrentGameTableStylePreview()
QPixmap preview(style.getPreview());
if(preview.height() > 160 || preview.width() > 120) label_gameTableStylePreview->setPixmap(preview.scaled(160,120,Qt::KeepAspectRatio,Qt::SmoothTransformation));
else label_gameTableStylePreview->setPixmap(preview);
+
+ QString MaintainerName = tr("Maintainer Name");
+ QString MaintainerEMail = tr("Maintainer EMail");
+ QString CreateDate = tr("Create Date");
+
+ label_gameTableStyleInfo->setText(""+MaintainerName+": "+style.getStyleMaintainerName()+"
"+MaintainerEMail+": "+style.getStyleMaintainerEMail()+"
"+CreateDate+": "+style.getStyleCreateDate()+"");
}
}
@@ -949,7 +955,13 @@ void settingsDialogImpl::showCurrentCardDeckStylePreview()
style.readStyleFile(item->data(15).toString());
QPixmap preview(style.getPreview());
if(preview.height() > 160 || preview.width() > 120) label_cardDeckStylePreview->setPixmap(preview.scaled(160,120,Qt::KeepAspectRatio,Qt::SmoothTransformation));
- else label_cardDeckStylePreview->setPixmap(preview);
+ else label_cardDeckStylePreview->setPixmap(preview);
+
+ QString MaintainerName = tr("Maintainer Name");
+ QString MaintainerEMail = tr("Maintainer EMail");
+ QString CreateDate = tr("Create Date");
+
+ label_cardDeckStyleInfo->setText(""+MaintainerName+": "+style.getStyleMaintainerName()+"
"+MaintainerEMail+": "+style.getStyleMaintainerEMail()+"
"+CreateDate+": "+style.getStyleCreateDate()+"");
}
}
diff --git a/src/gui/qt/styles/carddeckstylereader.cpp b/src/gui/qt/styles/carddeckstylereader.cpp
index 7bbcf183..f805b94e 100644
--- a/src/gui/qt/styles/carddeckstylereader.cpp
+++ b/src/gui/qt/styles/carddeckstylereader.cpp
@@ -67,7 +67,10 @@ void CardDeckStyleReader::readStyleFile(QString file) {
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()); }
}
}
@@ -75,6 +78,15 @@ void CardDeckStyleReader::readStyleFile(QString file) {
}
else { qDebug() << "could not load card deck file: " << tinyFileName.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"; }
+
//check if all files are there
cardsLeft.clear();
int i;
@@ -88,10 +100,22 @@ void CardDeckStyleReader::readStyleFile(QString file) {
cardsLeft << "flipside.png";
}
- if(!cardsLeft.isEmpty() && myW != 0) showErrorMessage(StyleDescription, cardsLeft, StyleMaintainerEMail);
+ if(!leftItems.isEmpty() && myW != 0) showLeftItemsErrorMessage(StyleDescription, leftItems, StyleMaintainerEMail);
+ else {
+ if(!cardsLeft.isEmpty() && myW != 0) showCardsLeftErrorMessage(StyleDescription, cardsLeft, StyleMaintainerEMail);
+ }
}
-void CardDeckStyleReader::showErrorMessage(QString style, QStringList failedItems, QString email)
+void CardDeckStyleReader::showLeftItemsErrorMessage(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. \n\nThe value(s) of \"%2\" is/are left. \n\nPlease contact the game table style builder %3.").arg(style).arg(items).arg(email),
+ QMessageBox::Ok);
+}
+
+void CardDeckStyleReader::showCardsLeftErrorMessage(QString style, QStringList failedItems, QString email)
{
QString items = failedItems.join(", ");
diff --git a/src/gui/qt/styles/carddeckstylereader.h b/src/gui/qt/styles/carddeckstylereader.h
index dba4b818..50efd25e 100644
--- a/src/gui/qt/styles/carddeckstylereader.h
+++ b/src/gui/qt/styles/carddeckstylereader.h
@@ -36,24 +36,33 @@ public:
void readStyleFile(QString);
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; }
bool getFallBack() const { return fallBack; }
- void showErrorMessage(QString, QStringList, QString);
+ void showLeftItemsErrorMessage(QString, QStringList, QString);
+ void showCardsLeftErrorMessage(QString, QStringList, QString);
private:
QString StyleDescription;
+ QString StyleMaintainerName;
QString StyleMaintainerEMail;
+ QString StyleCreateDate;
+ QString PokerTHStyleFileVersion;
QString Preview;
QString currentFileName;
QString currentDir;
QStringList cardsLeft;
+ QStringList leftItems;
ConfigFile *myConfig;
gameTableImpl *myW;
diff --git a/src/gui/qt/styles/gametablestylereader.cpp b/src/gui/qt/styles/gametablestylereader.cpp
index b073b4c5..9a6973c1 100644
--- a/src/gui/qt/styles/gametablestylereader.cpp
+++ b/src/gui/qt/styles/gametablestylereader.cpp
@@ -106,7 +106,9 @@ void GameTableStyleReader::readStyleFile(QString file) {
// INFOS
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()); }
// WINDOWS SETTINGS
else if (itemsList->ValueStr() == "IfFixedWindowSize") { IfFixedWindowSize = QString::fromUtf8(tempString1.c_str()); }
@@ -234,6 +236,9 @@ void GameTableStyleReader::readStyleFile(QString file) {
// INFOS
if(StyleDescription == "") { leftItems << "StyleDescription"; }
+ if(StyleMaintainerName == "") { leftItems << "StyleMaintainerName"; }
+ if(StyleMaintainerEMail == "") { leftItems << "StyleMaintainerEMail"; }
+ if(StyleCreateDate == "") { leftItems << "StyleCreateDate"; }
if(PokerTHStyleFileVersion == "") { leftItems << "PokerTHStyleFileVersion"; }
// WINDOWS SETTINGS
if(IfFixedWindowSize == "") { leftItems << "IfFixedWindowSize"; }
diff --git a/src/gui/qt/styles/gametablestylereader.h b/src/gui/qt/styles/gametablestylereader.h
index 58b76a3f..920ec5f9 100644
--- a/src/gui/qt/styles/gametablestylereader.h
+++ b/src/gui/qt/styles/gametablestylereader.h
@@ -41,6 +41,10 @@ public:
void showItemPicsLeftErrorMessage(QString, QStringList, QString);
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; }
@@ -111,7 +115,9 @@ private:
//style values
// INFOS
QString StyleDescription;
+ QString StyleMaintainerName;
QString StyleMaintainerEMail;
+ QString StyleCreateDate;
QString PokerTHStyleFileVersion;
// WINDOWS SETTINGS
QString IfFixedWindowSize;