mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 10:51:12 +02:00
- epgplus.h: reformat; no binary changes
This commit is contained in:
@@ -3,14 +3,7 @@
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Copyright (C) 2004 Martin Griep 'vivamiga'
|
||||
|
||||
Kommentar:
|
||||
|
||||
Diese GUI wurde von Grund auf neu programmiert und sollte nun vom
|
||||
Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert
|
||||
auf der Client-Server Idee, diese GUI ist also von der direkten DBox-
|
||||
Steuerung getrennt. Diese wird dann von Daemons uebernommen.
|
||||
|
||||
Copyright (C) 2017 Sven Hoefer
|
||||
|
||||
License: GPL
|
||||
|
||||
@@ -29,9 +22,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __EPGPLUS_HPP__
|
||||
#define __EPGPLUS_HPP__
|
||||
#ifndef __epgplus__
|
||||
#define __epgplus__
|
||||
|
||||
#include "widget/menue.h"
|
||||
|
||||
@@ -45,8 +37,8 @@ struct button_label;
|
||||
|
||||
class EpgPlus
|
||||
{
|
||||
//// types, inner classes
|
||||
public:
|
||||
//// types, inner classes
|
||||
public:
|
||||
enum FontSettingID
|
||||
{
|
||||
EPGPlus_header_font = 0,
|
||||
@@ -86,7 +78,6 @@ public:
|
||||
int size;
|
||||
};
|
||||
|
||||
|
||||
enum TViewMode
|
||||
{
|
||||
ViewMode_Stretch,
|
||||
@@ -105,7 +96,10 @@ public:
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
Header ( CFrameBuffer* frameBuffer , int x , int y , int width);
|
||||
Header(CFrameBuffer* frameBuffer,
|
||||
int x,
|
||||
int y,
|
||||
int width);
|
||||
|
||||
~Header();
|
||||
|
||||
@@ -133,7 +127,12 @@ public:
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
TimeLine ( CFrameBuffer* frameBuffer , int x , int y , int width , int startX , int durationX);
|
||||
TimeLine(CFrameBuffer* frameBuffer,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int startX,
|
||||
int durationX);
|
||||
|
||||
~TimeLine();
|
||||
|
||||
@@ -141,9 +140,9 @@ public:
|
||||
public:
|
||||
static void init();
|
||||
|
||||
void paint ( time_t startTime , int duration);
|
||||
void paint(time_t startTime, int duration);
|
||||
|
||||
void paintMark ( time_t startTime , int duration , int x , int width);
|
||||
void paintMark(time_t startTime, int duration, int x, int width);
|
||||
|
||||
void paintGrid();
|
||||
|
||||
@@ -172,15 +171,13 @@ public:
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
ChannelEventEntry
|
||||
( const CChannelEvent* channelEvent
|
||||
, CFrameBuffer* frameBuffer
|
||||
, TimeLine* timeLine
|
||||
, Footer* footer
|
||||
, int x
|
||||
, int y
|
||||
, int width
|
||||
);
|
||||
ChannelEventEntry(const CChannelEvent* channelEvent,
|
||||
CFrameBuffer* frameBuffer,
|
||||
TimeLine* timeLine,
|
||||
Footer* footer,
|
||||
int x,
|
||||
int y,
|
||||
int width);
|
||||
|
||||
~ChannelEventEntry();
|
||||
|
||||
@@ -188,14 +185,9 @@ public:
|
||||
public:
|
||||
static void init();
|
||||
|
||||
bool isSelected
|
||||
( time_t selectedTime
|
||||
) const;
|
||||
bool isSelected(time_t selectedTime) const;
|
||||
|
||||
void paint
|
||||
( bool isSelected
|
||||
, bool toggleColor
|
||||
);
|
||||
void paint(bool isSelected, bool toggleColor);
|
||||
|
||||
static int getUsedHeight();
|
||||
|
||||
@@ -221,16 +213,14 @@ public:
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
ChannelEntry
|
||||
( const CZapitChannel* channel
|
||||
, int index
|
||||
, CFrameBuffer* frameBuffer
|
||||
, Footer* footer
|
||||
, CBouquetList* bouquetList
|
||||
, int x
|
||||
, int y
|
||||
, int width
|
||||
);
|
||||
ChannelEntry(const CZapitChannel* channel,
|
||||
int index,
|
||||
CFrameBuffer* frameBuffer,
|
||||
Footer* footer,
|
||||
CBouquetList* bouquetList,
|
||||
int x,
|
||||
int y,
|
||||
int width);
|
||||
|
||||
~ChannelEntry();
|
||||
|
||||
@@ -238,10 +228,7 @@ public:
|
||||
public:
|
||||
static void init();
|
||||
|
||||
void paint
|
||||
( bool isSelected
|
||||
, time_t selectedTime
|
||||
);
|
||||
void paint(bool isSelected, time_t selectedTime);
|
||||
|
||||
static int getUsedHeight();
|
||||
|
||||
@@ -271,13 +258,11 @@ public:
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
Footer
|
||||
( CFrameBuffer* frameBuffer
|
||||
, int x
|
||||
, int y
|
||||
, int width
|
||||
, int height
|
||||
);
|
||||
Footer(CFrameBuffer* frameBuffer,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
~Footer();
|
||||
|
||||
@@ -285,20 +270,11 @@ public:
|
||||
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();
|
||||
|
||||
@@ -322,14 +298,13 @@ public:
|
||||
std::string currentChannelName;
|
||||
};
|
||||
|
||||
|
||||
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;
|
||||
@@ -339,10 +314,10 @@ public:
|
||||
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;
|
||||
@@ -352,10 +327,10 @@ public:
|
||||
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;
|
||||
@@ -365,29 +340,28 @@ public:
|
||||
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;
|
||||
int oldTimingMenuSettings;
|
||||
TSwapMode oldSwapMode;
|
||||
EpgPlus* 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;
|
||||
@@ -396,10 +370,10 @@ public:
|
||||
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;
|
||||
@@ -407,10 +381,10 @@ public:
|
||||
|
||||
typedef time_t DurationSetting;
|
||||
|
||||
/*
|
||||
/*
|
||||
struct Settings
|
||||
{
|
||||
Settings ( bool doInit = true);
|
||||
Settings(bool doInit = true);
|
||||
|
||||
virtual ~Settings();
|
||||
|
||||
@@ -422,37 +396,37 @@ public:
|
||||
typedef std::map<int, int> Sizes;
|
||||
static Font * fonts[NumberOfFontSettings];
|
||||
static int sizes[NumberOfSizeSettings];
|
||||
*/
|
||||
*/
|
||||
|
||||
friend class EpgPlus::ChannelEventEntry;
|
||||
friend class EpgPlus::ChannelEntry;
|
||||
friend class EpgPlus::MenuOptionChooserSwitchSwapMode;
|
||||
friend class EpgPlus::MenuOptionChooserSwitchViewMode;
|
||||
friend class EpgPlus::ChannelEntry;
|
||||
friend class EpgPlus::ChannelEventEntry;
|
||||
|
||||
//// construction / destruction
|
||||
public:
|
||||
//// construction / destruction
|
||||
public:
|
||||
EpgPlus();
|
||||
~EpgPlus();
|
||||
|
||||
//// methods
|
||||
public:
|
||||
//// 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);
|
||||
private:
|
||||
static std::string getTimeString(const time_t& time, const std::string& format);
|
||||
|
||||
TCChannelEventEntries::const_iterator getSelectedEvent() const;
|
||||
|
||||
void createChannelEntries ( int selectedChannelEntryIndex);
|
||||
void createChannelEntries(int selectedChannelEntryIndex);
|
||||
void paint();
|
||||
void paintChannelEntry ( int position);
|
||||
void paintChannelEntry(int position);
|
||||
void hide();
|
||||
|
||||
//// properties
|
||||
private:
|
||||
//// properties
|
||||
private:
|
||||
CFrameBuffer* frameBuffer;
|
||||
|
||||
TChannelEntries displayedChannelEntries;
|
||||
@@ -544,7 +518,7 @@ private:
|
||||
class CEPGplusHandler : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
int exec( CMenuTarget* parent, const std::string &actionKey);
|
||||
int exec(CMenuTarget* parent, const std::string &actionKey);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // __epgplus__
|
||||
|
Reference in New Issue
Block a user