From de210dd7574f6aaaf52b5302d3a72014ab49c626 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Heli=20Hyv=C3=A4ttinen?= Date: Sun, 26 Jun 2011 15:14:05 +0300 Subject: [PATCH] Timer now knows where it was loaded from --- src/timer.cpp | 3 +++ src/timer.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/timer.cpp b/src/timer.cpp index c65e862..7e1d8e3 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -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; } diff --git a/src/timer.h b/src/timer.h index ff2c22b..0b13656 100644 --- a/src/timer.h +++ b/src/timer.h @@ -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 -- 1.7.9.5