/** SPDX-FileCopyrightText: 2026 Sebastian Sauer <dipesh@gmx.de>* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL*/import QtQuickimport QtQuick.Layoutsimport QtQuick.Controls as QQC2import org.kde.kcmutils as KCMUtilsimport org.kde.kirigami as Kirigamiimport org.kde.kquickcontrols as KQControlsimport org.kde.plasma.access.kcmKirigami.Form {id: rootFormKirigami.FormGroup {Kirigami.FormEntry {title: i18nc("@label", "Click when pointer remains still:")contentItem: QQC2.CheckBox {text: i18nc("@option check, Enable dwell clicker effect", "Enable")KCMUtils.SettingStateBinding {configObject: kcm.dwellClickerSettingssettingName: "DwellClicker"}checked: kcm.dwellClickerSettings.dwellClickeronToggled: kcm.dwellClickerSettings.dwellClicker = checked}trailingItems: [Kirigami.ContextualHelpButton {toolTipText: i18nc("@info:tooltip", "Automatically click when pointer remains still for a set amount of time.")}]}Kirigami.FormEntry {title: i18nc("@label:spinbox Slow keys Delay", "Motion Threshold:")contentItem: QQC2.SpinBox {id: motionThresholdItemKCMUtils.SettingStateBinding {configObject: kcm.dwellClickerSettingssettingName: "DwellClickerMotionThreshold"extraEnabledConditions: kcm.dwellClickerSettings.dwellClicker}from: 0to: 100value: kcm.dwellClickerSettings.dwellClickerMotionThresholdonValueModified: kcm.dwellClickerSettings.dwellClickerMotionThreshold = valuetextFromValue: function(value, locale) {return i18ncp("@label:valuesuffix %1 is the motion threshold", "%1 px", "%1 px", value)}validator: IntValidatorWithSuffix {bottom: motionThresholdItem.fromtop: motionThresholdItem.to}valueFromText: (text, locale) => {return Number.fromLocaleString(locale, text.replace(i18ncp("@label:valuesuffix short for pixel(s)", "px", "px"), ""))}}}Kirigami.FormEntry {title: i18nc("@label:spinbox Dwell clicker delay time", "Delay Time:")contentItem: QQC2.SpinBox {id: delayTimeItemKCMUtils.SettingStateBinding {configObject: kcm.dwellClickerSettingssettingName: "DwellClickerDelayTime"extraEnabledConditions: kcm.dwellClickerSettings.dwellClicker}from: 0to: 30000value: kcm.dwellClickerSettings.dwellClickerDelayTimeonValueModified: kcm.dwellClickerSettings.dwellClickerDelayTime = valuetextFromValue: function(value, locale) {return i18ncp("@label:valuesuffix %1 is the delay time", "%1 ms", "%1 ms", value)}validator: IntValidatorWithSuffix {bottom: delayTimeItem.fromtop: delayTimeItem.to}valueFromText: (text, locale) => {return Number.fromLocaleString(locale, text.replace(i18ncp("@label:valuesuffix short for millisecond(s)", "ms", "ms"), ""))}}}Kirigami.FormEntry {title: i18nc("@label:spinbox Dwell clicker dwell time", "Dwell Time:")contentItem: QQC2.SpinBox {id: dwellTimeItemKCMUtils.SettingStateBinding {configObject: kcm.dwellClickerSettingssettingName: "DwellClickerDwellTime"extraEnabledConditions: kcm.dwellClickerSettings.dwellClicker}from: 0to: 30000value: kcm.dwellClickerSettings.dwellClickerDwellTimeonValueModified: kcm.dwellClickerSettings.dwellClickerDwellTime = valuetextFromValue: function(value, locale) {return i18ncp("@label:valuesuffix %1 is the dwell time", "%1 ms", "%1 ms", value)}validator: IntValidatorWithSuffix {bottom: dwellTimeItem.fromtop: dwellTimeItem.to}valueFromText: (text, locale) => {return Number.fromLocaleString(locale, text.replace(i18ncp("@label:valuesuffix short for millisecond(s)", "ms", "ms"), ""))}}}Kirigami.FormEntry {title: i18nc("@label:button Dwell clicker dwell color", "Dwell Color:")contentItem: KQControls.ColorButton {id: colorButtoncolor: kcm.dwellClickerSettings.dwellClickerDwellColoronColorChanged: {kcm.dwellClickerSettings.dwellClickerDwellColor = colorButton.color}KCMUtils.SettingStateBinding {configObject: kcm.dwellClickerSettingssettingName: "DwellClickerDwellColor"extraEnabledConditions: kcm.dwellClickerSettings.dwellClicker}}}}}