mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-27 09:13:09 +00:00
24 lines
417 B
C
24 lines
417 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <QObject>
|
||
|
|
|
||
|
|
class Config;
|
||
|
|
|
||
|
|
class NotificationInhibitor : public QObject
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
|
||
|
|
public:
|
||
|
|
explicit NotificationInhibitor(Config *config, QObject *parent = nullptr);
|
||
|
|
~NotificationInhibitor() override;
|
||
|
|
|
||
|
|
private:
|
||
|
|
void applyInhibition(bool enabled);
|
||
|
|
void inhibit();
|
||
|
|
void uninhibit();
|
||
|
|
|
||
|
|
Config *m_config = nullptr;
|
||
|
|
uint m_cookie = 0;
|
||
|
|
bool m_inhibited = false;
|
||
|
|
};
|