summaryrefslogtreecommitdiffstats
path: root/examples/declarative-systeminfo/network
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2010-09-17 15:30:40 +1000
committerLorn Potter <lorn.potter@nokia.com>2010-09-17 15:30:40 +1000
commit77ed494308ccc9faa892874a3a5fcefc6a6741d3 (patch)
tree1e7078495b4ae54bd61a09ac7fbc12b4d671bcdb /examples/declarative-systeminfo/network
parent9b47a8df500f3585586b36f60071d72540e96da3 (diff)
declarative deployment.
Task-number: QTMOBILITY-497
Diffstat (limited to 'examples/declarative-systeminfo/network')
-rw-r--r--examples/declarative-systeminfo/network/deployment.pri8
-rw-r--r--examples/declarative-systeminfo/network/images/lan-noavail.svg39
-rw-r--r--examples/declarative-systeminfo/network/images/lan.svg33
-rw-r--r--examples/declarative-systeminfo/network/images/wlan-noavail.svg57
-rw-r--r--examples/declarative-systeminfo/network/images/wlan.svg30
-rw-r--r--examples/declarative-systeminfo/network/network.pro11
-rw-r--r--examples/declarative-systeminfo/network/qmlnetwork.cpp63
-rw-r--r--examples/declarative-systeminfo/network/wifi.qml204
8 files changed, 445 insertions, 0 deletions
diff --git a/examples/declarative-systeminfo/network/deployment.pri b/examples/declarative-systeminfo/network/deployment.pri
new file mode 100644
index 0000000000..9d9e3d5203
--- /dev/null
+++ b/examples/declarative-systeminfo/network/deployment.pri
@@ -0,0 +1,8 @@
+# Deployment rules: which files to deploy along with the C++ project
+# Particularly important for Symbian (so that files end up in .sis package)
+qmlnetworkinfo_src = $$PWD
+symbian {
+ load(data_caging_paths)
+}
+qmlnetworkinfo_files.sources = qmlnetworkinfo_src/wifi.qml qmlnetworkinfo_src/images
+DEPLOYMENT += qmlnetworkinfo_files
diff --git a/examples/declarative-systeminfo/network/images/lan-noavail.svg b/examples/declarative-systeminfo/network/images/lan-noavail.svg
new file mode 100644
index 0000000000..43d6d7a6cf
--- /dev/null
+++ b/examples/declarative-systeminfo/network/images/lan-noavail.svg
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_svg "http://www.w3.org/2000/svg">
+ <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg version="1.1" id="&#x56FE;&#x5C42;_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="21.333" height="20.104"
+ viewBox="0 0 21.333 20.104" style="overflow:visible;enable-background:new 0 0 21.333 20.104;" xml:space="preserve">
+<g>
+ <linearGradient id="XMLID_3_" gradientUnits="userSpaceOnUse" x1="1.6836" y1="5.2314" x2="20.3517" y2="5.2314">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="0.102" style="stop-color:#FBFBFB"/>
+ <stop offset="0.2032" style="stop-color:#EFEFEF"/>
+ <stop offset="0.3042" style="stop-color:#DBDBDB"/>
+ <stop offset="0.4044" style="stop-color:#BFBFBF"/>
+ <stop offset="0.4213" style="stop-color:#BABABA"/>
+ <stop offset="0.6339" style="stop-color:#DBDBDB"/>
+ <stop offset="0.8462" style="stop-color:#F5F5F5"/>
+ <stop offset="0.9719" style="stop-color:#FFFFFF"/>
+ </linearGradient>
+ <polygon style="fill:url(#XMLID_3_);stroke:#4F4F4F;stroke-linejoin:round;" points="20.833,7.511 10.667,7.511 10.667,0.5
+ 0.5,9.963 20.833,9.963 "/>
+ <linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="1.6836" y1="14.873" x2="20.3517" y2="14.873">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="0.102" style="stop-color:#FBFBFB"/>
+ <stop offset="0.2032" style="stop-color:#EFEFEF"/>
+ <stop offset="0.3042" style="stop-color:#DBDBDB"/>
+ <stop offset="0.4044" style="stop-color:#BFBFBF"/>
+ <stop offset="0.4213" style="stop-color:#BABABA"/>
+ <stop offset="0.6339" style="stop-color:#DBDBDB"/>
+ <stop offset="0.8462" style="stop-color:#F5F5F5"/>
+ <stop offset="0.9719" style="stop-color:#FFFFFF"/>
+ </linearGradient>
+ <polygon style="fill:url(#XMLID_4_);stroke:#4F4F4F;stroke-linejoin:round;" points="0.5,12.594 10.667,12.594 10.667,19.604
+ 20.833,10.141 0.5,10.141 "/>
+ <polygon style="fill:#D80B06;" points="18.628,16.277 12.821,10.471 18.628,4.663 16.706,2.739 10.896,8.546 5.088,2.739
+ 3.166,4.663 8.974,10.471 3.166,16.277 5.088,18.2 10.896,12.395 16.706,18.2 "/>
+</g>
+</svg>
diff --git a/examples/declarative-systeminfo/network/images/lan.svg b/examples/declarative-systeminfo/network/images/lan.svg
new file mode 100644
index 0000000000..b8ee999e1e
--- /dev/null
+++ b/examples/declarative-systeminfo/network/images/lan.svg
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_svg "http://www.w3.org/2000/svg">
+ <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg version="1.1" id="&#x56FE;&#x5C42;_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="21.929" height="20.665"
+ viewBox="0 0 21.929 20.665" style="overflow:visible;enable-background:new 0 0 21.929 20.665;" xml:space="preserve">
+<g>
+ <linearGradient id="XMLID_3_" gradientUnits="userSpaceOnUse" x1="1.7178" y1="5.3706" x2="20.9333" y2="5.3706">
+ <stop offset="0.0393" style="stop-color:#C2DC1A"/>
+ <stop offset="0.2192" style="stop-color:#BEDA1A"/>
+ <stop offset="0.3978" style="stop-color:#B2D61B"/>
+ <stop offset="0.5758" style="stop-color:#9ECE1D"/>
+ <stop offset="0.7536" style="stop-color:#82C320"/>
+ <stop offset="0.9298" style="stop-color:#5FB423"/>
+ <stop offset="0.9326" style="stop-color:#5EB423"/>
+ </linearGradient>
+ <polygon style="fill:url(#XMLID_3_);stroke:#000000;stroke-linejoin:round;" points="21.429,7.716 10.965,7.716 10.965,0.5
+ 0.5,10.241 21.429,10.241 "/>
+ <linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="1.7178" y1="15.2944" x2="20.9333" y2="15.2944">
+ <stop offset="0.0393" style="stop-color:#C2DC1A"/>
+ <stop offset="0.2192" style="stop-color:#BEDA1A"/>
+ <stop offset="0.3978" style="stop-color:#B2D61B"/>
+ <stop offset="0.5758" style="stop-color:#9ECE1D"/>
+ <stop offset="0.7536" style="stop-color:#82C320"/>
+ <stop offset="0.9298" style="stop-color:#5FB423"/>
+ <stop offset="0.9326" style="stop-color:#5EB423"/>
+ </linearGradient>
+ <polygon style="fill:url(#XMLID_4_);stroke:#000000;stroke-linejoin:round;" points="0.5,12.949 10.965,12.949 10.965,20.165
+ 21.429,10.424 0.5,10.424 "/>
+</g>
+</svg>
diff --git a/examples/declarative-systeminfo/network/images/wlan-noavail.svg b/examples/declarative-systeminfo/network/images/wlan-noavail.svg
new file mode 100644
index 0000000000..513ffb0913
--- /dev/null
+++ b/examples/declarative-systeminfo/network/images/wlan-noavail.svg
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_svg "http://www.w3.org/2000/svg">
+ <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg version="1.1" id="&#x56FE;&#x5C42;_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="15.858" height="13.541"
+ viewBox="0 0 15.858 13.541" style="overflow:visible;enable-background:new 0 0 15.858 13.541;" xml:space="preserve">
+<g>
+ <linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="8.001" y1="0.7012" x2="8.001" y2="5.5137">
+ <stop offset="0" style="stop-color:#67C6DD"/>
+ <stop offset="0.4663" style="stop-color:#82E6FF"/>
+ <stop offset="1" style="stop-color:#67C6DD"/>
+ </linearGradient>
+ <path style="fill:url(#XMLID_7_);stroke:#000000;stroke-width:0.5;" d="M15.084,6.149c-1.28,1.091-3.237-1.593-7.378-1.593
+ c-4.14,0-5.317,2.962-6.823,1.593c-1.898-2.254,2.029-5.708,6.711-5.852C13.101,0.126,17.085,4.046,15.084,6.149z"/>
+ <linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="2.7236" y1="7.5986" x2="13.7607" y2="7.5986">
+ <stop offset="0" style="stop-color:#67C6DD"/>
+ <stop offset="0.4663" style="stop-color:#82E6FF"/>
+ <stop offset="1" style="stop-color:#67C6DD"/>
+ </linearGradient>
+ <path style="fill:url(#XMLID_8_);stroke:#000000;stroke-width:0.5;" d="M12.802,10.434c-1.479,0.544-1.709-1.943-4.814-2.035
+ c-2.811-0.111-3.062,2.638-4.512,1.666C1.164,7.936,4.602,4.552,8.104,4.689C11.608,4.827,15.641,8.584,12.802,10.434z"/>
+ <linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="5.9893" y1="10.9092" x2="10.0811" y2="10.9092">
+ <stop offset="0" style="stop-color:#67C6DD"/>
+ <stop offset="0.4663" style="stop-color:#82E6FF"/>
+ <stop offset="1" style="stop-color:#67C6DD"/>
+ </linearGradient>
+ <path style="fill:url(#XMLID_9_);stroke:#000000;stroke-width:0.5;" d="M10.081,11.342c0,1.076-0.915,1.949-2.046,1.949l0,0
+ c-1.128,0-2.046-0.873-2.046-1.949v-0.865c0-1.078,0.918-1.949,2.046-1.949l0,0c1.131,0,2.046,0.871,2.046,1.949V11.342z"/>
+</g>
+<g>
+ <linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="7.8564" y1="0.6597" x2="7.8564" y2="5.4718">
+ <stop offset="0" style="stop-color:#ACACAC"/>
+ <stop offset="0.4663" style="stop-color:#FFFFFF"/>
+ <stop offset="0.9831" style="stop-color:#EBEBEB"/>
+ </linearGradient>
+ <path style="fill:url(#XMLID_10_);stroke:#000000;stroke-width:0.5;" d="M14.939,6.107c-1.28,1.092-3.237-1.592-7.378-1.592
+ c-4.14,0-5.317,2.961-6.823,1.592C-1.16,3.853,2.768,0.399,7.449,0.255C12.956,0.085,16.94,4.005,14.939,6.107z"/>
+ <linearGradient id="XMLID_11_" gradientUnits="userSpaceOnUse" x1="2.5791" y1="7.5566" x2="13.6162" y2="7.5566">
+ <stop offset="0" style="stop-color:#ACACAC"/>
+ <stop offset="0.4663" style="stop-color:#FFFFFF"/>
+ <stop offset="0.9831" style="stop-color:#EBEBEB"/>
+ </linearGradient>
+ <path style="fill:url(#XMLID_11_);stroke:#000000;stroke-width:0.5;" d="M12.657,10.393c-1.479,0.543-1.709-1.943-4.814-2.035
+ c-2.811-0.111-3.062,2.637-4.512,1.666C1.02,7.895,4.457,4.511,7.96,4.648C11.464,4.786,15.496,8.543,12.657,10.393z"/>
+ <linearGradient id="XMLID_12_" gradientUnits="userSpaceOnUse" x1="5.8447" y1="10.8682" x2="9.9365" y2="10.8682">
+ <stop offset="0" style="stop-color:#ACACAC"/>
+ <stop offset="0.4663" style="stop-color:#FFFFFF"/>
+ <stop offset="0.9831" style="stop-color:#EBEBEB"/>
+ </linearGradient>
+ <path style="fill:url(#XMLID_12_);stroke:#000000;stroke-width:0.5;" d="M9.937,11.301c0,1.076-0.915,1.949-2.046,1.949l0,0
+ c-1.128,0-2.046-0.873-2.046-1.949v-0.865c0-1.078,0.918-1.949,2.046-1.949l0,0c1.131,0,2.046,0.871,2.046,1.949V11.301z"/>
+</g>
+<polygon style="fill:#D80B06;" points="14.832,11.421 9.813,6.708 14.848,2.015 13.203,0.251 8.054,5.055 2.918,0.231 1.269,1.987
+ 6.287,6.702 1.251,11.398 2.894,13.16 8.047,8.356 13.181,13.179 "/>
+</svg>
diff --git a/examples/declarative-systeminfo/network/images/wlan.svg b/examples/declarative-systeminfo/network/images/wlan.svg
new file mode 100644
index 0000000000..338821ce95
--- /dev/null
+++ b/examples/declarative-systeminfo/network/images/wlan.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_svg "http://www.w3.org/2000/svg">
+ <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg version="1.1" id="&#x56FE;&#x5C42;_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="15.714" height="13.5"
+ viewBox="0 0 15.714 13.5" style="overflow:visible;enable-background:new 0 0 15.714 13.5;" xml:space="preserve">
+<g>
+ <linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="7.8564" y1="0.6597" x2="7.8564" y2="5.4722">
+ <stop offset="0" style="stop-color:#67C6DD"/>
+ <stop offset="0.4663" style="stop-color:#82E6FF"/>
+ <stop offset="1" style="stop-color:#67C6DD"/>
+ </linearGradient>
+ <path style="fill:url(#XMLID_4_);stroke:#000000;stroke-width:0.5;" d="M14.939,6.107c-1.28,1.092-3.237-1.592-7.378-1.592
+ c-4.14,0-5.317,2.961-6.823,1.592C-1.16,3.853,2.768,0.399,7.449,0.255C12.956,0.085,16.94,4.005,14.939,6.107z"/>
+ <linearGradient id="XMLID_5_" gradientUnits="userSpaceOnUse" x1="2.5791" y1="7.5571" x2="13.6162" y2="7.5571">
+ <stop offset="0" style="stop-color:#6791DD"/>
+ <stop offset="1" style="stop-color:#67C6DD"/>
+ </linearGradient>
+ <path style="fill:url(#XMLID_5_);stroke:#000000;stroke-width:0.5;" d="M12.657,10.392c-1.479,0.544-1.709-1.943-4.814-2.035
+ c-2.811-0.111-3.062,2.638-4.512,1.666C1.02,7.894,4.457,4.511,7.96,4.648C11.464,4.786,15.496,8.542,12.657,10.392z"/>
+ <linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="5.8447" y1="10.8677" x2="9.9365" y2="10.8677">
+ <stop offset="0" style="stop-color:#6791DD"/>
+ <stop offset="1" style="stop-color:#67C6DD"/>
+ </linearGradient>
+ <path style="fill:url(#XMLID_6_);stroke:#000000;stroke-width:0.5;" d="M9.937,11.3c0,1.076-0.915,1.949-2.046,1.949l0,0
+ c-1.128,0-2.046-0.873-2.046-1.949v-0.865c0-1.078,0.918-1.949,2.046-1.949l0,0c1.131,0,2.046,0.871,2.046,1.949V11.3z"/>
+</g>
+</svg>
diff --git a/examples/declarative-systeminfo/network/network.pro b/examples/declarative-systeminfo/network/network.pro
new file mode 100644
index 0000000000..c836150b66
--- /dev/null
+++ b/examples/declarative-systeminfo/network/network.pro
@@ -0,0 +1,11 @@
+include($$PWD/deployment.pri)
+include($$PWD/../declarative-systeminfo.pri)
+
+QT += declarative
+SOURCES += $$PWD/qmlnetwork.cpp
+TARGET = qml_networkinfo
+
+symbian {
+ TARGET.CAPABILITY = ReadUserData
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+}
diff --git a/examples/declarative-systeminfo/network/qmlnetwork.cpp b/examples/declarative-systeminfo/network/qmlnetwork.cpp
new file mode 100644
index 0000000000..15b5608f7e
--- /dev/null
+++ b/examples/declarative-systeminfo/network/qmlnetwork.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include <QtDeclarative/QDeclarativeView>
+#include <QtDeclarative/QDeclarativeEngine>
+
+int main(int argc, char *argv[])
+{
+ QApplication application(argc, argv);
+ const QString mainQmlApp = QLatin1String("wifi.qml");
+ QDeclarativeView view;
+ view.setSource(QUrl(mainQmlApp));
+ view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ // Qt.quit() called in embedded .qml by default only emits
+ // quit() signal, so do this (optionally use Qt.exit()).
+ QObject::connect(view.engine(), SIGNAL(quit()), qApp, SLOT(quit()));
+#if defined(Q_OS_SYMBIAN)
+ view.showFullScreen();
+#else // Q_OS_SYMBIAN
+ view.setGeometry(QRect(100, 100, 360, 640));
+ view.show();
+#endif // Q_OS_SYMBIAN
+ return application.exec();
+}
diff --git a/examples/declarative-systeminfo/network/wifi.qml b/examples/declarative-systeminfo/network/wifi.qml
new file mode 100644
index 0000000000..10919c2742
--- /dev/null
+++ b/examples/declarative-systeminfo/network/wifi.qml
@@ -0,0 +1,204 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+***********************************/
+
+import Qt 4.7
+import QtMobility.systeminfo 1.1
+
+Rectangle {
+ width: 640
+ height: 480
+ color: "#343434"
+
+ Item {
+ id: wlan
+ x:(parent.width / 2) - (parent.width / 4);
+ y: parent.height / 2
+
+ property int mode: NetworkInfo.WlanMode;
+
+ NetworkInfo {
+ id: wlaninfo
+ useMode: wlan.mode;
+ property string img : getImage(networkStatus);
+
+ function getImage(newStatus) {
+ if(newStatus == "Connected") {
+ return "images/wlan.svg";
+ }
+ if(newStatus == "Searching") {
+ // return "images/wlan.svg";
+ }
+ if(newStatus == "No Network Available") {
+ return "images/wlan-noavail.svg";
+ }
+ }
+
+ onStatusChanged : {
+ img = getImage(newStatus)
+ }
+ }
+
+ Component.onCompleted: {
+ wlaninfo.startNameChanged();
+ wlaninfo.startSignalStrengthChanged();
+ wlaninfo.startStatusChanged();
+ wlaninfo.startModeChanged();
+ }
+
+ Image {
+ id: wifiimg
+ source : wlaninfo.img;
+ anchors.horizontalCenter: parent.horizontalCenter;
+ anchors.verticalCenter: parent.verticalCenter;
+ }
+
+ Text {
+ id: signalText
+ color: "white"
+ text: wlaninfo.networkSignalStrength
+ anchors.top: wifiimg.bottom;
+ anchors.horizontalCenter: parent.horizontalCenter;
+ }
+
+
+ Text {
+ id: sigmstatus
+ color: "white"
+ text: wlaninfo.networkStatus;
+ anchors.top: signalText.bottom;
+ anchors.horizontalCenter: parent.horizontalCenter;
+ }
+
+ Text {
+ id: signame
+ color: "white"
+ text: wlaninfo.networkName;
+ anchors.top: sigmstatus.bottom;
+ anchors.horizontalCenter: parent.horizontalCenter;
+ }
+
+ Text {
+ id: sigmac
+ color: "white"
+ text: wlaninfo.macAddress;
+ anchors.top: signame.bottom;
+ anchors.horizontalCenter: parent.horizontalCenter;
+ }
+ }
+
+
+
+ Item {
+ id: ethernet
+ x:(parent.width / 2) + (parent.width / 4);
+ anchors { verticalCenter: parent.verticalCenter; }
+
+ property string imageSrc;
+
+ property int mode: NetworkInfo.EthernetMode;
+
+ NetworkInfo {
+ id: ethinfo
+ useMode: ethernet.mode;
+ property string img : getImage(networkStatus);
+
+ function getImage(newStatus) {
+ if(newStatus == "Connected") {
+ return "images/lan.svg";
+ }
+ if(newStatus == "No Network Available") {
+ return "images/lan-noavail.svg";
+ }
+ }
+
+ onStatusChanged : {
+ img = getImage(newStatus)
+ }
+ }
+
+ Component.onCompleted: {
+ ethinfo.startNameChanged();
+ ethinfo.startSignalStrengthChanged();
+ ethinfo.startStatusChanged();
+ ethinfo.startModeChanged();
+ }
+
+ Image {
+ id: ether
+ source : ethinfo.img
+ anchors.horizontalCenter: parent.horizontalCenter;
+ anchors.verticalCenter: parent.verticalCenter;
+ }
+
+ Text {
+ id: ethersignalText
+ color: "white"
+ text: ethinfo.networkSignalStrength
+ anchors.top: ether.bottom;
+ anchors.horizontalCenter: parent.horizontalCenter;
+ }
+
+ Text {
+ id: ethersigmstatus
+ color: "white"
+ text: ethinfo.networkStatus;
+ anchors.top: ethersignalText.bottom;
+ anchors.horizontalCenter: parent.horizontalCenter;
+ }
+
+ Text {
+ id: ethersigname
+ color: "white"
+ text: ethinfo.networkName;
+ anchors.top: ethersigmstatus.bottom;
+ anchors.horizontalCenter: parent.horizontalCenter;
+ }
+
+
+ Text {
+ id: ethersigmac
+ color: "white"
+ text: ethinfo.macAddress;
+ anchors.top: ethersigname.bottom;
+ anchors.horizontalCenter: parent.horizontalCenter;
+ }
+ }
+
+}