summaryrefslogtreecommitdiff
path: root/timeline.h
diff options
context:
space:
mode:
Diffstat (limited to 'timeline.h')
-rw-r--r--timeline.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/timeline.h b/timeline.h
new file mode 100644
index 0000000..c6914d2
--- /dev/null
+++ b/timeline.h
@@ -0,0 +1,50 @@
+#ifndef __TVGUIDE_TIMELINE_H
+#define __TVGUIDE_TIMELINE_H
+
+#include <set>
+#include <vdr/tools.h>
+#include "libskindesigner/osdelements.h"
+#include "config.h"
+#include "timemanager.h"
+
+// --- cTimelineElement -------------------------------------------------------------
+
+class cTimelineElement : public cListObject {
+private:
+ bool init;
+ time_t elementTime;
+public:
+ cTimelineElement(time_t elementTime);
+ virtual ~cTimelineElement(void);
+ long Id(void) { return elementTime; };
+ bool IsNew(void);
+ bool IsFullHour(void);
+ string ToString(void) { return *TimeString(elementTime); };
+};
+
+// --- cTimeline -------------------------------------------------------------
+
+class cTimeline {
+private:
+ cViewGrid *timelineGrid;
+ cViewElement *timelineDate;
+ cViewElement *timeIndicator;
+ cTimeManager *timeManager;
+ cList<cTimelineElement> grids;
+ int steps;
+ int stepDuration;
+ string weekday;
+ bool timeIndicatorShown;
+ void DrawDate(void);
+ void DrawTimeIndicator(void);
+public:
+ cTimeline(cViewGrid *timelineGrid, cViewElement *timelineDate, cViewElement *timeIndicator, cTimeManager *timeManager);
+ virtual ~cTimeline(void);
+ void Init(void);
+ void Clear(void);
+ void ScrollForward(int stepMinutes);
+ void ScrollBack(int stepMinutes);
+ void Draw(void);
+};
+
+#endif //__TVGUIDE_TIMELINE_H