Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpad/src/backends/kwin_wayland/kwinwaylandtouchpad.h
Show All 22 Lines | |||||
23 | #include <QString> | 23 | #include <QString> | ||
24 | 24 | | |||
25 | class QDBusInterface; | 25 | class QDBusInterface; | ||
26 | 26 | | |||
27 | class KWinWaylandTouchpad : public LibinputCommon | 27 | class KWinWaylandTouchpad : public LibinputCommon | ||
28 | { | 28 | { | ||
29 | Q_OBJECT | 29 | Q_OBJECT | ||
30 | 30 | | |||
31 | Q_PROPERTY(qreal scrollFactor READ scrollFactor WRITE setScrollFactor NOTIFY scrollFactorChanged) | ||||
32 | | ||||
31 | public: | 33 | public: | ||
32 | KWinWaylandTouchpad(QString dbusName); | 34 | KWinWaylandTouchpad(QString dbusName); | ||
33 | ~KWinWaylandTouchpad() override; | 35 | ~KWinWaylandTouchpad() override; | ||
34 | 36 | | |||
35 | bool init(); | 37 | bool init(); | ||
36 | 38 | | |||
37 | bool getConfig(); | 39 | bool getConfig(); | ||
38 | bool getDefaultConfig(); | 40 | bool getDefaultConfig(); | ||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 99 | bool supportsScrollTwoFinger() const override { | |||
98 | return m_supportsScrollTwoFinger.val; | 100 | return m_supportsScrollTwoFinger.val; | ||
99 | } | 101 | } | ||
100 | bool supportsScrollEdge() const override { | 102 | bool supportsScrollEdge() const override { | ||
101 | return m_supportsScrollEdge.val; | 103 | return m_supportsScrollEdge.val; | ||
102 | } | 104 | } | ||
103 | bool supportsScrollOnButtonDown() const override { | 105 | bool supportsScrollOnButtonDown() const override { | ||
104 | return m_supportsScrollOnButtonDown.val; | 106 | return m_supportsScrollOnButtonDown.val; | ||
105 | } | 107 | } | ||
108 | | ||||
109 | // | ||||
110 | // Scroll Factor | ||||
111 | qreal scrollFactor() const | ||||
112 | { | ||||
113 | return m_scrollFactor.val; | ||||
114 | } | ||||
115 | void setScrollFactor(qreal factor) | ||||
116 | { | ||||
117 | return m_scrollFactor.set(factor); | ||||
118 | } | ||||
119 | | ||||
106 | // | 120 | // | ||
107 | // Click method | 121 | // Click method | ||
108 | bool supportsClickMethodAreas() const override { | 122 | bool supportsClickMethodAreas() const override { | ||
109 | return m_supportsClickMethodAreas.val; | 123 | return m_supportsClickMethodAreas.val; | ||
110 | } | 124 | } | ||
111 | bool supportsClickMethodClickfinger() const override { | 125 | bool supportsClickMethodClickfinger() const override { | ||
112 | return m_supportsClickMethodClickfinger.val; | 126 | return m_supportsClickMethodClickfinger.val; | ||
113 | } | 127 | } | ||
114 | 128 | | |||
129 | Q_SIGNALS: | ||||
130 | void scrollFactorChanged(); | ||||
131 | | ||||
115 | private: | 132 | private: | ||
116 | 133 | | |||
117 | template<typename T> | 134 | template<typename T> | ||
118 | bool valueLoader(Prop<T> &prop); | 135 | bool valueLoader(Prop<T> &prop); | ||
119 | 136 | | |||
120 | template<typename T> | 137 | template<typename T> | ||
121 | QString valueWriter(const Prop<T> &prop); | 138 | QString valueWriter(const Prop<T> &prop); | ||
122 | // | 139 | // | ||
Show All 9 Lines | |||||
132 | 149 | | |||
133 | // | 150 | // | ||
134 | // acceleration speed and profile | 151 | // acceleration speed and profile | ||
135 | Prop<bool> m_supportsPointerAcceleration = Prop<bool>("supportsPointerAcceleration"); | 152 | Prop<bool> m_supportsPointerAcceleration = Prop<bool>("supportsPointerAcceleration"); | ||
136 | 153 | | |||
137 | // | 154 | // | ||
138 | // scrolling | 155 | // scrolling | ||
139 | Prop<bool> m_supportsNaturalScroll = Prop<bool>("supportsNaturalScroll"); | 156 | Prop<bool> m_supportsNaturalScroll = Prop<bool>("supportsNaturalScroll"); | ||
157 | Prop<qreal> m_scrollFactor = Prop<qreal>("scrollFactor"); | ||||
140 | 158 | | |||
141 | QDBusInterface *m_iface; | 159 | QDBusInterface *m_iface; | ||
142 | }; | 160 | }; | ||
143 | 161 | | |||
144 | #endif | 162 | #endif |