Initial commit: added current sources
[kitchenalert] / src / kitchenalertmainwindow.h
1 /**************************************************************************
2         KitchenAlert v.0.01
3
4         Copyright (C) 2010  Heli Hyvättinen
5
6         This program is free software: you can redistribute it and/or modify
7         it under the terms of the GNU General Public License as published by
8         the Free Software Foundation, either version 3 of the License, or
9         (at your option) any later version.
10
11         This program is distributed in the hope that it will be useful,
12         but WITHOUT ANY WARRANTY; without even the implied warranty of
13         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14         GNU General Public License for more details.
15
16         You should have received a copy of the GNU General Public License
17         along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 **************************************************************************/
20
21
22
23 #ifndef KITCHENALERTMAINWINDOW_H
24 #define KITCHENALERTMAINWINDOW_H
25
26 #include <QMainWindow>
27 #include "timer.h"
28 #include "currentalertstablemodel.h"
29 #include <QItemSelection>
30
31
32 namespace Ui {
33     class KitchenAlertMainWindow;
34 }
35
36 class KitchenAlertMainWindow : public QMainWindow
37 {
38     Q_OBJECT 
39
40
41
42
43 public:
44     explicit KitchenAlertMainWindow(QWidget *parent = 0);
45     ~KitchenAlertMainWindow();
46
47
48 public slots:
49     void openTimerSequence();
50     void newTimerSequence();
51
52     void updateTime(int seconds);
53     void alert(QModelIndex indexOfAlerted);
54     void timerSelected(QItemSelection,QItemSelection);
55     void snooze();
56     void restart();
57     void stop();
58
59 protected:
60     void changeEvent(QEvent *e);
61
62 private:
63     Ui::KitchenAlertMainWindow *ui;
64
65     QList <Timer *> currentTimers_;
66
67     CurrentAlertsTableModel model_;
68
69     QModelIndex selectedRow();
70 };
71
72 #endif // KITCHENALERTMAINWINDOW_H