add new ranking mode options to settings. also add ranking mode icon for game-list
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 459 B |
@@ -48,7 +48,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
myQtToolsInterface = CreateQtToolsWrapper();
|
||||
|
||||
// !!!! Revisionsnummer der Configdefaults !!!!!
|
||||
configRev = 78;
|
||||
configRev = 79;
|
||||
|
||||
//standard defaults
|
||||
logOnOffDefault = "1";
|
||||
@@ -210,6 +210,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
configList.push_back(ConfigInfo("AvatarServerAddress", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("UseInternetGamePassword", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("InternetGamePassword", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("InternetGameRankingMode", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("UseLobbyChat", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("UseAdminIRC", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("AdminIRCServerAddress", CONFIG_TYPE_STRING, "chat.freenode.net"));
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>302</width>
|
||||
<height>329</height>
|
||||
<width>284</width>
|
||||
<height>342</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -123,6 +123,10 @@
|
||||
<property name="text">
|
||||
<string>Password:</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/lock.png</normaloff>:/gfx/lock.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -139,6 +143,12 @@
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Timeout for player action:</string>
|
||||
</property>
|
||||
@@ -175,6 +185,12 @@
|
||||
</item>
|
||||
<item row="4" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinBox_netDelayBetweenHands">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> s</string>
|
||||
</property>
|
||||
@@ -189,6 +205,23 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="4">
|
||||
<widget class="QCheckBox" name="checkBox_rankingMode">
|
||||
<property name="statusTip">
|
||||
<string>This game will affect players ranking level</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>This game will affect players ranking level</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ranking game mode</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/cup.png</normaloff>:/gfx/cup.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -241,7 +274,9 @@
|
||||
<tabstop>pushButton_createGame</tabstop>
|
||||
<tabstop>pushButton_cancel</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="resources/pokerth.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>pushButton_createGame</sender>
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -375,6 +375,16 @@ void gameLobbyDialogImpl::updateGameItem(QList <QStandardItem*> 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);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 459 B |
Binary file not shown.
|
After Width: | Height: | Size: 740 B |
@@ -1,5 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/gfx" >
|
||||
<qresource prefix="/gfx">
|
||||
<file>view-fullscreen.png</file>
|
||||
<file>pokerth.qrc</file>
|
||||
<file>swbuttoninternetgame.png</file>
|
||||
@@ -33,5 +33,7 @@
|
||||
<file>dialog_ok_apply.png</file>
|
||||
<file>filesave.png</file>
|
||||
<file>fill-color.png</file>
|
||||
<file>lock.png</file>
|
||||
<file>cup.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
@@ -303,7 +303,7 @@
|
||||
<item row="2" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
@@ -1648,6 +1648,10 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="text">
|
||||
<string>Use password for private game:</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/lock.png</normaloff>:/gfx/lock.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -1662,7 +1666,7 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="3">
|
||||
<item row="8" column="0" colspan="3">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -1678,7 +1682,18 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_UseLobbyChat">
|
||||
<property name="text">
|
||||
<string>Enable/Disable Lobby Chat</string>
|
||||
<string>Show lobby chat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_InternetGameRankingMode">
|
||||
<property name="text">
|
||||
<string>Use ranking mode (this game will affect players online ranking level)</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/cup.png</normaloff>:/gfx/cup.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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;}");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user