Added saving of alerts - unstable!!!
[kitchenalert] / src / currentalertstablemodel.h
index 75c8a75..52f3f5c 100644 (file)
@@ -1,9 +1,11 @@
 /**************************************************************************
-        KitchenAlert v.0.019
+        KitchenAlert
 
         Copyright (C) 2010  Heli Hyvättinen
 
-        This program is free software: you can redistribute it and/or modify
+        This file is part of KitchenAlert.
+
+        Kitchen Alert is free software: you can redistribute it and/or modify
         it under the terms of the GNU General Public License as published by
         the Free Software Foundation, either version 3 of the License, or
         (at your option) any later version.
 #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-08-08
+  @version 0.1.1
+
+Class that contains the model that holds the timers
+
+*/
+
+
 class CurrentAlertsTableModel : public QAbstractTableModel
 {
     Q_OBJECT
@@ -40,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:
@@ -54,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_;
 
@@ -62,6 +88,10 @@ private:
     static const int timeRemainingColumnNumber_ = 1;
     static const int statusColumnNumber_ = 2;
 
+
+
+    bool updateViewOnChanges_;
+
 };
 
 #endif // CURRENTALERTSTABLEMODEL_H