diff options
author | louis <louis.braun@gmx.de> | 2014-04-25 15:24:41 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-04-25 15:24:41 +0200 |
commit | 5152d70ebc7470c3d05b75cf150244c324681a0f (patch) | |
tree | 5552dd2ce8abbc04b57394b34eb7f4de70b230a3 /menudetailview.h | |
parent | 7662bb8fc56330023da796cfa7ba8e6d738b5915 (diff) | |
download | skin-nopacity-1.1.2.tar.gz skin-nopacity-1.1.2.tar.bz2 |
Version 1.1.2: Restructured detailed EPG and recordings view1.1.2
Diffstat (limited to 'menudetailview.h')
-rw-r--r-- | menudetailview.h | 142 |
1 files changed, 31 insertions, 111 deletions
diff --git a/menudetailview.h b/menudetailview.h index d3dd038..197a0a1 100644 --- a/menudetailview.h +++ b/menudetailview.h @@ -6,128 +6,48 @@ #include <vector> #include <string> +#include <sstream> #include "services/scraper2vdr.h" #include "services/tvscraper.h" +#include "services/epgsearch.h" #include "imagecache.h" +#include "config.h" +#include "detailview.h" -class cNopacityMenuDetailView : public cThread { +enum eDetailViewType { + dvEvent = 0, + dvRecording, + dvText +}; + +class cNopacityDetailView : public cThread { protected: + eDetailViewType type; cOsd *osd; cImageCache *imgCache; - bool hasScrollbar; - int x, width, height, top; + const cEvent *ev; + const cRecording *rec; + const char *text; + cNopacityView *view; + cPixmap *scrollBar; + cPixmap *scrollBarBack; + int x, width, height, top, border; int headerHeight; - int contentWidth; - int contentX; - int contentHeight; - int contentDrawPortHeight; - int widthPoster; - int border; - int yBanner; - int yEPGText; - int yActors; - int yScrapInfo; - int yFanart; - int yAddInf; - int yEPGPics; - int actorThumbWidth; - int actorThumbHeight; - cFont *font, *fontSmall, *fontHeader, *fontHeaderLarge; - cPixmap *pixmapHeader; - cPixmap *pixmapLogo; - cPixmap *pixmapContent; - cPixmap *pixmapPoster; - bool hasManualPoster; - cString manualPosterPath; - cMovie movie; - cSeries series; - bool isMovie; - bool isSeries; - cTextWrapper scrapInfo; - TVScraperGetFullInformation mediaInfo; - bool hasAdditionalMedia; - void DrawTextWrapper(cTextWrapper *wrapper, int top); - int HeightActorPics(void); - int HeightScraperInfo(void); - int HeightFanart(void); - void DrawPoster(void); - void DrawBanner(int height); - void DrawAdditionalBanners(int top, int bottom); - void DrawActors(int height); - void DrawFanart(int height); - virtual void Action(void) {}; -public: - cNopacityMenuDetailView(cOsd *osd, cImageCache *imgCache); - virtual ~cNopacityMenuDetailView(void); - void SetGeometry(int x, int width, int height, int top, int contentBorder, int headerHeight); - virtual void SetFonts(void) = 0; - bool Scrollable(void) {return hasScrollbar;} - double ScrollbarSize(void); - double Offset(void); - bool Scroll(bool Up, bool Page); - virtual void SetContent(void) = 0; - virtual void SetContentHeight(void) = 0; - virtual void CreatePixmaps(void) = 0; - virtual void Render(void) = 0; -}; - -class cNopacityMenuDetailEventView : public cNopacityMenuDetailView { -private: - const cEvent *event; - cTextWrapper epgText; - cTextWrapper reruns; - int numEPGPics; - void DrawHeader(void); - void LoadReruns(void); - int HeightEPGPics(void); - void DrawEPGPictures(int height); - void Action(void); -public: - cNopacityMenuDetailEventView(cOsd *osd, cImageCache *imgCache, const cEvent *Event); - virtual ~cNopacityMenuDetailEventView(void); - void SetContent(void); - void SetContentHeight(void); - void CreatePixmaps(void); - void SetFonts(void); - void Render(void); -}; - -class cNopacityMenuDetailRecordingView : public cNopacityMenuDetailView { -private: - const cRecording *recording; - const cRecordingInfo *info; - cTextWrapper recInfo; - cTextWrapper additionalInfo; - void DrawHeader(void); - void LoadRecordingInformation(void); + void InitiateViewType(void); + std::string LoadReruns(void); + std::string LoadRecordingInformation(void); std::string StripXmlTag(std::string &Line, const char *Tag); int ReadSizeVdr(const char *strPath); - std::vector<std::string> epgpics; - bool LoadEPGPics(void); - int HeightEPGPics(void); - void DrawEPGPictures(int height); - void Action(void); + virtual void Action(void); public: - cNopacityMenuDetailRecordingView(cOsd *osd, const cRecording *Recording); - virtual ~cNopacityMenuDetailRecordingView(void); - void SetContent(void); - void SetContentHeight(void); - void CreatePixmaps(void); - void SetFonts(void); - void Render(void); + cNopacityDetailView(eDetailViewType detailViewType, cOsd *osd, cImageCache *imgCache); + virtual ~cNopacityDetailView(void); + void SetGeometry(int x, int width, int height, int top, int contentBorder, int headerHeight); + void SetEvent(const cEvent *e) { ev = e; }; + void SetRecording(const cRecording *r) { rec = r; }; + void SetText(const char *t) { text = t; }; + void SetScrollBar(cPixmap *s, cPixmap *sBack) { scrollBar = s; scrollBarBack = sBack; }; + void KeyInput(bool Up, bool Page); }; -class cNopacityMenuDetailTextView : public cNopacityMenuDetailView { -private: - const char *text; - cTextWrapper content; -public: - cNopacityMenuDetailTextView(cOsd *osd, const char *text); - virtual ~cNopacityMenuDetailTextView(void); - void SetContent(void); - void SetContentHeight(void); - void CreatePixmaps(void); - void SetFonts(void); - void Render(void); -}; #endif //__NOPACITY_MENUDETAILVIEW_H
\ No newline at end of file |