Changeset View
Changeset View
Standalone View
Standalone View
orientation_sensor.h
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 40 | public: | |||
---|---|---|---|---|---|
71 | } | 71 | } | ||
72 | void setUserEnabled(bool enabled); | 72 | void setUserEnabled(bool enabled); | ||
73 | 73 | | |||
74 | Q_SIGNALS: | 74 | Q_SIGNALS: | ||
75 | void orientationChanged(); | 75 | void orientationChanged(); | ||
76 | void userEnabledChanged(bool); | 76 | void userEnabledChanged(bool); | ||
77 | 77 | | |||
78 | private: | 78 | private: | ||
79 | void setupStatusNotifier(); | | |||
80 | void startStopSensor(); | 79 | void startStopSensor(); | ||
81 | void loadConfig(); | 80 | void loadConfig(); | ||
82 | void refresh(); | 81 | void refresh(); | ||
82 | void activate(); | ||||
83 | 83 | | |||
84 | QOrientationSensor *m_sensor; | 84 | QOrientationSensor *m_sensor; | ||
85 | bool m_enabled = false; | 85 | bool m_enabled = false; | ||
86 | bool m_userEnabled = true; | 86 | bool m_userEnabled = true; | ||
87 | Orientation m_orientation = Orientation::Undefined; | 87 | Orientation m_orientation = Orientation::Undefined; | ||
88 | KStatusNotifierItem *m_sni = nullptr; | 88 | KStatusNotifierItem *m_sni = nullptr; | ||
89 | KSharedConfig::Ptr m_config; | 89 | KSharedConfig::Ptr m_config; | ||
90 | OrientationSensorAdaptor *m_adaptor = nullptr; | 90 | OrientationSensorAdaptor *m_adaptor = nullptr; | ||
91 | 91 | | |||
92 | }; | 92 | }; | ||
93 | 93 | | |||
94 | } | 94 | } |