summaryrefslogtreecommitdiff
path: root/status.h
diff options
context:
space:
mode:
authorAndreas Brugger <brougs78@gmx.net>2006-02-04 11:49:02 +0100
committerThomas Günther <tom@toms-cafe.de>2009-06-03 02:58:17 +0200
commitc1bf83aec2961a4e84dbc1c36042bd985f044a91 (patch)
tree6ce0edea2a8cdf3e83ee897022f85261c6c15407 /status.h
parentdaad17454a344d50150850fd9b9062b200982140 (diff)
downloadvdr-plugin-text2skin-c1bf83aec2961a4e84dbc1c36042bd985f044a91.tar.gz
vdr-plugin-text2skin-c1bf83aec2961a4e84dbc1c36042bd985f044a91.tar.bz2
2006-02-04: Version 1.1-cvs_ext-0.7 (vdr-text2skin-1.1-cvs_ext-0.7.diff)
- changed the routines to determine the next timers - added the possibility to have a scrollbar in every menu - not fully implemented yet (to position in menu-lists is not necessarily correct, if there are more items with the same osd-text)
Diffstat (limited to 'status.h')
-rw-r--r--status.h43
1 files changed, 26 insertions, 17 deletions
diff --git a/status.h b/status.h
index 2047595..8bd0f96 100644
--- a/status.h
+++ b/status.h
@@ -5,8 +5,6 @@
#ifndef VDR_TEXT2SKIN_STATUS_H
#define VDR_TEXT2SKIN_STATUS_H
-#include <algorithm>
-#include <vector>
#include "common.h"
#include <vdr/status.h>
@@ -30,22 +28,32 @@ public:
typedef std::string tRecordingInfo;
typedef std::vector<tRecordingInfo> tRecordings;
- struct tEvent
+ struct tEvent : public cListObject
{
- std::string title;
- bool isRecording;
- std::string channelName;
- int channelNumber;
- time_t startTime;
- time_t stopTime;
- int priority;
+ time_t startTime;
+ time_t stopTime;
+ int channelNumber;
+ std::string channelName;
+ int priority;
+ bool isRecording;
+ std::string title;
- bool tEvent::operator< (const tEvent &b) const
+ tEvent(cTimer *timer) :
+ startTime(timer->StartTime()),
+ stopTime(timer->StopTime()),
+ channelNumber(timer->Channel()->Number()),
+ channelName(timer->Channel()->Name()),
+ priority(timer->Priority()),
+ isRecording(timer->Recording()),
+ title(timer->File()) {}
+
+ virtual int Compare(const cListObject &listObj) const
{
- int r = startTime - b.startTime;
- r = r == 0 ? b.priority - priority : r;
- return r > 0 ? true : false;
- };
+ tEvent *e = (tEvent *)&listObj;
+ int r = startTime - e->startTime;
+ if (r == 0) r = e->priority - priority;
+ return r;
+ }
};
typedef std::vector<tEvent> tEvents;
@@ -58,8 +66,8 @@ private:
bool mReplayIsLoop;
bool mReplayIsShuffle;
tRecordings mRecordings;
- tEvents mEvents;
const cRecording *mReplay;
+ cList<tEvent> mEvents;
cMutex mRecordingsLock;
uint mCurrentRecording;
uint mNextRecording;
@@ -76,7 +84,8 @@ protected:
#endif
virtual void OsdClear(void);
virtual void OsdCurrentItem(const char *Text);
-
+ virtual void OsdItem(const char *Text, int Index);
+
public:
cText2SkinStatus(void);