Changeset View
Changeset View
Standalone View
Standalone View
src/statusnotifier.h
Show All 28 Lines | |||||
29 | class StatusNotifier : public QObject | 29 | class StatusNotifier : public QObject | ||
30 | { | 30 | { | ||
31 | Q_OBJECT | 31 | Q_OBJECT | ||
32 | 32 | | |||
33 | public: | 33 | public: | ||
34 | explicit StatusNotifier(QObject *parent = nullptr); | 34 | explicit StatusNotifier(QObject *parent = nullptr); | ||
35 | ~StatusNotifier() override; | 35 | ~StatusNotifier() override; | ||
36 | 36 | | |||
37 | bool activationAllowed() const; | ||||
38 | void setActivationAllowed(bool allowed); | ||||
39 | | ||||
40 | void show(); | ||||
37 | void notify(); | 41 | void notify(); | ||
38 | 42 | | |||
39 | static bool notificationServiceRegistered(); | 43 | static bool notificationServiceRegistered(); | ||
40 | 44 | | |||
41 | Q_SIGNALS: | 45 | Q_SIGNALS: | ||
42 | void expired(); | 46 | void expired(); | ||
43 | void activated(); | 47 | void activated(); | ||
44 | 48 | | |||
45 | private: | 49 | private: | ||
46 | static bool canBeRestarted(CrashedApplication *app); | 50 | static bool canBeRestarted(CrashedApplication *app); | ||
47 | 51 | | |||
48 | QTimer *m_autoCloseTimer = nullptr; | 52 | QTimer *m_autoCloseTimer = nullptr; | ||
49 | KStatusNotifierItem *m_sni = nullptr; | 53 | KStatusNotifierItem *m_sni = nullptr; | ||
50 | 54 | | |||
55 | bool m_activationAllowed = true; | ||||
56 | | ||||
51 | QString m_title; | 57 | QString m_title; | ||
52 | QString m_iconName; | | |||
53 | 58 | | |||
54 | }; | 59 | }; | ||
55 | 60 | | |||
56 | #endif // DRKONQI_STATUSNOTIFIER_H | 61 | #endif // DRKONQI_STATUSNOTIFIER_H |