diff options
Diffstat (limited to 'plugin/src/Caelestia/Internal/sleepnotifier.hpp')
| -rw-r--r-- | plugin/src/Caelestia/Internal/sleepnotifier.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/plugin/src/Caelestia/Internal/sleepnotifier.hpp b/plugin/src/Caelestia/Internal/sleepnotifier.hpp new file mode 100644 index 0000000..aaa6c68 --- /dev/null +++ b/plugin/src/Caelestia/Internal/sleepnotifier.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include <qobject.h> +#include <qqmlintegration.h> + +namespace caelestia::internal { + +class SleepNotifier : public QObject { + Q_OBJECT + QML_ELEMENT + +public: + explicit SleepNotifier(QObject* parent = nullptr); + +signals: + void aboutToSleep(); + void resumed(); + +private slots: + void handlePrepareForSleep(bool sleep); +}; + +} // namespace caelestia::internal |