Commit 15c583af authored by Martin Kacej's avatar Martin Kacej

additional info in dialog

parent 9b489d35
......@@ -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")
}
}
}
......@@ -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 = ''
}
}
......@@ -11,7 +11,7 @@ ColumnLayout{
text: i18n("Proxy settings")
}
Controls.CheckBox{
PlasmaComponents.CheckBox{
id: manualProxyCheck
checked: false
onCheckedChanged: {
......
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