diff --git a/src/gui/qt/mainwindow.ui b/src/gui/qt/mainwindow.ui index 8071b512..dc7f2a98 100644 --- a/src/gui/qt/mainwindow.ui +++ b/src/gui/qt/mainwindow.ui @@ -735,6 +735,50 @@ + + + Away + + + + + + Manual Action (default) + + + true + + + + + + + Auto-Check / Auto-Fold + + + + + + + Auto-Check / Auto-Call-Any + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index 152e66df..19ffb2e0 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -488,6 +488,11 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent) pushButton_CallCheckSet->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_05.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; }"); pushButton_FoldAllin->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_07.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; }"); +// away radiobuttons + radioButton_manualAction->setStyleSheet("QRadioButton { color:#F0F0F0; } QRadioButton::indicator::checked {image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_07.png }"); +// radioButton_autoCheckFold->setStyleSheet("QLabel { color: #F0F0F0; }"); +// radioButton_autoCheckCallAny->setStyleSheet("QLabel { color: #F0F0F0; }"); + groupBox_RightToolBox->setStyleSheet("QGroupBox { border:none; background-image: url(" + myAppDataPath +"gfx/gui/misc/toolboxFrameBG.png) }"); groupBox_LeftToolBox->setStyleSheet("QGroupBox { border:none; background-image: url(" + myAppDataPath +"gfx/gui/misc/toolboxFrameBG.png) }"); @@ -606,6 +611,10 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent) connect( lineEdit_ChatInput, SIGNAL( textChanged (QString) ), this, SLOT( checkChatInputLength(QString) ) ); connect( lineEdit_ChatInput, SIGNAL( textEdited (QString) ), myChat, SLOT( setChatTextEdited() ) ); + connect( radioButton_manualAction, SIGNAL( clicked() ) , this, SLOT( changePlayingMode() ) ); + connect( radioButton_autoCheckFold, SIGNAL( clicked() ) , this, SLOT( changePlayingMode() ) ); + connect( radioButton_autoCheckCallAny, SIGNAL( clicked() ), this, SLOT( changePlayingMode() ) ); + //Nachrichten Thread-Save connect(this, SIGNAL(signalInitGui(int)), this, SLOT(initGui(int))); @@ -3486,7 +3495,7 @@ void mainWindowImpl::networkError(int errorID, int /*osErrorID*/) { myChangeHumanPlayerNameDialog->exec(); } break; case ERR_NET_INVALID_PLAYER_NAME: - { myChangeHumanPlayerNameDialog->label_Message->setText(tr("The player name is too short, too long or reserved. Please choose another one.")); + { myChangeHumanPlayerNameDialog->label_Message->setText(tr("The player name is too short, too long or invalid. Please choose another one.")); myChangeHumanPlayerNameDialog->exec(); } break; case ERR_NET_INVALID_GAME_NAME: @@ -3639,18 +3648,9 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) { pushButton_FoldAllin->click(); } } - if (event->key() == Qt::Key_F4) { - playingMode = 0; - statusBar()->showMessage(tr("Manual mode set. You've got to choose yourself now."), 5000); - } - if (event->key() == Qt::Key_F5) { - playingMode = 1; - statusBar()->showMessage(tr("Auto mode set: Check or call any."), 5000); - } - if (event->key() == Qt::Key_F6) { - playingMode = 2; - statusBar()->showMessage(tr("Auto mode set: Check or fold."), 5000); - } + if (event->key() == Qt::Key_F4) { radioButton_manualAction->click(); } + if (event->key() == Qt::Key_F5) { radioButton_autoCheckFold->click(); } + if (event->key() == Qt::Key_F6) { radioButton_autoCheckCallAny->click(); } if (event->key() == 16777249) { //CTRL pushButton_break->click(); ctrlPressed = TRUE; @@ -3673,6 +3673,28 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) { } +void mainWindowImpl::changePlayingMode() { + + int mode; + + if(radioButton_manualAction->isChecked()) { mode=0; } + if(radioButton_autoCheckFold->isChecked()) { mode=1; } + if(radioButton_autoCheckCallAny->isChecked()) { mode=2; } + + + switch (mode) { + + case 0: { statusBar()->showMessage(tr("Manual mode set. You've got to choose yourself now."), 5000); } + break; + case 1: { statusBar()->showMessage(tr("Auto mode set: Check or call any."), 5000); } + break; + case 2: { statusBar()->showMessage(tr("Auto mode set: Check or fold."), 5000); } + break; + default: { cout << "changePlayingMode ERROR!!!!" << endl; } + + } +} + bool mainWindowImpl::eventFilter(QObject *obj, QEvent *event) { QKeyEvent *keyEvent = static_cast(event); diff --git a/src/gui/qt/mainwindow/mainwindowimpl.h b/src/gui/qt/mainwindow/mainwindowimpl.h index 7f2ba604..1844ce76 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.h +++ b/src/gui/qt/mainwindow/mainwindowimpl.h @@ -304,6 +304,8 @@ public slots: void mouseOverFlipCards(bool front); + void changePlayingMode(); + void quitPokerTH(); diff --git a/src/gui/qt/mainwindow/mylefttabwidget.cpp b/src/gui/qt/mainwindow/mylefttabwidget.cpp index b9263d14..737ea687 100644 --- a/src/gui/qt/mainwindow/mylefttabwidget.cpp +++ b/src/gui/qt/mainwindow/mylefttabwidget.cpp @@ -30,7 +30,7 @@ MyLeftTabWidget::MyLeftTabWidget(QGroupBox *parent) int padding = 1; #else QString font1String("font-family: \"Nimbus Sans L\";"); - int padding = -1; + int padding = 0; #endif QTabBar *myTabBar = this->tabBar(); diff --git a/src/gui/qt/mainwindow/myrighttabwidget.cpp b/src/gui/qt/mainwindow/myrighttabwidget.cpp index 189945b7..2a1b5cc3 100644 --- a/src/gui/qt/mainwindow/myrighttabwidget.cpp +++ b/src/gui/qt/mainwindow/myrighttabwidget.cpp @@ -30,7 +30,7 @@ MyRightTabWidget::MyRightTabWidget(QGroupBox *parent) int padding = 1; #else QString font1String("font-family: \"Nimbus Sans L\";"); - int padding = -1; + int padding = 0; #endif QTabBar *myTabBar = this->tabBar();