Changeset View
Changeset View
Standalone View
Standalone View
kcms/feedback/feedback.h
Show All 32 Lines | 28 | { | |||
---|---|---|---|---|---|
33 | 33 | | |||
34 | public: | 34 | public: | ||
35 | explicit Feedback(QObject* parent = nullptr, const QVariantList &list = QVariantList()); | 35 | explicit Feedback(QObject* parent = nullptr, const QVariantList &list = QVariantList()); | ||
36 | ~Feedback() override; | 36 | ~Feedback() override; | ||
37 | 37 | | |||
38 | bool feedbackEnabled() const; | 38 | bool feedbackEnabled() const; | ||
39 | int plasmaFeedbackLevel() const { return m_plasmaFeedbackLevel; } | 39 | int plasmaFeedbackLevel() const { return m_plasmaFeedbackLevel; } | ||
40 | 40 | | |||
41 | void setPlasmaFeedbackLevel(int plasmaFeedbackLevel) { | 41 | void setPlasmaFeedbackLevel(int plasmaFeedbackLevel); | ||
42 | if (plasmaFeedbackLevel != m_plasmaFeedbackLevel) { | | |||
43 | m_plasmaFeedbackLevel = plasmaFeedbackLevel; | | |||
44 | Q_EMIT plasmaFeedbackLevelChanged(plasmaFeedbackLevel); | | |||
45 | } | | |||
46 | } | | |||
47 | 42 | | |||
48 | public Q_SLOTS: | 43 | public Q_SLOTS: | ||
49 | void load() override; | 44 | void load() override; | ||
50 | void save() override; | 45 | void save() override; | ||
51 | void defaults() override; | 46 | void defaults() override; | ||
52 | 47 | | |||
53 | Q_SIGNALS: | 48 | Q_SIGNALS: | ||
54 | void plasmaFeedbackLevelChanged(bool plasmaFeedbackLevel); | 49 | void plasmaFeedbackLevelChanged(bool plasmaFeedbackLevel); | ||
55 | 50 | | |||
56 | private: | 51 | private: | ||
57 | KSharedConfig::Ptr m_plasmaConfig; | 52 | KSharedConfig::Ptr m_plasmaConfig; | ||
58 | int m_plasmaFeedbackLevel = 0; | 53 | int m_plasmaFeedbackLevel = 0; | ||
59 | }; | 54 | }; |