Commit c8323b8dee40c16ceb9110f6881bcada194e179a
- Diff rendering mode:
- inline
- side by side
daemon/org.kde.Touchpad.xml
(6 / 0)
|   | |||
| 130 | 130 | <method name="setFingerButtons"> | |
| 131 | 131 | <arg name="buttons" type="ay" direction="in"/> | |
| 132 | 132 | </method> | |
| 133 | <method name="twoFingerEmulationMinimumPressure"> | ||
| 134 | <arg type="i" direction="out"/> | ||
| 135 | </method> | ||
| 136 | <method name="setTwoFingerEmulationMinimumPressure"> | ||
| 137 | <arg type="i" direction="in"/> | ||
| 138 | </method> | ||
| 133 | 139 | <method name="fastTaps"> | |
| 134 | 140 | <arg type="b" direction="out"/> | |
| 135 | 141 | </method> |
daemon/synaptiksdaemon.cpp
(6 / 2)
|   | |||
| 275 | 275 | << "HorizontalScrollingDistance" << "VerticalScrollingDistance" | |
| 276 | 276 | << "CornerCoasting" | |
| 277 | 277 | // tapping configuration | |
| 278 | << "FastTaps" << "TapAndDragGesture" << "LockedDrags"; | ||
| 278 | << "FastTaps" << "TapAndDragGesture" << "LockedDrags" | ||
| 279 | // two finger emulation | ||
| 280 | << "TwoFingerEmulationMinimumPressure"; | ||
| 279 | 281 | foreach (const QString &name, names) { | |
| 280 | 282 | KConfigSkeletonItem *item = d->config->findItem(name); | |
| 281 | 283 | Q_ASSERT(item); | |
| … | … | ||
| 330 | 330 | << "HorizontalScrollingDistance" << "VerticalScrollingDistance" | |
| 331 | 331 | << "CornerCoasting" << "CoastingSpeed" | |
| 332 | 332 | // tapping configuration | |
| 333 | << "FastTaps" << "TapAndDragGesture" << "LockedDrags"; | ||
| 333 | << "FastTaps" << "TapAndDragGesture" << "LockedDrags" | ||
| 334 | // two finger emulation | ||
| 335 | << "TwoFingerEmulationMinimumPressure"; | ||
| 334 | 336 | foreach (const QString &name, names) { | |
| 335 | 337 | KConfigSkeletonItem *item = d->config->findItem(name); | |
| 336 | 338 | Q_ASSERT(item); |
daemon/touchpad.cpp
(11 / 0)
|   | |||
| 51 | 51 | static const char COASTING_SPEED[] = "Synaptics Coasting Speed"; | |
| 52 | 52 | static const char SCROLLING_DISTANCE[] = "Synaptics Scrolling Distance"; | |
| 53 | 53 | static const char TAP_ACTION[] = "Synaptics Tap Action"; | |
| 54 | static const char TWO_FINGER_PRESSURE[] = "Synaptics Two-Finger Pressure"; | ||
| 54 | 55 | static const char FAST_TAP[] = "Synaptics Tap FastTap"; | |
| 55 | 56 | static const char CIRCULAR_PAD[] = "Synaptics Circular Pad"; | |
| 56 | 57 | static const char CAPABILITIES[] = "Synaptics Capabilities"; | |
| … | … | ||
| 367 | 367 | QList<uchar> values = d->device->property<uchar>(TAP_ACTION); | |
| 368 | 368 | std::copy(buttons.begin(), buttons.begin()+3, values.begin()+4); | |
| 369 | 369 | return d->device->setProperty(TAP_ACTION, values); | |
| 370 | } | ||
| 371 | |||
| 372 | int Touchpad::twoFingerEmulationMinimumPressure() const { | ||
| 373 | Q_D(const Touchpad); | ||
| 374 | return d->device->property<int>(TWO_FINGER_SCROLLING, 0); | ||
| 375 | } | ||
| 376 | |||
| 377 | void Touchpad::setTwoFingerEmulationMinimumPressure(int pressure) { | ||
| 378 | Q_D(Touchpad); | ||
| 379 | d->device->setProperty(TWO_FINGER_SCROLLING, pressure); | ||
| 370 | 380 | } | |
| 371 | 381 | ||
| 372 | 382 | bool Touchpad::fastTaps() const { |
daemon/touchpad.h
(32 / 0)
|   | |||
| 514 | 514 | DESIGNABLE false) | |
| 515 | 515 | ||
| 516 | 516 | /** | |
| 517 | * @brief Minimum pressure for two finger press emulation. | ||
| 518 | * | ||
| 519 | * For touchpads, that are not capable of detecting multiple | ||
| 520 | * fingers, this property sets the minimum pressure to emulate a two | ||
| 521 | * finger press. If the pressure exceeds the value configured for | ||
| 522 | * this property, the touchpad driver issues a two finger press. | ||
| 523 | * | ||
| 524 | * @see setTwoFingerEmulationMinimumPressure(int) | ||
| 525 | * @see twoFingerEmulationMinimumPressure() const | ||
| 526 | * @see capabilities | ||
| 527 | * @see fingerDetection | ||
| 528 | */ | ||
| 529 | Q_PROPERTY(int twoFingerEmulationMinimumPressure | ||
| 530 | READ twoFingerEmulationMinimumPressure | ||
| 531 | WRITE setTwoFingerEmulationMinimumPressure | ||
| 532 | DESIGNABLE false) | ||
| 533 | |||
| 534 | /** | ||
| 517 | 535 | * @brief Whether or not fast tapping is enabled. | |
| 518 | 536 | * | |
| 519 | 537 | * Fast tapping makes the driver react faster on single taps, but | |
| … | … | ||
| 1119 | 1119 | * @see fingerButtons | |
| 1120 | 1120 | */ | |
| 1121 | 1121 | Q_SCRIPTABLE void setFingerButtons(const QByteArray &buttons); | |
| 1122 | |||
| 1123 | /** | ||
| 1124 | * @brief The pressure threshold to emulate a two finger press. | ||
| 1125 | * | ||
| 1126 | * @see twoFingerEmulationMinimumPressure | ||
| 1127 | */ | ||
| 1128 | Q_SCRIPTABLE int twoFingerEmulationMinimumPressure() const; | ||
| 1129 | |||
| 1130 | /** | ||
| 1131 | * @brief Set the pressure threshold to emulate a two finger press. | ||
| 1132 | * | ||
| 1133 | * @see twoFingerEmulationMinimumPressure | ||
| 1134 | */ | ||
| 1135 | Q_SCRIPTABLE void setTwoFingerEmulationMinimumPressure(int); | ||
| 1122 | 1136 | ||
| 1123 | 1137 | /** | |
| 1124 | 1138 | * @brief Whether fast taps are enabled. |
daemon/touchpadadaptor.cpp
(10 / 0)
|   | |||
| 243 | 243 | } | |
| 244 | 244 | } | |
| 245 | 245 | ||
| 246 | int TouchpadAdaptor::twoFingerEmulationMinimumPressure() const { | ||
| 247 | return this->propertyOrDBusError( | ||
| 248 | "twoFingerEmulationMinimumPressure").toInt(); | ||
| 249 | } | ||
| 250 | |||
| 251 | void TouchpadAdaptor::setTwoFingerEmulationMinimumPressure(int pressure) { | ||
| 252 | this->setPropertyOrDBusError("twoFingerEmulationMinimumPressure", | ||
| 253 | pressure); | ||
| 254 | } | ||
| 255 | |||
| 246 | 256 | bool TouchpadAdaptor::fastTaps() const { | |
| 247 | 257 | return this->propertyOrDBusError("fastTaps").toBool(); | |
| 248 | 258 | } |
daemon/touchpadadaptor.h
(3 / 0)
|   | |||
| 116 | 116 | QByteArray fingerButtons() const; | |
| 117 | 117 | void setFingerButtons(const QByteArray &buttons); | |
| 118 | 118 | ||
| 119 | int twoFingerEmulationMinimumPressure() const; | ||
| 120 | void setTwoFingerEmulationMinimumPressure(int); | ||
| 121 | |||
| 119 | 122 | bool fastTaps() const; | |
| 120 | 123 | void setFastTaps(bool enabled); | |
| 121 | 124 |
synaptiks.kcfg
(4 / 0)
|   | |||
| 152 | 152 | scrolling event.</label> | |
| 153 | 153 | <default>20</default> | |
| 154 | 154 | </entry> | |
| 155 | <entry name="TwoFingerEmulationMinimumPressure" type="Int"> | ||
| 156 | <label>Minimum pressure to emulate a two-finger press</label> | ||
| 157 | <default>150</default> | ||
| 158 | </entry> | ||
| 155 | 159 | </group> | |
| 156 | 160 | <group name="Tapping"> | |
| 157 | 161 | <entry name="$(Corner)CornerButton" type="Enum"> |

