From 6ceeb1855f4f6235fa29e07d56784ac8d950aada Mon Sep 17 00:00:00 2001 From: Petr Kubiznak Date: Tue, 5 Apr 2011 19:41:09 +0200 Subject: [PATCH] SettingsForm: Sound and music buttons added to dialog. --- ui/qt/SettingsForm.cpp | 15 ++++++++++++++ ui/qt/SettingsForm.h | 3 +++ ui/qt/SettingsForm.ui | 55 +++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/ui/qt/SettingsForm.cpp b/ui/qt/SettingsForm.cpp index e22ce15..83cad31 100644 --- a/ui/qt/SettingsForm.cpp +++ b/ui/qt/SettingsForm.cpp @@ -19,6 +19,9 @@ SettingsForm::SettingsForm() { QObject::connect(ui.advancedRadio, SIGNAL(clicked()), this, SLOT(advancedRadio_Clicked())); QObject::connect(ui.suicideRadio, SIGNAL(clicked()), this, SLOT(suicideRadio_Clicked())); QObject::connect(ui.customRadio, SIGNAL(clicked()), this, SLOT(customRadio_Clicked())); + + QObject::connect(ui.soundEffectsBtn, SIGNAL(toggled(bool)), this, SLOT(soundEffectsBtn_Toggled(bool))); + QObject::connect(ui.soundMusicBtn, SIGNAL(toggled(bool)), this, SLOT(soundMusicBtn_Toggled(bool))); } /* -------------------------------------------------------------------------- */ @@ -76,3 +79,15 @@ void SettingsForm::customRadio_Clicked(void) { } /* -------------------------------------------------------------------------- */ + +void SettingsForm::soundEffectsBtn_Toggled(bool checked) { + ui.soundEffectsBtn->setText(checked ? "Effects On" : "Effects Off"); +} + +/* -------------------------------------------------------------------------- */ + +void SettingsForm::soundMusicBtn_Toggled(bool checked) { + ui.soundEffectsBtn->setText(checked ? "Music On" : "Music Off"); +} + +/* -------------------------------------------------------------------------- */ diff --git a/ui/qt/SettingsForm.h b/ui/qt/SettingsForm.h index 169862d..3d5ff31 100644 --- a/ui/qt/SettingsForm.h +++ b/ui/qt/SettingsForm.h @@ -32,6 +32,9 @@ public Q_SLOTS: void advancedRadio_Clicked(void); void suicideRadio_Clicked(void); void customRadio_Clicked(void); + //tlacitka zvuku + void soundEffectsBtn_Toggled(bool checked); + void soundMusicBtn_Toggled(bool checked); }; diff --git a/ui/qt/SettingsForm.ui b/ui/qt/SettingsForm.ui index 43a83c7..82cce3b 100644 --- a/ui/qt/SettingsForm.ui +++ b/ui/qt/SettingsForm.ui @@ -7,7 +7,7 @@ 0 0 360 - 216 + 274 @@ -85,7 +85,7 @@ - + @@ -102,7 +102,7 @@ - + Difficultness @@ -138,8 +138,53 @@ + + + + Sounds + + + + + + true + + + Effects + + + true + + + + + + + Music + + + true + + + + + + + + rookieRadio + advancedRadio + suicideRadio + customRadio + layersSpinBox + rowsSpinBox + columnsSpinBox + minesSpinBox + soundEffectsBtn + soundMusicBtn + buttonBox + @@ -154,7 +199,7 @@ 157 - 274 + 273 @@ -170,7 +215,7 @@ 286 - 274 + 273 -- 2.11.4.GIT