2013-01-17 13:16:44 +01:00
|
|
|
#ifndef __TVGUIDE_CHANNELCOLUMN_H
|
|
|
|
#define __TVGUIDE_CHANNELCOLUMN_H
|
|
|
|
|
2013-12-07 15:51:50 +01:00
|
|
|
#include <vdr/tools.h>
|
|
|
|
#include "grid.h"
|
|
|
|
#include "epggrid.h"
|
|
|
|
#include "headergrid.h"
|
|
|
|
#include "switchtimer.h"
|
|
|
|
|
2013-05-20 11:37:37 +02:00
|
|
|
class cGrid;
|
2013-01-17 13:16:44 +01:00
|
|
|
class cEpgGrid;
|
2013-05-20 11:37:37 +02:00
|
|
|
class cHeaderGrid;
|
2013-12-07 15:51:50 +01:00
|
|
|
|
2013-01-17 13:16:44 +01:00
|
|
|
// --- cChannelColumn -------------------------------------------------------------
|
|
|
|
|
|
|
|
class cChannelColumn : public cListObject, public cStyledPixmap {
|
|
|
|
private:
|
2013-05-20 11:37:37 +02:00
|
|
|
cMyTime *myTime;
|
2013-05-26 11:38:05 +02:00
|
|
|
int num;
|
|
|
|
const cChannel *channel;
|
|
|
|
cHeaderGrid *header;
|
2013-05-20 11:37:37 +02:00
|
|
|
cList<cGrid> grids;
|
2013-05-26 11:38:05 +02:00
|
|
|
cSchedulesLock *schedulesLock;
|
|
|
|
const cSchedules *schedules;
|
|
|
|
bool hasTimer;
|
2013-07-09 00:17:42 +02:00
|
|
|
bool hasSwitchTimer;
|
2013-05-20 11:37:37 +02:00
|
|
|
cGrid *addEpgGrid(const cEvent *event, cGrid *firstGrid, bool color);
|
|
|
|
cGrid *addDummyGrid(time_t start, time_t end, cGrid *firstGrid, bool color);
|
2013-01-17 13:16:44 +01:00
|
|
|
public:
|
2013-05-26 11:38:05 +02:00
|
|
|
cChannelColumn(int num, const cChannel *channel, cMyTime *myTime);
|
|
|
|
virtual ~cChannelColumn(void);
|
|
|
|
void createHeader();
|
|
|
|
void drawHeader();
|
|
|
|
bool readGrids();
|
|
|
|
void drawGrids();
|
|
|
|
int getX();
|
|
|
|
int getY();
|
2013-05-20 11:37:37 +02:00
|
|
|
int Start() { return myTime->GetStart(); };
|
|
|
|
int Stop() { return myTime->GetEnd(); };
|
|
|
|
const char* Name() { return channel->Name(); };
|
2013-05-26 11:38:05 +02:00
|
|
|
const cChannel * getChannel() {return channel;}
|
|
|
|
cGrid * getActive();
|
|
|
|
cGrid * getNext(cGrid *activeGrid);
|
|
|
|
cGrid * getPrev(cGrid *activeGrid);
|
|
|
|
cGrid * getNeighbor(cGrid *activeGrid);
|
2013-05-20 11:37:37 +02:00
|
|
|
bool isFirst(cGrid *grid);
|
2013-05-26 11:38:05 +02:00
|
|
|
void AddNewGridsAtStart();
|
|
|
|
void AddNewGridsAtEnd();
|
|
|
|
void ClearOutdatedStart();
|
|
|
|
void ClearOutdatedEnd();
|
|
|
|
int GetNum() {return num;};
|
|
|
|
void SetNum(int num) {this->num = num;};
|
2013-07-09 00:17:42 +02:00
|
|
|
void setTimer() {hasTimer = channel->HasTimer();};
|
2013-05-20 11:37:37 +02:00
|
|
|
bool HasTimer() { return hasTimer; };
|
2013-07-09 00:17:42 +02:00
|
|
|
void setSwitchTimer() {hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);};
|
|
|
|
bool HasSwitchTimer() { return hasSwitchTimer; };
|
|
|
|
void SetTimers();
|
2013-05-26 11:38:05 +02:00
|
|
|
void clearGrids();
|
|
|
|
void dumpGrids();
|
2013-01-17 13:16:44 +01:00
|
|
|
};
|
|
|
|
|
2013-05-20 11:37:37 +02:00
|
|
|
#endif //__TVGUIDE_CHANNELCOLUMN_H
|