mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-09 06:38:36 +02:00
- epgplus: formatting code using astyle; some manual code nicenings
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -37,7 +37,7 @@ struct button_label;
|
||||
|
||||
class EpgPlus
|
||||
{
|
||||
//// types, inner classes
|
||||
// types, inner classes
|
||||
public:
|
||||
enum SizeSettingID
|
||||
{
|
||||
@@ -48,8 +48,8 @@ class EpgPlus
|
||||
|
||||
struct SizeSetting
|
||||
{
|
||||
SizeSettingID settingID;
|
||||
int size;
|
||||
SizeSettingID settingID;
|
||||
int size;
|
||||
};
|
||||
|
||||
enum TViewMode
|
||||
@@ -70,43 +70,43 @@ class EpgPlus
|
||||
{
|
||||
private:
|
||||
CComponentsChannelLogo *logo;
|
||||
//// construction / destruction
|
||||
|
||||
// construction / destruction
|
||||
public:
|
||||
Header(CFrameBuffer* frameBuffer,
|
||||
Header(CFrameBuffer *frameBuffer,
|
||||
int x,
|
||||
int y,
|
||||
int width);
|
||||
|
||||
~Header();
|
||||
|
||||
//// methods
|
||||
// methods
|
||||
public:
|
||||
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();
|
||||
|
||||
//// attributes
|
||||
// attributes
|
||||
public:
|
||||
CFrameBuffer* frameBuffer;
|
||||
CFrameBuffer *frameBuffer;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
|
||||
static Font* font;
|
||||
static Font *font;
|
||||
CComponentsHeader *head;
|
||||
};
|
||||
|
||||
|
||||
class TimeLine
|
||||
{
|
||||
//// construction / destruction
|
||||
// construction / destruction
|
||||
public:
|
||||
TimeLine(CFrameBuffer* frameBuffer,
|
||||
TimeLine(CFrameBuffer *frameBuffer,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
@@ -115,7 +115,7 @@ class EpgPlus
|
||||
|
||||
~TimeLine();
|
||||
|
||||
//// methods
|
||||
// methods
|
||||
public:
|
||||
static void init();
|
||||
|
||||
@@ -129,9 +129,9 @@ class EpgPlus
|
||||
|
||||
static int getUsedHeight();
|
||||
|
||||
//// attributes
|
||||
// attributes
|
||||
public:
|
||||
CFrameBuffer* frameBuffer;
|
||||
CFrameBuffer *frameBuffer;
|
||||
|
||||
int currentDuration;
|
||||
|
||||
@@ -140,7 +140,7 @@ class EpgPlus
|
||||
int width;
|
||||
static int separationLineThickness;
|
||||
|
||||
static Font* font;
|
||||
static Font *font;
|
||||
|
||||
int startX;
|
||||
int durationX;
|
||||
@@ -148,19 +148,19 @@ class EpgPlus
|
||||
|
||||
class ChannelEventEntry
|
||||
{
|
||||
//// construction / destruction
|
||||
// construction / destruction
|
||||
public:
|
||||
ChannelEventEntry(const CChannelEvent* channelEvent,
|
||||
CFrameBuffer* frameBuffer,
|
||||
TimeLine* timeLine,
|
||||
Footer* footer,
|
||||
ChannelEventEntry(const CChannelEvent *channelEvent,
|
||||
CFrameBuffer *frameBuffer,
|
||||
TimeLine *timeLine,
|
||||
Footer *footer,
|
||||
int x,
|
||||
int y,
|
||||
int width);
|
||||
|
||||
~ChannelEventEntry();
|
||||
|
||||
//// methods
|
||||
// methods
|
||||
public:
|
||||
static void init();
|
||||
|
||||
@@ -170,41 +170,41 @@ class EpgPlus
|
||||
|
||||
static int getUsedHeight();
|
||||
|
||||
//// attributes
|
||||
// attributes
|
||||
public:
|
||||
CChannelEvent channelEvent;
|
||||
|
||||
CFrameBuffer* frameBuffer;
|
||||
TimeLine* timeLine;
|
||||
Footer* footer;
|
||||
CFrameBuffer *frameBuffer;
|
||||
TimeLine *timeLine;
|
||||
Footer *footer;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
static int separationLineThickness;
|
||||
|
||||
static Font* font;
|
||||
static Font *font;
|
||||
};
|
||||
|
||||
typedef std::vector<ChannelEventEntry*> TCChannelEventEntries;
|
||||
typedef std::vector<ChannelEventEntry *> TCChannelEventEntries;
|
||||
|
||||
class ChannelEntry
|
||||
{
|
||||
//// construction / destruction
|
||||
// construction / destruction
|
||||
public:
|
||||
ChannelEntry(const CZapitChannel* channel,
|
||||
ChannelEntry(const CZapitChannel *channel,
|
||||
int index,
|
||||
CFrameBuffer* frameBuffer,
|
||||
Header* header,
|
||||
Footer* footer,
|
||||
CBouquetList* bouquetList,
|
||||
CFrameBuffer *frameBuffer,
|
||||
Header *header,
|
||||
Footer *footer,
|
||||
CBouquetList *bouquetList,
|
||||
int x,
|
||||
int y,
|
||||
int width);
|
||||
|
||||
~ChannelEntry();
|
||||
|
||||
//// methods
|
||||
// methods
|
||||
public:
|
||||
static void init();
|
||||
|
||||
@@ -212,36 +212,36 @@ class EpgPlus
|
||||
|
||||
static int getUsedHeight();
|
||||
|
||||
//// attributes
|
||||
// attributes
|
||||
public:
|
||||
const CZapitChannel * channel;
|
||||
const CZapitChannel *channel;
|
||||
std::string displayNumber;
|
||||
std::string displayName;
|
||||
int index;
|
||||
|
||||
CFrameBuffer* frameBuffer;
|
||||
Header* header;
|
||||
Footer* footer;
|
||||
CBouquetList* bouquetList;
|
||||
CFrameBuffer *frameBuffer;
|
||||
Header *header;
|
||||
Footer *footer;
|
||||
CBouquetList *bouquetList;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
static int separationLineThickness;
|
||||
|
||||
static Font* font;
|
||||
static Font *font;
|
||||
|
||||
TCChannelEventEntries channelEventEntries;
|
||||
CComponentsDetailsLine *detailsLine;
|
||||
};
|
||||
|
||||
typedef std::vector<ChannelEntry*> TChannelEntries;
|
||||
typedef std::vector<ChannelEntry *> TChannelEntries;
|
||||
|
||||
class Footer
|
||||
{
|
||||
//// construction / destruction
|
||||
// construction / destruction
|
||||
public:
|
||||
Footer(CFrameBuffer* frameBuffer,
|
||||
Footer(CFrameBuffer *frameBuffer,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
@@ -249,21 +249,21 @@ class EpgPlus
|
||||
|
||||
~Footer();
|
||||
|
||||
//// methods
|
||||
// methods
|
||||
public:
|
||||
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();
|
||||
|
||||
//// attributes
|
||||
// attributes
|
||||
public:
|
||||
CFrameBuffer* frameBuffer;
|
||||
CFrameBuffer *frameBuffer;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
@@ -272,9 +272,9 @@ class EpgPlus
|
||||
int buttonY;
|
||||
int buttonHeight;
|
||||
|
||||
static Font* fontBouquetChannelName;
|
||||
static Font* fontEventDescription;
|
||||
static Font* fontEventInfo1;
|
||||
static Font *fontBouquetChannelName;
|
||||
static Font *fontEventDescription;
|
||||
static Font *fontEventInfo1;
|
||||
|
||||
std::string currentBouquetName;
|
||||
std::string currentChannelName;
|
||||
@@ -283,54 +283,54 @@ class EpgPlus
|
||||
class MenuTargetAddReminder : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetAddReminder(EpgPlus* epgPlus);
|
||||
MenuTargetAddReminder(EpgPlus *epgPlus);
|
||||
|
||||
public:
|
||||
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||
int exec(CMenuTarget *parent, const std::string &actionKey);
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
EpgPlus *epgPlus;
|
||||
|
||||
};
|
||||
|
||||
class MenuTargetAddRecordTimer : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetAddRecordTimer(EpgPlus* epgPlus);
|
||||
MenuTargetAddRecordTimer(EpgPlus *epgPlus);
|
||||
|
||||
public:
|
||||
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||
int exec(CMenuTarget *parent, const std::string &actionKey);
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
EpgPlus *epgPlus;
|
||||
|
||||
};
|
||||
|
||||
class MenuTargetRefreshEpg : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetRefreshEpg(EpgPlus* epgPlus);
|
||||
MenuTargetRefreshEpg(EpgPlus *epgPlus);
|
||||
|
||||
public:
|
||||
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||
int exec(CMenuTarget *parent, const std::string &actionKey);
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
EpgPlus *epgPlus;
|
||||
|
||||
};
|
||||
|
||||
class MenuOptionChooserSwitchSwapMode : public CMenuOptionChooser
|
||||
{
|
||||
public:
|
||||
MenuOptionChooserSwitchSwapMode(EpgPlus* epgPlus);
|
||||
MenuOptionChooserSwitchSwapMode(EpgPlus *epgPlus);
|
||||
|
||||
virtual ~MenuOptionChooserSwitchSwapMode();
|
||||
|
||||
public:
|
||||
int exec(CMenuTarget* parent);
|
||||
int exec(CMenuTarget *parent);
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
EpgPlus *epgPlus;
|
||||
int oldTimingMenuSettings;
|
||||
TSwapMode oldSwapMode;
|
||||
};
|
||||
@@ -338,12 +338,12 @@ class EpgPlus
|
||||
class MenuOptionChooserSwitchViewMode : public CMenuOptionChooser
|
||||
{
|
||||
public:
|
||||
MenuOptionChooserSwitchViewMode(EpgPlus* epgPlus);
|
||||
MenuOptionChooserSwitchViewMode(EpgPlus *epgPlus);
|
||||
|
||||
virtual ~MenuOptionChooserSwitchViewMode();
|
||||
|
||||
public:
|
||||
int exec(CMenuTarget* parent);
|
||||
int exec(CMenuTarget *parent);
|
||||
|
||||
private:
|
||||
int oldTimingMenuSettings;
|
||||
@@ -352,13 +352,13 @@ class EpgPlus
|
||||
class MenuTargetSettings : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetSettings(EpgPlus* epgPlus);
|
||||
MenuTargetSettings(EpgPlus *epgPlus);
|
||||
|
||||
public:
|
||||
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||
int exec(CMenuTarget *parent, const std::string &actionKey);
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
EpgPlus *epgPlus;
|
||||
};
|
||||
|
||||
typedef time_t DurationSetting;
|
||||
@@ -370,13 +370,13 @@ class EpgPlus
|
||||
|
||||
virtual ~Settings();
|
||||
|
||||
FontSetting* fontSettings;
|
||||
SizeSetting* sizeSettings;
|
||||
DurationSetting durationSetting;
|
||||
FontSetting *fontSettings;
|
||||
SizeSetting *sizeSettings;
|
||||
DurationSetting durationSetting;
|
||||
};
|
||||
typedef std::map<int, Font*> Fonts;
|
||||
typedef std::map<int, Font *> Fonts;
|
||||
typedef std::map<int, int> Sizes;
|
||||
static Font * fonts[NumberOfFontSettings];
|
||||
static Font *fonts[NumberOfFontSettings];
|
||||
static int sizes[NumberOfSizeSettings];
|
||||
*/
|
||||
|
||||
@@ -385,20 +385,20 @@ class EpgPlus
|
||||
friend class EpgPlus::MenuOptionChooserSwitchSwapMode;
|
||||
friend class EpgPlus::MenuOptionChooserSwitchViewMode;
|
||||
|
||||
//// construction / destruction
|
||||
// construction / destruction
|
||||
public:
|
||||
EpgPlus();
|
||||
~EpgPlus();
|
||||
|
||||
//// methods
|
||||
// methods
|
||||
public:
|
||||
void init();
|
||||
void free();
|
||||
|
||||
int exec(CChannelList* channelList, int selectedChannelIndex, CBouquetList* bouquetList);
|
||||
int exec(CChannelList *channelList, int selectedChannelIndex, CBouquetList *bouquetList);
|
||||
|
||||
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;
|
||||
|
||||
@@ -407,79 +407,79 @@ class EpgPlus
|
||||
void paintChannelEntry(int position);
|
||||
void hide();
|
||||
|
||||
//// properties
|
||||
// properties
|
||||
private:
|
||||
CFrameBuffer* frameBuffer;
|
||||
CFrameBuffer *frameBuffer;
|
||||
|
||||
TChannelEntries displayedChannelEntries;
|
||||
TChannelEntries displayedChannelEntries;
|
||||
|
||||
Header* header;
|
||||
TimeLine* timeLine;
|
||||
Header *header;
|
||||
TimeLine *timeLine;
|
||||
|
||||
CChannelList* channelList;
|
||||
CBouquetList* bouquetList;
|
||||
CChannelList *channelList;
|
||||
CBouquetList *bouquetList;
|
||||
|
||||
Footer* footer;
|
||||
Footer *footer;
|
||||
|
||||
ChannelEntry* selectedChannelEntry;
|
||||
time_t selectedTime;
|
||||
ChannelEntry *selectedChannelEntry;
|
||||
time_t selectedTime;
|
||||
|
||||
int channelListStartIndex;
|
||||
int maxNumberOfDisplayableEntries; // maximal number of displayable entrys
|
||||
static int channelNumberOffset;
|
||||
int channelListStartIndex;
|
||||
int maxNumberOfDisplayableEntries; // maximal number of displayable entrys
|
||||
static int channelNumberOffset;
|
||||
|
||||
time_t startTime;
|
||||
time_t firstStartTime;
|
||||
static time_t duration;
|
||||
time_t startTime;
|
||||
time_t firstStartTime;
|
||||
static time_t duration;
|
||||
|
||||
int entryHeight;
|
||||
static int entryFontSize;
|
||||
int entryHeight;
|
||||
static int entryFontSize;
|
||||
|
||||
TViewMode currentViewMode;
|
||||
TSwapMode currentSwapMode;
|
||||
TViewMode currentViewMode;
|
||||
TSwapMode currentSwapMode;
|
||||
|
||||
int headerX;
|
||||
int headerY;
|
||||
int headerWidth;
|
||||
int headerX;
|
||||
int headerY;
|
||||
int headerWidth;
|
||||
|
||||
int usableScreenWidth;
|
||||
int usableScreenHeight;
|
||||
int usableScreenX;
|
||||
int usableScreenY;
|
||||
int usableScreenWidth;
|
||||
int usableScreenHeight;
|
||||
int usableScreenX;
|
||||
int usableScreenY;
|
||||
|
||||
int timeLineX;
|
||||
int timeLineY;
|
||||
int timeLineWidth;
|
||||
int timeLineX;
|
||||
int timeLineY;
|
||||
int timeLineWidth;
|
||||
|
||||
int bodyHeight;
|
||||
int bodyHeight;
|
||||
|
||||
int channelsTableX;
|
||||
int channelsTableY;
|
||||
static int channelsTableWidth;
|
||||
int channelsTableHeight;
|
||||
int channelsTableX;
|
||||
int channelsTableY;
|
||||
static int channelsTableWidth;
|
||||
int channelsTableHeight;
|
||||
|
||||
int eventsTableX;
|
||||
int eventsTableY;
|
||||
int eventsTableWidth;
|
||||
int eventsTableHeight;
|
||||
int eventsTableX;
|
||||
int eventsTableY;
|
||||
int eventsTableWidth;
|
||||
int eventsTableHeight;
|
||||
|
||||
int sliderX;
|
||||
int sliderY;
|
||||
static int sliderWidth;
|
||||
int sliderHeight;
|
||||
int sliderX;
|
||||
int sliderY;
|
||||
static int sliderWidth;
|
||||
int sliderHeight;
|
||||
|
||||
int footerX;
|
||||
int footerY;
|
||||
int footerWidth;
|
||||
int footerX;
|
||||
int footerY;
|
||||
int footerWidth;
|
||||
|
||||
bool refreshAll;
|
||||
bool refreshFooterButtons;
|
||||
bool refreshAll;
|
||||
bool refreshFooterButtons;
|
||||
};
|
||||
|
||||
class CEPGplusHandler : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
int exec(CMenuTarget* parent, const std::string &actionKey);
|
||||
int exec(CMenuTarget *parent, const std::string &actionKey);
|
||||
};
|
||||
|
||||
#endif // __epgplus__
|
||||
|
Reference in New Issue
Block a user