Changeset View
Changeset View
Standalone View
Standalone View
mobile/wifi/package/contents/ui/NetworkListView.qml
Show All 15 Lines | |||||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
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.2 as Kirigami | 24 | import org.kde.kirigami 2.6 as Kirigami | ||
25 | 25 | | |||
26 | Kirigami.ScrollablePage { | 26 | Kirigami.ScrollablePage { | ||
27 | anchors.leftMargin: Kirigami.Units.largeSpacing * 2 | 27 | anchors.leftMargin: Kirigami.Units.largeSpacing * 2 | ||
28 | 28 | | |||
29 | header: RowLayout { | 29 | header: ColumnLayout { | ||
30 | id: layoutrow | | |||
31 | width: parent.width | 30 | width: parent.width | ||
31 | Kirigami.InlineMessage { | ||||
32 | id: inlineError | ||||
33 | Layout.fillWidth: true | ||||
34 | showCloseButton: true | ||||
35 | | ||||
36 | visible: false | ||||
37 | | ||||
38 | type: Kirigami.MessageType.Warning | ||||
39 | Connections { | ||||
40 | target: handler | ||||
41 | onConnectionActivationFailed: { | ||||
42 | inlineError.text = message; | ||||
43 | inlineError.visible = true; | ||||
44 | } | ||||
45 | } | ||||
46 | } | ||||
47 | | ||||
48 | RowLayout { | ||||
49 | id: layoutrow | ||||
50 | Layout.fillWidth: true | ||||
32 | 51 | | |||
33 | Controls.Label { | 52 | Controls.Label { | ||
34 | anchors.left: parent.left | 53 | anchors.left: parent.left | ||
35 | text: i18n("Wi-fi") | 54 | text: i18n("Wi-fi") | ||
36 | Layout.fillWidth: true | 55 | Layout.fillWidth: true | ||
37 | font.bold: true | 56 | font.bold: true | ||
38 | } | 57 | } | ||
39 | 58 | | |||
40 | Controls.Switch { | 59 | Controls.Switch { | ||
41 | id: wifiSwitchButton | 60 | id: wifiSwitchButton | ||
42 | checked: enabled && enabledConnections.wirelessEnabled | 61 | checked: enabled && enabledConnections.wirelessEnabled | ||
43 | enabled: enabledConnections.wirelessHwEnabled | 62 | enabled: enabledConnections.wirelessHwEnabled | ||
44 | onClicked: { | 63 | onClicked: { | ||
45 | handler.enableWireless(checked); | 64 | handler.enableWireless(checked); | ||
46 | } | 65 | } | ||
47 | } | 66 | } | ||
48 | } | 67 | } | ||
68 | } | ||||
49 | 69 | | |||
50 | ListView { | 70 | ListView { | ||
51 | id: view | 71 | id: view | ||
52 | 72 | | |||
53 | anchors.fill: parent | 73 | anchors.fill: parent | ||
54 | clip: true | 74 | clip: true | ||
55 | width: parent.width | 75 | width: parent.width | ||
56 | currentIndex: -1 | 76 | currentIndex: -1 | ||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |