1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
|
/*
SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick 2.7
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.11 as QQC2
import org.kde.kirigami 2.19 as Kirigami
import org.kde.kcm 1.3 as KCM
import org.kde.kitemmodels 1.0 as KItemModel
import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm
KCM.SimpleKCM {
id: root
title: i18n("On-Screen Keyboard")
leftPadding: 0
rightPadding: 0
topPadding: Kirigami.Units.gridUnit
bottomPadding: Kirigami.Units.gridUnit
ColumnLayout {
spacing: 0
width: parent.width
MobileForm.FormCard {
Layout.fillWidth: true
contentItem: ColumnLayout {
spacing: 0
MobileForm.AbstractFormDelegate {
Layout.fillWidth: true
background: Item {}
contentItem: RowLayout {
QQC2.TextField {
Layout.fillWidth: true
placeholderText: i18n("Type anything hereā¦")
}
}
}
}
}
MobileForm.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
contentItem: ColumnLayout {
spacing: 0
MobileForm.FormCardHeader {
title: "Feedback"
}
MobileForm.FormSwitchDelegate {
id: firstFeedbackCheckBox
text: i18n("Sound")
description: i18n("Whether to emit a sound on keypress.")
checked: kcm.soundFeedback
onCheckedChanged: kcm.soundFeedback = checked;
}
MobileForm.FormDelegateSeparator { above: firstFeedbackCheckBox; below: secondFeedbackCheckBox }
MobileForm.FormSwitchDelegate {
id: secondFeedbackCheckBox
text: i18n("Vibration")
description: i18n("Whether to vibrate on keypress.")
checked: kcm.vibrateFeedback
onCheckedChanged: kcm.vibrateFeedback = checked;
}
}
}
MobileForm.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
contentItem: ColumnLayout {
spacing: 0
MobileForm.FormCardHeader {
title: "Text Correction"
}
MobileForm.FormCheckDelegate {
id: firstTextCorrectionCheckBox
text: i18n("Check spelling of entered text")
checked: kcm.spellCheck
onCheckedChanged: kcm.spellCheck = checked;
}
MobileForm.FormDelegateSeparator { above: firstTextCorrectionCheckBox; below: capitalizeCheck }
MobileForm.FormCheckDelegate {
id: capitalizeCheck
text: i18n("Capitalize the first letter of each sentence")
checked: kcm.autoCapitalize
onCheckedChanged: kcm.autoCapitalize = checked;
}
MobileForm.FormDelegateSeparator { above: capitalizeCheck; below: wordCompletionCheck }
MobileForm.FormCheckDelegate {
id: wordCompletionCheck
text: i18n("Complete current word with first suggestion when hitting space")
checked: kcm.autoCompleteOnSpace
onCheckedChanged: kcm.autoCompleteOnSpace = checked;
}
MobileForm.FormDelegateSeparator { above: wordCompletionCheck; below: wordSuggestionCheck }
MobileForm.FormCheckDelegate {
id: wordSuggestionCheck
text: i18n("Suggest potential words in word ribbon")
checked: kcm.showSuggestions
onCheckedChanged: {
kcm.showSuggestions = checked;
}
}
MobileForm.FormDelegateSeparator { above: wordSuggestionCheck; below: fullStopCheck }
MobileForm.FormCheckDelegate {
id: fullStopCheck
text: i18n("Insert a full-stop when space is pressed twice")
checked: kcm.fullStopOnDoubleSpace
onCheckedChanged: {
kcm.fullStopOnDoubleSpace = checked;
}
}
MobileForm.FormDelegateSeparator { above: fullStopCheck; below: languageButton }
MobileForm.FormButtonDelegate {
id: languageButton
text: i18n("Configure Languages")
icon.name: "set-language"
onClicked: kcm.push("languages.qml")
}
}
}
}
}
|