qslider (no allin possible) bugfix, fadeout android bugfix, gui tweaks

for android
This commit is contained in:
doitux
2012-05-22 00:48:35 +02:00
parent 93aaabdef3
commit 4bb22ff89c
14 changed files with 920 additions and 775 deletions
+11 -4
View File
@@ -67,7 +67,9 @@ INCLUDEPATH += . \
src/gui/qt/internetgamelogindialog \
src/gui/qt/mymessagedialog \
src/gui/qt/gamelobbydialog \
src/gui/qt/timeoutmsgbox
src/gui/qt/timeoutmsgbox \
src/gui/qt/mymessagebox
DEPENDPATH += . \
src \
src/config \
@@ -105,7 +107,8 @@ DEPENDPATH += . \
src/gui/qt/changecompleteblindsdialog \
src/gui/qt/mymessagedialog \
src/gui/qt/gamelobbydialog \
src/gui/qt/timeoutmsgbox
src/gui/qt/timeoutmsgbox \
src/gui/qt/mymessagebox
# Input
HEADERS += src/engine/game.h \
@@ -203,7 +206,8 @@ HEADERS += src/engine/game.h \
src/gui/qt/gamelobbydialog/mynicklistsortfilterproxymodel.h \
src/gui/qt/gametable/myslider.h \
src/gui/qt/gametable/mycashlabel.h \
src/gui/qt/sound/soundevents.h
src/gui/qt/sound/soundevents.h \
src/gui/qt/mymessagebox/mymessagebox.h
!gui_800x480 {
FORMS += src/gui/qt/gametable.ui \
@@ -278,7 +282,8 @@ SOURCES += src/pokerth.cpp \
src/gui/qt/gamelobbydialog/mynicklistsortfilterproxymodel.cpp \
src/net/common/servermanagerfactoryclient.cpp \
src/gui/qt/gametable/mycashlabel.cpp \
src/gui/qt/sound/soundevents.cpp
src/gui/qt/sound/soundevents.cpp \
src/gui/qt/mymessagebox/mymessagebox.cpp
TRANSLATIONS = ts/pokerth_af.ts \
ts/pokerth_bg.ts \
ts/pokerth_zhcn.ts \
@@ -611,3 +616,5 @@ android{
INCLUDEPATH += src/third_party/sqlite3
}
@@ -46,7 +46,9 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
//wait start game message
waitStartGameMsgBox = new MyMessageBox(this);
waitStartGameMsgBox->setText(tr("Starting game. Please wait ..."));
waitStartGameMsgBox->setWindowModality(Qt::NonModal);
#ifndef ANDROID
waitRejoinStartGameMsgBox->setWindowModality(Qt::NonModal);
#endif
#ifdef __APPLE__
waitStartGameMsgBox->setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
#endif
@@ -55,7 +57,9 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
//wait start game message for rejoin
waitRejoinStartGameMsgBox = new MyMessageBox(this);
waitRejoinStartGameMsgBox->setText(tr("Waiting for the start of the next hand to rejoin the game ..."));
waitRejoinStartGameMsgBox->setWindowModality(Qt::NonModal);
#ifndef ANDROID
waitRejoinStartGameMsgBox->setWindowModality(Qt::NonModal);
#endif
#ifdef __APPLE__
waitRejoinStartGameMsgBox->setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
#endif
@@ -1712,7 +1716,13 @@ void gameLobbyDialogImpl::showAutoStartTimer()
autoStartTimerOverlay->setGeometry(((scrollArea_gameInfos->geometry().width()-190)/2), ((scrollArea_gameInfos->geometry().height()-50)/2), 190, 50);
QString string(tr("The game will start in<br><b>%1</b> seconds.").arg(6));
autoStartTimerOverlay->setText("<span style='color:#008B00; font-size:10px;'>"+string+"</span>");
QString fontsize;
#ifdef ANDROID
fontsize="16px";
#else
fontsize="10px";
#endif
autoStartTimerOverlay->setText("<span style='color:#008B00; font-size:"+fontsize+";'>"+string+"</span>");
autoStartTimerCounter = 6;
autoStartTimer->start(1000);
@@ -1723,7 +1733,13 @@ void gameLobbyDialogImpl::updateAutoStartTimer()
--autoStartTimerCounter;
if(autoStartTimerCounter) {
QString string(tr("The game will start in<br><b>%1</b> seconds.").arg(autoStartTimerCounter));
autoStartTimerOverlay->setText("<span style='color:#008B00; font-size:10px;'>"+string+"</span>");
QString fontsize;
#ifdef ANDROID
fontsize="16px";
#else
fontsize="10px";
#endif
autoStartTimerOverlay->setText("<span style='color:#008B00; font-size:"+fontsize+";'>"+string+"</span>");
} else {
autoStartTimer->stop();
autoStartTimerOverlay->hide();
+60 -48
View File
@@ -94,7 +94,11 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
//set myStyle to widgets wich needs it
#ifdef GUI_800x480
tabsDiag = new QDialog(this);
tabs.setupUi(tabsDiag);
tabs.setupUi(tabsDiag);
#ifdef ANDROID
tabsDiag->setStyleSheet("QDialog { font: 26px; background-image: url(\""+myGameTableStyle->getTable()+"\"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
tabs.frame->setStyleSheet("QObject { background-color: rgba(0, 0, 0, 100); }");
#endif
tabs.label_chance->setMyStyle(myGameTableStyle);
#else
label_chance->setMyStyle(myGameTableStyle);
@@ -479,15 +483,12 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
// Dialogs
#ifdef GUI_800x480
myChat = new ChatTools(tabs.lineEdit_ChatInput, myConfig, INGAME_CHAT, tabs.textBrowser_Chat);
myChat->setMyStyle(myGameTableStyle);
tabs.lineEdit_ChatInput->installEventFilter(this);
#else
myChat = new ChatTools(lineEdit_ChatInput, myConfig, INGAME_CHAT, textBrowser_Chat);
#endif
myChat->setMyStyle(myGameTableStyle);
#ifdef GUI_800x480
tabs.lineEdit_ChatInput->installEventFilter(this);
#else
lineEdit_ChatInput->installEventFilter(this);
myChat->setMyStyle(myGameTableStyle);
lineEdit_ChatInput->installEventFilter(this);
#endif
this->installEventFilter(this);
@@ -507,8 +508,8 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
//hide left and right icon and menubar from maemo gui for ANDROID
#ifdef ANDROID
fullscreenButton->hide();
tabsButton->hide();
menubar->hide();
menubar->hide();
// tabsButton->hide();
#endif
//Connects
@@ -3728,53 +3729,61 @@ void gameTableImpl::closeGameTable()
void gameTableImpl::changeSpinBoxBetValue(int value)
{
if(betSliderChangedByInput) {
//prevent interval cutting of spinBox_betValue input from code below
betSliderChangedByInput = FALSE;
}
else {
if(betSliderChangedByInput) {
//prevent interval cutting of spinBox_betValue input from code below
betSliderChangedByInput = FALSE;
} else {
int temp;
if(horizontalSlider_bet->maximum() <= 1000 ) {
temp = (int)((value/10)*10);
} else if(horizontalSlider_bet->maximum() > 1000 && horizontalSlider_bet->maximum() <= 10000) {
temp = (int)((value/50)*50);
} else if(horizontalSlider_bet->maximum() > 10000 && horizontalSlider_bet->maximum() <= 100000) {
temp = (int)((value/500)*500);
} else {
temp = (int)((value/5000)*5000);
}
if(horizontalSlider_bet->value() == horizontalSlider_bet->maximum()) {
if(temp < horizontalSlider_bet->minimum())
spinBox_betValue->setValue(horizontalSlider_bet->minimum());
else
spinBox_betValue->setValue(temp);
}
spinBox_betValue->setValue(horizontalSlider_bet->value());
}
else {
int temp;
if(horizontalSlider_bet->maximum() <= 1000 ) {
temp = (int)((value/10)*10);
} else if(horizontalSlider_bet->maximum() > 1000 && horizontalSlider_bet->maximum() <= 10000) {
temp = (int)((value/50)*50);
} else if(horizontalSlider_bet->maximum() > 10000 && horizontalSlider_bet->maximum() <= 100000) {
temp = (int)((value/500)*500);
} else {
temp = (int)((value/5000)*5000);
}
if(temp < horizontalSlider_bet->minimum())
spinBox_betValue->setValue(horizontalSlider_bet->minimum());
else
spinBox_betValue->setValue(temp);
}
}
}
void gameTableImpl::spinBoxBetValueChanged(int value)
{
if(horizontalSlider_bet->isEnabled()) {
if(horizontalSlider_bet->isEnabled()) {
QString betRaise = pushButton_BetRaise->text().section("\n",0 ,0);
QString betRaise = pushButton_BetRaise->text().section("\n",0 ,0);
if(value >= horizontalSlider_bet->minimum()) {
if(value >= horizontalSlider_bet->minimum()) {
if(value > horizontalSlider_bet->maximum()) { // print the maximum
pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(horizontalSlider_bet->maximum()));
betSliderChangedByInput = TRUE;
horizontalSlider_bet->setValue(horizontalSlider_bet->maximum());
} else { // really print the value
pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(value));
betSliderChangedByInput = TRUE;
horizontalSlider_bet->setValue(value);
}
} else { // print the minimum
pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(horizontalSlider_bet->minimum()));
betSliderChangedByInput = TRUE;
horizontalSlider_bet->setValue(horizontalSlider_bet->minimum());
}
}
if(value > horizontalSlider_bet->maximum()) { // print the maximum
pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(horizontalSlider_bet->maximum()));
betSliderChangedByInput = TRUE;
horizontalSlider_bet->setValue(horizontalSlider_bet->maximum());
} else { // really print the value
pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(value));
betSliderChangedByInput = TRUE;
horizontalSlider_bet->setValue(value);
}
} else { // print the minimum
pushButton_BetRaise->setText(betRaise + "\n$" + QString("%L1").arg(horizontalSlider_bet->minimum()));
betSliderChangedByInput = TRUE;
horizontalSlider_bet->setValue(horizontalSlider_bet->minimum());
}
}
}
void gameTableImpl::leaveCurrentNetworkGame()
@@ -4018,7 +4027,9 @@ void gameTableImpl::refreshGameTableStyle()
{
myGameTableStyle->setWindowsGeometry(this);
#ifdef GUI_800x480
// myGameTableStyle->setChatLogStyle(textBrowser_Log);
#ifdef ANDROID
myGameTableStyle->setChatLogStyle(tabs.textBrowser_Log);
#endif
myGameTableStyle->setChatLogStyle(tabs.textBrowser_Chat);
myGameTableStyle->setChatLogStyle(tabs.textEdit_tipInput);
myGameTableStyle->setChatInputStyle(tabs.lineEdit_ChatInput);
@@ -4351,6 +4362,7 @@ void gameTableImpl::enableCallCheckPushButton()
void gameTableImpl::tabsButtonClicked()
{
tabsDiag->setParent(this, Qt::Dialog);
tabsDiag->showFullScreen();
tabsDiag->show();
tabsDiag->raise();
tabsDiag->activateWindow();
@@ -260,3 +260,12 @@ void MyCardsPixmapLabel::mouseReleaseEvent(QMouseEvent * event)
QLabel::mouseReleaseEvent(event);
}
void MyCardsPixmapLabel::setFront ( const QPixmap& theValue )
{
#ifdef GUI_800x480
front = theValue.scaled(width(), height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);;
#else
front = theValue;
#endif
}
+1 -3
View File
@@ -81,9 +81,7 @@ public slots:
void mousePressEvent ( QMouseEvent *);
void mouseReleaseEvent ( QMouseEvent *);
void setFront ( const QPixmap& theValue ) {
front = theValue;
}
void setFront ( const QPixmap& theValue );
private:
@@ -971,7 +971,14 @@
</size>
</property>
<property name="styleSheet">
<string notr="true">QObject {color:rgb(255, 255, 255); font: 14px}</string>
<string notr="true">QObject {font: 14px}</string>
</property>
<property name="html">
<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-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
+32 -53
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1024</width>
<height>600</height>
<width>800</width>
<height>424</height>
</rect>
</property>
<property name="minimumSize">
@@ -4211,57 +4211,30 @@ p, li { white-space: pre-wrap; }
<property name="spacing">
<number>0</number>
</property>
<item>
<spacer name="verticalSpacer_9">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>47</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="verticalSpacer_15">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="tabsButton">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>50</height>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="text">
<string/>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../resources/pokerth_android.qrc">
<normaloff>:/gfx/preferences-desktop_50x50.png</normaloff>:/gfx/preferences-desktop_50x50.png</iconset>
<property name="styleSheet">
<string notr="true">QPushButton { border:none; background-image: url(&quot;:/gfx/tab-new-background.png&quot;); background-repeat: no-repeat; background-position: center center;}</string>
</property>
<property name="iconSize">
<size>
<width>50</width>
<height>50</height>
<width>48</width>
<height>48</height>
</size>
</property>
</widget>
@@ -4273,9 +4246,12 @@ p, li { white-space: pre-wrap; }
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>20</width>
<height>20</height>
</size>
</property>
@@ -4299,9 +4275,12 @@ p, li { white-space: pre-wrap; }
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>22</width>
<width>40</width>
<height>57</height>
</size>
</property>
@@ -4396,7 +4375,7 @@ p, li { white-space: pre-wrap; }
<string/>
</property>
<property name="icon">
<iconset resource="../resources/pokerth_android.qrc">
<iconset resource="../resources/pokerth.qrc">
<normaloff>:/gfx/view-fullscreen_50x50.png</normaloff>:/gfx/view-fullscreen_50x50.png</iconset>
</property>
<property name="iconSize">
@@ -4495,7 +4474,7 @@ p, li { white-space: pre-wrap; }
<widget class="Slider" name="horizontalSlider_bet">
<property name="minimumSize">
<size>
<width>220</width>
<width>160</width>
<height>60</height>
</size>
</property>
@@ -4563,7 +4542,7 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
<width>1024</width>
<width>800</width>
<height>26</height>
</rect>
</property>
@@ -4631,7 +4610,7 @@ p, li { white-space: pre-wrap; }
</action>
<action name="actionFullScreen">
<property name="icon">
<iconset resource="../resources/pokerth_android.qrc">
<iconset resource="../resources/pokerth.qrc">
<normaloff>:/gfx/view-fullscreen.png</normaloff>:/gfx/view-fullscreen.png</iconset>
</property>
<property name="text">
@@ -4689,7 +4668,7 @@ p, li { white-space: pre-wrap; }
</action>
<action name="actionConfigure_PokerTH">
<property name="icon">
<iconset resource="../resources/pokerth_android.qrc">
<iconset resource="../resources/pokerth.qrc">
<normaloff>:/gfx/systemsettings.png</normaloff>:/gfx/systemsettings.png</iconset>
</property>
<property name="text">
@@ -4698,7 +4677,7 @@ p, li { white-space: pre-wrap; }
</action>
<action name="actionClose">
<property name="icon">
<iconset resource="../resources/pokerth_android.qrc">
<iconset resource="../resources/pokerth.qrc">
<normaloff>:/gfx/application_exit.png</normaloff>:/gfx/application_exit.png</iconset>
</property>
<property name="text">
@@ -4718,6 +4697,11 @@ p, li { white-space: pre-wrap; }
</action>
</widget>
<customwidgets>
<customwidget>
<class>Slider</class>
<extends>QSlider</extends>
<header>myslider.h</header>
</customwidget>
<customwidget>
<class>MySetLabel</class>
<extends>QLabel</extends>
@@ -4758,11 +4742,6 @@ p, li { white-space: pre-wrap; }
<extends>QLabel</extends>
<header>mynamelabel.h</header>
</customwidget>
<customwidget>
<class>Slider</class>
<extends>QSlider</extends>
<header>myslider.h</header>
</customwidget>
<customwidget>
<class>MyCashLabel</class>
<extends>QLabel</extends>
@@ -4770,7 +4749,7 @@ p, li { white-space: pre-wrap; }
</customwidget>
</customwidgets>
<resources>
<include location="../resources/pokerth_android.qrc"/>
<include location="../resources/pokerth.qrc"/>
</resources>
<connections/>
</ui>
File diff suppressed because it is too large Load Diff
@@ -66,7 +66,6 @@ void newGameDialogImpl::exec()
myChangeCompleteBlindsDialog->radioButton_afterThisStayAtLastBlind->setChecked(myConfig->readConfigInt("AfterMBStayAtLastBlind"));
QDialog::exec();
}
void newGameDialogImpl::callChangeBlindsDialog(bool show)
+3
View File
@@ -56,6 +56,8 @@
<file>document-revert.png</file>
<file>view-fullscreen_50x50.png</file>
<file>preferences-desktop_50x50.png</file>
<file>tab-new-background.png</file>
<file>tab-close.png</file>
</qresource>
<qresource prefix="/cflags">
<file>cflags/ad.png</file>
@@ -535,5 +537,6 @@
<file>android-data/translations/pokerth_tr.qm</file>
<file>android-data/translations/pokerth_zhcn.qm</file>
<file>android-data/misc/agpl.html</file>
<file>android-data/gfx/gui/table/default_800x480/android_tablestyle_800x480.xml</file>
</qresource>
</RCC>
@@ -276,16 +276,21 @@ void settingsDialogImpl::prepareDialog()
#ifdef GUI_800x480
// define PokerTH default GameTableStyle for Maemo
treeWidget_gameTableStyles->clear();
QString filename;
#ifdef MAEMO
filename = "defaulttablestyle_800x480.xml";
#elif ANDROID
filename = "android_tablestyle_800x480.xml";
#endif
GameTableStyleReader defaultTableStyle(myConfig, this);
defaultTableStyle.readStyleFile(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/defaulttablestyle_800x480.xml");
defaultTableStyle.readStyleFile(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/"+filename);
if(defaultTableStyle.getLoadedSuccessfull()) {
QStringList tempStringList1;
tempStringList1 << defaultTableStyle.getStyleDescription() << defaultTableStyle.getStyleMaintainerName();
MyStyleListItem *defaultTableItem = new MyStyleListItem(tempStringList1, treeWidget_gameTableStyles);
defaultTableItem->setData(0, 15, QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/defaulttablestyle_800x480.xml");
defaultTableItem->setData(0, 15, QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/"+filename);
defaultTableItem->setData(0, 16, POKERTH_DISTRIBUTED_STYLE);
defaultTableItem->setData(0, Qt::ToolTipRole, QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/defaulttablestyle_800x480.xml");
defaultTableItem->setData(0, Qt::ToolTipRole, QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default_800x480/"+filename);
defaultTableItem->setData(2, Qt::ToolTipRole, defaultTableStyle.getMyStateToolTipInfo());
if(defaultTableStyle.getState()) defaultTableItem->setIcon(2, QIcon(":/gfx/emblem-important.png"));
else defaultTableItem->setIcon(2, QIcon(":/gfx/dialog_ok_apply.png"));
+11 -4
View File
@@ -72,8 +72,8 @@ GameTableStyleReader::~GameTableStyleReader()
void GameTableStyleReader::readStyleFile(QString file)
{
#ifdef ANDROID
//on Android we use just the defaul style packed with the binary via qrc
currentFileName = ":/android/android-data/gfx/gui/table/default_800x480/defaulttablestyle_800x480.xml";
//on Android we currently just use the defaul style packed with the binary via qrc
currentFileName = ":/android/android-data/gfx/gui/table/default_800x480/android_tablestyle_800x480.xml";
currentDir = ":/android/android-data/gfx/gui/table/default_800x480/";
#else
//if style file failed --> default style fallback
@@ -1545,7 +1545,9 @@ void GameTableStyleReader::setShowMyCardsButtonStyle( MyActionButton *sc)
void GameTableStyleReader::setToolBoxBackground(QGroupBox* gb)
{
#ifndef ANDROID
gb->setStyleSheet("QGroupBox { border:none; background-image: url(\""+ToolBoxBackground+"\") }");
#endif
}
void GameTableStyleReader::setTabWidgetStyle(QTabWidget *tw, QTabBar *tb)
@@ -1558,8 +1560,13 @@ void GameTableStyleReader::setTabWidgetStyle(QTabWidget *tw, QTabBar *tb)
bottomPadding = " padding-bottom: 3px;";
#endif
#ifndef GUI_800x480
tb->setStyleSheet("QTabBar::tab{ "+ font1String +" font-size: 11px; color: #"+TabWidgetTextColor+"; background-color: #"+TabWidgetBgColor+"; border: 2px solid #"+TabWidgetBorderColor+"; border-bottom-color: #"+TabWidgetBorderColor+"; border-top-left-radius: 4px; border-top-right-radius: 4px; padding-top: "+tabBarPaddingTop+"px;"+bottomPadding+" padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected, QTabBar::tab:hover { background-color: #"+TabWidgetBgColor+"; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected { border-color: #"+TabWidgetBorderColor+"; border-bottom-color: #"+TabWidgetBgColor+"; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:!selected { margin-top: 2px; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected { margin-left: -4px; margin-right: -4px; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:first:selected { margin-left: 0; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:last:selected { margin-right: 0; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:only-one { margin: 0; } ");
QString tabTextFontSize;
#ifndef ANDROID
tabTextFontSize = "font-size: 11px; ";
#endif
#ifndef MAEMO
tb->setStyleSheet("QTabBar::tab{ "+ font1String + tabTextFontSize +" color: #"+TabWidgetTextColor+"; background-color: #"+TabWidgetBgColor+"; border: 2px solid #"+TabWidgetBorderColor+"; border-bottom-color: #"+TabWidgetBorderColor+"; border-top-left-radius: 4px; border-top-right-radius: 4px; padding-top: "+tabBarPaddingTop+"px;"+bottomPadding+" padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected, QTabBar::tab:hover { background-color: #"+TabWidgetBgColor+"; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected { border-color: #"+TabWidgetBorderColor+"; border-bottom-color: #"+TabWidgetBgColor+"; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:!selected { margin-top: 2px; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:selected { margin-left: -4px; margin-right: -4px; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:first:selected { margin-left: 0; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:last:selected { margin-right: 0; padding-top: "+tabBarPaddingTop+"px; padding-left:"+tabBarPaddingSide+"px; padding-right:"+tabBarPaddingSide+"px;} QTabBar::tab:only-one { margin: 0; } ");
#endif
}
+4
View File
@@ -87,6 +87,10 @@ public:
QString getHandRanking() const {
return HandRanking;
}
QString getTable() const {
return Table;
}
QString getActionPic(int);
QString getFKeyIndicatorColor() const {
+4 -4
View File
@@ -88,10 +88,10 @@ int main( int argc, char **argv )
//create defaultconfig
ConfigFile *myConfig = new ConfigFile(argv[0], false);
Log *myLog = new Log(myConfig);
//#ifndef ANDROID
// set PlastiqueStyle even for mac-version to prevent artefacts on styled widgets
a.setStyle(new QPlastiqueStyle);
//#endif
// set PlastiqueStyle even for mac-version to prevent artefacts on styled widgets
a.setStyle(new QPlastiqueStyle);
QString myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
//set QApplication default font