Changeset View
Changeset View
Standalone View
Standalone View
kcms/new-keyboard/package/contents/ui/Hardware.qml
- This file was added.
1 | import QtQuick 2.1 | ||||
---|---|---|---|---|---|
2 | import QtQuick.Layouts 1.3 | ||||
3 | import QtQuick.Controls 2.3 as Controls | ||||
4 | import org.kde.kirigami 2.3 as Kirigami | ||||
5 | import org.kde.kcm 1.1 as KCM | ||||
6 | import org.kde.kcm.keyboard 1.0 | ||||
7 | | ||||
8 | KCM.SimpleKCM { | ||||
9 | id: root | ||||
10 | | ||||
11 | anchors.fill: parent | ||||
12 | | ||||
13 | Kirigami.FormLayout { | ||||
14 | id: formLayout | ||||
15 | | ||||
16 | Controls.ComboBox { | ||||
17 | Kirigami.FormData.label: i18n("Keyboard Model:") | ||||
18 | model: KeyboardModelModel {} | ||||
19 | textRole: "description" | ||||
20 | } | ||||
21 | | ||||
22 | Item { | ||||
23 | Kirigami.FormData.isSection: true | ||||
24 | } | ||||
25 | | ||||
26 | TriSelector { | ||||
27 | Kirigami.FormData.label: i18n("Numlock on Plasma Startup:") | ||||
28 | } | ||||
29 | | ||||
30 | TriSelector { | ||||
31 | Kirigami.FormData.label: i18n("Keyboard Repeat:") | ||||
32 | } | ||||
33 | | ||||
34 | Item { | ||||
35 | Kirigami.FormData.isSection: true | ||||
36 | } | ||||
37 | | ||||
38 | RowLayout { | ||||
39 | id: delay | ||||
40 | Kirigami.FormData.label: i18n("Delay:") | ||||
41 | | ||||
42 | Controls.Slider { | ||||
43 | id: delay_slider | ||||
44 | | ||||
45 | Layout.fillWidth: true; | ||||
46 | anchors.verticalCenter: parent.verticalCenter | ||||
47 | width: 300 | ||||
48 | from: 100 | ||||
49 | value: 10 | ||||
50 | to: 5000 | ||||
51 | } | ||||
52 | | ||||
53 | Controls.TextField { | ||||
54 | Layout.fillWidth: false; | ||||
55 | Layout.preferredWidth: 150; | ||||
56 | id: delay_number_field; | ||||
57 | text: Math.floor(delay_slider.value) + " ms" | ||||
58 | } | ||||
59 | } | ||||
60 | | ||||
61 | RowLayout { | ||||
62 | Kirigami.FormData.label: i18n("Rate:") | ||||
63 | | ||||
64 | Controls.Slider { | ||||
65 | id: rate_slider | ||||
66 | | ||||
67 | Layout.fillWidth: true; | ||||
68 | anchors.verticalCenter: parent.verticalCenter | ||||
69 | width: 300 | ||||
70 | from: 0.2 | ||||
71 | value: 10 | ||||
72 | to: 50 | ||||
73 | } | ||||
74 | | ||||
75 | Controls.TextField { | ||||
76 | Layout.fillWidth: false; | ||||
77 | Layout.preferredWidth: 150; | ||||
78 | id: rate_number_field; | ||||
79 | text: parseFloat(rate_slider.value).toFixed(2) + " repeats/s" | ||||
80 | } | ||||
81 | } | ||||
82 | | ||||
83 | Item { | ||||
84 | Kirigami.FormData.isSection: true | ||||
85 | } | ||||
86 | | ||||
87 | Controls.TextArea { | ||||
88 | Kirigami.FormData.label: i18n("Test area:") | ||||
89 | id: textarea | ||||
90 | implicitWidth: Math.max(parent.width / 3, delay.width) | ||||
91 | implicitHeight: 200 | ||||
92 | wrapMode: TextEdit.Wrap | ||||
93 | } | ||||
94 | | ||||
95 | } | ||||
96 | } |