Commit 9ab12e80 authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

[statusbar] Technologies for cellular connections.

parent bc9b5a98
...@@ -72,22 +72,54 @@ Item { ...@@ -72,22 +72,54 @@ Item {
wlan.path = networkManager.technologyPathForType("wifi") wlan.path = networkManager.technologyPathForType("wifi")
} }
} }
onAvailableChanged: updateTechnologies() onAvailableChanged: updateTechnologies()
onTechnologiesEnabledChanged: updateTechnologies() onTechnologiesEnabledChanged: updateTechnologies()
onTechnologiesChanged: updateTechnologies() onTechnologiesChanged: updateTechnologies()
} }
NetworkTechnology { NetworkTechnology {
id: wlan id: wlan
} }
ContextProperty {
id: cellularNetworkName
key: "Cellular.NetworkName"
}
ContextProperty {
id: cellularDataTechnology
key: "Cellular.DataTechnology"
}
Row { Row {
spacing: 16 spacing: 16
StatusbarItem { StatusbarItem {
source: "image://theme/icon_cell" + cellularSignalBars.value source: "image://theme/icon_cell" + cellularSignalBars.value
} }
StatusbarItem {
Label {
id: tech
width: 16
height: 16
font.pointSize: 6
font.bold: true
text: cellularNetworkName.value.toUpperCase()
}
Label {
anchors.top: tech.bottom
anchors.topMargin: 4
width: 16
height: 16
font.pointSize: 6
text: {
var techToG = {gprs: "2", egprs: "2.5", umts: "3", hspa: "3.5", lte: "4"}
return techToG[cellularDataTechnology.value] + "G"
}
}
}
StatusbarItem { StatusbarItem {
source: { source: {
if (wlan.connected) { if (wlan.connected) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment