diff options
author | Kalle Viironen <kalle.viironen@digia.com> | 2014-04-15 15:16:02 +0300 |
---|---|---|
committer | Kalle Viironen <kalle.viironen@digia.com> | 2014-04-15 15:16:16 +0300 |
commit | 9627172876cd2a387d44b5a9a6ce0a3867ebc730 (patch) | |
tree | ea7b4382c6390ece7e9588e7e71ad7357b13b338 /src/imports/wifi/pluginmain.cpp | |
parent | 436af494659d416cfbd531b8d3ba9fc49e2fa710 (diff) | |
parent | f9da7d90608cb4ce511770f5da8ef666e8a3e1b0 (diff) |
Merge branch 'stable' into releaseQtEE_v2.1.0
* stable:
Doc: Add ChangeLog for Qt Enterprise Embedded 2.1.0
Doc: Disable code highlighting for command-line instructions
doc: update version number to 2.1.0
[Wifi] Add new enums and make some API changes
Doc: Add documentation on custom build & deploy steps
Doc: Create QML Type reference page
Doc: Add information about licenses in embedded Linux images
Doc: Improve instructions for deploying existing projects
Doc: Separate Building Your Own Linux Image into its own page
doc: use same directory for yocto and qt
doc: config.<MACHINE> needed only once
doc: guide for imx53 and how to setup QtCreator
Doc: Be more precise on screen content for Nexus7
Add documentation to QtWifi library
Doc: Add note for users to not use root for installation
doc: describe how to use network connection for adb
Rename misleading class name
Remove unnecessary roles from QWifiNetworkList
Document C++11 usage
doc: how to use rebuilt yocto images and BYOS
Change-Id: If51af9f476d05e7d147d93670d36ca1b99e03d8c
Diffstat (limited to 'src/imports/wifi/pluginmain.cpp')
-rw-r--r-- | src/imports/wifi/pluginmain.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp index 3c560f9..fdf07e9 100644 --- a/src/imports/wifi/pluginmain.cpp +++ b/src/imports/wifi/pluginmain.cpp @@ -25,6 +25,35 @@ #include <hardware_legacy/wifi.h> +/*! + \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. + + \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 @@ -68,7 +97,7 @@ public: Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.wifi")); qmlRegisterType<QWifiManager>(uri, 0, 1, "WifiManager"); - qmlRegisterType<QWifiNetworkList>(); + qmlRegisterType<QWifiNetworkListModel>(); qmlRegisterSingletonType<QWifiGlobal>(uri, 0, 1, "Interface", global_object_wifi); } }; |