mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 02:11:04 +02:00
Merge branch 'master' into pu/fb-setmode
Origin commit data
------------------
Branch: ni/coolstream
Commit: f0ae55707a
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-04-08 (Sat, 08 Apr 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -729,6 +729,7 @@ fontsize.epg_date EPG Datum
|
||||
fontsize.epg_info1 EPG Info 1
|
||||
fontsize.epg_info2 EPG Info 2
|
||||
fontsize.epg_title EPG Titel
|
||||
fontsize.epgplus_item EPG-Plus Listeneintrag
|
||||
fontsize.eventlist_datetime Datum/Zeit
|
||||
fontsize.eventlist_event Event Info
|
||||
fontsize.eventlist_itemlarge Groß
|
||||
|
@@ -729,6 +729,7 @@ fontsize.epg_date EPG Date
|
||||
fontsize.epg_info1 EPG Info 1
|
||||
fontsize.epg_info2 EPG Info 2
|
||||
fontsize.epg_title EPG Title
|
||||
fontsize.epgplus_item EPG-Plus item
|
||||
fontsize.eventlist_datetime Date and time
|
||||
fontsize.eventlist_event Event Info
|
||||
fontsize.eventlist_itemlarge Large
|
||||
|
1098
src/gui/epgplus.cpp
1098
src/gui/epgplus.cpp
File diff suppressed because it is too large
Load Diff
@@ -1,38 +1,31 @@
|
||||
/*
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Copyright (C) 2004 Martin Griep 'vivamiga'
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
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
|
||||
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.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
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.
|
||||
|
||||
License: GPL
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
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.
|
||||
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__
|
||||
#define __epgplus__
|
||||
|
||||
#ifndef __EPGPLUS_HPP__
|
||||
#define __EPGPLUS_HPP__
|
||||
|
||||
#include <gui/components/cc.h>
|
||||
#include "widget/menue.h"
|
||||
|
||||
#include <string>
|
||||
@@ -45,506 +38,440 @@ struct button_label;
|
||||
|
||||
class EpgPlus
|
||||
{
|
||||
//// types, inner classes
|
||||
public:
|
||||
enum FontSettingID
|
||||
{
|
||||
EPGPlus_header_font = 0,
|
||||
EPGPlus_timeline_fonttime,
|
||||
EPGPlus_timeline_fontdate,
|
||||
EPGPlus_channelentry_font,
|
||||
EPGPlus_channelevententry_font,
|
||||
EPGPlus_footer_fontbouquetchannelname,
|
||||
EPGPlus_footer_fonteventdescription,
|
||||
EPGPlus_footer_fonteventshortdescription,
|
||||
EPGPlus_footer_fontbuttons,
|
||||
NumberOfFontSettings
|
||||
};
|
||||
|
||||
enum SizeSettingID
|
||||
{
|
||||
EPGPlus_channelentry_width = 0,
|
||||
EPGPlus_channelentry_separationlineheight,
|
||||
EPGPlus_slider_width,
|
||||
EPGPlus_horgap1_height,
|
||||
EPGPlus_horgap2_height,
|
||||
EPGPlus_vergap1_width,
|
||||
EPGPlus_vergap2_width,
|
||||
NumberOfSizeSettings
|
||||
};
|
||||
|
||||
struct FontSetting
|
||||
{
|
||||
FontSettingID settingID;
|
||||
const char* style;
|
||||
int size;
|
||||
};
|
||||
|
||||
struct SizeSetting
|
||||
{
|
||||
SizeSettingID settingID;
|
||||
int size;
|
||||
};
|
||||
|
||||
|
||||
enum TViewMode
|
||||
{
|
||||
ViewMode_Stretch,
|
||||
ViewMode_Scroll
|
||||
};
|
||||
|
||||
enum TSwapMode
|
||||
{
|
||||
SwapMode_ByPage,
|
||||
SwapMode_ByBouquet
|
||||
};
|
||||
|
||||
class Footer;
|
||||
|
||||
class Header
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
Header ( CFrameBuffer* frameBuffer , int x , int y , int width);
|
||||
|
||||
~Header();
|
||||
|
||||
//// methods
|
||||
public:
|
||||
static void init();
|
||||
|
||||
void paint(const char * Name = NULL);
|
||||
|
||||
static int getUsedHeight();
|
||||
|
||||
//// attributes
|
||||
public:
|
||||
CFrameBuffer* frameBuffer;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
|
||||
static Font* font;
|
||||
};
|
||||
|
||||
|
||||
class TimeLine
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
TimeLine ( CFrameBuffer* frameBuffer , int x , int y , int width , int startX , int durationX);
|
||||
|
||||
~TimeLine();
|
||||
|
||||
//// methods
|
||||
public:
|
||||
static void init();
|
||||
|
||||
void paint ( time_t startTime , int duration);
|
||||
|
||||
void paintMark ( time_t startTime , int duration , int x , int width);
|
||||
|
||||
void paintGrid();
|
||||
|
||||
void clearMark();
|
||||
|
||||
static int getUsedHeight();
|
||||
|
||||
//// attributes
|
||||
public:
|
||||
CFrameBuffer* frameBuffer;
|
||||
|
||||
int currentDuration;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
|
||||
static Font* fontTime;
|
||||
static Font* fontDate;
|
||||
|
||||
int startX;
|
||||
int durationX;
|
||||
};
|
||||
//// types, inner classes
|
||||
public:
|
||||
enum SizeSettingID
|
||||
{
|
||||
EPGPlus_channelentry_width = 0,
|
||||
EPGPlus_separationline_thickness,
|
||||
NumberOfSizeSettings
|
||||
};
|
||||
|
||||
class ChannelEventEntry
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
ChannelEventEntry
|
||||
( const CChannelEvent* channelEvent
|
||||
, CFrameBuffer* frameBuffer
|
||||
, TimeLine* timeLine
|
||||
, Footer* footer
|
||||
, int x
|
||||
, int y
|
||||
, int width
|
||||
);
|
||||
struct SizeSetting
|
||||
{
|
||||
SizeSettingID settingID;
|
||||
int size;
|
||||
};
|
||||
|
||||
enum TViewMode
|
||||
{
|
||||
ViewMode_Stretch,
|
||||
ViewMode_Scroll
|
||||
};
|
||||
|
||||
enum TSwapMode
|
||||
{
|
||||
SwapMode_ByPage,
|
||||
SwapMode_ByBouquet
|
||||
};
|
||||
|
||||
~ChannelEventEntry();
|
||||
class Footer;
|
||||
|
||||
//// methods
|
||||
public:
|
||||
static void init();
|
||||
class Header
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
Header(CFrameBuffer* frameBuffer,
|
||||
int x,
|
||||
int y,
|
||||
int width);
|
||||
|
||||
bool isSelected
|
||||
( time_t selectedTime
|
||||
) const;
|
||||
~Header();
|
||||
|
||||
void paint
|
||||
( bool isSelected
|
||||
, bool toggleColor
|
||||
);
|
||||
//// methods
|
||||
public:
|
||||
static void init();
|
||||
|
||||
static int getUsedHeight();
|
||||
void paint(const char * Name = NULL);
|
||||
|
||||
//// attributes
|
||||
public:
|
||||
CChannelEvent channelEvent;
|
||||
static int getUsedHeight();
|
||||
|
||||
CFrameBuffer* frameBuffer;
|
||||
TimeLine* timeLine;
|
||||
Footer* footer;
|
||||
//// attributes
|
||||
public:
|
||||
CFrameBuffer* frameBuffer;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
static int separationLineHeight;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
|
||||
static Font* font;
|
||||
};
|
||||
|
||||
static Font* font;
|
||||
};
|
||||
|
||||
typedef std::vector<ChannelEventEntry*> TCChannelEventEntries;
|
||||
class TimeLine
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
TimeLine(CFrameBuffer* frameBuffer,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int startX,
|
||||
int durationX);
|
||||
|
||||
~TimeLine();
|
||||
|
||||
class ChannelEntry
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
ChannelEntry
|
||||
( const CZapitChannel* channel
|
||||
, int index
|
||||
, CFrameBuffer* frameBuffer
|
||||
, Footer* footer
|
||||
, CBouquetList* bouquetList
|
||||
, int x
|
||||
, int y
|
||||
, int width
|
||||
);
|
||||
//// methods
|
||||
public:
|
||||
static void init();
|
||||
|
||||
~ChannelEntry();
|
||||
void paint(time_t startTime, int duration);
|
||||
|
||||
//// methods
|
||||
public:
|
||||
static void init();
|
||||
void paintMark(time_t startTime, int duration, int x, int width);
|
||||
|
||||
void paint
|
||||
( bool isSelected
|
||||
, time_t selectedTime
|
||||
);
|
||||
void paintGrid();
|
||||
|
||||
static int getUsedHeight();
|
||||
void clearMark();
|
||||
|
||||
//// attributes
|
||||
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
|
||||
);
|
||||
static int getUsedHeight();
|
||||
|
||||
~Footer();
|
||||
//// attributes
|
||||
public:
|
||||
CFrameBuffer* frameBuffer;
|
||||
|
||||
//// methods
|
||||
public:
|
||||
static void init();
|
||||
int currentDuration;
|
||||
|
||||
void setBouquetChannelName
|
||||
( const std::string& newBouquetName
|
||||
, const std::string& newChannelName
|
||||
);
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
static int separationLineThickness;
|
||||
|
||||
void paintEventDetails
|
||||
( const std::string& description
|
||||
, const std::string& shortDescription
|
||||
);
|
||||
static Font* font;
|
||||
|
||||
int startX;
|
||||
int durationX;
|
||||
};
|
||||
|
||||
void paintButtons
|
||||
( button_label* buttonLabels
|
||||
, int numberOfButtons
|
||||
);
|
||||
class ChannelEventEntry
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
ChannelEventEntry(const CChannelEvent* channelEvent,
|
||||
CFrameBuffer* frameBuffer,
|
||||
TimeLine* timeLine,
|
||||
Footer* footer,
|
||||
int x,
|
||||
int y,
|
||||
int width);
|
||||
|
||||
static int getUsedHeight();
|
||||
~ChannelEventEntry();
|
||||
|
||||
//// attributes
|
||||
public:
|
||||
CFrameBuffer* frameBuffer;
|
||||
//// methods
|
||||
public:
|
||||
static void init();
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int buttonHeight;
|
||||
bool isSelected(time_t selectedTime) const;
|
||||
|
||||
static Font* fontBouquetChannelName;
|
||||
static Font* fontEventDescription;
|
||||
static Font* fontEventShortDescription;
|
||||
static Font* fontButtons;
|
||||
void paint(bool isSelected, bool toggleColor);
|
||||
|
||||
static int color;
|
||||
static int getUsedHeight();
|
||||
|
||||
std::string currentBouquetName;
|
||||
std::string currentChannelName;
|
||||
};
|
||||
//// attributes
|
||||
public:
|
||||
CChannelEvent channelEvent;
|
||||
|
||||
CFrameBuffer* frameBuffer;
|
||||
TimeLine* timeLine;
|
||||
Footer* footer;
|
||||
|
||||
class MenuTargetAddReminder : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetAddReminder ( EpgPlus* epgPlus);
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
static int separationLineThickness;
|
||||
|
||||
public:
|
||||
int exec ( CMenuTarget* parent , const std::string& actionKey);
|
||||
static Font* font;
|
||||
};
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
typedef std::vector<ChannelEventEntry*> TCChannelEventEntries;
|
||||
|
||||
};
|
||||
class ChannelEntry
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
ChannelEntry(const CZapitChannel* channel,
|
||||
int index,
|
||||
CFrameBuffer* frameBuffer,
|
||||
Footer* footer,
|
||||
CBouquetList* bouquetList,
|
||||
int x,
|
||||
int y,
|
||||
int width);
|
||||
|
||||
class MenuTargetAddRecordTimer : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetAddRecordTimer ( EpgPlus* epgPlus);
|
||||
~ChannelEntry();
|
||||
|
||||
public:
|
||||
int exec ( CMenuTarget* parent , const std::string& actionKey);
|
||||
//// methods
|
||||
public:
|
||||
static void init();
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
void paint(bool isSelected, time_t selectedTime);
|
||||
|
||||
};
|
||||
static int getUsedHeight();
|
||||
|
||||
class MenuTargetRefreshEpg : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetRefreshEpg ( EpgPlus* epgPlus);
|
||||
//// attributes
|
||||
public:
|
||||
const CZapitChannel * channel;
|
||||
std::string displayName;
|
||||
int index;
|
||||
|
||||
public:
|
||||
int exec ( CMenuTarget* parent , const std::string& actionKey);
|
||||
CFrameBuffer* frameBuffer;
|
||||
Footer* footer;
|
||||
CBouquetList* bouquetList;
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
static int separationLineThickness;
|
||||
|
||||
};
|
||||
static Font* font;
|
||||
|
||||
class MenuOptionChooserSwitchSwapMode : public CMenuOptionChooser
|
||||
{
|
||||
public:
|
||||
MenuOptionChooserSwitchSwapMode ( EpgPlus* epgPlus);
|
||||
TCChannelEventEntries channelEventEntries;
|
||||
CComponentsDetailsLine *detailsLine;
|
||||
};
|
||||
|
||||
virtual ~MenuOptionChooserSwitchSwapMode();
|
||||
typedef std::vector<ChannelEntry*> TChannelEntries;
|
||||
|
||||
public:
|
||||
int exec
|
||||
( CMenuTarget* parent);
|
||||
class Footer
|
||||
{
|
||||
//// construction / destruction
|
||||
public:
|
||||
Footer(CFrameBuffer* frameBuffer,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
private:
|
||||
int oldTimingMenuSettings;
|
||||
TSwapMode oldSwapMode;
|
||||
EpgPlus* epgPlus;
|
||||
};
|
||||
~Footer();
|
||||
|
||||
class MenuOptionChooserSwitchViewMode : public CMenuOptionChooser
|
||||
{
|
||||
public:
|
||||
MenuOptionChooserSwitchViewMode ( EpgPlus* epgPlus);
|
||||
//// methods
|
||||
public:
|
||||
static void init();
|
||||
|
||||
virtual ~MenuOptionChooserSwitchViewMode();
|
||||
void setBouquetChannelName(const std::string& newBouquetName, const std::string& newChannelName);
|
||||
|
||||
public:
|
||||
int exec ( CMenuTarget* parent);
|
||||
void paintEventDetails(const std::string& description, const std::string& shortDescription);
|
||||
|
||||
private:
|
||||
int oldTimingMenuSettings;
|
||||
};
|
||||
void paintButtons(button_label* buttonLabels, int numberOfButtons);
|
||||
|
||||
class MenuTargetSettings : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetSettings ( EpgPlus* epgPlus);
|
||||
static int getUsedHeight();
|
||||
|
||||
public:
|
||||
int exec ( CMenuTarget* parent , const std::string& actionKey);
|
||||
//// attributes
|
||||
public:
|
||||
CFrameBuffer* frameBuffer;
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
};
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
|
||||
typedef time_t DurationSetting;
|
||||
int buttonY;
|
||||
int buttonHeight;
|
||||
|
||||
/*
|
||||
struct Settings
|
||||
{
|
||||
Settings ( bool doInit = true);
|
||||
static Font* fontBouquetChannelName;
|
||||
static Font* fontEventDescription;
|
||||
static Font* fontEventInfo1;
|
||||
|
||||
virtual ~Settings();
|
||||
std::string currentBouquetName;
|
||||
std::string currentChannelName;
|
||||
};
|
||||
|
||||
FontSetting* fontSettings;
|
||||
SizeSetting* sizeSettings;
|
||||
DurationSetting durationSetting;
|
||||
};
|
||||
typedef std::map<int, Font*> Fonts;
|
||||
typedef std::map<int, int> Sizes;
|
||||
static Font * fonts[NumberOfFontSettings];
|
||||
static int sizes[NumberOfSizeSettings];
|
||||
*/
|
||||
class MenuTargetAddReminder : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetAddReminder(EpgPlus* epgPlus);
|
||||
|
||||
friend class EpgPlus::MenuOptionChooserSwitchSwapMode;
|
||||
friend class EpgPlus::MenuOptionChooserSwitchViewMode;
|
||||
friend class EpgPlus::ChannelEntry;
|
||||
friend class EpgPlus::ChannelEventEntry;
|
||||
public:
|
||||
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||
|
||||
//// construction / destruction
|
||||
public:
|
||||
EpgPlus();
|
||||
~EpgPlus();
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
|
||||
//// methods
|
||||
public:
|
||||
void init();
|
||||
void free();
|
||||
};
|
||||
|
||||
int exec ( CChannelList* channelList , int selectedChannelIndex , CBouquetList* bouquetList);
|
||||
class MenuTargetAddRecordTimer : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetAddRecordTimer(EpgPlus* epgPlus);
|
||||
|
||||
private:
|
||||
static std::string getTimeString ( const time_t& time , const std::string& format);
|
||||
public:
|
||||
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||
|
||||
TCChannelEventEntries::const_iterator getSelectedEvent() const;
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
|
||||
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;
|
||||
class MenuTargetRefreshEpg : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetRefreshEpg(EpgPlus* epgPlus);
|
||||
|
||||
bool refreshAll;
|
||||
bool refreshFooterButtons;
|
||||
public:
|
||||
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
|
||||
};
|
||||
|
||||
class MenuOptionChooserSwitchSwapMode : public CMenuOptionChooser
|
||||
{
|
||||
public:
|
||||
MenuOptionChooserSwitchSwapMode(EpgPlus* epgPlus);
|
||||
|
||||
virtual ~MenuOptionChooserSwitchSwapMode();
|
||||
|
||||
public:
|
||||
int exec(CMenuTarget* parent);
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
int oldTimingMenuSettings;
|
||||
TSwapMode oldSwapMode;
|
||||
};
|
||||
|
||||
class MenuOptionChooserSwitchViewMode : public CMenuOptionChooser
|
||||
{
|
||||
public:
|
||||
MenuOptionChooserSwitchViewMode(EpgPlus* epgPlus);
|
||||
|
||||
virtual ~MenuOptionChooserSwitchViewMode();
|
||||
|
||||
public:
|
||||
int exec(CMenuTarget* parent);
|
||||
|
||||
private:
|
||||
int oldTimingMenuSettings;
|
||||
};
|
||||
|
||||
class MenuTargetSettings : public CMenuTarget
|
||||
{
|
||||
public:
|
||||
MenuTargetSettings(EpgPlus* epgPlus);
|
||||
|
||||
public:
|
||||
int exec(CMenuTarget* parent, const std::string& actionKey);
|
||||
|
||||
private:
|
||||
EpgPlus* epgPlus;
|
||||
};
|
||||
|
||||
typedef time_t DurationSetting;
|
||||
|
||||
/*
|
||||
struct Settings
|
||||
{
|
||||
Settings(bool doInit = true);
|
||||
|
||||
virtual ~Settings();
|
||||
|
||||
FontSetting* fontSettings;
|
||||
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;
|
||||
static int entryFontSize;
|
||||
|
||||
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 bodyHeight;
|
||||
|
||||
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;
|
||||
|
||||
int footerX;
|
||||
int footerY;
|
||||
int footerWidth;
|
||||
|
||||
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
|
||||
#endif // __epgplus__
|
||||
|
@@ -692,8 +692,8 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
if (doLoop)
|
||||
{
|
||||
if (!bigFonts && g_settings.bigFonts) {
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
|
||||
}
|
||||
bigFonts = g_settings.bigFonts;
|
||||
start();
|
||||
@@ -1066,8 +1066,8 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
} else
|
||||
doRecord = false;
|
||||
if (!bigFonts && g_settings.bigFonts) {
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
|
||||
}
|
||||
bigFonts = g_settings.bigFonts;
|
||||
show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false);
|
||||
@@ -1082,8 +1082,8 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
hide();
|
||||
recDirs.exec(NULL,"");
|
||||
if (!bigFonts && g_settings.bigFonts) {
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
|
||||
}
|
||||
bigFonts = g_settings.bigFonts;
|
||||
show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false);
|
||||
@@ -1225,8 +1225,8 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
loop = false;
|
||||
else {
|
||||
if (!bigFonts && g_settings.bigFonts) {
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
|
||||
}
|
||||
bigFonts = g_settings.bigFonts;
|
||||
show(channel_id,tmp_eID,&tmp_sZeit,false);
|
||||
@@ -1244,12 +1244,12 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
//printf("bigFonts %d\n", bigFonts);
|
||||
if (bigFonts)
|
||||
{
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
|
||||
} else
|
||||
{
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() / BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() / BIGFONT_FACTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIGFONT_FACTOR));
|
||||
}
|
||||
g_settings.bigFonts = bigFonts;
|
||||
if (mp_info)
|
||||
@@ -1310,8 +1310,8 @@ void CEpgData::hide()
|
||||
// 2004-09-10 rasc (bugfix, scale large font settings back to normal)
|
||||
if (bigFonts) {
|
||||
bigFonts = false;
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() / BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIG_FONT_FAKTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() / BIGFONT_FACTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIGFONT_FACTOR));
|
||||
}
|
||||
|
||||
frameBuffer->paintBackgroundBoxRel(sx, sy, ox, oy);
|
||||
|
@@ -42,9 +42,6 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
|
||||
#define BIG_FONT_FAKTOR 1.5
|
||||
|
||||
class CFrameBuffer;
|
||||
class CEpgData
|
||||
{
|
||||
|
@@ -138,7 +138,8 @@ const SNeutrinoSettings::FONT_TYPES epg_font_sizes[] =
|
||||
SNeutrinoSettings::FONT_TYPE_EPG_TITLE,
|
||||
SNeutrinoSettings::FONT_TYPE_EPG_INFO1,
|
||||
SNeutrinoSettings::FONT_TYPE_EPG_INFO2,
|
||||
SNeutrinoSettings::FONT_TYPE_EPG_DATE
|
||||
SNeutrinoSettings::FONT_TYPE_EPG_DATE,
|
||||
SNeutrinoSettings::FONT_TYPE_EPGPLUS_ITEM
|
||||
};
|
||||
size_t epg_font_items = sizeof(epg_font_sizes)/sizeof(epg_font_sizes[0]);
|
||||
|
||||
@@ -198,6 +199,7 @@ font_sizes_struct neutrino_font[SNeutrinoSettings::FONT_TYPE_COUNT] =
|
||||
{LOCALE_FONTSIZE_EPG_INFO1 , 17, CNeutrinoFonts::FONT_STYLE_ITALIC , 2},
|
||||
{LOCALE_FONTSIZE_EPG_INFO2 , 17, CNeutrinoFonts::FONT_STYLE_REGULAR, 2},
|
||||
{LOCALE_FONTSIZE_EPG_DATE , 15, CNeutrinoFonts::FONT_STYLE_REGULAR, 2},
|
||||
{LOCALE_FONTSIZE_EPGPLUS_ITEM , 18, CNeutrinoFonts::FONT_STYLE_REGULAR, 2},
|
||||
{LOCALE_FONTSIZE_EVENTLIST_TITLE , 30, CNeutrinoFonts::FONT_STYLE_REGULAR, 0},
|
||||
{LOCALE_FONTSIZE_EVENTLIST_ITEMLARGE, 20, CNeutrinoFonts::FONT_STYLE_BOLD , 1},
|
||||
{LOCALE_FONTSIZE_EVENTLIST_ITEMSMALL, 14, CNeutrinoFonts::FONT_STYLE_REGULAR, 1},
|
||||
|
@@ -756,6 +756,7 @@ typedef enum
|
||||
LOCALE_FONTSIZE_EPG_INFO1,
|
||||
LOCALE_FONTSIZE_EPG_INFO2,
|
||||
LOCALE_FONTSIZE_EPG_TITLE,
|
||||
LOCALE_FONTSIZE_EPGPLUS_ITEM,
|
||||
LOCALE_FONTSIZE_EVENTLIST_DATETIME,
|
||||
LOCALE_FONTSIZE_EVENTLIST_EVENT,
|
||||
LOCALE_FONTSIZE_EVENTLIST_ITEMLARGE,
|
||||
|
@@ -756,6 +756,7 @@ const char * locale_real_names[] =
|
||||
"fontsize.epg_info1",
|
||||
"fontsize.epg_info2",
|
||||
"fontsize.epg_title",
|
||||
"fontsize.epgplus_item",
|
||||
"fontsize.eventlist_datetime",
|
||||
"fontsize.eventlist_event",
|
||||
"fontsize.eventlist_itemlarge",
|
||||
|
@@ -674,6 +674,7 @@ struct SNeutrinoSettings
|
||||
FONT_TYPE_EPG_INFO1,
|
||||
FONT_TYPE_EPG_INFO2,
|
||||
FONT_TYPE_EPG_DATE,
|
||||
FONT_TYPE_EPGPLUS_ITEM,
|
||||
FONT_TYPE_EVENTLIST_TITLE,
|
||||
FONT_TYPE_EVENTLIST_ITEMLARGE,
|
||||
FONT_TYPE_EVENTLIST_ITEMSMALL,
|
||||
@@ -932,6 +933,8 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO
|
||||
|
||||
#define DETAILSLINE_WIDTH CFrameBuffer::getInstance()->scale2Res(16)
|
||||
|
||||
#define BIGFONT_FACTOR 1.5
|
||||
|
||||
struct SglobalInfo
|
||||
{
|
||||
hw_caps_t *hw_caps;
|
||||
|
Reference in New Issue
Block a user