Changeset View
Changeset View
Standalone View
Standalone View
mobile/wifi/package/contents/ui/main.qml
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 80 | ListView { | |||
---|---|---|---|---|---|
81 | id: view | 81 | id: view | ||
82 | 82 | | |||
83 | anchors.fill: parent | 83 | anchors.fill: parent | ||
84 | clip: true | 84 | clip: true | ||
85 | width: parent.width | 85 | width: parent.width | ||
86 | currentIndex: -1 | 86 | currentIndex: -1 | ||
87 | boundsBehavior: Flickable.StopAtBounds | 87 | boundsBehavior: Flickable.StopAtBounds | ||
88 | 88 | | |||
89 | header: Kirigami.ListSectionHeader { | 89 | section.property: "Section" | ||
90 | text: mobileProxyModel.showSavedMode ? i18n("Saved networks") : i18n("Available networks") | 90 | section.delegate: Kirigami.ListSectionHeader { | ||
91 | text: section | ||||
jgrulich: You can use "Section" property from the model, which already contains either "Active… | |||||
91 | } | 92 | } | ||
92 | 93 | | |||
93 | model: mobileProxyModel | 94 | model: mobileProxyModel | ||
94 | delegate: ConnectionItemDelegate {} | 95 | delegate: ConnectionItemDelegate {} | ||
95 | } | 96 | } | ||
96 | 97 | | |||
97 | actions.main: Kirigami.Action { | 98 | actions.main: Kirigami.Action { | ||
98 | iconName: enabledConnections.wirelessEnabled ? "network-wireless-disconnected" : "network-wireless-connected" | 99 | iconName: enabledConnections.wirelessEnabled ? "network-wireless-disconnected" : "network-wireless-connected" | ||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |
You can use "Section" property from the model, which already contains either "Active connections" or "Available connections".
We use it in the applet as well: