Allow to enable/disable suspend & lock event handling

This commit is contained in:
LordGrey
2023-11-02 20:23:04 +01:00
parent f57c4f84ac
commit 7d3f13c7b5
15 changed files with 604 additions and 115 deletions

View File

@@ -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");

View File

@@ -90,6 +90,10 @@
"leds":
{
"$ref": "schema-leds.json"
},
"systemEvents":
{
"$ref": "schema-systemEvents.json"
}
},
"additionalProperties" : false

View File

@@ -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>

View 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
}