Changeset View
Changeset View
Standalone View
Standalone View
kcms/keyboard/kcmui/package/contents/ui/XkbLayoutConfig.qml
- This file was added.
1 | import QtQuick 2.9 | ||||
---|---|---|---|---|---|
2 | import QtQuick.Layouts 1.3 | ||||
3 | import QtQuick.Controls 2.3 as Controls | ||||
4 | import org.kde.kirigami 2.4 as Kirigami | ||||
5 | | ||||
6 | Controls.Dialog { | ||||
7 | header: Kirigami.Heading { text: i18n("IM Config") } | ||||
8 | id: root | ||||
9 | property var configModel; | ||||
10 | | ||||
11 | function openForModel(model) { | ||||
12 | configModel = model; | ||||
13 | open(); | ||||
14 | } | ||||
15 | | ||||
16 | ListView { | ||||
17 | id: configList; | ||||
18 | model: configModel | ||||
19 | | ||||
20 | anchors.fill: parent | ||||
21 | | ||||
22 | clip: true | ||||
23 | | ||||
24 | delegate: RowLayout { | ||||
25 | Controls.Label { | ||||
26 | text: model.description | ||||
27 | } | ||||
28 | } | ||||
29 | } | ||||
30 | | ||||
31 | footer: RowLayout { | ||||
32 | Controls.Button { | ||||
33 | text: i18n("Save"); | ||||
34 | onClicked: { | ||||
35 | configList.model.save(); | ||||
36 | close(); | ||||
37 | } | ||||
38 | } | ||||
39 | Controls.Button { | ||||
40 | text: i18n("Discard"); | ||||
41 | onClicked: { | ||||
42 | close(); | ||||
43 | } | ||||
44 | } | ||||
45 | } | ||||
46 | } |