blob: 0b99a90c17f2c7d7c3d5f9787bc0914266de7656 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#ifndef __TVGUIDE_CHANNELGROUPS_H
#define __TVGUIDE_CHANNELGROUPS_H
#include <set>
#include <vdr/tools.h>
#include <libskindesignerapi/skindesignerosdbase.h>
#include "definitions.h"
#include "config.h"
// --- cChannelGroup -------------------------------------------------------------
class cChannelGroup : public cListObject {
private:
int id;
int channelStart;
int channelStop;
string name;
public:
cChannelGroup(const cChannelGroup &ChannelGroup)
{
*this = ChannelGroup;
};
cChannelGroup& operator= (const cChannelGroup &ChannelGroup)
{
this->id = ChannelGroup.id;
this->channelStart = ChannelGroup.channelStart;
this->channelStop = ChannelGroup.channelStop;
this->name = ChannelGroup.name;
return *this;
};
cChannelGroup(string name, int id);
virtual ~cChannelGroup(void);
int GetId(void) { return id; };
void SetChannelStart(int start) { channelStart = start; };
int StartChannel(void) { return channelStart; };
void SetChannelStop(int stop) { channelStop = stop; };
int StopChannel(void) { return channelStop; };
const char *GetName(void) { return name.c_str(); };
void Debug(void);
};
// --- cChannelgroups -------------------------------------------------------------
class cChannelgroups {
private:
skindesignerapi::cViewGrid *channelgroupGrid;
vector<cChannelGroup> channelGroups;
double SetGroup(int groupId, int fields, double offset);
public:
cChannelgroups(skindesignerapi::cViewGrid *channelgroupGrid);
virtual ~cChannelgroups(void);
void Init(void);
void Clear(void);
void Draw(const cChannel *start, const cChannel *stop);
int GetGroup(const cChannel *channel);
string GetPrevGroupName(int group);
string GetNextGroupName(int group);
int GetPrevGroupFirstChannel(int group);
int GetNextGroupFirstChannel(int group);
bool IsInFirstGroup(const cChannel *channel);
bool IsInLastGroup(const cChannel *channel);
bool IsInSecondLastGroup(const cChannel *channel);
int GetLastValidChannel(void);
};
#endif //__TVGUIDE_TIMELINE_H
|