Changeset View
Changeset View
Standalone View
Standalone View
kcms/mouse/backends/kwin_wl/kwin_wl_device.h
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 28 | { | |||
---|---|---|---|---|---|
59 | Q_PROPERTY(bool defaultPointerAccelerationProfileAdaptive READ defaultPointerAccelerationProfileAdaptive CONSTANT) | 59 | Q_PROPERTY(bool defaultPointerAccelerationProfileAdaptive READ defaultPointerAccelerationProfileAdaptive CONSTANT) | ||
60 | Q_PROPERTY(bool pointerAccelerationProfileAdaptive READ pointerAccelerationProfileAdaptive WRITE setPointerAccelerationProfileAdaptive NOTIFY pointerAccelerationProfileChanged) | 60 | Q_PROPERTY(bool pointerAccelerationProfileAdaptive READ pointerAccelerationProfileAdaptive WRITE setPointerAccelerationProfileAdaptive NOTIFY pointerAccelerationProfileChanged) | ||
61 | 61 | | |||
62 | // | 62 | // | ||
63 | // scrolling | 63 | // scrolling | ||
64 | Q_PROPERTY(bool supportsNaturalScroll READ supportsNaturalScroll CONSTANT) | 64 | Q_PROPERTY(bool supportsNaturalScroll READ supportsNaturalScroll CONSTANT) | ||
65 | Q_PROPERTY(bool naturalScrollEnabledByDefault READ naturalScrollEnabledByDefault CONSTANT) | 65 | Q_PROPERTY(bool naturalScrollEnabledByDefault READ naturalScrollEnabledByDefault CONSTANT) | ||
66 | Q_PROPERTY(bool naturalScroll READ isNaturalScroll WRITE setNaturalScroll NOTIFY naturalScrollChanged) | 66 | Q_PROPERTY(bool naturalScroll READ isNaturalScroll WRITE setNaturalScroll NOTIFY naturalScrollChanged) | ||
67 | Q_PROPERTY(qreal scrollFactor READ scrollFactor WRITE setScrollFactor NOTIFY scrollFactorChanged) | ||||
67 | 68 | | |||
68 | public: | 69 | public: | ||
69 | KWinWaylandDevice(QString dbusName); | 70 | KWinWaylandDevice(QString dbusName); | ||
70 | ~KWinWaylandDevice() override; | 71 | ~KWinWaylandDevice() override; | ||
71 | 72 | | |||
72 | bool init(); | 73 | bool init(); | ||
73 | 74 | | |||
74 | bool getConfig(); | 75 | bool getConfig(); | ||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | |||||
173 | } | 174 | } | ||
174 | bool isNaturalScroll() const { | 175 | bool isNaturalScroll() const { | ||
175 | return m_naturalScroll.val; | 176 | return m_naturalScroll.val; | ||
176 | } | 177 | } | ||
177 | void setNaturalScroll(bool set) { | 178 | void setNaturalScroll(bool set) { | ||
178 | m_naturalScroll.set(set); | 179 | m_naturalScroll.set(set); | ||
179 | } | 180 | } | ||
180 | 181 | | |||
182 | qreal scrollFactor() const { | ||||
183 | return m_scrollFactor.val; | ||||
184 | } | ||||
185 | void setScrollFactor(qreal set) { | ||||
186 | m_scrollFactor.set(set); | ||||
187 | } | ||||
188 | | ||||
189 | | ||||
181 | Q_SIGNALS: | 190 | Q_SIGNALS: | ||
182 | void leftHandedChanged(); | 191 | void leftHandedChanged(); | ||
183 | void pointerAccelerationChanged(); | 192 | void pointerAccelerationChanged(); | ||
184 | void pointerAccelerationProfileChanged(); | 193 | void pointerAccelerationProfileChanged(); | ||
185 | void enabledChanged(); | 194 | void enabledChanged(); | ||
186 | void middleEmulationChanged(); | 195 | void middleEmulationChanged(); | ||
187 | void naturalScrollChanged(); | 196 | void naturalScrollChanged(); | ||
197 | void scrollFactorChanged(); | ||||
188 | 198 | | |||
189 | private: | 199 | private: | ||
190 | template <typename T> | 200 | template <typename T> | ||
191 | struct Prop { | 201 | struct Prop { | ||
192 | explicit Prop(const QByteArray &dbusName) | 202 | explicit Prop(const QByteArray &dbusName) | ||
193 | : dbus(dbusName) | 203 | : dbus(dbusName) | ||
194 | {} | 204 | {} | ||
195 | 205 | | |||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
252 | Prop<bool> m_defaultPointerAccelerationProfileAdaptive = Prop<bool>("defaultPointerAccelerationProfileAdaptive"); | 262 | Prop<bool> m_defaultPointerAccelerationProfileAdaptive = Prop<bool>("defaultPointerAccelerationProfileAdaptive"); | ||
253 | Prop<bool> m_pointerAccelerationProfileAdaptive = Prop<bool>("pointerAccelerationProfileAdaptive"); | 263 | Prop<bool> m_pointerAccelerationProfileAdaptive = Prop<bool>("pointerAccelerationProfileAdaptive"); | ||
254 | 264 | | |||
255 | // | 265 | // | ||
256 | // scrolling | 266 | // scrolling | ||
257 | Prop<bool> m_supportsNaturalScroll = Prop<bool>("supportsNaturalScroll"); | 267 | Prop<bool> m_supportsNaturalScroll = Prop<bool>("supportsNaturalScroll"); | ||
258 | Prop<bool> m_naturalScrollEnabledByDefault = Prop<bool>("naturalScrollEnabledByDefault"); | 268 | Prop<bool> m_naturalScrollEnabledByDefault = Prop<bool>("naturalScrollEnabledByDefault"); | ||
259 | Prop<bool> m_naturalScroll = Prop<bool>("naturalScroll"); | 269 | Prop<bool> m_naturalScroll = Prop<bool>("naturalScroll"); | ||
270 | Prop<qreal> m_scrollFactor = Prop<qreal>("scrollFactor"); | ||||
260 | 271 | | |||
261 | QDBusInterface *m_iface; | 272 | QDBusInterface *m_iface; | ||
262 | }; | 273 | }; | ||
263 | 274 | | |||
264 | #endif // KWINWAYLANDDEVICE_H | 275 | #endif // KWINWAYLANDDEVICE_H |