+
+void SelectSoundDialog::testSound()
+{
+ if (isTesting_ == false)
+ {
+ if (ui->CustomSoundRadioButton->isChecked() == false)
+ {
+ player.setMedia(QUrl::fromLocalFile(AlertSound::defaultsound_));
+ }
+
+ else
+ {
+ player.setMedia(QUrl::fromLocalFile(ui->lineEdit->displayText()));
+ }
+
+ player.play();
+
+ ui->TestButton->setText(tr("Stop test"));
+
+ isTesting_ = true;
+ }
+
+ else
+ {
+ player.stop();
+ ui->TestButton->setText(tr("Test sound"));
+ isTesting_ = false;
+ }
+
+}