diff --git a/channelcolumn.c b/channelcolumn.c index 94cb802..2b3e07a 100644 --- a/channelcolumn.c +++ b/channelcolumn.c @@ -1,7 +1,7 @@ -#include "channelcolumn.h" +#include "channelepg.h" #include "dummygrid.h" -cChannelColumn::cChannelColumn(int num, const cChannel *channel, cMyTime *myTime) { +cChannelEpg::cChannelEpg(int num, const cChannel *channel, cMyTime *myTime) { this->channel = channel; this->num = num; this->myTime = myTime; @@ -15,7 +15,7 @@ cChannelColumn::cChannelColumn(int num, const cChannel *channel, cMyTime *myTime header = NULL; } -cChannelColumn::~cChannelColumn(void) { +cChannelEpg::~cChannelEpg(void) { if (header) delete header; grids.Clear(); @@ -24,21 +24,21 @@ cChannelColumn::~cChannelColumn(void) { #endif } -void cChannelColumn::clearGrids() { +void cChannelEpg::clearGrids() { grids.Clear(); } -void cChannelColumn::createHeader() { +void cChannelEpg::createHeader() { header = new cHeaderGrid(); header->createBackground(num); header->drawChannel(channel); } -void cChannelColumn::drawHeader() { +void cChannelEpg::drawHeader() { header->setPosition(num); } -bool cChannelColumn::readGrids() { +bool cChannelEpg::readGrids() { #if VDRVERSNUM >= 20301 const cSchedules* schedules; { @@ -114,7 +114,7 @@ bool cChannelColumn::readGrids() { return false; } -void cChannelColumn::drawGrids() { +void cChannelEpg::drawGrids() { for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) { grid->SetViewportHeight(); grid->PositionPixmap(); @@ -122,15 +122,15 @@ void cChannelColumn::drawGrids() { } } -int cChannelColumn::getX() { +int cChannelEpg::getX() { return geoManager.timeLineWidth + num*geoManager.colWidth; } -int cChannelColumn::getY() { +int cChannelEpg::getY() { return geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight; } -cGrid * cChannelColumn::getActive() { +cGrid * cChannelEpg::getActive() { cMyTime t; t.Now(); for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) { @@ -140,7 +140,7 @@ cGrid * cChannelColumn::getActive() { return grids.First(); } -cGrid * cChannelColumn::getNext(cGrid *activeGrid) { +cGrid * cChannelEpg::getNext(cGrid *activeGrid) { if (activeGrid == NULL) return NULL; cGrid *next = grids.Next(activeGrid); @@ -149,7 +149,7 @@ cGrid * cChannelColumn::getNext(cGrid *activeGrid) { return NULL; } -cGrid * cChannelColumn::getPrev(cGrid *activeGrid) { +cGrid * cChannelEpg::getPrev(cGrid *activeGrid) { if (activeGrid == NULL) return NULL; cGrid *prev = grids.Prev(activeGrid); @@ -158,7 +158,7 @@ cGrid * cChannelColumn::getPrev(cGrid *activeGrid) { return NULL; } -cGrid * cChannelColumn::getNeighbor(cGrid *activeGrid) { +cGrid * cChannelEpg::getNeighbor(cGrid *activeGrid) { if (!activeGrid) return NULL; cGrid *neighbor = NULL; @@ -184,13 +184,13 @@ cGrid * cChannelColumn::getNeighbor(cGrid *activeGrid) { return neighbor; } -bool cChannelColumn::isFirst(cGrid *grid) { +bool cChannelEpg::isFirst(cGrid *grid) { if (grid == grids.First()) return true; return false; } -void cChannelColumn::AddNewGridsAtStart() { +void cChannelEpg::AddNewGridsAtStart() { cGrid *firstGrid = NULL; firstGrid = grids.First(); if (firstGrid == NULL) @@ -246,7 +246,7 @@ void cChannelColumn::AddNewGridsAtStart() { } } -void cChannelColumn::AddNewGridsAtEnd() { +void cChannelEpg::AddNewGridsAtEnd() { cGrid *lastGrid = NULL; lastGrid = grids.Last(); if (lastGrid == NULL) @@ -301,7 +301,7 @@ void cChannelColumn::AddNewGridsAtEnd() { } } -void cChannelColumn::ClearOutdatedStart() { +void cChannelEpg::ClearOutdatedStart() { cGrid *firstGrid = NULL; while (true) { firstGrid = grids.First(); @@ -325,7 +325,7 @@ void cChannelColumn::ClearOutdatedStart() { } } -void cChannelColumn::ClearOutdatedEnd() { +void cChannelEpg::ClearOutdatedEnd() { cGrid *lastGrid = NULL; while (true) { lastGrid = grids.Last(); @@ -349,7 +349,7 @@ void cChannelColumn::ClearOutdatedEnd() { } } -cGrid *cChannelColumn::addEpgGrid(const cEvent *event, cGrid *firstGrid, bool color) { +cGrid *cChannelEpg::addEpgGrid(const cEvent *event, cGrid *firstGrid, bool color) { cGrid *grid = new cEpgGrid(this, event); grid->setText(); grid->SetColor(color); @@ -360,7 +360,7 @@ cGrid *cChannelColumn::addEpgGrid(const cEvent *event, cGrid *firstGrid, bool co return grid; } -cGrid *cChannelColumn::addDummyGrid(time_t start, time_t end, cGrid *firstGrid, bool color) { +cGrid *cChannelEpg::addDummyGrid(time_t start, time_t end, cGrid *firstGrid, bool color) { cGrid *dummy = new cDummyGrid(this, start, end); dummy->setText(); dummy->SetColor(color); @@ -371,7 +371,7 @@ cGrid *cChannelColumn::addDummyGrid(time_t start, time_t end, cGrid *firstGrid, return dummy; } -void cChannelColumn::SetTimers() { +void cChannelEpg::SetTimers() { #if VDRVERSNUM < 20301 hasTimer = channel->HasTimer(); #endif @@ -389,7 +389,7 @@ void cChannelColumn::SetTimers() { } } -void cChannelColumn::dumpGrids() { +void cChannelEpg::dumpGrids() { esyslog("tvguide: ------Channel %s %d: %d entires ---------", channel->Name(), num, grids.Count()); int i=1; for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) { diff --git a/channelcolumn.h b/channelcolumn.h index cd32e82..30b4211 100644 --- a/channelcolumn.h +++ b/channelcolumn.h @@ -1,5 +1,5 @@ -#ifndef __TVGUIDE_CHANNELCOLUMN_H -#define __TVGUIDE_CHANNELCOLUMN_H +#ifndef __TVGUIDE_CHANNELEPG_H +#define __TVGUIDE_CHANNELEPG_H #include #include "grid.h" @@ -11,9 +11,9 @@ class cGrid; class cEpgGrid; class cHeaderGrid; -// --- cChannelColumn ------------------------------------------------------------- +// --- cChannelEpg ------------------------------------------------------------- -class cChannelColumn : public cListObject, public cStyledPixmap { +class cChannelEpg : public cListObject, public cStyledPixmap { private: cMyTime *myTime; int num; @@ -30,8 +30,8 @@ private: cGrid *addEpgGrid(const cEvent *event, cGrid *firstGrid, bool color); cGrid *addDummyGrid(time_t start, time_t end, cGrid *firstGrid, bool color); public: - cChannelColumn(int num, const cChannel *channel, cMyTime *myTime); - virtual ~cChannelColumn(void); + cChannelEpg(int num, const cChannel *channel, cMyTime *myTime); + virtual ~cChannelEpg(void); void createHeader(); void drawHeader(); bool readGrids(); @@ -66,4 +66,4 @@ public: void dumpGrids(); }; -#endif //__TVGUIDE_CHANNELCOLUMN_H +#endif //__TVGUIDE_CHANNELEPG_H diff --git a/dummygrid.c b/dummygrid.c index 53301d7..add2a8b 100644 --- a/dummygrid.c +++ b/dummygrid.c @@ -1,6 +1,6 @@ #include "dummygrid.h" -cDummyGrid::cDummyGrid(cChannelColumn *c, time_t start, time_t end) : cGrid(c) { +cDummyGrid::cDummyGrid(cChannelEpg *c, time_t start, time_t end) : cGrid(c) { this->start = start; this->end = end; strText = tr("No EPG Information available"); diff --git a/dummygrid.h b/dummygrid.h index 6545785..7b99123 100644 --- a/dummygrid.h +++ b/dummygrid.h @@ -2,7 +2,7 @@ #define __TVGUIDE_DUMMYGRID_H #include "grid.h" -#include "channelcolumn.h" +#include "channelepg.h" // --- cDummyGrid ------------------------------------------------------------- @@ -14,7 +14,7 @@ private: void drawText(); time_t Duration(void); public: - cDummyGrid(cChannelColumn *c, time_t start, time_t end); + cDummyGrid(cChannelEpg *c, time_t start, time_t end); virtual ~cDummyGrid(void); void SetViewportHeight(); void PositionPixmap(); diff --git a/epggrid.c b/epggrid.c index 9dc0df8..af44e7d 100644 --- a/epggrid.c +++ b/epggrid.c @@ -1,9 +1,9 @@ #include "services/remotetimers.h" -#include "channelcolumn.h" +#include "channelepg.h" #include "tools.h" #include "epggrid.h" -cEpgGrid::cEpgGrid(cChannelColumn *c, const cEvent *event) : cGrid(c) { +cEpgGrid::cEpgGrid(cChannelEpg *c, const cEvent *event) : cGrid(c) { this->event = event; extText = new cTextWrapper(); hasTimer = false; diff --git a/epggrid.h b/epggrid.h index 5f017ca..4d4a774 100644 --- a/epggrid.h +++ b/epggrid.h @@ -16,7 +16,7 @@ private: void drawIcon(cString iconText, tColor color); time_t Duration(void) { return event->Duration(); }; public: - cEpgGrid(cChannelColumn *c, const cEvent *event); + cEpgGrid(cChannelEpg *c, const cEvent *event); virtual ~cEpgGrid(void); void SetViewportHeight(); void PositionPixmap(); diff --git a/grid.c b/grid.c index 18b906d..2622f29 100644 --- a/grid.c +++ b/grid.c @@ -1,7 +1,7 @@ -#include "channelcolumn.h" +#include "channelepg.h" #include "grid.h" -cGrid::cGrid(cChannelColumn *c) { +cGrid::cGrid(cChannelEpg *c) { this->column = c; text = new cTextWrapper(); dirty = true; diff --git a/grid.h b/grid.h index 0d53535..6477896 100644 --- a/grid.h +++ b/grid.h @@ -4,7 +4,7 @@ #include #include "styledpixmap.h" -class cChannelColumn; +class cChannelEpg; // --- cEpgGrid ------------------------------------------------------------- @@ -24,9 +24,9 @@ protected: virtual void drawText(void) {}; bool dummy; public: - cGrid(cChannelColumn *c); + cGrid(cChannelEpg *c); virtual ~cGrid(void); - cChannelColumn *column; + cChannelEpg *column; virtual void SetViewportHeight(void) {}; virtual void PositionPixmap(void) {}; virtual void setText(void) {}; diff --git a/tvguideosd.c b/tvguideosd.c index 782bbab..ee239de 100644 --- a/tvguideosd.c +++ b/tvguideosd.c @@ -152,7 +152,7 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) { if (channelGroups->IsInLastGroup(channel)) { break; } - cChannelColumn *column = new cChannelColumn(i, channel, myTime); + cChannelEpg *column = new cChannelEpg(i, channel, myTime); if (column->readGrids()) { columns.Add(column); i++; @@ -189,7 +189,7 @@ void cTvGuideOsd::drawGridsChannelJump(int offset) { if (config.displayChannelGroups) { channelGroups->DrawChannelGroups(columns.First()->getChannel(), columns.Last()->getChannel()); } - for (cChannelColumn *column = columns.First(); column; column = columns.Next(column)) { + for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { column->createHeader(); column->drawGrids(); } @@ -198,13 +198,13 @@ void cTvGuideOsd::drawGridsChannelJump(int offset) { void cTvGuideOsd::drawGridsTimeJump() { if (columns.Count() == 0) return; - cChannelColumn *colActive = NULL; + cChannelEpg *colActive = NULL; if (activeGrid) { colActive = activeGrid->column; } else { colActive = columns.First(); } - for (cChannelColumn *column = columns.First(); column; column = columns.Next(column)) { + for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { column->clearGrids(); column->readGrids(); column->drawGrids(); @@ -234,7 +234,7 @@ void cTvGuideOsd::setNextActiveGrid(cGrid *next) { } void cTvGuideOsd::channelForward() { - cChannelColumn *colRight = columns.Next(activeGrid->column); + cChannelEpg *colRight = columns.Next(activeGrid->column); bool colAdded = false; if (!colRight) { const cChannel *channelRight = activeGrid->column->getChannel(); @@ -252,7 +252,7 @@ void cTvGuideOsd::channelForward() { if (channelGroups->IsInLastGroup(channelRight)) { break; } - colRight = new cChannelColumn(config.numGrids - 1, channelRight, myTime); + colRight = new cChannelEpg(config.numGrids - 1, channelRight, myTime); if (colRight->readGrids()) { break; } else { @@ -264,10 +264,10 @@ void cTvGuideOsd::channelForward() { if (colRight) { colAdded = true; if (columns.Count() == config.numGrids) { - cChannelColumn *cFirst = columns.First(); + cChannelEpg *cFirst = columns.First(); columns.Del(cFirst); } - for (cChannelColumn *column = columns.First(); column; column = columns.Next(column)) { + for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { column->SetNum(column->GetNum() - 1); column->drawHeader(); column->drawGrids(); @@ -293,7 +293,7 @@ void cTvGuideOsd::channelForward() { } void cTvGuideOsd::channelBack() { - cChannelColumn *colLeft = columns.Prev(activeGrid->column); + cChannelEpg *colLeft = columns.Prev(activeGrid->column); bool colAdded = false; if (!colLeft) { const cChannel *channelLeft = activeGrid->column->getChannel(); @@ -308,7 +308,7 @@ void cTvGuideOsd::channelBack() { #endif while (channelLeft = channels->Prev(channelLeft)) { if (!channelLeft->GroupSep()) { - colLeft = new cChannelColumn(0, channelLeft, myTime); + colLeft = new cChannelEpg(0, channelLeft, myTime); if (colLeft->readGrids()) { break; } else { @@ -320,10 +320,10 @@ void cTvGuideOsd::channelBack() { if (colLeft) { colAdded = true; if (columns.Count() == config.numGrids) { - cChannelColumn *cLast = columns.Last(); + cChannelEpg *cLast = columns.Last(); columns.Del(cLast); } - for (cChannelColumn *column = columns.First(); column; column = columns.Next(column)) { + for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { column->SetNum(column->GetNum() + 1); column->drawHeader(); column->drawGrids(); @@ -375,7 +375,7 @@ void cTvGuideOsd::ScrollForward() { timeLine->drawDateViewer(); timeLine->drawClock(); timeLine->setTimeline(); - for (cChannelColumn *column = columns.First(); column; column = columns.Next(column)) { + for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { column->AddNewGridsAtEnd(); column->ClearOutdatedStart(); column->drawGrids(); @@ -410,7 +410,7 @@ void cTvGuideOsd::ScrollBack() { timeLine->drawDateViewer(); timeLine->drawClock(); timeLine->setTimeline(); - for (cChannelColumn *column = columns.First(); column; column = columns.Next(column)) { + for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { column->AddNewGridsAtStart(); column->ClearOutdatedEnd(); column->drawGrids(); @@ -708,7 +708,7 @@ void cTvGuideOsd::CheckTimeout(void) { } void cTvGuideOsd::SetTimers() { - for (cChannelColumn *column = columns.First(); column; column = columns.Next(column)) { + for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { column->SetTimers(); } } @@ -782,7 +782,7 @@ void cTvGuideOsd::dump() { esyslog("tvguide: ------Dumping Content---------"); activeGrid->debug(); // int i=1; - for (cChannelColumn *col = columns.First(); col; col = columns.Next(col)) { + for (cChannelEpg *col = columns.First(); col; col = columns.Next(col)) { col->dumpGrids(); } } diff --git a/tvguideosd.h b/tvguideosd.h index a643318..70dd7cd 100644 --- a/tvguideosd.h +++ b/tvguideosd.h @@ -3,7 +3,7 @@ #include "timer.h" #include "grid.h" -#include "channelcolumn.h" +#include "channelepg.h" #include "statusheader.h" #include "detailview.h" #include "timeline.h" @@ -17,7 +17,7 @@ class cTvGuideOsd : public cOsdObject { private: cMyTime *myTime; - cList columns; + cList columns; cGrid *activeGrid; cStatusHeader *statusHeader; cDetailView *detailView;