Changeset View
Changeset View
Standalone View
Standalone View
logout-greeter/greeter.h
Show All 37 Lines | |||||
38 | } | 38 | } | ||
39 | 39 | | |||
40 | class QScreen; | 40 | class QScreen; | ||
41 | 41 | | |||
42 | class Greeter : public QObject | 42 | class Greeter : public QObject | ||
43 | { | 43 | { | ||
44 | Q_OBJECT | 44 | Q_OBJECT | ||
45 | public: | 45 | public: | ||
46 | Greeter(int fd, bool shutdownAllowed, bool choose, KWorkSpace::ShutdownType type); | 46 | Greeter(bool shutdownAllowed); | ||
47 | ~Greeter() override; | 47 | ~Greeter() override; | ||
48 | 48 | | |||
49 | void init(); | 49 | void init(); | ||
50 | 50 | | |||
51 | bool eventFilter(QObject *watched, QEvent *event) override; | 51 | bool eventFilter(QObject *watched, QEvent *event) override; | ||
52 | 52 | | |||
53 | public Q_SLOTS: | ||||
54 | void promptLogout(); | ||||
55 | void promptShutDown(); | ||||
56 | void promptReboot(); | ||||
57 | | ||||
53 | private: | 58 | private: | ||
54 | void adoptScreen(QScreen *screen); | 59 | void adoptScreen(QScreen *screen); | ||
55 | void rejected(); | 60 | void rejected(); | ||
56 | void setupWaylandIntegration(); | 61 | void setupWaylandIntegration(); | ||
57 | 62 | | |||
58 | int m_fd; | | |||
59 | bool m_shutdownAllowed; | 63 | bool m_shutdownAllowed; | ||
60 | bool m_choose; | 64 | bool m_running = false; | ||
61 | KWorkSpace::ShutdownType m_shutdownType; | 65 | | ||
66 | KWorkSpace::ShutdownType m_shutdownType = KWorkSpace::ShutdownTypeHalt; | ||||
62 | QVector<KSMShutdownDlg *> m_dialogs; | 67 | QVector<KSMShutdownDlg *> m_dialogs; | ||
63 | KWayland::Client::PlasmaShell *m_waylandPlasmaShell; | 68 | KWayland::Client::PlasmaShell *m_waylandPlasmaShell; | ||
64 | }; | 69 | }; |