Commit 0b5d6ba772cd7b80af72044bf3b15d46f1d2bb58
- Diff rendering mode:
- inline
- side by side
daemon/org.kde.Touchpad.xml
(12 / 0)
|   | |||
| 106 | 106 | <method name="setCoastingSpeed"> | |
| 107 | 107 | <arg name="speed" type="d" direction="in"/> | |
| 108 | 108 | </method> | |
| 109 | <method name="horizontalScrollingDistance"> | ||
| 110 | <arg type="i" direction="out"/> | ||
| 111 | </method> | ||
| 112 | <method name="setHorizontalScrollingDistance"> | ||
| 113 | <arg name="distance" type="i" direction="in"/> | ||
| 114 | </method> | ||
| 115 | <method name="verticalScrollingDistance"> | ||
| 116 | <arg type="i" direction="out"/> | ||
| 117 | </method> | ||
| 118 | <method name="setVerticalScrollingDistance"> | ||
| 119 | <arg name="distance" type="i" direction="in"/> | ||
| 120 | </method> | ||
| 109 | 121 | <method name="cornerButtons"> | |
| 110 | 122 | <arg type="ay" direction="out"/> | |
| 111 | 123 | </method> |
daemon/synaptiksdaemon.cpp
(1 / 0)
|   | |||
| 245 | 245 | << "CircularScrolling" << "CircularScrollingTrigger" | |
| 246 | 246 | << "HorizontalTwoFingerScrolling" << "VerticalTwoFingerScrolling" | |
| 247 | 247 | << "HorizontalEdgeScrolling" << "VerticalEdgeScrolling" | |
| 248 | << "HorizontalScrollingDistance" << "VerticalScrollingDistance" | ||
| 248 | 249 | // tapping configuration | |
| 249 | 250 | << "FastTaps" << "TapAndDragGesture" << "LockedDrags"; | |
| 250 | 251 | foreach (const QString &name, names) { |
daemon/touchpad.cpp
(30 / 0)
|   | |||
| 49 | 49 | static const char TWO_FINGER_SCROLLING[] = "Synaptics Two-Finger Scrolling"; | |
| 50 | 50 | static const char EDGE_SCROLLING[] = "Synaptics Edge Scrolling"; | |
| 51 | 51 | static const char COASTING_SPEED[] = "Synaptics Coasting Speed"; | |
| 52 | static const char SCROLLING_DISTANCE[] = "Synaptics Scrolling Distance"; | ||
| 52 | 53 | static const char TAP_ACTION[] = "Synaptics Tap Action"; | |
| 53 | 54 | static const char FAST_TAP[] = "Synaptics Tap FastTap"; | |
| 54 | 55 | static const char CIRCULAR_PAD[] = "Synaptics Circular Pad"; | |
| … | … | ||
| 79 | 79 | HorizontalScrollingItem = 1 | |
| 80 | 80 | }; | |
| 81 | 81 | ||
| 82 | enum ScrollingDistanceItem { | ||
| 83 | VerticalDistanceItem = 0, | ||
| 84 | HorizontalDistanceItem = 1, | ||
| 85 | }; | ||
| 82 | 86 | ||
| 87 | |||
| 83 | 88 | using namespace synaptiks; | |
| 84 | 89 | ||
| 85 | 90 | ||
| … | … | ||
| 308 | 308 | void Touchpad::setCoastingSpeed(float speed) { | |
| 309 | 309 | Q_D(Touchpad); | |
| 310 | 310 | return d->device->setProperty(COASTING_SPEED, speed); | |
| 311 | } | ||
| 312 | |||
| 313 | int Touchpad::horizontalScrollingDistance() const { | ||
| 314 | Q_D(const Touchpad); | ||
| 315 | return d->device->property<int>(SCROLLING_DISTANCE, | ||
| 316 | HorizontalDistanceItem); | ||
| 317 | } | ||
| 318 | |||
| 319 | void Touchpad::setHorizontalScrollingDistance(int distance) { | ||
| 320 | Q_D(Touchpad); | ||
| 321 | d->device->setProperty<int>(SCROLLING_DISTANCE, distance, | ||
| 322 | HorizontalDistanceItem); | ||
| 323 | } | ||
| 324 | |||
| 325 | int Touchpad::verticalScrollingDistance() const { | ||
| 326 | Q_D(const Touchpad); | ||
| 327 | return d->device->property<int>(SCROLLING_DISTANCE, | ||
| 328 | VerticalDistanceItem); | ||
| 329 | } | ||
| 330 | |||
| 331 | void Touchpad::setVerticalScrollingDistance(int distance) { | ||
| 332 | Q_D(Touchpad); | ||
| 333 | d->device->setProperty<int>(SCROLLING_DISTANCE, distance, | ||
| 334 | VerticalDistanceItem); | ||
| 311 | 335 | } | |
| 312 | 336 | ||
| 313 | 337 | QByteArray Touchpad::cornerButtons() const { |
daemon/touchpad.h
(66 / 0)
|   | |||
| 393 | 393 | WRITE setCoastingSpeed DESIGNABLE false) | |
| 394 | 394 | ||
| 395 | 395 | /** | |
| 396 | * @brief The speed of horizontal scrolling. | ||
| 397 | * | ||
| 398 | * This property holds the move distance of the finger to generate a | ||
| 399 | * single horizontal scroll event. | ||
| 400 | * | ||
| 401 | * @see setHorizontalScrollingDistance(int) | ||
| 402 | * @see horizontalScrollingDistance() const | ||
| 403 | * @see horizontalEdgeScrolling | ||
| 404 | * @see horizontalTwoFingerScrolling | ||
| 405 | */ | ||
| 406 | Q_PROPERTY(int horizontalScrollingDistance | ||
| 407 | READ horizontalScrollingDistance | ||
| 408 | WRITE setHorizontalScrollingDistance DESIGNABLE false) | ||
| 409 | |||
| 410 | /** | ||
| 411 | * @brief The speed of vertical scrolling. | ||
| 412 | * | ||
| 413 | * This property holds the move distance of the finger to generate a | ||
| 414 | * single vertical scroll event. | ||
| 415 | * | ||
| 416 | * @see setVerticalScrollingDistance(int) | ||
| 417 | * @see verticalScrollingDistance() const | ||
| 418 | * @see verticalEdgeScrolling | ||
| 419 | * @see verticalTwoFingerScrolling | ||
| 420 | */ | ||
| 421 | Q_PROPERTY(int verticalScrollingDistance | ||
| 422 | READ verticalScrollingDistance | ||
| 423 | WRITE setVerticalScrollingDistance DESIGNABLE false) | ||
| 424 | |||
| 425 | /** | ||
| 396 | 426 | * @brief The mouse buttons triggered by tapping the touchpad | |
| 397 | 427 | * corner. | |
| 398 | 428 | * | |
| … | … | ||
| 1017 | 1017 | * @see coastingSpeed | |
| 1018 | 1018 | */ | |
| 1019 | 1019 | Q_SCRIPTABLE void setCoastingSpeed(float speed); | |
| 1020 | |||
| 1021 | /** | ||
| 1022 | * @brief Return the move distance of the finger to generate a | ||
| 1023 | * horizontal scroll event. | ||
| 1024 | * | ||
| 1025 | * @return the move distance for a horizontal scroll event | ||
| 1026 | * @see horizontalScrollingDistance | ||
| 1027 | */ | ||
| 1028 | Q_SCRIPTABLE int horizontalScrollingDistance() const; | ||
| 1029 | |||
| 1030 | /** | ||
| 1031 | * @brief Set the move distance of the finger to generate a | ||
| 1032 | * horizontal scroll event. | ||
| 1033 | * | ||
| 1034 | * @param distance the move distance for a horizontal scroll event | ||
| 1035 | * @see horizontalScrollingDistance | ||
| 1036 | */ | ||
| 1037 | Q_SCRIPTABLE void setHorizontalScrollingDistance(int distance); | ||
| 1038 | |||
| 1039 | /** | ||
| 1040 | * @brief Return the move distance of the finger to generate a | ||
| 1041 | * vertical scroll event. | ||
| 1042 | * | ||
| 1043 | * @return the move distance for a vertical scroll event | ||
| 1044 | * @see verticalScrollingDistance | ||
| 1045 | */ | ||
| 1046 | Q_SCRIPTABLE int verticalScrollingDistance() const; | ||
| 1047 | |||
| 1048 | /** | ||
| 1049 | * @brief Set the move distance of the finger to generate a vertical | ||
| 1050 | * scroll event. | ||
| 1051 | * | ||
| 1052 | * @param distance the move distance for a vertical scroll event | ||
| 1053 | * @see verticalScrollingDistance | ||
| 1054 | */ | ||
| 1055 | Q_SCRIPTABLE void setVerticalScrollingDistance(int distance); | ||
| 1020 | 1056 | ||
| 1021 | 1057 | /** | |
| 1022 | 1058 | * @brief Query the mouse buttons triggered by tapping the touchpad |
daemon/touchpadadaptor.cpp
(16 / 0)
|   | |||
| 196 | 196 | this->setPropertyOrDBusError("coastingSpeed", speed); | |
| 197 | 197 | } | |
| 198 | 198 | ||
| 199 | int TouchpadAdaptor::horizontalScrollingDistance() const { | ||
| 200 | return this->propertyOrDBusError("horizontalScrollingDistance").toInt(); | ||
| 201 | } | ||
| 202 | |||
| 203 | void TouchpadAdaptor::setHorizontalScrollingDistance(int distance) { | ||
| 204 | this->setPropertyOrDBusError("horizontalScrollingDistance", distance); | ||
| 205 | } | ||
| 206 | |||
| 207 | int TouchpadAdaptor::verticalScrollingDistance() const { | ||
| 208 | return this->propertyOrDBusError("verticalScrollingDistance").toInt(); | ||
| 209 | } | ||
| 210 | |||
| 211 | void TouchpadAdaptor::setVerticalScrollingDistance(int distance) { | ||
| 212 | this->setPropertyOrDBusError("verticalScrollingDistance", distance); | ||
| 213 | } | ||
| 214 | |||
| 199 | 215 | QByteArray TouchpadAdaptor::cornerButtons() const { | |
| 200 | 216 | return this->propertyOrDBusError("cornerButtons").toByteArray(); | |
| 201 | 217 | } |
daemon/touchpadadaptor.h
(6 / 0)
|   | |||
| 104 | 104 | double coastingSpeed() const; | |
| 105 | 105 | void setCoastingSpeed(double speed); | |
| 106 | 106 | ||
| 107 | int horizontalScrollingDistance() const; | ||
| 108 | void setHorizontalScrollingDistance(int distance); | ||
| 109 | |||
| 110 | int verticalScrollingDistance() const; | ||
| 111 | void setVerticalScrollingDistance(int distance); | ||
| 112 | |||
| 107 | 113 | QByteArray cornerButtons() const; | |
| 108 | 114 | void setCornerButtons(const QByteArray &buttons); | |
| 109 | 115 |
kcmodule/ui/scrollingpage.ui
(44 / 1)
|   | |||
| 8 | 8 | <x>0</x> | |
| 9 | 9 | <y>0</y> | |
| 10 | 10 | <width>533</width> | |
| 11 | <height>360</height> | ||
| 11 | <height>413</height> | ||
| 12 | 12 | </rect> | |
| 13 | 13 | </property> | |
| 14 | 14 | <property name="windowTitle"> | |
| … | … | ||
| 37 | 37 | </property> | |
| 38 | 38 | </widget> | |
| 39 | 39 | </item> | |
| 40 | <item> | ||
| 41 | <widget class="KIntNumInput" name="kcfg_HorizontalScrollingDistance"> | ||
| 42 | <property name="label"> | ||
| 43 | <string comment="@label:slider">Scrolling speed</string> | ||
| 44 | </property> | ||
| 45 | <property name="minimum"> | ||
| 46 | <number>1</number> | ||
| 47 | </property> | ||
| 48 | <property name="maximum"> | ||
| 49 | <number>200</number> | ||
| 50 | </property> | ||
| 51 | <property name="singleStep"> | ||
| 52 | <number>10</number> | ||
| 53 | </property> | ||
| 54 | <property name="sliderEnabled"> | ||
| 55 | <bool>true</bool> | ||
| 56 | </property> | ||
| 57 | </widget> | ||
| 58 | </item> | ||
| 40 | 59 | </layout> | |
| 41 | 60 | </widget> | |
| 42 | 61 | </item> | |
| … | … | ||
| 79 | 79 | </property> | |
| 80 | 80 | </widget> | |
| 81 | 81 | </item> | |
| 82 | <item> | ||
| 83 | <widget class="KIntNumInput" name="kcfg_VerticalScrollingDistance"> | ||
| 84 | <property name="label"> | ||
| 85 | <string comment="@label:slider">Scrolling speed</string> | ||
| 86 | </property> | ||
| 87 | <property name="minimum"> | ||
| 88 | <number>1</number> | ||
| 89 | </property> | ||
| 90 | <property name="maximum"> | ||
| 91 | <number>200</number> | ||
| 92 | </property> | ||
| 93 | <property name="singleStep"> | ||
| 94 | <number>10</number> | ||
| 95 | </property> | ||
| 96 | <property name="sliderEnabled"> | ||
| 97 | <bool>true</bool> | ||
| 98 | </property> | ||
| 99 | </widget> | ||
| 100 | </item> | ||
| 82 | 101 | </layout> | |
| 83 | 102 | </widget> | |
| 84 | 103 | </item> | |
| … | … | ||
| 257 | 257 | <class>KComboBox</class> | |
| 258 | 258 | <extends>QComboBox</extends> | |
| 259 | 259 | <header>kcombobox.h</header> | |
| 260 | </customwidget> | ||
| 261 | <customwidget> | ||
| 262 | <class>KIntNumInput</class> | ||
| 263 | <extends>QWidget</extends> | ||
| 264 | <header>knuminput.h</header> | ||
| 260 | 265 | </customwidget> | |
| 261 | 266 | </customwidgets> | |
| 262 | 267 | <resources/> |
synaptiks.kcfg
(10 / 0)
|   | |||
| 137 | 137 | <default>3.0</default> | |
| 138 | 138 | <min>0.01</min> | |
| 139 | 139 | </entry> | |
| 140 | <entry name="HorizontalScrollingDistance" type="Int"> | ||
| 141 | <label>The move distance of the finger to generate a horizontal | ||
| 142 | scrolling event.</label> | ||
| 143 | <default>20</default> | ||
| 144 | </entry> | ||
| 145 | <entry name="VerticalScrollingDistance" type="Int"> | ||
| 146 | <label>The move distance of the finger to generate a vertical | ||
| 147 | scrolling event.</label> | ||
| 148 | <default>20</default> | ||
| 149 | </entry> | ||
| 140 | 150 | </group> | |
| 141 | 151 | <group name="Tapping"> | |
| 142 | 152 | <entry name="$(Corner)CornerButton" type="Enum"> |

