Warning, /plasma/plasma-mobile/kcms/virtualkeyboard/ui/main.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
0003 SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
0004
0005 SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007
0008 import QtQuick 2.7
0009 import QtQuick.Layouts 1.1
0010 import QtQuick.Controls 2.11 as QQC2
0011
0012 import org.kde.kirigami 2.19 as Kirigami
0013 import org.kde.kcmutils as KCM
0014 import org.kde.kitemmodels 1.0 as KItemModel
0015 import org.kde.kirigamiaddons.formcard 1.0 as FormCard
0016
0017 KCM.SimpleKCM {
0018 id: root
0019
0020 title: i18n("On-Screen Keyboard")
0021
0022 leftPadding: 0
0023 rightPadding: 0
0024 topPadding: Kirigami.Units.gridUnit
0025 bottomPadding: Kirigami.Units.gridUnit
0026
0027 ColumnLayout {
0028 spacing: 0
0029 width: parent.width
0030
0031 FormCard.FormCard {
0032 FormCard.FormTextFieldDelegate {
0033 label: i18n("Type anything hereā¦")
0034 }
0035 }
0036
0037 FormCard.FormHeader {
0038 title: i18nc("@title:group", "Feedback")
0039 }
0040
0041 FormCard.FormCard {
0042 FormCard.FormSwitchDelegate {
0043 id: firstFeedbackCheckBox
0044 text: i18n("Sound")
0045 description: i18n("Whether to emit a sound on keypress.")
0046 checked: kcm.soundFeedback
0047 onCheckedChanged: kcm.soundFeedback = checked;
0048 }
0049
0050 FormCard.FormDelegateSeparator { above: firstFeedbackCheckBox; below: secondFeedbackCheckBox }
0051
0052 FormCard.FormSwitchDelegate {
0053 id: secondFeedbackCheckBox
0054 text: i18n("Vibration")
0055 description: i18n("Whether to vibrate on keypress.")
0056 checked: kcm.vibrateFeedback
0057 onCheckedChanged: kcm.vibrateFeedback = checked;
0058 }
0059 }
0060
0061 FormCard.FormHeader {
0062 title: i18nc("@title:group", "Text Correction")
0063 }
0064
0065 FormCard.FormCard {
0066
0067 FormCard.FormCheckDelegate {
0068 id: firstTextCorrectionCheckBox
0069 text: i18n("Check spelling of entered text")
0070 checked: kcm.spellCheck
0071 onCheckedChanged: kcm.spellCheck = checked;
0072 }
0073
0074 FormCard.FormDelegateSeparator { above: firstTextCorrectionCheckBox; below: capitalizeCheck }
0075
0076 FormCard.FormCheckDelegate {
0077 id: capitalizeCheck
0078 text: i18n("Capitalize the first letter of each sentence")
0079 checked: kcm.autoCapitalize
0080 onCheckedChanged: kcm.autoCapitalize = checked;
0081 }
0082
0083 FormCard.FormDelegateSeparator { above: capitalizeCheck; below: wordCompletionCheck }
0084
0085 FormCard.FormCheckDelegate {
0086 id: wordCompletionCheck
0087 text: i18n("Complete current word with first suggestion when hitting space")
0088 checked: kcm.autoCompleteOnSpace
0089 onCheckedChanged: kcm.autoCompleteOnSpace = checked;
0090 }
0091
0092 FormCard.FormDelegateSeparator { above: wordCompletionCheck; below: wordSuggestionCheck }
0093
0094 FormCard.FormCheckDelegate {
0095 id: wordSuggestionCheck
0096 text: i18n("Suggest potential words in word ribbon")
0097 checked: kcm.showSuggestions
0098 onCheckedChanged: {
0099 kcm.showSuggestions = checked;
0100 }
0101 }
0102
0103 FormCard.FormDelegateSeparator { above: wordSuggestionCheck; below: fullStopCheck }
0104
0105 FormCard.FormCheckDelegate {
0106 id: fullStopCheck
0107 text: i18n("Insert a full-stop when space is pressed twice")
0108 checked: kcm.fullStopOnDoubleSpace
0109 onCheckedChanged: {
0110 kcm.fullStopOnDoubleSpace = checked;
0111 }
0112 }
0113
0114 FormCard.FormDelegateSeparator { above: fullStopCheck; below: languageButton }
0115
0116 FormCard.FormButtonDelegate {
0117 id: languageButton
0118 text: i18n("Configure Languages")
0119 icon.name: "set-language"
0120 onClicked: kcm.push("languages.qml")
0121 }
0122 }
0123 }
0124 }