mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
changed build system
This commit is contained in:
parent
9eabdcd209
commit
8aa2c81d31
4
HISTORY
4
HISTORY
@ -65,3 +65,7 @@ VDR Plugin 'tvguide' Revision History
|
|||||||
2013-07-23: Version 1.0.0
|
2013-07-23: Version 1.0.0
|
||||||
|
|
||||||
- added tvscraper support
|
- added tvscraper support
|
||||||
|
|
||||||
|
Version 1.1.0
|
||||||
|
|
||||||
|
- changed build system
|
||||||
|
2
Makefile
2
Makefile
@ -54,7 +54,7 @@ LIBS += $(shell pkg-config --libs Magick++)
|
|||||||
|
|
||||||
### The object files (add further files here):
|
### The object files (add further files here):
|
||||||
|
|
||||||
OBJS = $(PLUGIN).o
|
OBJS = $(PLUGIN).o channelcolumn.o channelgroup.o channelgroups.o config.o detailview.o dummygrid.o epggrid.o footer.o grid.o headergrid.o imageloader.o osdmanager.o recmanager.o recmenu.o recmenuitem.o recmenumanager.o recmenus.o setup.o statusheader.o styledpixmap.o switchtimer.o timeline.o timer.o tools.o tvguideosd.o
|
||||||
|
|
||||||
### The main target:
|
### The main target:
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "channelcolumn.h"
|
#include "channelcolumn.h"
|
||||||
|
#include "dummygrid.h"
|
||||||
|
|
||||||
cChannelColumn::cChannelColumn(int num, const cChannel *channel, cMyTime *myTime) {
|
cChannelColumn::cChannelColumn(int num, const cChannel *channel, cMyTime *myTime) {
|
||||||
this->channel = channel;
|
this->channel = channel;
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
#ifndef __TVGUIDE_CHANNELCOLUMN_H
|
#ifndef __TVGUIDE_CHANNELCOLUMN_H
|
||||||
#define __TVGUIDE_CHANNELCOLUMN_H
|
#define __TVGUIDE_CHANNELCOLUMN_H
|
||||||
|
|
||||||
|
#include <vdr/tools.h>
|
||||||
|
#include "grid.h"
|
||||||
|
#include "epggrid.h"
|
||||||
|
#include "headergrid.h"
|
||||||
|
#include "switchtimer.h"
|
||||||
|
|
||||||
class cGrid;
|
class cGrid;
|
||||||
class cEpgGrid;
|
class cEpgGrid;
|
||||||
class cHeaderGrid;
|
class cHeaderGrid;
|
||||||
|
|
||||||
// --- cChannelColumn -------------------------------------------------------------
|
// --- cChannelColumn -------------------------------------------------------------
|
||||||
|
|
||||||
class cChannelColumn : public cListObject, public cStyledPixmap {
|
class cChannelColumn : public cListObject, public cStyledPixmap {
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
#include <algorithm>
|
||||||
#include "channelgroup.h"
|
#include "channelgroup.h"
|
||||||
|
#include "tools.h"
|
||||||
|
|
||||||
cChannelGroup::cChannelGroup(const char *name) {
|
cChannelGroup::cChannelGroup(const char *name) {
|
||||||
channelStart = 0;
|
channelStart = 0;
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#ifndef __TVGUIDE_CHANNELGROUP_H
|
#ifndef __TVGUIDE_CHANNELGROUP_H
|
||||||
#define __TVGUIDE_CHANNELGROUP_H
|
#define __TVGUIDE_CHANNELGROUP_H
|
||||||
|
|
||||||
|
#include <vdr/tools.h>
|
||||||
|
#include "styledpixmap.h"
|
||||||
|
|
||||||
|
|
||||||
// --- cChannelGroup -------------------------------------------------------------
|
// --- cChannelGroup -------------------------------------------------------------
|
||||||
|
|
||||||
class cChannelGroup {
|
class cChannelGroup {
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#ifndef __TVGUIDE_CHANNELGROUPS_H
|
#ifndef __TVGUIDE_CHANNELGROUPS_H
|
||||||
#define __TVGUIDE_CHANNELGROUPS_H
|
#define __TVGUIDE_CHANNELGROUPS_H
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <vdr/channels.h>
|
||||||
|
#include "channelgroup.h"
|
||||||
|
|
||||||
// --- cChannelGroups -------------------------------------------------------------
|
// --- cChannelGroups -------------------------------------------------------------
|
||||||
|
|
||||||
class cChannelGroups {
|
class cChannelGroups {
|
||||||
|
15
config.c
15
config.c
@ -1,20 +1,5 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
enum {
|
|
||||||
e12Hours,
|
|
||||||
e24Hours
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
eVertical,
|
|
||||||
eHorizontal
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
eNumJump,
|
|
||||||
eGroupJump
|
|
||||||
};
|
|
||||||
|
|
||||||
cTvguideConfig::cTvguideConfig() {
|
cTvguideConfig::cTvguideConfig() {
|
||||||
showMainMenuEntry = 1;
|
showMainMenuEntry = 1;
|
||||||
replaceOriginalSchedule = 0;
|
replaceOriginalSchedule = 0;
|
||||||
|
85
config.h
85
config.h
@ -1,6 +1,25 @@
|
|||||||
#ifndef __TVGUIDE_CONFIG_H
|
#ifndef __TVGUIDE_CONFIG_H
|
||||||
#define __TVGUIDE_CONFIG_H
|
#define __TVGUIDE_CONFIG_H
|
||||||
|
|
||||||
|
#include <vdr/themes.h>
|
||||||
|
#include <vdr/plugin.h>
|
||||||
|
#include "osdmanager.h"
|
||||||
|
|
||||||
|
enum {
|
||||||
|
e12Hours,
|
||||||
|
e24Hours
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
eVertical,
|
||||||
|
eHorizontal
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
eNumJump,
|
||||||
|
eGroupJump
|
||||||
|
};
|
||||||
|
|
||||||
class cTvguideConfig {
|
class cTvguideConfig {
|
||||||
private:
|
private:
|
||||||
void SetGeometry(int width, int height);
|
void SetGeometry(int width, int height);
|
||||||
@ -127,4 +146,70 @@ class cTvguideConfig {
|
|||||||
void loadTheme();
|
void loadTheme();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef DEFINE_CONFIG
|
||||||
|
cTvguideConfig tvguideConfig;
|
||||||
|
cOsdManager osdManager;
|
||||||
|
cTheme theme;
|
||||||
|
cPlugin* pRemoteTimers = NULL;
|
||||||
|
#else
|
||||||
|
extern cTvguideConfig tvguideConfig;
|
||||||
|
extern cOsdManager osdManager;
|
||||||
|
extern cTheme theme;
|
||||||
|
extern cPlugin* pRemoteTimers;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// --- Theme -------------------------------------------------------------
|
||||||
|
//BLENDING SETUP
|
||||||
|
#define CLR_BLENDING_NOPACITY 0xFFFFFFFF
|
||||||
|
#define CLR_BLENDING_DEFAULT 0xAAAAAAAA
|
||||||
|
#define CLR_BLENDING_OFF 0x00000000
|
||||||
|
|
||||||
|
THEME_CLR(theme, clrDoBlending, CLR_BLENDING_DEFAULT);
|
||||||
|
THEME_CLR(theme, clrBackgroundOSD, clrBlack);
|
||||||
|
THEME_CLR(theme, clrBackground, clrBlack);
|
||||||
|
THEME_CLR(theme, clrGrid1, 0xFF404749);
|
||||||
|
THEME_CLR(theme, clrGrid1Blending, 0xFF000000);
|
||||||
|
THEME_CLR(theme, clrGrid2, 0xFF20293F);
|
||||||
|
THEME_CLR(theme, clrGrid2Blending, 0xFF000000);
|
||||||
|
THEME_CLR(theme, clrHighlight, 0xFFFF4D00);
|
||||||
|
THEME_CLR(theme, clrHighlightBlending, 0xFF000000);
|
||||||
|
THEME_CLR(theme, clrFont, clrWhite);
|
||||||
|
THEME_CLR(theme, clrFontActive, clrWhite);
|
||||||
|
THEME_CLR(theme, clrFontHeader, clrWhite);
|
||||||
|
THEME_CLR(theme, clrFontButtons, clrWhite);
|
||||||
|
THEME_CLR(theme, clrStatusHeader, clrBlack);
|
||||||
|
THEME_CLR(theme, clrStatusHeaderBlending, clrBlack);
|
||||||
|
THEME_CLR(theme, clrHeader, clrBlack);
|
||||||
|
THEME_CLR(theme, clrHeaderBlending, 0xFFE0E0E0);
|
||||||
|
THEME_CLR(theme, clrBorder, clrWhite);
|
||||||
|
THEME_CLR(theme, clrTimeline1, clrWhite);
|
||||||
|
THEME_CLR(theme, clrTimeline1Blending, 0xFF828282);
|
||||||
|
THEME_CLR(theme, clrTimeline2, clrBlack);
|
||||||
|
THEME_CLR(theme, clrTimeline2Blending, 0xFF3F3F3F);
|
||||||
|
THEME_CLR(theme, clrButtonRed, 0x99BB0000);
|
||||||
|
THEME_CLR(theme, clrButtonRedBorder, 0xFFBB0000);
|
||||||
|
THEME_CLR(theme, clrButtonGreen, 0x9900BB00);
|
||||||
|
THEME_CLR(theme, clrButtonGreenBorder, 0xFF00BB00);
|
||||||
|
THEME_CLR(theme, clrButtonYellow, 0x99BBBB00);
|
||||||
|
THEME_CLR(theme, clrButtonYellowBorder, 0xFFBBBB00);
|
||||||
|
THEME_CLR(theme, clrButtonBlue, 0x990000BB);
|
||||||
|
THEME_CLR(theme, clrButtonBlueBorder, 0xFF0000BB);
|
||||||
|
THEME_CLR(theme, clrButtonBlend, 0xDD000000);
|
||||||
|
THEME_CLR(theme, clrRecMenuBackground, 0xB0000000);
|
||||||
|
THEME_CLR(theme, clrRecMenuTimerConflictBackground, 0xFFCCCCCC);
|
||||||
|
THEME_CLR(theme, clrRecMenuTimerConflictBar, 0xFF222222);
|
||||||
|
THEME_CLR(theme, clrRecMenuTimerConflictOverlap, 0xAAFF0000);
|
||||||
|
THEME_CLR(theme, clrRecMenuDayActive, 0xFF00FF00);
|
||||||
|
THEME_CLR(theme, clrRecMenuDayInactive, 0xFFFF0000);
|
||||||
|
THEME_CLR(theme, clrRecMenuDayHighlight, 0x44FFFFFF);
|
||||||
|
THEME_CLR(theme, clrRecMenuTextBack, 0xFF000000);
|
||||||
|
THEME_CLR(theme, clrRecMenuTextActiveBack, 0xFF404749);
|
||||||
|
THEME_CLR(theme, clrRecMenuKeyboardBack, 0xFF000000);
|
||||||
|
THEME_CLR(theme, clrRecMenuKeyboardBorder, clrWhite);
|
||||||
|
THEME_CLR(theme, clrRecMenuKeyboardHigh, 0x55FFFFFF);
|
||||||
|
THEME_CLR(theme, clrButtonRedKeyboard, 0xFFBB0000);
|
||||||
|
THEME_CLR(theme, clrButtonGreenKeyboard, 0xFF00BB00);
|
||||||
|
THEME_CLR(theme, clrButtonYellowKeyboard, 0xFFBBBB00);
|
||||||
|
|
||||||
#endif //__TVGUIDE_CONFIG_H
|
#endif //__TVGUIDE_CONFIG_H
|
@ -1,4 +1,10 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <vdr/plugin.h>
|
||||||
|
#include "imageloader.h"
|
||||||
|
#include "services/epgsearch.h"
|
||||||
|
#include "services/remotetimers.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "tools.h"
|
||||||
#include "detailview.h"
|
#include "detailview.h"
|
||||||
|
|
||||||
cDetailView::cDetailView(const cEvent *event) {
|
cDetailView::cDetailView(const cEvent *event) {
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
#ifndef __TVGUIDE_DETAILVIEW_H
|
#ifndef __TVGUIDE_DETAILVIEW_H
|
||||||
#define __TVGUIDE_DETAILVIEW_H
|
#define __TVGUIDE_DETAILVIEW_H
|
||||||
|
|
||||||
|
#include <vdr/osd.h>
|
||||||
|
#include <vdr/osdbase.h>
|
||||||
|
#include <vdr/epg.h>
|
||||||
|
#include "services/tvscraper.h"
|
||||||
|
#include "styledpixmap.h"
|
||||||
|
|
||||||
// --- cDetailView -------------------------------------------------------------
|
// --- cDetailView -------------------------------------------------------------
|
||||||
|
|
||||||
class cEpgGrid;
|
class cEpgGrid;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef __TVGUIDE_DUMMYGRID_H
|
#ifndef __TVGUIDE_DUMMYGRID_H
|
||||||
#define __TVGUIDE_DUMMYGRID_H
|
#define __TVGUIDE_DUMMYGRID_H
|
||||||
|
|
||||||
|
#include "grid.h"
|
||||||
|
#include "channelcolumn.h"
|
||||||
|
|
||||||
// --- cDummyGrid -------------------------------------------------------------
|
// --- cDummyGrid -------------------------------------------------------------
|
||||||
|
|
||||||
class cDummyGrid : public cGrid {
|
class cDummyGrid : public cGrid {
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
#include "services/remotetimers.h"
|
||||||
#include "channelcolumn.h"
|
#include "channelcolumn.h"
|
||||||
|
#include "tools.h"
|
||||||
#include "epggrid.h"
|
#include "epggrid.h"
|
||||||
|
|
||||||
cEpgGrid::cEpgGrid(cChannelColumn *c, const cEvent *event) : cGrid(c) {
|
cEpgGrid::cEpgGrid(cChannelColumn *c, const cEvent *event) : cGrid(c) {
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef __TVGUIDE_EPGGRID_H
|
#ifndef __TVGUIDE_EPGGRID_H
|
||||||
#define __TVGUIDE_EPGGRID_H
|
#define __TVGUIDE_EPGGRID_H
|
||||||
|
|
||||||
|
#include <vdr/epg.h>
|
||||||
|
#include "grid.h"
|
||||||
|
|
||||||
// --- cEpgGrid -------------------------------------------------------------
|
// --- cEpgGrid -------------------------------------------------------------
|
||||||
|
|
||||||
class cEpgGrid : public cGrid {
|
class cEpgGrid : public cGrid {
|
||||||
|
3
footer.c
3
footer.c
@ -1,3 +1,6 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "imageloader.h"
|
||||||
|
#include "tools.h"
|
||||||
#include "footer.h"
|
#include "footer.h"
|
||||||
|
|
||||||
cFooter::cFooter(cChannelGroups *channelGroups) {
|
cFooter::cFooter(cChannelGroups *channelGroups) {
|
||||||
|
3
footer.h
3
footer.h
@ -1,6 +1,9 @@
|
|||||||
#ifndef __TVGUIDE_FOOTER_H
|
#ifndef __TVGUIDE_FOOTER_H
|
||||||
#define __TVGUIDE_FOOTER_H
|
#define __TVGUIDE_FOOTER_H
|
||||||
|
|
||||||
|
#include <vdr/osd.h>
|
||||||
|
#include "channelgroups.h"
|
||||||
|
|
||||||
// --- cFooter -------------------------------------------------------------
|
// --- cFooter -------------------------------------------------------------
|
||||||
|
|
||||||
class cFooter {
|
class cFooter {
|
||||||
|
5
grid.h
5
grid.h
@ -1,6 +1,11 @@
|
|||||||
#ifndef __TVGUIDE_GRID_H
|
#ifndef __TVGUIDE_GRID_H
|
||||||
#define __TVGUIDE_GRID_H
|
#define __TVGUIDE_GRID_H
|
||||||
|
|
||||||
|
#include <vdr/tools.h>
|
||||||
|
#include "styledpixmap.h"
|
||||||
|
|
||||||
|
class cChannelColumn;
|
||||||
|
|
||||||
// --- cEpgGrid -------------------------------------------------------------
|
// --- cEpgGrid -------------------------------------------------------------
|
||||||
|
|
||||||
class cGrid : public cListObject, public cStyledPixmap {
|
class cGrid : public cListObject, public cStyledPixmap {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "imageloader.h"
|
||||||
|
#include "tools.h"
|
||||||
#include "headergrid.h"
|
#include "headergrid.h"
|
||||||
|
|
||||||
cHeaderGrid::cHeaderGrid(void) : cGrid(NULL) {
|
cHeaderGrid::cHeaderGrid(void) : cGrid(NULL) {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef __TVGUIDE_HEADERGRID_H
|
#ifndef __TVGUIDE_HEADERGRID_H
|
||||||
#define __TVGUIDE_HEADERGRID_H
|
#define __TVGUIDE_HEADERGRID_H
|
||||||
|
|
||||||
|
#include "grid.h"
|
||||||
|
|
||||||
// --- cHeaderGrid -------------------------------------------------------------
|
// --- cHeaderGrid -------------------------------------------------------------
|
||||||
|
|
||||||
class cHeaderGrid : public cGrid {
|
class cHeaderGrid : public cGrid {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
#include "imageloader.h"
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "imageloader.h"
|
||||||
|
|
||||||
using namespace Magick;
|
using namespace Magick;
|
||||||
|
|
||||||
cImageLoader::cImageLoader() {
|
cImageLoader::cImageLoader() {
|
||||||
|
111
messagebox.c
111
messagebox.c
@ -1,111 +0,0 @@
|
|||||||
#include "messagebox.h"
|
|
||||||
|
|
||||||
cMessageBoxThread::cMessageBoxThread(cPixmap *content, int displayTime) {
|
|
||||||
this->content = content;
|
|
||||||
FrameTime = 30; // ms
|
|
||||||
FadeTime = 200; // ms
|
|
||||||
this->displayTime = displayTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
cMessageBoxThread::~cMessageBoxThread(void) {
|
|
||||||
Cancel(-1);
|
|
||||||
while (Active())
|
|
||||||
cCondWait::SleepMs(10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cMessageBoxThread::Action(void) {
|
|
||||||
uint64_t Start = cTimeMs::Now();
|
|
||||||
while (Running()) {
|
|
||||||
uint64_t Now = cTimeMs::Now();
|
|
||||||
cPixmap::Lock();
|
|
||||||
double t = min(double(Now - Start) / FadeTime, 1.0);
|
|
||||||
int Alpha = t * ALPHA_OPAQUE;
|
|
||||||
if (Running() && content) {
|
|
||||||
content->SetAlpha(Alpha);
|
|
||||||
osdManager.flush();
|
|
||||||
}
|
|
||||||
cPixmap::Unlock();
|
|
||||||
int Delta = cTimeMs::Now() - Now;
|
|
||||||
if (Delta < FrameTime)
|
|
||||||
cCondWait::SleepMs(FrameTime - Delta);
|
|
||||||
if ((Now - Start) > FadeTime)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
cCondWait::SleepMs(displayTime - 2*FadeTime);
|
|
||||||
Start = cTimeMs::Now();
|
|
||||||
while (Running()) {
|
|
||||||
uint64_t Now = cTimeMs::Now();
|
|
||||||
cPixmap::Lock();
|
|
||||||
double t = min(double(Now - Start) / FadeTime, 1.0);
|
|
||||||
int Alpha = (1-t) * ALPHA_OPAQUE;
|
|
||||||
if (Running() && content) {
|
|
||||||
content->SetAlpha(Alpha);
|
|
||||||
osdManager.flush();
|
|
||||||
}
|
|
||||||
cPixmap::Unlock();
|
|
||||||
int Delta = cTimeMs::Now() - Now;
|
|
||||||
if (Delta < FrameTime)
|
|
||||||
cCondWait::SleepMs(FrameTime - Delta);
|
|
||||||
if ((Now - Start) > FadeTime)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
osdManager.flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
//--cMessageBox-------------------------------------------------------------
|
|
||||||
cMessageBoxThread *cMessageBox::msgboxThread = NULL;
|
|
||||||
cPixmap *cMessageBox::content = NULL;
|
|
||||||
|
|
||||||
bool cMessageBox::Start(int displayTime, cString msg) {
|
|
||||||
int width = (tvguideConfig.osdWidth - 600)/2;
|
|
||||||
if (!content) {
|
|
||||||
int height = 400;
|
|
||||||
content = osdManager.requestPixmap(5, cRect((tvguideConfig.osdWidth - width)/2,
|
|
||||||
(tvguideConfig.osdHeight- height)/2,
|
|
||||||
width, height));
|
|
||||||
}
|
|
||||||
if (msgboxThread) {
|
|
||||||
delete msgboxThread;
|
|
||||||
msgboxThread = NULL;
|
|
||||||
}
|
|
||||||
if (!msgboxThread) {
|
|
||||||
msgboxThread = new cMessageBoxThread(content, displayTime);
|
|
||||||
cTextWrapper message;
|
|
||||||
message.Set(msg, tvguideConfig.FontMessageBox, width - 40);
|
|
||||||
int textHeight = tvguideConfig.FontMessageBox->Height();
|
|
||||||
int textLines = message.Lines();
|
|
||||||
int height = textLines * (textHeight+20);
|
|
||||||
cPixmap::Lock();
|
|
||||||
content->SetViewPort(cRect((tvguideConfig.osdWidth - width)/2,(tvguideConfig.osdHeight- height)/2, width, height));
|
|
||||||
content->SetAlpha(0);
|
|
||||||
content->Fill(theme.Color(clrBorder));
|
|
||||||
content->DrawRectangle(cRect(2,2,width-4, height-4), theme.Color(clrBackground));
|
|
||||||
int textWidth = 0;
|
|
||||||
for (int i=0; i<textLines; i++) {
|
|
||||||
textWidth = tvguideConfig.FontMessageBox->Width(message.GetLine(i));
|
|
||||||
content->DrawText(cPoint((width - textWidth)/2, 20 + i*textHeight), message.GetLine(i), theme.Color(clrFont), theme.Color(clrBackground), tvguideConfig.FontMessageBox);
|
|
||||||
}
|
|
||||||
cPixmap::Unlock();
|
|
||||||
msgboxThread->Start();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void cMessageBox::Stop(void) {
|
|
||||||
if (msgboxThread) {
|
|
||||||
delete msgboxThread;
|
|
||||||
msgboxThread = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void cMessageBox::Destroy(void) {
|
|
||||||
if (msgboxThread) {
|
|
||||||
delete msgboxThread;
|
|
||||||
msgboxThread = NULL;
|
|
||||||
}
|
|
||||||
if (content) {
|
|
||||||
osdManager.releasePixmap(content);
|
|
||||||
content = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
29
messagebox.h
29
messagebox.h
@ -1,29 +0,0 @@
|
|||||||
#ifndef __TVGUIDE_MESSAGEBOX_H
|
|
||||||
#define __TVGUIDE_MESSAGEBOX_H
|
|
||||||
|
|
||||||
// --- cMessageBox -------------------------------------------------------------
|
|
||||||
|
|
||||||
class cMessageBoxThread : public cThread {
|
|
||||||
private:
|
|
||||||
cPixmap *content;
|
|
||||||
int FadeTime;
|
|
||||||
int FrameTime;
|
|
||||||
int displayTime;
|
|
||||||
virtual void Action(void);
|
|
||||||
public:
|
|
||||||
cMessageBoxThread(cPixmap *content, int displayTime);
|
|
||||||
virtual ~cMessageBoxThread(void);
|
|
||||||
};
|
|
||||||
|
|
||||||
class cMessageBox {
|
|
||||||
private:
|
|
||||||
static cMutex mutex;
|
|
||||||
static cMessageBoxThread *msgboxThread;
|
|
||||||
static cPixmap *content;
|
|
||||||
public:
|
|
||||||
static bool Start(int displayTime, cString msg);
|
|
||||||
static void Stop(void);
|
|
||||||
static void Destroy(void);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //__TVGUIDE_MESSAGEBOX_H
|
|
23
osdmanager.c
23
osdmanager.c
@ -1,24 +1,5 @@
|
|||||||
#ifndef __TVGUIDE_OSDMANAGER_H
|
#include "config.h"
|
||||||
#define __TVGUIDE_OSDMANAGER_H
|
#include "osdmanager.h"
|
||||||
|
|
||||||
class cOsdManager {
|
|
||||||
private:
|
|
||||||
cOsd *osd;
|
|
||||||
public:
|
|
||||||
cOsdManager(void);
|
|
||||||
bool setOsd();
|
|
||||||
void setBackground();
|
|
||||||
void flush() {osd->Flush();};
|
|
||||||
cPixmap *requestPixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null);
|
|
||||||
void releasePixmap(cPixmap *pixmap);
|
|
||||||
void deleteOsd() {delete osd;};
|
|
||||||
int Width() { return osd->Width(); };
|
|
||||||
int Height() { return osd->Height(); };
|
|
||||||
int Top() { return osd->Top(); };
|
|
||||||
int Left() { return osd->Left(); };
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //__TVGUIDE_OSDMANAGER_H
|
|
||||||
|
|
||||||
cOsdManager::cOsdManager(void) {
|
cOsdManager::cOsdManager(void) {
|
||||||
}
|
}
|
||||||
|
23
osdmanager.h
Normal file
23
osdmanager.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ifndef __TVGUIDE_OSDMANAGER_H
|
||||||
|
#define __TVGUIDE_OSDMANAGER_H
|
||||||
|
|
||||||
|
#include <vdr/osd.h>
|
||||||
|
|
||||||
|
class cOsdManager {
|
||||||
|
private:
|
||||||
|
cOsd *osd;
|
||||||
|
public:
|
||||||
|
cOsdManager(void);
|
||||||
|
bool setOsd();
|
||||||
|
void setBackground();
|
||||||
|
void flush() {osd->Flush();};
|
||||||
|
cPixmap *requestPixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null);
|
||||||
|
void releasePixmap(cPixmap *pixmap);
|
||||||
|
void deleteOsd() {delete osd;};
|
||||||
|
int Width() { return osd->Width(); };
|
||||||
|
int Height() { return osd->Height(); };
|
||||||
|
int Top() { return osd->Top(); };
|
||||||
|
int Left() { return osd->Left(); };
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //__TVGUIDE_OSDMANAGER_H
|
@ -1,5 +1,14 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include <vdr/menu.h>
|
||||||
|
#include "services/epgsearch.h"
|
||||||
|
#include "services/remotetimers.h"
|
||||||
|
#include "services/tvscraper.h"
|
||||||
|
#include "tools.h"
|
||||||
|
#include "switchtimer.h"
|
||||||
#include "recmanager.h"
|
#include "recmanager.h"
|
||||||
|
|
||||||
static int CompareRecording(const void *p1, const void *p2) {
|
static int CompareRecording(const void *p1, const void *p2) {
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
#ifndef __TVGUIDE_RECMMANAGER_H
|
#ifndef __TVGUIDE_RECMMANAGER_H
|
||||||
#define __TVGUIDE_RECMMANAGER_H
|
#define __TVGUIDE_RECMMANAGER_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <vdr/plugin.h>
|
||||||
|
#include "detailview.h"
|
||||||
|
#include "recmenu.h"
|
||||||
|
|
||||||
class TVGuideTimerConflict {
|
class TVGuideTimerConflict {
|
||||||
public:
|
public:
|
||||||
time_t time;
|
time_t time;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef __TVGUIDE_RECMENU_H
|
#ifndef __TVGUIDE_RECMENU_H
|
||||||
#define __TVGUIDE_RECMENU_H
|
#define __TVGUIDE_RECMENU_H
|
||||||
|
|
||||||
|
#include "recmenuitem.h"
|
||||||
|
|
||||||
// --- cRecMenu -------------------------------------------------------------
|
// --- cRecMenu -------------------------------------------------------------
|
||||||
|
|
||||||
class cRecMenu : public cStyledPixmap {
|
class cRecMenu : public cStyledPixmap {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <vdr/remote.h>
|
#include <vdr/remote.h>
|
||||||
|
#include "imageloader.h"
|
||||||
|
#include "tools.h"
|
||||||
#include "recmenuitem.h"
|
#include "recmenuitem.h"
|
||||||
|
|
||||||
// --- cRecMenuItem -------------------------------------------------------------
|
// --- cRecMenuItem -------------------------------------------------------------
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#define AUTO_ADVANCE_TIMEOUT 1500
|
#define AUTO_ADVANCE_TIMEOUT 1500
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vdr/tools.h>
|
||||||
|
#include "styledpixmap.h"
|
||||||
|
|
||||||
enum eRecMenuState {
|
enum eRecMenuState {
|
||||||
rmsConsumed,
|
rmsConsumed,
|
||||||
rmsNotConsumed,
|
rmsNotConsumed,
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#include "recmenu.h"
|
||||||
|
#include "recmenus.h"
|
||||||
|
#include "switchtimer.h"
|
||||||
#include "recmenumanager.h"
|
#include "recmenumanager.h"
|
||||||
|
|
||||||
cRecMenuManager::cRecMenuManager(void) {
|
cRecMenuManager::cRecMenuManager(void) {
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#ifndef __TVGUIDE_RECMENUMANAGER_H
|
#ifndef __TVGUIDE_RECMENUMANAGER_H
|
||||||
#define __TVGUIDE_RECMENUMANAGER_H
|
#define __TVGUIDE_RECMENUMANAGER_H
|
||||||
|
|
||||||
|
#include "recmenu.h"
|
||||||
|
#include "recmanager.h"
|
||||||
|
#include "services/epgsearch.h"
|
||||||
|
|
||||||
// --- cRecMenuManager -------------------------------------------------------------
|
// --- cRecMenuManager -------------------------------------------------------------
|
||||||
class cRecMenuManager {
|
class cRecMenuManager {
|
||||||
private:
|
private:
|
||||||
|
389
recmenus.c
389
recmenus.c
@ -1,9 +1,8 @@
|
|||||||
#define TEXTINPUTLENGTH 80
|
#include "services/remotetimers.h"
|
||||||
|
#include "recmenus.h"
|
||||||
|
|
||||||
// --- cRecMenuMain ---------------------------------------------------------
|
// --- cRecMenuMain ---------------------------------------------------------
|
||||||
class cRecMenuMain : public cRecMenu {
|
cRecMenuMain::cRecMenuMain(bool epgSearchAvailable, bool timerActive, bool switchTimerActive) {
|
||||||
public:
|
|
||||||
cRecMenuMain(bool epgSearchAvailable, bool timerActive, bool switchTimerActive) {
|
|
||||||
eRecMenuState action;
|
eRecMenuState action;
|
||||||
if (!timerActive) {
|
if (!timerActive) {
|
||||||
action = (tvguideConfig.recMenuAskFolder)
|
action = (tvguideConfig.recMenuAskFolder)
|
||||||
@ -41,33 +40,8 @@ public:
|
|||||||
Arrange();
|
Arrange();
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual ~cRecMenuMain(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuAskFolder ---------------------------------------------------------
|
// --- cRecMenuAskFolder ---------------------------------------------------------
|
||||||
class cRecMenuAskFolder: public cRecMenu {
|
cRecMenuAskFolder::cRecMenuAskFolder(const cEvent *event, eRecMenuState nextAction) {
|
||||||
private:
|
|
||||||
std::vector<cString> folders;
|
|
||||||
eRecMenuState NextAction;
|
|
||||||
void readFolders(cList<cNestedItem> *rootFolders, cString path) {
|
|
||||||
cList<cNestedItem> *foldersLevel = NULL;
|
|
||||||
if (rootFolders) {
|
|
||||||
foldersLevel = rootFolders;
|
|
||||||
} else {
|
|
||||||
foldersLevel = &Folders;
|
|
||||||
}
|
|
||||||
for (cNestedItem *folder = foldersLevel->First(); folder; folder = foldersLevel->Next(folder)) {
|
|
||||||
cString strFolder = cString::sprintf("%s%s", *path, folder->Text());
|
|
||||||
folders.push_back(strFolder);
|
|
||||||
cList<cNestedItem> *subItems = folder->SubItems();
|
|
||||||
if (subItems) {
|
|
||||||
cString newPath = cString::sprintf("%s%s/", *path, folder->Text());
|
|
||||||
readFolders(subItems, newPath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public:
|
|
||||||
cRecMenuAskFolder(const cEvent *event, eRecMenuState nextAction) {
|
|
||||||
SetWidthPercent(80);
|
SetWidthPercent(80);
|
||||||
NextAction = nextAction;
|
NextAction = nextAction;
|
||||||
cString message = tr("Set Folder for");
|
cString message = tr("Set Folder for");
|
||||||
@ -89,8 +63,27 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
cRecMenuItem *GetMenuItem(int number) {
|
|
||||||
|
void cRecMenuAskFolder::readFolders(cList<cNestedItem> *rootFolders, cString path) {
|
||||||
|
cList<cNestedItem> *foldersLevel = NULL;
|
||||||
|
if (rootFolders) {
|
||||||
|
foldersLevel = rootFolders;
|
||||||
|
} else {
|
||||||
|
foldersLevel = &Folders;
|
||||||
|
}
|
||||||
|
for (cNestedItem *folder = foldersLevel->First(); folder; folder = foldersLevel->Next(folder)) {
|
||||||
|
cString strFolder = cString::sprintf("%s%s", *path, folder->Text());
|
||||||
|
folders.push_back(strFolder);
|
||||||
|
cList<cNestedItem> *subItems = folder->SubItems();
|
||||||
|
if (subItems) {
|
||||||
|
cString newPath = cString::sprintf("%s%s/", *path, folder->Text());
|
||||||
|
readFolders(subItems, newPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cRecMenuItem *cRecMenuAskFolder::GetMenuItem(int number) {
|
||||||
if (number == 0) {
|
if (number == 0) {
|
||||||
cRecMenuItem *result = new cRecMenuItemButton(tr("root video folder"), rmsInstantRecord, false, false, true);
|
cRecMenuItem *result = new cRecMenuItemButton(tr("root video folder"), rmsInstantRecord, false, false, true);
|
||||||
return result;
|
return result;
|
||||||
@ -99,20 +92,14 @@ public:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
};
|
}
|
||||||
|
|
||||||
int GetTotalNumMenuItems(void) {
|
int cRecMenuAskFolder::GetTotalNumMenuItems(void) {
|
||||||
return folders.size()+1;
|
return folders.size()+1;
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuAskFolder(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// --- cRecMenuConfirmTimer ---------------------------------------------------------
|
// --- cRecMenuConfirmTimer ---------------------------------------------------------
|
||||||
class cRecMenuConfirmTimer: public cRecMenu {
|
cRecMenuConfirmTimer::cRecMenuConfirmTimer(const cEvent *event) {
|
||||||
public:
|
|
||||||
cRecMenuConfirmTimer(const cEvent *event) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
||||||
cString message;
|
cString message;
|
||||||
@ -147,15 +134,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuConfirmTimer(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuConfirmDeleteTimer ---------------------------------------------------------
|
// --- cRecMenuConfirmDeleteTimer ---------------------------------------------------------
|
||||||
class cRecMenuConfirmDeleteTimer: public cRecMenu {
|
cRecMenuConfirmDeleteTimer::cRecMenuConfirmDeleteTimer(const cEvent *event) {
|
||||||
public:
|
|
||||||
cRecMenuConfirmDeleteTimer(const cEvent *event) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
||||||
cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
|
cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
|
||||||
@ -174,15 +156,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuConfirmDeleteTimer(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuAskDeleteTimer ---------------------------------------------------------
|
// --- cRecMenuAskDeleteTimer ---------------------------------------------------------
|
||||||
class cRecMenuAskDeleteTimer: public cRecMenu {
|
cRecMenuAskDeleteTimer::cRecMenuAskDeleteTimer(const cEvent *event) {
|
||||||
public:
|
|
||||||
cRecMenuAskDeleteTimer(const cEvent *event) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
||||||
cString text = cString::sprintf("%s \"%s, %s\" %s",
|
cString text = cString::sprintf("%s \"%s, %s\" %s",
|
||||||
@ -197,15 +174,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuAskDeleteTimer(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuTimerConflicts ---------------------------------------------------------
|
// --- cRecMenuTimerConflicts ---------------------------------------------------------
|
||||||
class cRecMenuTimerConflicts: public cRecMenu {
|
cRecMenuTimerConflicts::cRecMenuTimerConflicts(std::vector<TVGuideTimerConflict> conflicts) {
|
||||||
public:
|
|
||||||
cRecMenuTimerConflicts(std::vector<TVGuideTimerConflict> conflicts) {
|
|
||||||
int numConflicts = conflicts.size();
|
int numConflicts = conflicts.size();
|
||||||
|
|
||||||
cString text;
|
cString text;
|
||||||
@ -232,17 +204,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuTimerConflicts(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuTimerConflict ---------------------------------------------------------
|
// --- cRecMenuTimerConflict ---------------------------------------------------------
|
||||||
class cRecMenuTimerConflict: public cRecMenu {
|
cRecMenuTimerConflict::cRecMenuTimerConflict(TVGuideTimerConflict conflict) {
|
||||||
private:
|
|
||||||
TVGuideTimerConflict conflict;
|
|
||||||
public:
|
|
||||||
cRecMenuTimerConflict(TVGuideTimerConflict conflict) {
|
|
||||||
SetWidthPercent(80);
|
SetWidthPercent(80);
|
||||||
this->conflict = conflict;
|
this->conflict = conflict;
|
||||||
SetHeader(new cRecMenuItemTimerConflictHeader(conflict.timeStart,
|
SetHeader(new cRecMenuItemTimerConflictHeader(conflict.timeStart,
|
||||||
@ -272,9 +237,9 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
cRecMenuItem *GetMenuItem(int number) {
|
cRecMenuItem *cRecMenuTimerConflict::GetMenuItem(int number) {
|
||||||
if ((number >= 0) && (number < conflict.timerIDs.size())) {
|
if ((number >= 0) && (number < conflict.timerIDs.size())) {
|
||||||
const cTimer *timer = Timers.Get(conflict.timerIDs[number]);
|
const cTimer *timer = Timers.Get(conflict.timerIDs[number]);
|
||||||
cRecMenuItem *result = new cRecMenuItemTimer( timer,
|
cRecMenuItem *result = new cRecMenuItemTimer( timer,
|
||||||
@ -289,18 +254,14 @@ public:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
};
|
}
|
||||||
|
|
||||||
int GetTotalNumMenuItems(void) {
|
int cRecMenuTimerConflict::GetTotalNumMenuItems(void) {
|
||||||
return conflict.timerIDs.size();
|
return conflict.timerIDs.size();
|
||||||
};
|
}
|
||||||
virtual ~cRecMenuTimerConflict(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuNoTimerConflict ---------------------------------------------------------
|
// --- cRecMenuNoTimerConflict ---------------------------------------------------------
|
||||||
class cRecMenuNoTimerConflict: public cRecMenu {
|
cRecMenuNoTimerConflict::cRecMenuNoTimerConflict(void) {
|
||||||
public:
|
|
||||||
cRecMenuNoTimerConflict(void) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
cString text = tr("No Timer Conflicts found");
|
cString text = tr("No Timer Conflicts found");
|
||||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*text);
|
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*text);
|
||||||
@ -310,16 +271,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuNoTimerConflict(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuEditTimer ---------------------------------------------------------
|
// --- cRecMenuEditTimer ---------------------------------------------------------
|
||||||
class cRecMenuEditTimer: public cRecMenu {
|
cRecMenuEditTimer::cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState) {
|
||||||
private:
|
|
||||||
public:
|
|
||||||
cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState) {
|
|
||||||
SetWidthPercent(60);
|
SetWidthPercent(60);
|
||||||
if (timer) {
|
if (timer) {
|
||||||
cString title("");
|
cString title("");
|
||||||
@ -362,15 +317,10 @@ public:
|
|||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
virtual ~cRecMenuEditTimer(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSeriesTimer ---------------------------------------------------------
|
// --- cRecMenuSeriesTimer ---------------------------------------------------------
|
||||||
class cRecMenuSeriesTimer: public cRecMenu {
|
cRecMenuSeriesTimer::cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent *event) {
|
||||||
private:
|
|
||||||
public:
|
|
||||||
cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent *event) {
|
|
||||||
SetWidthPercent(70);
|
SetWidthPercent(70);
|
||||||
if (initialChannel) {
|
if (initialChannel) {
|
||||||
cString title = tr("Create Series Timer based on");
|
cString title = tr("Create Series Timer based on");
|
||||||
@ -407,14 +357,10 @@ public:
|
|||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
virtual ~cRecMenuSeriesTimer(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuConfirmSeriesTimer ---------------------------------------------------------
|
// --- cRecMenuConfirmSeriesTimer ---------------------------------------------------------
|
||||||
class cRecMenuConfirmSeriesTimer: public cRecMenu {
|
cRecMenuConfirmSeriesTimer::cRecMenuConfirmSeriesTimer(cTimer *seriesTimer) {
|
||||||
public:
|
|
||||||
cRecMenuConfirmSeriesTimer(cTimer *seriesTimer) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
cString message = tr("Series Timer created");
|
cString message = tr("Series Timer created");
|
||||||
cString infoText = message;
|
cString infoText = message;
|
||||||
@ -429,17 +375,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuConfirmSeriesTimer(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSearchTimer ---------------------------------------------------------
|
// --- cRecMenuSearchTimer ---------------------------------------------------------
|
||||||
class cRecMenuSearchTimer: public cRecMenu {
|
cRecMenuSearchTimer::cRecMenuSearchTimer(const cEvent *event) {
|
||||||
private:
|
|
||||||
char initialText[TEXTINPUTLENGTH];
|
|
||||||
public:
|
|
||||||
cRecMenuSearchTimer(const cEvent *event) {
|
|
||||||
SetWidthPercent(70);
|
SetWidthPercent(70);
|
||||||
cString message = tr("Configure Search Timer based on");
|
cString message = tr("Configure Search Timer based on");
|
||||||
cString infoText = cString::sprintf("%s:\n\"%s\"", *message, event->Title());
|
cString infoText = cString::sprintf("%s:\n\"%s\"", *message, event->Title());
|
||||||
@ -452,19 +391,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSearchTimer(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSearchTimerTemplates ---------------------------------------------------------
|
// --- cRecMenuSearchTimerTemplates ---------------------------------------------------------
|
||||||
class cRecMenuSearchTimerTemplates: public cRecMenu {
|
cRecMenuSearchTimerTemplates::cRecMenuSearchTimerTemplates(cString searchString, std::vector<TVGuideEPGSearchTemplate> templates) {
|
||||||
private:
|
|
||||||
int numTemplates;
|
|
||||||
std::vector<TVGuideEPGSearchTemplate> templates;
|
|
||||||
public:
|
|
||||||
cRecMenuSearchTimerTemplates(cString searchString,
|
|
||||||
std::vector<TVGuideEPGSearchTemplate> templates) {
|
|
||||||
this->templates = templates;
|
this->templates = templates;
|
||||||
SetWidthPercent(70);
|
SetWidthPercent(70);
|
||||||
cString message = tr("Configure Search Timer for Search String");
|
cString message = tr("Configure Search Timer for Search String");
|
||||||
@ -485,9 +415,9 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
cRecMenuItem *GetMenuItem(int number) {
|
cRecMenuItem *cRecMenuSearchTimerTemplates::GetMenuItem(int number) {
|
||||||
if (number == 0) {
|
if (number == 0) {
|
||||||
return new cRecMenuItemButton(tr("Manually configure Options"), rmsSearchTimerOptionsManually, false);
|
return new cRecMenuItemButton(tr("Manually configure Options"), rmsSearchTimerOptionsManually, false);
|
||||||
} else if ((number > 0) && (number < numTemplates + 1)) {
|
} else if ((number > 0) && (number < numTemplates + 1)) {
|
||||||
@ -496,22 +426,14 @@ public:
|
|||||||
return templ;
|
return templ;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
int cRecMenuSearchTimerTemplates::GetTotalNumMenuItems(void) {
|
||||||
int GetTotalNumMenuItems(void) {
|
|
||||||
return numTemplates + 1;
|
return numTemplates + 1;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual ~cRecMenuSearchTimerTemplates(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSearchTimerTemplatesCreate ---------------------------------------------------------
|
// --- cRecMenuSearchTimerTemplatesCreate ---------------------------------------------------------
|
||||||
class cRecMenuSearchTimerTemplatesCreate: public cRecMenu {
|
cRecMenuSearchTimerTemplatesCreate::cRecMenuSearchTimerTemplatesCreate(cString searchString, cString tmplName) {
|
||||||
private:
|
|
||||||
public:
|
|
||||||
cRecMenuSearchTimerTemplatesCreate(cString searchString, cString tmplName) {
|
|
||||||
SetWidthPercent(70);
|
SetWidthPercent(70);
|
||||||
|
|
||||||
cString message1 = tr("Creating Search Timer");
|
cString message1 = tr("Creating Search Timer");
|
||||||
@ -529,23 +451,15 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSearchTimerTemplatesCreate(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSearchTimerOptions ---------------------------------------------------------
|
// --- cRecMenuSearchTimerOptions ---------------------------------------------------------
|
||||||
class cRecMenuSearchTimerOptions: public cRecMenu {
|
cRecMenuSearchTimerOptions::cRecMenuSearchTimerOptions(cString searchString) {
|
||||||
private:
|
|
||||||
const char * searchModes[5];
|
|
||||||
cString searchString;
|
|
||||||
public:
|
|
||||||
cRecMenuSearchTimerOptions(cString searchString) {
|
|
||||||
this->searchString = searchString;
|
this->searchString = searchString;
|
||||||
CreateMenuItems();
|
CreateMenuItems();
|
||||||
};
|
}
|
||||||
|
|
||||||
void CreateMenuItems(void) {
|
void cRecMenuSearchTimerOptions::CreateMenuItems(void) {
|
||||||
bool showChannelSelectors = false;
|
bool showChannelSelectors = false;
|
||||||
bool showTimeSelectors = false;
|
bool showTimeSelectors = false;
|
||||||
if (menuItems.Count() > 0) {
|
if (menuItems.Count() > 0) {
|
||||||
@ -598,18 +512,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSearchTimerOptions(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSearchTimerResults ---------------------------------------------------------
|
// --- cRecMenuSearchTimerResults ---------------------------------------------------------
|
||||||
class cRecMenuSearchTimerResults: public cRecMenu {
|
cRecMenuSearchTimerResults::cRecMenuSearchTimerResults(cString searchString, const cEvent **searchResults, int numResults, std::string templateName) {
|
||||||
private:
|
|
||||||
const cEvent **searchResults;
|
|
||||||
int numResults;
|
|
||||||
public:
|
|
||||||
cRecMenuSearchTimerResults(cString searchString, const cEvent **searchResults, int numResults, std::string templateName) {
|
|
||||||
this->searchResults = searchResults;
|
this->searchResults = searchResults;
|
||||||
SetWidthPercent(70);
|
SetWidthPercent(70);
|
||||||
cString message1 = tr("search results for Search Timer");
|
cString message1 = tr("search results for Search Timer");
|
||||||
@ -638,29 +544,22 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
cRecMenuItem *GetMenuItem(int number) {
|
cRecMenuItem *cRecMenuSearchTimerResults::GetMenuItem(int number) {
|
||||||
if ((number >= 0) && (number < numResults)) {
|
if ((number >= 0) && (number < numResults)) {
|
||||||
cRecMenuItem *result = new cRecMenuItemEvent(searchResults[number], rmsSearchShowInfo, rmsDisabled, false);
|
cRecMenuItem *result = new cRecMenuItemEvent(searchResults[number], rmsSearchShowInfo, rmsDisabled, false);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
};
|
}
|
||||||
|
|
||||||
int GetTotalNumMenuItems(void) {
|
int cRecMenuSearchTimerResults::GetTotalNumMenuItems(void) {
|
||||||
return numResults;
|
return numResults;
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSearchTimerResults(void) {
|
|
||||||
delete[] searchResults;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSearchTimerNothingFound ---------------------------------------------------------
|
// --- cRecMenuSearchTimerNothingFound ---------------------------------------------------------
|
||||||
class cRecMenuSearchTimerNothingFound: public cRecMenu {
|
cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(cString searchString, std::string templateName) {
|
||||||
public:
|
|
||||||
cRecMenuSearchTimerNothingFound(cString searchString, std::string templateName) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
cString message = tr("Nothing found for Search String");
|
cString message = tr("Nothing found for Search String");
|
||||||
cString message2 = tr("Using Template");
|
cString message2 = tr("Using Template");
|
||||||
@ -683,16 +582,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSearchTimerNothingFound(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSearchTimerCreateConfirm ---------------------------------------------------------
|
// --- cRecMenuSearchTimerCreateConfirm ---------------------------------------------------------
|
||||||
class cRecMenuSearchTimerCreateConfirm: public cRecMenu {
|
cRecMenuSearchTimerCreateConfirm::cRecMenuSearchTimerCreateConfirm(bool success) {
|
||||||
private:
|
|
||||||
public:
|
|
||||||
cRecMenuSearchTimerCreateConfirm(bool success) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
|
|
||||||
cString message1a = tr("Search Timer sucessfully created.");
|
cString message1a = tr("Search Timer sucessfully created.");
|
||||||
@ -709,17 +602,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSearchTimerCreateConfirm(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSwitchTimer ---------------------------------------------------------
|
// --- cRecMenuSwitchTimer ---------------------------------------------------------
|
||||||
class cRecMenuSwitchTimer: public cRecMenu {
|
cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
|
||||||
private:
|
|
||||||
const char *switchModes[3];
|
|
||||||
public:
|
|
||||||
cRecMenuSwitchTimer(void) {
|
|
||||||
SetWidthPercent(60);
|
SetWidthPercent(60);
|
||||||
|
|
||||||
cString infoText = tr("Configure Options for Switchtimer");
|
cString infoText = tr("Configure Options for Switchtimer");
|
||||||
@ -738,16 +624,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSwitchTimer(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSwitchTimerConfirm ---------------------------------------------------------
|
// --- cRecMenuSwitchTimerConfirm ---------------------------------------------------------
|
||||||
class cRecMenuSwitchTimerConfirm: public cRecMenu {
|
cRecMenuSwitchTimerConfirm::cRecMenuSwitchTimerConfirm(bool success) {
|
||||||
private:
|
|
||||||
public:
|
|
||||||
cRecMenuSwitchTimerConfirm(bool success) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
|
|
||||||
cString message1 = tr("Switch Timer sucessfully created");
|
cString message1 = tr("Switch Timer sucessfully created");
|
||||||
@ -762,16 +642,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSwitchTimerConfirm(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSwitchTimerDelete ---------------------------------------------------------
|
// --- cRecMenuSwitchTimerDelete ---------------------------------------------------------
|
||||||
class cRecMenuSwitchTimerDelete: public cRecMenu {
|
cRecMenuSwitchTimerDelete::cRecMenuSwitchTimerDelete(void) {
|
||||||
private:
|
|
||||||
public:
|
|
||||||
cRecMenuSwitchTimerDelete(void) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
|
|
||||||
cString infoText = tr("Switch Timer deleted");
|
cString infoText = tr("Switch Timer deleted");
|
||||||
@ -784,19 +658,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSwitchTimerDelete(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// --- cRecMenuSearch ---------------------------------------------------------
|
// --- cRecMenuSearch ---------------------------------------------------------
|
||||||
class cRecMenuSearch: public cRecMenu {
|
cRecMenuSearch::cRecMenuSearch(const cEvent *event) {
|
||||||
private:
|
|
||||||
char initialText[TEXTINPUTLENGTH];
|
|
||||||
const char * searchModes[5];
|
|
||||||
public:
|
|
||||||
cRecMenuSearch(const cEvent *event) {
|
|
||||||
SetWidthPercent(60);
|
SetWidthPercent(60);
|
||||||
cString infoText = tr("Search");
|
cString infoText = tr("Search");
|
||||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||||
@ -809,9 +674,9 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
cRecMenuSearch(const cEvent *event, const char *searchString) {
|
cRecMenuSearch::cRecMenuSearch(const cEvent *event, const char *searchString) {
|
||||||
SetWidthPercent(60);
|
SetWidthPercent(60);
|
||||||
cString infoText = tr("Search");
|
cString infoText = tr("Search");
|
||||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||||
@ -834,17 +699,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
virtual ~cRecMenuSearch(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSearchResults ---------------------------------------------------------
|
// --- cRecMenuSearchResults ---------------------------------------------------------
|
||||||
class cRecMenuSearchResults: public cRecMenu {
|
cRecMenuSearchResults::cRecMenuSearchResults(cString searchString, const cEvent **searchResults, int numResults) {
|
||||||
private:
|
|
||||||
const cEvent **searchResults;
|
|
||||||
int numResults;
|
|
||||||
public:
|
|
||||||
cRecMenuSearchResults(cString searchString, const cEvent **searchResults, int numResults) {
|
|
||||||
this->searchResults = searchResults;
|
this->searchResults = searchResults;
|
||||||
SetWidthPercent(70);
|
SetWidthPercent(70);
|
||||||
this->numResults = numResults;
|
this->numResults = numResults;
|
||||||
@ -867,29 +725,22 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
cRecMenuItem *GetMenuItem(int number) {
|
cRecMenuItem *cRecMenuSearchResults::GetMenuItem(int number) {
|
||||||
if ((number >= 0) && (number < numResults)) {
|
if ((number >= 0) && (number < numResults)) {
|
||||||
cRecMenuItem *result = new cRecMenuItemEvent(searchResults[number], rmsSearchShowInfo, rmsSearchRecord, false);
|
cRecMenuItem *result = new cRecMenuItemEvent(searchResults[number], rmsSearchShowInfo, rmsSearchRecord, false);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
};
|
}
|
||||||
|
|
||||||
int GetTotalNumMenuItems(void) {
|
int cRecMenuSearchResults::GetTotalNumMenuItems(void) {
|
||||||
return numResults;
|
return numResults;
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSearchResults(void) {
|
|
||||||
delete[] searchResults;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSearchConfirmTimer ---------------------------------------------------------
|
// --- cRecMenuSearchConfirmTimer ---------------------------------------------------------
|
||||||
class cRecMenuSearchConfirmTimer: public cRecMenu {
|
cRecMenuSearchConfirmTimer::cRecMenuSearchConfirmTimer(const cEvent *event) {
|
||||||
public:
|
|
||||||
cRecMenuSearchConfirmTimer(const cEvent *event) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
||||||
cString message = tr("Timer created");
|
cString message = tr("Timer created");
|
||||||
@ -908,15 +759,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSearchConfirmTimer(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuSearchNothingFound ---------------------------------------------------------
|
// --- cRecMenuSearchNothingFound ---------------------------------------------------------
|
||||||
class cRecMenuSearchNothingFound: public cRecMenu {
|
cRecMenuSearchNothingFound::cRecMenuSearchNothingFound(cString searchString) {
|
||||||
public:
|
|
||||||
cRecMenuSearchNothingFound(cString searchString) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
cString message = tr("Nothing found for Search String");
|
cString message = tr("Nothing found for Search String");
|
||||||
cString text = cString::sprintf("%s\n\"%s\"",
|
cString text = cString::sprintf("%s\n\"%s\"",
|
||||||
@ -929,19 +775,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuSearchNothingFound(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// --- cRecMenuRecordingSearch ---------------------------------------------------------
|
// --- cRecMenuRecordingSearch ---------------------------------------------------------
|
||||||
class cRecMenuRecordingSearch: public cRecMenu {
|
cRecMenuRecordingSearch::cRecMenuRecordingSearch(const cEvent *event) {
|
||||||
private:
|
|
||||||
char initialText[TEXTINPUTLENGTH];
|
|
||||||
public:
|
|
||||||
cRecMenuRecordingSearch(const cEvent *event) {
|
|
||||||
SetWidthPercent(60);
|
SetWidthPercent(60);
|
||||||
cString infoText = tr("Search in Recordings");
|
cString infoText = tr("Search in Recordings");
|
||||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||||
@ -953,18 +790,10 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
virtual ~cRecMenuRecordingSearch(void) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuRecordingSearchResults ---------------------------------------------------------
|
// --- cRecMenuRecordingSearchResults ---------------------------------------------------------
|
||||||
|
cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(cString searchString, cRecording **searchResults, int numResults) {
|
||||||
class cRecMenuRecordingSearchResults: public cRecMenu {
|
|
||||||
private:
|
|
||||||
cRecording **searchResults;
|
|
||||||
int numResults;
|
|
||||||
public:
|
|
||||||
cRecMenuRecordingSearchResults(cString searchString, cRecording **searchResults, int numResults) {
|
|
||||||
this->searchResults = searchResults;
|
this->searchResults = searchResults;
|
||||||
SetWidthPercent(80);
|
SetWidthPercent(80);
|
||||||
cString message1 = tr("Found");
|
cString message1 = tr("Found");
|
||||||
@ -989,29 +818,22 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
cRecMenuItem *GetMenuItem(int number) {
|
cRecMenuItem *cRecMenuRecordingSearchResults::GetMenuItem(int number) {
|
||||||
if ((number >= 0) && (number < numResults)) {
|
if ((number >= 0) && (number < numResults)) {
|
||||||
cRecMenuItem *result = new cRecMenuItemRecording(searchResults[number], false);
|
cRecMenuItem *result = new cRecMenuItemRecording(searchResults[number], false);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
};
|
}
|
||||||
|
|
||||||
int GetTotalNumMenuItems(void) {
|
int cRecMenuRecordingSearchResults::GetTotalNumMenuItems(void) {
|
||||||
return numResults;
|
return numResults;
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuRecordingSearchResults(void) {
|
|
||||||
delete[] searchResults;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cRecMenuRecordingSearchNotFound ---------------------------------------------------------
|
// --- cRecMenuRecordingSearchNotFound ---------------------------------------------------------
|
||||||
class cRecMenuRecordingSearchNotFound: public cRecMenu {
|
cRecMenuRecordingSearchNotFound::cRecMenuRecordingSearchNotFound(cString searchString) {
|
||||||
public:
|
|
||||||
cRecMenuRecordingSearchNotFound(cString searchString) {
|
|
||||||
SetWidthPercent(50);
|
SetWidthPercent(50);
|
||||||
cString message = tr("No recordings found for");
|
cString message = tr("No recordings found for");
|
||||||
cString text = cString::sprintf("%s\n\"%s\"",
|
cString text = cString::sprintf("%s\n\"%s\"",
|
||||||
@ -1024,7 +846,4 @@ public:
|
|||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual ~cRecMenuRecordingSearchNotFound(void) {};
|
|
||||||
};
|
|
266
recmenus.h
Normal file
266
recmenus.h
Normal file
@ -0,0 +1,266 @@
|
|||||||
|
#ifndef __TVGUIDE_RECMENUS_H
|
||||||
|
#define __TVGUIDE_RECMENUS_H
|
||||||
|
|
||||||
|
#define TEXTINPUTLENGTH 80
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <vdr/epg.h>
|
||||||
|
#include "recmanager.h"
|
||||||
|
|
||||||
|
// --- cRecMenuMain ---------------------------------------------------------
|
||||||
|
class cRecMenuMain : public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuMain(bool epgSearchAvailable, bool timerActive, bool switchTimerActive);
|
||||||
|
virtual ~cRecMenuMain(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuAskFolder ---------------------------------------------------------
|
||||||
|
class cRecMenuAskFolder: public cRecMenu {
|
||||||
|
private:
|
||||||
|
std::vector<cString> folders;
|
||||||
|
eRecMenuState NextAction;
|
||||||
|
void readFolders(cList<cNestedItem> *rootFolders, cString path);
|
||||||
|
public:
|
||||||
|
cRecMenuAskFolder(const cEvent *event, eRecMenuState nextAction);
|
||||||
|
cRecMenuItem *GetMenuItem(int number);
|
||||||
|
int GetTotalNumMenuItems(void);
|
||||||
|
virtual ~cRecMenuAskFolder(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuConfirmTimer ---------------------------------------------------------
|
||||||
|
class cRecMenuConfirmTimer: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuConfirmTimer(const cEvent *event);
|
||||||
|
virtual ~cRecMenuConfirmTimer(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuConfirmDeleteTimer ---------------------------------------------------------
|
||||||
|
class cRecMenuConfirmDeleteTimer: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuConfirmDeleteTimer(const cEvent *event);
|
||||||
|
virtual ~cRecMenuConfirmDeleteTimer(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuAskDeleteTimer ---------------------------------------------------------
|
||||||
|
class cRecMenuAskDeleteTimer: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuAskDeleteTimer(const cEvent *event);
|
||||||
|
virtual ~cRecMenuAskDeleteTimer(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuTimerConflicts ---------------------------------------------------------
|
||||||
|
class cRecMenuTimerConflicts: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuTimerConflicts(std::vector<TVGuideTimerConflict> conflicts);
|
||||||
|
virtual ~cRecMenuTimerConflicts(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuTimerConflict ---------------------------------------------------------
|
||||||
|
class cRecMenuTimerConflict: public cRecMenu {
|
||||||
|
private:
|
||||||
|
TVGuideTimerConflict conflict;
|
||||||
|
public:
|
||||||
|
cRecMenuTimerConflict(TVGuideTimerConflict conflict);
|
||||||
|
cRecMenuItem *GetMenuItem(int number);
|
||||||
|
int GetTotalNumMenuItems(void);
|
||||||
|
virtual ~cRecMenuTimerConflict(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuNoTimerConflict ---------------------------------------------------------
|
||||||
|
class cRecMenuNoTimerConflict: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuNoTimerConflict(void);
|
||||||
|
virtual ~cRecMenuNoTimerConflict(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuEditTimer ---------------------------------------------------------
|
||||||
|
class cRecMenuEditTimer: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState);
|
||||||
|
virtual ~cRecMenuEditTimer(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// --- cRecMenuSeriesTimer ---------------------------------------------------------
|
||||||
|
class cRecMenuSeriesTimer: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent *event);
|
||||||
|
virtual ~cRecMenuSeriesTimer(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuConfirmSeriesTimer ---------------------------------------------------------
|
||||||
|
class cRecMenuConfirmSeriesTimer: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuConfirmSeriesTimer(cTimer *seriesTimer);
|
||||||
|
virtual ~cRecMenuConfirmSeriesTimer(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSearchTimer ---------------------------------------------------------
|
||||||
|
class cRecMenuSearchTimer: public cRecMenu {
|
||||||
|
private:
|
||||||
|
char initialText[TEXTINPUTLENGTH];
|
||||||
|
public:
|
||||||
|
cRecMenuSearchTimer(const cEvent *event);
|
||||||
|
virtual ~cRecMenuSearchTimer(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSearchTimerTemplates ---------------------------------------------------------
|
||||||
|
class cRecMenuSearchTimerTemplates: public cRecMenu {
|
||||||
|
private:
|
||||||
|
int numTemplates;
|
||||||
|
std::vector<TVGuideEPGSearchTemplate> templates;
|
||||||
|
public:
|
||||||
|
cRecMenuSearchTimerTemplates(cString searchString, std::vector<TVGuideEPGSearchTemplate> templates);
|
||||||
|
cRecMenuItem *GetMenuItem(int number);
|
||||||
|
int GetTotalNumMenuItems(void);
|
||||||
|
virtual ~cRecMenuSearchTimerTemplates(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSearchTimerTemplatesCreate ---------------------------------------------------------
|
||||||
|
class cRecMenuSearchTimerTemplatesCreate: public cRecMenu {
|
||||||
|
private:
|
||||||
|
public:
|
||||||
|
cRecMenuSearchTimerTemplatesCreate(cString searchString, cString tmplName);
|
||||||
|
virtual ~cRecMenuSearchTimerTemplatesCreate(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSearchTimerOptions ---------------------------------------------------------
|
||||||
|
class cRecMenuSearchTimerOptions: public cRecMenu {
|
||||||
|
private:
|
||||||
|
const char * searchModes[5];
|
||||||
|
cString searchString;
|
||||||
|
public:
|
||||||
|
cRecMenuSearchTimerOptions(cString searchString);
|
||||||
|
void CreateMenuItems(void);
|
||||||
|
virtual ~cRecMenuSearchTimerOptions(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSearchTimerResults ---------------------------------------------------------
|
||||||
|
class cRecMenuSearchTimerResults: public cRecMenu {
|
||||||
|
private:
|
||||||
|
const cEvent **searchResults;
|
||||||
|
int numResults;
|
||||||
|
public:
|
||||||
|
cRecMenuSearchTimerResults(cString searchString, const cEvent **searchResults, int numResults, std::string templateName);
|
||||||
|
cRecMenuItem *GetMenuItem(int number);
|
||||||
|
int GetTotalNumMenuItems(void);
|
||||||
|
virtual ~cRecMenuSearchTimerResults(void) {
|
||||||
|
delete[] searchResults;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSearchTimerNothingFound ---------------------------------------------------------
|
||||||
|
class cRecMenuSearchTimerNothingFound: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuSearchTimerNothingFound(cString searchString, std::string templateName);
|
||||||
|
virtual ~cRecMenuSearchTimerNothingFound(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSearchTimerCreateConfirm ---------------------------------------------------------
|
||||||
|
class cRecMenuSearchTimerCreateConfirm: public cRecMenu {
|
||||||
|
private:
|
||||||
|
public:
|
||||||
|
cRecMenuSearchTimerCreateConfirm(bool success);
|
||||||
|
virtual ~cRecMenuSearchTimerCreateConfirm(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSwitchTimer ---------------------------------------------------------
|
||||||
|
class cRecMenuSwitchTimer: public cRecMenu {
|
||||||
|
private:
|
||||||
|
const char *switchModes[3];
|
||||||
|
public:
|
||||||
|
cRecMenuSwitchTimer(void);
|
||||||
|
virtual ~cRecMenuSwitchTimer(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSwitchTimerConfirm ---------------------------------------------------------
|
||||||
|
class cRecMenuSwitchTimerConfirm: public cRecMenu {
|
||||||
|
private:
|
||||||
|
public:
|
||||||
|
cRecMenuSwitchTimerConfirm(bool success);
|
||||||
|
virtual ~cRecMenuSwitchTimerConfirm(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSwitchTimerDelete ---------------------------------------------------------
|
||||||
|
class cRecMenuSwitchTimerDelete: public cRecMenu {
|
||||||
|
private:
|
||||||
|
public:
|
||||||
|
cRecMenuSwitchTimerDelete(void);
|
||||||
|
virtual ~cRecMenuSwitchTimerDelete(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// --- cRecMenuSearch ---------------------------------------------------------
|
||||||
|
class cRecMenuSearch: public cRecMenu {
|
||||||
|
private:
|
||||||
|
char initialText[TEXTINPUTLENGTH];
|
||||||
|
const char * searchModes[5];
|
||||||
|
public:
|
||||||
|
cRecMenuSearch(const cEvent *event);
|
||||||
|
cRecMenuSearch(const cEvent *event, const char *searchString);
|
||||||
|
virtual ~cRecMenuSearch(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSearchResults ---------------------------------------------------------
|
||||||
|
class cRecMenuSearchResults: public cRecMenu {
|
||||||
|
private:
|
||||||
|
const cEvent **searchResults;
|
||||||
|
int numResults;
|
||||||
|
public:
|
||||||
|
cRecMenuSearchResults(cString searchString, const cEvent **searchResults, int numResults);
|
||||||
|
cRecMenuItem *GetMenuItem(int number);
|
||||||
|
int GetTotalNumMenuItems(void);
|
||||||
|
virtual ~cRecMenuSearchResults(void) {
|
||||||
|
delete[] searchResults;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSearchConfirmTimer ---------------------------------------------------------
|
||||||
|
class cRecMenuSearchConfirmTimer: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuSearchConfirmTimer(const cEvent *event);
|
||||||
|
virtual ~cRecMenuSearchConfirmTimer(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuSearchNothingFound ---------------------------------------------------------
|
||||||
|
class cRecMenuSearchNothingFound: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuSearchNothingFound(cString searchString);
|
||||||
|
virtual ~cRecMenuSearchNothingFound(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// --- cRecMenuRecordingSearch ---------------------------------------------------------
|
||||||
|
class cRecMenuRecordingSearch: public cRecMenu {
|
||||||
|
private:
|
||||||
|
char initialText[TEXTINPUTLENGTH];
|
||||||
|
public:
|
||||||
|
cRecMenuRecordingSearch(const cEvent *event);
|
||||||
|
virtual ~cRecMenuRecordingSearch(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuRecordingSearchResults ---------------------------------------------------------
|
||||||
|
|
||||||
|
class cRecMenuRecordingSearchResults: public cRecMenu {
|
||||||
|
private:
|
||||||
|
cRecording **searchResults;
|
||||||
|
int numResults;
|
||||||
|
public:
|
||||||
|
cRecMenuRecordingSearchResults(cString searchString, cRecording **searchResults, int numResults);
|
||||||
|
cRecMenuItem *GetMenuItem(int number);
|
||||||
|
int GetTotalNumMenuItems(void);
|
||||||
|
virtual ~cRecMenuRecordingSearchResults(void) {
|
||||||
|
delete[] searchResults;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- cRecMenuRecordingSearchNotFound ---------------------------------------------------------
|
||||||
|
class cRecMenuRecordingSearchNotFound: public cRecMenu {
|
||||||
|
public:
|
||||||
|
cRecMenuRecordingSearchNotFound(cString searchString);
|
||||||
|
virtual ~cRecMenuRecordingSearchNotFound(void) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif //__TVGUIDE_RECMENUS_H
|
@ -1,3 +1,9 @@
|
|||||||
|
#ifndef REMOTETIMERSERVICES_INC
|
||||||
|
#define REMOTETIMERSERVICES_INC
|
||||||
|
|
||||||
|
#include <vdr/epg.h>
|
||||||
|
#include <vdr/timers.h>
|
||||||
|
|
||||||
// RemoteTimers services
|
// RemoteTimers services
|
||||||
struct RemoteTimers_Event_v1_0 {
|
struct RemoteTimers_Event_v1_0 {
|
||||||
//in
|
//in
|
||||||
@ -23,3 +29,5 @@ struct RemoteTimers_Timer_v1_0 {
|
|||||||
//out
|
//out
|
||||||
cString errorMsg;
|
cString errorMsg;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif //REMOTETIMERSERVICES_INC
|
@ -1,3 +1,10 @@
|
|||||||
|
#ifndef __TVGUIDE_TVSCRAPER_H
|
||||||
|
#define __TVGUIDE_TVSCRAPER_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <vdr/epg.h>
|
||||||
|
|
||||||
enum tvMediaType {
|
enum tvMediaType {
|
||||||
typeSeries,
|
typeSeries,
|
||||||
typeMovie,
|
typeMovie,
|
||||||
@ -54,3 +61,5 @@ struct TVScraperGetFullInformation
|
|||||||
std::vector<tvActor> actors;
|
std::vector<tvActor> actors;
|
||||||
std::string description;
|
std::string description;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif //__TVGUIDE_TVSCRAPER_H
|
3
setup.h
3
setup.h
@ -1,6 +1,9 @@
|
|||||||
#ifndef __TVGUIDE_SETUP_H
|
#ifndef __TVGUIDE_SETUP_H
|
||||||
#define __TVGUIDE_SETUP_H
|
#define __TVGUIDE_SETUP_H
|
||||||
|
|
||||||
|
#include <vdr/menuitems.h>
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
class cTvguideSetup : public cMenuSetupPage {
|
class cTvguideSetup : public cMenuSetupPage {
|
||||||
public:
|
public:
|
||||||
cTvguideSetup(void);
|
cTvguideSetup(void);
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#include "tools.h"
|
||||||
|
#include "services/tvscraper.h"
|
||||||
|
#include "imageloader.h"
|
||||||
#include "statusheader.h"
|
#include "statusheader.h"
|
||||||
|
|
||||||
cStatusHeader::cStatusHeader(void) {
|
cStatusHeader::cStatusHeader(void) {
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef __TVGUIDE_STATUSHEADER_H
|
#ifndef __TVGUIDE_STATUSHEADER_H
|
||||||
#define __TVGUIDE_STATUSHEADER_H
|
#define __TVGUIDE_STATUSHEADER_H
|
||||||
|
|
||||||
|
#include "styledpixmap.h"
|
||||||
|
#include "grid.h"
|
||||||
|
|
||||||
// --- cStatusHeader -------------------------------------------------------------
|
// --- cStatusHeader -------------------------------------------------------------
|
||||||
|
|
||||||
class cStatusHeader : public cStyledPixmap {
|
class cStatusHeader : public cStyledPixmap {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "imageloader.h"
|
||||||
#include "styledpixmap.h"
|
#include "styledpixmap.h"
|
||||||
|
|
||||||
cStyledPixmap::cStyledPixmap(void) {
|
cStyledPixmap::cStyledPixmap(void) {
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
#ifndef __TVGUIDE_STYLEDPIXMAP_H
|
#ifndef __TVGUIDE_STYLEDPIXMAP_H
|
||||||
#define __TVGUIDE_STYLEDPIXMAP_H
|
#define __TVGUIDE_STYLEDPIXMAP_H
|
||||||
|
|
||||||
|
#include <vdr/osd.h>
|
||||||
|
#include <vdr/epg.h>
|
||||||
|
#include "timer.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
// --- cStyledPixmap -------------------------------------------------------------
|
// --- cStyledPixmap -------------------------------------------------------------
|
||||||
|
|
||||||
class cStyledPixmap {
|
class cStyledPixmap {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "imageloader.h"
|
||||||
#include "timeline.h"
|
#include "timeline.h"
|
||||||
|
|
||||||
cTimeLine::cTimeLine(cMyTime *myTime) {
|
cTimeLine::cTimeLine(cMyTime *myTime) {
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef __TVGUIDE_TIMELINE_H
|
#ifndef __TVGUIDE_TIMELINE_H
|
||||||
#define __TVGUIDE_TIMELINE_H
|
#define __TVGUIDE_TIMELINE_H
|
||||||
|
|
||||||
|
#include "timer.h"
|
||||||
|
#include "styledpixmap.h"
|
||||||
|
|
||||||
// --- cTimeLine -------------------------------------------------------------
|
// --- cTimeLine -------------------------------------------------------------
|
||||||
|
|
||||||
class cTimeLine {
|
class cTimeLine {
|
||||||
|
3
timer.c
3
timer.c
@ -1,3 +1,6 @@
|
|||||||
|
#include <time.h>
|
||||||
|
#include <vdr/tools.h>
|
||||||
|
#include "config.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
cMyTime::~cMyTime(void) {
|
cMyTime::~cMyTime(void) {
|
||||||
|
2
timer.h
2
timer.h
@ -1,6 +1,8 @@
|
|||||||
#ifndef __TVGUIDE_TIMER_H
|
#ifndef __TVGUIDE_TIMER_H
|
||||||
#define __TVGUIDE_TIMER_H
|
#define __TVGUIDE_TIMER_H
|
||||||
|
|
||||||
|
#include <vdr/tools.h>
|
||||||
|
|
||||||
// --- cMyTime -------------------------------------------------------------
|
// --- cMyTime -------------------------------------------------------------
|
||||||
|
|
||||||
class cMyTime {
|
class cMyTime {
|
||||||
|
62
tools.c
62
tools.c
@ -1,11 +1,17 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "tools.h"
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* CUTTEXT
|
* CUTTEXT
|
||||||
****************************************************************************************/
|
****************************************************************************************/
|
||||||
static std::string CutText(std::string text, int width, const cFont *font) {
|
std::string CutText(std::string text, int width, const cFont *font) {
|
||||||
if (width <= font->Size())
|
if (width <= font->Size())
|
||||||
return text.c_str();
|
return text.c_str();
|
||||||
if (font->Width(text.c_str()) < width)
|
if (font->Width(text.c_str()) < width)
|
||||||
@ -35,13 +41,6 @@ static std::string CutText(std::string text, int width, const cFont *font) {
|
|||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* SPLTSTRING
|
* SPLTSTRING
|
||||||
****************************************************************************************/
|
****************************************************************************************/
|
||||||
class splitstring : public std::string {
|
|
||||||
std::vector<std::string> flds;
|
|
||||||
public:
|
|
||||||
splitstring(const char *s) : std::string(s) { };
|
|
||||||
std::vector<std::string>& split(char delim, int rep=0);
|
|
||||||
};
|
|
||||||
|
|
||||||
// split: receives a char delimiter; returns a vector of strings
|
// split: receives a char delimiter; returns a vector of strings
|
||||||
// By default ignores repeated delimiters, unless argument rep == 1.
|
// By default ignores repeated delimiters, unless argument rep == 1.
|
||||||
std::vector<std::string>& splitstring::split(char delim, int rep) {
|
std::vector<std::string>& splitstring::split(char delim, int rep) {
|
||||||
@ -82,53 +81,6 @@ int FindIgnoreCase(const std::string& expr, const std::string& query)
|
|||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* FUZZYSEARCH
|
* FUZZYSEARCH
|
||||||
****************************************************************************************/
|
****************************************************************************************/
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#ifndef _AFUZZY_H
|
|
||||||
#define _AFUZZY_H
|
|
||||||
|
|
||||||
// source from:
|
|
||||||
/*
|
|
||||||
Leonid Boitsov 2002. (itman@narod.ru)
|
|
||||||
C version of Stas Namin.
|
|
||||||
This code is a GPL software and is distributed under GNU
|
|
||||||
public licence without any warranty.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef unsigned int Uint;
|
|
||||||
|
|
||||||
#define MaxPatSize (sizeof(Uint) * 8)
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
Uint *R,
|
|
||||||
*R1,
|
|
||||||
*RP,
|
|
||||||
*S,
|
|
||||||
*RI;
|
|
||||||
Uint *FilterS;
|
|
||||||
|
|
||||||
int Map[256];
|
|
||||||
int FilterMap[256];
|
|
||||||
int k;
|
|
||||||
Uint mask_ok;
|
|
||||||
Uint filter_ok;
|
|
||||||
Uint filter_shift;
|
|
||||||
int r_size;
|
|
||||||
int FilterSet;
|
|
||||||
} AFUZZY;
|
|
||||||
|
|
||||||
void afuzzy_init(const char *p, int kerr, int UseFilter, AFUZZY *fuzzy);
|
|
||||||
void afuzzy_free(AFUZZY *fuzzy);
|
|
||||||
int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy);
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
FUNCTION afuzzy_init()
|
FUNCTION afuzzy_init()
|
||||||
|
59
tools.h
Normal file
59
tools.h
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#ifndef __TVGUIDETOOLS_H
|
||||||
|
#define __TVGUIDETOOLS_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <vdr/font.h>
|
||||||
|
|
||||||
|
std::string CutText(std::string text, int width, const cFont *font);
|
||||||
|
|
||||||
|
class splitstring : public std::string {
|
||||||
|
std::vector<std::string> flds;
|
||||||
|
public:
|
||||||
|
splitstring(const char *s) : std::string(s) { };
|
||||||
|
std::vector<std::string>& split(char delim, int rep=0);
|
||||||
|
};
|
||||||
|
|
||||||
|
int FindIgnoreCase(const std::string& expr, const std::string& query);
|
||||||
|
|
||||||
|
#ifndef _AFUZZY_H
|
||||||
|
#define _AFUZZY_H
|
||||||
|
|
||||||
|
// source from:
|
||||||
|
/*
|
||||||
|
Leonid Boitsov 2002. (itman@narod.ru)
|
||||||
|
C version of Stas Namin.
|
||||||
|
This code is a GPL software and is distributed under GNU
|
||||||
|
public licence without any warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef unsigned int Uint;
|
||||||
|
|
||||||
|
#define MaxPatSize (sizeof(Uint) * 8)
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
Uint *R,
|
||||||
|
*R1,
|
||||||
|
*RP,
|
||||||
|
*S,
|
||||||
|
*RI;
|
||||||
|
Uint *FilterS;
|
||||||
|
|
||||||
|
int Map[256];
|
||||||
|
int FilterMap[256];
|
||||||
|
int k;
|
||||||
|
Uint mask_ok;
|
||||||
|
Uint filter_ok;
|
||||||
|
Uint filter_shift;
|
||||||
|
int r_size;
|
||||||
|
int FilterSet;
|
||||||
|
} AFUZZY;
|
||||||
|
|
||||||
|
void afuzzy_init(const char *p, int kerr, int UseFilter, AFUZZY *fuzzy);
|
||||||
|
void afuzzy_free(AFUZZY *fuzzy);
|
||||||
|
int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy);
|
||||||
|
static int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __TVGUIDETOOLS_H
|
15
tvguide.c
15
tvguide.c
@ -13,14 +13,16 @@
|
|||||||
#include <vdr/device.h>
|
#include <vdr/device.h>
|
||||||
#include <vdr/menu.h>
|
#include <vdr/menu.h>
|
||||||
|
|
||||||
#include "tvguideosd.c"
|
#define DEFINE_CONFIG 1
|
||||||
|
#include "config.h"
|
||||||
|
#include "setup.h"
|
||||||
|
#include "tvguideosd.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined(APIVERSNUM) && APIVERSNUM < 20000
|
#if defined(APIVERSNUM) && APIVERSNUM < 20000
|
||||||
#error "VDR-2.0.0 API version or greater is required!"
|
#error "VDR-2.0.0 API version or greater is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static const char *VERSION = "1.1.0";
|
static const char *VERSION = "1.1.0";
|
||||||
static const char *DESCRIPTION = "A fancy 2d EPG Viewer";
|
static const char *DESCRIPTION = "A fancy 2d EPG Viewer";
|
||||||
static const char *MAINMENUENTRY = "Tvguide";
|
static const char *MAINMENUENTRY = "Tvguide";
|
||||||
@ -115,9 +117,10 @@ bool cPluginTvguide::ProcessArgs(int argc, char *argv[])
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cPluginTvguide::Initialize(void)
|
bool cPluginTvguide::Initialize(void) {
|
||||||
{
|
esyslog("tvguide: Initialize");
|
||||||
// Initialize any background activities the plugin shall perform.
|
esyslog("tvguide: OSD Wwidth %d, OSD Height %d", cOsd::OsdWidth(), cOsd::OsdHeight());
|
||||||
|
esyslog("tvguide: numRows: %d, numCols: %d", tvguideConfig.channelRows, tvguideConfig.channelCols);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
92
tvguideosd.c
92
tvguideosd.c
@ -1,94 +1,14 @@
|
|||||||
// --- Theme -------------------------------------------------------------
|
#include <stdlib.h>
|
||||||
static cTheme theme;
|
#include <vector>
|
||||||
|
|
||||||
//BLENDING SETUP
|
|
||||||
#define CLR_BLENDING_NOPACITY 0xFFFFFFFF
|
|
||||||
#define CLR_BLENDING_DEFAULT 0xAAAAAAAA
|
|
||||||
#define CLR_BLENDING_OFF 0x00000000
|
|
||||||
|
|
||||||
THEME_CLR(theme, clrDoBlending, CLR_BLENDING_DEFAULT);
|
|
||||||
THEME_CLR(theme, clrBackgroundOSD, clrBlack);
|
|
||||||
THEME_CLR(theme, clrBackground, clrBlack);
|
|
||||||
THEME_CLR(theme, clrGrid1, 0xFF404749);
|
|
||||||
THEME_CLR(theme, clrGrid1Blending, 0xFF000000);
|
|
||||||
THEME_CLR(theme, clrGrid2, 0xFF20293F);
|
|
||||||
THEME_CLR(theme, clrGrid2Blending, 0xFF000000);
|
|
||||||
THEME_CLR(theme, clrHighlight, 0xFFFF4D00);
|
|
||||||
THEME_CLR(theme, clrHighlightBlending, 0xFF000000);
|
|
||||||
THEME_CLR(theme, clrFont, clrWhite);
|
|
||||||
THEME_CLR(theme, clrFontActive, clrWhite);
|
|
||||||
THEME_CLR(theme, clrFontHeader, clrWhite);
|
|
||||||
THEME_CLR(theme, clrFontButtons, clrWhite);
|
|
||||||
THEME_CLR(theme, clrStatusHeader, clrBlack);
|
|
||||||
THEME_CLR(theme, clrStatusHeaderBlending, clrBlack);
|
|
||||||
THEME_CLR(theme, clrHeader, clrBlack);
|
|
||||||
THEME_CLR(theme, clrHeaderBlending, 0xFFE0E0E0);
|
|
||||||
THEME_CLR(theme, clrBorder, clrWhite);
|
|
||||||
THEME_CLR(theme, clrTimeline1, clrWhite);
|
|
||||||
THEME_CLR(theme, clrTimeline1Blending, 0xFF828282);
|
|
||||||
THEME_CLR(theme, clrTimeline2, clrBlack);
|
|
||||||
THEME_CLR(theme, clrTimeline2Blending, 0xFF3F3F3F);
|
|
||||||
THEME_CLR(theme, clrButtonRed, 0x99BB0000);
|
|
||||||
THEME_CLR(theme, clrButtonRedBorder, 0xFFBB0000);
|
|
||||||
THEME_CLR(theme, clrButtonGreen, 0x9900BB00);
|
|
||||||
THEME_CLR(theme, clrButtonGreenBorder, 0xFF00BB00);
|
|
||||||
THEME_CLR(theme, clrButtonYellow, 0x99BBBB00);
|
|
||||||
THEME_CLR(theme, clrButtonYellowBorder, 0xFFBBBB00);
|
|
||||||
THEME_CLR(theme, clrButtonBlue, 0x990000BB);
|
|
||||||
THEME_CLR(theme, clrButtonBlueBorder, 0xFF0000BB);
|
|
||||||
THEME_CLR(theme, clrButtonBlend, 0xDD000000);
|
|
||||||
THEME_CLR(theme, clrRecMenuBackground, 0xB0000000);
|
|
||||||
THEME_CLR(theme, clrRecMenuTimerConflictBackground, 0xFFCCCCCC);
|
|
||||||
THEME_CLR(theme, clrRecMenuTimerConflictBar, 0xFF222222);
|
|
||||||
THEME_CLR(theme, clrRecMenuTimerConflictOverlap, 0xAAFF0000);
|
|
||||||
THEME_CLR(theme, clrRecMenuDayActive, 0xFF00FF00);
|
|
||||||
THEME_CLR(theme, clrRecMenuDayInactive, 0xFFFF0000);
|
|
||||||
THEME_CLR(theme, clrRecMenuDayHighlight, 0x44FFFFFF);
|
|
||||||
THEME_CLR(theme, clrRecMenuTextBack, 0xFF000000);
|
|
||||||
THEME_CLR(theme, clrRecMenuTextActiveBack, 0xFF404749);
|
|
||||||
THEME_CLR(theme, clrRecMenuKeyboardBack, 0xFF000000);
|
|
||||||
THEME_CLR(theme, clrRecMenuKeyboardBorder, clrWhite);
|
|
||||||
THEME_CLR(theme, clrRecMenuKeyboardHigh, 0x55FFFFFF);
|
|
||||||
THEME_CLR(theme, clrButtonRedKeyboard, 0xFFBB0000);
|
|
||||||
THEME_CLR(theme, clrButtonGreenKeyboard, 0xFF00BB00);
|
|
||||||
THEME_CLR(theme, clrButtonYellowKeyboard, 0xFFBBBB00);
|
|
||||||
|
|
||||||
#include "config.c"
|
|
||||||
cTvguideConfig tvguideConfig;
|
|
||||||
|
|
||||||
#include "osdmanager.c"
|
|
||||||
cOsdManager osdManager;
|
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
#include "services/epgsearch.h"
|
#include "services/epgsearch.h"
|
||||||
#include "services/remotetimers.h"
|
#include "services/remotetimers.h"
|
||||||
cPlugin* pRemoteTimers = NULL;
|
|
||||||
#include <vector>
|
#include "tools.h"
|
||||||
#include "services/tvscraper.h"
|
#include "setup.h"
|
||||||
#include "tools.c"
|
|
||||||
#include "switchtimer.c"
|
|
||||||
#include "setup.c"
|
|
||||||
#include "imageloader.c"
|
|
||||||
#include "styledpixmap.c"
|
|
||||||
#include "timer.c"
|
|
||||||
#include "timeline.c"
|
|
||||||
#include "grid.c"
|
|
||||||
#include "headergrid.c"
|
|
||||||
#include "dummygrid.c"
|
|
||||||
#include "epggrid.c"
|
|
||||||
#include "statusheader.c"
|
|
||||||
#include "detailview.c"
|
|
||||||
#include "channelcolumn.c"
|
|
||||||
#include "channelgroup.c"
|
|
||||||
#include "channelgroups.c"
|
|
||||||
#include "footer.c"
|
|
||||||
#include "recmenuitem.c"
|
|
||||||
#include "recmenu.c"
|
|
||||||
#include "recmanager.c"
|
|
||||||
#include "recmenus.c"
|
|
||||||
#include "recmenumanager.c"
|
|
||||||
|
|
||||||
#include "tvguideosd.h"
|
#include "tvguideosd.h"
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
cTvGuideOsd::cTvGuideOsd(void) {
|
cTvGuideOsd::cTvGuideOsd(void) {
|
||||||
detailView = NULL;
|
detailView = NULL;
|
||||||
|
10
tvguideosd.h
10
tvguideosd.h
@ -1,6 +1,16 @@
|
|||||||
#ifndef __TVGUIDE_TVGUIDEOSD_H
|
#ifndef __TVGUIDE_TVGUIDEOSD_H
|
||||||
#define __TVGUIDE_TVGUIDEOSD_H
|
#define __TVGUIDE_TVGUIDEOSD_H
|
||||||
|
|
||||||
|
#include "timer.h"
|
||||||
|
#include "grid.h"
|
||||||
|
#include "channelcolumn.h"
|
||||||
|
#include "statusheader.h"
|
||||||
|
#include "detailview.h"
|
||||||
|
#include "timeline.h"
|
||||||
|
#include "channelgroups.h"
|
||||||
|
#include "footer.h"
|
||||||
|
#include "recmenumanager.h"
|
||||||
|
|
||||||
// --- cTvGuideOsd -------------------------------------------------------------
|
// --- cTvGuideOsd -------------------------------------------------------------
|
||||||
|
|
||||||
class cTvGuideOsd : public cOsdObject {
|
class cTvGuideOsd : public cOsdObject {
|
||||||
|
Loading…
Reference in New Issue
Block a user