From 9767def438c4265319c3eef99e0531ee5164054e Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 17 Mar 2014 10:52:24 +0100 Subject: Rename misleading class name The API is: ListView { model: wifiManager.networks } currently if user calls print(wifiManager.networks) it will print: QWifiNetworkList The docs of ListView states that model property expects a subclass of QAbstractListModel. QWifiNetworkList sounds like a subclass of QList which is misleading. This patch renames the class to QWifiNetworkListModel. This does not change the public API (doesn't brake compatibility in any way), just improves the documentation of library. Task-number: QTEE-445 Change-Id: I71f07cb22617f3a7f41a0403d1c63c4357310325 Reviewed-by: Andy Nichols --- src/imports/wifi/pluginmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports/wifi/pluginmain.cpp') diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp index 3c560f9..97f16f3 100644 --- a/src/imports/wifi/pluginmain.cpp +++ b/src/imports/wifi/pluginmain.cpp @@ -68,7 +68,7 @@ public: Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.wifi")); qmlRegisterType(uri, 0, 1, "WifiManager"); - qmlRegisterType(); + qmlRegisterType(); qmlRegisterSingletonType(uri, 0, 1, "Interface", global_object_wifi); } }; -- cgit v1.2.3 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/pluginmain.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/imports/wifi/pluginmain.cpp') diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp index 97f16f3..6b8c0c3 100644 --- a/src/imports/wifi/pluginmain.cpp +++ b/src/imports/wifi/pluginmain.cpp @@ -25,6 +25,35 @@ #include +/*! + \qmltype Interface + \inqmlmodule Qt.labs.wifi + \brief The Interface element provides the module API. + + This element cannot be directly created. It can only be accessed via a namespace import. + + \code + import Qt.labs.wifi 0.1 + import Qt.labs.wifi 0.1 as Wifi + + Component.onCompleted: { + if (Wifi.Interface.wifiSupported()) { + var component = Qt.createComponent("WifiMenu.qml") + } else { + print("WiFi functionality not available on this device.") + } + } + + \endcode +*/ + +/*! + \qmlmethod bool Interface::wifiSupported() + + Returns true if the device is WiFi capable (provides a WiFi driver), otherwise returns false. +*/ + + class QWifiGlobal : public QObject { Q_OBJECT -- 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/pluginmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports/wifi/pluginmain.cpp') diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp index 6b8c0c3..fdf07e9 100644 --- a/src/imports/wifi/pluginmain.cpp +++ b/src/imports/wifi/pluginmain.cpp @@ -28,6 +28,7 @@ /*! \qmltype Interface \inqmlmodule Qt.labs.wifi + \ingroup wifi-qmltypes \brief The Interface element provides the module API. This element cannot be directly created. It can only be accessed via a namespace import. @@ -43,7 +44,6 @@ print("WiFi functionality not available on this device.") } } - \endcode */ -- cgit v1.2.3