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:
@@ -1,37 +1,29 @@
|
|||||||
/*
|
/*
|
||||||
Neutrino-GUI - DBoxII-Project
|
Neutrino-GUI - DBoxII-Project
|
||||||
|
|
||||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||||
Copyright (C) 2004 Martin Griep 'vivamiga'
|
Copyright (C) 2004 Martin Griep 'vivamiga'
|
||||||
|
Copyright (C) 2017 Sven Hoefer
|
||||||
|
|
||||||
Kommentar:
|
License: GPL
|
||||||
|
|
||||||
Diese GUI wurde von Grund auf neu programmiert und sollte nun vom
|
This program is free software; you can redistribute it and/or modify
|
||||||
Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert
|
it under the terms of the GNU General Public License as published by
|
||||||
auf der Client-Server Idee, diese GUI ist also von der direkten DBox-
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
Steuerung getrennt. Diese wird dann von Daemons uebernommen.
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
License: GPL
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
This program is free software; you can redistribute it and/or modify
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __epgplus__
|
||||||
#ifndef __EPGPLUS_HPP__
|
#define __epgplus__
|
||||||
#define __EPGPLUS_HPP__
|
|
||||||
|
|
||||||
#include "widget/menue.h"
|
#include "widget/menue.h"
|
||||||
|
|
||||||
@@ -45,506 +37,488 @@ struct button_label;
|
|||||||
|
|
||||||
class EpgPlus
|
class EpgPlus
|
||||||
{
|
{
|
||||||
//// types, inner classes
|
//// types, inner classes
|
||||||
public:
|
public:
|
||||||
enum FontSettingID
|
enum FontSettingID
|
||||||
{
|
{
|
||||||
EPGPlus_header_font = 0,
|
EPGPlus_header_font = 0,
|
||||||
EPGPlus_timeline_fonttime,
|
EPGPlus_timeline_fonttime,
|
||||||
EPGPlus_timeline_fontdate,
|
EPGPlus_timeline_fontdate,
|
||||||
EPGPlus_channelentry_font,
|
EPGPlus_channelentry_font,
|
||||||
EPGPlus_channelevententry_font,
|
EPGPlus_channelevententry_font,
|
||||||
EPGPlus_footer_fontbouquetchannelname,
|
EPGPlus_footer_fontbouquetchannelname,
|
||||||
EPGPlus_footer_fonteventdescription,
|
EPGPlus_footer_fonteventdescription,
|
||||||
EPGPlus_footer_fonteventshortdescription,
|
EPGPlus_footer_fonteventshortdescription,
|
||||||
EPGPlus_footer_fontbuttons,
|
EPGPlus_footer_fontbuttons,
|
||||||
NumberOfFontSettings
|
NumberOfFontSettings
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SizeSettingID
|
enum SizeSettingID
|
||||||
{
|
{
|
||||||
EPGPlus_channelentry_width = 0,
|
EPGPlus_channelentry_width = 0,
|
||||||
EPGPlus_channelentry_separationlineheight,
|
EPGPlus_channelentry_separationlineheight,
|
||||||
EPGPlus_slider_width,
|
EPGPlus_slider_width,
|
||||||
EPGPlus_horgap1_height,
|
EPGPlus_horgap1_height,
|
||||||
EPGPlus_horgap2_height,
|
EPGPlus_horgap2_height,
|
||||||
EPGPlus_vergap1_width,
|
EPGPlus_vergap1_width,
|
||||||
EPGPlus_vergap2_width,
|
EPGPlus_vergap2_width,
|
||||||
NumberOfSizeSettings
|
NumberOfSizeSettings
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FontSetting
|
struct FontSetting
|
||||||
{
|
{
|
||||||
FontSettingID settingID;
|
FontSettingID settingID;
|
||||||
const char* style;
|
const char* style;
|
||||||
int size;
|
int size;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SizeSetting
|
struct SizeSetting
|
||||||
{
|
{
|
||||||
SizeSettingID settingID;
|
SizeSettingID settingID;
|
||||||
int size;
|
int size;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum TViewMode
|
||||||
enum TViewMode
|
{
|
||||||
{
|
ViewMode_Stretch,
|
||||||
ViewMode_Stretch,
|
ViewMode_Scroll
|
||||||
ViewMode_Scroll
|
};
|
||||||
};
|
|
||||||
|
enum TSwapMode
|
||||||
enum TSwapMode
|
{
|
||||||
{
|
SwapMode_ByPage,
|
||||||
SwapMode_ByPage,
|
SwapMode_ByBouquet
|
||||||
SwapMode_ByBouquet
|
};
|
||||||
};
|
|
||||||
|
class Footer;
|
||||||
class Footer;
|
|
||||||
|
class Header
|
||||||
class Header
|
{
|
||||||
{
|
//// construction / destruction
|
||||||
//// construction / destruction
|
public:
|
||||||
public:
|
Header(CFrameBuffer* frameBuffer,
|
||||||
Header ( CFrameBuffer* frameBuffer , int x , int y , int width);
|
int x,
|
||||||
|
int y,
|
||||||
~Header();
|
int width);
|
||||||
|
|
||||||
//// methods
|
~Header();
|
||||||
public:
|
|
||||||
static void init();
|
//// methods
|
||||||
|
public:
|
||||||
void paint(const char * Name = NULL);
|
static void init();
|
||||||
|
|
||||||
static int getUsedHeight();
|
void paint(const char * Name = NULL);
|
||||||
|
|
||||||
//// attributes
|
static int getUsedHeight();
|
||||||
public:
|
|
||||||
CFrameBuffer* frameBuffer;
|
//// attributes
|
||||||
|
public:
|
||||||
int x;
|
CFrameBuffer* frameBuffer;
|
||||||
int y;
|
|
||||||
int width;
|
int x;
|
||||||
|
int y;
|
||||||
static Font* font;
|
int width;
|
||||||
};
|
|
||||||
|
static Font* font;
|
||||||
|
};
|
||||||
class TimeLine
|
|
||||||
{
|
|
||||||
//// construction / destruction
|
class TimeLine
|
||||||
public:
|
{
|
||||||
TimeLine ( CFrameBuffer* frameBuffer , int x , int y , int width , int startX , int durationX);
|
//// construction / destruction
|
||||||
|
public:
|
||||||
~TimeLine();
|
TimeLine(CFrameBuffer* frameBuffer,
|
||||||
|
int x,
|
||||||
//// methods
|
int y,
|
||||||
public:
|
int width,
|
||||||
static void init();
|
int startX,
|
||||||
|
int durationX);
|
||||||
void paint ( time_t startTime , int duration);
|
|
||||||
|
~TimeLine();
|
||||||
void paintMark ( time_t startTime , int duration , int x , int width);
|
|
||||||
|
//// methods
|
||||||
void paintGrid();
|
public:
|
||||||
|
static void init();
|
||||||
void clearMark();
|
|
||||||
|
void paint(time_t startTime, int duration);
|
||||||
static int getUsedHeight();
|
|
||||||
|
void paintMark(time_t startTime, int duration, int x, int width);
|
||||||
//// attributes
|
|
||||||
public:
|
void paintGrid();
|
||||||
CFrameBuffer* frameBuffer;
|
|
||||||
|
void clearMark();
|
||||||
int currentDuration;
|
|
||||||
|
static int getUsedHeight();
|
||||||
int x;
|
|
||||||
int y;
|
//// attributes
|
||||||
int width;
|
public:
|
||||||
|
CFrameBuffer* frameBuffer;
|
||||||
static Font* fontTime;
|
|
||||||
static Font* fontDate;
|
|
||||||
|
|
||||||
int startX;
|
|
||||||
int durationX;
|
|
||||||
};
|
|
||||||
|
|
||||||
class ChannelEventEntry
|
int currentDuration;
|
||||||
{
|
|
||||||
//// construction / destruction
|
|
||||||
public:
|
|
||||||
ChannelEventEntry
|
|
||||||
( const CChannelEvent* channelEvent
|
|
||||||
, CFrameBuffer* frameBuffer
|
|
||||||
, TimeLine* timeLine
|
|
||||||
, Footer* footer
|
|
||||||
, int x
|
|
||||||
, int y
|
|
||||||
, int width
|
|
||||||
);
|
|
||||||
|
|
||||||
~ChannelEventEntry();
|
int x;
|
||||||
|
int y;
|
||||||
|
int width;
|
||||||
|
|
||||||
//// methods
|
static Font* fontTime;
|
||||||
public:
|
static Font* fontDate;
|
||||||
static void init();
|
|
||||||
|
|
||||||
bool isSelected
|
int startX;
|
||||||
( time_t selectedTime
|
int durationX;
|
||||||
) const;
|
};
|
||||||
|
|
||||||
void paint
|
class ChannelEventEntry
|
||||||
( bool isSelected
|
{
|
||||||
, bool toggleColor
|
//// construction / destruction
|
||||||
);
|
public:
|
||||||
|
ChannelEventEntry(const CChannelEvent* channelEvent,
|
||||||
|
CFrameBuffer* frameBuffer,
|
||||||
|
TimeLine* timeLine,
|
||||||
|
Footer* footer,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
|
int width);
|
||||||
|
|
||||||
static int getUsedHeight();
|
~ChannelEventEntry();
|
||||||
|
|
||||||
//// attributes
|
//// methods
|
||||||
public:
|
public:
|
||||||
CChannelEvent channelEvent;
|
static void init();
|
||||||
|
|
||||||
CFrameBuffer* frameBuffer;
|
bool isSelected(time_t selectedTime) const;
|
||||||
TimeLine* timeLine;
|
|
||||||
Footer* footer;
|
|
||||||
|
|
||||||
int x;
|
void paint(bool isSelected, bool toggleColor);
|
||||||
int y;
|
|
||||||
int width;
|
|
||||||
static int separationLineHeight;
|
|
||||||
|
|
||||||
static Font* font;
|
static int getUsedHeight();
|
||||||
};
|
|
||||||
|
|
||||||
typedef std::vector<ChannelEventEntry*> TCChannelEventEntries;
|
//// attributes
|
||||||
|
public:
|
||||||
|
CChannelEvent channelEvent;
|
||||||
|
|
||||||
class ChannelEntry
|
CFrameBuffer* frameBuffer;
|
||||||
{
|
TimeLine* timeLine;
|
||||||
//// construction / destruction
|
Footer* footer;
|
||||||
public:
|
|
||||||
ChannelEntry
|
|
||||||
( const CZapitChannel* channel
|
|
||||||
, int index
|
|
||||||
, CFrameBuffer* frameBuffer
|
|
||||||
, Footer* footer
|
|
||||||
, CBouquetList* bouquetList
|
|
||||||
, int x
|
|
||||||
, int y
|
|
||||||
, int width
|
|
||||||
);
|
|
||||||
|
|
||||||
~ChannelEntry();
|
int x;
|
||||||
|
int y;
|
||||||
|
int width;
|
||||||
|
static int separationLineHeight;
|
||||||
|
|
||||||
//// methods
|
static Font* font;
|
||||||
public:
|
};
|
||||||
static void init();
|
|
||||||
|
|
||||||
void paint
|
typedef std::vector<ChannelEventEntry*> TCChannelEventEntries;
|
||||||
( bool isSelected
|
|
||||||
, time_t selectedTime
|
|
||||||
);
|
|
||||||
|
|
||||||
static int getUsedHeight();
|
class ChannelEntry
|
||||||
|
{
|
||||||
|
//// construction / destruction
|
||||||
|
public:
|
||||||
|
ChannelEntry(const CZapitChannel* channel,
|
||||||
|
int index,
|
||||||
|
CFrameBuffer* frameBuffer,
|
||||||
|
Footer* footer,
|
||||||
|
CBouquetList* bouquetList,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
|
int width);
|
||||||
|
|
||||||
//// attributes
|
~ChannelEntry();
|
||||||
public:
|
|
||||||
const CZapitChannel * channel;
|
|
||||||
std::string displayName;
|
|
||||||
int index;
|
|
||||||
|
|
||||||
CFrameBuffer* frameBuffer;
|
|
||||||
Footer* footer;
|
|
||||||
CBouquetList* bouquetList;
|
|
||||||
|
|
||||||
int x;
|
|
||||||
int y;
|
|
||||||
int width;
|
|
||||||
static int separationLineHeight;
|
|
||||||
|
|
||||||
static Font* font;
|
|
||||||
|
|
||||||
TCChannelEventEntries channelEventEntries;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef std::vector<ChannelEntry*> TChannelEntries;
|
|
||||||
|
|
||||||
class Footer
|
|
||||||
{
|
|
||||||
//// construction / destruction
|
|
||||||
public:
|
|
||||||
Footer
|
|
||||||
( CFrameBuffer* frameBuffer
|
|
||||||
, int x
|
|
||||||
, int y
|
|
||||||
, int width
|
|
||||||
, int height
|
|
||||||
);
|
|
||||||
|
|
||||||
~Footer();
|
//// methods
|
||||||
|
public:
|
||||||
|
static void init();
|
||||||
|
|
||||||
//// methods
|
void paint(bool isSelected, time_t selectedTime);
|
||||||
public:
|
|
||||||
static void init();
|
|
||||||
|
|
||||||
void setBouquetChannelName
|
static int getUsedHeight();
|
||||||
( const std::string& newBouquetName
|
|
||||||
, const std::string& newChannelName
|
|
||||||
);
|
|
||||||
|
|
||||||
void paintEventDetails
|
//// attributes
|
||||||
( const std::string& description
|
public:
|
||||||
, const std::string& shortDescription
|
const CZapitChannel * channel;
|
||||||
);
|
std::string displayName;
|
||||||
|
int index;
|
||||||
|
|
||||||
void paintButtons
|
CFrameBuffer* frameBuffer;
|
||||||
( button_label* buttonLabels
|
Footer* footer;
|
||||||
, int numberOfButtons
|
CBouquetList* bouquetList;
|
||||||
);
|
|
||||||
|
|
||||||
static int getUsedHeight();
|
int x;
|
||||||
|
int y;
|
||||||
|
int width;
|
||||||
|
static int separationLineHeight;
|
||||||
|
|
||||||
//// attributes
|
static Font* font;
|
||||||
public:
|
|
||||||
CFrameBuffer* frameBuffer;
|
|
||||||
|
|
||||||
int x;
|
TCChannelEventEntries channelEventEntries;
|
||||||
int y;
|
};
|
||||||
int width;
|
|
||||||
int buttonHeight;
|
|
||||||
|
|
||||||
static Font* fontBouquetChannelName;
|
typedef std::vector<ChannelEntry*> TChannelEntries;
|
||||||
static Font* fontEventDescription;
|
|
||||||
static Font* fontEventShortDescription;
|
|
||||||
static Font* fontButtons;
|
|
||||||
|
|
||||||
static int color;
|
class Footer
|
||||||
|
{
|
||||||
|
//// construction / destruction
|
||||||
|
public:
|
||||||
|
Footer(CFrameBuffer* frameBuffer,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
|
int width,
|
||||||
|
int height);
|
||||||
|
|
||||||
std::string currentBouquetName;
|
~Footer();
|
||||||
std::string currentChannelName;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
//// methods
|
||||||
|
public:
|
||||||
|
static void init();
|
||||||
|
|
||||||
class MenuTargetAddReminder : public CMenuTarget
|
void setBouquetChannelName(const std::string& newBouquetName, const std::string& newChannelName);
|
||||||
{
|
|
||||||
public:
|
|
||||||
MenuTargetAddReminder ( EpgPlus* epgPlus);
|
|
||||||
|
|
||||||
public:
|
void paintEventDetails(const std::string& description, const std::string& shortDescription);
|
||||||
int exec ( CMenuTarget* parent , const std::string& actionKey);
|
|
||||||
|
|
||||||
private:
|
void paintButtons(button_label* buttonLabels, int numberOfButtons);
|
||||||
EpgPlus* epgPlus;
|
|
||||||
|
|
||||||
};
|
static int getUsedHeight();
|
||||||
|
|
||||||
class MenuTargetAddRecordTimer : public CMenuTarget
|
//// attributes
|
||||||
{
|
public:
|
||||||
public:
|
CFrameBuffer* frameBuffer;
|
||||||
MenuTargetAddRecordTimer ( EpgPlus* epgPlus);
|
|
||||||
|
|
||||||
public:
|
int x;
|
||||||
int exec ( CMenuTarget* parent , const std::string& actionKey);
|
int y;
|
||||||
|
int width;
|
||||||
|
int buttonHeight;
|
||||||
|
|
||||||
private:
|
static Font* fontBouquetChannelName;
|
||||||
EpgPlus* epgPlus;
|
static Font* fontEventDescription;
|
||||||
|
static Font* fontEventShortDescription;
|
||||||
|
static Font* fontButtons;
|
||||||
|
|
||||||
};
|
static int color;
|
||||||
|
|
||||||
class MenuTargetRefreshEpg : public CMenuTarget
|
std::string currentBouquetName;
|
||||||
{
|
std::string currentChannelName;
|
||||||
public:
|
};
|
||||||
MenuTargetRefreshEpg ( EpgPlus* epgPlus);
|
|
||||||
|
|
||||||
public:
|
class MenuTargetAddReminder : public CMenuTarget
|
||||||
int exec ( CMenuTarget* parent , const std::string& actionKey);
|
{
|
||||||
|
public:
|
||||||
|
MenuTargetAddReminder(EpgPlus* epgPlus);
|
||||||
|
|
||||||
private:
|
public:
|
||||||
EpgPlus* epgPlus;
|
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||||
|
|
||||||
};
|
private:
|
||||||
|
EpgPlus* epgPlus;
|
||||||
|
|
||||||
class MenuOptionChooserSwitchSwapMode : public CMenuOptionChooser
|
};
|
||||||
{
|
|
||||||
public:
|
|
||||||
MenuOptionChooserSwitchSwapMode ( EpgPlus* epgPlus);
|
|
||||||
|
|
||||||
virtual ~MenuOptionChooserSwitchSwapMode();
|
class MenuTargetAddRecordTimer : public CMenuTarget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MenuTargetAddRecordTimer(EpgPlus* epgPlus);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int exec
|
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||||
( CMenuTarget* parent);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int oldTimingMenuSettings;
|
EpgPlus* epgPlus;
|
||||||
TSwapMode oldSwapMode;
|
|
||||||
EpgPlus* epgPlus;
|
|
||||||
};
|
|
||||||
|
|
||||||
class MenuOptionChooserSwitchViewMode : public CMenuOptionChooser
|
};
|
||||||
{
|
|
||||||
public:
|
|
||||||
MenuOptionChooserSwitchViewMode ( EpgPlus* epgPlus);
|
|
||||||
|
|
||||||
virtual ~MenuOptionChooserSwitchViewMode();
|
class MenuTargetRefreshEpg : public CMenuTarget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MenuTargetRefreshEpg(EpgPlus* epgPlus);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int exec ( CMenuTarget* parent);
|
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int oldTimingMenuSettings;
|
EpgPlus* epgPlus;
|
||||||
};
|
|
||||||
|
|
||||||
class MenuTargetSettings : public CMenuTarget
|
};
|
||||||
{
|
|
||||||
public:
|
|
||||||
MenuTargetSettings ( EpgPlus* epgPlus);
|
|
||||||
|
|
||||||
public:
|
class MenuOptionChooserSwitchSwapMode : public CMenuOptionChooser
|
||||||
int exec ( CMenuTarget* parent , const std::string& actionKey);
|
{
|
||||||
|
public:
|
||||||
|
MenuOptionChooserSwitchSwapMode(EpgPlus* epgPlus);
|
||||||
|
|
||||||
private:
|
virtual ~MenuOptionChooserSwitchSwapMode();
|
||||||
EpgPlus* epgPlus;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef time_t DurationSetting;
|
public:
|
||||||
|
int exec(CMenuTarget* parent);
|
||||||
|
|
||||||
/*
|
private:
|
||||||
struct Settings
|
EpgPlus* epgPlus;
|
||||||
{
|
int oldTimingMenuSettings;
|
||||||
Settings ( bool doInit = true);
|
TSwapMode oldSwapMode;
|
||||||
|
};
|
||||||
|
|
||||||
virtual ~Settings();
|
class MenuOptionChooserSwitchViewMode : public CMenuOptionChooser
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MenuOptionChooserSwitchViewMode(EpgPlus* epgPlus);
|
||||||
|
|
||||||
FontSetting* fontSettings;
|
virtual ~MenuOptionChooserSwitchViewMode();
|
||||||
SizeSetting* sizeSettings;
|
|
||||||
DurationSetting durationSetting;
|
|
||||||
};
|
|
||||||
typedef std::map<int, Font*> Fonts;
|
|
||||||
typedef std::map<int, int> Sizes;
|
|
||||||
static Font * fonts[NumberOfFontSettings];
|
|
||||||
static int sizes[NumberOfSizeSettings];
|
|
||||||
*/
|
|
||||||
|
|
||||||
friend class EpgPlus::MenuOptionChooserSwitchSwapMode;
|
public:
|
||||||
friend class EpgPlus::MenuOptionChooserSwitchViewMode;
|
int exec(CMenuTarget* parent);
|
||||||
friend class EpgPlus::ChannelEntry;
|
|
||||||
friend class EpgPlus::ChannelEventEntry;
|
|
||||||
|
|
||||||
//// construction / destruction
|
private:
|
||||||
public:
|
int oldTimingMenuSettings;
|
||||||
EpgPlus();
|
};
|
||||||
~EpgPlus();
|
|
||||||
|
|
||||||
//// methods
|
class MenuTargetSettings : public CMenuTarget
|
||||||
public:
|
{
|
||||||
void init();
|
public:
|
||||||
void free();
|
MenuTargetSettings(EpgPlus* epgPlus);
|
||||||
|
|
||||||
int exec ( CChannelList* channelList , int selectedChannelIndex , CBouquetList* bouquetList);
|
public:
|
||||||
|
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::string getTimeString ( const time_t& time , const std::string& format);
|
EpgPlus* epgPlus;
|
||||||
|
};
|
||||||
|
|
||||||
TCChannelEventEntries::const_iterator getSelectedEvent() const;
|
typedef time_t DurationSetting;
|
||||||
|
|
||||||
void createChannelEntries ( int selectedChannelEntryIndex);
|
/*
|
||||||
void paint();
|
struct Settings
|
||||||
void paintChannelEntry ( int position);
|
{
|
||||||
void hide();
|
Settings(bool doInit = true);
|
||||||
|
|
||||||
//// properties
|
|
||||||
private:
|
|
||||||
CFrameBuffer* frameBuffer;
|
|
||||||
|
|
||||||
TChannelEntries displayedChannelEntries;
|
|
||||||
|
|
||||||
Header* header;
|
virtual ~Settings();
|
||||||
TimeLine* timeLine;
|
|
||||||
|
|
||||||
CChannelList* channelList;
|
|
||||||
CBouquetList* bouquetList;
|
|
||||||
|
|
||||||
Footer* footer;
|
|
||||||
|
|
||||||
ChannelEntry* selectedChannelEntry;
|
|
||||||
time_t selectedTime;
|
|
||||||
|
|
||||||
int channelListStartIndex;
|
|
||||||
int maxNumberOfDisplayableEntries; // maximal number of displayable entrys
|
|
||||||
|
|
||||||
time_t startTime;
|
|
||||||
time_t firstStartTime;
|
|
||||||
static time_t duration;
|
|
||||||
|
|
||||||
int entryHeight;
|
|
||||||
|
|
||||||
TViewMode currentViewMode;
|
|
||||||
TSwapMode currentSwapMode;
|
|
||||||
|
|
||||||
int headerX;
|
|
||||||
int headerY;
|
|
||||||
int headerWidth;
|
|
||||||
|
|
||||||
int usableScreenWidth;
|
|
||||||
int usableScreenHeight;
|
|
||||||
int usableScreenX;
|
|
||||||
int usableScreenY;
|
|
||||||
|
|
||||||
int timeLineX;
|
|
||||||
int timeLineY;
|
|
||||||
int timeLineWidth;
|
|
||||||
|
|
||||||
int channelsTableX;
|
|
||||||
int channelsTableY;
|
|
||||||
static int channelsTableWidth;
|
|
||||||
int channelsTableHeight;
|
|
||||||
|
|
||||||
int eventsTableX;
|
|
||||||
int eventsTableY;
|
|
||||||
int eventsTableWidth;
|
|
||||||
int eventsTableHeight;
|
|
||||||
|
|
||||||
int sliderX;
|
|
||||||
int sliderY;
|
|
||||||
static int sliderWidth;
|
|
||||||
int sliderHeight;
|
|
||||||
static int sliderBackColor;
|
|
||||||
static int sliderKnobColor;
|
|
||||||
|
|
||||||
int footerX;
|
|
||||||
int footerY;
|
|
||||||
int footerWidth;
|
|
||||||
|
|
||||||
int horGap1X;
|
|
||||||
int horGap1Y;
|
|
||||||
int horGap1Width;
|
|
||||||
int horGap2X;
|
|
||||||
int horGap2Y;
|
|
||||||
int horGap2Width;
|
|
||||||
int verGap1X;
|
|
||||||
int verGap1Y;
|
|
||||||
int verGap1Height;
|
|
||||||
int verGap2X;
|
|
||||||
int verGap2Y;
|
|
||||||
int verGap2Height;
|
|
||||||
|
|
||||||
static int horGap1Height;
|
|
||||||
static int horGap2Height;
|
|
||||||
static int verGap1Width;
|
|
||||||
static int verGap2Width;
|
|
||||||
|
|
||||||
static int horGap1Color;
|
|
||||||
static int horGap2Color;
|
|
||||||
static int verGap1Color;
|
|
||||||
static int verGap2Color;
|
|
||||||
|
|
||||||
bool refreshAll;
|
FontSetting* fontSettings;
|
||||||
bool refreshFooterButtons;
|
SizeSetting* sizeSettings;
|
||||||
|
DurationSetting durationSetting;
|
||||||
|
};
|
||||||
|
typedef std::map<int, Font*> Fonts;
|
||||||
|
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;
|
||||||
|
|
||||||
|
//// construction / destruction
|
||||||
|
public:
|
||||||
|
EpgPlus();
|
||||||
|
~EpgPlus();
|
||||||
|
|
||||||
|
//// methods
|
||||||
|
public:
|
||||||
|
void init();
|
||||||
|
void free();
|
||||||
|
|
||||||
|
int exec(CChannelList* channelList, int selectedChannelIndex, CBouquetList* bouquetList);
|
||||||
|
|
||||||
|
private:
|
||||||
|
static std::string getTimeString(const time_t& time, const std::string& format);
|
||||||
|
|
||||||
|
TCChannelEventEntries::const_iterator getSelectedEvent() const;
|
||||||
|
|
||||||
|
void createChannelEntries(int selectedChannelEntryIndex);
|
||||||
|
void paint();
|
||||||
|
void paintChannelEntry(int position);
|
||||||
|
void hide();
|
||||||
|
|
||||||
|
//// properties
|
||||||
|
private:
|
||||||
|
CFrameBuffer* frameBuffer;
|
||||||
|
|
||||||
|
TChannelEntries displayedChannelEntries;
|
||||||
|
|
||||||
|
Header* header;
|
||||||
|
TimeLine* timeLine;
|
||||||
|
|
||||||
|
CChannelList* channelList;
|
||||||
|
CBouquetList* bouquetList;
|
||||||
|
|
||||||
|
Footer* footer;
|
||||||
|
|
||||||
|
ChannelEntry* selectedChannelEntry;
|
||||||
|
time_t selectedTime;
|
||||||
|
|
||||||
|
int channelListStartIndex;
|
||||||
|
int maxNumberOfDisplayableEntries; // maximal number of displayable entrys
|
||||||
|
|
||||||
|
time_t startTime;
|
||||||
|
time_t firstStartTime;
|
||||||
|
static time_t duration;
|
||||||
|
|
||||||
|
int entryHeight;
|
||||||
|
|
||||||
|
TViewMode currentViewMode;
|
||||||
|
TSwapMode currentSwapMode;
|
||||||
|
|
||||||
|
int headerX;
|
||||||
|
int headerY;
|
||||||
|
int headerWidth;
|
||||||
|
|
||||||
|
int usableScreenWidth;
|
||||||
|
int usableScreenHeight;
|
||||||
|
int usableScreenX;
|
||||||
|
int usableScreenY;
|
||||||
|
|
||||||
|
int timeLineX;
|
||||||
|
int timeLineY;
|
||||||
|
int timeLineWidth;
|
||||||
|
|
||||||
|
int channelsTableX;
|
||||||
|
int channelsTableY;
|
||||||
|
static int channelsTableWidth;
|
||||||
|
int channelsTableHeight;
|
||||||
|
|
||||||
|
int eventsTableX;
|
||||||
|
int eventsTableY;
|
||||||
|
int eventsTableWidth;
|
||||||
|
int eventsTableHeight;
|
||||||
|
|
||||||
|
int sliderX;
|
||||||
|
int sliderY;
|
||||||
|
static int sliderWidth;
|
||||||
|
int sliderHeight;
|
||||||
|
static int sliderBackColor;
|
||||||
|
static int sliderKnobColor;
|
||||||
|
|
||||||
|
int footerX;
|
||||||
|
int footerY;
|
||||||
|
int footerWidth;
|
||||||
|
|
||||||
|
int horGap1X;
|
||||||
|
int horGap1Y;
|
||||||
|
int horGap1Width;
|
||||||
|
int horGap2X;
|
||||||
|
int horGap2Y;
|
||||||
|
int horGap2Width;
|
||||||
|
int verGap1X;
|
||||||
|
int verGap1Y;
|
||||||
|
int verGap1Height;
|
||||||
|
int verGap2X;
|
||||||
|
int verGap2Y;
|
||||||
|
int verGap2Height;
|
||||||
|
|
||||||
|
static int horGap1Height;
|
||||||
|
static int horGap2Height;
|
||||||
|
static int verGap1Width;
|
||||||
|
static int verGap2Width;
|
||||||
|
|
||||||
|
static int horGap1Color;
|
||||||
|
static int horGap2Color;
|
||||||
|
static int verGap1Color;
|
||||||
|
static int verGap2Color;
|
||||||
|
|
||||||
|
bool refreshAll;
|
||||||
|
bool refreshFooterButtons;
|
||||||
};
|
};
|
||||||
|
|
||||||
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
|
#endif // __epgplus__
|
||||||
|
Reference in New Issue
Block a user