From e5f71ea767515f50f5ed8c34946a87746a3d4ed7 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 26 Feb 2014 03:46:01 -0600 Subject: use the timezones object to set the ECalComponent's default timezone. This is needed to properly handle the 'floating' dates in the alarms --- include/datetime/planner-eds.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/datetime/planner-eds.h') diff --git a/include/datetime/planner-eds.h b/include/datetime/planner-eds.h index a99f611..32ea57a 100644 --- a/include/datetime/planner-eds.h +++ b/include/datetime/planner-eds.h @@ -22,6 +22,7 @@ #include #include +#include #include // shared_ptr, unique_ptr @@ -35,7 +36,8 @@ namespace datetime { class PlannerEds: public Planner { public: - PlannerEds(const std::shared_ptr& clock); + PlannerEds(const std::shared_ptr& clock, + const std::shared_ptr& timezones); virtual ~PlannerEds(); private: -- cgit v1.2.3 From ed9d932ef17fd55d8858a9391ab81d237a6be5ad Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 9 Mar 2014 12:41:45 -0500 Subject: in EdsPlanner, use a Timezone instead of Timezones object --- include/datetime/planner-eds.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/datetime/planner-eds.h') diff --git a/include/datetime/planner-eds.h b/include/datetime/planner-eds.h index 32ea57a..3d558df 100644 --- a/include/datetime/planner-eds.h +++ b/include/datetime/planner-eds.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include // shared_ptr, unique_ptr @@ -37,7 +37,7 @@ class PlannerEds: public Planner { public: PlannerEds(const std::shared_ptr& clock, - const std::shared_ptr& timezones); + const std::shared_ptr& timezone); virtual ~PlannerEds(); private: -- cgit v1.2.3 From 3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 9 Mar 2014 21:08:47 -0500 Subject: decouple the planner's states; need three separate sets: upcoming-now (for alarms in the current time), upcoming-calendar (to show events coming from the selected calendar date), and calendar-month (all the appointments in the month displayed in the menu). --- include/datetime/planner-eds.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'include/datetime/planner-eds.h') diff --git a/include/datetime/planner-eds.h b/include/datetime/planner-eds.h index 3d558df..95b5d79 100644 --- a/include/datetime/planner-eds.h +++ b/include/datetime/planner-eds.h @@ -20,8 +20,9 @@ #ifndef INDICATOR_DATETIME_PLANNER_EDS_H #define INDICATOR_DATETIME_PLANNER_EDS_H -#include -#include +#include + +#include #include #include // shared_ptr, unique_ptr @@ -31,18 +32,24 @@ namespace indicator { namespace datetime { /** - * \brief Planner which uses EDS as its backend + * \brief An EDS-based #RangePlanner */ -class PlannerEds: public Planner +class EdsPlanner: public RangePlanner { public: - PlannerEds(const std::shared_ptr& clock, + EdsPlanner(const std::shared_ptr& eds_engine, const std::shared_ptr& timezone); - virtual ~PlannerEds(); + virtual ~EdsPlanner(); + + core::Property>& appointments(); + +protected: + void rebuild_now(); private: - class Impl; - std::unique_ptr p; + std::shared_ptr m_engine; + std::shared_ptr m_timezone; + core::Property> m_appointments; }; } // namespace datetime -- cgit v1.2.3