first colors and font sizes are skinnable now

This commit is contained in:
doitux
2009-04-01 12:27:31 +00:00
parent 6d973aa178
commit b944852a4e
16 changed files with 355 additions and 242 deletions
@@ -3,7 +3,6 @@
<TableStyle>
<StyleDescription value="PokerTH default table style" />
<StyleMaintainerEMail value="webmaster@pokerth.net" />
<Preview value="preview.png" />
<IfFixedWindowSize value="0" />
<FixedWindowWidth value="1024" />
<FixedWindowHeight value="600" />
@@ -11,6 +10,7 @@
<MinimumWindowHeight value="600" />
<MaximumWindowWidth value="1980" />
<MaximumWindowHeight value="1200" />
<Preview value="preview.png" />
<ActionAllIn value="action_allin.png" />
<ActionRaise value="action_raise.png" />
<ActionBet value="action_bet.png" />
@@ -46,5 +46,17 @@
<Table value="table.png" />
<ToolBoxBackground value="toolboxbg.png" />
<HandRanking value="handranking.png" />
<FKeyIndicatorColor value="FFFFFF" />
<ChanceLabelPossibleColor value="9CD500" />
<ChanceLabelImpossibleColor value="55632F" />
<ChatTextColor value="FFFFFF" />
<ChatTextNickNotifyColor value="FFFF00" />
<LogTextColor value="FFFFFF" />
<LogWinnerMainPotColor value="FFFF00" />
<LogWinnerSidePotColor value="FFFFCC" />
<LogPlayerSitsOutColor value="FF6633" />
<LogNewGameAdminColor value="69FF33" />
<ChatTextSize value="11" />
<LogTextSize value="11" />
</TableStyle>
</PokerTH>
+7 -2
View File
@@ -20,6 +20,7 @@
#include "chattools.h"
#include "session.h"
#include "configfile.h"
#include "gametablestylereader.h"
#include <iostream>
using namespace std;
@@ -63,9 +64,11 @@ void ChatTools::receiveMessage(QString playerName, QString message) {
switch (myNotifyMode) {
case 0: tempMsg = message;
break;
// lobby
case 1: tempMsg = QString("<span style=\"font-weight:bold;\">"+message+"</span>");
break;
case 2: tempMsg = QString("<span style=\"color:#FFFF00;\">"+message+"</span>");
// ingame
case 2: tempMsg = QString("<span style=\"color:#"+myStyle->getChatTextNickNotifyColor()+";\">"+message+"</span>");
break;
default:;
}
@@ -74,9 +77,11 @@ void ChatTools::receiveMessage(QString playerName, QString message) {
switch (myNotifyMode) {
case 0: tempMsg = message;
break;
// lobby
case 1: tempMsg = QString("<span style=\"font-weight:normal;\">"+message+"</span>");
break;
case 2: tempMsg = QString("<span style=\"color:#FFFFFF;\">"+message+"</span>");
// ingame
case 2: tempMsg = QString("<span style=\"color:#"+myStyle->getChatTextColor()+";\">"+message+"</span>");
break;
default:;
}
+5
View File
@@ -27,6 +27,7 @@
class Session;
class ConfigFile;
class GameTableStyleReader;
class ChatTools : public QObject
{
@@ -55,6 +56,8 @@ public slots:
void setPlayerNicksList(QStringList value) { myNickStringList = value; }
void setMyNick ( const QString& theValue ) { myNick = theValue; }
void setMyStyle ( GameTableStyleReader* theValue ) { myStyle = theValue; }
private:
@@ -73,6 +76,8 @@ private:
ConfigFile *myConfig;
QString myNick;
GameTableStyleReader *myStyle;
};
#endif
+172 -178
View File
@@ -1,7 +1,8 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>gameLobbyDialog</class>
<widget class="QDialog" name="gameLobbyDialog" >
<property name="geometry" >
<widget class="QDialog" name="gameLobbyDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -9,172 +10,172 @@
<height>618</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<property name="minimumSize">
<size>
<width>875</width>
<height>618</height>
</size>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Internet Game Lobby</string>
</property>
<layout class="QGridLayout" >
<property name="bottomMargin" >
<layout class="QGridLayout">
<property name="verticalSpacing">
<number>4</number>
</property>
<property name="verticalSpacing" >
<property name="bottomMargin">
<number>4</number>
</property>
<item rowspan="3" row="0" column="0" >
<widget class="QTreeWidget" name="treeWidget_NickList" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
<item row="0" column="0" rowspan="3">
<widget class="QTreeWidget" name="treeWidget_NickList">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<property name="minimumSize">
<size>
<width>165</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>165</width>
<height>16777215</height>
</size>
</property>
<property name="indentation" >
<property name="indentation">
<number>5</number>
</property>
<property name="rootIsDecorated" >
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="sortingEnabled" >
<property name="sortingEnabled">
<bool>true</bool>
</property>
<column>
<property name="text" >
<property name="text">
<string>Available Players</string>
</property>
</column>
</widget>
</item>
<item row="0" column="1" >
<widget class="MyGameListTreeWidget" name="treeWidget_GameList" >
<property name="minimumSize" >
<item row="0" column="1">
<widget class="MyGameListTreeWidget" name="treeWidget_GameList">
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<property name="horizontalScrollBarPolicy" >
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="sortingEnabled" >
<property name="sortingEnabled">
<bool>true</bool>
</property>
<column>
<property name="text" >
<property name="text">
<string>Game</string>
</property>
</column>
<column>
<property name="text" >
<property name="text">
<string>Players</string>
</property>
</column>
<column>
<property name="text" >
<property name="text">
<string>State</string>
</property>
</column>
<column>
<property name="text" >
<property name="text">
<string>Private</string>
</property>
</column>
</widget>
</item>
<item rowspan="3" row="0" column="2" >
<widget class="QGroupBox" name="groupBox_GameInfo" >
<property name="enabled" >
<item row="0" column="2" rowspan="3">
<widget class="QGroupBox" name="groupBox_GameInfo">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<property name="minimumSize">
<size>
<width>270</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>270</width>
<height>16777215</height>
</size>
</property>
<property name="title" >
<property name="title">
<string>Game Info</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QTreeWidget" name="treeWidget_connectedPlayers" >
<property name="minimumSize" >
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QTreeWidget" name="treeWidget_connectedPlayers">
<property name="minimumSize">
<size>
<width>221</width>
<height>221</height>
</size>
</property>
<property name="midLineWidth" >
<property name="midLineWidth">
<number>1</number>
</property>
<property name="iconSize" >
<property name="iconSize">
<size>
<width>25</width>
<height>26</height>
</size>
</property>
<property name="indentation" >
<property name="indentation">
<number>15</number>
</property>
<column>
<property name="text" >
<property name="text">
<string>Connected Players</string>
</property>
</column>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="checkBox_fillUpWithComputerOpponents" >
<property name="text" >
<item row="1" column="0">
<widget class="QCheckBox" name="checkBox_fillUpWithComputerOpponents">
<property name="text">
<string>Fill up with computer opponents</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<item row="2" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -183,174 +184,174 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_StartGame" >
<property name="text" >
<widget class="QPushButton" name="pushButton_StartGame">
<property name="text">
<string>Start Game</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_Kick" >
<property name="text" >
<widget class="QPushButton" name="pushButton_Kick">
<property name="text">
<string>Kick Player</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0" >
<layout class="QHBoxLayout" >
<item row="3" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc1" >
<property name="text" >
<widget class="QLabel" name="label_gameDesc1">
<property name="text">
<string>Maximum number of players: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_MaximumNumberOfPlayers" >
<property name="alignment" >
<widget class="QLabel" name="label_MaximumNumberOfPlayers">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0" >
<layout class="QHBoxLayout" >
<item row="4" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc2" >
<property name="text" >
<widget class="QLabel" name="label_gameDesc2">
<property name="text">
<string>Start Cash: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_StartCash" >
<property name="alignment" >
<widget class="QLabel" name="label_StartCash">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0" >
<layout class="QHBoxLayout" >
<item row="5" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc3" >
<property name="text" >
<widget class="QLabel" name="label_gameDesc3">
<property name="text">
<string>First small blind: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_SmallBlind" >
<property name="alignment" >
<widget class="QLabel" name="label_SmallBlind">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0" >
<layout class="QHBoxLayout" >
<item row="6" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc4" >
<property name="text" >
<widget class="QLabel" name="label_gameDesc4">
<property name="text">
<string>Blinds raise interval: </string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_blindsRaiseIntervall" >
<property name="alignment" >
<widget class="QLabel" name="label_blindsRaiseIntervall">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="0" >
<layout class="QHBoxLayout" >
<item row="7" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc5" >
<property name="text" >
<widget class="QLabel" name="label_gameDesc5">
<property name="text">
<string>Blinds raise mode: </string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_blindsRaiseMode" >
<property name="text" >
<widget class="QLabel" name="label_blindsRaiseMode">
<property name="text">
<string/>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
<property name="wordWrap" >
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="0" >
<layout class="QHBoxLayout" >
<item row="8" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc6" >
<property name="text" >
<widget class="QLabel" name="label_gameDesc6">
<property name="text">
<string>Manual blinds list:</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_blindsList" >
<property name="text" >
<widget class="QLabel" name="label_blindsList">
<property name="text">
<string/>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
<property name="wordWrap" >
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="9" column="0" >
<layout class="QHBoxLayout" >
<item row="9" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc7" >
<property name="text" >
<widget class="QLabel" name="label_gameDesc7">
<property name="text">
<string>Timeout for player action (sec): </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_TimeoutForPlayerAction" >
<property name="alignment" >
<widget class="QLabel" name="label_TimeoutForPlayerAction">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="10" column="0" >
<item row="10" column="0">
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>248</width>
<height>91</height>
@@ -358,20 +359,20 @@
</property>
</spacer>
</item>
<item row="11" column="0" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<item row="11" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>27</height>
@@ -380,14 +381,14 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_Leave" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<widget class="QPushButton" name="pushButton_Leave">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>Leave Game</string>
</property>
</widget>
@@ -397,39 +398,30 @@
</layout>
</widget>
</item>
<item row="1" column="1" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<item row="1" column="1">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="pushButton_joinAnyGame" >
<property name="text" >
<widget class="QPushButton" name="pushButton_joinAnyGame">
<property name="text">
<string>Join any game</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>181</width>
<height>20</height>
@@ -439,13 +431,13 @@
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>28</height>
@@ -454,90 +446,92 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_CreateGame" >
<property name="text" >
<widget class="QPushButton" name="pushButton_CreateGame">
<property name="text">
<string>Create Game</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_JoinGame" >
<property name="text" >
<widget class="QPushButton" name="pushButton_JoinGame">
<property name="text">
<string>Join Game</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="1" >
<widget class="QGroupBox" name="groupBox_lobbyChat" >
<property name="title" >
<item row="2" column="1">
<widget class="QGroupBox" name="groupBox_lobbyChat">
<property name="title">
<string>Lobby-Chat</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<layout class="QGridLayout">
<property name="margin">
<number>7</number>
</property>
<property name="topMargin" >
<number>7</number>
</property>
<property name="rightMargin" >
<number>7</number>
</property>
<property name="bottomMargin" >
<number>7</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing">
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
<widget class="QTextBrowser" name="textBrowser_ChatDisplay" />
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser_ChatDisplay"/>
</item>
<item row="1" column="0" >
<widget class="QLineEdit" name="lineEdit_ChatInput" />
<item row="1" column="0">
<widget class="QLineEdit" name="lineEdit_ChatInput"/>
</item>
</layout>
</widget>
</item>
<item row="3" column="0" colspan="3" >
<layout class="QHBoxLayout" >
<item row="3" column="0" colspan="3">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_connectedPlayersCounter" >
<property name="text" >
<widget class="QLabel" name="label_connectedPlayersCounter">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_nickListCounter" >
<property name="text" >
<widget class="QLabel" name="label_nickListCounter">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_runningGamesCounter" >
<property name="text" >
<widget class="QLabel" name="label_runningGamesCounter">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_openGamesCounter" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
<widget class="QLabel" name="label_openGamesCounter">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_pokerthDotNet">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Nimbus Sans L'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://www.pokerth.net&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.pokerth.net&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
+6
View File
@@ -25,6 +25,7 @@
#include "playerinterface.h"
#include "chattools.h"
#include "configfile.h"
#include "gametablestylereader.h"
using namespace std;
@@ -108,3 +109,8 @@ int Chat::getChatLinesHistorySize() { return myChatTools->getChatLinesHistorySiz
void Chat::showChatHistoryIndex(int index) { myChatTools->showChatHistoryIndex(index); }
void Chat::nickAutoCompletition() { myChatTools->nickAutoCompletition(); }
void Chat::setChatTextEdited() { myChatTools->setChatTextEdited(); }
void Chat::transportMyStyle(GameTableStyleReader *s)
{
myChatTools->setMyStyle(s);
}
+2
View File
@@ -27,6 +27,7 @@
class gameTableImpl;
class ChatTools;
class ConfigFile;
class GameTableStyleReader;
class Chat : public QObject
{
@@ -44,6 +45,7 @@ public slots:
void checkInvisible();
void checkInputLength(QString);
void clearNewGame();
void transportMyStyle(GameTableStyleReader*);
ChatTools* getMyChatTools() const { return myChatTools; }
+10 -14
View File
@@ -87,6 +87,9 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
pixmapLabel_card0b->setMyW(this);
pixmapLabel_card0a->setMyW(this);
//set myStyle to widgets wich needs it
label_chance->setMyStyle(myGameTableStyle);
//Flipside festlegen;
if (myConfig->readConfigInt("FlipsideOwn") && myConfig->readConfigString("FlipsideOwnFile") != "") {
flipside = new QPixmap();
@@ -365,6 +368,7 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
// Dialogs
myChat = new Chat(this, myConfig);
myChat->transportMyStyle(myGameTableStyle);
lineEdit_ChatInput->installEventFilter(this);
this->installEventFilter(this);
@@ -2408,7 +2412,7 @@ void gameTableImpl::nextRoundCleanGui() {
//Clean breakbutton
if(myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_LOCAL) {
blinkingStartButtonAnimationTimer->stop();
pushButton_break->setStyleSheet("QPushButton { background-color: #145300; color: #99D500;}");
myGameTableStyle->setBreakButtonStyle(pushButton_break,0);
blinkingStartButtonAnimationTimer->stop();
QFontMetrics tempMetrics = this->fontMetrics();
int width = tempMetrics.width(tr("Stop"));
@@ -2494,7 +2498,7 @@ void gameTableImpl::breakButtonClicked() {
blinkingStartButtonAnimationTimer->stop();
//Set default Color
pushButton_break->setStyleSheet("QPushButton { background-color: #145300; color: #99D500;}");
myGameTableStyle->setBreakButtonStyle(pushButton_break,0);
QFontMetrics tempMetrics = this->fontMetrics();
int width = tempMetrics.width(tr("Stop"));
pushButton_break->setMinimumSize(width+10,20);
@@ -2713,11 +2717,11 @@ void gameTableImpl::blinkingStartButtonAnimationAction() {
QString style = pushButton_break->styleSheet();
if(style.contains("QPushButton { background-color: #145300;")) {
pushButton_break->setStyleSheet("QPushButton { background-color: #6E9E00; color: black;}");
if(style.contains("QPushButton:enabled { background-color: #145300;")) {
myGameTableStyle->setBreakButtonStyle(pushButton_break,1);
}
else {
pushButton_break->setStyleSheet("QPushButton { background-color: #145300; color: #99D500;}");
myGameTableStyle->setBreakButtonStyle(pushButton_break,0);
}
}
@@ -3164,13 +3168,6 @@ void gameTableImpl::refreshGameTableStyle()
myGameTableStyle->setChatStyle(textBrowser_Chat);
myGameTableStyle->setChatInputStyle(lineEdit_ChatInput);
#ifdef __APPLE__
// tabWidget_Right->setStyleSheet("QTabWidget { "+ font1String +" font-size: 11px; background-color: #145300; }");
// tabWidget_Left->setStyleSheet("QTabWidget { "+ font1String +" font-size: 11px; background-color: #145300;}");
#else
// tabWidget_Right->setStyleSheet("QTabWidget::pane { "+ font1String +" font-size: 10px; background-color: #145300; border: 1px solid #286400; border-radius: 2px; }");
// tabWidget_Left->setStyleSheet("QTabWidget::pane { border: 1px solid #286400; border-radius: 2px; background-color: #145300; }");
#endif
int i;
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
@@ -3196,7 +3193,7 @@ void gameTableImpl::refreshGameTableStyle()
myGameTableStyle->setCardHolderStyle(label_CardHolder4,2);
myGameTableStyle->setTableBackground(this);
myGameTableStyle->setMenuBarStyle(menubar);
myGameTableStyle->setBreakButtonStyle(pushButton_break);
myGameTableStyle->setBreakButtonStyle(pushButton_break,0);
myGameTableStyle->setSpeedStringStyle(label_speedString);
myGameTableStyle->setSpeedStringStyle(label_speedValue);
myGameTableStyle->setVoteButtonStyle(pushButton_voteOnKickYes);
@@ -3228,6 +3225,5 @@ void gameTableImpl::refreshGameTableStyle()
myGameTableStyle->setTabWidgetStyle(tabWidget_Right, tabWidget_Right->getMyTabBar());
myGameTableStyle->setTabWidgetStyle(tabWidget_Left, tabWidget_Left->getMyTabBar());
label_Handranking->setPixmap(myGameTableStyle->getHandRanking());
}
+2
View File
@@ -64,6 +64,8 @@ public:
SDLPlayer* getMySDLPlayer() const { return mySDLPlayer; }
Chat* getMyChat() const { return myChat; }
GameTableStyleReader* getMyGameTableStyle() const { return myGameTableStyle; }
void setSpeeds();
+6 -4
View File
@@ -24,12 +24,14 @@
#include <session.h>
#include <game.h>
#include <game_defs.h>
#include "gametablestylereader.h"
using namespace std;
Log::Log(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), myLogFile(0)
{
myW->setLog(this);
myStyle = myW->getMyGameTableStyle();
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
@@ -207,9 +209,9 @@ void Log::logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbNa
void Log::logPlayerWinsMsg(QString playerName, int pot, bool main) {
if(main) {
myW->textBrowser_Log->append("<span style=\"color:#FFFF00;\">"+playerName+" wins $"+QString::number(pot,10)+"</span>");
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogWinnerMainPotColor()+";\">"+playerName+" wins $"+QString::number(pot,10)+"</span>");
} else {
myW->textBrowser_Log->append("<span style=\"color:#FFFFCC;\">"+playerName+" wins $"+QString::number(pot,10)+" (side pot)</span>");
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogWinnerSidePotColor()+";\">"+playerName+" wins $"+QString::number(pot,10)+" (side pot)</span>");
}
if(myConfig->readConfigInt("LogOnOff")) {
@@ -231,7 +233,7 @@ void Log::logPlayerWinsMsg(QString playerName, int pot, bool main) {
void Log::logPlayerSitsOut(QString playerName) {
myW->textBrowser_Log->append("<i><span style=\"color:#FF6633;\">"+playerName+" sits out</span></i>");
myW->textBrowser_Log->append("<i><span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">"+playerName+" sits out</span></i>");
if(myConfig->readConfigInt("LogOnOff")) {
@@ -344,7 +346,7 @@ void Log::logPlayerLeftMsg(QString playerName, int wasKicked) {
void Log::logNewGameAdminMsg(QString playerName) {
myW->textBrowser_Log->append( "<i><span style=\"color:#69FF33;\">"+playerName+" is game admin now!</span></i>");
myW->textBrowser_Log->append( "<i><span style=\"color:#"+myStyle->getLogNewGameAdminColor()+";\">"+playerName+" is game admin now!</span></i>");
if(myConfig->readConfigInt("LogOnOff")) {
+3 -1
View File
@@ -28,7 +28,7 @@
#include <QtCore>
class gameTableImpl;
class GameTableStyleReader;
class Log : public QObject
{
@@ -87,6 +87,8 @@ private:
QString logFileStreamString;
QString myAppDataPath;
GameTableStyleReader *myStyle;
friend class GuiWrapper;
};
+2 -2
View File
@@ -10,7 +10,7 @@
//
//
#include "myactionbutton.h"
#include "gametablestylereader.h"
using namespace std;
@@ -30,7 +30,7 @@ void MyActionButton::paintEvent(QPaintEvent * event) {
QPushButton::paintEvent(event);
QPainter painter(this);
painter.setPen(QColor(240,240,240));
painter.setPen(QColor("#"+myStyle->getFKeyIndicatorColor()));
painter.setOpacity(0.5);
QFont f= painter.font();
f.setPixelSize(9);
+5
View File
@@ -15,6 +15,8 @@
#include <QtGui>
#include <QtCore>
class GameTableStyleReader;
class MyActionButton : public QPushButton
{
public:
@@ -25,9 +27,12 @@ public:
void paintEvent(QPaintEvent * event);
void setFKeyText ( const QString& theValue ){fKeyText = theValue;}
void setMyStyle ( GameTableStyleReader* theValue ) { myStyle = theValue; }
private:
QString fKeyText;
GameTableStyleReader *myStyle;
};
#endif
+26 -21
View File
@@ -11,11 +11,13 @@
//
#include "mychancelabel.h"
#include "gametableimpl.h"
#include "gametablestylereader.h"
using namespace std;
MyChanceLabel::MyChanceLabel(QWidget* parent)
: QLabel(parent) {
: QLabel(parent), myW(0), myStyle(0)
{
}
@@ -70,44 +72,47 @@ void MyChanceLabel::paintEvent(QPaintEvent * /*event*/) {
painter.setFont(font);
//Draw Texts
if(RFChance[1] == 0) { painter.setPen(QColor(85,99,47)); }
else { painter.setPen(QColor(156,213,0)); }
QColor possible("#"+myStyle->getChanceLabelPossibleColor());
QColor impossible("#"+myStyle->getChanceLabelImpossibleColor());
if(RFChance[1] == 0) { painter.setPen(impossible); }
else { painter.setPen(possible); }
painter.drawText(QRectF(QPointF(2,0), QPointF(85,13)),Qt::AlignRight,"Royal Flush");
painter.drawText(QRectF(QPointF(196,0), QPointF(236,13)),Qt::AlignRight,QString("%1%").arg(RFChance[0]));
if(SFChance[1] == 0) { painter.setPen(QColor(85,99,47)); }
else { painter.setPen(QColor(156,213,0)); }
if(SFChance[1] == 0) { painter.setPen(impossible); }
else { painter.setPen(possible); }
painter.drawText(QRectF(QPointF(2,13), QPointF(85,26)),Qt::AlignRight,"Straight Flush");
painter.drawText(QRectF(QPointF(196,13), QPointF(236,26)),Qt::AlignRight,QString("%1%").arg(SFChance[0]));
if(FOAKChance[1] == 0) { painter.setPen(QColor(85,99,47)); }
else { painter.setPen(QColor(156,213,0)); }
if(FOAKChance[1] == 0) { painter.setPen(impossible); }
else { painter.setPen(possible); }
painter.drawText(QRectF(QPointF(2,26), QPointF(85,39)),Qt::AlignRight,"Four of a Kind");
painter.drawText(QRectF(QPointF(196,26), QPointF(236,39)),Qt::AlignRight,QString("%1%").arg(FOAKChance[0]));
if(FHChance[1] == 0) { painter.setPen(QColor(85,99,47)); }
else { painter.setPen(QColor(156,213,0)); }
if(FHChance[1] == 0) { painter.setPen(impossible); }
else { painter.setPen(possible); }
painter.drawText(QRectF(QPointF(2,39), QPointF(85,52)),Qt::AlignRight,"Full House");
painter.drawText(QRectF(QPointF(196,39), QPointF(236,52)),Qt::AlignRight,QString("%1%").arg(FHChance[0]));
if(FLChance[1] == 0) { painter.setPen(QColor(85,99,47)); }
else { painter.setPen(QColor(156,213,0)); }
if(FLChance[1] == 0) { painter.setPen(impossible); }
else { painter.setPen(possible); }
painter.drawText(QRectF(QPointF(2,52), QPointF(85,65)),Qt::AlignRight,"Flush");
painter.drawText(QRectF(QPointF(196,52), QPointF(236,65)),Qt::AlignRight,QString("%1%").arg(FLChance[0]));
if(STRChance[1] == 0) { painter.setPen(QColor(85,99,47)); }
else { painter.setPen(QColor(156,213,0)); }
if(STRChance[1] == 0) { painter.setPen(impossible); }
else { painter.setPen(possible); }
painter.drawText(QRectF(QPointF(2,65), QPointF(85,78)),Qt::AlignRight,"Straight");
painter.drawText(QRectF(QPointF(196,65), QPointF(236,78)),Qt::AlignRight,QString("%1%").arg(STRChance[0]));
if(TOAKChance[1] == 0) { painter.setPen(QColor(85,99,47)); }
else { painter.setPen(QColor(156,213,0)); }
if(TOAKChance[1] == 0) { painter.setPen(impossible); }
else { painter.setPen(possible); }
painter.drawText(QRectF(QPointF(2,78), QPointF(85,91)),Qt::AlignRight,"Three of a Kind");
painter.drawText(QRectF(QPointF(196,78), QPointF(236,91)),Qt::AlignRight,QString("%1%").arg(TOAKChance[0]));
if(TPChance[1] == 0) { painter.setPen(QColor(85,99,47)); }
else { painter.setPen(QColor(156,213,0)); }
if(TPChance[1] == 0) { painter.setPen(impossible); }
else { painter.setPen(possible); }
painter.drawText(QRectF(QPointF(2,91), QPointF(85,104)),Qt::AlignRight,"Two Pairs");
painter.drawText(QRectF(QPointF(196,91), QPointF(236,104)),Qt::AlignRight,QString("%1%").arg(TPChance[0]));
if(OPChance[1] == 0) { painter.setPen(QColor(85,99,47)); }
else { painter.setPen(QColor(156,213,0)); }
if(OPChance[1] == 0) { painter.setPen(impossible); }
else { painter.setPen(possible); }
painter.drawText(QRectF(QPointF(2,104), QPointF(85,117)),Qt::AlignRight,"One Pair");
painter.drawText(QRectF(QPointF(196,104), QPointF(236,117)),Qt::AlignRight,QString("%1%").arg(OPChance[0]));
if(HCChance[1] == 0) { painter.setPen(QColor(85,99,47)); }
else { painter.setPen(QColor(156,213,0)); }
if(HCChance[1] == 0) { painter.setPen(impossible); }
else { painter.setPen(possible); }
painter.drawText(QRectF(QPointF(2,117), QPointF(85,130)),Qt::AlignRight,"Highest Card");
painter.drawText(QRectF(QPointF(196,117), QPointF(236,130)),Qt::AlignRight,QString("%1%").arg(HCChance[0]));
+3
View File
@@ -18,6 +18,7 @@
#include <QtCore>
class gameTableImpl;
class GameTableStyleReader;
class MyChanceLabel : public QLabel
{
@@ -28,6 +29,7 @@ public:
~MyChanceLabel();
void setMyW ( gameTableImpl* theValue ) { myW = theValue; }
void setMyStyle ( GameTableStyleReader* theValue ) { myStyle = theValue; }
void paintEvent(QPaintEvent * event);
void refreshChance(std::vector< std::vector<int> >);
void resetChance();
@@ -35,6 +37,7 @@ public:
private:
gameTableImpl *myW;
GameTableStyleReader *myStyle;
int RFChance[2];
int SFChance[2];
int FOAKChance[2];
+59 -15
View File
@@ -105,16 +105,19 @@ void GameTableStyleReader::readStyleFile(QString file) {
if (tmpStr1) {
tempString1 = tmpStr1;
// INFOS
if(itemsList->ValueStr() == "StyleDescription") { StyleDescription = QString::fromUtf8(tempString1.c_str()); }
else if(itemsList->ValueStr() == "StyleMaintainerEMail") { StyleMaintainerEMail = QString::fromUtf8(tempString1.c_str()); }
// WINDOWS SETTINGS
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()); }
// PICS
else if (itemsList->ValueStr() == "Preview") { Preview = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "IfFixedWindowSize") { IfFixedWindowSize = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "FixedWindowWidth") { FixedWindowWidth = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "FixedWindowHeight") { FixedWindowHeight = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "MinimumWindowWidth") { MinimumWindowWidth = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "MinimumWindowHeight") { MinimumWindowHeight = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "MaximumWindowWidth") { MaximumWindowWidth = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "MaximumWindowHeight") { MaximumWindowHeight = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "ActionAllIn") { ActionAllIn = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "ActionRaise") { ActionRaise = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "ActionBet") { ActionBet = currentDir+QString::fromUtf8(tempString1.c_str()); }
@@ -150,7 +153,21 @@ void GameTableStyleReader::readStyleFile(QString file) {
else if (itemsList->ValueStr() == "Table") { Table = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "HandRanking") { HandRanking = currentDir+QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "ToolBoxBackground") { ToolBoxBackground = currentDir+QString::fromUtf8(tempString1.c_str()); }
// COLORS
else if (itemsList->ValueStr() == "FKeyIndicatorColor") { FKeyIndicatorColor = QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "ChanceLabelPossibleColor") { ChanceLabelPossibleColor = QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "ChanceLabelImpossibleColor") { ChanceLabelImpossibleColor = QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "ChatTextNickNotifyColor") { ChatTextNickNotifyColor = QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "ChatTextColor") { ChatTextColor = QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "LogTextColor") { LogTextColor = QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "LogWinnerMainPotColor") { LogWinnerMainPotColor = QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "LogWinnerSidePotColor") { LogWinnerSidePotColor = QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "LogPlayerSitsOutColor") { LogPlayerSitsOutColor = QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "LogNewGameAdminColor") { LogNewGameAdminColor = QString::fromUtf8(tempString1.c_str()); }
// SIZES
else if (itemsList->ValueStr() == "ChatTextSize") { ChatTextSize = QString::fromUtf8(tempString1.c_str()); }
else if (itemsList->ValueStr() == "LogTextSize") { LogTextSize = QString::fromUtf8(tempString1.c_str()); }
// std::cout << "ÖLP" << itemsList->ValueStr() <<"§4s"<< itemsList->ValueStr()<<"§89"<< endl;
}
}
@@ -196,10 +213,24 @@ void GameTableStyleReader::readStyleFile(QString file) {
if(PlayerSeatActive == "") { wrongItems << "PlayerSeatActive"; }
if(PlayerSeatInActive == "") { wrongItems << "PlayerSeatInActive"; }
if(Table == "") { wrongItems << "Table"; }
if(HandRanking == "") { wrongItems << "HandRanking"; }
if(ToolBoxBackground == "") { wrongItems << "ToolBoxBackground"; }
if(FKeyIndicatorColor == "") { wrongItems << "FKeyIndicatorColor"; }
if(ChanceLabelPossibleColor == "") { wrongItems << "ChanceLabelPossibleColor"; }
if(ChanceLabelImpossibleColor == "") { wrongItems << "ChanceLabelImpossibleColor"; }
if(ChatTextColor == "") { wrongItems << "ChatTextColor"; }
if(ChatTextNickNotifyColor == "") { wrongItems << "ChatTextNickNotifyColor"; }
if(LogTextColor == "") { wrongItems << "LogTextColor"; }
if(LogWinnerMainPotColor == "") { wrongItems << "LogWinnerMainPotColor"; }
if(LogWinnerSidePotColor == "") { wrongItems << "LogWinnerSidePotColor"; }
if(LogPlayerSitsOutColor == "") { wrongItems << "LogPlayerSitsOutColor"; }
if(LogNewGameAdminColor == "") { wrongItems << "LogNewGameAdminColor"; }
if(ChatTextSize == "") { wrongItems << "ChatTextSize"; }
if(LogTextSize == "") { wrongItems << "LogTextSize"; }
//if one or more items are wrong or left show detailed error message
if(!wrongItems.isEmpty() && myW != 0) showErrorMessage(StyleDescription, wrongItems, StyleMaintainerEMail);
}
}
else { qDebug() << "could not load game table style file: " << tinyFileName.c_str(); }
}
@@ -219,13 +250,13 @@ void GameTableStyleReader::setTableBackground(gameTableImpl *gt)
void GameTableStyleReader::setLogStyle(QTextBrowser *tb)
{
tb->setStyleSheet("QTextBrowser { "+ font1String +" font-size: "+textBrowserFontsize+"px; color: #F0F0F0; background-color: #1D3B00; border:none; } QScrollBar:vertical { border: 1px solid #104600; background: #135000; width: 15px; margin: 17px -1px 17px 0px; } QScrollBar::handle:vertical { border-radius: 1px; border: 1px solid #1B7200; background: #176400; min-height: 20px; } QScrollBar::add-line:vertical { margin-right: 0px; margin-left: 1px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; border-top-right-radius: 1px; border-top-left-radius: 1px; border: 1px solid #1E7F00; background: #1A6F00; height: 15px; subcontrol-position: bottom; subcontrol-origin: margin; } QScrollBar::sub-line:vertical { margin-right: 0px; margin-left: 1px; border-bottom-right-radius: 1px; border-bottom-left-radius: 1px; border-top-right-radius: 2px; border-top-left-radius: 2px; border: 1px solid #1E7F00; background: #1A6F00; height: 15px; subcontrol-position: top; subcontrol-origin: margin; } QScrollBar:up-arrow:vertical, QScrollBar::down-arrow:vertical { border: 1px solid #208A00; height: 3px; width: 3px; background: #27A800; } QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; }");
tb->setStyleSheet("QTextBrowser { "+ font1String +" font-size: "+LogTextSize+"px; color: #F0F0F0; background-color: #1D3B00; border:none; } QScrollBar:vertical { border: 1px solid #104600; background: #135000; width: 15px; margin: 17px -1px 17px 0px; } QScrollBar::handle:vertical { border-radius: 1px; border: 1px solid #1B7200; background: #176400; min-height: 20px; } QScrollBar::add-line:vertical { margin-right: 0px; margin-left: 1px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; border-top-right-radius: 1px; border-top-left-radius: 1px; border: 1px solid #1E7F00; background: #1A6F00; height: 15px; subcontrol-position: bottom; subcontrol-origin: margin; } QScrollBar::sub-line:vertical { margin-right: 0px; margin-left: 1px; border-bottom-right-radius: 1px; border-bottom-left-radius: 1px; border-top-right-radius: 2px; border-top-left-radius: 2px; border: 1px solid #1E7F00; background: #1A6F00; height: 15px; subcontrol-position: top; subcontrol-origin: margin; } QScrollBar:up-arrow:vertical, QScrollBar::down-arrow:vertical { border: 1px solid #208A00; height: 3px; width: 3px; background: #27A800; } QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; }");
}
void GameTableStyleReader::setChatStyle(QTextBrowser *tb)
{
tb->setStyleSheet("QTextBrowser { "+ font1String +" font-size: "+textBrowserFontsize+"px; color: #F0F0F0; background-color: #1D3B00; border:none; } QScrollBar:vertical { border: 1px solid #104600; background: #135000; width: 15px; margin: 17px -1px 17px 0px; } QScrollBar::handle:vertical { border-radius: 1px; border: 1px solid #1B7200; background: #176400; min-height: 20px; } QScrollBar::add-line:vertical { margin-right: 0px; margin-left: 1px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; border-top-right-radius: 1px; border-top-left-radius: 1px; border: 1px solid #1E7F00; background: #1A6F00; height: 15px; subcontrol-position: bottom; subcontrol-origin: margin; } QScrollBar::sub-line:vertical { margin-right: 0px; margin-left: 1px; border-bottom-right-radius: 1px; border-bottom-left-radius: 1px; border-top-right-radius: 2px; border-top-left-radius: 2px; border: 1px solid #1E7F00; background: #1A6F00; height: 15px; subcontrol-position: top; subcontrol-origin: margin; } QScrollBar:up-arrow:vertical, QScrollBar::down-arrow:vertical { border: 1px solid #208A00; height: 3px; width: 3px; background: #27A800; } QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; }");
tb->setStyleSheet("QTextBrowser { "+ font1String +" font-size: "+ChatTextSize+"px; color: #F0F0F0; background-color: #1D3B00; border:none; } QScrollBar:vertical { border: 1px solid #104600; background: #135000; width: 15px; margin: 17px -1px 17px 0px; } QScrollBar::handle:vertical { border-radius: 1px; border: 1px solid #1B7200; background: #176400; min-height: 20px; } QScrollBar::add-line:vertical { margin-right: 0px; margin-left: 1px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; border-top-right-radius: 1px; border-top-left-radius: 1px; border: 1px solid #1E7F00; background: #1A6F00; height: 15px; subcontrol-position: bottom; subcontrol-origin: margin; } QScrollBar::sub-line:vertical { margin-right: 0px; margin-left: 1px; border-bottom-right-radius: 1px; border-bottom-left-radius: 1px; border-top-right-radius: 2px; border-top-left-radius: 2px; border: 1px solid #1E7F00; background: #1A6F00; height: 15px; subcontrol-position: top; subcontrol-origin: margin; } QScrollBar:up-arrow:vertical, QScrollBar::down-arrow:vertical { border: 1px solid #208A00; height: 3px; width: 3px; background: #27A800; } QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; }");
}
void GameTableStyleReader::setChatInputStyle(QLineEdit *ci)
@@ -275,9 +306,17 @@ void GameTableStyleReader::setMenuBarStyle(QMenuBar *mb)
mb->setStyleSheet("QMenuBar { background-color: #145300; } QMenuBar::item { color: #99D500; }");
}
void GameTableStyleReader::setBreakButtonStyle(QPushButton *bb)
void GameTableStyleReader::setBreakButtonStyle(QPushButton *bb, int state)
{
bb->setStyleSheet("QPushButton:enabled { background-color: #145300; color: #99D500;} QPushButton:disabled { background-color: #145300; color: #486F3E; font-weight: 900;}");
switch(state) {
// default
case 0: bb->setStyleSheet("QPushButton:enabled { background-color: #145300; color: #99D500;} QPushButton:disabled { background-color: #145300; color: #486F3E; font-weight: 900;}");
break;
// blink
case 1: bb->setStyleSheet("QPushButton { background-color: #6E9E00; color: black;}");
break;
}
}
void GameTableStyleReader::setSpeedStringStyle(QLabel *l)
@@ -337,8 +376,13 @@ QString GameTableStyleReader::getActionPic(int action)
}
}
void GameTableStyleReader::setButtonsStyle(QPushButton *br, QPushButton *cc, QPushButton *f, QPushButton *a, int state)
void GameTableStyleReader::setButtonsStyle(MyActionButton *br, MyActionButton *cc, MyActionButton *f, MyActionButton *a, int state)
{
br->setMyStyle(this);
cc->setMyStyle(this);
f->setMyStyle(this);
a->setMyStyle(this);
switch(state) {
//default
case 0: {
+34 -4
View File
@@ -27,6 +27,8 @@
#include <QtCore>
#include <QtGui>
class gameTableImpl;
class GameTableStyleReader : public QObject {
Q_OBJECT
public:
@@ -45,6 +47,11 @@ public:
QString getSmallBlindPuck() const { return SmallBlindPuck; }
QString getBigBlindPuck() const { return BigBlindPuck; }
QString getHandRanking() const { return HandRanking; }
QString getFKeyIndicatorColor() const { return FKeyIndicatorColor; }
QString getChanceLabelImpossibleColor() const { return ChanceLabelImpossibleColor; }
QString getChanceLabelPossibleColor() const { return ChanceLabelPossibleColor; }
QString getChatTextColor() const { return ChatTextColor; }
QString getChatTextNickNotifyColor() const { return ChatTextNickNotifyColor; }
QString getActionPic(int);
@@ -67,7 +74,7 @@ public:
void setSmallFontBoardStyle(QLabel*);
void setBigFontBoardStyle(QLabel*);
void setMenuBarStyle(QMenuBar*);
void setBreakButtonStyle(QPushButton*);
void setBreakButtonStyle(QPushButton*, int);
void setSpeedStringStyle(QLabel*);
void setVoteButtonStyle(QPushButton*);
void setVoteStringsStyle(QLabel*);
@@ -76,14 +83,20 @@ public:
void setTabWidgetStyle(QTabWidget*, QTabBar*);
//set pics and fonts and colors
void setButtonsStyle(QPushButton*, QPushButton*, QPushButton*, QPushButton*, int);
void setButtonsStyle(MyActionButton*, MyActionButton*, MyActionButton*, MyActionButton*, int);
void setAwayRadioButtonsStyle(QRadioButton*);
QString getLogWinnerMainPotColor() const { return LogWinnerMainPotColor; }
QString getLogWinnerSidePotColor() const { return LogWinnerSidePotColor; }
QString getLogPlayerSitsOutColor() const { return LogPlayerSitsOutColor; }
QString getLogNewGameAdminColor() const { return LogNewGameAdminColor; }
private:
//style values
// INFOS
QString StyleDescription;
QString StyleMaintainerEMail;
QString Preview;
// WINDOWS SETTINGS
QString IfFixedWindowSize;
QString FixedWindowWidth;
QString FixedWindowHeight;
@@ -91,6 +104,8 @@ private:
QString MinimumWindowHeight;
QString MaximumWindowWidth;
QString MaximumWindowHeight;
// PICS
QString Preview;
QString ActionAllIn;
QString ActionRaise;
QString ActionBet;
@@ -126,7 +141,22 @@ private:
QString Table;
QString HandRanking;
QString ToolBoxBackground;
// COLORS
QString FKeyIndicatorColor;
QString ChanceLabelPossibleColor;
QString ChanceLabelImpossibleColor;
QString ChatTextColor;
QString ChatTextNickNotifyColor;
QString LogTextColor;
QString LogWinnerMainPotColor;
QString LogWinnerSidePotColor;
QString LogPlayerSitsOutColor;
QString LogNewGameAdminColor;
// SIZES
QString ChatTextSize;
QString LogTextSize;
//internal
QString font2String;
QString font1String;
QString textBrowserFontsize;