diff --git a/pokerth_game.pro b/pokerth_game.pro index 47fc4ec5..c7bf03bf 100644 --- a/pokerth_game.pro +++ b/pokerth_game.pro @@ -11,7 +11,7 @@ CONFIG += qt thread embed_manifest_exe exceptions rtti stl warn_on release #CONFIG += qt thread embed_manifest_exe exceptions rtti stl warn_on debug #####Uncomment this for RELEASE on Linux/Unix/BSD (only for static Qt) -#QTPLUGIN += qjpeg qgif +QTPLUGIN += qjpeg qgif UI_DIR = uics MOC_DIR = mocs @@ -152,6 +152,7 @@ HEADERS += \ src/gui/qt/gametable/gametableimpl.h \ src/gui/qt/gametable/mycardspixmaplabel.h \ src/gui/qt/gametable/mysetlabel.h \ + src/gui/qt/gametable/myactionbutton.h \ src/gui/qt/gametable/mystatuslabel.h \ src/gui/qt/gametable/myavatarlabel.h \ src/gui/qt/gametable/myrighttabwidget.h \ @@ -215,6 +216,7 @@ SOURCES += \ src/gui/qt/gametable/gametableimpl.cpp \ src/gui/qt/gametable/mycardspixmaplabel.cpp \ src/gui/qt/gametable/mysetlabel.cpp \ + src/gui/qt/gametable/myactionbutton.cpp \ src/gui/qt/gametable/mystatuslabel.cpp \ src/gui/qt/gametable/myavatarlabel.cpp \ src/gui/qt/gametable/myrighttabwidget.cpp \ diff --git a/src/gui/qt/gametable.ui b/src/gui/qt/gametable.ui index 28675c4e..e4804100 100644 --- a/src/gui/qt/gametable.ui +++ b/src/gui/qt/gametable.ui @@ -2763,7 +2763,7 @@ - + 50 @@ -2897,7 +2897,7 @@ - + 0 @@ -2922,7 +2922,7 @@ - + 0 @@ -2947,7 +2947,7 @@ - + 0 @@ -3683,6 +3683,11 @@ QLabel
mychancelabel.h
+ + MyActionButton + QPushButton +
myactionbutton.h
+
diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index c83b87f8..8cb80c90 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -27,6 +27,7 @@ #include "mycardspixmaplabel.h" #include "mysetlabel.h" #include "myavatarlabel.h" +#include "myactionbutton.h" #include "mychancelabel.h" #include "log.h" #include "chat.h" @@ -428,6 +429,8 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent) pushButton_AllIn->setStyleSheet("QPushButton:enabled { background-color: #145300; color: #99D500;} QPushButton:disabled { background-color: #145300; color: #486F3E; font-weight: 900;}"); + + // away radiobuttons // QString radioButtonString("QRadioButton { color: #99D500; } QRadioButton::indicator { width: 13px; height: 13px; } QRadioButton::indicator::checked { image: url("+myAppDataPath+"gfx/gui/misc/radiobutton_checked.png); }"); QString radioButtonString("QRadioButton { color: #99D500; } QRadioButton::indicator { width: 13px; height: 13px;} QRadioButton::indicator::checked { image: url("+myAppDataPath+"gfx/gui/misc/radiobutton_checked.png);} QRadioButton::indicator::unchecked { image: url("+myAppDataPath+"gfx/gui/misc/radiobutton_unchecked.png);} QRadioButton::indicator:unchecked:hover { image: url("+myAppDataPath+"gfx/gui/misc/radiobutton_unchecked_hover.png);} QRadioButton::indicator:unchecked:pressed { image: url("+myAppDataPath+"gfx/gui/misc/radiobutton_pressed.png);} QRadioButton::indicator::checked { image: url("+myAppDataPath+"gfx/gui/misc/radiobutton_checked.png);} QRadioButton::indicator:checked:hover { image: url("+myAppDataPath+"gfx/gui/misc/radiobutton_checked_hover.png);} QRadioButton::indicator:checked:pressed { image: url("+myAppDataPath+"gfx/gui/misc/radiobutton_pressed.png);}"); @@ -1389,6 +1392,8 @@ void gameTableImpl::provideMyActions(int mode) { lineEdit_betValue->setDisabled(TRUE); myButtonsCheckable(FALSE); + + refreshActionButtonFKeyIndicator(1); } else { pushButton_AllIn->setEnabled(TRUE); @@ -1406,7 +1411,8 @@ void gameTableImpl::provideMyActions(int mode) { else { pushButtonCallCheckString = "Call $"+QString::number(getMyCallAmount()); } pushButtonFoldString = "Fold"; - + + refreshActionButtonFKeyIndicator(); } else { // flop,turn,river @@ -1425,6 +1431,7 @@ void gameTableImpl::provideMyActions(int mode) { pushButtonBetRaiseString = "Raise $"+QString::number(getMyBetAmount()); } } + refreshActionButtonFKeyIndicator(); } if(mode == 0) { @@ -1433,6 +1440,8 @@ void gameTableImpl::provideMyActions(int mode) { pushButtonCallCheckString = "Check"; if( (currentGame->getActivePlayerList()->size() > 2 && currentGame->getSeatsList()->front()->getMyButton() == BUTTON_SMALL_BLIND ) || ( currentGame->getActivePlayerList()->size() <= 2 && currentGame->getSeatsList()->front()->getMyButton() == BUTTON_BIG_BLIND)) { pushButtonFoldString = "Fold"; } else { pushButtonFoldString = "Check / Fold"; } + + refreshActionButtonFKeyIndicator(); } else { pushButtonBetRaiseString = ""; @@ -1443,6 +1452,8 @@ void gameTableImpl::provideMyActions(int mode) { lineEdit_betValue->setDisabled(TRUE); myButtonsCheckable(FALSE); + + refreshActionButtonFKeyIndicator(1); } } @@ -2934,6 +2945,8 @@ void gameTableImpl::resetMyButtonsCheckStateMemory() { void gameTableImpl::clearMyButtons() { + refreshActionButtonFKeyIndicator(1); + pushButton_BetRaise->setText(""); pushButton_CallCheck->setText(""); pushButton_Fold->setText(""); @@ -3232,3 +3245,27 @@ void gameTableImpl::refreshCardsChance(GameState bero) delete myCardsValue; } + +void gameTableImpl::refreshActionButtonFKeyIndicator(bool clear) +{ + if(clear) { + pushButton_AllIn->setFKeyText(""); + pushButton_BetRaise->setFKeyText(""); + pushButton_CallCheck->setFKeyText(""); + pushButton_Fold->setFKeyText(""); + } + else { + if(myConfig->readConfigInt("AlternateFKeysUserActionMode") == 0 ){ + pushButton_AllIn->setFKeyText("F4"); + pushButton_BetRaise->setFKeyText("F3"); + pushButton_CallCheck->setFKeyText("F2"); + pushButton_Fold->setFKeyText("F1"); + } + else { + pushButton_AllIn->setFKeyText("F1"); + pushButton_BetRaise->setFKeyText("F2"); + pushButton_CallCheck->setFKeyText("F3"); + pushButton_Fold->setFKeyText("F4"); + } + } +} diff --git a/src/gui/qt/gametable/gametableimpl.h b/src/gui/qt/gametable/gametableimpl.h index be0ce908..d8d9ecfb 100755 --- a/src/gui/qt/gametable/gametableimpl.h +++ b/src/gui/qt/gametable/gametableimpl.h @@ -139,6 +139,7 @@ public slots: void refreshGameLabels(int); void refreshButton(); void refreshPlayerAvatar(); + void refreshActionButtonFKeyIndicator(bool =0); void setPlayerAvatar(int myID, QString myAvatar); void guiUpdateDone(); diff --git a/src/gui/qt/gametable/myactionbutton.cpp b/src/gui/qt/gametable/myactionbutton.cpp new file mode 100644 index 00000000..77d5fa17 --- /dev/null +++ b/src/gui/qt/gametable/myactionbutton.cpp @@ -0,0 +1,39 @@ +// +// C++ Implementation: mycardspixmaplabel +// +// Description: +// +// +// Author: FThauer FHammer , (C) 2007 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include "myactionbutton.h" + + +using namespace std; + +MyActionButton::MyActionButton(QGroupBox* parent) + : QPushButton(parent) +{ +} + + +MyActionButton::~MyActionButton() +{ +} + + +void MyActionButton::paintEvent(QPaintEvent * event) { + + QPushButton::paintEvent(event); + + QPainter painter(this); + painter.setPen(QColor(240,240,240)); + painter.setOpacity(0.5); + QFont f= painter.font(); + f.setPixelSize(9); + painter.setFont(f); + painter.drawText(8,11,15,15,Qt::AlignLeft,fKeyText); +} diff --git a/src/gui/qt/gametable/myactionbutton.h b/src/gui/qt/gametable/myactionbutton.h new file mode 100644 index 00000000..de04d0a1 --- /dev/null +++ b/src/gui/qt/gametable/myactionbutton.h @@ -0,0 +1,33 @@ +// +// C++ Interface: mycardspixmaplabel +// +// Description: +// +// +// Author: FThauer FHammer , (C) 2007 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef MYACTIONBUTTON_H +#define MYACTIONBUTTON_H + +#include +#include + +class MyActionButton : public QPushButton +{ +public: + MyActionButton(QGroupBox*); + + ~MyActionButton(); + + void paintEvent(QPaintEvent * event); + void setFKeyText ( const QString& theValue ){fKeyText = theValue;} + +private: + + QString fKeyText; +}; + +#endif diff --git a/src/gui/qt/resources/fill-color.png b/src/gui/qt/resources/fill-color.png new file mode 100755 index 00000000..af5421e3 Binary files /dev/null and b/src/gui/qt/resources/fill-color.png differ diff --git a/src/gui/qt/resources/pokerth.qrc b/src/gui/qt/resources/pokerth.qrc index a5377007..2d742cc1 100644 --- a/src/gui/qt/resources/pokerth.qrc +++ b/src/gui/qt/resources/pokerth.qrc @@ -1,36 +1,37 @@ - - view-fullscreen.png - pokerth.qrc - swbuttoninternetgame.png - swbuttoncreatenetworkgame.png - swbuttonjoinnetworkgame.png - media_podcast.png - system_users_big.png - swbuttonlocalgame.png - tools_wizard.png - speaker.png - player_play.png - arrow_right_double.png - view_refresh.png - arrow_left_double.png - list_remove_user.png - user.png - application_exit.png - system_users.png - list_add_user.png - list_add.png - audio_input_microphone.png - utilities-log-viewer.png - preferences-desktop.png - dialog_close.png - systemsettings.png - editdelete.png - user_properties.png - printer1.png - pdf.png - preferences_desktop_user.png - dialog_ok_apply.png - filesave.png - + + view-fullscreen.png + pokerth.qrc + swbuttoninternetgame.png + swbuttoncreatenetworkgame.png + swbuttonjoinnetworkgame.png + media_podcast.png + system_users_big.png + swbuttonlocalgame.png + tools_wizard.png + speaker.png + player_play.png + arrow_right_double.png + view_refresh.png + arrow_left_double.png + list_remove_user.png + user.png + application_exit.png + system_users.png + list_add_user.png + list_add.png + audio_input_microphone.png + utilities-log-viewer.png + preferences-desktop.png + dialog_close.png + systemsettings.png + editdelete.png + user_properties.png + printer1.png + pdf.png + preferences_desktop_user.png + dialog_ok_apply.png + filesave.png + fill-color.png + diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui index 1f404ed7..ddb44f4e 100644 --- a/src/gui/qt/settingsdialog.ui +++ b/src/gui/qt/settingsdialog.ui @@ -57,6 +57,15 @@ :/gfx/preferences-desktop.png:/gfx/preferences-desktop.png
+ + + Style + + + + :/gfx/fill-color.png:/gfx/fill-color.png + + Sound @@ -372,6 +381,41 @@ p, li { white-space: pre-wrap; } + + + + + + QLabel { font-weight: bold; } + + + Style + + + + + + + Qt::Horizontal + + + + + + + Game Table Styles + + + + + + + Card Decks + + + + +