summaryrefslogtreecommitdiff
path: root/channelepg.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-11 15:06:07 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-11 15:06:07 +0200
commitd21b1496f0f80732f290b39610253b857ad7a992 (patch)
tree633444984b091a2b4a224b753a52705e714dbaa5 /channelepg.c
parent5ff172c987fc2c6c516c38a2d5018ac1726c54b7 (diff)
downloadvdr-plugin-tvguide-d21b1496f0f80732f290b39610253b857ad7a992.tar.gz
vdr-plugin-tvguide-d21b1496f0f80732f290b39610253b857ad7a992.tar.bz2
Change cGrid to cGridElement
Diffstat (limited to 'channelepg.c')
-rw-r--r--channelepg.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/channelepg.c b/channelepg.c
index 0fcd253..37713e6 100644
--- a/channelepg.c
+++ b/channelepg.c
@@ -115,7 +115,7 @@ bool cChannelEpg::readGrids() {
}
void cChannelEpg::drawGrids() {
- for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
+ for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) {
grid->SetViewportHeight();
grid->PositionPixmap();
grid->Draw();
@@ -130,41 +130,41 @@ int cChannelEpg::getY() {
return geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
}
-cGrid * cChannelEpg::getActive() {
+cGridElement *cChannelEpg::getActive() {
cTimeManager t;
t.Now();
- for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
+ for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) {
if (grid->Match(t.Get()))
return grid;
}
return grids.First();
}
-cGrid * cChannelEpg::getNext(cGrid *activeGrid) {
+cGridElement *cChannelEpg::getNext(cGridElement *activeGrid) {
if (activeGrid == NULL)
return NULL;
- cGrid *next = grids.Next(activeGrid);
+ cGridElement *next = grids.Next(activeGrid);
if (next)
return next;
return NULL;
}
-cGrid * cChannelEpg::getPrev(cGrid *activeGrid) {
+cGridElement *cChannelEpg::getPrev(cGridElement *activeGrid) {
if (activeGrid == NULL)
return NULL;
- cGrid *prev = grids.Prev(activeGrid);
+ cGridElement *prev = grids.Prev(activeGrid);
if (prev)
return prev;
return NULL;
}
-cGrid * cChannelEpg::getNeighbor(cGrid *activeGrid) {
+cGridElement *cChannelEpg::getNeighbor(cGridElement *activeGrid) {
if (!activeGrid)
return NULL;
- cGrid *neighbor = NULL;
+ cGridElement *neighbor = NULL;
int overlap = 0;
int overlapNew = 0;
- cGrid *grid = NULL;
+ cGridElement *grid = NULL;
grid = grids.First();
if (grid) {
for (; grid; grid = grids.Next(grid)) {
@@ -184,14 +184,14 @@ cGrid * cChannelEpg::getNeighbor(cGrid *activeGrid) {
return neighbor;
}
-bool cChannelEpg::isFirst(cGrid *grid) {
+bool cChannelEpg::isFirst(cGridElement *grid) {
if (grid == grids.First())
return true;
return false;
}
void cChannelEpg::AddNewGridsAtStart() {
- cGrid *firstGrid = NULL;
+ cGridElement *firstGrid = NULL;
firstGrid = grids.First();
if (firstGrid == NULL)
return;
@@ -226,7 +226,7 @@ void cChannelEpg::AddNewGridsAtStart() {
if (event->EndTime() < timeManager->GetStart()) {
break;
}
- cGrid *grid = addEpgGrid(event, firstGrid, col);
+ cGridElement *grid = addEpgGrid(event, firstGrid, col);
col = !col;
firstGrid = grid;
if (event->StartTime() <= timeManager->GetStart()) {
@@ -247,7 +247,7 @@ void cChannelEpg::AddNewGridsAtStart() {
}
void cChannelEpg::AddNewGridsAtEnd() {
- cGrid *lastGrid = NULL;
+ cGridElement *lastGrid = NULL;
lastGrid = grids.Last();
if (lastGrid == NULL)
return;
@@ -302,7 +302,7 @@ void cChannelEpg::AddNewGridsAtEnd() {
}
void cChannelEpg::ClearOutdatedStart() {
- cGrid *firstGrid = NULL;
+ cGridElement *firstGrid = NULL;
while (true) {
firstGrid = grids.First();
if (!firstGrid)
@@ -313,7 +313,7 @@ void cChannelEpg::ClearOutdatedStart() {
} else {
if (firstGrid->isDummy()) {
firstGrid->SetStartTime(timeManager->GetStart());
- cGrid *next = getNext(firstGrid);
+ cGridElement *next = getNext(firstGrid);
if (next) {
firstGrid->SetEndTime(next->StartTime());
} else {
@@ -326,7 +326,7 @@ void cChannelEpg::ClearOutdatedStart() {
}
void cChannelEpg::ClearOutdatedEnd() {
- cGrid *lastGrid = NULL;
+ cGridElement *lastGrid = NULL;
while (true) {
lastGrid = grids.Last();
if (!lastGrid)
@@ -337,7 +337,7 @@ void cChannelEpg::ClearOutdatedEnd() {
} else {
if (lastGrid->isDummy()) {
lastGrid->SetEndTime(timeManager->GetEnd());
- cGrid *prev = getPrev(lastGrid);
+ cGridElement *prev = getPrev(lastGrid);
if (prev) {
lastGrid->SetStartTime(prev->EndTime());
} else {
@@ -349,8 +349,8 @@ void cChannelEpg::ClearOutdatedEnd() {
}
}
-cGrid *cChannelEpg::addEpgGrid(const cEvent *event, cGrid *firstGrid, bool color) {
- cGrid *grid = new cEpgGrid(this, event);
+cGridElement *cChannelEpg::addEpgGrid(const cEvent *event, cGridElement *firstGrid, bool color) {
+ cGridElement *grid = new cEpgGrid(this, event);
grid->setText();
grid->SetColor(color);
if (!firstGrid)
@@ -360,8 +360,8 @@ cGrid *cChannelEpg::addEpgGrid(const cEvent *event, cGrid *firstGrid, bool color
return grid;
}
-cGrid *cChannelEpg::addDummyGrid(time_t start, time_t end, cGrid *firstGrid, bool color) {
- cGrid *dummy = new cDummyGrid(this, start, end);
+cGridElement *cChannelEpg::addDummyGrid(time_t start, time_t end, cGridElement *firstGrid, bool color) {
+ cGridElement *dummy = new cDummyGrid(this, start, end);
dummy->setText();
dummy->SetColor(color);
if (!firstGrid)
@@ -376,7 +376,7 @@ void cChannelEpg::SetTimers() {
hasTimer = channel->HasTimer();
#endif
hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);
- for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
+ for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) {
bool gridHadTimer = grid->HasTimer();
grid->SetTimer();
if (gridHadTimer || gridHadTimer != grid->HasTimer())
@@ -392,7 +392,7 @@ void cChannelEpg::SetTimers() {
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)) {
+ for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) {
esyslog("tvguide: grid %d: start: %s, stop: %s", i, *cTimeManager::printTime(grid->StartTime()), *cTimeManager::printTime(grid->EndTime()));
i++;
}