noo/client/platforms/linux/sleeptracker_linux.h
2022-05-29 10:50:39 +03:00

32 lines
488 B
C++

#ifndef SLEEPTRACKER_LINUX_H
#define SLEEPTRACKER_LINUX_H
#include <QObject>
class SleepTracker: public QObject
{
Q_OBJECT
public:
explicit SleepTracker(QObject* parent = nullptr);
~SleepTracker();
void install();
void uninstall();
static SleepTracker& sharedInstance();
// For internal calls only
void onAppWillSleep();
void onAppDidWake();
signals:
void onSystemSleep();
void onSystemResume();
protected:
void* mHandler;
};
#endif // SLEEPTRACKER_OSX_H