Add confirmation dialog checkboxes in Preferences
This commit is contained in:
@@ -116,6 +116,8 @@ ProgSettings::ProgSettings(QWidget *parent)
|
|||||||
ui->horizontalSlider->setValue(mouseSensitivity * 100.);
|
ui->horizontalSlider->setValue(mouseSensitivity * 100.);
|
||||||
ui->openDirUsrPath->setChecked(open_dir_usr_path > 0);
|
ui->openDirUsrPath->setChecked(open_dir_usr_path > 0);
|
||||||
ui->checkBoxMultimediaKeys->setChecked(inhibit_multimedia_keys);
|
ui->checkBoxMultimediaKeys->setChecked(inhibit_multimedia_keys);
|
||||||
|
ui->checkBoxConfirmExit->setChecked(confirm_exit);
|
||||||
|
ui->checkBoxConfirmSave->setChecked(confirm_save);
|
||||||
#ifndef Q_OS_WINDOWS
|
#ifndef Q_OS_WINDOWS
|
||||||
ui->checkBoxMultimediaKeys->setHidden(true);
|
ui->checkBoxMultimediaKeys->setHidden(true);
|
||||||
#endif
|
#endif
|
||||||
@@ -127,6 +129,8 @@ ProgSettings::accept()
|
|||||||
strcpy(icon_set, ui->comboBox->currentData().toString().toUtf8().data());
|
strcpy(icon_set, ui->comboBox->currentData().toString().toUtf8().data());
|
||||||
lang_id = ui->comboBoxLanguage->currentData().toUInt();
|
lang_id = ui->comboBoxLanguage->currentData().toUInt();
|
||||||
open_dir_usr_path = ui->openDirUsrPath->isChecked() ? 1 : 0;
|
open_dir_usr_path = ui->openDirUsrPath->isChecked() ? 1 : 0;
|
||||||
|
confirm_exit = ui->checkBoxConfirmExit->isChecked() ? 1 : 0;
|
||||||
|
confirm_save = ui->checkBoxConfirmSave->isChecked() ? 1 : 0;
|
||||||
inhibit_multimedia_keys = ui->checkBoxMultimediaKeys->isChecked();
|
inhibit_multimedia_keys = ui->checkBoxMultimediaKeys->isChecked();
|
||||||
|
|
||||||
loadTranslators(QCoreApplication::instance());
|
loadTranslators(QCoreApplication::instance());
|
||||||
|
|||||||
@@ -29,56 +29,25 @@
|
|||||||
<property name="sizeConstraint">
|
<property name="sizeConstraint">
|
||||||
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
|
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="9" column="0">
|
<item row="14" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="openDirUsrPath">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="toolTip">
|
<property name="orientation">
|
||||||
<string><html><head/><body><p>When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.</p></body></html></string>
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Select media images from program working directory</string>
|
<string>Default</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="2" column="1">
|
||||||
<spacer name="horizontalSpacer_3">
|
<widget class="QPushButton" name="pushButton">
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" colspan="2">
|
|
||||||
<widget class="QComboBox" name="comboBoxLanguage">
|
|
||||||
<property name="maxVisibleItems">
|
|
||||||
<number>30</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>(System Default)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QPushButton" name="pushButtonLanguage">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Default</string>
|
<string>Default</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -97,13 +66,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="0" colspan="2">
|
<item row="5" column="1">
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QPushButton" name="pushButtonLanguage">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
<string>Default</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
</widget>
|
||||||
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QCheckBox" name="openDirUsrPath">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Select media images from program working directory</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -121,6 +97,80 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="11" column="0">
|
||||||
|
<widget class="QCheckBox" name="checkBoxConfirmSave">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ask for confirmation before saving settings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" colspan="2">
|
||||||
|
<widget class="QComboBox" name="comboBoxLanguage">
|
||||||
|
<property name="maxVisibleItems">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>(System Default)</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0">
|
||||||
|
<widget class="QCheckBox" name="checkBoxMultimediaKeys">
|
||||||
|
<property name="text">
|
||||||
|
<string>Inhibit multimedia keys on Windows</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="QComboBox" name="comboBox">
|
||||||
|
<property name="editable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="maxVisibleItems">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>(Default)</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Mouse sensitivity:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="7" column="0" colspan="3">
|
<item row="7" column="0" colspan="3">
|
||||||
<widget class="QSlider" name="horizontalSlider">
|
<widget class="QSlider" name="horizontalSlider">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
@@ -143,46 +193,10 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
<item row="12" column="0">
|
||||||
<widget class="QComboBox" name="comboBox">
|
<widget class="QCheckBox" name="checkBoxConfirmExit">
|
||||||
<property name="editable">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="maxVisibleItems">
|
|
||||||
<number>30</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>(Default)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Mouse sensitivity:</string>
|
<string>Ask for confirmation before quitting</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QPushButton" name="pushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Default</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="1">
|
|
||||||
<widget class="QPushButton" name="pushButton_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Default</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="0">
|
|
||||||
<widget class="QCheckBox" name="checkBoxMultimediaKeys">
|
|
||||||
<property name="text">
|
|
||||||
<string>Inhibit multimedia keys on Windows</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user