added option to disable notification sound

This commit is contained in:
Niklas 2020-02-16 20:52:10 +01:00
parent 6d5356f140
commit d75f993ef8
3 changed files with 15 additions and 2 deletions

View File

@ -68,6 +68,7 @@ SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent), ui(new Ui::Se
ui->quickMode->setChecked(settings::settings().value("quickMode", false).toBool()); ui->quickMode->setChecked(settings::settings().value("quickMode", false).toBool());
ui->hideToTray->setChecked(settings::settings().value("hideOnClose", true).toBool()); ui->hideToTray->setChecked(settings::settings().value("hideOnClose", true).toBool());
ui->captureCursor->setChecked(settings::settings().value("captureCursor", true).toBool()); ui->captureCursor->setChecked(settings::settings().value("captureCursor", true).toBool());
ui->playSound->setChecked(settings::settings().value("playSound", true).toBool());
ui->saveLocation->setCurrentIndex(settings::settings().value("saveLocation", 1).toInt()); ui->saveLocation->setCurrentIndex(settings::settings().value("saveLocation", 1).toInt());
ui->themeSelection->setCurrentIndex(settings::settings().value("theme", 0).toInt()); ui->themeSelection->setCurrentIndex(settings::settings().value("theme", 0).toInt());
for (int i = 0; i < (int)formats::Recording::None; i++) { for (int i = 0; i < (int)formats::Recording::None; i++) {
@ -158,6 +159,10 @@ void SettingsDialog::on_captureCursor_clicked(bool checked) {
settings::settings().setValue("captureCursor", checked); settings::settings().setValue("captureCursor", checked);
} }
void SettingsDialog::on_playSound_clicked(bool checked) {
settings::settings().setValue("playSound", checked);
}
void SettingsDialog::on_formatBox_currentIndexChanged(int index) { void SettingsDialog::on_formatBox_currentIndexChanged(int index) {
if (isVisible()) settings::settings().setValue("recording/format", index); if (isVisible()) settings::settings().setValue("recording/format", index);
} }

View File

@ -26,6 +26,7 @@ private slots:
void on_quickMode_clicked(bool checked); void on_quickMode_clicked(bool checked);
void on_hideToTray_clicked(bool checked); void on_hideToTray_clicked(bool checked);
void on_captureCursor_clicked(bool checked); void on_captureCursor_clicked(bool checked);
void on_playSound_clicked(bool checked);
void on_formatBox_currentIndexChanged(int index); void on_formatBox_currentIndexChanged(int index);
void on_imageFormatBox_currentIndexChanged(int index); void on_imageFormatBox_currentIndexChanged(int index);
void on_pushButton_clicked(); void on_pushButton_clicked();

View File

@ -88,14 +88,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0"> <item row="7" column="0">
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Delay before taking a screenshot</string> <string>Delay before taking a screenshot</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="1"> <item row="7" column="1">
<widget class="QDoubleSpinBox" name="delay"> <widget class="QDoubleSpinBox" name="delay">
<property name="toolTip"> <property name="toolTip">
<string>In seconds</string> <string>In seconds</string>
@ -108,6 +108,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0">
<widget class="QCheckBox" name="playSound">
<property name="text">
<string>Play notification Sound</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">