summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kacej <[email protected]>2017-09-26 22:38:07 +0200
committerMartin Kacej <[email protected]>2017-09-26 22:38:07 +0200
commitfc52d7aae837ad480392df8ba6dde4bdbb5a1f92 (patch)
treeefbad6d1ff5cef799a68d87fb763af2e819bbe5d
parent3c43e9aa719c0a5f824b703b99704b72202886e9 (diff)
Real netwroks showing
-rw-r--r--mobile/package/contents/ui/RowItemDelegate.qml17
-rw-r--r--mobile/package/contents/ui/Wifi.qml24
2 files changed, 33 insertions, 8 deletions
diff --git a/mobile/package/contents/ui/RowItemDelegate.qml b/mobile/package/contents/ui/RowItemDelegate.qml
index f409749..e5c0255 100644
--- a/mobile/package/contents/ui/RowItemDelegate.qml
+++ b/mobile/package/contents/ui/RowItemDelegate.qml
@@ -3,6 +3,7 @@ import QtQuick.Controls 1.4 as Controls
import QtQuick.Layouts 1.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
+import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
PlasmaComponents.ListItem {
width: parent.width
@@ -10,9 +11,19 @@ PlasmaComponents.ListItem {
RowLayout {
width: parent.width
- Text {
- text: ssid
- Layout.fillWidth: true
+ PlasmaComponents.Label {
+ id: connectionNameLabel
+
+ anchors {
+ leftMargin: Math.round(units.gridUnit / 2)
+ }
+
+ height: paintedHeight
+ elide: Text.ElideRight
+ font.weight: ConnectionState == PlasmaNM.Enums.Activated ? Font.DemiBold : Font.Normal
+ font.italic: ConnectionState == PlasmaNM.Enums.Activating ? true : false
+ text: ItemUniqueName
+ textFormat: Text.PlainText
}
Rectangle {
diff --git a/mobile/package/contents/ui/Wifi.qml b/mobile/package/contents/ui/Wifi.qml
index 9dd4e15..a829da6 100644
--- a/mobile/package/contents/ui/Wifi.qml
+++ b/mobile/package/contents/ui/Wifi.qml
@@ -45,6 +45,16 @@ Item {
wifiSwitchButton.checked = wifiSwitchButton.enabled && enabled
}
}
+
+ PlasmaNM.NetworkModel {
+ id: connectionModel
+ }
+
+ PlasmaNM.AppletProxyModel {
+ id: appletProxyModel
+
+ sourceModel: connectionModel
+ }
Column {
id: formLayout
spacing: units.gridUnit
@@ -109,15 +119,19 @@ Item {
}
ListView {
+
+ property bool availableConnectionsVisible: false
+ property int currentVisibleButtonIndex: -1
+
anchors.fill: parent
anchors.margins: units.gridUnit
+ clip: true
width: parent.width
- model: TestWifi{
- id: wifiTestModel
- }
-
+ currentIndex: -1
+ boundsBehavior: Flickable.StopAtBounds
+ model: appletProxyModel
delegate: RowItemDelegate{
- id: wifiDelegate
+
}
}
}