mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Allow to enable/disable suspend & lock event handling
This commit is contained in:
@@ -83,6 +83,16 @@ void HyperionIManager::resume()
|
||||
}
|
||||
}
|
||||
|
||||
void HyperionIManager::toggleSuspend(bool isSuspend)
|
||||
{
|
||||
Info(_log,"Put all instances in %s state", isSuspend ? "suspend" : "working");
|
||||
QMap<quint8, Hyperion*> instCopy = _runningInstances;
|
||||
for(const auto instance : instCopy)
|
||||
{
|
||||
emit instance->suspendRequest(isSuspend);
|
||||
}
|
||||
}
|
||||
|
||||
void HyperionIManager::toggleIdle(bool isIdle)
|
||||
{
|
||||
Info(_log,"Put all instances in %s state", isIdle ? "idle" : "working");
|
||||
|
@@ -90,6 +90,10 @@
|
||||
"leds":
|
||||
{
|
||||
"$ref": "schema-leds.json"
|
||||
},
|
||||
"systemEvents":
|
||||
{
|
||||
"$ref": "schema-systemEvents.json"
|
||||
}
|
||||
},
|
||||
"additionalProperties" : false
|
||||
|
@@ -23,5 +23,6 @@
|
||||
<file alias="schema-leds.json">schema/schema-leds.json</file>
|
||||
<file alias="schema-instCapture.json">schema/schema-instCapture.json</file>
|
||||
<file alias="schema-network.json">schema/schema-network.json</file>
|
||||
<file alias="schema-systemEvents.json">schema/schema-systemEvents.json</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
34
libsrc/hyperion/schema/schema-systemEvents.json
Normal file
34
libsrc/hyperion/schema/schema-systemEvents.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"type" : "object",
|
||||
"required" : true,
|
||||
"title" : "edt_conf_system_events_heading_title",
|
||||
"properties": {
|
||||
"suspendEnable": {
|
||||
"type": "boolean",
|
||||
"required": true,
|
||||
"title": "edt_conf_system_events_suspendEnable_title",
|
||||
"default": true,
|
||||
"propertyOrder": 1
|
||||
},
|
||||
"lockEnable": {
|
||||
"type": "boolean",
|
||||
"required": true,
|
||||
"title": "edt_conf_system_events_lockEnable_title",
|
||||
"default": true,
|
||||
"propertyOrder": 2
|
||||
},
|
||||
"suspendOnLockEnable": {
|
||||
"type": "boolean",
|
||||
"required": false,
|
||||
"title": "edt_conf_system_events_suspendOnLockEnable_title",
|
||||
"default": false,
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"lockEnable": true
|
||||
}
|
||||
},
|
||||
"propertyOrder": 3
|
||||
}
|
||||
},
|
||||
"additionalProperties" : false
|
||||
}
|
Reference in New Issue
Block a user