Timer now knows where it was loaded from
authorHeli Hyvättinen <heli.hyvattinen@kymp.net>
Sun, 26 Jun 2011 12:14:05 +0000 (15:14 +0300)
committerHeli Hyvättinen <heli.hyvattinen@kymp.net>
Sun, 26 Jun 2011 12:14:54 +0000 (15:14 +0300)
src/timer.cpp
src/timer.h

index c65e862..7e1d8e3 100644 (file)
@@ -205,6 +205,9 @@ bool Timer::load(QString filename)
 
     _alertText = reader.attributes().value("alert_text").toString();
     _originalTime = reader.attributes().value("time_in_seconds").toString().toInt();
+
+    filenameWithPath_ = filename;
+
     return true;
 }
 
index ff2c22b..0b13656 100644 (file)
@@ -121,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