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