From 7949b2e91cb845246992c498167ba4003be0060d Mon Sep 17 00:00:00 2001 From: doitux Date: Tue, 23 Mar 2010 19:58:19 +0000 Subject: [PATCH] add new ranking mode options to settings. also add ranking mode icon for game-list --- data/gfx/gui/misc/cup.png | Bin 0 -> 459 bytes src/config/configfile.cpp | 3 +- src/gui/qt/createinternetgamedialog.ui | 41 ++++++++++++++++-- .../createinternetgamedialogimpl.cpp | 2 + .../gamelobbydialog/gamelobbydialogimpl.cpp | 10 +++++ src/gui/qt/resources/cup.png | Bin 0 -> 459 bytes src/gui/qt/resources/lock.png | Bin 0 -> 740 bytes src/gui/qt/resources/pokerth.qrc | 4 +- src/gui/qt/settingsdialog.ui | 23 ++++++++-- .../qt/settingsdialog/settingsdialogimpl.cpp | 2 + src/gui/qt/styles/gametablestylereader.cpp | 2 +- 11 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 data/gfx/gui/misc/cup.png create mode 100644 src/gui/qt/resources/cup.png create mode 100644 src/gui/qt/resources/lock.png diff --git a/data/gfx/gui/misc/cup.png b/data/gfx/gui/misc/cup.png new file mode 100644 index 0000000000000000000000000000000000000000..4521fe1fcf5cbfeeca09d6836d42d91aebedefc0 GIT binary patch literal 459 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=f!eQwFr$;k>tcw#uJzBr5Qb$?aNkNy!xoZY}N0}83RL4t?Mp`ZCMrc?Q(0a zy3Ua+pZD#U?-x}%<*(2Zo$kdy(~bpuZx-c}313}OB759KaNc*pWt|sFmrdoG8`I}} z-+qJ6x 0 0 - 302 - 329 + 284 + 342 @@ -123,6 +123,10 @@ Password: + + + :/gfx/lock.png:/gfx/lock.png + @@ -139,6 +143,12 @@ + + + 0 + 0 + + Timeout for player action: @@ -175,6 +185,12 @@ + + + 0 + 0 + + s @@ -189,6 +205,23 @@ + + + + This game will affect players ranking level + + + This game will affect players ranking level + + + Ranking game mode + + + + :/gfx/cup.png:/gfx/cup.png + + + @@ -241,7 +274,9 @@ pushButton_createGame pushButton_cancel - + + + pushButton_createGame diff --git a/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp b/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp index 6c32c1cd..396f7385 100644 --- a/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp +++ b/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp @@ -98,6 +98,8 @@ void createInternetGameDialogImpl::fillFormular() { myChangeCompleteBlindsDialog->radioButton_afterThisAlwaysRaiseAbout->setChecked(myConfig->readConfigInt("NetAfterMBAlwaysRaiseAbout")); myChangeCompleteBlindsDialog->spinBox_afterThisAlwaysRaiseValue->setValue(myConfig->readConfigInt("NetAfterMBAlwaysRaiseValue")); myChangeCompleteBlindsDialog->radioButton_afterThisStayAtLastBlind->setChecked(myConfig->readConfigInt("NetAfterMBStayAtLastBlind")); + + checkBox_rankingMode->setChecked(myConfig->readConfigInt("InternetGameRankingMode")); } void createInternetGameDialogImpl::showDialog() { diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp index 8ad115b8..ecc8f530 100644 --- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp +++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp @@ -375,6 +375,16 @@ void gameLobbyDialogImpl::updateGameItem(QList itemList, unsign itemList.at(2)->setData("open", 16); } +// if (info.isRankingGame) { +// itemList.at(3)->setIcon(QIcon(myAppDataPath+"gfx/gui/misc/cup.png")); +// itemList.at(3)->setData(" ", Qt::DisplayRole); +// itemList.at(3)->setData("ranking", 16); +// } +// else { +// itemList.at(3)->setData("", Qt::DisplayRole); +// itemList.at(3)->setData("nonranking", 16); +// } + if (info.isPasswordProtected) { itemList.at(4)->setIcon(QIcon(myAppDataPath+"gfx/gui/misc/lock.png")); itemList.at(4)->setData(" ", Qt::DisplayRole); diff --git a/src/gui/qt/resources/cup.png b/src/gui/qt/resources/cup.png new file mode 100644 index 0000000000000000000000000000000000000000..4521fe1fcf5cbfeeca09d6836d42d91aebedefc0 GIT binary patch literal 459 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=f!eQwFr$;k>tcw#uJzBr5Qb$?aNkNy!xoZY}N0}83RL4t?Mp`ZCMrc?Q(0a zy3Ua+pZD#U?-x}%<*(2Zo$kdy(~bpuZx-c}313}OB759KaNc*pWt|sFmrdoG8`I}} z-+qJ6xPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2iFT3 z05Uhs<6cbw00Lx5L_t(I%YBi{OO#<0#((F1-}$c2r5U9QEldieK$yhn;$l{jEg~Wa zTC@sxZCm#rv~C|Q1h*OlZ9=FJx(*U9vcNFYa=gqppWo$eVTxAztPaoN$2reA@R$1g z`-{eyN5EU)n~1z}UH5*iRtq>tBO@bat@SKmfecs#QoxGHi(;`@-WMJi799C+pD(yox=0Hz9@>iL}Yno zWu>_rZnavUfd$}Dnx=jKz#`HO(9_e?*(X&3kmq^#wqXDsTtNlHwff{FMA1e#bhdnb z?rXG%>~u`m+IpMrs;Z9;@cO}1ashaFvp#j}{LzcbJ@^}B3h`XVo_~CKZ|uzlGkWJ( zaP`!Yp;g_D+Dx~y2nZHsbCiHqvcqeq!nJe92S0e<1H+j8Wj5Ua{BuPSMEn%X;F?Q=GyjV$`I{A6Zs3g9=L W$juA*o2PyN0000 - + view-fullscreen.png pokerth.qrc swbuttoninternetgame.png @@ -33,5 +33,7 @@ dialog_ok_apply.png filesave.png fill-color.png + lock.png + cup.png diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui index 691f3588..7cb63f7b 100644 --- a/src/gui/qt/settingsdialog.ui +++ b/src/gui/qt/settingsdialog.ui @@ -125,7 +125,7 @@ - 0 + 5 @@ -303,7 +303,7 @@ - 2 + 0 @@ -1648,6 +1648,10 @@ p, li { white-space: pre-wrap; } Use password for private game: + + + :/gfx/lock.png:/gfx/lock.png + @@ -1662,7 +1666,7 @@ p, li { white-space: pre-wrap; } - + Qt::Vertical @@ -1678,7 +1682,18 @@ p, li { white-space: pre-wrap; } - Enable/Disable Lobby Chat + Show lobby chat + + + + + + + Use ranking mode (this game will affect players online ranking level) + + + + :/gfx/cup.png:/gfx/cup.png diff --git a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp index dc85cd3c..98d7a7da 100644 --- a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp +++ b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp @@ -208,6 +208,7 @@ void settingsDialogImpl::exec() { lineEdit_InternetGamePassword->setText(QString::fromUtf8(myConfig->readConfigString("InternetGamePassword").c_str())); } checkBox_UseLobbyChat->setChecked(myConfig->readConfigInt("UseLobbyChat")); + checkBox_InternetGameRankingMode->setChecked(myConfig->readConfigInt("InternetGameRankingMode")); //Interface comboBox_switchLanguage->setCurrentIndex(comboBox_switchLanguage->findData(QString::fromUtf8(myConfig->readConfigString("Language").c_str()).section('_', 0, 0))); @@ -527,6 +528,7 @@ void settingsDialogImpl::isAccepted() { myConfig->writeConfigInt("UseInternetGamePassword", checkBox_UseInternetGamePassword->isChecked()); myConfig->writeConfigString("InternetGamePassword", lineEdit_InternetGamePassword->text().toUtf8().constData()); myConfig->writeConfigInt("UseLobbyChat", checkBox_UseLobbyChat->isChecked()); + myConfig->writeConfigInt("InternetGameRankingMode", checkBox_InternetGameRankingMode->isChecked()); // Interface myConfig->writeConfigString("Language", comboBox_switchLanguage->itemData(comboBox_switchLanguage->currentIndex()).toString().toUtf8().constData()); diff --git a/src/gui/qt/styles/gametablestylereader.cpp b/src/gui/qt/styles/gametablestylereader.cpp index c84908d8..85317746 100644 --- a/src/gui/qt/styles/gametablestylereader.cpp +++ b/src/gui/qt/styles/gametablestylereader.cpp @@ -801,6 +801,6 @@ void GameTableStyleReader::setWindowsGeometry(gameTableImpl *gt) void GameTableStyleReader::setSliderStyle(QSlider *s) { - s->setStyleSheet("QSlider::groove:horizontal { border: 1px solid #"+BetSpeedSliderGrooveBorderColor+"; height: 3px; background: #"+BetSpeedSliderGrooveBgColor+"; margin: 4px 4px; border-radius: 2px; } QSlider::handle:horizontal { background: #"+BetSpeedSliderHandleBgColor+"; border: 1px solid #"+BetSpeedSliderHandleBorderColor+"; width: 9px; margin: -6px 0; border-radius: 4px;}"); + s->setStyleSheet("QSlider::groove:horizontal { border: 1px solid #"+BetSpeedSliderGrooveBorderColor+"; height: 3px; background: #"+BetSpeedSliderGrooveBgColor+"; margin: 4px 0; border-radius: 2px; } QSlider::handle:horizontal { background: #"+BetSpeedSliderHandleBgColor+"; border: 1px solid #"+BetSpeedSliderHandleBorderColor+"; width: 9px; margin: -5px 0; border-radius: 4px;}"); }