mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
add additional vdrstatus exposing "vdrIsRecordingsHandlersActive" and "vdrIsRecording" - can be used in skins for e.g. IDLE/BUSY REC/FREE
This commit is contained in:
parent
700798ba21
commit
0ca96e8b3a
1
HISTORY
1
HISTORY
@ -506,3 +506,4 @@ Version 1.2.15
|
|||||||
|
|
||||||
Upcoming for Version 1.2.16+
|
Upcoming for Version 1.2.16+
|
||||||
- [pbiering] add additional recording flag "isInUse" - can be used in skins for e.g. records in cutting/copy(queue)
|
- [pbiering] add additional recording flag "isInUse" - can be used in skins for e.g. records in cutting/copy(queue)
|
||||||
|
- [pbiering] add additional vdrstatus exposing "vdrIsRecordingsHandlersActive" and "vdrIsRecording" - can be used in skins for e.g. IDLE/BUSY REC/FREE
|
||||||
|
@ -79,6 +79,7 @@ enum class eVeDisplayMenuMain {
|
|||||||
systemmemory,
|
systemmemory,
|
||||||
temperatures,
|
temperatures,
|
||||||
vdrstatistics,
|
vdrstatistics,
|
||||||
|
vdrstatus,
|
||||||
lastrecordings,
|
lastrecordings,
|
||||||
customtokens,
|
customtokens,
|
||||||
count
|
count
|
||||||
@ -735,6 +736,12 @@ enum class eDMVdrstatisticsIT {
|
|||||||
count = 0
|
count = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class eDMVdrstatusIT {
|
||||||
|
vdrIsRecordingsHandlersActive,
|
||||||
|
vdrIsRecording,
|
||||||
|
count
|
||||||
|
};
|
||||||
|
|
||||||
enum class eDMTemperaturesST {
|
enum class eDMTemperaturesST {
|
||||||
count = 0
|
count = 0
|
||||||
};
|
};
|
||||||
|
@ -1059,6 +1059,7 @@ cViewMenuMain::cViewMenuMain(const char *name) : cSubView(name) {
|
|||||||
load = NULL;
|
load = NULL;
|
||||||
memory = NULL;
|
memory = NULL;
|
||||||
vdrstats = NULL;
|
vdrstats = NULL;
|
||||||
|
vdrstatus = NULL;
|
||||||
temperatures = NULL;
|
temperatures = NULL;
|
||||||
currentSchedule = NULL;
|
currentSchedule = NULL;
|
||||||
lastRecordings = NULL;
|
lastRecordings = NULL;
|
||||||
@ -1084,6 +1085,7 @@ void cViewMenuMain::SetViewElements(void) {
|
|||||||
viewElementNames.insert(pair<string, int>("systemload", (int)eVeDisplayMenuMain::systemload));
|
viewElementNames.insert(pair<string, int>("systemload", (int)eVeDisplayMenuMain::systemload));
|
||||||
viewElementNames.insert(pair<string, int>("systemmemory", (int)eVeDisplayMenuMain::systemmemory));
|
viewElementNames.insert(pair<string, int>("systemmemory", (int)eVeDisplayMenuMain::systemmemory));
|
||||||
viewElementNames.insert(pair<string, int>("vdrstatistics", (int)eVeDisplayMenuMain::vdrstatistics));
|
viewElementNames.insert(pair<string, int>("vdrstatistics", (int)eVeDisplayMenuMain::vdrstatistics));
|
||||||
|
viewElementNames.insert(pair<string, int>("vdrstatus", (int)eVeDisplayMenuMain::vdrstatus));
|
||||||
viewElementNames.insert(pair<string, int>("temperatures", (int)eVeDisplayMenuMain::temperatures));
|
viewElementNames.insert(pair<string, int>("temperatures", (int)eVeDisplayMenuMain::temperatures));
|
||||||
viewElementNames.insert(pair<string, int>("lastrecordings", (int)eVeDisplayMenuMain::lastrecordings));
|
viewElementNames.insert(pair<string, int>("lastrecordings", (int)eVeDisplayMenuMain::lastrecordings));
|
||||||
viewElementNames.insert(pair<string, int>("customtokens", (int)eVeDisplayMenuMain::customtokens));
|
viewElementNames.insert(pair<string, int>("customtokens", (int)eVeDisplayMenuMain::customtokens));
|
||||||
@ -1133,6 +1135,11 @@ void cViewMenuMain::SetViewElementObjects(void) {
|
|||||||
else if (viewElements[(int)eVeDisplayMenuMain::vdrstatistics])
|
else if (viewElements[(int)eVeDisplayMenuMain::vdrstatistics])
|
||||||
vdrstats = dynamic_cast<cVeDmVdrstatistics*>(viewElements[(int)eVeDisplayMenuMain::vdrstatistics]);
|
vdrstats = dynamic_cast<cVeDmVdrstatistics*>(viewElements[(int)eVeDisplayMenuMain::vdrstatistics]);
|
||||||
|
|
||||||
|
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenuMain::vdrstatus])
|
||||||
|
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElementsHorizontal[(int)eVeDisplayMenuMain::vdrstatus]);
|
||||||
|
else if (viewElements[(int)eVeDisplayMenuMain::vdrstatus])
|
||||||
|
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElements[(int)eVeDisplayMenuMain::vdrstatus]);
|
||||||
|
|
||||||
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenuMain::temperatures])
|
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenuMain::temperatures])
|
||||||
temperatures = dynamic_cast<cVeDmTemperatures*>(viewElementsHorizontal[(int)eVeDisplayMenuMain::temperatures]);
|
temperatures = dynamic_cast<cVeDmTemperatures*>(viewElementsHorizontal[(int)eVeDisplayMenuMain::temperatures]);
|
||||||
else if (viewElements[(int)eVeDisplayMenuMain::temperatures])
|
else if (viewElements[(int)eVeDisplayMenuMain::temperatures])
|
||||||
@ -1154,6 +1161,7 @@ void cViewMenuMain::SetViewElementObjects(void) {
|
|||||||
if (load) load->SetDetached();
|
if (load) load->SetDetached();
|
||||||
if (memory) memory->SetDetached();
|
if (memory) memory->SetDetached();
|
||||||
if (vdrstats) vdrstats->SetDetached();
|
if (vdrstats) vdrstats->SetDetached();
|
||||||
|
if (vdrstatus) vdrstatus->SetDetached();
|
||||||
if (temperatures) temperatures->SetDetached();
|
if (temperatures) temperatures->SetDetached();
|
||||||
if (timers) timers->SetDetached();
|
if (timers) timers->SetDetached();
|
||||||
if (currentSchedule) currentSchedule->SetDetached();
|
if (currentSchedule) currentSchedule->SetDetached();
|
||||||
@ -1190,6 +1198,10 @@ void cViewMenuMain::Clear(void) {
|
|||||||
vdrstats->Reset();
|
vdrstats->Reset();
|
||||||
vdrstats->Hide();
|
vdrstats->Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vdrstatus) {
|
||||||
|
vdrstatus->Hide();
|
||||||
|
}
|
||||||
|
|
||||||
if (temperatures) {
|
if (temperatures) {
|
||||||
temperatures->Reset();
|
temperatures->Reset();
|
||||||
@ -1283,6 +1295,11 @@ void cViewMenuMain::DrawDynamicVEs(void) {
|
|||||||
if (vdrstats->Parse())
|
if (vdrstats->Parse())
|
||||||
vdrstats->Render();
|
vdrstats->Render();
|
||||||
}
|
}
|
||||||
|
if (vdrstatus) {
|
||||||
|
vdrstatus->Show();
|
||||||
|
if (vdrstatus->Parse())
|
||||||
|
vdrstatus->Render();
|
||||||
|
}
|
||||||
if (temperatures) {
|
if (temperatures) {
|
||||||
temperatures->Show();
|
temperatures->Show();
|
||||||
if (temperatures->Parse())
|
if (temperatures->Parse())
|
||||||
|
@ -188,6 +188,7 @@ private:
|
|||||||
cVeDmSystemload *load;
|
cVeDmSystemload *load;
|
||||||
cVeDmSystemmemory *memory;
|
cVeDmSystemmemory *memory;
|
||||||
cVeDmVdrstatistics *vdrstats;
|
cVeDmVdrstatistics *vdrstats;
|
||||||
|
cVeDmVdrstatus *vdrstatus;
|
||||||
cVeDmTemperatures *temperatures;
|
cVeDmTemperatures *temperatures;
|
||||||
cVeDmCurrentschedule *currentSchedule;
|
cVeDmCurrentschedule *currentSchedule;
|
||||||
cVeDmLastrecordings *lastRecordings;
|
cVeDmLastrecordings *lastRecordings;
|
||||||
@ -322,4 +323,4 @@ public:
|
|||||||
void SetTransparency(int transparency, bool forceDetached = false);
|
void SetTransparency(int transparency, bool forceDetached = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__VIEWDISPLAYMENU_H
|
#endif //__VIEWDISPLAYMENU_H
|
||||||
|
@ -147,6 +147,8 @@ cViewElement *cViewElement::CreateViewElement(const char *name, const char *view
|
|||||||
e = new cVeDmTemperatures();
|
e = new cVeDmTemperatures();
|
||||||
else if (!strcmp(name, "vdrstatistics"))
|
else if (!strcmp(name, "vdrstatistics"))
|
||||||
e = new cVeDmVdrstatistics();
|
e = new cVeDmVdrstatistics();
|
||||||
|
else if (!strcmp(name, "vdrstatus"))
|
||||||
|
e = new cVeDmVdrstatus();
|
||||||
else if (!strcmp(name, "lastrecordings"))
|
else if (!strcmp(name, "lastrecordings"))
|
||||||
e = new cVeDmLastrecordings();
|
e = new cVeDmLastrecordings();
|
||||||
else if (!strcmp(name, "detailheaderepg"))
|
else if (!strcmp(name, "detailheaderepg"))
|
||||||
|
@ -867,6 +867,36 @@ bool cVeDmVdrstatistics::Parse(bool forced) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
|
* cVeDmVdrstatus
|
||||||
|
******************************************************************/
|
||||||
|
cVeDmVdrstatus::cVeDmVdrstatus(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
cVeDmVdrstatus::~cVeDmVdrstatus(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void cVeDmVdrstatus::Close(void) {
|
||||||
|
cViewElement::Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void cVeDmVdrstatus::SetTokenContainer(void) {
|
||||||
|
tokenContainer = new skindesignerapi::cTokenContainer();
|
||||||
|
tokenContainer->DefineIntToken("{vdrIsRecordingsHandlersActive}", (int)eDMVdrstatusIT::vdrIsRecordingsHandlersActive);
|
||||||
|
tokenContainer->DefineIntToken("{vdrIsRecording}", (int)eDMVdrstatusIT::vdrIsRecording);
|
||||||
|
InheritTokenContainer();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cVeDmVdrstatus::Parse(bool forced) {
|
||||||
|
if (!cViewElement::Parse(forced))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
tokenContainer->Clear();
|
||||||
|
tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrIsRecordingsHandlersActive, RecordingsHandler.Active());
|
||||||
|
tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrIsRecording, cRecordControls::Active());
|
||||||
|
SetDirty();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
/******************************************************************
|
||||||
* cVeDmLastrecordings
|
* cVeDmLastrecordings
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
cVeDmLastrecordings::cVeDmLastrecordings(void) {
|
cVeDmLastrecordings::cVeDmLastrecordings(void) {
|
||||||
|
@ -178,6 +178,18 @@ public:
|
|||||||
bool Parse(bool forced = false);
|
bool Parse(bool forced = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/******************************************************************
|
||||||
|
* cVeDmVdrstatus
|
||||||
|
******************************************************************/
|
||||||
|
class cVeDmVdrstatus : public cViewElement {
|
||||||
|
public:
|
||||||
|
cVeDmVdrstatus(void);
|
||||||
|
virtual ~cVeDmVdrstatus(void);
|
||||||
|
void Close(void);
|
||||||
|
void SetTokenContainer(void);
|
||||||
|
bool Parse(bool forced = false);
|
||||||
|
};
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* cVeDmLastrecordings
|
* cVeDmLastrecordings
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
@ -253,4 +265,4 @@ public:
|
|||||||
void SetActiveTab(int activeTab) { SetDirty(); this->activeTab = activeTab; };
|
void SetActiveTab(int activeTab) { SetDirty(); this->activeTab = activeTab; };
|
||||||
bool Parse(bool forced = false);
|
bool Parse(bool forced = false);
|
||||||
};
|
};
|
||||||
#endif //__VIEWELEMENTSDM_H
|
#endif //__VIEWELEMENTSDM_H
|
||||||
|
@ -218,6 +218,20 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<!ELEMENT vdrstatus (areacontainer|area|areascroll)*>
|
||||||
|
<!ATTLIST vdrstatus
|
||||||
|
delay CDATA #IMPLIED
|
||||||
|
orientation CDATA #IMPLIED
|
||||||
|
fadetime CDATA #IMPLIED
|
||||||
|
shifttime CDATA #IMPLIED
|
||||||
|
shifttype CDATA #IMPLIED
|
||||||
|
shiftmode CDATA #IMPLIED
|
||||||
|
startx CDATA #IMPLIED
|
||||||
|
starty CDATA #IMPLIED
|
||||||
|
debug CDATA #IMPLIED
|
||||||
|
condition CDATA #IMPLIED
|
||||||
|
>
|
||||||
|
|
||||||
<!ELEMENT currentschedule (areacontainer|area|areascroll)*>
|
<!ELEMENT currentschedule (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST currentschedule
|
<!ATTLIST currentschedule
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -316,7 +330,7 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT menumain (background | header | datetime | time | colorbuttons | scrollbar | sortmode | timers |
|
<!ELEMENT menumain (background | header | datetime | time | colorbuttons | scrollbar | sortmode | timers |
|
||||||
discusage | devices | systemload | systemmemory | vdrstatistics | temperatures | currentschedule |
|
discusage | devices | systemload | systemmemory | vdrstatistics | vdrstatus | temperatures | currentschedule |
|
||||||
currentweather | lastrecordings | customtokens | menuitems)*>
|
currentweather | lastrecordings | customtokens | menuitems)*>
|
||||||
<!ATTLIST menumain
|
<!ATTLIST menumain
|
||||||
x CDATA #REQUIRED
|
x CDATA #REQUIRED
|
||||||
@ -501,4 +515,4 @@
|
|||||||
debug (true|false) #IMPLIED
|
debug (true|false) #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
%functions;
|
%functions;
|
||||||
|
@ -91,6 +91,13 @@
|
|||||||
<vdrstatistics>
|
<vdrstatistics>
|
||||||
</vdrstatistics>
|
</vdrstatistics>
|
||||||
|
|
||||||
|
<!-- Available Variables vdrstatus
|
||||||
|
{vdrIsRecordingsHandlersActive} true if active RecordingsHandlers (cut,copy,move) aka "busy"
|
||||||
|
{vdrIsRecording} true if active recording
|
||||||
|
-->
|
||||||
|
<vdrstatus>
|
||||||
|
</vdrstatus>
|
||||||
|
|
||||||
<!-- Available Variables tempreatures:
|
<!-- Available Variables tempreatures:
|
||||||
{cputemp} current cpu temperature in °C
|
{cputemp} current cpu temperature in °C
|
||||||
{gputemp} current gpu temperature in °C
|
{gputemp} current gpu temperature in °C
|
||||||
|
Loading…
Reference in New Issue
Block a user