reverse FKey order option added

This commit is contained in:
doitux
2007-09-17 08:38:09 +00:00
parent 7a398b0d29
commit b7aa1614be
4 changed files with 32 additions and 6 deletions
+2 -1
View File
@@ -53,7 +53,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
if(strcmp(argv[i], "--nowriteaccess") == 0) { noWriteAccess = 1; }
}
// !!!! Revisionsnummer der Configdefaults !!!!!
configRev = 33;
configRev = 34;
//standard defaults
logOnOffDefault = "1";
@@ -157,6 +157,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
configList.push_back(ConfigInfo("ShowFlipCardsAnimation", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("ShowBlindButtons", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("AntiPeekMode", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("AlternateFKeysUserActionMode", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("PlaySoundEffects", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("SoundVolume", CONFIG_TYPE_INT, "8"));
configList.push_back(ConfigInfo("FlipsideTux", CONFIG_TYPE_INT, "1"));
+19 -3
View File
@@ -1572,7 +1572,11 @@ void mainWindowImpl::meInAction() {
myActionIsBet = 0;
if(myConfig->readConfigInt("ShowStatusbarMessages")) {
statusBar()->showMessage(tr("F1 - Fold/All-In | F2 - Check/Call | F3 - Bet/Raise"), 15000);
if ( myConfig->readConfigInt("AlternateFKeysUserActionMode") == 0 ) {
statusBar()->showMessage(tr("F1 - Fold/All-In | F2 - Check/Call | F3 - Bet/Raise"), 15000);
} else {
statusBar()->showMessage(tr("F1 - Bet/Raise | F2 - Check/Call | F3 - Fold/All-In"), 15000);
}
}
Game *currentGame = mySession->getCurrentGame();
HandInterface *currentHand = currentGame->getCurrentHand();
@@ -2688,9 +2692,21 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
bool ctrlPressed = FALSE;
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return ) { if(spinBox_set->hasFocus()) pushButton_CallCheckSet->click(); } //ENTER
if (event->key() == Qt::Key_F1) { pushButton_FoldAllin->click(); }
if (event->key() == Qt::Key_F1) {
if (myConfig->readConfigInt("AlternateFKeysUserActionMode") == 0) {
pushButton_FoldAllin->click();
} else {
pushButton_BetRaise->click();
}
}
if (event->key() == Qt::Key_F2) { pushButton_CallCheckSet->click(); }
if (event->key() == Qt::Key_F3) { pushButton_BetRaise->click(); }
if (event->key() == Qt::Key_F3 ) {
if (myConfig->readConfigInt("AlternateFKeysUserActionMode") == 0) {
pushButton_BetRaise->click();
} else {
pushButton_FoldAllin->click();
}
}
// if (event->key() == Qt::Key_S) { setLabelArray[0]->startTimeOutAnimation(myConfig->readConfigInt("NetTimeOutPlayerAction"),TRUE); } //s
if (event->key() == 16777249) {
pushButton_break->click();
+9 -2
View File
@@ -62,7 +62,7 @@
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="11" column="0" >
<item row="12" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
@@ -75,7 +75,7 @@
</property>
</spacer>
</item>
<item row="10" column="0" >
<item row="11" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Flipside of Cards</string>
@@ -203,6 +203,13 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="10" column="0" >
<widget class="QCheckBox" name="checkBox_alternateFKeysUserActionMode" >
<property name="text" >
<string>Reverse order of F-Keys (F1 - F3)</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="checkBox_showRightToolbox" >
<property name="text" >
@@ -147,6 +147,7 @@ void settingsDialogImpl::exec() {
checkBox_showFlipCardsAnimation->setChecked(myConfig->readConfigInt("ShowFlipCardsAnimation"));
checkBox_showBlindButtons->setChecked(myConfig->readConfigInt("ShowBlindButtons"));
checkBox_antiPeekMode->setChecked(myConfig->readConfigInt("AntiPeekMode"));
checkBox_alternateFKeysUserActionMode->setChecked(myConfig->readConfigInt("AlternateFKeysUserActionMode"));
checkBox_playSoundEffects->setChecked(myConfig->readConfigInt("PlaySoundEffects"));
horizontalSlider_soundVolume->setValue(myConfig->readConfigInt("SoundVolume"));
radioButton_flipsideTux->setChecked(myConfig->readConfigInt("FlipsideTux"));
@@ -241,6 +242,7 @@ void settingsDialogImpl::isAccepted() {
myConfig->writeConfigInt("ShowFlipCardsAnimation", checkBox_showFlipCardsAnimation->isChecked());
myConfig->writeConfigInt("ShowBlindButtons", checkBox_showBlindButtons->isChecked());
myConfig->writeConfigInt("AntiPeekMode", checkBox_antiPeekMode->isChecked());
myConfig->writeConfigInt("AlternateFKeysUserActionMode", checkBox_alternateFKeysUserActionMode->isChecked());
myConfig->writeConfigInt("PlaySoundEffects", checkBox_playSoundEffects->isChecked());
myConfig->writeConfigInt("SoundVolume", horizontalSlider_soundVolume->value());
myConfig->writeConfigInt("FlipsideTux", radioButton_flipsideTux->isChecked());