- 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::channelNumberOffset = 0;
/* negative size means "screen width in percent" */
// negative size means "screen width in percent"
static EpgPlus::SizeSetting sizeSettingTable[] =
{
{ EpgPlus::EPGPlus_channelentry_width, -15 }, /* 15 percent of screen width */
{ EpgPlus::EPGPlus_channelentry_width, -15 },
{ EpgPlus::EPGPlus_separationline_thickness, 1 }
};
@@ -247,7 +247,7 @@ void EpgPlus::TimeLine::paintMark(time_t _startTime, int pduration, int px, int
// paint new mark
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);
time_t currentTime;
@@ -375,7 +375,8 @@ void EpgPlus::ChannelEventEntry::paint(bool pisSelected, bool toggleColor)
if (pisSelected)
{
if (this->channelEvent.description.empty())
{ // dummy channel event
{
// dummy channel event
this->timeLine->clearMark();
}
else
@@ -593,7 +594,7 @@ int EpgPlus::Footer::getUsedHeight()
void EpgPlus::Footer::paintEventDetails(const std::string &description, const std::string &info1)
{
int yPos = this->y;
int frame_thickness = 2;
int frame_thickness = 1;
// clear the whole footer
this->frameBuffer->paintBoxRel(this->x + OFFSET_SHADOW, yPos + OFFSET_SHADOW, this->width, this->getUsedHeight(), COL_SHADOW_PLUS_0, RADIUS_LARGE);
@@ -697,7 +698,8 @@ void EpgPlus::createChannelEntries(int selectedChannelEntryIndex)
//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)))
continue;
if ((lastIt == channelEventList.end()) || (lastIt->startTime != It->startTime)) {
if ((lastIt == channelEventList.end()) || (lastIt->startTime != It->startTime))
{
int startTimeDiff = It->startTime - this->startTime;
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());
@@ -1408,7 +1410,8 @@ void EpgPlus::hide()
this->header->head = NULL;
}
if (this->selectedChannelEntry && this->selectedChannelEntry->detailsLine) {
if (this->selectedChannelEntry && this->selectedChannelEntry->detailsLine)
{
this->selectedChannelEntry->detailsLine->kill();
delete this->selectedChannelEntry->detailsLine;
this->selectedChannelEntry->detailsLine = NULL;

View File

@@ -37,7 +37,7 @@ struct button_label;
class EpgPlus
{
//// types, inner classes
// types, inner classes
public:
enum SizeSettingID
{
@@ -70,7 +70,8 @@ class EpgPlus
{
private:
CComponentsChannelLogo *logo;
//// construction / destruction
// construction / destruction
public:
Header(CFrameBuffer *frameBuffer,
int x,
@@ -79,7 +80,7 @@ class EpgPlus
~Header();
//// methods
// methods
public:
static void init();
@@ -89,7 +90,7 @@ class EpgPlus
static int getUsedHeight();
//// attributes
// attributes
public:
CFrameBuffer *frameBuffer;
@@ -101,10 +102,9 @@ class EpgPlus
CComponentsHeader *head;
};
class TimeLine
{
//// construction / destruction
// construction / destruction
public:
TimeLine(CFrameBuffer *frameBuffer,
int x,
@@ -115,7 +115,7 @@ class EpgPlus
~TimeLine();
//// methods
// methods
public:
static void init();
@@ -129,7 +129,7 @@ class EpgPlus
static int getUsedHeight();
//// attributes
// attributes
public:
CFrameBuffer *frameBuffer;
@@ -148,7 +148,7 @@ class EpgPlus
class ChannelEventEntry
{
//// construction / destruction
// construction / destruction
public:
ChannelEventEntry(const CChannelEvent *channelEvent,
CFrameBuffer *frameBuffer,
@@ -160,7 +160,7 @@ class EpgPlus
~ChannelEventEntry();
//// methods
// methods
public:
static void init();
@@ -170,7 +170,7 @@ class EpgPlus
static int getUsedHeight();
//// attributes
// attributes
public:
CChannelEvent channelEvent;
@@ -190,7 +190,7 @@ class EpgPlus
class ChannelEntry
{
//// construction / destruction
// construction / destruction
public:
ChannelEntry(const CZapitChannel *channel,
int index,
@@ -204,7 +204,7 @@ class EpgPlus
~ChannelEntry();
//// methods
// methods
public:
static void init();
@@ -212,7 +212,7 @@ class EpgPlus
static int getUsedHeight();
//// attributes
// attributes
public:
const CZapitChannel *channel;
std::string displayNumber;
@@ -239,7 +239,7 @@ class EpgPlus
class Footer
{
//// construction / destruction
// construction / destruction
public:
Footer(CFrameBuffer *frameBuffer,
int x,
@@ -249,7 +249,7 @@ class EpgPlus
~Footer();
//// methods
// methods
public:
static void init();
@@ -261,7 +261,7 @@ class EpgPlus
static int getUsedHeight();
//// attributes
// attributes
public:
CFrameBuffer *frameBuffer;
@@ -385,12 +385,12 @@ class EpgPlus
friend class EpgPlus::MenuOptionChooserSwitchSwapMode;
friend class EpgPlus::MenuOptionChooserSwitchViewMode;
//// construction / destruction
// construction / destruction
public:
EpgPlus();
~EpgPlus();
//// methods
// methods
public:
void init();
void free();
@@ -407,7 +407,7 @@ class EpgPlus
void paintChannelEntry(int position);
void hide();
//// properties
// properties
private:
CFrameBuffer *frameBuffer;