- epgplus: formatting code using astyle; some manual code nicenings

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-12-14 11:11:26 +01:00
committed by Thilo Graf
parent 359463a1fa
commit 2b6ffbe947
2 changed files with 244 additions and 241 deletions

View File

@@ -70,10 +70,10 @@ int EpgPlus::channelsTableWidth = 0;
int EpgPlus::entryFontSize = 0; int EpgPlus::entryFontSize = 0;
int EpgPlus::channelNumberOffset = 0; int EpgPlus::channelNumberOffset = 0;
/* negative size means "screen width in percent" */ // negative size means "screen width in percent"
static EpgPlus::SizeSetting sizeSettingTable[] = static EpgPlus::SizeSetting sizeSettingTable[] =
{ {
{ EpgPlus::EPGPlus_channelentry_width, -15 }, /* 15 percent of screen width */ { EpgPlus::EPGPlus_channelentry_width, -15 },
{ EpgPlus::EPGPlus_separationline_thickness, 1 } { EpgPlus::EPGPlus_separationline_thickness, 1 }
}; };
@@ -82,7 +82,7 @@ static int current_bouquet;
Font *EpgPlus::Header::font = NULL; Font *EpgPlus::Header::font = NULL;
EpgPlus::Header::Header(CFrameBuffer * pframeBuffer __attribute__((unused)), int px, int py, int pwidth) EpgPlus::Header::Header(CFrameBuffer *pframeBuffer __attribute__((unused)), int px, int py, int pwidth)
{ {
//this->frameBuffer = pframeBuffer; //this->frameBuffer = pframeBuffer;
this->x = px; this->x = px;
@@ -105,7 +105,7 @@ void EpgPlus::Header::init()
font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]; font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE];
} }
void EpgPlus::Header::paint(const char * Name) void EpgPlus::Header::paint(const char *Name)
{ {
std::string caption = Name ? Name : g_Locale->getText(LOCALE_EPGPLUS_HEAD); std::string caption = Name ? Name : g_Locale->getText(LOCALE_EPGPLUS_HEAD);
@@ -133,7 +133,7 @@ void EpgPlus::Header::paint(const char * Name)
} }
} }
void EpgPlus::Header::paintChannelLogo(const CZapitChannel * Channel) void EpgPlus::Header::paintChannelLogo(const CZapitChannel *Channel)
{ {
if (!g_settings.channellist_show_channellogo) if (!g_settings.channellist_show_channellogo)
return; return;
@@ -159,7 +159,7 @@ int EpgPlus::Header::getUsedHeight()
Font *EpgPlus::TimeLine::font = NULL; Font *EpgPlus::TimeLine::font = NULL;
int EpgPlus::TimeLine::separationLineThickness = 0; int EpgPlus::TimeLine::separationLineThickness = 0;
EpgPlus::TimeLine::TimeLine(CFrameBuffer * pframeBuffer, int px, int py, int pwidth, int pstartX, int pdurationX) EpgPlus::TimeLine::TimeLine(CFrameBuffer *pframeBuffer, int px, int py, int pwidth, int pstartX, int pdurationX)
{ {
this->frameBuffer = pframeBuffer; this->frameBuffer = pframeBuffer;
this->x = px; this->x = px;
@@ -247,7 +247,7 @@ void EpgPlus::TimeLine::paintMark(time_t _startTime, int pduration, int px, int
// paint new mark // paint new mark
CProgressBar pbbar = CProgressBar(px, this->y + this->font->getHeight(), pwidth, this->font->getHeight()); CProgressBar pbbar = CProgressBar(px, this->y + this->font->getHeight(), pwidth, this->font->getHeight());
pbbar.setActiveColor(COL_MENUCONTENTSELECTED_PLUS_0); //pbbar.setActiveColor(COL_MENUCONTENTSELECTED_PLUS_0);
pbbar.setType(CProgressBar::PB_TIMESCALE); pbbar.setType(CProgressBar::PB_TIMESCALE);
time_t currentTime; time_t currentTime;
@@ -279,7 +279,7 @@ void EpgPlus::TimeLine::paintMark(time_t _startTime, int pduration, int px, int
// display end time after mark // display end time after mark
textX = px + pwidth + OFFSET_INNER_MIN; textX = px + pwidth + OFFSET_INNER_MIN;
} }
else if (textWidth < pwidth - 2*OFFSET_INNER_MIN) else if (textWidth < pwidth - 2 * OFFSET_INNER_MIN)
{ {
// display end time before mark // display end time before mark
textX = px + pwidth - textWidth - OFFSET_INNER_MIN; textX = px + pwidth - textWidth - OFFSET_INNER_MIN;
@@ -299,7 +299,7 @@ void EpgPlus::TimeLine::paintMark(time_t _startTime, int pduration, int px, int
void EpgPlus::TimeLine::clearMark() void EpgPlus::TimeLine::clearMark()
{ {
this->frameBuffer->paintBoxRel(this->x, this->y + this->font->getHeight(), this->frameBuffer->paintBoxRel(this->x, this->y + this->font->getHeight(),
this->width, this->font->getHeight() , COL_MENUCONTENT_PLUS_0); this->width, this->font->getHeight(), COL_MENUCONTENT_PLUS_0);
// paint the separation line // paint the separation line
if (separationLineThickness > 0) if (separationLineThickness > 0)
@@ -311,13 +311,13 @@ void EpgPlus::TimeLine::clearMark()
int EpgPlus::TimeLine::getUsedHeight() int EpgPlus::TimeLine::getUsedHeight()
{ {
return 2*font->getHeight() + separationLineThickness; return 2 * font->getHeight() + separationLineThickness;
} }
Font *EpgPlus::ChannelEventEntry::font = NULL; Font *EpgPlus::ChannelEventEntry::font = NULL;
int EpgPlus::ChannelEventEntry::separationLineThickness = 0; int EpgPlus::ChannelEventEntry::separationLineThickness = 0;
EpgPlus::ChannelEventEntry::ChannelEventEntry(const CChannelEvent * pchannelEvent, CFrameBuffer * pframeBuffer, TimeLine * ptimeLine, Footer * pfooter, int px, int py, int pwidth) EpgPlus::ChannelEventEntry::ChannelEventEntry(const CChannelEvent *pchannelEvent, CFrameBuffer *pframeBuffer, TimeLine *ptimeLine, Footer *pfooter, int px, int py, int pwidth)
{ {
// copy neccessary? // copy neccessary?
if (pchannelEvent != NULL) if (pchannelEvent != NULL)
@@ -358,7 +358,7 @@ void EpgPlus::ChannelEventEntry::paint(bool pisSelected, bool toggleColor)
this->frameBuffer->paintBoxRel(this->x, this->y, this->width, this->font->getHeight(), bgcolor); this->frameBuffer->paintBoxRel(this->x, this->y, this->width, this->font->getHeight(), bgcolor);
this->font->RenderString(this->x + OFFSET_INNER_SMALL, this->y + this->font->getHeight(), this->font->RenderString(this->x + OFFSET_INNER_SMALL, this->y + this->font->getHeight(),
this->width - 2*OFFSET_INNER_SMALL > 0 ? this->width - 2*OFFSET_INNER_SMALL : 0, this->channelEvent.description, color); this->width - 2 * OFFSET_INNER_SMALL > 0 ? this->width - 2 * OFFSET_INNER_SMALL : 0, this->channelEvent.description, color);
// paint the separation lines // paint the separation lines
if (separationLineThickness > 0) if (separationLineThickness > 0)
@@ -375,7 +375,8 @@ void EpgPlus::ChannelEventEntry::paint(bool pisSelected, bool toggleColor)
if (pisSelected) if (pisSelected)
{ {
if (this->channelEvent.description.empty()) if (this->channelEvent.description.empty())
{ // dummy channel event {
// dummy channel event
this->timeLine->clearMark(); this->timeLine->clearMark();
} }
else else
@@ -400,7 +401,7 @@ int EpgPlus::ChannelEventEntry::getUsedHeight()
Font *EpgPlus::ChannelEntry::font = NULL; Font *EpgPlus::ChannelEntry::font = NULL;
int EpgPlus::ChannelEntry::separationLineThickness = 0; int EpgPlus::ChannelEntry::separationLineThickness = 0;
EpgPlus::ChannelEntry::ChannelEntry(const CZapitChannel * pchannel, int pindex, CFrameBuffer * pframeBuffer, Header * pheader, Footer * pfooter, CBouquetList * pbouquetList, int px, int py, int pwidth) EpgPlus::ChannelEntry::ChannelEntry(const CZapitChannel *pchannel, int pindex, CFrameBuffer *pframeBuffer, Header *pheader, Footer *pfooter, CBouquetList *pbouquetList, int px, int py, int pwidth)
{ {
this->channel = pchannel; this->channel = pchannel;
@@ -468,13 +469,13 @@ void EpgPlus::ChannelEntry::paint(bool isSelected, time_t _selectedTime)
{ {
// display channelnumber // display channelnumber
int xOffset = EpgPlus::channelNumberOffset - this->font->getRenderWidth(this->displayNumber); int xOffset = EpgPlus::channelNumberOffset - this->font->getRenderWidth(this->displayNumber);
this->font->RenderString(xPos + xOffset, this->y + this->font->getHeight(), this->width - 2*OFFSET_INNER_MID, this->displayNumber, color); this->font->RenderString(xPos + xOffset, this->y + this->font->getHeight(), this->width - 2 * OFFSET_INNER_MID, this->displayNumber, color);
numberWidth = EpgPlus::channelNumberOffset + OFFSET_INNER_SMALL; numberWidth = EpgPlus::channelNumberOffset + OFFSET_INNER_SMALL;
xPos += numberWidth; xPos += numberWidth;
} }
// display channelname // display channelname
this->font->RenderString(xPos, this->y + this->font->getHeight(), this->width - numberWidth - 2*OFFSET_INNER_MID, this->displayName, color); this->font->RenderString(xPos, this->y + this->font->getHeight(), this->width - numberWidth - 2 * OFFSET_INNER_MID, this->displayName, color);
if (isSelected) if (isSelected)
{ {
@@ -535,13 +536,13 @@ void EpgPlus::ChannelEntry::paint(bool isSelected, time_t _selectedTime)
if (isSelected) if (isSelected)
{ {
xPos = this->x - DETAILSLINE_WIDTH; xPos = this->x - DETAILSLINE_WIDTH;
int yPosTop = this->y + this->font->getHeight()/2; int yPosTop = this->y + this->font->getHeight() / 2;
int yPosBottom = this->footer->y + this->footer->getUsedHeight()/2; int yPosBottom = this->footer->y + this->footer->getUsedHeight() / 2;
if (detailsLine == NULL) if (detailsLine == NULL)
detailsLine = new CComponentsDetailsLine(); detailsLine = new CComponentsDetailsLine();
detailsLine->setDimensionsAll(xPos, yPosTop, yPosBottom, this->font->getHeight()/2, this->footer->getUsedHeight() - RADIUS_LARGE*2); detailsLine->setDimensionsAll(xPos, yPosTop, yPosBottom, this->font->getHeight() / 2, this->footer->getUsedHeight() - RADIUS_LARGE * 2);
detailsLine->paint(false); detailsLine->paint(false);
this->header->paintChannelLogo(this->channel); this->header->paintChannelLogo(this->channel);
@@ -557,7 +558,7 @@ Font *EpgPlus::Footer::fontBouquetChannelName = NULL;
Font *EpgPlus::Footer::fontEventDescription = NULL; Font *EpgPlus::Footer::fontEventDescription = NULL;
Font *EpgPlus::Footer::fontEventInfo1 = NULL; Font *EpgPlus::Footer::fontEventInfo1 = NULL;
EpgPlus::Footer::Footer(CFrameBuffer * pframeBuffer, int px, int py, int pwidth, int pbuttonHeight) EpgPlus::Footer::Footer(CFrameBuffer *pframeBuffer, int px, int py, int pwidth, int pbuttonHeight)
{ {
this->frameBuffer = pframeBuffer; this->frameBuffer = pframeBuffer;
this->x = px; this->x = px;
@@ -579,7 +580,7 @@ void EpgPlus::Footer::init()
fontEventInfo1 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_EVENT]; fontEventInfo1 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_EVENT];
} }
void EpgPlus::Footer::setBouquetChannelName(const std::string & newBouquetName, const std::string & newChannelName) void EpgPlus::Footer::setBouquetChannelName(const std::string &newBouquetName, const std::string &newChannelName)
{ {
this->currentBouquetName = newBouquetName; this->currentBouquetName = newBouquetName;
this->currentChannelName = newChannelName; this->currentChannelName = newChannelName;
@@ -587,13 +588,13 @@ void EpgPlus::Footer::setBouquetChannelName(const std::string & newBouquetName,
int EpgPlus::Footer::getUsedHeight() int EpgPlus::Footer::getUsedHeight()
{ {
return fontBouquetChannelName->getHeight() + fontEventDescription->getHeight() + fontEventInfo1->getHeight() + 2*OFFSET_INNER_SMALL; return fontBouquetChannelName->getHeight() + fontEventDescription->getHeight() + fontEventInfo1->getHeight() + 2 * OFFSET_INNER_SMALL;
} }
void EpgPlus::Footer::paintEventDetails(const std::string & description, const std::string & info1) void EpgPlus::Footer::paintEventDetails(const std::string &description, const std::string &info1)
{ {
int yPos = this->y; int yPos = this->y;
int frame_thickness = 2; int frame_thickness = 1;
// clear the whole footer // clear the whole footer
this->frameBuffer->paintBoxRel(this->x + OFFSET_SHADOW, yPos + OFFSET_SHADOW, this->width, this->getUsedHeight(), COL_SHADOW_PLUS_0, RADIUS_LARGE); this->frameBuffer->paintBoxRel(this->x + OFFSET_SHADOW, yPos + OFFSET_SHADOW, this->width, this->getUsedHeight(), COL_SHADOW_PLUS_0, RADIUS_LARGE);
@@ -602,15 +603,15 @@ void EpgPlus::Footer::paintEventDetails(const std::string & description, const s
// display bouquet and channel name // display bouquet and channel name
yPos += OFFSET_INNER_SMALL + this->fontBouquetChannelName->getHeight(); yPos += OFFSET_INNER_SMALL + this->fontBouquetChannelName->getHeight();
this->fontBouquetChannelName->RenderString(this->x + OFFSET_INNER_MID, yPos, this->width - 2*OFFSET_INNER_MID, this->currentBouquetName + ": " + this->currentChannelName, COL_MENUCONTENT_TEXT); this->fontBouquetChannelName->RenderString(this->x + OFFSET_INNER_MID, yPos, this->width - 2 * OFFSET_INNER_MID, this->currentBouquetName + ": " + this->currentChannelName, COL_MENUCONTENT_TEXT);
// display event's descrition // display event's descrition
yPos += this->fontEventDescription->getHeight(); yPos += this->fontEventDescription->getHeight();
this->fontEventDescription->RenderString(this->x + OFFSET_INNER_MID, yPos, this->width - 2*OFFSET_INNER_MID, description, COL_MENUCONTENT_TEXT); this->fontEventDescription->RenderString(this->x + OFFSET_INNER_MID, yPos, this->width - 2 * OFFSET_INNER_MID, description, COL_MENUCONTENT_TEXT);
// display event's info1 // display event's info1
yPos += this->fontEventInfo1->getHeight(); yPos += this->fontEventInfo1->getHeight();
this->fontEventInfo1->RenderString(this->x + OFFSET_INNER_MID, yPos, this->width - 2*OFFSET_INNER_MID, info1, COL_MENUCONTENT_TEXT); this->fontEventInfo1->RenderString(this->x + OFFSET_INNER_MID, yPos, this->width - 2 * OFFSET_INNER_MID, info1, COL_MENUCONTENT_TEXT);
} }
struct button_label buttonLabels[] = struct button_label buttonLabels[] =
@@ -619,15 +620,15 @@ struct button_label buttonLabels[] =
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_EPGPLUS_PREV_BOUQUET }, { NEUTRINO_ICON_BUTTON_GREEN, LOCALE_EPGPLUS_PREV_BOUQUET },
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_EPGPLUS_NEXT_BOUQUET }, { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_EPGPLUS_NEXT_BOUQUET },
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_EPGPLUS_OPTIONS }, { NEUTRINO_ICON_BUTTON_BLUE, LOCALE_EPGPLUS_OPTIONS },
{ NEUTRINO_ICON_BUTTON_INFO_SMALL,LOCALE_EPGMENU_EVENTINFO } { NEUTRINO_ICON_BUTTON_INFO_SMALL, LOCALE_EPGMENU_EVENTINFO }
}; };
void EpgPlus::Footer::paintButtons(button_label * pbuttonLabels, int numberOfButtons) void EpgPlus::Footer::paintButtons(button_label *pbuttonLabels, int numberOfButtons)
{ {
int buttonWidth = (this->width); int buttonWidth = (this->width);
CComponentsFooter foot; CComponentsFooter foot;
foot.enableShadow(CC_SHADOW_ON, -1, true); foot.enableShadow(CC_SHADOW_ON, -1, true);
foot.paintButtons(this->x, this->buttonY, buttonWidth, buttonHeight, numberOfButtons, pbuttonLabels, buttonWidth/numberOfButtons); foot.paintButtons(this->x, this->buttonY, buttonWidth, buttonHeight, numberOfButtons, pbuttonLabels, buttonWidth / numberOfButtons);
} }
EpgPlus::EpgPlus() EpgPlus::EpgPlus()
@@ -679,7 +680,7 @@ void EpgPlus::createChannelEntries(int selectedChannelEntryIndex)
++i, yPosChannelEntry += this->entryHeight, yPosEventEntry += this->entryHeight) ++i, yPosChannelEntry += this->entryHeight, yPosEventEntry += this->entryHeight)
{ {
CZapitChannel * channel = (*this->channelList)[i]; CZapitChannel *channel = (*this->channelList)[i];
ChannelEntry *channelEntry = new ChannelEntry(channel, i, this->frameBuffer, this->header, this->footer, this->bouquetList, this->channelsTableX, yPosChannelEntry, this->channelsTableWidth); ChannelEntry *channelEntry = new ChannelEntry(channel, i, this->frameBuffer, this->header, this->footer, this->bouquetList, this->channelsTableX, yPosChannelEntry, this->channelsTableWidth);
//printf("Going to get getEventsServiceKey for %llx\n", (channel->getChannelID() & 0xFFFFFFFFFFFFULL)); //printf("Going to get getEventsServiceKey for %llx\n", (channel->getChannelID() & 0xFFFFFFFFFFFFULL));
@@ -695,9 +696,10 @@ void EpgPlus::createChannelEntries(int selectedChannelEntryIndex)
for (CChannelEventList::const_iterator It = channelEventList.begin(); It != channelEventList.end(); ++It) for (CChannelEventList::const_iterator It = channelEventList.begin(); It != channelEventList.end(); ++It)
{ {
//if (0x2bc000b004b7ULL == (channel->getChannelID() & 0xFFFFFFFFFFFFULL)) printf("*** Check1 event %s event start %ld this start %ld\n", It->description.c_str(), It->startTime, (this->startTime + this->duration)); //if (0x2bc000b004b7ULL == (channel->getChannelID() & 0xFFFFFFFFFFFFULL)) printf("*** Check1 event %s event start %ld this start %ld\n", It->description.c_str(), It->startTime, (this->startTime + this->duration));
if (!(It->startTime < (this->startTime + this->duration)) ) if (!(It->startTime < (this->startTime + this->duration)))
continue; continue;
if ((lastIt == channelEventList.end()) || (lastIt->startTime != It->startTime)) { if ((lastIt == channelEventList.end()) || (lastIt->startTime != It->startTime))
{
int startTimeDiff = It->startTime - this->startTime; int startTimeDiff = It->startTime - this->startTime;
int endTimeDiff = this->startTime + time_t (this->duration) - It->startTime - time_t (It->duration); int endTimeDiff = this->startTime + time_t (this->duration) - It->startTime - time_t (It->duration);
//if (0x2bc000b004b7ULL == (channel->getChannelID() & 0xFFFFFFFFFFFFULL)) printf("*** Check event %s\n", It->description.c_str()); //if (0x2bc000b004b7ULL == (channel->getChannelID() & 0xFFFFFFFFFFFFULL)) printf("*** Check event %s\n", It->description.c_str());
@@ -741,8 +743,8 @@ void EpgPlus::createChannelEntries(int selectedChannelEntryIndex)
channelEvent.startTime = lastEndTime; channelEvent.startTime = lastEndTime;
channelEvent.duration = It->startTime - channelEvent.startTime; channelEvent.duration = It->startTime - channelEvent.startTime;
ChannelEventEntry *channelEventEntry = new ChannelEventEntry (&channelEvent, this->frameBuffer, this->timeLine, this->footer, this->eventsTableX + ((channelEvent.startTime - this->startTime) * this->eventsTableWidth) / this->duration, yPosEventEntry, (channelEvent.duration * this->eventsTableWidth) / this->duration + 1); ChannelEventEntry *channelEventEntry = new ChannelEventEntry(&channelEvent, this->frameBuffer, this->timeLine, this->footer, this->eventsTableX + ((channelEvent.startTime - this->startTime) * this->eventsTableWidth) / this->duration, yPosEventEntry, (channelEvent.duration * this->eventsTableWidth) / this->duration + 1);
channelEntry->channelEventEntries.push_back (channelEventEntry); channelEntry->channelEventEntries.push_back(channelEventEntry);
} }
// correct position // correct position
int xPosEventEntry = this->eventsTableX + ((It->startTime - startTimeDiff - this->startTime) * this->eventsTableWidth) / this->duration; int xPosEventEntry = this->eventsTableX + ((It->startTime - startTimeDiff - this->startTime) * this->eventsTableWidth) / this->duration;
@@ -756,7 +758,7 @@ void EpgPlus::createChannelEntries(int selectedChannelEntryIndex)
if (xPosEventEntry + widthEventEntry > this->eventsTableX + this->eventsTableWidth) if (xPosEventEntry + widthEventEntry > this->eventsTableX + this->eventsTableWidth)
widthEventEntry = this->eventsTableX + this->eventsTableWidth - xPosEventEntry; widthEventEntry = this->eventsTableX + this->eventsTableWidth - xPosEventEntry;
ChannelEventEntry *channelEventEntry = new ChannelEventEntry(&(*It) , this->frameBuffer, this->timeLine, this->footer, xPosEventEntry, yPosEventEntry, widthEventEntry); ChannelEventEntry *channelEventEntry = new ChannelEventEntry(&(*It), this->frameBuffer, this->timeLine, this->footer, xPosEventEntry, yPosEventEntry, widthEventEntry);
channelEntry->channelEventEntries.push_back(channelEventEntry); channelEntry->channelEventEntries.push_back(channelEventEntry);
lastEndTime = It->startTime + It->duration; lastEndTime = It->startTime + It->duration;
@@ -891,7 +893,7 @@ void EpgPlus::free()
delete this->footer; delete this->footer;
} }
int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouquetList *pbouquetList) int EpgPlus::exec(CChannelList *pchannelList, int selectedChannelIndex, CBouquetList *pbouquetList)
{ {
this->channelList = pchannelList; this->channelList = pchannelList;
this->channelListStartIndex = int (selectedChannelIndex / maxNumberOfDisplayableEntries) * maxNumberOfDisplayableEntries; this->channelListStartIndex = int (selectedChannelIndex / maxNumberOfDisplayableEntries) * maxNumberOfDisplayableEntries;
@@ -984,12 +986,12 @@ int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouque
selected += step; selected += step;
if (selected >= listSize) if (selected >= listSize)
{ {
if ((listSize - step -1 < prev_selected) && (prev_selected != (listSize - 1))) if ((listSize - step - 1 < prev_selected) && (prev_selected != (listSize - 1)))
selected = listSize - 1; selected = listSize - 1;
else if (((listSize / step) + 1) * step == listSize + step) // last page has full entries else if (((listSize / step) + 1) * step == listSize + step) // last page has full entries
selected = 0; selected = 0;
else else
selected = ((selected < (((listSize / step)+1) * step))) ? (listSize - 1) : 0; selected = ((selected < (((listSize / step) + 1) * step))) ? (listSize - 1) : 0;
} }
this->createChannelEntries(selected); this->createChannelEntries(selected);
@@ -1002,7 +1004,7 @@ int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouque
int step = this->maxNumberOfDisplayableEntries; int step = this->maxNumberOfDisplayableEntries;
selected -= step; selected -= step;
if ((prev_selected-step) < 0) if ((prev_selected - step) < 0)
{ {
if (prev_selected != 0 && step != 1) if (prev_selected != 0 && step != 1)
selected = 0; selected = 0;
@@ -1018,12 +1020,12 @@ int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouque
if (!bouquetList->Bouquets.empty()) if (!bouquetList->Bouquets.empty())
{ {
bool found = true; bool found = true;
uint32_t nNext = (bouquetList->getActiveBouquetNumber()+1) % bouquetList->Bouquets.size(); uint32_t nNext = (bouquetList->getActiveBouquetNumber() + 1) % bouquetList->Bouquets.size();
//printf("EpgPlus::exec current bouquet %d new %d\n", bouquetList->getActiveBouquetNumber(), nNext); //printf("EpgPlus::exec current bouquet %d new %d\n", bouquetList->getActiveBouquetNumber(), nNext);
if (bouquetList->Bouquets[nNext]->channelList->isEmpty()) if (bouquetList->Bouquets[nNext]->channelList->isEmpty())
{ {
found = false; found = false;
nNext = nNext < bouquetList->Bouquets.size()-1 ? nNext+1 : 0; nNext = nNext < bouquetList->Bouquets.size() - 1 ? nNext + 1 : 0;
for (uint32_t i = nNext; i < bouquetList->Bouquets.size(); i++) for (uint32_t i = nNext; i < bouquetList->Bouquets.size(); i++)
{ {
if (!bouquetList->Bouquets[i]->channelList->isEmpty()) if (!bouquetList->Bouquets[i]->channelList->isEmpty())
@@ -1040,7 +1042,7 @@ int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouque
pbouquetList->activateBouquet(nNext, false); pbouquetList->activateBouquet(nNext, false);
this->channelList = bouquetList->Bouquets[nNext]->channelList; this->channelList = bouquetList->Bouquets[nNext]->channelList;
this->channelListStartIndex = int (channelList->getSelectedChannelIndex() / maxNumberOfDisplayableEntries) * maxNumberOfDisplayableEntries; this->channelListStartIndex = int (channelList->getSelectedChannelIndex() / maxNumberOfDisplayableEntries) * maxNumberOfDisplayableEntries;
this->createChannelEntries (channelList->getSelectedChannelIndex()); this->createChannelEntries(channelList->getSelectedChannelIndex());
this->header->paint(this->channelList->getName()); this->header->paint(this->channelList->getName());
this->paint(); this->paint();
} }
@@ -1051,11 +1053,11 @@ int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouque
if (!bouquetList->Bouquets.empty()) if (!bouquetList->Bouquets.empty())
{ {
bool found = true; bool found = true;
int nNext = (bouquetList->getActiveBouquetNumber()+bouquetList->Bouquets.size()-1) % bouquetList->Bouquets.size(); int nNext = (bouquetList->getActiveBouquetNumber() + bouquetList->Bouquets.size() - 1) % bouquetList->Bouquets.size();
if (bouquetList->Bouquets[nNext]->channelList->isEmpty()) if (bouquetList->Bouquets[nNext]->channelList->isEmpty())
{ {
found = false; found = false;
nNext = nNext > 0 ? nNext-1 : bouquetList->Bouquets.size()-1; nNext = nNext > 0 ? nNext - 1 : bouquetList->Bouquets.size() - 1;
for (int i = nNext; i > 0; i--) for (int i = nNext; i > 0; i--)
{ {
if (!bouquetList->Bouquets[i]->channelList->isEmpty()) if (!bouquetList->Bouquets[i]->channelList->isEmpty())
@@ -1071,7 +1073,7 @@ int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouque
pbouquetList->activateBouquet(nNext, false); pbouquetList->activateBouquet(nNext, false);
this->channelList = bouquetList->Bouquets[nNext]->channelList; this->channelList = bouquetList->Bouquets[nNext]->channelList;
this->channelListStartIndex = int (channelList->getSelectedChannelIndex() / maxNumberOfDisplayableEntries) * maxNumberOfDisplayableEntries; this->channelListStartIndex = int (channelList->getSelectedChannelIndex() / maxNumberOfDisplayableEntries) * maxNumberOfDisplayableEntries;
this->createChannelEntries (channelList->getSelectedChannelIndex()); this->createChannelEntries(channelList->getSelectedChannelIndex());
this->header->paint(this->channelList->getName()); this->header->paint(this->channelList->getName());
this->paint(); this->paint();
} }
@@ -1207,7 +1209,7 @@ int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouque
} }
case ViewMode_Scroll: case ViewMode_Scroll:
{ {
if(this->selectedChannelEntry == NULL) if (this->selectedChannelEntry == NULL)
break; break;
TCChannelEventEntries::const_iterator It = this->getSelectedEvent(); TCChannelEventEntries::const_iterator It = this->getSelectedEvent();
@@ -1261,7 +1263,7 @@ int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouque
} }
case ViewMode_Scroll: case ViewMode_Scroll:
{ {
if(this->selectedChannelEntry == NULL) if (this->selectedChannelEntry == NULL)
break; break;
TCChannelEventEntries::const_iterator It = this->getSelectedEvent(); TCChannelEventEntries::const_iterator It = this->getSelectedEvent();
@@ -1408,7 +1410,8 @@ void EpgPlus::hide()
this->header->head = NULL; this->header->head = NULL;
} }
if (this->selectedChannelEntry && this->selectedChannelEntry->detailsLine) { if (this->selectedChannelEntry && this->selectedChannelEntry->detailsLine)
{
this->selectedChannelEntry->detailsLine->kill(); this->selectedChannelEntry->detailsLine->kill();
delete this->selectedChannelEntry->detailsLine; delete this->selectedChannelEntry->detailsLine;
this->selectedChannelEntry->detailsLine = NULL; this->selectedChannelEntry->detailsLine = NULL;
@@ -1429,7 +1432,7 @@ void EpgPlus::paintChannelEntry(int position)
channelEntry->paint(currentChannelIsSelected, this->selectedTime); channelEntry->paint(currentChannelIsSelected, this->selectedTime);
} }
std::string EpgPlus::getTimeString(const time_t & time, const std::string & format) std::string EpgPlus::getTimeString(const time_t &time, const std::string &format)
{ {
char tmpstr[256]; char tmpstr[256];
struct tm *tmStartTime = localtime(&time); struct tm *tmStartTime = localtime(&time);
@@ -1467,7 +1470,7 @@ void EpgPlus::paint()
paintScrollBar(this->sliderX, this->sliderY, this->sliderWidth, this->sliderHeight, total_pages, current_page, CC_SHADOW_RIGHT_CORNER_ALL); paintScrollBar(this->sliderX, this->sliderY, this->sliderWidth, this->sliderHeight, total_pages, current_page, CC_SHADOW_RIGHT_CORNER_ALL);
} }
EpgPlus::MenuTargetAddReminder::MenuTargetAddReminder(EpgPlus * pepgPlus) EpgPlus::MenuTargetAddReminder::MenuTargetAddReminder(EpgPlus *pepgPlus)
{ {
this->epgPlus = pepgPlus; this->epgPlus = pepgPlus;
} }
@@ -1492,12 +1495,12 @@ int EpgPlus::MenuTargetAddReminder::exec(CMenuTarget * /*parent*/, const std::st
return menu_return::RETURN_EXIT_ALL; return menu_return::RETURN_EXIT_ALL;
} }
EpgPlus::MenuTargetAddRecordTimer::MenuTargetAddRecordTimer(EpgPlus * pepgPlus) EpgPlus::MenuTargetAddRecordTimer::MenuTargetAddRecordTimer(EpgPlus *pepgPlus)
{ {
this->epgPlus = pepgPlus; this->epgPlus = pepgPlus;
} }
static bool sortByDateTime(const CChannelEvent& a, const CChannelEvent& b) static bool sortByDateTime(const CChannelEvent &a, const CChannelEvent &b)
{ {
return a.startTime < b.startTime; return a.startTime < b.startTime;
} }
@@ -1522,7 +1525,7 @@ int EpgPlus::MenuTargetAddRecordTimer::exec(CMenuTarget * /*parent*/, const std:
{ {
printf("already found in moviebrowser: %s\n", rec_title); printf("already found in moviebrowser: %s\n", rec_title);
char message[1024]; char message[1024];
snprintf(message, sizeof(message)-1, g_Locale->getText(LOCALE_RECORDING_ALREADY_FOUND), rec_title); snprintf(message, sizeof(message) - 1, g_Locale->getText(LOCALE_RECORDING_ALREADY_FOUND), rec_title);
doRecord = (ShowMsg(LOCALE_RECORDING_ALREADY_FOUND_CHECK, message, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo) == CMsgBox::mbrYes); doRecord = (ShowMsg(LOCALE_RECORDING_ALREADY_FOUND_CHECK, message, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo) == CMsgBox::mbrYes);
} }
} }
@@ -1530,7 +1533,7 @@ int EpgPlus::MenuTargetAddRecordTimer::exec(CMenuTarget * /*parent*/, const std:
{ {
CChannelEventList evtlist; CChannelEventList evtlist;
CEitManager::getInstance()->getEventsServiceKey(this->epgPlus->selectedChannelEntry->channel->channel_id, evtlist); CEitManager::getInstance()->getEventsServiceKey(this->epgPlus->selectedChannelEntry->channel->channel_id, evtlist);
sort(evtlist.begin(),evtlist.end(),sortByDateTime); sort(evtlist.begin(), evtlist.end(), sortByDateTime);
CFollowScreenings m(this->epgPlus->selectedChannelEntry->channel->channel_id, CFollowScreenings m(this->epgPlus->selectedChannelEntry->channel->channel_id,
(*It)->channelEvent.startTime, (*It)->channelEvent.startTime,
(*It)->channelEvent.startTime + (*It)->channelEvent.duration, (*It)->channelEvent.startTime + (*It)->channelEvent.duration,
@@ -1543,7 +1546,7 @@ int EpgPlus::MenuTargetAddRecordTimer::exec(CMenuTarget * /*parent*/, const std:
return menu_return::RETURN_EXIT_ALL; return menu_return::RETURN_EXIT_ALL;
} }
EpgPlus::MenuTargetRefreshEpg::MenuTargetRefreshEpg(EpgPlus * pepgPlus) EpgPlus::MenuTargetRefreshEpg::MenuTargetRefreshEpg(EpgPlus *pepgPlus)
{ {
this->epgPlus = pepgPlus; this->epgPlus = pepgPlus;
} }
@@ -1560,8 +1563,8 @@ struct CMenuOptionChooser::keyval menuOptionChooserSwitchSwapModes[] =
{ EpgPlus::SwapMode_ByBouquet, LOCALE_EPGPLUS_BYBOUQUET_MODE } { EpgPlus::SwapMode_ByBouquet, LOCALE_EPGPLUS_BYBOUQUET_MODE }
}; };
EpgPlus::MenuOptionChooserSwitchSwapMode::MenuOptionChooserSwitchSwapMode(EpgPlus * pepgPlus) EpgPlus::MenuOptionChooserSwitchSwapMode::MenuOptionChooserSwitchSwapMode(EpgPlus *pepgPlus)
: CMenuOptionChooser(LOCALE_EPGPLUS_SWAP_MODE, (int *) &pepgPlus->currentSwapMode, menuOptionChooserSwitchSwapModes, sizeof(menuOptionChooserSwitchSwapModes) / sizeof(CMenuOptionChooser::keyval), : CMenuOptionChooser(LOCALE_EPGPLUS_SWAP_MODE, (int *) & pepgPlus->currentSwapMode, menuOptionChooserSwitchSwapModes, sizeof(menuOptionChooserSwitchSwapModes) / sizeof(CMenuOptionChooser::keyval),
true, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW, 0) true, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW, 0)
{ {
this->epgPlus = pepgPlus; this->epgPlus = pepgPlus;
@@ -1594,7 +1597,7 @@ EpgPlus::MenuOptionChooserSwitchSwapMode::~MenuOptionChooserSwitchSwapMode()
} }
} }
int EpgPlus::MenuOptionChooserSwitchSwapMode::exec(CMenuTarget * parent) int EpgPlus::MenuOptionChooserSwitchSwapMode::exec(CMenuTarget *parent)
{ {
// change time out settings temporary // change time out settings temporary
g_settings.timing[SNeutrinoSettings::TIMING_MENU] = 1; g_settings.timing[SNeutrinoSettings::TIMING_MENU] = 1;
@@ -1610,8 +1613,8 @@ struct CMenuOptionChooser::keyval menuOptionChooserSwitchViewModes[] =
{ EpgPlus::ViewMode_Stretch, LOCALE_EPGPLUS_SCROLL_MODE } { EpgPlus::ViewMode_Stretch, LOCALE_EPGPLUS_SCROLL_MODE }
}; };
EpgPlus::MenuOptionChooserSwitchViewMode::MenuOptionChooserSwitchViewMode(EpgPlus * epgPlus) EpgPlus::MenuOptionChooserSwitchViewMode::MenuOptionChooserSwitchViewMode(EpgPlus *epgPlus)
: CMenuOptionChooser(LOCALE_EPGPLUS_VIEW_MODE, (int *) &epgPlus->currentViewMode, menuOptionChooserSwitchViewModes, sizeof(menuOptionChooserSwitchViewModes) / sizeof(CMenuOptionChooser::keyval), : CMenuOptionChooser(LOCALE_EPGPLUS_VIEW_MODE, (int *) & epgPlus->currentViewMode, menuOptionChooserSwitchViewModes, sizeof(menuOptionChooserSwitchViewModes) / sizeof(CMenuOptionChooser::keyval),
true, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE) true, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)
{ {
this->oldTimingMenuSettings = g_settings.timing[SNeutrinoSettings::TIMING_MENU]; this->oldTimingMenuSettings = g_settings.timing[SNeutrinoSettings::TIMING_MENU];
@@ -1622,7 +1625,7 @@ EpgPlus::MenuOptionChooserSwitchViewMode::~MenuOptionChooserSwitchViewMode()
g_settings.timing[SNeutrinoSettings::TIMING_MENU] = this->oldTimingMenuSettings; g_settings.timing[SNeutrinoSettings::TIMING_MENU] = this->oldTimingMenuSettings;
} }
int EpgPlus::MenuOptionChooserSwitchViewMode::exec(CMenuTarget * parent) int EpgPlus::MenuOptionChooserSwitchViewMode::exec(CMenuTarget *parent)
{ {
// change time out settings temporary // change time out settings temporary
g_settings.timing[SNeutrinoSettings::TIMING_MENU] = 1; g_settings.timing[SNeutrinoSettings::TIMING_MENU] = 1;
@@ -1635,7 +1638,7 @@ int EpgPlus::MenuOptionChooserSwitchViewMode::exec(CMenuTarget * parent)
// -- EPG+ Menu Handler Class // -- EPG+ Menu Handler Class
// -- to be used for calls from Menu // -- to be used for calls from Menu
int CEPGplusHandler::exec(CMenuTarget * parent, const std::string & /*actionKey*/) int CEPGplusHandler::exec(CMenuTarget *parent, const std::string & /*actionKey*/)
{ {
int res = menu_return::RETURN_EXIT_ALL; int res = menu_return::RETURN_EXIT_ALL;
EpgPlus *e; EpgPlus *e;

View File

@@ -37,7 +37,7 @@ struct button_label;
class EpgPlus class EpgPlus
{ {
//// types, inner classes // types, inner classes
public: public:
enum SizeSettingID enum SizeSettingID
{ {
@@ -70,43 +70,43 @@ class EpgPlus
{ {
private: private:
CComponentsChannelLogo *logo; CComponentsChannelLogo *logo;
//// construction / destruction
// construction / destruction
public: public:
Header(CFrameBuffer* frameBuffer, Header(CFrameBuffer *frameBuffer,
int x, int x,
int y, int y,
int width); int width);
~Header(); ~Header();
//// methods // methods
public: public:
static void init(); static void init();
void paint(const char * Name = NULL); void paint(const char *Name = NULL);
void paintChannelLogo(const CZapitChannel * Channel = NULL); void paintChannelLogo(const CZapitChannel *Channel = NULL);
static int getUsedHeight(); static int getUsedHeight();
//// attributes // attributes
public: public:
CFrameBuffer* frameBuffer; CFrameBuffer *frameBuffer;
int x; int x;
int y; int y;
int width; int width;
static Font* font; static Font *font;
CComponentsHeader *head; CComponentsHeader *head;
}; };
class TimeLine class TimeLine
{ {
//// construction / destruction // construction / destruction
public: public:
TimeLine(CFrameBuffer* frameBuffer, TimeLine(CFrameBuffer *frameBuffer,
int x, int x,
int y, int y,
int width, int width,
@@ -115,7 +115,7 @@ class EpgPlus
~TimeLine(); ~TimeLine();
//// methods // methods
public: public:
static void init(); static void init();
@@ -129,9 +129,9 @@ class EpgPlus
static int getUsedHeight(); static int getUsedHeight();
//// attributes // attributes
public: public:
CFrameBuffer* frameBuffer; CFrameBuffer *frameBuffer;
int currentDuration; int currentDuration;
@@ -140,7 +140,7 @@ class EpgPlus
int width; int width;
static int separationLineThickness; static int separationLineThickness;
static Font* font; static Font *font;
int startX; int startX;
int durationX; int durationX;
@@ -148,19 +148,19 @@ class EpgPlus
class ChannelEventEntry class ChannelEventEntry
{ {
//// construction / destruction // construction / destruction
public: public:
ChannelEventEntry(const CChannelEvent* channelEvent, ChannelEventEntry(const CChannelEvent *channelEvent,
CFrameBuffer* frameBuffer, CFrameBuffer *frameBuffer,
TimeLine* timeLine, TimeLine *timeLine,
Footer* footer, Footer *footer,
int x, int x,
int y, int y,
int width); int width);
~ChannelEventEntry(); ~ChannelEventEntry();
//// methods // methods
public: public:
static void init(); static void init();
@@ -170,41 +170,41 @@ class EpgPlus
static int getUsedHeight(); static int getUsedHeight();
//// attributes // attributes
public: public:
CChannelEvent channelEvent; CChannelEvent channelEvent;
CFrameBuffer* frameBuffer; CFrameBuffer *frameBuffer;
TimeLine* timeLine; TimeLine *timeLine;
Footer* footer; Footer *footer;
int x; int x;
int y; int y;
int width; int width;
static int separationLineThickness; static int separationLineThickness;
static Font* font; static Font *font;
}; };
typedef std::vector<ChannelEventEntry*> TCChannelEventEntries; typedef std::vector<ChannelEventEntry *> TCChannelEventEntries;
class ChannelEntry class ChannelEntry
{ {
//// construction / destruction // construction / destruction
public: public:
ChannelEntry(const CZapitChannel* channel, ChannelEntry(const CZapitChannel *channel,
int index, int index,
CFrameBuffer* frameBuffer, CFrameBuffer *frameBuffer,
Header* header, Header *header,
Footer* footer, Footer *footer,
CBouquetList* bouquetList, CBouquetList *bouquetList,
int x, int x,
int y, int y,
int width); int width);
~ChannelEntry(); ~ChannelEntry();
//// methods // methods
public: public:
static void init(); static void init();
@@ -212,36 +212,36 @@ class EpgPlus
static int getUsedHeight(); static int getUsedHeight();
//// attributes // attributes
public: public:
const CZapitChannel * channel; const CZapitChannel *channel;
std::string displayNumber; std::string displayNumber;
std::string displayName; std::string displayName;
int index; int index;
CFrameBuffer* frameBuffer; CFrameBuffer *frameBuffer;
Header* header; Header *header;
Footer* footer; Footer *footer;
CBouquetList* bouquetList; CBouquetList *bouquetList;
int x; int x;
int y; int y;
int width; int width;
static int separationLineThickness; static int separationLineThickness;
static Font* font; static Font *font;
TCChannelEventEntries channelEventEntries; TCChannelEventEntries channelEventEntries;
CComponentsDetailsLine *detailsLine; CComponentsDetailsLine *detailsLine;
}; };
typedef std::vector<ChannelEntry*> TChannelEntries; typedef std::vector<ChannelEntry *> TChannelEntries;
class Footer class Footer
{ {
//// construction / destruction // construction / destruction
public: public:
Footer(CFrameBuffer* frameBuffer, Footer(CFrameBuffer *frameBuffer,
int x, int x,
int y, int y,
int width, int width,
@@ -249,21 +249,21 @@ class EpgPlus
~Footer(); ~Footer();
//// methods // methods
public: public:
static void init(); static void init();
void setBouquetChannelName(const std::string& newBouquetName, const std::string& newChannelName); void setBouquetChannelName(const std::string &newBouquetName, const std::string &newChannelName);
void paintEventDetails(const std::string& description, const std::string& shortDescription); void paintEventDetails(const std::string &description, const std::string &shortDescription);
void paintButtons(button_label* buttonLabels, int numberOfButtons); void paintButtons(button_label *buttonLabels, int numberOfButtons);
static int getUsedHeight(); static int getUsedHeight();
//// attributes // attributes
public: public:
CFrameBuffer* frameBuffer; CFrameBuffer *frameBuffer;
int x; int x;
int y; int y;
@@ -272,9 +272,9 @@ class EpgPlus
int buttonY; int buttonY;
int buttonHeight; int buttonHeight;
static Font* fontBouquetChannelName; static Font *fontBouquetChannelName;
static Font* fontEventDescription; static Font *fontEventDescription;
static Font* fontEventInfo1; static Font *fontEventInfo1;
std::string currentBouquetName; std::string currentBouquetName;
std::string currentChannelName; std::string currentChannelName;
@@ -283,54 +283,54 @@ class EpgPlus
class MenuTargetAddReminder : public CMenuTarget class MenuTargetAddReminder : public CMenuTarget
{ {
public: public:
MenuTargetAddReminder(EpgPlus* epgPlus); MenuTargetAddReminder(EpgPlus *epgPlus);
public: public:
int exec(CMenuTarget* parent, const std::string& actionKey); int exec(CMenuTarget *parent, const std::string &actionKey);
private: private:
EpgPlus* epgPlus; EpgPlus *epgPlus;
}; };
class MenuTargetAddRecordTimer : public CMenuTarget class MenuTargetAddRecordTimer : public CMenuTarget
{ {
public: public:
MenuTargetAddRecordTimer(EpgPlus* epgPlus); MenuTargetAddRecordTimer(EpgPlus *epgPlus);
public: public:
int exec(CMenuTarget* parent, const std::string& actionKey); int exec(CMenuTarget *parent, const std::string &actionKey);
private: private:
EpgPlus* epgPlus; EpgPlus *epgPlus;
}; };
class MenuTargetRefreshEpg : public CMenuTarget class MenuTargetRefreshEpg : public CMenuTarget
{ {
public: public:
MenuTargetRefreshEpg(EpgPlus* epgPlus); MenuTargetRefreshEpg(EpgPlus *epgPlus);
public: public:
int exec(CMenuTarget* parent, const std::string& actionKey); int exec(CMenuTarget *parent, const std::string &actionKey);
private: private:
EpgPlus* epgPlus; EpgPlus *epgPlus;
}; };
class MenuOptionChooserSwitchSwapMode : public CMenuOptionChooser class MenuOptionChooserSwitchSwapMode : public CMenuOptionChooser
{ {
public: public:
MenuOptionChooserSwitchSwapMode(EpgPlus* epgPlus); MenuOptionChooserSwitchSwapMode(EpgPlus *epgPlus);
virtual ~MenuOptionChooserSwitchSwapMode(); virtual ~MenuOptionChooserSwitchSwapMode();
public: public:
int exec(CMenuTarget* parent); int exec(CMenuTarget *parent);
private: private:
EpgPlus* epgPlus; EpgPlus *epgPlus;
int oldTimingMenuSettings; int oldTimingMenuSettings;
TSwapMode oldSwapMode; TSwapMode oldSwapMode;
}; };
@@ -338,12 +338,12 @@ class EpgPlus
class MenuOptionChooserSwitchViewMode : public CMenuOptionChooser class MenuOptionChooserSwitchViewMode : public CMenuOptionChooser
{ {
public: public:
MenuOptionChooserSwitchViewMode(EpgPlus* epgPlus); MenuOptionChooserSwitchViewMode(EpgPlus *epgPlus);
virtual ~MenuOptionChooserSwitchViewMode(); virtual ~MenuOptionChooserSwitchViewMode();
public: public:
int exec(CMenuTarget* parent); int exec(CMenuTarget *parent);
private: private:
int oldTimingMenuSettings; int oldTimingMenuSettings;
@@ -352,13 +352,13 @@ class EpgPlus
class MenuTargetSettings : public CMenuTarget class MenuTargetSettings : public CMenuTarget
{ {
public: public:
MenuTargetSettings(EpgPlus* epgPlus); MenuTargetSettings(EpgPlus *epgPlus);
public: public:
int exec(CMenuTarget* parent, const std::string& actionKey); int exec(CMenuTarget *parent, const std::string &actionKey);
private: private:
EpgPlus* epgPlus; EpgPlus *epgPlus;
}; };
typedef time_t DurationSetting; typedef time_t DurationSetting;
@@ -370,13 +370,13 @@ class EpgPlus
virtual ~Settings(); virtual ~Settings();
FontSetting* fontSettings; FontSetting *fontSettings;
SizeSetting* sizeSettings; SizeSetting *sizeSettings;
DurationSetting durationSetting; DurationSetting durationSetting;
}; };
typedef std::map<int, Font*> Fonts; typedef std::map<int, Font *> Fonts;
typedef std::map<int, int> Sizes; typedef std::map<int, int> Sizes;
static Font * fonts[NumberOfFontSettings]; static Font *fonts[NumberOfFontSettings];
static int sizes[NumberOfSizeSettings]; static int sizes[NumberOfSizeSettings];
*/ */
@@ -385,20 +385,20 @@ class EpgPlus
friend class EpgPlus::MenuOptionChooserSwitchSwapMode; friend class EpgPlus::MenuOptionChooserSwitchSwapMode;
friend class EpgPlus::MenuOptionChooserSwitchViewMode; friend class EpgPlus::MenuOptionChooserSwitchViewMode;
//// construction / destruction // construction / destruction
public: public:
EpgPlus(); EpgPlus();
~EpgPlus(); ~EpgPlus();
//// methods // methods
public: public:
void init(); void init();
void free(); void free();
int exec(CChannelList* channelList, int selectedChannelIndex, CBouquetList* bouquetList); int exec(CChannelList *channelList, int selectedChannelIndex, CBouquetList *bouquetList);
private: private:
static std::string getTimeString(const time_t& time, const std::string& format); static std::string getTimeString(const time_t &time, const std::string &format);
TCChannelEventEntries::const_iterator getSelectedEvent() const; TCChannelEventEntries::const_iterator getSelectedEvent() const;
@@ -407,21 +407,21 @@ class EpgPlus
void paintChannelEntry(int position); void paintChannelEntry(int position);
void hide(); void hide();
//// properties // properties
private: private:
CFrameBuffer* frameBuffer; CFrameBuffer *frameBuffer;
TChannelEntries displayedChannelEntries; TChannelEntries displayedChannelEntries;
Header* header; Header *header;
TimeLine* timeLine; TimeLine *timeLine;
CChannelList* channelList; CChannelList *channelList;
CBouquetList* bouquetList; CBouquetList *bouquetList;
Footer* footer; Footer *footer;
ChannelEntry* selectedChannelEntry; ChannelEntry *selectedChannelEntry;
time_t selectedTime; time_t selectedTime;
int channelListStartIndex; int channelListStartIndex;
@@ -479,7 +479,7 @@ class EpgPlus
class CEPGplusHandler : public CMenuTarget class CEPGplusHandler : public CMenuTarget
{ {
public: public:
int exec(CMenuTarget* parent, const std::string &actionKey); int exec(CMenuTarget *parent, const std::string &actionKey);
}; };
#endif // __epgplus__ #endif // __epgplus__