diff options
author | Samuli Piippo <samuli.piippo@digia.com> | 2013-06-06 11:45:19 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2013-06-06 12:42:29 +0300 |
commit | 805290d1a8e32e43c9646a17481df6f8fbe644dc (patch) | |
tree | 99da937cd156d6086dcf977e32b86cab343bb2dd | |
parent | 2ac654de839dce39c59515345a0e2e58b5e34e68 (diff) |
Add IP and hostname info to Launcher Settings app
Change-Id: Iee3fbfa630017935e57a86ef55b390d1592b0dc4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
-rw-r--r-- | basicsuite/Launcher Settings/NetworkController.qml | 21 | ||||
-rw-r--r-- | basicsuite/Launcher Settings/main.qml | 39 | ||||
-rw-r--r-- | basicsuite/Launcher Settings/preview_l.jpg | bin | 10743 -> 12642 bytes |
3 files changed, 60 insertions, 0 deletions
diff --git a/basicsuite/Launcher Settings/NetworkController.qml b/basicsuite/Launcher Settings/NetworkController.qml new file mode 100644 index 0000000..3ec36ac --- /dev/null +++ b/basicsuite/Launcher Settings/NetworkController.qml @@ -0,0 +1,21 @@ +import QtDroid.Utils 1.0 +import QtQuick 2.0 + +QtObject { + + function getIPAddress() + { + return DroidUtils.getIPAddress() + } + + function getHostname() + { + return DroidUtils.getHostname() + } + + function setHostname(value) + { + return DroidUtils.setHostname(value) + } + +} diff --git a/basicsuite/Launcher Settings/main.qml b/basicsuite/Launcher Settings/main.qml index 8384566..140aebb 100644 --- a/basicsuite/Launcher Settings/main.qml +++ b/basicsuite/Launcher Settings/main.qml @@ -31,6 +31,11 @@ Rectangle { source: "BrightnessController.qml" } + Loader { + id: networkControllerLoader + source: "NetworkController.qml" + } + Flickable { anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter @@ -108,6 +113,40 @@ Rectangle { } } } + + GroupBox { + id: networkOptions + title: "Network Options" + + Layout.fillWidth: true + + GridLayout { + id: networkGrid + + rows: 2 + columns: 3 + flow: GridLayout.TopToBottom + anchors.fill: parent + + Label { text: "Hostname: "; } + Label { text: "IP address: "; } + + TextField { + id: hostname + text: if (networkControllerLoader.item != undefined) { networkControllerLoader.item.getHostname(); } + Layout.fillWidth: true + } + + Label { text: if (networkControllerLoader.item != undefined) { networkControllerLoader.item.getIPAddress(); } } + + Button { + text: "Change hostname" + onClicked: networkControllerLoader.item.setHostname(hostname.text); + enabled: networkControllerLoader.item != undefined + } + + } + } } } } diff --git a/basicsuite/Launcher Settings/preview_l.jpg b/basicsuite/Launcher Settings/preview_l.jpg Binary files differindex bdfafee..118edc4 100644 --- a/basicsuite/Launcher Settings/preview_l.jpg +++ b/basicsuite/Launcher Settings/preview_l.jpg |