summaryrefslogtreecommitdiff
path: root/plugin/src/Caelestia/Internal/sleepnotifier.hpp
blob: aaa6c689b3ecd42e9e82497edb96be2da40db753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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