Added saving of alerts - unstable!!!
[kitchenalert] / src / currentalertstablemodel.h
index 32cadc3..52f3f5c 100644 (file)
 #define CURRENTALERTSTABLEMODEL_H
 
 #include <QAbstractTableModel>
+#include <QMainWindow>
 #include "timer.h"
 
 
 /*! Class that contains the model that holds the timers'
 
   @author Heli Hyvättinen
-  @date 2010-06-26
-  @version 0.09
+  @date 2010-08-08
+  @version 0.1.1
 
 Class that contains the model that holds the timers
 
@@ -54,8 +55,14 @@ public:
 
     QVariant data(const QModelIndex &index, int role) const;
 
+    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+
     QModelIndex giveIndexForTimer(Timer * ptimer);
 
+    bool isThisTimerAlerting(QModelIndex index);
+
+    bool saveTimer(QModelIndex index,QString filename);
+
 signals:
 
 public slots:
@@ -68,6 +75,11 @@ public slots:
     void snoozeTimer(QModelIndex index);
     void stopTimer(QModelIndex index);
 
+
+    void setUpdateViewOnChanges(bool update);
+
+    void removeTimer(QModelIndex index);
+
 private:
     QList <Timer * > currentTimers_;
 
@@ -76,6 +88,10 @@ private:
     static const int timeRemainingColumnNumber_ = 1;
     static const int statusColumnNumber_ = 2;
 
+
+
+    bool updateViewOnChanges_;
+
 };
 
 #endif // CURRENTALERTSTABLEMODEL_H