diff options
Diffstat (limited to 'grid.c')
-rw-r--r-- | grid.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1,7 +1,7 @@ #include "channelepg.h" #include "grid.h" -cGrid::cGrid(cChannelEpg *c) { +cGridElement::cGridElement(cChannelEpg *c) { this->column = c; text = new cTextWrapper(); dirty = true; @@ -10,11 +10,11 @@ cGrid::cGrid(cChannelEpg *c) { borderWidth = 10; } -cGrid::~cGrid(void) { +cGridElement::~cGridElement(void) { delete text; } -void cGrid::setBackground() { +void cGridElement::setBackground() { if (active) { color = theme.Color(clrHighlight); colorBlending = theme.Color(clrHighlightBlending); @@ -29,7 +29,7 @@ void cGrid::setBackground() { } } -void cGrid::Draw() { +void cGridElement::Draw() { if (!pixmap) { return; } @@ -48,20 +48,20 @@ void cGrid::Draw() { } } -bool cGrid::isFirst(void) { +bool cGridElement::isFirst(void) { if (column->isFirst(this)) return true; return false; } -bool cGrid::Match(time_t t) { +bool cGridElement::Match(time_t t) { if ((StartTime() < t) && (EndTime() > t)) return true; else return false; } -int cGrid::calcOverlap(cGrid *neighbor) { +int cGridElement::calcOverlap(cGridElement *neighbor) { int overlap = 0; if (intersects(neighbor)) { if ((StartTime() <= neighbor->StartTime()) && (EndTime() <= neighbor->EndTime())) { @@ -77,6 +77,6 @@ int cGrid::calcOverlap(cGrid *neighbor) { return overlap; } -bool cGrid::intersects(cGrid *neighbor) { +bool cGridElement::intersects(cGridElement *neighbor) { return ! ( (neighbor->EndTime() <= StartTime()) || (neighbor->StartTime() >= EndTime()) ); } |