Timer now knows where it was loaded from
[kitchenalert] / src / timer.h
index 061475d..0b13656 100644 (file)
@@ -39,7 +39,7 @@
 /*! The timer class of KitchenAlert'
 
   @author Heli Hyvättinen
-  @date 2011-02-10
+  @date 2011-04-05
   @version 0.2.1
 
 The timer class of KitchenAlert.
@@ -72,6 +72,16 @@ public:
     /*! Returns whether the timer is alerting */
     bool isAlerting();
 
+    /*! Saves the timer to a file
+      @param filename The file to which to save.
+    */
+    bool save(QString filename);
+
+    /*! Loads a timer from a file
+      @param filename The file from which to load.
+    */
+    bool load(QString filename);
+
 
 signals:
     /*! Emitted when the remaining time in the timer has changed */
@@ -111,10 +121,14 @@ private:
     QTimer _actualTimer;
     bool alerting_;
 
+    QString filenameWithPath_; /*! Name (with full path) of the file where the timer was loaded from. Empty if timer not loaded from file. */
+
     QModelIndex whereAmI();
 
     AlertSound alertSound_;
 
+
+
 };
 
 #endif // TIMER_H