summaryrefslogtreecommitdiffstats
path: root/app/wired/Wired.qml
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2019-09-02 22:29:47 +0200
committerraquel medina <raquel.medina@konsulko.com>2019-09-12 12:52:39 +0000
commit7bba7c7f9fdffe977fef6714fd9c4ea9caae0a4e (patch)
tree26630c6ced3c1e8d6a68213e2bbfcc76b377f699 /app/wired/Wired.qml
parentb591cf219f6c485eb054b628d62475a752f0ffa3 (diff)
wired: implement configuration data flowsicefish_8.99.1icefish/8.99.18.99.1
- feed stack configuration data provided by libqtappfw to the ui form; - forward custom configuration data to libqtappfw; - rename staticXXXX properties to customXXXX - introduce activeXXXX properties to keep the stack current configuration values. - fix always invisible placeholder text (qt) bug by replacing TextField control with TextArea control. Bug-AGL: SPEC-2676 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: Ib137f8e561ed54179b116acb323485b5b3382ab9
Diffstat (limited to 'app/wired/Wired.qml')
-rw-r--r--app/wired/Wired.qml28
1 files changed, 27 insertions, 1 deletions
diff --git a/app/wired/Wired.qml b/app/wired/Wired.qml
index 6e3e28b..52d24cd 100644
--- a/app/wired/Wired.qml
+++ b/app/wired/Wired.qml
@@ -61,6 +61,12 @@ SettingPage {
font.pixelSize: 18
text: "CONFIGURE"
onClicked: {
+ customconf.activeStatic = Qt.binding(function() { return (sroute[0] === "dhcp")? false : true })
+ customconf.activeAddress = Qt.binding(function() { return sroute[1]? sroute[1] : "0.0.0.0" })
+ customconf.activeNetmask = Qt.binding(function() { return sroute[2]? sroute[2] : "255.255.255.255" })
+ customconf.activeGateway = Qt.binding(function() { return sroute[3]? sroute[3] : "0.0.0.0" })
+ customconf.activeManualNS = Qt.binding(function() { return (nservers[0] === "auto")? false : true })
+ customconf.activeNSList = Qt.binding(function() { return nservers[1]? nservers[1] : "0.0.0.0" })
customconf.open()
}
@@ -72,11 +78,31 @@ SettingPage {
xpos: (parent.width - maxpwidth)/2
ypos: (parent.height - maxpheight)
serviceName: service
+ activeAddress: address
+ activeNetmask: sroute[2]
+ activeGateway: sroute[3]
+ activeStatic: false
+ activeManualNS: false
+ activeNSList: nservers[1]
+
+ onFinished: {
+ if (!((sroute[0] === newaa[0]) &&
+ (sroute[1] === newaa[1]) &&
+ (sroute[2] === newaa[2]) &&
+ (sroute[3] === newaa[3]))) {
+ network.configureAddress(svc, newaa);
+ }
+
+ if (!((nservers[0] === newna[0]) &&
+ (nservers[1] === newna[1]))) {
+ network.configureNameServer(svc, newna);
+ }
+ }
}
}
}
onClicked: {
- if ((sstate === "ready") || sstate === "online") {
+ if ((sstate === "ready") || (sstate === "online")) {
console.log("Disconnecting from ->", service)
networkNameText.font.italic = 1
network.disconnect(service)