+void KitchenAlertMainWindow::initializeAlertSound()
+{
+ QSettings settings;
+
+ bool useDefaultSound = settings.value("UseDefaultSound",true).toBool();
+ QString filename = settings.value("soundfile","").toString();
+
+ if (useDefaultSound == true)
+ {
+ openSelectSoundDialog();
+ }
+ else if (filename.isEmpty())
+ {
+ openSelectSoundDialog();
+ }
+
+ QString currentFilename = settings.value("soundfile","").toString();
+
+ if (currentFilename.isEmpty())
+ {
+ ui->debugLabel->setText("<FONT color=red>No alert sound file set. Alert sound will not be played!</FONT>");
+
+ }
+
+}
+
+void KitchenAlertMainWindow::remove()
+{
+ QModelIndex row = selectedRow();
+ if (row.isValid()) //If there was no row selected invalid row was returned
+ {
+ QString text = tr("Are you sure you want to remove this timer from the list:\n");
+ text.append((row.data().toString()));
+ if (QMessageBox::question(this,tr("Confirm timer removal"),text,QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)
+ {
+ model_.removeTimer(row);
+ }
+ }
+ ui->SnoozeButton->setDisabled(true);