Changeset View
Changeset View
Standalone View
Standalone View
dataengines/powermanagement/powermanagementjob.h
Show All 16 Lines | |||||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #ifndef POWERMANAGEMENTJOB_H | 19 | #ifndef POWERMANAGEMENTJOB_H | ||
20 | #define POWERMANAGEMENTJOB_H | 20 | #define POWERMANAGEMENTJOB_H | ||
21 | 21 | | |||
22 | // plasma | 22 | // plasma | ||
23 | #include <Plasma/ServiceJob> | 23 | #include <Plasma/ServiceJob> | ||
24 | 24 | | |||
25 | class QDBusPendingCall; | ||||
26 | | ||||
25 | class PowerManagementJob : public Plasma::ServiceJob | 27 | class PowerManagementJob : public Plasma::ServiceJob | ||
26 | { | 28 | { | ||
27 | | ||||
28 | Q_OBJECT | 29 | Q_OBJECT | ||
29 | 30 | | |||
30 | public: | 31 | public: | ||
31 | PowerManagementJob(const QString &operation, QMap<QString, QVariant> ¶meters, | 32 | PowerManagementJob(const QString &operation, QMap<QString, QVariant> ¶meters, | ||
32 | QObject *parent = nullptr); | 33 | QObject *parent = nullptr); | ||
33 | ~PowerManagementJob() override; | 34 | ~PowerManagementJob() override; | ||
34 | 35 | | |||
35 | protected: | 36 | protected: | ||
36 | void start() override; | 37 | void start() override; | ||
37 | 38 | | |||
38 | private: | 39 | private: | ||
39 | void requestShutDown(); | 40 | void requestShutDown(); | ||
40 | void setScreenBrightness(int value, bool silent); | 41 | QDBusPendingCall setScreenBrightness(int value, bool silent); | ||
41 | void setKeyboardBrightness(int value, bool silent); | 42 | QDBusPendingCall setKeyboardBrightness(int value, bool silent); | ||
42 | }; | 43 | }; | ||
43 | 44 | | |||
44 | #endif // POWERMANAGEMENTJOB_H | 45 | #endif // POWERMANAGEMENTJOB_H |