Rename recmenumanager.* to recmenuview.*

This commit is contained in:
kamel5 2019-07-10 17:35:55 +02:00
parent 194aa06a4e
commit 27e9004629
6 changed files with 34 additions and 34 deletions

View File

@ -60,7 +60,7 @@ endif
### The object files (add further files here): ### The object files (add further files here):
OBJS = $(PLUGIN).o channelcolumn.o channelgroup.o channelgroups.o channeljump.o config.o detailview.o dummygrid.o epggrid.o fontmanager.o footer.o geometrymanager.o grid.o headergrid.o imagecache.o imageloader.o imagemagickwrapper.o imagescaler.o osdmanager.o recmanager.o recmenu.o recmenuitem.o recmenumanager.o recmenus.o searchtimer.o setup.o statusheader.o styledpixmap.o switchtimer.o timeline.o timer.o timerconflict.o tools.o tvguideosd.o view.o OBJS = $(PLUGIN).o channelcolumn.o channelgroup.o channelgroups.o channeljump.o config.o detailview.o dummygrid.o epggrid.o fontmanager.o footer.o geometrymanager.o grid.o headergrid.o imagecache.o imageloader.o imagemagickwrapper.o imagescaler.o osdmanager.o recmanager.o recmenu.o recmenuitem.o recmenuview.o recmenus.o searchtimer.o setup.o statusheader.o styledpixmap.o switchtimer.o timeline.o timer.o timerconflict.o tools.o tvguideosd.o view.o
### The main target: ### The main target:

View File

@ -1,6 +1,6 @@
#include "services/remotetimers.h" #include "services/remotetimers.h"
#include "tools.h" #include "tools.h"
#include "recmenumanager.h" #include "recmenuview.h"
#include "recmenus.h" #include "recmenus.h"
// --- cRecMenuMain --------------------------------------------------------- // --- cRecMenuMain ---------------------------------------------------------

View File

@ -2,9 +2,9 @@
#include "recmenus.h" #include "recmenus.h"
#include "switchtimer.h" #include "switchtimer.h"
#include "timerconflict.h" #include "timerconflict.h"
#include "recmenumanager.h" #include "recmenuview.h"
cRecMenuManager::cRecMenuManager(void) { cRecMenuView::cRecMenuView(void) {
footer = NULL; footer = NULL;
active = false; active = false;
activeMenu = NULL; activeMenu = NULL;
@ -16,7 +16,7 @@ cRecMenuManager::cRecMenuManager(void) {
detailViewActive = false; detailViewActive = false;
} }
cRecMenuManager::~cRecMenuManager(void) { cRecMenuView::~cRecMenuView(void) {
if (activeMenu) { if (activeMenu) {
active = false; active = false;
delete activeMenu; delete activeMenu;
@ -29,7 +29,7 @@ cRecMenuManager::~cRecMenuManager(void) {
delete recManager; delete recManager;
} }
void cRecMenuManager::Start(const cEvent *event) { void cRecMenuView::Start(const cEvent *event) {
active = true; active = true;
activeMenuBuffer = NULL; activeMenuBuffer = NULL;
detailViewActive = false; detailViewActive = false;
@ -40,7 +40,7 @@ void cRecMenuManager::Start(const cEvent *event) {
osdManager.flush(); osdManager.flush();
} }
void cRecMenuManager::StartFavorites(void) { void cRecMenuView::StartFavorites(void) {
active = true; active = true;
activeMenuBuffer = NULL; activeMenuBuffer = NULL;
detailViewActive = false; detailViewActive = false;
@ -53,7 +53,7 @@ void cRecMenuManager::StartFavorites(void) {
} }
void cRecMenuManager::Close(void) { void cRecMenuView::Close(void) {
event = NULL; event = NULL;
active = false; active = false;
if (activeMenu) { if (activeMenu) {
@ -67,7 +67,7 @@ void cRecMenuManager::Close(void) {
DeleteBackground(); DeleteBackground();
} }
void cRecMenuManager::SetBackground(void) { void cRecMenuView::SetBackground(void) {
int backgroundWidth = geoManager.osdWidth; int backgroundWidth = geoManager.osdWidth;
int backgroundHeight = geoManager.osdHeight; int backgroundHeight = geoManager.osdHeight;
pixmapBackground = osdManager.requestPixmap(3, cRect(0, 0, backgroundWidth, backgroundHeight)); pixmapBackground = osdManager.requestPixmap(3, cRect(0, 0, backgroundWidth, backgroundHeight));
@ -80,11 +80,11 @@ void cRecMenuManager::SetBackground(void) {
} }
} }
void cRecMenuManager::DeleteBackground(void) { void cRecMenuView::DeleteBackground(void) {
osdManager.releasePixmap(pixmapBackground); osdManager.releasePixmap(pixmapBackground);
} }
eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) { eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
eOSState state = osContinue; eOSState state = osContinue;
switch (nextState) { switch (nextState) {
/*************************************************************************************** /***************************************************************************************
@ -837,7 +837,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
return state; return state;
} }
void cRecMenuManager::DisplayFavoriteResults(std::string header, const cEvent **result, int numResults) { void cRecMenuView::DisplayFavoriteResults(std::string header, const cEvent **result, int numResults) {
if (numResults) { if (numResults) {
activeMenuBuffer = activeMenu; activeMenuBuffer = activeMenu;
activeMenuBuffer->Hide(); activeMenuBuffer->Hide();
@ -851,7 +851,7 @@ void cRecMenuManager::DisplayFavoriteResults(std::string header, const cEvent **
} }
} }
void cRecMenuManager::DisplaySearchTimerList(void) { void cRecMenuView::DisplaySearchTimerList(void) {
delete activeMenu; delete activeMenu;
std::vector<cTVGuideSearchTimer> searchTimers; std::vector<cTVGuideSearchTimer> searchTimers;
recManager->GetSearchTimers(&searchTimers); recManager->GetSearchTimers(&searchTimers);
@ -859,7 +859,7 @@ void cRecMenuManager::DisplaySearchTimerList(void) {
activeMenu->Display(); activeMenu->Display();
} }
bool cRecMenuManager::DisplayTimerConflict(const cTimer *timer) { bool cRecMenuView::DisplayTimerConflict(const cTimer *timer) {
int timerID = 0; int timerID = 0;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_TIMERS_READ; LOCK_TIMERS_READ;
@ -874,7 +874,7 @@ bool cRecMenuManager::DisplayTimerConflict(const cTimer *timer) {
return false; return false;
} }
bool cRecMenuManager::DisplayTimerConflict(int timerID) { bool cRecMenuView::DisplayTimerConflict(int timerID) {
if (timerConflicts) if (timerConflicts)
delete timerConflicts; delete timerConflicts;
timerConflicts = recManager->CheckTimerConflict(); timerConflicts = recManager->CheckTimerConflict();
@ -893,7 +893,7 @@ bool cRecMenuManager::DisplayTimerConflict(int timerID) {
return false; return false;
} }
void cRecMenuManager::DisplayDetailedView(const cEvent *ev) { void cRecMenuView::DisplayDetailedView(const cEvent *ev) {
activeMenu->Hide(); activeMenu->Hide();
detailView = new cDetailView(ev, footer); detailView = new cDetailView(ev, footer);
footer->SetDetailedViewMode(true); footer->SetDetailedViewMode(true);
@ -901,7 +901,7 @@ void cRecMenuManager::DisplayDetailedView(const cEvent *ev) {
detailViewActive = true; detailViewActive = true;
} }
eOSState cRecMenuManager::ProcessKey(eKeys Key) { eOSState cRecMenuView::ProcessKey(eKeys Key) {
eOSState state = osContinue; eOSState state = osContinue;
eRecMenuState nextState = rmsContinue; eRecMenuState nextState = rmsContinue;
if (!activeMenu) if (!activeMenu)

View File

@ -1,13 +1,13 @@
#ifndef __TVGUIDE_RECMENUMANAGER_H #ifndef __TVGUIDE_RECMENUVIEW_H
#define __TVGUIDE_RECMENUMANAGER_H #define __TVGUIDE_RECMENUVIEW_H
#include "recmenu.h" #include "recmenu.h"
#include "recmanager.h" #include "recmanager.h"
#include "services/epgsearch.h" #include "services/epgsearch.h"
#include "footer.h" #include "footer.h"
// --- cRecMenuManager ------------------------------------------------------------- // --- cRecMenuView -------------------------------------------------------------
class cRecMenuManager { class cRecMenuView {
private: private:
cFooter *footer; cFooter *footer;
bool active; bool active;
@ -30,8 +30,8 @@ private:
void DisplayFavoriteResults(std::string header, const cEvent **result, int numResults); void DisplayFavoriteResults(std::string header, const cEvent **result, int numResults);
eOSState StateMachine(eRecMenuState nextState); eOSState StateMachine(eRecMenuState nextState);
public: public:
cRecMenuManager(void); cRecMenuView(void);
virtual ~cRecMenuManager(void); virtual ~cRecMenuView(void);
void SetFooter(cFooter *footer) { this->footer = footer; }; void SetFooter(cFooter *footer) { this->footer = footer; };
bool isActive(void) { return active; }; bool isActive(void) { return active; };
void Start(const cEvent *event); void Start(const cEvent *event);
@ -40,4 +40,4 @@ public:
eOSState ProcessKey(eKeys Key); eOSState ProcessKey(eKeys Key);
}; };
#endif //__TVGUIDE_RECMENUMANAGER_H #endif //__TVGUIDE_RECMENUVIEW_H

View File

@ -15,7 +15,7 @@ cTvGuideOsd::cTvGuideOsd(void) {
detailViewActive = false; detailViewActive = false;
activeGrid = NULL; activeGrid = NULL;
timeLine = NULL; timeLine = NULL;
recMenuManager = NULL; recMenuView = NULL;
channelJumper = NULL; channelJumper = NULL;
} }
@ -30,7 +30,7 @@ cTvGuideOsd::~cTvGuideOsd() {
delete timeLine; delete timeLine;
delete channelGroups; delete channelGroups;
delete footer; delete footer;
delete recMenuManager; delete recMenuView;
if (channelJumper) if (channelJumper)
delete channelJumper; delete channelJumper;
osdManager.deleteOsd(); osdManager.deleteOsd();
@ -55,7 +55,7 @@ void cTvGuideOsd::Show(void) {
myTime = new cMyTime(); myTime = new cMyTime();
myTime->Now(); myTime->Now();
SwitchTimers.Load(AddDirectory(cPlugin::ConfigDirectory("epgsearch"), "epgsearchswitchtimers.conf")); SwitchTimers.Load(AddDirectory(cPlugin::ConfigDirectory("epgsearch"), "epgsearchswitchtimers.conf"));
recMenuManager = new cRecMenuManager(); recMenuView = new cRecMenuView();
pRemoteTimers = cPluginManager::CallFirstService("RemoteTimers::RefreshTimers-v1.0", NULL); pRemoteTimers = cPluginManager::CallFirstService("RemoteTimers::RefreshTimers-v1.0", NULL);
if (pRemoteTimers) { if (pRemoteTimers) {
isyslog("tvguide: remotetimers-plugin is available"); isyslog("tvguide: remotetimers-plugin is available");
@ -118,7 +118,7 @@ void cTvGuideOsd::drawOsd() {
channelGroups = new cChannelGroups(); channelGroups = new cChannelGroups();
channelGroups->ReadChannelGroups(); channelGroups->ReadChannelGroups();
footer = new cFooter(channelGroups); footer = new cFooter(channelGroups);
recMenuManager->SetFooter(footer); recMenuView->SetFooter(footer);
footer->drawRedButton(); footer->drawRedButton();
if (tvguideConfig.channelJumpMode == eNumJump) { if (tvguideConfig.channelJumpMode == eNumJump) {
footer->drawGreenButton(); footer->drawGreenButton();
@ -462,7 +462,7 @@ void cTvGuideOsd::processKeyRight() {
void cTvGuideOsd::processKeyRed() { void cTvGuideOsd::processKeyRed() {
if ((activeGrid == NULL) || activeGrid->isDummy()) if ((activeGrid == NULL) || activeGrid->isDummy())
return; return;
recMenuManager->Start(activeGrid->GetEvent()); recMenuView->Start(activeGrid->GetEvent());
} }
void cTvGuideOsd::processKeyGreen() { void cTvGuideOsd::processKeyGreen() {
@ -568,7 +568,7 @@ eOSState cTvGuideOsd::processKeyBlue(bool *alreadyUnlocked) {
} else if (tvguideConfig.blueKeyMode == eBlueKeyEPG) { } else if (tvguideConfig.blueKeyMode == eBlueKeyEPG) {
DetailedEPG(); DetailedEPG();
} else if (tvguideConfig.blueKeyMode == eBlueKeyFavorites) { } else if (tvguideConfig.blueKeyMode == eBlueKeyFavorites) {
recMenuManager->StartFavorites(); recMenuView->StartFavorites();
} }
return osContinue; return osContinue;
} }
@ -717,8 +717,8 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
eOSState state = osContinue; eOSState state = osContinue;
cPixmap::Lock(); cPixmap::Lock();
bool alreadyUnlocked = false; bool alreadyUnlocked = false;
if (recMenuManager->isActive()) { if (recMenuView->isActive()) {
state = recMenuManager->ProcessKey(Key); state = recMenuView->ProcessKey(Key);
if (state == osEnd) { if (state == osEnd) {
SetTimers(); SetTimers();
osdManager.flush(); osdManager.flush();

View File

@ -9,7 +9,7 @@
#include "timeline.h" #include "timeline.h"
#include "channelgroups.h" #include "channelgroups.h"
#include "footer.h" #include "footer.h"
#include "recmenumanager.h" #include "recmenuview.h"
#include "channeljump.h" #include "channeljump.h"
// --- cTvGuideOsd ------------------------------------------------------------- // --- cTvGuideOsd -------------------------------------------------------------
@ -24,7 +24,7 @@ private:
cTimeLine *timeLine; cTimeLine *timeLine;
cChannelGroups *channelGroups; cChannelGroups *channelGroups;
cFooter *footer; cFooter *footer;
cRecMenuManager *recMenuManager; cRecMenuView *recMenuView;
cChannelJump *channelJumper; cChannelJump *channelJumper;
bool detailViewActive; bool detailViewActive;
void drawOsd(); void drawOsd();