6 EXECUTION_STATE executionState;
9 bool Idle::preventDisplaySleep(const QString &reason) {
10 executionState = SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED);
14 bool Idle::allowDisplaySleep() {
15 SetThreadExecutionState(ES_CONTINUOUS | executionState);
19 QString Idle::displayErrorMessage() {
23 bool Idle::preventSystemSleep(const QString &reason) {
24 executionState = SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED);
28 bool Idle::allowSystemSleep() {
29 SetThreadExecutionState(ES_CONTINUOUS | executionState);
33 QString Idle::systemErrorMessage() {