Changeset View
Changeset View
Standalone View
Standalone View
mobile/wifi/package/contents/ui/main.qml
Show All 16 Lines | |||||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.6 | 20 | import QtQuick 2.6 | ||
21 | import QtQuick.Layouts 1.2 | 21 | import QtQuick.Layouts 1.2 | ||
22 | import QtQuick.Controls 2.2 as Controls | 22 | import QtQuick.Controls 2.2 as Controls | ||
23 | import org.kde.plasma.networkmanagement 0.2 as PlasmaNM | 23 | import org.kde.plasma.networkmanagement 0.2 as PlasmaNM | ||
24 | import org.kde.kirigami 2.10 as Kirigami | 24 | import org.kde.kirigami 2.10 as Kirigami | ||
25 | import org.kde.kcm 1.1 | 25 | import org.kde.kcm 1.2 | ||
26 | 26 | | |||
27 | SimpleKCM { | 27 | ScrollViewKCM { | ||
28 | id: main | 28 | id: main | ||
29 | 29 | | |||
30 | PlasmaNM.Handler { | 30 | PlasmaNM.Handler { | ||
31 | id: handler | 31 | id: handler | ||
32 | } | 32 | } | ||
33 | 33 | | |||
34 | PlasmaNM.EnabledConnections { | 34 | PlasmaNM.EnabledConnections { | ||
35 | id: enabledConnections | 35 | id: enabledConnections | ||
Show All 21 Lines | 54 | Timer { | |||
57 | repeat: true | 57 | repeat: true | ||
58 | running: parent.visible | 58 | running: parent.visible | ||
59 | 59 | | |||
60 | onTriggered: handler.requestScan() | 60 | onTriggered: handler.requestScan() | ||
61 | } | 61 | } | ||
62 | 62 | | |||
63 | header: Kirigami.InlineMessage { | 63 | header: Kirigami.InlineMessage { | ||
64 | id: inlineError | 64 | id: inlineError | ||
65 | Layout.fillWidth: true | | |||
66 | showCloseButton: true | 65 | showCloseButton: true | ||
67 | 66 | | |||
68 | visible: false | | |||
69 | | ||||
70 | type: Kirigami.MessageType.Warning | 67 | type: Kirigami.MessageType.Warning | ||
71 | Connections { | 68 | Connections { | ||
72 | target: handler | 69 | target: handler | ||
73 | onConnectionActivationFailed: { | 70 | onConnectionActivationFailed: { | ||
74 | inlineError.text = message; | 71 | inlineError.text = message; | ||
75 | inlineError.visible = true; | 72 | inlineError.visible = true; | ||
76 | } | 73 | } | ||
77 | } | 74 | } | ||
78 | } | 75 | } | ||
79 | 76 | | |||
80 | ListView { | 77 | view: ListView { | ||
81 | id: view | 78 | id: view | ||
82 | 79 | | |||
83 | anchors.fill: parent | | |||
84 | clip: true | 80 | clip: true | ||
85 | width: parent.width | | |||
86 | currentIndex: -1 | 81 | currentIndex: -1 | ||
87 | boundsBehavior: Flickable.StopAtBounds | 82 | boundsBehavior: Flickable.StopAtBounds | ||
88 | 83 | | |||
89 | section.property: "Section" | 84 | section.property: "Section" | ||
90 | section.delegate: Kirigami.ListSectionHeader { | 85 | section.delegate: Kirigami.ListSectionHeader { | ||
91 | text: section | 86 | text: section | ||
92 | } | 87 | } | ||
93 | 88 | | |||
Show All 40 Lines |