Commit 7fa6d8ab authored by Martin Kacej's avatar Martin Kacej

loading of settings to dialog

parent 7c3521e1
...@@ -24,6 +24,7 @@ import org.kde.kirigami 2.2 as Kirigami ...@@ -24,6 +24,7 @@ import org.kde.kirigami 2.2 as Kirigami
Kirigami.ScrollablePage{ Kirigami.ScrollablePage{
property var details property var details
property var path
property alias signal_strength: signalStrengthLabel.text property alias signal_strength: signalStrengthLabel.text
property alias signal_speed: linkSpeedLabel.text property alias signal_speed: linkSpeedLabel.text
property alias ip_address: ipAddressLabel.text property alias ip_address: ipAddressLabel.text
...@@ -121,7 +122,7 @@ Kirigami.ScrollablePage{ ...@@ -121,7 +122,7 @@ Kirigami.ScrollablePage{
} }
function fillDetails() { function fillDetails() {
var d = {} /* var d = {}
for (var i = 0; i < (details.length / 2); i++){ for (var i = 0; i < (details.length / 2); i++){
d[details[(i * 2)]] = details[(i * 2) + 1] d[details[(i * 2)]] = details[(i * 2) + 1]
} }
...@@ -140,10 +141,14 @@ Kirigami.ScrollablePage{ ...@@ -140,10 +141,14 @@ Kirigami.ScrollablePage{
IPDetailsSection.dns = activeMap["dns"] IPDetailsSection.dns = activeMap["dns"]
IPDetailsSection.prefix = activeMap["prefix"] IPDetailsSection.prefix = activeMap["prefix"]
IPDetailsSection.gateway = activeMap["gateway"] IPDetailsSection.gateway = activeMap["gateway"]
} }*/
} }
function clearDetails() {
signal_speed = signal_strength = ip_address = 0 function loadNetworkSettings() {
security = "Unknown" console.info(path);
settings = utils.getConnectionSettings(path,"connection");
detailsSecuritySection.securityMap = utils.getConnectionSettings(path,"802-11-wireless-security");
detailsIP.ipmap = utils.getConnectionSettings(path,"ipv4");
console.info(detailsIP.ipmap["method"]);
} }
} }
...@@ -118,7 +118,8 @@ Kirigami.SwipeListItem { ...@@ -118,7 +118,8 @@ Kirigami.SwipeListItem {
}, },
Kirigami.Action { Kirigami.Action {
iconName: "configure" iconName: "configure"
onTriggered: getDetails() visible: (Uuid != "")? true : false
onTriggered: getConfigureDialog()
}, },
Kirigami.Action { Kirigami.Action {
iconName: "entry-delete" iconName: "entry-delete"
...@@ -127,19 +128,10 @@ Kirigami.SwipeListItem { ...@@ -127,19 +128,10 @@ Kirigami.SwipeListItem {
} }
] ]
function getDetails() { function getConfigureDialog() {
main.path = ConnectionPath var item = applicationWindow().pageStack.push(networkDetailsViewComponent)
applicationWindow().pageStack.push(networkDetailsViewComponent,ConnectionPath) item.path = ConnectionPath
if (networkDetailsViewComponent.status == Component.Ready){ item.loadNetworkSettings()
console.info("Network view ready")
utils.getActiveConnectionInfo(ConnectionPath)
map = utils.getConnectionSettings(ConnectionPath,"ipv4")
if (ConnectionState == PlasmaNM.Enums.Activated){
//networkDetailsViewComponentView.activeMap = handler.getActiveConnectionInfo(ConnectionPath)
}
//networkDetailsViewContent.map = map
//networkDetailsViewComponentView.fillDetails()
}
} }
function changeState() { function changeState() {
......
...@@ -75,7 +75,6 @@ Kirigami.ApplicationItem { ...@@ -75,7 +75,6 @@ Kirigami.ApplicationItem {
Component { Component {
id: networkDetailsViewComponent id: networkDetailsViewComponent
NetworkDetailsView { NetworkDetailsView {
id: networkDetailsViewComponentView
} }
} }
} }
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