From a5db288e9f55f27644c332dd66c98513fce7d123 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 18 Mar 2014 09:48:40 +0100 Subject: Add documentation to QtWifi library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifd71c65a155ad296f3491085e91556eb69226b2b Reviewed-by: Topi Reiniƶ --- src/imports/wifi/qwifinetwork.cpp | 74 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'src/imports/wifi/qwifinetwork.cpp') diff --git a/src/imports/wifi/qwifinetwork.cpp b/src/imports/wifi/qwifinetwork.cpp index a159e59..2ff8d7b 100644 --- a/src/imports/wifi/qwifinetwork.cpp +++ b/src/imports/wifi/qwifinetwork.cpp @@ -18,6 +18,80 @@ ****************************************************************************/ #include "qwifinetwork.h" +/*! + \qmltype WifiNetwork + \inqmlmodule Qt.labs.wifi + \brief WifiNetwork represents a single wifi network access point. + + Instances of WifiNetwork cannot be created directly from the QML system, use + WifiManager::networks. +*/ + +/*! + \qmlproperty string WifiNetwork::bssid + + This property holds basic service set identification of a network, used to uniquely + identify BSS. + +*/ + +/*! + \qmlproperty string WifiNetwork::ssid + + This property holds a network name. The SSID is the informal (human) name of BSS. +*/ + +/*! + \qmlproperty int WifiNetwork::signalStrength + + This property holds the current strength of a WiFi signal. New readings are + taken every 5 seconds. + + \sa signalStrengthChanged +*/ + +/*! + \qmlproperty bool WifiNetwork::supportsWPA + + This property holds whether network access point supports WPA security protocol. +*/ + +/*! + \qmlproperty bool WifiNetwork::supportsWPA2 + + This property holds whether network access point supports WPA2 security protocol. +*/ + +/*! + \qmlproperty bool WifiNetwork::supportsWEP + + This property holds whether network access point supports WEP security protocol. +*/ + +/*! + \qmlproperty bool WifiNetwork::supportsWPS + + This property holds whether network access point supports WPS security protocol. +*/ + +/*! + \qmlsignal void WifiNetwork::signalStrengthChanged(int strength) + + This signal is emitted whenever signal strength has changed comparing the the + previous reading, the new signal's strength is \a strength. + + \code + function handleStrengthChanged(currentStrength) { + if (currentStrength < UNTOLERABLE_SPEED) + print("network speed has dropped under " + UNTOLERABLE_SPEED) + } + + Component.onCompleted: { + network.onSignalStrengthChanged.connect(handleStrengthChanged) + } + \endcode +*/ + QWifiNetwork::QWifiNetwork() { } -- cgit v1.2.3 From f29274610c980b6c2334d47a9552098d7b9e071b Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 1 Apr 2014 10:26:24 +0200 Subject: Doc: Create QML Type reference page Create a landing page for QtEE-specific QML modules and types. Ensure it links correctly to WiFi Module documentation, and add it to TOC. Change-Id: Ib3edf9ff8e50f11e138a57aabc1f84749ac48e16 Reviewed-by: Gatis Paeglis Reviewed-by: Eirik Aavitsland --- src/imports/wifi/qwifinetwork.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/imports/wifi/qwifinetwork.cpp') diff --git a/src/imports/wifi/qwifinetwork.cpp b/src/imports/wifi/qwifinetwork.cpp index 2ff8d7b..38e031c 100644 --- a/src/imports/wifi/qwifinetwork.cpp +++ b/src/imports/wifi/qwifinetwork.cpp @@ -21,7 +21,8 @@ /*! \qmltype WifiNetwork \inqmlmodule Qt.labs.wifi - \brief WifiNetwork represents a single wifi network access point. + \ingroup wifi-qmltypes + \brief Represents a single WiFi network access point. Instances of WifiNetwork cannot be created directly from the QML system, use WifiManager::networks. -- cgit v1.2.3 From 88a2385ab7b9f33437ce648a70757b9d8c8a48c7 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 19 Mar 2014 18:41:20 +0100 Subject: [Wifi] Add new enums and make some API changes - Now QtWifi can provide feedback when incorrect password is entered. - networkStateChanged signal provides a reference to the currently active network connection. - bug fixes in QWifiManager::connect Task-number: QTEE-408 Change-Id: Ic7458b864f09aef3cfca40fb081dec45e0bba7db Reviewed-by: Eirik Aavitsland --- src/imports/wifi/qwifinetwork.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/imports/wifi/qwifinetwork.cpp') diff --git a/src/imports/wifi/qwifinetwork.cpp b/src/imports/wifi/qwifinetwork.cpp index 38e031c..d4c20ef 100644 --- a/src/imports/wifi/qwifinetwork.cpp +++ b/src/imports/wifi/qwifinetwork.cpp @@ -45,7 +45,7 @@ /*! \qmlproperty int WifiNetwork::signalStrength - This property holds the current strength of a WiFi signal. New readings are + This property holds the current strength of a WiFi signal, measured in dBm. New readings are taken every 5 seconds. \sa signalStrengthChanged @@ -81,19 +81,10 @@ This signal is emitted whenever signal strength has changed comparing the the previous reading, the new signal's strength is \a strength. - \code - function handleStrengthChanged(currentStrength) { - if (currentStrength < UNTOLERABLE_SPEED) - print("network speed has dropped under " + UNTOLERABLE_SPEED) - } - - Component.onCompleted: { - network.onSignalStrengthChanged.connect(handleStrengthChanged) - } - \endcode */ -QWifiNetwork::QWifiNetwork() +QWifiNetwork::QWifiNetwork() : + m_outOfRange(false) { } @@ -104,3 +95,10 @@ void QWifiNetwork::setSignalStrength(int strength) m_signalStrength = strength; emit signalStrengthChanged(m_signalStrength); } + +void QWifiNetwork::setOutOfRange(bool outOfRange) +{ + if (m_outOfRange == outOfRange) + return; + m_outOfRange = outOfRange; +} -- cgit v1.2.3