mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 14:49:44 -09:00
[kcm/touchpad] Drop synaptics config
The synaptics touchpad driver has mostly been superseeded by libinput. For libinput we have a completely different UI. The KCM currently still supports both, making the code massively complex and causing a huge maintanance burden. Given the long-term focus is on Wayland and libinput drop the synaptic integration. This doesn't prevent anyone from using Plasma X11 with Synaptics, but there will not be a first-party config UI for it any more See https://invent.kde.org/plasma/plasma-desktop/-/issues/79
This commit is contained in:
parent
644c9b5b8e
commit
12ac086128
30 changed files with 2 additions and 2976 deletions
|
|
@ -213,14 +213,6 @@ pkg_check_modules(XORGSERVER xorg-server IMPORTED_TARGET)
|
||||||
|
|
||||||
ecm_find_qmlmodule(org.kde.pipewire 0.1)
|
ecm_find_qmlmodule(org.kde.pipewire 0.1)
|
||||||
|
|
||||||
find_package(Synaptics)
|
|
||||||
set_package_properties(Synaptics PROPERTIES TYPE OPTIONAL)
|
|
||||||
add_feature_info("Synaptics" SYNAPTICS_FOUND "Synaptics libraries are needed for the synaptics touchpad KCM")
|
|
||||||
|
|
||||||
if(SYNAPTICS_FOUND)
|
|
||||||
set(HAVE_SYNAPTICS 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(XORGLIBINPUT_FOUND)
|
if(XORGLIBINPUT_FOUND)
|
||||||
set(HAVE_XORGLIBINPUT 1)
|
set(HAVE_XORGLIBINPUT 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
# Have it in a find module to allow force disabling it via CMAKE_DISABLE_FIND_PACKAGE_
|
|
||||||
pkg_check_modules(SYNAPTICS xorg-synaptics IMPORTED_TARGET GLOBAL)
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#cmakedefine01 HAVE_XCURSOR
|
#cmakedefine01 HAVE_XCURSOR
|
||||||
#cmakedefine01 HAVE_XORGLIBINPUT
|
#cmakedefine01 HAVE_XORGLIBINPUT
|
||||||
#cmakedefine01 HAVE_X11
|
#cmakedefine01 HAVE_X11
|
||||||
#cmakedefine01 HAVE_SYNAPTICS
|
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,6 @@ SET(backend_SRCS
|
||||||
backends/x11/xrecordkeyboardmonitor.cpp
|
backends/x11/xrecordkeyboardmonitor.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(SYNAPTICS_FOUND)
|
|
||||||
list(APPEND backend_SRCS backends/x11/synapticstouchpad.cpp)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (XORGLIBINPUT_FOUND)
|
if (XORGLIBINPUT_FOUND)
|
||||||
|
|
||||||
SET(backend_SRCS
|
SET(backend_SRCS
|
||||||
|
|
@ -38,10 +34,6 @@ SET(backend_LIBS
|
||||||
PkgConfig::XORGSERVER
|
PkgConfig::XORGSERVER
|
||||||
)
|
)
|
||||||
|
|
||||||
if(SYNAPTICS_FOUND)
|
|
||||||
list(APPEND backend_LIBS PkgConfig::SYNAPTICS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_executable(kcm-touchpad-list-devices backends/x11/listdevices.cpp)
|
add_executable(kcm-touchpad-list-devices backends/x11/listdevices.cpp)
|
||||||
target_link_libraries(kcm-touchpad-list-devices
|
target_link_libraries(kcm-touchpad-list-devices
|
||||||
X11::X11
|
X11::X11
|
||||||
|
|
|
||||||
|
|
@ -1,225 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
SPDX-FileContributor: 2002-2005, 2007 Peter Osterlund <petero2@telia.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later AND LicenseRef-synaptics
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
#include "synapticstouchpad.h"
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <synaptics-properties.h>
|
|
||||||
|
|
||||||
#define SYN_MAX_BUTTONS 12
|
|
||||||
|
|
||||||
const struct Parameter synapticsProperties[] = {
|
|
||||||
{"LeftEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 0},
|
|
||||||
{"RightEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 1},
|
|
||||||
{"TopEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 2},
|
|
||||||
{"BottomEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 3},
|
|
||||||
{"FingerLow", PT_INT, 0, 255, SYNAPTICS_PROP_FINGER, 32, 0},
|
|
||||||
{"FingerHigh", PT_INT, 0, 255, SYNAPTICS_PROP_FINGER, 32, 1},
|
|
||||||
{"MaxTapTime", PT_INT, 0, 1000, SYNAPTICS_PROP_TAP_TIME, 32, 0},
|
|
||||||
{"MaxTapMove", PT_INT, 0, 2000, SYNAPTICS_PROP_TAP_MOVE, 32, 0},
|
|
||||||
{"MaxDoubleTapTime", PT_INT, 0, 1000, SYNAPTICS_PROP_TAP_DURATIONS, 32, 1},
|
|
||||||
{"SingleTapTimeout", PT_INT, 0, 1000, SYNAPTICS_PROP_TAP_DURATIONS, 32, 0},
|
|
||||||
{"ClickTime", PT_INT, 0, 1000, SYNAPTICS_PROP_TAP_DURATIONS, 32, 2},
|
|
||||||
{"FastTaps", PT_BOOL, 0, 1, SYNAPTICS_PROP_TAP_FAST, 8, 0},
|
|
||||||
{"EmulateMidButtonTime", PT_INT, 0, 1000, SYNAPTICS_PROP_MIDDLE_TIMEOUT, 32, 0},
|
|
||||||
{"EmulateTwoFingerMinZ", PT_INT, 0, 1000, SYNAPTICS_PROP_TWOFINGER_PRESSURE, 32, 0},
|
|
||||||
{"EmulateTwoFingerMinW", PT_INT, 0, 15, SYNAPTICS_PROP_TWOFINGER_WIDTH, 32, 0},
|
|
||||||
{"VertScrollDelta", PT_INT, -1000, 1000, SYNAPTICS_PROP_SCROLL_DISTANCE, 32, 0},
|
|
||||||
{"HorizScrollDelta", PT_INT, -1000, 1000, SYNAPTICS_PROP_SCROLL_DISTANCE, 32, 1},
|
|
||||||
{"VertEdgeScroll", PT_BOOL, 0, 1, SYNAPTICS_PROP_SCROLL_EDGE, 8, 0},
|
|
||||||
{"HorizEdgeScroll", PT_BOOL, 0, 1, SYNAPTICS_PROP_SCROLL_EDGE, 8, 1},
|
|
||||||
{"CornerCoasting", PT_BOOL, 0, 1, SYNAPTICS_PROP_SCROLL_EDGE, 8, 2},
|
|
||||||
{"VertTwoFingerScroll", PT_BOOL, 0, 1, SYNAPTICS_PROP_SCROLL_TWOFINGER, 8, 0},
|
|
||||||
{"HorizTwoFingerScroll", PT_BOOL, 0, 1, SYNAPTICS_PROP_SCROLL_TWOFINGER, 8, 1},
|
|
||||||
{"MinSpeed", PT_DOUBLE, 0, 255.0, SYNAPTICS_PROP_SPEED, 0, /*float */ 0},
|
|
||||||
{"MaxSpeed", PT_DOUBLE, 0, 255.0, SYNAPTICS_PROP_SPEED, 0, /*float */ 1},
|
|
||||||
{"AccelFactor", PT_DOUBLE, 0, 1.0, SYNAPTICS_PROP_SPEED, 0, /*float */ 2},
|
|
||||||
/*{"TouchpadOff", PT_INT, 0, 2, SYNAPTICS_PROP_OFF, 8, 0},*/
|
|
||||||
{"LockedDrags", PT_BOOL, 0, 1, SYNAPTICS_PROP_LOCKED_DRAGS, 8, 0},
|
|
||||||
{"LockedDragTimeout", PT_INT, 0, 30000, SYNAPTICS_PROP_LOCKED_DRAGS_TIMEOUT, 32, 0},
|
|
||||||
{"RTCornerButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_TAP_ACTION, 8, 0},
|
|
||||||
{"RBCornerButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_TAP_ACTION, 8, 1},
|
|
||||||
{"LTCornerButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_TAP_ACTION, 8, 2},
|
|
||||||
{"LBCornerButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_TAP_ACTION, 8, 3},
|
|
||||||
{"OneFingerTapButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_TAP_ACTION, 8, 4},
|
|
||||||
{"TwoFingerTapButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_TAP_ACTION, 8, 5},
|
|
||||||
{"ThreeFingerTapButton", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_TAP_ACTION, 8, 6},
|
|
||||||
{"ClickFinger1", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_CLICK_ACTION, 8, 0},
|
|
||||||
{"ClickFinger2", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_CLICK_ACTION, 8, 1},
|
|
||||||
{"ClickFinger3", PT_INT, 0, SYN_MAX_BUTTONS, SYNAPTICS_PROP_CLICK_ACTION, 8, 2},
|
|
||||||
{"CircularScrolling", PT_BOOL, 0, 1, SYNAPTICS_PROP_CIRCULAR_SCROLLING, 8, 0},
|
|
||||||
{"CircScrollDelta", PT_DOUBLE, .01, 3, SYNAPTICS_PROP_CIRCULAR_SCROLLING_DIST, 0 /* float */, 0},
|
|
||||||
{"CircScrollTrigger", PT_INT, 0, 8, SYNAPTICS_PROP_CIRCULAR_SCROLLING_TRIGGER, 8, 0},
|
|
||||||
{"PalmDetect", PT_BOOL, 0, 1, SYNAPTICS_PROP_PALM_DETECT, 8, 0},
|
|
||||||
{"PalmMinWidth", PT_INT, 0, 15, SYNAPTICS_PROP_PALM_DIMENSIONS, 32, 0},
|
|
||||||
{"PalmMinZ", PT_INT, 0, 255, SYNAPTICS_PROP_PALM_DIMENSIONS, 32, 1},
|
|
||||||
{"CoastingSpeed", PT_DOUBLE, 0, 255, SYNAPTICS_PROP_COASTING_SPEED, 0 /* float*/, 0},
|
|
||||||
{"CoastingFriction", PT_DOUBLE, 0, 255, SYNAPTICS_PROP_COASTING_SPEED, 0 /* float*/, 1},
|
|
||||||
{"PressureMotionMinZ", PT_INT, 1, 255, SYNAPTICS_PROP_PRESSURE_MOTION, 32, 0},
|
|
||||||
{"PressureMotionMaxZ", PT_INT, 1, 255, SYNAPTICS_PROP_PRESSURE_MOTION, 32, 1},
|
|
||||||
{"PressureMotionMinFactor", PT_DOUBLE, 0, 10.0, SYNAPTICS_PROP_PRESSURE_MOTION_FACTOR, 0 /*float*/, 0},
|
|
||||||
{"PressureMotionMaxFactor", PT_DOUBLE, 0, 10.0, SYNAPTICS_PROP_PRESSURE_MOTION_FACTOR, 0 /*float*/, 1},
|
|
||||||
{"GrabEventDevice", PT_BOOL, 0, 1, SYNAPTICS_PROP_GRAB, 8, 0},
|
|
||||||
{"TapAndDragGesture", PT_BOOL, 0, 1, SYNAPTICS_PROP_GESTURES, 8, 0},
|
|
||||||
{"AreaLeftEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_AREA, 32, 0},
|
|
||||||
{"AreaRightEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_AREA, 32, 1},
|
|
||||||
{"AreaTopEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_AREA, 32, 2},
|
|
||||||
{"AreaBottomEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_AREA, 32, 3},
|
|
||||||
{"HorizHysteresis", PT_INT, 0, 10000, SYNAPTICS_PROP_NOISE_CANCELLATION, 32, 0},
|
|
||||||
{"VertHysteresis", PT_INT, 0, 10000, SYNAPTICS_PROP_NOISE_CANCELLATION, 32, 1},
|
|
||||||
{"ClickPad", PT_BOOL, 0, 1, SYNAPTICS_PROP_CLICKPAD, 8, 0},
|
|
||||||
{"RightButtonAreaLeft", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 0},
|
|
||||||
{"RightButtonAreaRight", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 1},
|
|
||||||
{"RightButtonAreaTop", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 2},
|
|
||||||
{"RightButtonAreaBottom", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 3},
|
|
||||||
{"MiddleButtonAreaLeft", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 4},
|
|
||||||
{"MiddleButtonAreaRight", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 5},
|
|
||||||
{"MiddleButtonAreaTop", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 6},
|
|
||||||
{"MiddleButtonAreaBottom", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 7},
|
|
||||||
{NULL, PT_INT, 0, 0, nullptr, 0, 0},
|
|
||||||
};
|
|
||||||
|
|
||||||
SynapticsTouchpad::SynapticsTouchpad(Display *display, int deviceId)
|
|
||||||
: XlibTouchpad(display, deviceId)
|
|
||||||
, m_resX(1)
|
|
||||||
, m_resY(1)
|
|
||||||
{
|
|
||||||
m_capsAtom.intern(m_connection, SYNAPTICS_PROP_CAPABILITIES);
|
|
||||||
m_touchpadOffAtom.intern(m_connection, SYNAPTICS_PROP_OFF);
|
|
||||||
XcbAtom resolutionAtom(m_connection, SYNAPTICS_PROP_RESOLUTION);
|
|
||||||
XcbAtom edgesAtom(m_connection, SYNAPTICS_PROP_EDGES);
|
|
||||||
|
|
||||||
loadSupportedProperties(synapticsProperties);
|
|
||||||
|
|
||||||
m_toRadians.append("CircScrollDelta");
|
|
||||||
|
|
||||||
PropertyInfo edges(m_display, m_deviceId, edgesAtom, 0);
|
|
||||||
if (edges.i && edges.nitems == 4) {
|
|
||||||
int w = qAbs(edges.i[1] - edges.i[0]);
|
|
||||||
int h = qAbs(edges.i[3] - edges.i[2]);
|
|
||||||
m_resX = w / 90;
|
|
||||||
m_resY = h / 50;
|
|
||||||
qDebug() << "Width: " << w << " height: " << h;
|
|
||||||
qDebug() << "Approx. resX: " << m_resX << " resY: " << m_resY;
|
|
||||||
}
|
|
||||||
|
|
||||||
PropertyInfo resolution(m_display, m_deviceId, resolutionAtom, 0);
|
|
||||||
if (resolution.i && resolution.nitems == 2 && resolution.i[0] > 1 && resolution.i[1] > 1) {
|
|
||||||
m_resY = qMin(static_cast<unsigned long>(resolution.i[0]), static_cast<unsigned long>(INT_MAX));
|
|
||||||
m_resX = qMin(static_cast<unsigned long>(resolution.i[1]), static_cast<unsigned long>(INT_MAX));
|
|
||||||
qDebug() << "Touchpad resolution: x: " << m_resX << " y: " << m_resY;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_scaleByResX.append("HorizScrollDelta");
|
|
||||||
m_scaleByResY.append("VertScrollDelta");
|
|
||||||
m_scaleByResX.append("MaxTapMove");
|
|
||||||
m_scaleByResY.append("MaxTapMove");
|
|
||||||
|
|
||||||
m_resX = qMax(10, m_resX);
|
|
||||||
m_resY = qMax(10, m_resY);
|
|
||||||
qDebug() << "Final resolution x:" << m_resX << " y:" << m_resY;
|
|
||||||
m_negate["HorizScrollDelta"] = "InvertHorizScroll";
|
|
||||||
m_negate["VertScrollDelta"] = "InvertVertScroll";
|
|
||||||
m_supported.append(m_negate.values());
|
|
||||||
m_supported.append("Coasting");
|
|
||||||
|
|
||||||
PropertyInfo caps(m_display, m_deviceId, m_capsAtom.atom(), 0);
|
|
||||||
if (!caps.b) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum TouchpadCapabilitiy {
|
|
||||||
TouchpadHasLeftButton,
|
|
||||||
TouchpadHasMiddleButton,
|
|
||||||
TouchpadHasRightButton,
|
|
||||||
TouchpadTwoFingerDetect,
|
|
||||||
TouchpadThreeFingerDetect,
|
|
||||||
TouchpadPressureDetect,
|
|
||||||
TouchpadPalmDetect,
|
|
||||||
TouchpadCapsCount,
|
|
||||||
};
|
|
||||||
|
|
||||||
QVector<bool> cap(TouchpadCapsCount, false);
|
|
||||||
std::copy(caps.b, caps.b + qMin(cap.size(), static_cast<int>(caps.nitems)), cap.begin());
|
|
||||||
|
|
||||||
if (!cap[TouchpadTwoFingerDetect]) {
|
|
||||||
m_supported.removeAll("HorizTwoFingerScroll");
|
|
||||||
m_supported.removeAll("VertTwoFingerScroll");
|
|
||||||
m_supported.removeAll("TwoFingerTapButton");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cap[TouchpadThreeFingerDetect]) {
|
|
||||||
m_supported.removeAll("ThreeFingerTapButton");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cap[TouchpadPressureDetect]) {
|
|
||||||
m_supported.removeAll("FingerHigh");
|
|
||||||
m_supported.removeAll("FingerLow");
|
|
||||||
|
|
||||||
m_supported.removeAll("PalmMinZ");
|
|
||||||
m_supported.removeAll("PressureMotionMinZ");
|
|
||||||
m_supported.removeAll("PressureMotionMinFactor");
|
|
||||||
m_supported.removeAll("PressureMotionMaxZ");
|
|
||||||
m_supported.removeAll("PressureMotionMaxFactor");
|
|
||||||
m_supported.removeAll("EmulateTwoFingerMinZ");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cap[TouchpadPalmDetect]) {
|
|
||||||
m_supported.removeAll("PalmDetect");
|
|
||||||
m_supported.removeAll("PalmMinWidth");
|
|
||||||
m_supported.removeAll("PalmMinZ");
|
|
||||||
m_supported.removeAll("EmulateTwoFingerMinW");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (QMap<QString, QString>::Iterator i = m_negate.begin(); i != m_negate.end(); ++i) {
|
|
||||||
if (!m_supported.contains(i.key())) {
|
|
||||||
m_supported.removeAll(i.value());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_paramList = synapticsProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SynapticsTouchpad::setTouchpadOff(int touchpadOff)
|
|
||||||
{
|
|
||||||
PropertyInfo off(m_display, m_deviceId, m_touchpadOffAtom.atom(), 0);
|
|
||||||
if (off.b && *(off.b) != touchpadOff) {
|
|
||||||
*(off.b) = touchpadOff;
|
|
||||||
off.set();
|
|
||||||
}
|
|
||||||
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
int SynapticsTouchpad::touchpadOff()
|
|
||||||
{
|
|
||||||
PropertyInfo off(m_display, m_deviceId, m_touchpadOffAtom.atom(), 0);
|
|
||||||
return off.value(0).toInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
XcbAtom &SynapticsTouchpad::touchpadOffAtom()
|
|
||||||
{
|
|
||||||
return m_touchpadOffAtom;
|
|
||||||
}
|
|
||||||
|
|
||||||
double SynapticsTouchpad::getPropertyScale(const QString &name) const
|
|
||||||
{
|
|
||||||
if (m_scaleByResX.contains(name) && m_scaleByResY.contains(name)) {
|
|
||||||
return std::sqrt(static_cast<double>(m_resX) * m_resX + static_cast<double>(m_resY) * m_resY);
|
|
||||||
} else if (m_scaleByResX.contains(name)) {
|
|
||||||
return m_resX;
|
|
||||||
} else if (m_scaleByResY.contains(name)) {
|
|
||||||
return m_resY;
|
|
||||||
} else if (m_toRadians.contains(name)) {
|
|
||||||
return M_PI_4 / 45.0;
|
|
||||||
}
|
|
||||||
return 1.0;
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2015 Weng Xuetian <wengxt@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "xcbatom.h"
|
|
||||||
#include "xlibtouchpad.h"
|
|
||||||
|
|
||||||
class SynapticsTouchpad : public QObject, public XlibTouchpad
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
SynapticsTouchpad(Display *display, int deviceId);
|
|
||||||
|
|
||||||
void setTouchpadOff(int touchpadOff) override;
|
|
||||||
int touchpadOff() override;
|
|
||||||
|
|
||||||
XcbAtom &touchpadOffAtom() override;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
double getPropertyScale(const QString &name) const override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
XcbAtom m_capsAtom, m_touchpadOffAtom;
|
|
||||||
int m_resX, m_resY;
|
|
||||||
QStringList m_scaleByResX, m_scaleByResY, m_toRadians;
|
|
||||||
};
|
|
||||||
|
|
@ -26,9 +26,6 @@
|
||||||
#include <X11/extensions/XInput.h>
|
#include <X11/extensions/XInput.h>
|
||||||
#include <X11/extensions/XInput2.h>
|
#include <X11/extensions/XInput2.h>
|
||||||
|
|
||||||
#if HAVE_SYNAPTICS
|
|
||||||
#include <synaptics-properties.h>
|
|
||||||
#endif
|
|
||||||
#include <xserver-properties.h>
|
#include <xserver-properties.h>
|
||||||
|
|
||||||
struct DeviceListDeleter {
|
struct DeviceListDeleter {
|
||||||
|
|
@ -80,9 +77,6 @@ XlibBackend::XlibBackend(QObject *parent)
|
||||||
m_touchpadAtom.intern(m_connection, XI_TOUCHPAD);
|
m_touchpadAtom.intern(m_connection, XI_TOUCHPAD);
|
||||||
m_enabledAtom.intern(m_connection, XI_PROP_ENABLED);
|
m_enabledAtom.intern(m_connection, XI_PROP_ENABLED);
|
||||||
|
|
||||||
#if HAVE_SYNAPTICS
|
|
||||||
m_synapticsIdentifierAtom.intern(m_connection, SYNAPTICS_PROP_CAPABILITIES);
|
|
||||||
#endif
|
|
||||||
m_libinputIdentifierAtom.intern(m_connection, "libinput Send Events Modes Available");
|
m_libinputIdentifierAtom.intern(m_connection, "libinput Send Events Modes Available");
|
||||||
|
|
||||||
m_device.reset(findTouchpad());
|
m_device.reset(findTouchpad());
|
||||||
|
|
@ -112,12 +106,6 @@ XlibTouchpad *XlibBackend::findTouchpad()
|
||||||
setMode(TouchpadInputBackendMode::XLibinput);
|
setMode(TouchpadInputBackendMode::XLibinput);
|
||||||
return new LibinputTouchpad(m_display.get(), info->id);
|
return new LibinputTouchpad(m_display.get(), info->id);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if HAVE_SYNAPTICS
|
|
||||||
if (*atom == m_synapticsIdentifierAtom.atom()) {
|
|
||||||
setMode(TouchpadInputBackendMode::XSynaptics);
|
|
||||||
return new SynapticsTouchpad(m_display.get(), info->id);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -348,13 +336,6 @@ QVector<QObject *> XlibBackend::getDevices() const
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SYNAPTICS
|
|
||||||
SynapticsTouchpad *synaptics = dynamic_cast<SynapticsTouchpad *>(m_device.get());
|
|
||||||
if (synaptics) {
|
|
||||||
touchpads.push_back(synaptics);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return touchpads;
|
return touchpads;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
#include <QtGui/private/qtx11extras_p.h>
|
#include <QtGui/private/qtx11extras_p.h>
|
||||||
|
|
||||||
#include "libinputtouchpad.h"
|
#include "libinputtouchpad.h"
|
||||||
#include "synapticstouchpad.h"
|
|
||||||
#include "touchpadbackend.h"
|
#include "touchpadbackend.h"
|
||||||
#include "xlibtouchpad.h"
|
#include "xlibtouchpad.h"
|
||||||
|
|
||||||
|
|
@ -83,7 +82,6 @@ protected:
|
||||||
xcb_connection_t *m_connection;
|
xcb_connection_t *m_connection;
|
||||||
|
|
||||||
XcbAtom m_enabledAtom, m_mouseAtom, m_keyboardAtom, m_touchpadAtom;
|
XcbAtom m_enabledAtom, m_mouseAtom, m_keyboardAtom, m_touchpadAtom;
|
||||||
XcbAtom m_synapticsIdentifierAtom;
|
|
||||||
XcbAtom m_libinputIdentifierAtom;
|
XcbAtom m_libinputIdentifierAtom;
|
||||||
|
|
||||||
XlibTouchpad *findTouchpad();
|
XlibTouchpad *findTouchpad();
|
||||||
|
|
|
||||||
|
|
@ -5,27 +5,6 @@ set(KCM_TOUCHPAD_SRCS
|
||||||
resources.qrc
|
resources.qrc
|
||||||
)
|
)
|
||||||
|
|
||||||
if (BUILD_KCM_TOUCHPAD_X11)
|
|
||||||
set(KCM_TOUCHPAD_SRCS
|
|
||||||
${KCM_TOUCHPAD_SRCS}
|
|
||||||
xlib/customslider.cpp
|
|
||||||
xlib/sliderpair.cpp
|
|
||||||
xlib/testarea.cpp
|
|
||||||
xlib/testbutton.cpp
|
|
||||||
xlib/touchpadconfigxlib.cpp
|
|
||||||
xlib/customconfigdialogmanager.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
ki18n_wrap_ui(KCM_TOUCHPAD_SRCS
|
|
||||||
xlib/ui/pointermotion.ui
|
|
||||||
xlib/ui/tap.ui
|
|
||||||
xlib/ui/scroll.ui
|
|
||||||
xlib/ui/sensitivity.ui
|
|
||||||
xlib/ui/kded.ui
|
|
||||||
xlib/ui/testarea.ui
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(kcm_touchpad MODULE ${KCM_TOUCHPAD_SRCS})
|
add_library(kcm_touchpad MODULE ${KCM_TOUCHPAD_SRCS})
|
||||||
kcmutils_generate_desktop_file(kcm_touchpad)
|
kcmutils_generate_desktop_file(kcm_touchpad)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,8 @@
|
||||||
#include "libinput/touchpadconfiglibinput.h"
|
#include "libinput/touchpadconfiglibinput.h"
|
||||||
#include "touchpadbackend.h"
|
#include "touchpadbackend.h"
|
||||||
#include "touchpadconfigplugin.h"
|
#include "touchpadconfigplugin.h"
|
||||||
|
|
||||||
#include <config-build-options.h>
|
#include <config-build-options.h>
|
||||||
|
|
||||||
#if BUILD_KCM_TOUCHPAD_X11
|
|
||||||
#include "xlib/touchpadconfigxlib.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <KPluginFactory>
|
#include <KPluginFactory>
|
||||||
#include <KWindowSystem>
|
#include <KWindowSystem>
|
||||||
|
|
||||||
|
|
@ -37,29 +32,8 @@ TouchpadConfigContainer::TouchpadConfigContainer(QObject *parent, const KPluginM
|
||||||
: KCModule(parent, data)
|
: KCModule(parent, data)
|
||||||
, m_plugin(nullptr)
|
, m_plugin(nullptr)
|
||||||
{
|
{
|
||||||
if (TouchpadBackend *backend = TouchpadBackend::implementation(); backend != nullptr) {
|
TouchpadBackend *backend = TouchpadBackend::implementation();
|
||||||
switch (backend->getMode()) {
|
m_plugin = new TouchpadConfigLibinput(this, backend);
|
||||||
#if BUILD_KCM_TOUCHPAD_X11
|
|
||||||
case TouchpadInputBackendMode::XLibinput:
|
|
||||||
case TouchpadInputBackendMode::Unset:
|
|
||||||
m_plugin = new TouchpadConfigLibinput(this, backend);
|
|
||||||
break;
|
|
||||||
case TouchpadInputBackendMode::XSynaptics:
|
|
||||||
m_plugin = new TouchpadConfigXlib(this, backend);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#if BUILD_KCM_TOUCHPAD_KWIN_WAYLAND
|
|
||||||
case TouchpadInputBackendMode::WaylandLibinput:
|
|
||||||
m_plugin = new TouchpadConfigLibinput(this, backend);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
Q_UNUSED(m_plugin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (m_plugin == nullptr) {
|
|
||||||
qFatal("Not able to select appropriate configuration plugin, aborting kcm_touchpad startup");
|
|
||||||
}
|
|
||||||
|
|
||||||
setButtons(KCModule::Default | KCModule::Apply);
|
setButtons(KCModule::Default | KCModule::Apply);
|
||||||
}
|
}
|
||||||
|
|
@ -71,8 +45,6 @@ void TouchpadConfigContainer::kcmInit()
|
||||||
if (backend->getMode() == TouchpadInputBackendMode::XLibinput) {
|
if (backend->getMode() == TouchpadInputBackendMode::XLibinput) {
|
||||||
backend->getConfig();
|
backend->getConfig();
|
||||||
backend->applyConfig();
|
backend->applyConfig();
|
||||||
} else if (backend->getMode() == TouchpadInputBackendMode::XSynaptics) {
|
|
||||||
TouchpadConfigXlib::kcmInit();
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,11 @@
|
||||||
|
|
||||||
class TouchpadConfigPlugin;
|
class TouchpadConfigPlugin;
|
||||||
class TouchpadConfigLibinput;
|
class TouchpadConfigLibinput;
|
||||||
class TouchpadConfigXlib;
|
|
||||||
|
|
||||||
class TouchpadConfigContainer : public KCModule
|
class TouchpadConfigContainer : public KCModule
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
friend TouchpadConfigXlib;
|
|
||||||
friend TouchpadConfigLibinput;
|
friend TouchpadConfigLibinput;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -1,152 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "customconfigdialogmanager.h"
|
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
#include <QGroupBox>
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
#include <KComboBox>
|
|
||||||
#include <KConfigSkeleton>
|
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
#include "customslider.h"
|
|
||||||
|
|
||||||
CustomConfigDialogManager::CustomConfigDialogManager(QWidget *parent, KCoreConfigSkeleton *conf, const QStringList &supported)
|
|
||||||
: KConfigDialogManager(parent, conf)
|
|
||||||
, m_config(conf)
|
|
||||||
{
|
|
||||||
static const QString kcfgPrefix("kcfg_");
|
|
||||||
|
|
||||||
const auto itemList = conf->items();
|
|
||||||
for (KConfigSkeletonItem *i : itemList) {
|
|
||||||
QString name(i->name());
|
|
||||||
|
|
||||||
QWidget *child = parent->findChild<QWidget *>(kcfgPrefix + name);
|
|
||||||
if (!child) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
m_widgets[name] = child;
|
|
||||||
|
|
||||||
/* FIXME: this should probably be less hackish */
|
|
||||||
if (name == "Tapping" && !supported.contains("Tapping"))
|
|
||||||
qobject_cast<QGroupBox *>(child)->setCheckable(false);
|
|
||||||
else if (!supported.contains(name)) {
|
|
||||||
child->setEnabled(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
KCoreConfigSkeleton::ItemEnum *asEnum = dynamic_cast<KCoreConfigSkeleton::ItemEnum *>(i);
|
|
||||||
if (!asEnum) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList choiceList;
|
|
||||||
const auto asEnumChoices = asEnum->choices();
|
|
||||||
for (const auto &choice : asEnumChoices) {
|
|
||||||
choiceList.append(!choice.label.isEmpty() ? choice.label : choice.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
KComboBox *asComboBox = qobject_cast<KComboBox *>(child);
|
|
||||||
if (asComboBox) {
|
|
||||||
asComboBox->addItems(choiceList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomConfigDialogManager::~CustomConfigDialogManager()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariantHash CustomConfigDialogManager::currentWidgetProperties() const
|
|
||||||
{
|
|
||||||
QVariantHash r;
|
|
||||||
for (QMap<QString, QWidget *>::ConstIterator i = m_widgets.begin(); i != m_widgets.end(); ++i) {
|
|
||||||
r[i.key()] = property(i.value());
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomConfigDialogManager::setWidgetProperties(const QVariantHash &p)
|
|
||||||
{
|
|
||||||
for (QVariantHash::ConstIterator i = p.begin(); i != p.end(); ++i) {
|
|
||||||
QMap<QString, QWidget *>::ConstIterator j = m_widgets.constFind(i.key());
|
|
||||||
if (j != m_widgets.constEnd()) {
|
|
||||||
setProperty(j.value(), i.value());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool variantFuzzyCompare(const QVariant &a, const QVariant &b)
|
|
||||||
{
|
|
||||||
if (a == b) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isDouble_a = false, isDouble_b = false;
|
|
||||||
float d_a = static_cast<float>(a.toDouble(&isDouble_a)), d_b = static_cast<float>(b.toDouble(&isDouble_b));
|
|
||||||
if (!isDouble_a || !isDouble_b) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (qFuzzyIsNull(d_a) && qFuzzyIsNull(d_b)) || qFuzzyCompare(d_a, d_b);
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariant CustomConfigDialogManager::fixup(QWidget *widget, QVariant v) const
|
|
||||||
{
|
|
||||||
bool isDouble = false;
|
|
||||||
double value = v.toDouble(&isDouble);
|
|
||||||
if (!isDouble) {
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariant decimals(widget->property("decimals"));
|
|
||||||
if (decimals.typeId() != QMetaType::Type::Int) {
|
|
||||||
CustomSlider *asSlider = qobject_cast<CustomSlider *>(widget);
|
|
||||||
if (asSlider) {
|
|
||||||
return asSlider->fixup(value);
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
double k = std::pow(10.0, decimals.toInt());
|
|
||||||
return std::floor(value * k + 0.5) / k; // round
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CustomConfigDialogManager::compareWidgetProperties(const QVariantHash &p) const
|
|
||||||
{
|
|
||||||
bool result = true;
|
|
||||||
for (QVariantHash::ConstIterator i = p.begin(); i != p.end(); ++i) {
|
|
||||||
QMap<QString, QWidget *>::ConstIterator j = m_widgets.find(i.key());
|
|
||||||
if (j == m_widgets.end()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *widget = j.value();
|
|
||||||
QVariant widgetValue(fixup(widget, property(widget)));
|
|
||||||
QVariant fixed(fixup(widget, i.value()));
|
|
||||||
if (!variantFuzzyCompare(widgetValue, fixed)) {
|
|
||||||
result = false;
|
|
||||||
qDebug() << "Config mismatch:" << widget->objectName() << widgetValue << fixed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CustomConfigDialogManager::hasChangedFuzzy() const
|
|
||||||
{
|
|
||||||
for (QMap<QString, QWidget *>::ConstIterator i = m_widgets.begin(); i != m_widgets.end(); ++i) {
|
|
||||||
KConfigSkeletonItem *config = m_config->findItem(i.key());
|
|
||||||
QWidget *widget = i.value();
|
|
||||||
QVariant widgetValue(fixup(widget, property(widget)));
|
|
||||||
QVariant configValue(fixup(widget, config->property()));
|
|
||||||
if (!variantFuzzyCompare(widgetValue, configValue)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QMap>
|
|
||||||
#include <QVariantHash>
|
|
||||||
|
|
||||||
#include <KConfigDialogManager>
|
|
||||||
|
|
||||||
class CustomConfigDialogManager : public KConfigDialogManager
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
CustomConfigDialogManager(QWidget *parent, KCoreConfigSkeleton *config, const QStringList &supported);
|
|
||||||
~CustomConfigDialogManager();
|
|
||||||
|
|
||||||
QVariantHash currentWidgetProperties() const;
|
|
||||||
void setWidgetProperties(const QVariantHash &);
|
|
||||||
bool compareWidgetProperties(const QVariantHash &) const;
|
|
||||||
bool hasChangedFuzzy() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QVariant fixup(QWidget *widget, QVariant value) const;
|
|
||||||
|
|
||||||
QMap<QString, QWidget *> m_widgets;
|
|
||||||
KCoreConfigSkeleton *m_config;
|
|
||||||
};
|
|
||||||
|
|
@ -1,144 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "customslider.h"
|
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
#include <QResizeEvent>
|
|
||||||
|
|
||||||
CustomSlider::Interpolator::~Interpolator()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
double CustomSlider::Interpolator::absolute(double relative, double minimum, double maximum) const
|
|
||||||
{
|
|
||||||
return relative * (maximum - minimum) + minimum;
|
|
||||||
}
|
|
||||||
|
|
||||||
double CustomSlider::Interpolator::relative(double absolute, double minimum, double maximum) const
|
|
||||||
{
|
|
||||||
return (absolute - minimum) / (maximum - minimum);
|
|
||||||
}
|
|
||||||
|
|
||||||
double CustomSlider::SqrtInterpolator::absolute(double relative, double minimum, double maximum) const
|
|
||||||
{
|
|
||||||
relative *= relative;
|
|
||||||
return Interpolator::absolute(relative, minimum, maximum);
|
|
||||||
}
|
|
||||||
|
|
||||||
double CustomSlider::SqrtInterpolator::relative(double absolute, double minimum, double maximum) const
|
|
||||||
{
|
|
||||||
double value = Interpolator::relative(absolute, minimum, maximum);
|
|
||||||
return std::sqrt(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
const CustomSlider::Interpolator CustomSlider::lerp;
|
|
||||||
|
|
||||||
CustomSlider::CustomSlider(QWidget *parent)
|
|
||||||
: QSlider(parent)
|
|
||||||
, m_min(0.0)
|
|
||||||
, m_max(1.0)
|
|
||||||
, m_interpolator(&lerp)
|
|
||||||
{
|
|
||||||
setSingleStep(10);
|
|
||||||
setPageStep(100);
|
|
||||||
|
|
||||||
updateValue();
|
|
||||||
updateRange(size());
|
|
||||||
|
|
||||||
connect(this, &QAbstractSlider::actionTriggered, this, &CustomSlider::updateValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomSlider::resizeEvent(QResizeEvent *e)
|
|
||||||
{
|
|
||||||
QSlider::resizeEvent(e);
|
|
||||||
updateRange(e->size());
|
|
||||||
}
|
|
||||||
|
|
||||||
const CustomSlider::Interpolator *CustomSlider::interpolator() const
|
|
||||||
{
|
|
||||||
return m_interpolator;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomSlider::setInterpolator(const CustomSlider::Interpolator *v)
|
|
||||||
{
|
|
||||||
m_interpolator = v;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomSlider::setDoubleMinimum(double v)
|
|
||||||
{
|
|
||||||
m_min = v;
|
|
||||||
}
|
|
||||||
|
|
||||||
double CustomSlider::doubleMinimum() const
|
|
||||||
{
|
|
||||||
return m_min;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomSlider::setDoubleMaximum(double v)
|
|
||||||
{
|
|
||||||
m_max = v;
|
|
||||||
}
|
|
||||||
|
|
||||||
double CustomSlider::doubleMaximum() const
|
|
||||||
{
|
|
||||||
return m_max;
|
|
||||||
}
|
|
||||||
|
|
||||||
double CustomSlider::doubleValue() const
|
|
||||||
{
|
|
||||||
return qBound(m_min, m_value, m_max);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomSlider::setDoubleValue(double v)
|
|
||||||
{
|
|
||||||
if (m_value == v) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_value = v;
|
|
||||||
int oldIntValue = value();
|
|
||||||
moveSlider();
|
|
||||||
if (value() != oldIntValue) {
|
|
||||||
Q_EMIT valueChanged(doubleValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
double CustomSlider::intToDouble(int v) const
|
|
||||||
{
|
|
||||||
double relative = lerp.relative(v, minimum(), maximum());
|
|
||||||
return m_interpolator->absolute(relative, m_min, m_max);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomSlider::updateValue()
|
|
||||||
{
|
|
||||||
m_value = intToDouble(sliderPosition());
|
|
||||||
Q_EMIT valueChanged(doubleValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
double CustomSlider::fixup(double v) const
|
|
||||||
{
|
|
||||||
return intToDouble(doubleToInt(v));
|
|
||||||
}
|
|
||||||
|
|
||||||
int CustomSlider::doubleToInt(double v) const
|
|
||||||
{
|
|
||||||
double relative = m_interpolator->relative(v, m_min, m_max);
|
|
||||||
double absolute = lerp.absolute(relative, minimum(), maximum());
|
|
||||||
return static_cast<int>(std::floor(absolute + 0.5));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomSlider::moveSlider()
|
|
||||||
{
|
|
||||||
setValue(doubleToInt(doubleValue()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomSlider::updateRange(const QSize &s)
|
|
||||||
{
|
|
||||||
setRange(0, (orientation() == Qt::Horizontal) ? s.width() : s.height());
|
|
||||||
moveSlider();
|
|
||||||
}
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QSlider>
|
|
||||||
|
|
||||||
class CustomSlider : public QSlider
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
Q_PROPERTY(double minimum READ doubleMinimum WRITE setDoubleMinimum)
|
|
||||||
Q_PROPERTY(double maximum READ doubleMaximum WRITE setDoubleMaximum)
|
|
||||||
Q_PROPERTY(double value READ doubleValue WRITE setDoubleValue NOTIFY valueChanged USER true)
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit CustomSlider(QWidget *parent = nullptr);
|
|
||||||
|
|
||||||
void setDoubleMinimum(double);
|
|
||||||
double doubleMinimum() const;
|
|
||||||
|
|
||||||
void setDoubleMaximum(double);
|
|
||||||
double doubleMaximum() const;
|
|
||||||
|
|
||||||
class Interpolator
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Interpolator()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
virtual double absolute(double relative, double minimum, double maximum) const;
|
|
||||||
virtual double relative(double absolute, double minimum, double maximum) const;
|
|
||||||
|
|
||||||
virtual ~Interpolator();
|
|
||||||
};
|
|
||||||
|
|
||||||
class SqrtInterpolator : public Interpolator
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
SqrtInterpolator()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
double absolute(double relative, double minimum, double maximum) const override;
|
|
||||||
double relative(double absolute, double minimum, double maximum) const override;
|
|
||||||
};
|
|
||||||
|
|
||||||
const Interpolator *interpolator() const;
|
|
||||||
void setInterpolator(const Interpolator *);
|
|
||||||
|
|
||||||
double doubleValue() const;
|
|
||||||
double fixup(double) const;
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
|
||||||
void setDoubleValue(double);
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void valueChanged(double);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void resizeEvent(QResizeEvent *) override;
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void updateValue();
|
|
||||||
|
|
||||||
private:
|
|
||||||
void updateRange(const QSize &);
|
|
||||||
void moveSlider();
|
|
||||||
int doubleToInt(double) const;
|
|
||||||
double intToDouble(int) const;
|
|
||||||
|
|
||||||
static const Interpolator lerp;
|
|
||||||
|
|
||||||
double m_min, m_max, m_value;
|
|
||||||
const Interpolator *m_interpolator;
|
|
||||||
};
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "sliderpair.h"
|
|
||||||
|
|
||||||
#include <QSlider>
|
|
||||||
|
|
||||||
SliderPair::SliderPair(QSlider *minSlider, QSlider *maxSlider, QObject *parent)
|
|
||||||
: QObject(parent)
|
|
||||||
, m_minSlider(minSlider)
|
|
||||||
, m_maxSlider(maxSlider)
|
|
||||||
{
|
|
||||||
connect(m_minSlider, &QAbstractSlider::valueChanged, this, &SliderPair::adjustMaxSlider);
|
|
||||||
connect(m_maxSlider, &QAbstractSlider::valueChanged, this, &SliderPair::adjustMinSlider);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SliderPair::adjustMaxSlider()
|
|
||||||
{
|
|
||||||
m_maxSlider->setValue(qMax(m_maxSlider->value(), m_minSlider->value()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void SliderPair::adjustMinSlider()
|
|
||||||
{
|
|
||||||
m_minSlider->setValue(qMin(m_maxSlider->value(), m_minSlider->value()));
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QObject>
|
|
||||||
|
|
||||||
class QSlider;
|
|
||||||
|
|
||||||
class SliderPair : public QObject
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
SliderPair(QSlider *minSlider, QSlider *maxSlider, QObject *parent = nullptr);
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void adjustMinSlider();
|
|
||||||
void adjustMaxSlider();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QSlider *m_minSlider, *m_maxSlider;
|
|
||||||
};
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "testarea.h"
|
|
||||||
|
|
||||||
#include <QKeyEvent>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
|
|
||||||
#include <KLocalizedString>
|
|
||||||
#include <Plasma/Theme>
|
|
||||||
|
|
||||||
TestArea::TestArea(QWidget *parent)
|
|
||||||
: QWidget(parent)
|
|
||||||
{
|
|
||||||
m_ui.setupUi(this);
|
|
||||||
|
|
||||||
m_ui.listWidget->addItem(new QListWidgetItem(QIcon::fromTheme("folder"), i18n("Drag me"), m_ui.listWidget));
|
|
||||||
|
|
||||||
Plasma::Theme defaultTheme;
|
|
||||||
QString wallpaper = defaultTheme.wallpaperPath();
|
|
||||||
static const QString stylesheet("background-image: url(%1)");
|
|
||||||
m_ui.scrollAreaWidgetContents->setStyleSheet(stylesheet.arg(wallpaper));
|
|
||||||
}
|
|
||||||
|
|
||||||
void TestArea::enterEvent(QEnterEvent *e)
|
|
||||||
{
|
|
||||||
Q_EMIT enter();
|
|
||||||
QWidget::enterEvent(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
void TestArea::leaveEvent(QEvent *e)
|
|
||||||
{
|
|
||||||
Q_EMIT leave();
|
|
||||||
QWidget::leaveEvent(e);
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "ui_testarea.h"
|
|
||||||
|
|
||||||
class TestArea : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit TestArea(QWidget *);
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void enter();
|
|
||||||
void leave();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void enterEvent(QEnterEvent *) override;
|
|
||||||
void leaveEvent(QEvent *) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::TestArea m_ui;
|
|
||||||
};
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "testbutton.h"
|
|
||||||
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QTimer>
|
|
||||||
|
|
||||||
#include <KLocalizedString>
|
|
||||||
|
|
||||||
TestButton::TestButton(QWidget *parent)
|
|
||||||
: QPushButton(parent)
|
|
||||||
, m_firstClick(true)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void TestButton::mousePressEvent(QMouseEvent *e)
|
|
||||||
{
|
|
||||||
if (m_firstClick) {
|
|
||||||
m_originalText = text();
|
|
||||||
m_firstClick = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (e->button()) {
|
|
||||||
case Qt::LeftButton:
|
|
||||||
setText(i18nc("Mouse button", "Left button"));
|
|
||||||
break;
|
|
||||||
case Qt::RightButton:
|
|
||||||
setText(i18nc("Mouse button", "Right button"));
|
|
||||||
break;
|
|
||||||
case Qt::MiddleButton:
|
|
||||||
setText(i18nc("Mouse button", "Middle button"));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTimer::singleShot(500, this, &TestButton::resetText);
|
|
||||||
|
|
||||||
QPushButton::mousePressEvent(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
void TestButton::resetText()
|
|
||||||
{
|
|
||||||
setText(m_originalText);
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QPushButton>
|
|
||||||
|
|
||||||
class TestButton : public QPushButton
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit TestButton(QWidget *);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void mousePressEvent(QMouseEvent *) override;
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void resetText();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QString m_originalText;
|
|
||||||
bool m_firstClick;
|
|
||||||
};
|
|
||||||
|
|
@ -1,333 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "touchpadconfigxlib.h"
|
|
||||||
|
|
||||||
#include <QDBusInterface>
|
|
||||||
#include <QScrollArea>
|
|
||||||
#include <QTabWidget>
|
|
||||||
|
|
||||||
#include <KAboutData>
|
|
||||||
#include <KConfigGroup>
|
|
||||||
#include <KLocalizedString>
|
|
||||||
#include <KMessageWidget>
|
|
||||||
#include <KNotifyConfigWidget>
|
|
||||||
#include <KShortcutsDialog>
|
|
||||||
#include <QAction>
|
|
||||||
|
|
||||||
#include "../touchpadconfigcontainer.h"
|
|
||||||
#include "actions.h"
|
|
||||||
#include "customconfigdialogmanager.h"
|
|
||||||
#include "customslider.h"
|
|
||||||
#include "sliderpair.h"
|
|
||||||
#include "touchpadbackend.h"
|
|
||||||
#include "touchpadinterface.h"
|
|
||||||
|
|
||||||
#include "plasma_version.h"
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::kcmInit()
|
|
||||||
{
|
|
||||||
TouchpadParameters::setSystemDefaults();
|
|
||||||
touchpadApplySavedConfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void copyHelpFromBuddy(QObject *root)
|
|
||||||
{
|
|
||||||
QLabel *asLabel = qobject_cast<QLabel *>(root);
|
|
||||||
if (asLabel && asLabel->buddy()) {
|
|
||||||
if (asLabel->toolTip().isEmpty()) {
|
|
||||||
asLabel->setToolTip(asLabel->buddy()->toolTip());
|
|
||||||
}
|
|
||||||
if (asLabel->statusTip().isEmpty()) {
|
|
||||||
asLabel->setStatusTip(asLabel->buddy()->statusTip());
|
|
||||||
}
|
|
||||||
if (asLabel->whatsThis().isEmpty()) {
|
|
||||||
asLabel->setWhatsThis(asLabel->buddy()->whatsThis());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const auto childList = root->children();
|
|
||||||
for (QObject *child : childList) {
|
|
||||||
copyHelpFromBuddy(child);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
QWidget *addTab(QTabWidget *tabs, T &form)
|
|
||||||
{
|
|
||||||
QScrollArea *container = new QScrollArea(tabs);
|
|
||||||
container->setWidgetResizable(true);
|
|
||||||
container->setFrameStyle(QFrame::NoFrame);
|
|
||||||
container->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
|
|
||||||
|
|
||||||
QWidget *widget = new QWidget(container);
|
|
||||||
form.setupUi(widget);
|
|
||||||
copyHelpFromBuddy(widget);
|
|
||||||
widget->setContentsMargins(20, 20, 20, 20);
|
|
||||||
widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
|
||||||
|
|
||||||
container->setWidget(widget);
|
|
||||||
tabs->addTab(container, widget->windowTitle());
|
|
||||||
|
|
||||||
return widget;
|
|
||||||
}
|
|
||||||
|
|
||||||
TouchpadConfigXlib::TouchpadConfigXlib(TouchpadConfigContainer *parent, TouchpadBackend *backend)
|
|
||||||
: TouchpadConfigPlugin(parent, backend)
|
|
||||||
, m_configOutOfSync(false)
|
|
||||||
{
|
|
||||||
QGridLayout *layout = new QGridLayout(this);
|
|
||||||
QVBoxLayout *messageLayout = new QVBoxLayout();
|
|
||||||
layout->addLayout(messageLayout, 0, 0, 1, 2);
|
|
||||||
|
|
||||||
// Messages
|
|
||||||
|
|
||||||
m_errorMessage = new KMessageWidget(this);
|
|
||||||
m_errorMessage->setMessageType(KMessageWidget::Error);
|
|
||||||
m_errorMessage->setVisible(false);
|
|
||||||
m_errorMessage->setWordWrap(true);
|
|
||||||
messageLayout->addWidget(m_errorMessage);
|
|
||||||
|
|
||||||
m_configOutOfSyncMessage = new KMessageWidget(this);
|
|
||||||
m_configOutOfSyncMessage->setMessageType(KMessageWidget::Warning);
|
|
||||||
m_configOutOfSyncMessage->setText(
|
|
||||||
i18n("Active settings don't match saved settings.\n"
|
|
||||||
"You currently see saved settings."));
|
|
||||||
m_configOutOfSyncMessage->setVisible(false);
|
|
||||||
messageLayout->addWidget(m_configOutOfSyncMessage);
|
|
||||||
|
|
||||||
m_loadActiveConfiguration = new QAction(m_configOutOfSyncMessage);
|
|
||||||
m_loadActiveConfiguration->setText(i18n("Show active settings"));
|
|
||||||
connect(m_loadActiveConfiguration, SIGNAL(triggered()), SLOT(loadActiveConfig()));
|
|
||||||
m_configOutOfSyncMessage->addAction(m_loadActiveConfiguration);
|
|
||||||
|
|
||||||
layout->setColumnStretch(0, 3);
|
|
||||||
layout->setColumnStretch(1, 1);
|
|
||||||
|
|
||||||
// Main UI
|
|
||||||
|
|
||||||
m_tabs = new QTabWidget(this);
|
|
||||||
layout->addWidget(m_tabs, 1, 0, 1, 1);
|
|
||||||
|
|
||||||
addTab(m_tabs, m_tapping);
|
|
||||||
addTab(m_tabs, m_scrolling);
|
|
||||||
addTab(m_tabs, m_pointerMotion);
|
|
||||||
addTab(m_tabs, m_sensitivity);
|
|
||||||
|
|
||||||
static const CustomSlider::SqrtInterpolator interpolator;
|
|
||||||
m_pointerMotion.kcfg_MinSpeed->setInterpolator(&interpolator);
|
|
||||||
m_pointerMotion.kcfg_MaxSpeed->setInterpolator(&interpolator);
|
|
||||||
m_pointerMotion.kcfg_AccelFactor->setInterpolator(&interpolator);
|
|
||||||
|
|
||||||
new SliderPair(m_pointerMotion.kcfg_MinSpeed, m_pointerMotion.kcfg_MaxSpeed, this);
|
|
||||||
new SliderPair(m_sensitivity.kcfg_FingerLow, m_sensitivity.kcfg_FingerHigh, this);
|
|
||||||
new SliderPair(m_pointerMotion.kcfg_PressureMotionMinZ, m_pointerMotion.kcfg_PressureMotionMaxZ, this);
|
|
||||||
|
|
||||||
m_manager = new CustomConfigDialogManager(this, &m_config, m_backend->supportedParameters());
|
|
||||||
connect(m_manager, SIGNAL(widgetModified()), SLOT(checkChanges()), Qt::QueuedConnection);
|
|
||||||
|
|
||||||
// KDED settings
|
|
||||||
|
|
||||||
m_kdedTab = addTab(m_tabs, m_kded);
|
|
||||||
m_daemonConfigManager = m_parent->addConfig(&m_daemonSettings, m_kdedTab);
|
|
||||||
|
|
||||||
KMessageWidget *kdedMessage = new KMessageWidget(m_kdedTab);
|
|
||||||
kdedMessage->setMessageType(KMessageWidget::Information);
|
|
||||||
kdedMessage->setCloseButtonVisible(false);
|
|
||||||
kdedMessage->setText(i18n("These settings won't take effect in the testing area"));
|
|
||||||
qobject_cast<QVBoxLayout *>(m_kdedTab->layout())->insertWidget(0, kdedMessage);
|
|
||||||
|
|
||||||
connect(m_kded.configureNotificationsButton, SIGNAL(clicked()), SLOT(showConfigureNotificationsDialog()));
|
|
||||||
m_shortcutsDialog.reset(new KShortcutsDialog(KShortcutsEditor::GlobalAction, KShortcutsEditor::LetterShortcutsDisallowed));
|
|
||||||
m_shortcutsDialog->addCollection(new TouchpadGlobalActions(true, this), i18n("Enable/Disable Touchpad"));
|
|
||||||
connect(m_kded.configureShortcutsButton, &QPushButton::clicked, this, [this]() {
|
|
||||||
m_shortcutsDialog->configure(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
m_mouseCombo = new KComboBox(true, m_kded.kcfg_MouseBlacklist);
|
|
||||||
m_kded.kcfg_MouseBlacklist->setCustomEditor(m_mouseCombo);
|
|
||||||
connect(m_backend, SIGNAL(mousesChanged()), SLOT(updateMouseList()));
|
|
||||||
m_backend->watchForEvents(false);
|
|
||||||
updateMouseList();
|
|
||||||
|
|
||||||
m_daemon = new OrgKdeTouchpadInterface("org.kde.kded6", "/modules/kded_touchpad", QDBusConnection::sessionBus(), this);
|
|
||||||
m_kdedTab->setEnabled(false);
|
|
||||||
QDBusPendingCallWatcher *watch;
|
|
||||||
watch = new QDBusPendingCallWatcher(m_daemon->workingTouchpadFound(), this);
|
|
||||||
// clang-format off
|
|
||||||
connect(watch, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(gotReplyFromDaemon(QDBusPendingCallWatcher*)));
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
// Testing area
|
|
||||||
|
|
||||||
m_testArea = new TestArea(this);
|
|
||||||
layout->addWidget(m_testArea, 1, 1);
|
|
||||||
connect(m_testArea, SIGNAL(enter()), SLOT(beginTesting()));
|
|
||||||
connect(m_testArea, SIGNAL(leave()), SLOT(endTesting()));
|
|
||||||
connect(m_tabs, SIGNAL(currentChanged(int)), SLOT(updateTestAreaEnabled()));
|
|
||||||
updateTestAreaEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::gotReplyFromDaemon(QDBusPendingCallWatcher *watch)
|
|
||||||
{
|
|
||||||
QDBusPendingReply<bool> reply = *watch;
|
|
||||||
if (reply.isValid() && reply.value()) {
|
|
||||||
m_kdedTab->setEnabled(true);
|
|
||||||
}
|
|
||||||
watch->deleteLater();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::updateMouseList()
|
|
||||||
{
|
|
||||||
const QStringList mouses(m_backend->listMouses(m_daemonSettings.mouseBlacklist()));
|
|
||||||
|
|
||||||
for (int i = 0; i < m_mouseCombo->count();) {
|
|
||||||
if (!mouses.contains(m_mouseCombo->itemText(i))) {
|
|
||||||
m_mouseCombo->removeItem(i);
|
|
||||||
} else {
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const QString &device : mouses) {
|
|
||||||
if (!m_mouseCombo->contains(device)) {
|
|
||||||
m_mouseCombo->addItem(device);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariantHash TouchpadConfigXlib::getActiveConfig()
|
|
||||||
{
|
|
||||||
if (m_prevConfig) {
|
|
||||||
return *m_prevConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariantHash activeConfig;
|
|
||||||
if (!m_backend->getConfig(activeConfig)) {
|
|
||||||
m_errorMessage->setText(m_backend->errorString());
|
|
||||||
QMetaObject::invokeMethod(m_errorMessage, "animatedShow", Qt::QueuedConnection);
|
|
||||||
}
|
|
||||||
return activeConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::loadActiveConfig()
|
|
||||||
{
|
|
||||||
m_manager->setWidgetProperties(getActiveConfig());
|
|
||||||
m_configOutOfSync = false;
|
|
||||||
m_configOutOfSyncMessage->animatedHide();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::load()
|
|
||||||
{
|
|
||||||
m_manager->updateWidgets();
|
|
||||||
|
|
||||||
m_parent->kcmLoad();
|
|
||||||
|
|
||||||
m_configOutOfSync = !m_manager->compareWidgetProperties(getActiveConfig());
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::save()
|
|
||||||
{
|
|
||||||
m_manager->updateSettings();
|
|
||||||
|
|
||||||
m_configOutOfSync = false;
|
|
||||||
m_configOutOfSyncMessage->animatedHide();
|
|
||||||
|
|
||||||
bool daemonSettingsChanged = m_daemonConfigManager->hasChanged();
|
|
||||||
|
|
||||||
m_parent->kcmSave();
|
|
||||||
|
|
||||||
if (m_backend->applyConfig(m_config.values())) {
|
|
||||||
m_errorMessage->animatedHide();
|
|
||||||
} else {
|
|
||||||
m_errorMessage->setText(m_backend->errorString());
|
|
||||||
m_errorMessage->animatedShow();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (daemonSettingsChanged) {
|
|
||||||
m_daemon->reloadSettings();
|
|
||||||
updateMouseList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::defaults()
|
|
||||||
{
|
|
||||||
m_manager->updateWidgetsDefault();
|
|
||||||
|
|
||||||
m_parent->kcmDefaults();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::checkChanges()
|
|
||||||
{
|
|
||||||
if (!m_backend->touchpadCount()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
m_parent->unmanagedWidgetChangeState(m_manager->hasChangedFuzzy() || m_configOutOfSync);
|
|
||||||
if (m_configOutOfSync) {
|
|
||||||
m_configOutOfSyncMessage->animatedShow();
|
|
||||||
} else {
|
|
||||||
m_configOutOfSyncMessage->animatedHide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::hideEvent(QHideEvent *e)
|
|
||||||
{
|
|
||||||
Q_UNUSED(e);
|
|
||||||
endTesting();
|
|
||||||
}
|
|
||||||
|
|
||||||
TouchpadConfigXlib::~TouchpadConfigXlib()
|
|
||||||
{
|
|
||||||
endTesting();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::onChanged()
|
|
||||||
{
|
|
||||||
if (m_testArea->underMouse()) {
|
|
||||||
beginTesting();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::beginTesting()
|
|
||||||
{
|
|
||||||
if (!m_prevConfig) {
|
|
||||||
m_prevConfig.reset(new QVariantHash());
|
|
||||||
m_backend->getConfig(*m_prevConfig.get());
|
|
||||||
}
|
|
||||||
m_backend->applyConfig(m_manager->currentWidgetProperties());
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::endTesting()
|
|
||||||
{
|
|
||||||
if (!m_prevConfig) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
m_backend->applyConfig(*m_prevConfig.get());
|
|
||||||
m_prevConfig.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::updateTestAreaEnabled()
|
|
||||||
{
|
|
||||||
bool enable = true;
|
|
||||||
for (QWidget *i = m_kdedTab; i; i = i->parentWidget()) {
|
|
||||||
if (i == m_tabs->currentWidget()) {
|
|
||||||
enable = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_testArea->setEnabled(enable);
|
|
||||||
m_testArea->setMouseTracking(enable);
|
|
||||||
if (!enable) {
|
|
||||||
endTesting();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TouchpadConfigXlib::showConfigureNotificationsDialog()
|
|
||||||
{
|
|
||||||
KNotifyConfigWidget *widget = KNotifyConfigWidget::configure(nullptr, QStringLiteral("kcm_touchpad"));
|
|
||||||
QDialog *dialog = qobject_cast<QDialog *>(widget->topLevelWidget());
|
|
||||||
connect(dialog, SIGNAL(finished()), dialog, SLOT(deleteLater()));
|
|
||||||
}
|
|
||||||
|
|
@ -1,87 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2013 Alexander Mezin <mezin.alexander@gmail.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "../touchpadconfigplugin.h"
|
|
||||||
|
|
||||||
#include <KConfigDialogManager>
|
|
||||||
#include <QSpinBox>
|
|
||||||
|
|
||||||
#include "kdedsettings.h"
|
|
||||||
#include "testarea.h"
|
|
||||||
#include "touchpadparameters.h"
|
|
||||||
|
|
||||||
#include "ui_kded.h"
|
|
||||||
#include "ui_pointermotion.h"
|
|
||||||
#include "ui_scroll.h"
|
|
||||||
#include "ui_sensitivity.h"
|
|
||||||
#include "ui_tap.h"
|
|
||||||
|
|
||||||
class TouchpadConfigContainer;
|
|
||||||
class TouchpadBackend;
|
|
||||||
class KMessageWidget;
|
|
||||||
class OrgKdeTouchpadInterface;
|
|
||||||
class CustomConfigDialogManager;
|
|
||||||
class QAction;
|
|
||||||
class KShortcutsDialog;
|
|
||||||
class QTabWidget;
|
|
||||||
class KComboBox;
|
|
||||||
class QDBusPendingCallWatcher;
|
|
||||||
class QHideEvent;
|
|
||||||
|
|
||||||
class TouchpadConfigXlib : public TouchpadConfigPlugin
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit TouchpadConfigXlib(TouchpadConfigContainer *parent, TouchpadBackend *backend);
|
|
||||||
~TouchpadConfigXlib() override;
|
|
||||||
|
|
||||||
static void kcmInit();
|
|
||||||
|
|
||||||
void load() override;
|
|
||||||
void save() override;
|
|
||||||
void defaults() override;
|
|
||||||
|
|
||||||
void hideEvent(QHideEvent *) override;
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void beginTesting();
|
|
||||||
void endTesting();
|
|
||||||
void onChanged();
|
|
||||||
void checkChanges();
|
|
||||||
void loadActiveConfig();
|
|
||||||
void updateTestAreaEnabled();
|
|
||||||
void updateMouseList();
|
|
||||||
void showConfigureNotificationsDialog();
|
|
||||||
void gotReplyFromDaemon(QDBusPendingCallWatcher *);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QVariantHash getActiveConfig();
|
|
||||||
|
|
||||||
TouchpadParameters m_config;
|
|
||||||
|
|
||||||
std::unique_ptr<QVariantHash> m_prevConfig;
|
|
||||||
CustomConfigDialogManager *m_manager;
|
|
||||||
TouchpadDisablerSettings m_daemonSettings;
|
|
||||||
KConfigDialogManager *m_daemonConfigManager;
|
|
||||||
KMessageWidget *m_errorMessage, *m_configOutOfSyncMessage;
|
|
||||||
TestArea *m_testArea;
|
|
||||||
OrgKdeTouchpadInterface *m_daemon;
|
|
||||||
QAction *m_loadActiveConfiguration;
|
|
||||||
bool m_configOutOfSync;
|
|
||||||
std::unique_ptr<KShortcutsDialog> m_shortcutsDialog;
|
|
||||||
QWidget *m_kdedTab;
|
|
||||||
QTabWidget *m_tabs;
|
|
||||||
KComboBox *m_mouseCombo;
|
|
||||||
|
|
||||||
Ui::PointerMotionForm m_pointerMotion;
|
|
||||||
Ui::TapForm m_tapping;
|
|
||||||
Ui::ScrollForm m_scrolling;
|
|
||||||
Ui::SensitivityForm m_sensitivity;
|
|
||||||
Ui::KdedForm m_kded;
|
|
||||||
};
|
|
||||||
|
|
@ -1,201 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>KdedForm</class>
|
|
||||||
<widget class="QWidget" name="KdedForm">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>486</width>
|
|
||||||
<height>351</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string comment="@title:window">Enable/Disable Touchpad</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QPushButton" name="configureShortcutsButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Configure…</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset theme="configure">
|
|
||||||
<normaloff/>
|
|
||||||
</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Keyboard shortcuts:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>configureShortcutsButton</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="kcfg_DisableOnKeyboardActivity">
|
|
||||||
<property name="title">
|
|
||||||
<string>Disable touchpad when typing</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout_3">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="text">
|
|
||||||
<string>Timeout:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_KeyboardActivityTimeoutMs</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_KeyboardActivityTimeoutMs">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>If there was no keyboard activity for more than specified
|
|
||||||
number of milliseconds, touchpad will be enabled again</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>99</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string> ms</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="kcfg_OnlyDisableTapAndScrollOnKeyboardActivity">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Disable click emulation and scrolling.
|
|
||||||
You will be still able to move pointer using touchpad and perform clicks with hardware buttons.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Disable taps and scrolling only</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="kcfg_DisableWhenMousePluggedIn">
|
|
||||||
<property name="title">
|
|
||||||
<string>Disable touchpad when mouse is plugged in</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
|
||||||
<property name="formAlignment">
|
|
||||||
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="notificationsLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Notifications:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>configureNotificationsButton</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QPushButton" name="configureNotificationsButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Configure…</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset theme="configure"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ignoredDevLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ignored devices:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_MouseBlacklist</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="KEditListWidget" name="kcfg_MouseBlacklist">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Some devices might be incorrectly treated as a mouse.
|
|
||||||
You can add them to this list so that they will be ignored when they're plugged in.</string>
|
|
||||||
</property>
|
|
||||||
<property name="buttons">
|
|
||||||
<set>KEditListWidget::Add|KEditListWidget::Remove</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>KEditListWidget</class>
|
|
||||||
<extends>QGroupBox</extends>
|
|
||||||
<header>keditlistwidget.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>QSpinBox</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>configureShortcutsButton</tabstop>
|
|
||||||
<tabstop>kcfg_DisableOnKeyboardActivity</tabstop>
|
|
||||||
<tabstop>kcfg_KeyboardActivityTimeoutMs</tabstop>
|
|
||||||
<tabstop>kcfg_OnlyDisableTapAndScrollOnKeyboardActivity</tabstop>
|
|
||||||
<tabstop>kcfg_DisableWhenMousePluggedIn</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
|
|
@ -1,288 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>PointerMotionForm</class>
|
|
||||||
<widget class="QWidget" name="PointerMotionForm">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>400</width>
|
|
||||||
<height>407</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Pointer Motion</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string comment="Mouse pointer motion parameters">Speed</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout_4">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Minimum pointer movement speed">Minimum:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_MinSpeed</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="CustomSlider" name="kcfg_MinSpeed">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Minimum pointer speed</string>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TicksBelow</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Maximum pointer movement speed">Maximum:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_MaxSpeed</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="CustomSlider" name="kcfg_MaxSpeed">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Maximum pointer speed</string>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TicksBelow</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Pointer acceleration">Acceleration:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_AccelFactor</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="CustomSlider" name="kcfg_AccelFactor">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Acceleration factor for normal pointer movements</string>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TicksBelow</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
|
||||||
<property name="title">
|
|
||||||
<string comment="Pointer motion">Pressure-Dependent Motion</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Pressure-dependent pointer motion">Minimum pressure:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_PressureMotionMinZ</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Pressure-dependent pointer motion">Minimum factor:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_PressureMotionMinFactor</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Pressure-dependent pointer motion">Maximum pressure:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_PressureMotionMaxZ</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_9">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Pressure-dependent pointer motion">Maximum factor:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_PressureMotionMaxFactor</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSlider" name="kcfg_PressureMotionMinZ">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Finger pressure at which minimum pressure motion factor is applied</string>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TicksBelow</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QSlider" name="kcfg_PressureMotionMaxZ">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Finger pressure at which maximum pressure motion factor is applied</string>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TicksBelow</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_PressureMotionMinFactor">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Lowest setting for pressure motion factor</string>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string notr="true" comment="Speed multiplier suffix"> x</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_PressureMotionMaxFactor">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Greatest setting for pressure motion factor</string>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string notr="true" comment="Speed multiplier suffix"> x</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
|
||||||
<property name="title">
|
|
||||||
<string comment="Pointer motion">Noise Cancellation</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Noise cancellation">Vertical:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_VertHysteresis</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Noise cancellation">Horizontal:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_HorizHysteresis</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_VertHysteresis">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>The minimum vertical hardware distance required to generate motion events</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string> units</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_HorizHysteresis">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>The minimum horizontal hardware distance required to generate motion events</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string> units</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>CustomSlider</class>
|
|
||||||
<extends>QSlider</extends>
|
|
||||||
<header>kcm/xlib/customslider.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>kcfg_MinSpeed</tabstop>
|
|
||||||
<tabstop>kcfg_MaxSpeed</tabstop>
|
|
||||||
<tabstop>kcfg_AccelFactor</tabstop>
|
|
||||||
<tabstop>kcfg_PressureMotionMinZ</tabstop>
|
|
||||||
<tabstop>kcfg_PressureMotionMinFactor</tabstop>
|
|
||||||
<tabstop>kcfg_PressureMotionMaxZ</tabstop>
|
|
||||||
<tabstop>kcfg_PressureMotionMaxFactor</tabstop>
|
|
||||||
<tabstop>kcfg_VertHysteresis</tabstop>
|
|
||||||
<tabstop>kcfg_HorizHysteresis</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
|
|
@ -1,393 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>ScrollForm</class>
|
|
||||||
<widget class="QWidget" name="ScrollForm">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>610</width>
|
|
||||||
<height>503</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Scrolling</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::FieldsStayAtSizeHint</enum>
|
|
||||||
</property>
|
|
||||||
<property name="formAlignment">
|
|
||||||
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="text">
|
|
||||||
<string>Edge scrolling:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_VertEdgeScroll</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QCheckBox" name="kcfg_VertEdgeScroll">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Enable vertical scrolling when dragging along the right edge</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Scrolling direction">Vertical</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QCheckBox" name="kcfg_HorizEdgeScroll">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Enable horizontal scrolling when dragging along the bottom edge</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Scrolling direction">Horizontal</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QCheckBox" name="kcfg_VertTwoFingerScroll">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Enable vertical scrolling when dragging with two fingers anywhere on the touchpad</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Scrolling direction">Vertical</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QCheckBox" name="kcfg_HorizTwoFingerScroll">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Enable horizontal scrolling when dragging with two fingers anywhere on the touchpad</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Scrolling direction">Horizontal</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QCheckBox" name="kcfg_InvertVertScroll">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Reverse vertical scrolling</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Scrolling direction">Vertical</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="1">
|
|
||||||
<widget class="QCheckBox" name="kcfg_InvertHorizScroll">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Reverse horizontal scrolling</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Scrolling direction">Horizontal</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_9">
|
|
||||||
<property name="text">
|
|
||||||
<string>Two-finger scrolling:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_VertTwoFingerScroll</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label_10">
|
|
||||||
<property name="text">
|
|
||||||
<string>Reverse scrolling:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_InvertVertScroll</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>300</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string comment="Touchpad - Scrolling">Scrolling Distance</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Scrolling distance">Vertical:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_VertScrollDelta</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="kcfg_VertScrollDelta">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Move distance of the finger for a scroll event</string>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>1000.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<double>0.100000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string> mm</string>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Scrolling distance">Horizontal:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_HorizScrollDelta</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="kcfg_HorizScrollDelta">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Move distance of the finger for a scroll event</string>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>1000.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<double>0.100000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string> mm</string>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="kcfg_Coasting">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Continue scrolling after the finger is released from the edge of the touchpad</string>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string comment="Touchpad - Scrolling">Coasting</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout_5">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Coasting">Minimum speed:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_CoastingSpeed</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_CoastingSpeed">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Your finger needs to produce this many scrolls per second in order to start coasting</string>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<double>1.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string> scrolls/sec</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Coasting">Deceleration:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_CoastingFriction</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_CoastingFriction">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Number of scrolls/second² to decrease the coasting speed</string>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<double>1.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string> scrolls/sec²</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_11">
|
|
||||||
<property name="text">
|
|
||||||
<string>Corner coasting:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_CornerCoasting</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QCheckBox" name="kcfg_CornerCoasting">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Enable edge scrolling to continue while the finger stays in an edge corner</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Coasting">Enable</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="kcfg_CircularScrolling">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Scrolling is engaged when a drag starts in the given trigger region.
|
|
||||||
Moving your finger in clockwise circles around the center of the touchpad
|
|
||||||
will scroll down and counter clockwise motion will scroll up</string>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string comment="Touchpad - Scrolling">Circular Scrolling</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout_6">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Circular scrolling">Trigger region:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_CircScrollTrigger</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="KComboBox" name="kcfg_CircScrollTrigger">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Trigger region on the touchpad to start circular scrolling</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Circular scrolling">Angle:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_CircScrollDelta</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="kcfg_CircScrollDelta">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>45.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<double>0.100000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Move angle (degrees) of finger to generate a scroll event</string>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string comment="suffix - degrees (angle)">°</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" colspan="2">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string>When used together with vertical scrolling, hitting the upper or lower right corner will seamlessly switch over from vertical to circular scrolling</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>KComboBox</class>
|
|
||||||
<extends>QComboBox</extends>
|
|
||||||
<header>kcombobox.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>kcfg_VertEdgeScroll</tabstop>
|
|
||||||
<tabstop>kcfg_HorizEdgeScroll</tabstop>
|
|
||||||
<tabstop>kcfg_VertTwoFingerScroll</tabstop>
|
|
||||||
<tabstop>kcfg_HorizTwoFingerScroll</tabstop>
|
|
||||||
<tabstop>kcfg_InvertVertScroll</tabstop>
|
|
||||||
<tabstop>kcfg_InvertHorizScroll</tabstop>
|
|
||||||
<tabstop>kcfg_VertScrollDelta</tabstop>
|
|
||||||
<tabstop>kcfg_HorizScrollDelta</tabstop>
|
|
||||||
<tabstop>kcfg_Coasting</tabstop>
|
|
||||||
<tabstop>kcfg_CoastingSpeed</tabstop>
|
|
||||||
<tabstop>kcfg_CoastingFriction</tabstop>
|
|
||||||
<tabstop>kcfg_CornerCoasting</tabstop>
|
|
||||||
<tabstop>kcfg_CircularScrolling</tabstop>
|
|
||||||
<tabstop>kcfg_CircScrollTrigger</tabstop>
|
|
||||||
<tabstop>kcfg_CircScrollDelta</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
|
|
@ -1,153 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>SensitivityForm</class>
|
|
||||||
<widget class="QWidget" name="SensitivityForm">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>430</width>
|
|
||||||
<height>210</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Sensitivity</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string comment="Touchpad">Sensitivity</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Pressure for detecting a touch:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_FingerHigh</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Pressure for detecting a release:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_FingerLow</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSlider" name="kcfg_FingerHigh">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>When finger pressure goes above this value, the driver counts it as a touch</string>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TicksBelow</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QSlider" name="kcfg_FingerLow">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>When finger pressure drops below this value, the driver counts it as a release</string>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TicksBelow</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="kcfg_PalmDetect">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>If palm detection should be enabled. Note that this also requires hardware/firmware support from the touchpad</string>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string comment="Touchpad">Palm Detection</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Palm detection">Minimum width:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_PalmMinWidth</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Palm detection">Minimum pressure:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_PalmMinZ</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSlider" name="kcfg_PalmMinWidth">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Minimum finger width at which touch is considered a palm</string>
|
|
||||||
</property>
|
|
||||||
<property name="pageStep">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TicksBelow</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QSlider" name="kcfg_PalmMinZ">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Minimum finger pressure at which touch is considered a palm</string>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TicksBelow</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>kcfg_FingerHigh</tabstop>
|
|
||||||
<tabstop>kcfg_FingerLow</tabstop>
|
|
||||||
<tabstop>kcfg_PalmDetect</tabstop>
|
|
||||||
<tabstop>kcfg_PalmMinWidth</tabstop>
|
|
||||||
<tabstop>kcfg_PalmMinZ</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
|
|
@ -1,500 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>TapForm</class>
|
|
||||||
<widget class="QWidget" name="TapForm">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>516</width>
|
|
||||||
<height>531</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string comment="Touchpad gesture">Taps</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="kcfg_Tapping">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Tap to Click</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout_3">
|
|
||||||
<property name="formAlignment">
|
|
||||||
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Tapping">One finger:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_OneFingerTapButton</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="KComboBox" name="kcfg_OneFingerTapButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Which mouse button is reported on a non-corner one-finger tap</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Tapping">Two fingers:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_TwoFingerTapButton</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="KComboBox" name="kcfg_TwoFingerTapButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Which mouse button is reported on a non-corner two-finger tap</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Tapping">Three fingers:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_ThreeFingerTapButton</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="KComboBox" name="kcfg_ThreeFingerTapButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Which mouse button is reported on a non-corner three-finger tap</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string comment="Touchpad">Corners</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="frame">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,1,0,0">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Touchpad corner">Top left:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_LTCornerButton</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="KComboBox" name="kcfg_LTCornerButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Which mouse button is reported on a left top corner tap</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Touchpad corner">Bottom left:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_LBCornerButton</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Touchpad corner">Top right:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_RTCornerButton</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="KComboBox" name="kcfg_LBCornerButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Which mouse button is reported on a left bottom corner tap</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<widget class="KComboBox" name="kcfg_RTCornerButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Which mouse button is reported on a right top corner tap</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="4">
|
|
||||||
<widget class="KComboBox" name="kcfg_RBCornerButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Which mouse button is reported on a right bottom corner tap</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="3">
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Touchpad corner">Bottom right:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_RBCornerButton</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="kcfg_TapAndDragGesture">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>This gesture is an alternative way of dragging. It is performed by tapping (touching and releasing the finger), then touching again and moving the finger on the touchpad</string>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Tap-and-Drag Gesture</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="kcfg_LockedDrags">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>If off, a tap-and-drag gesture ends when you release the finger. If on, the gesture is active until you tap a second time, or until timeout expires</string>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string comment="Touchpad gesture">Locked Drags</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_9">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Locked drags">Timeout:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_LockedDragTimeout</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_LockedDragTimeout">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>How long it takes (in milliseconds) for the "Locked Drags" mode to be automatically turned off after the finger is released from the touchpad</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum" stdset="0">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>99</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<number>99</number>
|
|
||||||
</property>
|
|
||||||
<property name="suffix" stdset="0">
|
|
||||||
<string> ms</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>300</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Tap Detection</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_10">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string comment="Tap detection"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Maximum time:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_MaxTapTime</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_11">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string comment="Tap detection"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Maximum finger movement:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_MaxTapMove</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_12">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string comment="Tap detection"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Maximum time for double tap:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_MaxDoubleTapTime</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_13">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string comment="Tap detection"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Single tap timeout:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>kcfg_SingleTapTimeout</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_MaxTapTime">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Maximum time (in milliseconds) for detecting a tap</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum" stdset="0">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>99</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep" stdset="0">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="suffix" stdset="0">
|
|
||||||
<string> ms</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="kcfg_MaxTapMove">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Maximum movement of the finger for detecting a tap</string>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>1000.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep" stdset="0">
|
|
||||||
<double>0.100000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="suffix" stdset="0">
|
|
||||||
<string> mm</string>
|
|
||||||
</property>
|
|
||||||
<property name="decimals" stdset="0">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_MaxDoubleTapTime">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Maximum time (in milliseconds) for detecting a double tap</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum" stdset="0">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>99</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep" stdset="0">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="suffix" stdset="0">
|
|
||||||
<string> ms</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QSpinBox" name="kcfg_SingleTapTimeout">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Timeout after a tap to recognize it as a single tap</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum" stdset="0">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>99</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep" stdset="0">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="suffix" stdset="0">
|
|
||||||
<string> ms</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>QSpinBox</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>KComboBox</class>
|
|
||||||
<extends>QComboBox</extends>
|
|
||||||
<header>kcombobox.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>QSpinBox</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>kcfg_OneFingerTapButton</tabstop>
|
|
||||||
<tabstop>kcfg_TwoFingerTapButton</tabstop>
|
|
||||||
<tabstop>kcfg_ThreeFingerTapButton</tabstop>
|
|
||||||
<tabstop>kcfg_LTCornerButton</tabstop>
|
|
||||||
<tabstop>kcfg_RTCornerButton</tabstop>
|
|
||||||
<tabstop>kcfg_LBCornerButton</tabstop>
|
|
||||||
<tabstop>kcfg_RBCornerButton</tabstop>
|
|
||||||
<tabstop>kcfg_TapAndDragGesture</tabstop>
|
|
||||||
<tabstop>kcfg_LockedDrags</tabstop>
|
|
||||||
<tabstop>kcfg_LockedDragTimeout</tabstop>
|
|
||||||
<tabstop>kcfg_MaxTapTime</tabstop>
|
|
||||||
<tabstop>kcfg_MaxTapMove</tabstop>
|
|
||||||
<tabstop>kcfg_MaxDoubleTapTime</tabstop>
|
|
||||||
<tabstop>kcfg_SingleTapTimeout</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>TestArea</class>
|
|
||||||
<widget class="QWidget" name="TestArea">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>200</width>
|
|
||||||
<height>629</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="mouseTracking">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Testing area</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="TestButton" name="pushButton">
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Click me</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>2000</width>
|
|
||||||
<height>2000</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QListWidget" name="listWidget">
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="viewMode">
|
|
||||||
<enum>QListView::IconMode</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>TestButton</class>
|
|
||||||
<extends>QPushButton</extends>
|
|
||||||
<header>xlib/testbutton.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
|
|
@ -20,7 +20,6 @@ enum class TouchpadInputBackendMode {
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_KCM_TOUCHPAD_X11
|
#if BUILD_KCM_TOUCHPAD_X11
|
||||||
XLibinput = 2,
|
XLibinput = 2,
|
||||||
XSynaptics = 3,
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue