From f211e31acf3424cd524d7a5d799231c63ec0d063 Mon Sep 17 00:00:00 2001 From: doitux Date: Mon, 1 Jul 2013 10:05:37 +0200 Subject: [PATCH] commit #187 --- src/gui/qt/gametable/myavatarlabel.cpp | 18 +- .../qt/gui_800x480/settingsdialog_800x480.ui | 629 +++++++++++++----- src/gui/qt/settingsdialog.ui | 238 ++++++- .../qt/settingsdialog/settingsdialogimpl.cpp | 3 + 4 files changed, 684 insertions(+), 204 deletions(-) diff --git a/src/gui/qt/gametable/myavatarlabel.cpp b/src/gui/qt/gametable/myavatarlabel.cpp index 264449bf..7af36483 100644 --- a/src/gui/qt/gametable/myavatarlabel.cpp +++ b/src/gui/qt/gametable/myavatarlabel.cpp @@ -394,7 +394,23 @@ void MyAvatarLabel::paintEvent(QPaintEvent*) else painter.setOpacity(1.0); - painter.drawPixmap(0,0,myPixmap); + //hide avatar if player is on ignore list + boost::shared_ptr currentGame = myW->myStartWindow->getSession()->getCurrentGame(); + PlayerListConstIterator it_c; + int seatPlace; + PlayerList seatsList = currentGame->getSeatsList(); + for (seatPlace=0,it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c, seatPlace++) { + if(seatPlace == myId) { + if(!playerIsOnIgnoreList(QString::fromUtf8((*it_c)->getMyName().c_str()))) { + painter.drawPixmap(0,0,myPixmap); + return; + } + else if(myW->getMyConfig()->readConfigInt("DontHideAvatarsOfIgnored")) { + painter.drawPixmap(0,0,myPixmap); + return; + } + } + } } bool MyAvatarLabel::playerIsOnIgnoreList(QString playerName) diff --git a/src/gui/qt/gui_800x480/settingsdialog_800x480.ui b/src/gui/qt/gui_800x480/settingsdialog_800x480.ui index 56657537..d992d688 100644 --- a/src/gui/qt/gui_800x480/settingsdialog_800x480.ui +++ b/src/gui/qt/gui_800x480/settingsdialog_800x480.ui @@ -152,172 +152,204 @@ 0 - - + + + 4 + + + 4 + + + 4 + + 4 0 - - - 6 + + + 0 - - - - - - - Language: - - - comboBox_switchLanguage - - - - - - - QObject {font: 30px} - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Show fade-out animation for non-winning cards - - - - - - - Show buttons for small blind and big blind - - - - - - - Don't translate poker strings like check, call, raise from game table style - - - - - - - Show cards chance monitor - - - - - - - Show own cards only on mouse click - - - - - - - Disable splashscreen on startup - - - - - - - Show flip-card animation - - - - - - - - - Network / Internet Game - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - 20 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Switch keyboard focus to bet-input-field if it's your turn - - - - - - - Show country flag in the corner of avatar - - - - - - - Activate the "accidentally call after big raise" blocker - - - - + + + Common + + + + + + 6 + + + + + + + + Language: + + + comboBox_switchLanguage + + + + + + + QObject {font: 30px} + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Show fade-out animation for non-winning cards + + + + + + + Show buttons for small blind and big blind + + + + + + + Don't translate poker strings like check, call, raise from game table style + + + + + + + Show cards chance monitor + + + + + + + Show own cards only on mouse click + + + + + + + Disable splashscreen on startup + + + + + + + Show flip-card animation + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Network / Internet Game + + + + + + Show country flag in the corner of avatar + + + + + + + Switch keyboard focus to bet-input-field if it's your turn + + + + + + + Activate the "accidentally call after big raise" blocker + + + + + + + Do not hide avatars of players which are on the ignore list + + + + + + + Qt::Vertical + + + + 20 + 178 + + + + + + - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + 4 + + + 4 + + + 4 + + 4 @@ -329,7 +361,7 @@ - 1 + 0 @@ -704,7 +736,16 @@ p, li { white-space: pre-wrap; } 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -712,7 +753,16 @@ p, li { white-space: pre-wrap; } 2 - + + 0 + + + 0 + + + 0 + + 0 @@ -809,7 +859,16 @@ p, li { white-space: pre-wrap; } - + + 4 + + + 4 + + + 4 + + 4 @@ -832,7 +891,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -1742,7 +1810,16 @@ p, li { white-space: pre-wrap; } - + + 4 + + + 4 + + + 4 + + 4 @@ -1751,7 +1828,7 @@ p, li { white-space: pre-wrap; } - 0 + 1 @@ -2140,7 +2217,16 @@ p, li { white-space: pre-wrap; } true - + + 4 + + + 4 + + + 4 + + 4 @@ -2221,7 +2307,16 @@ p, li { white-space: pre-wrap; } Computer Engine - + + 0 + + + 0 + + + 0 + + 0 @@ -2231,7 +2326,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2298,7 +2402,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2367,7 +2480,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2434,7 +2556,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2503,7 +2634,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2570,7 +2710,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2639,7 +2788,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2706,7 +2864,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2775,7 +2942,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2814,7 +2990,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2915,7 +3100,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2926,7 +3120,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -3051,7 +3254,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -3062,7 +3274,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -3187,7 +3408,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -3198,7 +3428,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -3323,7 +3562,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -3334,7 +3582,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -3479,7 +3736,16 @@ p, li { white-space: pre-wrap; } - + + 4 + + + 4 + + + 4 + + 4 @@ -3863,7 +4129,6 @@ p, li { white-space: pre-wrap; } checkBox_antiPeekMode checkBox_disableSplashscreen checkBox_dontTranslatePokerStrings - checkBox_enableBetInputFocusSwitch tabWidget treeWidget_gameTableStyles pushButton_addGameTableStyle diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui index 138934c3..f36a74a6 100644 --- a/src/gui/qt/settingsdialog.ui +++ b/src/gui/qt/settingsdialog.ui @@ -286,6 +286,13 @@ + + + + Do not hide avatars of players which are on the ignore list + + + @@ -614,7 +621,16 @@ p, li { white-space: pre-wrap; } 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -622,7 +638,16 @@ p, li { white-space: pre-wrap; } 2 - + + 0 + + + 0 + + + 0 + + 0 @@ -738,7 +763,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2158,7 +2192,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2222,7 +2265,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2291,7 +2343,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2355,7 +2416,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2424,7 +2494,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2488,7 +2567,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2557,7 +2645,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2621,7 +2718,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2690,7 +2796,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2729,7 +2844,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2827,7 +2951,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2838,7 +2971,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -2960,7 +3102,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -2971,7 +3122,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -3093,7 +3253,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -3104,7 +3273,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -3226,7 +3404,16 @@ p, li { white-space: pre-wrap; } - + + 0 + + + 0 + + + 0 + + 0 @@ -3237,7 +3424,16 @@ p, li { white-space: pre-wrap; } 6 - + + 0 + + + 0 + + + 0 + + 0 diff --git a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp index d014cc50..f4dfdd20 100644 --- a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp +++ b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp @@ -291,6 +291,8 @@ void settingsDialogImpl::prepareDialog() checkBox_dontTranslatePokerStrings->setChecked(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle")); checkBox_disableSplashscreen->setChecked(myConfig->readConfigInt("DisableSplashScreenOnStartup")); checkBox_enableAccidentallyCallBlocker->setChecked(myConfig->readConfigInt("AccidentallyCallBlocker")); + checkBox_dontHideAvatarsOfIgnored->setChecked(myConfig->readConfigInt("DontHideAvatarsOfIgnored")); + //S t y l e //TABLE @@ -737,6 +739,7 @@ void settingsDialogImpl::isAccepted() myConfig->writeConfigInt("DisableSplashScreenOnStartup", checkBox_disableSplashscreen->isChecked()); myConfig->writeConfigInt("EnableBetInputFocusSwitch", checkBox_enableBetInputFocusSwitch->isChecked()); myConfig->writeConfigInt("AccidentallyCallBlocker", checkBox_enableAccidentallyCallBlocker->isChecked()); + myConfig->writeConfigInt("DontHideAvatarsOfIgnored", checkBox_dontHideAvatarsOfIgnored->isChecked()); myConfig->writeConfigInt("FlipsideTux", radioButton_flipsideTux->isChecked()); myConfig->writeConfigInt("FlipsideOwn", radioButton_flipsideOwn->isChecked());