summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kacej <[email protected]>2017-11-28 16:11:46 +0100
committerMartin Kacej <[email protected]>2017-11-28 16:11:46 +0100
commit15c583af4aa9fc2f290e24ef2081a98452829f81 (patch)
treee251d8d40a4e43a78e7c4300c0163d97e226cafe
parent9b489d354a6bf135a12a88d990dac76e278a2d4d (diff)
additional info in dialog
-rw-r--r--mobile/package/contents/ui/IPDetailsSection.qml18
-rw-r--r--mobile/package/contents/ui/NetworkDetailsView.qml67
-rw-r--r--mobile/package/contents/ui/ProxyDetailsSection.qml2
3 files changed, 62 insertions, 25 deletions
diff --git a/mobile/package/contents/ui/IPDetailsSection.qml b/mobile/package/contents/ui/IPDetailsSection.qml
index ee1db67..63c0458 100644
--- a/mobile/package/contents/ui/IPDetailsSection.qml
+++ b/mobile/package/contents/ui/IPDetailsSection.qml
@@ -6,13 +6,16 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
ColumnLayout{
- spacing: units.gridUnit
+ property var adress: ""
+ property var gateway: ""
+
+ spacing: units.gridUnit
PlasmaComponents.Label{
text: i18n("IP Settings")
}
- Controls.CheckBox{
+ PlasmaComponents.Switch{
id: manualIPCheckbox
checked: false
onCheckedChanged: {
@@ -30,6 +33,7 @@ ColumnLayout{
Controls.TextField{
placeholderText: i18n("193.168.1.128")
+ text: adress
}
PlasmaComponents.Label{
@@ -41,7 +45,7 @@ ColumnLayout{
}
PlasmaComponents.Label{
- text: i18n("Network proxy length")
+ text: i18n("Network prefix length")
}
Controls.TextField{
@@ -55,13 +59,5 @@ ColumnLayout{
Controls.TextField{
placeholderText: i18n("8.8.8.8")
}
-
- PlasmaComponents.Label{
- text: i18n("Network proxy length")
- }
-
- Controls.TextField{
- placeholderText: i18n("24")
- }
}
}
diff --git a/mobile/package/contents/ui/NetworkDetailsView.qml b/mobile/package/contents/ui/NetworkDetailsView.qml
index bc3ad45..ff75275 100644
--- a/mobile/package/contents/ui/NetworkDetailsView.qml
+++ b/mobile/package/contents/ui/NetworkDetailsView.qml
@@ -25,28 +25,69 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
-import QtQuick 2.0
-
-Item {
+PlasmaExtras.ScrollArea{
property var details
- property var str: 0
+ property var signal_strength: 0
+ property var signal_speed: 0
+ property var ip_address: 0
+ property var security: "Unknown"
+
+ Column {
+
+ Column{
+ id: staticInfo
+ anchors.bottomMargin: units.gridUnit
+
+ PlasmaComponents.Label {
+ text: i18n("<b>Strength: </b>" + signal_strength)
+ }
+ PlasmaComponents.Label{
+ text: i18n("<b>Link Speed:</b> " + signal_speed)
+ }
+ PlasmaComponents.Label{
+ text: i18n("<b>Security: </b>" +security)
+ }
+ PlasmaComponents.Label{
+ text: i18n("<b>IP Address: </b>" + ip_address)
+ }
+ }
+
+ RowLayout {
+ PlasmaComponents.Label {
+ anchors.left: parent.left
+ text: i18n("Advanced options")
+ }
+ PlasmaComponents.Switch {
+ id: advancedOptionsSwitch
+ checked: false
+ }
+ }
- Column{
- PlasmaComponents.Label {
- anchors.left: parent.left
- text: i18n("Strength:")
+ IPDetailsSection{
+ id: detailsIP
+ visible: advancedOptionsSwitch.checked
}
- PlasmaComponents.Label {
- anchors.right: parent.right
- text: str
+ ProxyDetailsSection{
+ visible: advancedOptionsSwitch.checked
}
}
function fillDetails() {
+ var d = {}
for (var i = 0; i < (details.length / 2); i++){
- console.info(details[(i * 2) + 1])
+ console.info(details[i])
+ d[details[(i * 2)]] = details[(i * 2) + 1]
}
- str = details[3]
+ if(d['Access point (SSID)']) detailsDialog.titleText = d['Access point (SSID)']
+ signal_strength = d['Signal strength']
+ if (d['IPv4 Address']) ip_address = detailsIP.adress = d['IPv4 Address']
+ if (d['Security type']) security = d['Security type']
+ if (d['Connection speed']) signal_speed = d['Connection speed']
+ }
+ function clearDetails(){
+ signal_speed = signal_strength = ip_address = 0
+ security = "Unknown"
+ detailsIP.adress = detailsIP.gateway = ''
}
}
diff --git a/mobile/package/contents/ui/ProxyDetailsSection.qml b/mobile/package/contents/ui/ProxyDetailsSection.qml
index 7e7cddd..71dced2 100644
--- a/mobile/package/contents/ui/ProxyDetailsSection.qml
+++ b/mobile/package/contents/ui/ProxyDetailsSection.qml
@@ -11,7 +11,7 @@ ColumnLayout{
text: i18n("Proxy settings")
}
- Controls.CheckBox{
+ PlasmaComponents.CheckBox{
id: manualProxyCheck
checked: false
onCheckedChanged: {