Changeset View
Changeset View
Standalone View
Standalone View
greeter/greeterapp.h
Show All 38 Lines | |||||
39 | class Authenticator; | 39 | class Authenticator; | ||
40 | 40 | | |||
41 | struct org_kde_ksld; | 41 | struct org_kde_ksld; | ||
42 | 42 | | |||
43 | namespace ScreenLocker | 43 | namespace ScreenLocker | ||
44 | { | 44 | { | ||
45 | class WallpaperIntegration; | 45 | class WallpaperIntegration; | ||
46 | class LnFIntegration; | 46 | class LnFIntegration; | ||
47 | class Notifications; | ||||
47 | 48 | | |||
48 | class UnlockApp : public QGuiApplication | 49 | class UnlockApp : public QGuiApplication | ||
49 | { | 50 | { | ||
50 | Q_OBJECT | 51 | Q_OBJECT | ||
51 | public: | 52 | public: | ||
davidedmundson: You don't need this if you're using an adaptor | |||||
52 | explicit UnlockApp(int &argc, char **argv); | 53 | explicit UnlockApp(int &argc, char **argv); | ||
53 | ~UnlockApp() override; | 54 | ~UnlockApp() override; | ||
54 | 55 | | |||
55 | void setTesting(bool enable); | 56 | void setTesting(bool enable); | ||
56 | void setTheme(const QString &theme); | 57 | void setTheme(const QString &theme); | ||
57 | void setImmediateLock(bool immediateLock); | 58 | void setImmediateLock(bool immediateLock); | ||
58 | void lockImmediately(); | 59 | void lockImmediately(); | ||
59 | void setGraceTime(int milliseconds); | 60 | void setGraceTime(int milliseconds); | ||
60 | void setNoLock(bool noLock); | 61 | void setNoLock(bool noLock); | ||
61 | void setKsldSocket(int socket); | 62 | void setKsldSocket(int socket); | ||
62 | void setDefaultToSwitchUser(bool defaultToSwitchUser); | 63 | void setDefaultToSwitchUser(bool defaultToSwitchUser); | ||
63 | 64 | | |||
64 | void osdProgress(const QString &icon, int percent, const QString &additionalText); | 65 | void osdProgress(const QString &icon, int percent, const QString &additionalText); | ||
65 | void osdText(const QString &icon, const QString &additionalText); | 66 | void osdText(const QString &icon, const QString &additionalText); | ||
66 | void updateCanSuspend(bool set); | 67 | void updateCanSuspend(bool set); | ||
67 | void updateCanHibernate(bool set); | 68 | void updateCanHibernate(bool set); | ||
68 | 69 | | |||
69 | bool supportsSeccomp() const { | 70 | bool supportsSeccomp() const { | ||
70 | return m_supportsSeccomp; | 71 | return m_supportsSeccomp; | ||
71 | } | 72 | } | ||
72 | 73 | | |||
73 | public Q_SLOTS: | 74 | public Q_SLOTS: | ||
74 | void desktopResized(); | 75 | void desktopResized(); | ||
75 | 76 | | |||
77 | // dbus | ||||
78 | void Notify(uint id, const QString &app_name, uint replaces_id, const QString &app_icon, | ||||
79 | const QString &summary, const QString &body, const QStringList &actions, | ||||
80 | const QVariantMap &hints, int timeout); | ||||
81 | void CloseNotification(uint id); | ||||
82 | | ||||
76 | protected: | 83 | protected: | ||
77 | bool eventFilter(QObject *obj, QEvent *event) override; | 84 | bool eventFilter(QObject *obj, QEvent *event) override; | ||
78 | 85 | | |||
79 | private Q_SLOTS: | 86 | private Q_SLOTS: | ||
80 | void resetRequestIgnore(); | 87 | void resetRequestIgnore(); | ||
81 | void suspendToRam(); | 88 | void suspendToRam(); | ||
82 | void suspendToDisk(); | 89 | void suspendToDisk(); | ||
83 | void getFocus(); | 90 | void getFocus(); | ||
Show All 31 Lines | 94 | private: | |||
115 | KWayland::Client::Registry *m_ksldRegistry = nullptr; | 122 | KWayland::Client::Registry *m_ksldRegistry = nullptr; | ||
116 | QThread *m_ksldConnectionThread = nullptr; | 123 | QThread *m_ksldConnectionThread = nullptr; | ||
117 | org_kde_ksld *m_ksldInterface = nullptr; | 124 | org_kde_ksld *m_ksldInterface = nullptr; | ||
118 | 125 | | |||
119 | KWayland::Client::PlasmaShell *m_plasmaShell = nullptr; | 126 | KWayland::Client::PlasmaShell *m_plasmaShell = nullptr; | ||
120 | WallpaperIntegration *m_wallpaperIntegration; | 127 | WallpaperIntegration *m_wallpaperIntegration; | ||
121 | LnFIntegration *m_lnfIntegration; | 128 | LnFIntegration *m_lnfIntegration; | ||
122 | 129 | | |||
130 | Notifications *m_notification = nullptr; | ||||
131 | | ||||
123 | bool m_supportsSeccomp = false; | 132 | bool m_supportsSeccomp = false; | ||
124 | }; | 133 | }; | ||
125 | } // namespace | 134 | } // namespace | ||
126 | 135 | | |||
127 | #endif // SCREENLOCKER_GREETERAPP_H | 136 | #endif // SCREENLOCKER_GREETERAPP_H |
You don't need this if you're using an adaptor