From 4ed3b51c245fa1697d2bce24d00a3e727bfac8f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Heli=20Hyv=C3=A4ttinen?= Date: Sun, 30 Jan 2011 15:06:17 +0200 Subject: [PATCH] Snoozable 00:00:00 alerts --- src/kitchenalertmainwindow.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/kitchenalertmainwindow.cpp b/src/kitchenalertmainwindow.cpp index 5d60117..c848cd6 100644 --- a/src/kitchenalertmainwindow.cpp +++ b/src/kitchenalertmainwindow.cpp @@ -193,7 +193,7 @@ void KitchenAlertMainWindow::alert(QModelIndex indexOfAlerter) ui->SnoozeButton->setEnabled(true); -qDebug ("Snooze päälle hälytyksessä"); +//qDebug ("Snooze on when alerting"); } @@ -215,12 +215,12 @@ void KitchenAlertMainWindow::timerSelected(QItemSelection selected,QItemSelectio if (model_.isThisTimerAlerting(index) == true) { ui->SnoozeButton->setEnabled(true); -qDebug() << "Snooze päälle"; +//qDebug() << "Snooze on"; } else { ui->SnoozeButton->setDisabled(true); -qDebug() << "Snooze pois päältä"; +//qDebug() << "Snooze off"; } } @@ -234,7 +234,7 @@ void KitchenAlertMainWindow::snooze() model_.snoozeTimer(row); } ui->SnoozeButton->setDisabled(true); - // alertSound_.stop(); + } @@ -248,9 +248,12 @@ void KitchenAlertMainWindow::restart() } - ui->SnoozeButton->setDisabled(true); - qDebug () << "disabled snooze because of restart"; - // alertSound_.stop(); + if (model_.isThisTimerAlerting(row) == false) //This has to be checked, because 00:00:00 alerts alert *before* the program execution reaches here + { + ui->SnoozeButton->setDisabled(true); + } + // qDebug () << "disabled snooze because of restart"; + } @@ -262,7 +265,7 @@ void KitchenAlertMainWindow::stop() model_.stopTimer(row); } ui->SnoozeButton->setDisabled(true); -// alertSound_.stop(); + } QModelIndex KitchenAlertMainWindow::selectedRow() -- 1.7.9.5