mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
expose vdrstatus to displaymenu
This commit is contained in:
parent
0159d536d0
commit
3aae0169b4
@ -62,6 +62,7 @@ enum class eVeDisplayMenu {
|
||||
header,
|
||||
datetime,
|
||||
time,
|
||||
vdrstatus,
|
||||
sortmode,
|
||||
colorbuttons,
|
||||
message,
|
||||
|
@ -108,6 +108,7 @@ void cViewMenu::SetViewElements(void) {
|
||||
viewElementNames.insert(pair<string, int>("header", (int)eVeDisplayMenu::header));
|
||||
viewElementNames.insert(pair<string, int>("datetime", (int)eVeDisplayMenu::datetime));
|
||||
viewElementNames.insert(pair<string, int>("time", (int)eVeDisplayMenu::time));
|
||||
viewElementNames.insert(pair<string, int>("vdrstatus", (int)eVeDisplayMenu::vdrstatus));
|
||||
viewElementNames.insert(pair<string, int>("colorbuttons", (int)eVeDisplayMenu::colorbuttons));
|
||||
viewElementNames.insert(pair<string, int>("message", (int)eVeDisplayMenu::message));
|
||||
viewElementNames.insert(pair<string, int>("scrollbar", (int)eVeDisplayMenu::scrollbar));
|
||||
@ -629,6 +630,7 @@ cSubView::cSubView(const char *name) {
|
||||
header = NULL;
|
||||
datetime = NULL;
|
||||
time = NULL;
|
||||
vdrstatus = NULL;
|
||||
message = NULL;
|
||||
sortmode = NULL;
|
||||
colorbuttons = NULL;
|
||||
@ -693,6 +695,10 @@ void cSubView::SetViewElement(eVeDisplayMenu ve, cViewElement *viewElement) {
|
||||
if (!time)
|
||||
time = dynamic_cast<cVeTime*>(viewElement);
|
||||
break;
|
||||
case eVeDisplayMenu::vdrstatus:
|
||||
if (!vdrstatus)
|
||||
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElement);
|
||||
break;
|
||||
case eVeDisplayMenu::message:
|
||||
if (!message)
|
||||
message = dynamic_cast<cVeMessage*>(viewElement);
|
||||
@ -735,6 +741,10 @@ void cSubView::SetViewElementHorizontal(eVeDisplayMenu ve, cViewElement *viewEle
|
||||
if (!time)
|
||||
time = dynamic_cast<cVeTime*>(viewElement);
|
||||
break;
|
||||
case eVeDisplayMenu::vdrstatus:
|
||||
if (!vdrstatus)
|
||||
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElement);
|
||||
break;
|
||||
case eVeDisplayMenu::message:
|
||||
if (!message)
|
||||
message = dynamic_cast<cVeMessage*>(viewElement);
|
||||
@ -866,6 +876,7 @@ void cSubView::Clear(void) {
|
||||
if (background) background->Hide();
|
||||
if (datetime) datetime->Hide();
|
||||
if (time) time->Hide();
|
||||
if (vdrstatus) vdrstatus->Hide();
|
||||
if (header) header->Hide();
|
||||
if (colorbuttons) colorbuttons->Hide();
|
||||
if (scrollbar) scrollbar->Hide();
|
||||
@ -902,6 +913,11 @@ void cSubView::DrawDynamicVEs(void) {
|
||||
time->Render();
|
||||
}
|
||||
}
|
||||
if (vdrstatus) {
|
||||
vdrstatus->Show();
|
||||
if (vdrstatus->Parse())
|
||||
vdrstatus->Render();
|
||||
}
|
||||
}
|
||||
|
||||
void cSubView::DrawList(void) {
|
||||
@ -949,6 +965,11 @@ void cSubView::SetViewElementObjects(void) {
|
||||
else if (viewElements[(int)eVeDisplayMenu::time])
|
||||
time = dynamic_cast<cVeTime*>(viewElements[(int)eVeDisplayMenu::time]);
|
||||
|
||||
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenu::vdrstatus])
|
||||
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElementsHorizontal[(int)eVeDisplayMenu::vdrstatus]);
|
||||
else if (viewElements[(int)eVeDisplayMenu::message])
|
||||
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElements[(int)eVeDisplayMenu::vdrstatus]);
|
||||
|
||||
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenu::message])
|
||||
message = dynamic_cast<cVeMessage*>(viewElementsHorizontal[(int)eVeDisplayMenu::message]);
|
||||
else if (viewElements[(int)eVeDisplayMenu::message])
|
||||
@ -986,6 +1007,7 @@ void cSubView::SetViewElements(void) {
|
||||
viewElementNames.insert(pair<string, int>("background", (int)eVeDisplayMenu::background));
|
||||
viewElementNames.insert(pair<string, int>("header", (int)eVeDisplayMenu::header));
|
||||
viewElementNames.insert(pair<string, int>("datetime", (int)eVeDisplayMenu::datetime));
|
||||
viewElementNames.insert(pair<string, int>("vdrstatus", (int)eVeDisplayMenu::vdrstatus));
|
||||
viewElementNames.insert(pair<string, int>("time", (int)eVeDisplayMenu::time));
|
||||
viewElementNames.insert(pair<string, int>("colorbuttons", (int)eVeDisplayMenu::colorbuttons));
|
||||
viewElementNames.insert(pair<string, int>("message", (int)eVeDisplayMenu::message));
|
||||
@ -1059,7 +1081,7 @@ cViewMenuMain::cViewMenuMain(const char *name) : cSubView(name) {
|
||||
load = NULL;
|
||||
memory = NULL;
|
||||
vdrstats = NULL;
|
||||
vdrstatus = NULL;
|
||||
// vdrstatus = NULL;
|
||||
temperatures = NULL;
|
||||
currentSchedule = NULL;
|
||||
lastRecordings = NULL;
|
||||
@ -1625,6 +1647,11 @@ void cViewMenuDetail::DrawDynamicVEs(void) {
|
||||
if (time->Parse())
|
||||
time->Render();
|
||||
}
|
||||
if (vdrstatus) {
|
||||
vdrstatus->Show();
|
||||
if (vdrstatus->Parse())
|
||||
vdrstatus->Render();
|
||||
}
|
||||
}
|
||||
|
||||
void cViewMenuDetail::DrawDetailedView(void) {
|
||||
|
@ -120,6 +120,7 @@ protected:
|
||||
cVeDmHeader *header;
|
||||
cVeDateTime *datetime;
|
||||
cVeTime *time;
|
||||
cVeDmVdrstatus *vdrstatus;
|
||||
cVeMessage *message;
|
||||
cVeDmSortmode *sortmode;
|
||||
cVeDmColorbuttons *colorbuttons;
|
||||
@ -188,7 +189,7 @@ private:
|
||||
cVeDmSystemload *load;
|
||||
cVeDmSystemmemory *memory;
|
||||
cVeDmVdrstatistics *vdrstats;
|
||||
cVeDmVdrstatus *vdrstatus;
|
||||
// cVeDmVdrstatus *vdrstatus;
|
||||
cVeDmTemperatures *temperatures;
|
||||
cVeDmCurrentschedule *currentSchedule;
|
||||
cVeDmLastrecordings *lastRecordings;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<!ENTITY % functions SYSTEM "functions.dtd">
|
||||
|
||||
<!ELEMENT displaymenu (background,header,datetime,time*,message,sortmode*,colorbuttons,scrollbar*,
|
||||
<!ELEMENT displaymenu (background,header,datetime,time*,vdrstatus*,message,sortmode*,colorbuttons,scrollbar*,
|
||||
menudefault,menumain*,menusetup*,menuschedules*,
|
||||
menutimers*,menuchannels*,menurecordings*,
|
||||
menudetailedepg,menudetailedrecording,
|
||||
@ -330,7 +330,7 @@
|
||||
>
|
||||
|
||||
<!ELEMENT menumain (background | header | datetime | time | colorbuttons | scrollbar | sortmode | timers |
|
||||
discusage | devices | systemload | systemmemory | vdrstatistics | vdrstatus | temperatures | currentschedule |
|
||||
discusage | devices | systemload | systemmemory | vdrstatistics | vdrstatus* | temperatures | currentschedule |
|
||||
currentweather | lastrecordings | customtokens | menuitems)*>
|
||||
<!ATTLIST menumain
|
||||
x CDATA #REQUIRED
|
||||
|
Loading…
Reference in New Issue
Block a user