summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/doc/config/qtdeviceutilities-project.qdocconf23
-rw-r--r--src/doc/src/qtdeviceutilities.qdoc29
-rw-r--r--src/imports/bluetoothsettings/plugin.cpp72
-rw-r--r--src/imports/displaysettings/plugin.cpp52
-rw-r--r--src/imports/localdevice/plugin.cpp29
-rw-r--r--src/imports/localesettings/plugin.cpp113
-rw-r--r--src/imports/networksettings/plugin.cpp107
-rw-r--r--src/imports/timedatesettings/plugin.cpp103
-rw-r--r--src/networksettings/qnetworksettings.qdoc271
-rw-r--r--src/networksettings/qnetworksettingsinterface.cpp70
-rw-r--r--src/networksettings/qnetworksettingsservice.cpp181
-rw-r--r--src/networksettings/qnetworksettingsservicemodel.cpp19
-rw-r--r--src/networksettings/wpasupplicant/qwifidevice.cpp1
-rw-r--r--src/settingsui/settingsuiplugin/settingsuiplugin_plugin.cpp43
14 files changed, 1075 insertions, 38 deletions
diff --git a/src/doc/config/qtdeviceutilities-project.qdocconf b/src/doc/config/qtdeviceutilities-project.qdocconf
index 9aecc29..3b8b06c 100644
--- a/src/doc/config/qtdeviceutilities-project.qdocconf
+++ b/src/doc/config/qtdeviceutilities-project.qdocconf
@@ -3,11 +3,17 @@ description = Qt Device Utilities
version = 5.7.1
sourcedirs += ../src \
- ../../imports/wifi \
- ../../imports/utils \
- ../../wifi
-
-headerdirs += ../../wifi
+ ../../imports/localesettings \
+ ../../imports/bluetoothsettings \
+ ../../imports/displaysettings \
+ ../../imports/localdevice \
+ ../../imports/localesettings \
+ ../../imports/timedatesettings \
+ ../../imports/networksettings \
+ ../../settingsui/settingsuiplugin \
+ ../../networksettings
+
+headerdirs += ../../networksettings
exampledirs += ../../../examples
@@ -25,12 +31,12 @@ qhp.projects = QtDeviceUtilities
qhp.QtDeviceUtilities.file = qtdeviceutilities.qhp
qhp.QtDeviceUtilities.namespace = io.qt.qtdeviceutilities.571
qhp.QtDeviceUtilities.virtualFolder = qtdeviceutilities
-qhp.QtDeviceUtilities.indexTitle = Qt for Device Creation: Add-On Modules
+qhp.QtDeviceUtilities.indexTitle = Qt Device Utilities
qhp.QtDeviceUtilities.indexRoot =
qhp.QtDeviceUtilities.subprojects = modules
qhp.QtDeviceUtilities.subprojects.modules.title = Modules
-qhp.QtDeviceUtilities.subprojects.modules.indexTitle = Qt for Device Creation: Add-On Modules
+qhp.QtDeviceUtilities.subprojects.modules.indexTitle = Qt Device Utilities
qhp.QtDeviceUtilities.subprojects.modules.selectors = qmlmodule module
qhp.QtDeviceUtilities.subprojects.modules.sortPages = true
@@ -42,6 +48,7 @@ macro.B2QL = "\\e {Boot to Qt for embedded Linux}"
# Keep Device Creation as the landing page
navigation.landingpage = "Qt for Device Creation"
-navigation.qmltypespage = "Qt for Device Creation: Add-On Modules"
+navigation.qmltypespage = "Qt Device Utilities"
Cpp.ignoredirectives += Q_DECLARE_LOGGING_CATEGORY
+Cpp.ignoretokens += Q_DEL_EXPORT
diff --git a/src/doc/src/qtdeviceutilities.qdoc b/src/doc/src/qtdeviceutilities.qdoc
index a569540..0f2cb7c 100644
--- a/src/doc/src/qtdeviceutilities.qdoc
+++ b/src/doc/src/qtdeviceutilities.qdoc
@@ -17,25 +17,36 @@
****************************************************************************/
/*!
\page qtee-module-reference.html
- \title Qt for Device Creation: Add-On Modules
+ \title Qt Device Utilities
The \B2Q stack in \SDK includes a number of additional modules that are
useful for embedded applications.
- \annotatedlist qtee-modules
+ \section1 Modules
- \section1 B2Qt Utils Module
+ \annotatedlist qtee-qmlmodules
- \annotatedlist utils-qmltypes
+ \section1 QML Types
- \section1 B2Qt Wifi Module
+ \section2 Bluetooth Settings
+ \generatelist qmltypesbymodule QtDeviceUtilities.BluetoothSettings
- \section2 QML Types
+ \section2 Display Settings
+ \generatelist qmltypesbymodule QtDeviceUtilities.DisplaySettings
- \annotatedlist wifi-qmltypes
+ \section2 Local Device Settings
+ \generatelist qmltypesbymodule QtDeviceUtilities.LocalDeviceSettings
- \section2 C++ Classes
+ \section2 Locale Settings
+ \generatelist qmltypesbymodule QtDeviceUtilities.LocaleSettings
- \annotatedlist wifi-cppclasses
+ \section2 Network Settings
+ \generatelist qmltypesbymodule QtDeviceUtilities.NetworkSettings
+
+ \section2 Time and Date Settings
+ \generatelist qmltypesbymodule QtDeviceUtilities.TimeDateSettings
+
+ \section2 Settings UI
+ \generatelist qmltypesbymodule QtDeviceUtilities.SettingsUI
*/
diff --git a/src/imports/bluetoothsettings/plugin.cpp b/src/imports/bluetoothsettings/plugin.cpp
index abd6ec3..cd2cfcf 100644
--- a/src/imports/bluetoothsettings/plugin.cpp
+++ b/src/imports/bluetoothsettings/plugin.cpp
@@ -35,6 +35,78 @@
#include "bluetoothdevice.h"
#include "discoverymodel.h"
+/*!
+ \qmlmodule QtDeviceUtilities.BluetoothSettings 1.0
+ \title Qt Device Utilities: Bluetooth Settings
+ \ingroup qtee-qmlmodules
+ \brief Provides a singleton QML type for controlling bluetooth settings.
+
+ Provides a singleton QML type for controlling bluetooth settings in an
+ embedded device.
+
+ Import the module as follows:
+
+ \badcode
+ import QtDeviceUtilities.BluetoothSettings 1.0
+ \endcode
+
+ This will give you access to the singleton QML type BtDevice.
+
+ \note Some functions may not be available on all of the platforms.
+
+ \section1 QML Types
+*/
+
+/*!
+ \qmltype BtDevice
+ \inqmlmodule QtDeviceUtilities.BluetoothSettings
+ \brief A singleton QML type for controlling bluetooth settings.
+
+ There is no need to create an instance of this object. To use it,
+ simply import the \c {QtDeviceUtilities.BluetoothSettings} module.
+*/
+
+/*!
+ \qmlproperty bool BtDevice::scanning
+
+ Controls whether the Bluetooth device is scanning for remote devices.
+*/
+
+/*!
+ \qmlproperty bool BtDevice::powered
+
+ Powers the Bluetooth device on or off.
+*/
+
+/*!
+ \qmlproperty object BtDevice::deviceModel
+ \readonly
+
+ Holds the device model.
+*/
+
+/*!
+ \qmlmethod void BtDevice::requestPairing(string address)
+
+ Starts the process of pairing to a remove device specified by \a address,
+ and connects to it if the pairing was successful.
+*/
+
+/*!
+ \qmlmethod void BtDevice::requestConnect(string address)
+
+ Connects to a remove device specified by \a address.
+
+ \sa requestDisconnect()
+*/
+
+/*!
+ \qmlmethod void BtDevice::requestDisconnect(string address)
+
+ Disconnects from the remove device specified by \a address.
+
+ \sa requestConnect()
+*/
template <typename T>
QObject *instance(QQmlEngine *engine, QJSEngine *) {
T *t = new T(engine);
diff --git a/src/imports/displaysettings/plugin.cpp b/src/imports/displaysettings/plugin.cpp
index a57b340..366ab0b 100644
--- a/src/imports/displaysettings/plugin.cpp
+++ b/src/imports/displaysettings/plugin.cpp
@@ -32,6 +32,58 @@
#include <qcoreapplication.h>
#include "displaysettings.h"
+/*!
+ \qmlmodule QtDeviceUtilities.DisplaySettings 1.0
+ \title Qt Device Utilities: Display Settings
+ \ingroup qtee-qmlmodules
+ \brief Provides a singleton QML type for controlling display settings.
+
+ Provides a singleton QML type for controlling display settings in an
+ embedded device.
+
+ Import the module as follows:
+
+ \badcode
+ import QtDeviceUtilities.DisplaySettings 1.0
+ \endcode
+
+ This will give you access to the singleton QML type DisplaySettings.
+
+ \note Some functions may not be available on all of the platforms.
+
+ \section1 QML Types
+*/
+
+/*!
+ \qmltype DisplaySettings
+ \inqmlmodule QtDeviceUtilities.DisplaySettings
+ \brief A singleton QML type for controlling display settings.
+
+ There is no need to create an instance of this object. To use it,
+ simply import the \c {QtDeviceUtilities.DisplaySettings} module.
+*/
+
+/*!
+ \qmlproperty int DisplaySettings::displayBrightness
+
+ Holds the display brightness (intensity of the backlight). A valid
+ range for the property is from 0 to 255, where 255 is the maximum
+ brightness and 0 is the minimum (typically, the backlight turned off).
+*/
+
+/*!
+ \qmlproperty int DisplaySettings::physicalScreenSizeInch
+
+ Holds the physical (diagonal) screen size in inches.
+*/
+
+/*!
+ \qmlproperty bool DisplaySettings::physicalScreenSizeOverride
+
+ Holds whether the value in physicalScreenSizeInch should be
+ used or not.
+*/
+
template <typename T>
QObject *instance(QQmlEngine *engine, QJSEngine *) {
T *t = new T(engine);
diff --git a/src/imports/localdevice/plugin.cpp b/src/imports/localdevice/plugin.cpp
index 4ede971..ca9fe68 100644
--- a/src/imports/localdevice/plugin.cpp
+++ b/src/imports/localdevice/plugin.cpp
@@ -31,16 +31,9 @@
/*!
\qmlmodule QtDeviceUtilities.LocalDeviceSettings 1.0
- \title Qt Local Device QML Module
+ \title Qt Device Utilities: Local Device Settings
\ingroup qtee-qmlmodules
- \brief A collection of the local device related utility functions, accessible from QML.
-*/
-
-/*!
- \page b2qt-addon-utils.html
- \title Qt Local Device Module
- \ingroup qtee-modules
- \brief A collection of the local device realted utility functions, accessible from QML.
+ \brief A collection of local device related utility functions.
Provides utility functions for controlling an embedded
device, such as device shutdown/reboot.
@@ -53,33 +46,27 @@
This will give you access to the singleton QML type LocalDevice.
- \note Some functions are currently only implemented for one of
- the platforms.
+ \note Some functions may not be available on all of the platforms.
\section1 QML Types
-
- \annotatedlist utils-qmltypes
*/
/*!
\qmltype LocalDevice
\inqmlmodule QtDeviceUtilities.LocalDeviceSettings
- \ingroup utils-qmltypes
\brief Singleton QML type providing access to utility functions.
LocalDevice QML type is the interface to various utility
functions.
There is no need to create an instance of this object. To use it,
- simply import the \c {LocalDevice} module:
+ simply import the \c QtDeviceUtilities.LocalDeviceSettings module:
- \qml
- QtDeviceUtilities.LocalDeviceSettings
-
- \endqml
+ \badcode
+ import QtDeviceUtilities.LocalDeviceSettings 1.0
+ \endcode
- \note Some functions are currently only implemented for one of
- the platforms.
+ \note Some functions may not be available on all of the platforms.
*/
/*!
diff --git a/src/imports/localesettings/plugin.cpp b/src/imports/localesettings/plugin.cpp
index 737ff0c..60c19c1 100644
--- a/src/imports/localesettings/plugin.cpp
+++ b/src/imports/localesettings/plugin.cpp
@@ -35,6 +35,119 @@
#include <systemlocale.h>
#include "localefiltermodel.h"
+/*!
+ \qmlmodule QtDeviceUtilities.LocaleSettings 1.0
+
+ \title Qt Device Utilities: Locale Settings
+ \ingroup qtee-qmlmodules
+ \brief Provides singleton QML types for controlling locale settings.
+
+ Provides singleton QML types for controlling locale settings in an
+ embedded device.
+
+ Import the module as follows:
+
+ \badcode
+ import QtDeviceUtilities.LocaleSettings 1.0
+ \endcode
+
+ \note Some functions may not be available on all of the platforms.
+
+ \section1 QML Types
+*/
+
+/*!
+ \qmltype LocaleManager
+ \inqmlmodule QtDeviceUtilities.LocaleSettings
+ \brief A singleton QML type for managing the system locale.
+
+ There is no need to create an instance of this object. To use it,
+ simply import the \c {QtDeviceUtilities.LocaleSettings} module.
+
+ The \l locale property holds the current system locale string.
+ Pass it to \l {QtQml::Qt::locale()}{Qt.locale}() to
+ retrieve locale-specific properties.
+
+ For example:
+
+ \qml
+ import QtQuick 2.6
+ import QtDeviceUtilities.LocaleSettings 1.0
+
+ Item {
+ property var currentLocale: Qt.locale(LocaleManager.locale)
+ Text { text: currentLocale.nativeLanguageName }
+ }
+ \endqml
+
+ \sa LocaleFilter, {QtQml::}{Locale}
+*/
+
+/*!
+ \qmlproperty string LocaleManager::locale
+
+ Holds the system locale string in the format \e language_country,
+ for example, "en_US".
+
+ \sa QLocale::name()
+*/
+
+/*!
+ \qmltype LocaleFilter
+ \inqmlmodule QtDeviceUtilities.LocaleSettings
+ \brief Provides a filtered model for the available locales.
+
+ There is no need to create an instance of this object. To use it,
+ simply import the \c {QtDeviceUtilities.LocaleSettings} module.
+
+ The LocaleFilter QML type can be used as the model in a view
+ that lists the available locales.
+
+ For example:
+
+ \code
+ ListView {
+ model: LocaleFilter
+ delegate: Text { text: language + " | " + country }
+ }
+ \endcode
+
+ Available \e roles in the locale model:
+
+ \table
+ \header \li Role \li Description
+
+ \row \li \c code \li Locale code string in the format \e language_country.
+ See QLocale::name() for details.
+
+ \row \li \c country \li The name of the country. If available, the native
+ country name is used.
+
+ \row \li \c language \li The name of the language. If available, the
+ native language name is used.
+ \endtable
+
+ \sa LocaleManager
+*/
+
+/*!
+ \qmlproperty string LocaleFilter::filter
+
+ Holds a string that filters out the locales in the model.
+ The filtering process is a case-insensitive match for
+ whether the region (country) name contains the \e filter
+ substring; it can be taken from user input.
+*/
+
+/*!
+ \qmlmethod object LocaleFilter::itemFromRow(int index)
+
+ Returns the item at \a index in the model. This item can
+ assigned to \l [QML] {LocaleManager::locale}
+ {LocaleManager.locale}, when the user selects a locale
+ from a list.
+*/
+
template <typename T>
QObject *instance(QQmlEngine *engine, QJSEngine *) {
T *t = new T(engine);
diff --git a/src/imports/networksettings/plugin.cpp b/src/imports/networksettings/plugin.cpp
index 5427082..245e952 100644
--- a/src/imports/networksettings/plugin.cpp
+++ b/src/imports/networksettings/plugin.cpp
@@ -36,6 +36,113 @@
#include <QQmlEngine>
#include <QQmlContext>
+/*!
+ \qmlmodule QtDeviceUtilities.NetworkSettings 1.0
+
+ \title Qt Device Utilities: Network Settings
+ \ingroup qtee-qmlmodules
+ \brief Provides singleton QML types for controlling network settings.
+
+ Provides singleton QML types for controlling network settings in an
+ embedded device.
+
+ Import the module as follows:
+
+ \badcode
+ import QtDeviceUtilities.NetworkSettings 1.0
+ \endcode
+
+ \note Some functions may not be available on all of the platforms.
+
+ \section1 QML Types
+*/
+
+/*!
+ \qmltype NetworkSettingsManager
+ \inqmlmodule QtDeviceUtilities.NetworkSettings
+ \brief A singleton QML type for managing network settings.
+
+ There is no need to create an instance of this object. To use it,
+ simply import the \c {QtDeviceUtilities.NetworkSettings} module.
+*/
+
+/*!
+ \qmlproperty model NetworkSettingsManager::services
+ \readonly
+
+ Holds the service model.
+
+ The services list in the model can be controlled with the
+ \c type property, and NetworkService items can be retrieved
+ with the \c {itemFromRow(int index)} method. For example, to
+ select the first available wired network service:
+
+ \code
+ property var service: null
+ ...
+ NetworkSettingsManager.services.type = NetworkSettingsType.Wired;
+ service = NetworkSettingsManager.services.itemFromRow(0);
+ \endcode
+
+ Available service types:
+
+ \value NetworkSettingsType.Wired Wired network
+ \value NetworkSettingsType.Wifi Wifi network
+ \value NetworkSettingsType.Bluetooth Bluetooth network
+ \value NetworkSettingsType.Unknown Unknown network type
+
+ \sa NetworkService
+*/
+
+/*!
+ \qmlproperty model NetworkSettingsManager::interfaces
+ \readonly
+
+ Holds the interface model. A delegate in a view that uses
+ the \e interfaces model can access the NetworkInterface
+ item with the \e dataModel role.
+
+ \sa NetworkInterface
+*/
+
+/*!
+ \qmlmethod NetworkService NetworkSettingsManager::getService(string name, int type)
+
+ Returns the service with name \a name and type \a type.
+
+ \sa services
+*/
+
+/*!
+ \qmlmethod NetworkSettingsManager::userAgent.setUserCredentials(string username, string passphrase)
+
+ Sets the user credentials \a username and \a passphrase for connecting to a Wifi network.
+
+ This method needs to be called in response to receiving a showUserCredentialsInput() signal.
+
+ \sa userAgent.showUserCredentialsInput()
+*/
+
+/*!
+ \qmlsignal NetworkSettingsManager::userAgent.showUserCredentialsInput()
+
+ This signal is emitted when user credentials are required for connecting to a Wifi network.
+
+ \sa userAgent.setUserCredentials()
+*/
+
+/*!
+ \qmlmethod NetworkSettingsManager::userAgent.cancelInput()
+
+ Cancels the user credentials input request.
+*/
+
+/*!
+ \qmlsignal NetworkSettingsManager::userAgent.error()
+
+ This signal is emitted when the connection failed due to invalid user credentials.
+*/
+
template <typename T>
QObject *instance(QQmlEngine *engine, QJSEngine *) {
T *t = new T(engine);
diff --git a/src/imports/timedatesettings/plugin.cpp b/src/imports/timedatesettings/plugin.cpp
index c725a10..9ebe945 100644
--- a/src/imports/timedatesettings/plugin.cpp
+++ b/src/imports/timedatesettings/plugin.cpp
@@ -34,7 +34,110 @@
#include <systemtime.h>
#include "timezonefiltermodel.h"
+/*!
+ \qmlmodule QtDeviceUtilities.TimeDateSettings 1.0
+ \title Qt Device Utilities: Time and Date Settings
+ \ingroup qtee-qmlmodules
+ \brief Provides singleton QML types for controlling date and time
+ settings.
+
+ Provides singleton QML types for controlling date and time settings
+ in an embedded device.
+
+ Import the module as follows:
+
+ \badcode
+ import QtDeviceUtilities.TimeDateSettings 1.0
+ \endcode
+
+ \note Some functions may not be available on all of the platforms.
+
+ \section1 QML Types
+*/
+
+/*!
+ \qmltype TimeManager
+ \inqmlmodule QtDeviceUtilities.TimeDateSettings
+ \brief A singleton QML type for managing the system date and time.
+
+ There is no need to create an instance of this object. To use it,
+ simply import the \c {QtDeviceUtilities.TimeDateSettings} module.
+*/
+
+/*!
+ \qmlproperty string TimeManager::timeZone
+
+ Holds the current time zone string.
+*/
+
+/*!
+ \qmlproperty bool TimeManager::ntp
+
+ Holds whether the system time is synchronized using NTP (Network
+ Time Protocol).
+*/
+
+/*!
+ \qmlproperty Date TimeManager::time
+
+ Holds the current date and time.
+*/
+
+/*!
+ \qmltype TimezonesFilter
+ \inqmlmodule QtDeviceUtilities.TimeDateSettings
+ \brief Provides a filtered model for the available time zones.
+
+ There is no need to create an instance of this object. To use it,
+ simply import the \c {QtDeviceUtilities.TimeDateSettings} module.
+
+ The TimezonesFilter QML type can be used as the model in a view
+ that lists the available time zones.
+
+ For example:
+
+ \code
+ ListView {
+ model: TimezonesFilter
+ delegate: Text { text: name + " | " + country }
+ }
+ \endcode
+
+ Available \e roles in the time zone model:
+
+ \table
+ \header \li Role \li Description
+
+ \row \li \c name
+ \li Display name of the time zone. See QTimeZone::displayName() for
+ details.
+
+ \row \li \c country
+ \li Name of the country for the zone time.
+
+ \row \li \c id
+ \li IANA time zone ID.
+ \endtable
+*/
+
+/*!
+ \qmlproperty string TimezonesFilter::filter
+
+ Holds a string that filters out the time zones in the model.
+ The filtering process is a case-insensitive match for
+ whether the time zone's name or country name contain the
+ \e filter substring; it can be taken from user input.
+*/
+
+/*!
+ \qmlmethod object TimezonesFilter::itemFromRow(int index)
+
+ Returns the item at \a index in the model. This item can
+ be assigned to \l [QML] {TimeManager::timeZone}
+ {TimeManager.timeZone}, when the user selects a time zone
+ from a list.
+*/
template <typename T>
QObject *instance(QQmlEngine *engine, QJSEngine *) {
T *t = new T(engine);
diff --git a/src/networksettings/qnetworksettings.qdoc b/src/networksettings/qnetworksettings.qdoc
new file mode 100644
index 0000000..008030d
--- /dev/null
+++ b/src/networksettings/qnetworksettings.qdoc
@@ -0,0 +1,271 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Device Utilities module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+/*!
+ \qmltype NetworkSettingsIPv4
+ \inqmlmodule QtDeviceUtilities.NetworkSettings
+ \brief Encapsulates IPv4 network configuration.
+
+ The NetworkSettingsIPv4 type cannot be instantiated directly.
+
+ \sa {NetworkService::ipv4}{NetworkService.ipv4}
+*/
+
+/*!
+ \qmlproperty string NetworkSettingsIPv4::address
+ \brief Holds the IPv4 address.
+*/
+
+/*!
+ \qmlproperty string NetworkSettingsIPv4::gateway
+ \brief Holds the IPv4 gateway address
+*/
+
+/*!
+ \qmlproperty enumeration NetworkSettingsIPv4::method
+ \brief Holds the method of IPv4 configuration.
+
+ Possible values:
+
+ \value NetworkSettingsIPv4.Dhcp
+ Use DHCP protocol for IPv4 configuration
+
+ \value NetworkSettingsIPv4.Manual
+ Use manual settings
+
+ \value NetworkSettingsIPv4.Off
+ No configuration done
+*/
+
+/*!
+ \qmlproperty string NetworkSettingsIPv4::mask
+ \brief Holds the IPv4 network mask.
+*/
+
+/*!
+ \qmltype NetworkSettingsIPv6
+ \inqmlmodule QtDeviceUtilities.NetworkSettings
+ \brief Encapsulates IPv6 network configuration.
+
+ The NetworkSettingsIPv6 type cannot be instantiated directly.
+
+ \sa {NetworkService::ipv6}{NetworkService.ipv6}
+*/
+
+/*!
+ \qmlproperty string NetworkSettingsIPv6::address
+ \brief Holds the IPv6 address.
+*/
+
+/*!
+ \qmlproperty string NetworkSettingsIPv6::gateway
+ \brief Holds the IPv6 gateway address.
+*/
+
+/*!
+ \qmlproperty enumeration NetworkSettingsIPv6::method
+ \brief Holds the method of IPv6 configuration.
+
+ Possible values:
+
+ \value NetworkSettingsIPv6.Auto
+ Use automatic configuration
+
+ \value NetworkSettingsIPv6.Manual
+ Use manual configuration
+
+ \value NetworkSettingsIPv6.Off
+ No configuration done
+*/
+
+/*!
+ \qmlproperty enumeration NetworkSettingsIPv6::privacy
+ \brief Holds the method of applying privacy extensions for IPv6.
+
+ Possible values:
+
+ \value NetworkSettingsIPv6.Disabled
+ Disable privacy extensions in IPv6
+
+ \value NetworkSettingsIPv6.Enabled
+ Enable \l {https://tools.ietf.org/html/rfc4941}
+ {Privacy Extensions for Stateless Address Autoconfiguration in IPv6}
+
+ \value NetworkSettingsIPv6.Preferred
+ Enable privacy extensions and prefer the use of temporary addresses, even
+ when a public address is available
+*/
+
+/*!
+ \qmlproperty int NetworkSettingsIPv6::prefixLength
+ \brief Holds the IPv6 network prefix length in bits.
+*/
+
+/*!
+ \qmltype NetworkSettingsProxy
+ \inqmlmodule QtDeviceUtilities.NetworkSettings
+ \brief Encapsulates network proxy configuration.
+
+ The NetworkSettingsProxy type cannot be instantiated directly.
+
+ \sa {NetworkService::proxy}{NetworkService.proxy}
+*/
+
+/*!
+ \qmlproperty url NetworkSettingsProxy::url
+ \brief Holds the proxy URL.
+
+ For manual proxy configuration, the \e url holds the
+ proxy server address. For automatic configuration, it holds
+ the proxy auto-config URL.
+
+ \sa method
+*/
+
+/*!
+ \qmlproperty enumeration NetworkSettingsProxy::method
+ \brief Holds the network proxy configuration method.
+
+ Possible values:
+
+ \value NetworkSettingsProxy.Direct
+ Direct network connection, no proxy in use
+
+ \value NetworkSettingsProxy.Auto
+ Automatic proxy configuration
+
+ \value NetworkSettingsProxy.Manual
+ Manual proxy configuration
+
+ \sa url
+*/
+
+/*!
+ \qmlproperty object NetworkSettingsProxy::excludes
+ \readonly
+ \brief The model containing the proxy exclusion list.
+
+ The addresses in the proxy exclusion list are accessed directly,
+ instead of forwarding the requests to a proxy.
+
+ The \e excludes property can be used as a model for a view
+ that lists the proxy exclusion addresses.
+
+ \sa excludes.count, excludes.append(), excludes.remove(), excludes.resetChanges()
+*/
+
+/*!
+ \qmlproperty int NetworkSettingsProxy::excludes.count
+ \readonly
+ \brief Holds the number of addresses in the \l excludes model.
+*/
+
+/*!
+ \qmlmethod void NetworkSettingsProxy::excludes.append(string address)
+ \brief Adds \a address into the \l excludes model.
+*/
+
+/*!
+ \qmlmethod void NetworkSettingsProxy::excludes.remove(int index)
+ \brief Removes the entry at index \a index from the \l excludes model.
+*/
+
+/*!
+ \qmlmethod void NetworkSettingsProxy::excludes.resetChanges()
+ \brief Clears unsaved changes from the \l excludes model.
+*/
+
+/*!
+ \qmlproperty object NetworkSettingsProxy::servers
+ \readonly
+ \brief The model containing the proxy servers.
+
+ The \e servers property can be used as a model for a view
+ that lists the proxy servers.
+
+ \sa servers.count, servers.append(), servers.remove(), servers.resetChanges()
+*/
+
+/*!
+ \qmlproperty int NetworkSettingsProxy::servers.count
+ \readonly
+ \brief Holds the number of addresses in the \l servers model.
+*/
+
+/*!
+ \qmlmethod void NetworkSettingsProxy::servers.append(string address)
+ \brief Adds \a address into the \l servers model.
+*/
+
+/*!
+ \qmlmethod void NetworkSettingsProxy::servers.remove(int index)
+ \brief Removes the entry at index \a index from the \l servers model.
+*/
+
+/*!
+ \qmlmethod void NetworkSettingsProxy::servers.resetChanges()
+ \brief Clears unsaved changes from the \l servers model.
+*/
+
+/*!
+ \qmltype NetworkSettingsWireless
+ \inqmlmodule QtDeviceUtilities.NetworkSettings
+ \brief Encapsulates configuration for a Wifi network service.
+
+ The NetworkSettingsWireless type cannot be instantiated directly.
+
+ \sa {NetworkService::wirelessConfig}{NetworkService.wirelessConfig}
+*/
+
+/*!
+ \qmlproperty int NetworkSettingsWireless::signalStrength
+ \brief Holds the Wifi signal strength, in the range of 0 to 100.
+*/
+
+/*!
+ \qmlproperty bool NetworkSettingsWireless::hidden
+ \readonly
+ \brief Holds whether the wireless SSID is hidden.
+*/
+
+/*!
+ \qmlproperty bool NetworkSettingsWireless::isOutOfRange
+ \brief Holds whether the Wifi access point is out of range.
+*/
+
+/*!
+ \qmlmethod bool NetworkSettingsWireless::supportsSecurity(int flags)
+ \brief Returns whether the Wifi supports the wireless security
+ protocol(s) specified in \a flags.
+
+ Possible values:
+
+ \value 2 Wired Equivalent Privacy (WEP)
+ \value 4 Wi-Fi Protected Access (WPA)
+ \value 8 Wi-Fi Protected Access, version 2 (WPA2)
+*/
diff --git a/src/networksettings/qnetworksettingsinterface.cpp b/src/networksettings/qnetworksettingsinterface.cpp
index 91a8fa5..fcde01a 100644
--- a/src/networksettings/qnetworksettingsinterface.cpp
+++ b/src/networksettings/qnetworksettingsinterface.cpp
@@ -30,6 +30,20 @@
#include "qnetworksettingsinterface_p.h"
#include "qnetworksettings.h"
+/*!
+ \qmltype NetworkInterface
+ \inqmlmodule QtDeviceUtilities.NetworkSettings
+ \brief Represents a network interface.
+
+ The NetworkInterface QML type represents a network interface attached
+ to the host.
+
+ Instances of NetworkInterface cannot be created directly; instead, they can
+ be retrieved via NetworkSettingsManager.
+
+ \sa {NetworkSettingsManager::interfaces}{NetworkSettingsManager.interfaces}
+*/
+
QNetworkSettingsInterface::QNetworkSettingsInterface(QObject *parent) :
QObject(parent)
,d_ptr(new QNetworkSettingsInterfacePrivate(this))
@@ -37,24 +51,76 @@ QNetworkSettingsInterface::QNetworkSettingsInterface(QObject *parent) :
}
+/*!
+ \qmlproperty string NetworkInterface::name
+ \readonly
+ \brief Holds the name of the network interface.
+*/
QString QNetworkSettingsInterface::name() const
{
Q_D(const QNetworkSettingsInterface);
return d->m_name;
}
+/*!
+ \qmlproperty enumeration NetworkInterface::state
+ \readonly
+ \brief Holds the state of the network interface.
+
+ Possible values:
+
+ \value NetworkSettingsState.Idle
+ Idle
+
+ \value NetworkSettingsState.Failure
+ Failed to connect
+
+ \value NetworkSettingsState.Association
+ Authentication in progress
+
+ \value NetworkSettingsState.Configuration
+ Configuration in progress
+
+ \value NetworkSettingsState.Ready
+ Connected to a network
+
+ \value NetworkSettingsState.Disconnect
+ Disconnected from a network
+
+ \value NetworkSettingsState.Online
+ Online (acquired an IP address)
+
+ \value NetworkSettingsState.Undefined
+ Undefined state.
+*/
QNetworkSettingsState::States QNetworkSettingsInterface::state()
{
Q_D(QNetworkSettingsInterface);
return d->m_state.state();
}
+/*!
+ \qmlproperty enumeration NetworkInterface::type
+ \readonly
+ \brief Holds the type of the network interface.
+
+ Possible values:
+
+ \value NetworkSettingsType.Wired Wired network
+ \value NetworkSettingsType.Wifi Wifi network
+ \value NetworkSettingsType.Bluetooth Bluetooth network
+ \value NetworkSettingsType.Unknown Unknown network type
+*/
QNetworkSettingsType::Types QNetworkSettingsInterface::type()
{
Q_D(QNetworkSettingsInterface);
return d->m_type.type();
}
+/*!
+ \qmlproperty bool NetworkInterface::powered
+ \brief Holds whether the network interface is powered on of off.
+*/
bool QNetworkSettingsInterface::powered() const
{
Q_D(const QNetworkSettingsInterface);
@@ -67,6 +133,10 @@ void QNetworkSettingsInterface::setPowered(const bool powered)
d->setPowered(powered);
}
+/*!
+ \qmlmethod void NetworkInterface::scanServices()
+ \brief Initiates a scan for network interface services.
+*/
void QNetworkSettingsInterface::scanServices()
{
Q_D(QNetworkSettingsInterface);
diff --git a/src/networksettings/qnetworksettingsservice.cpp b/src/networksettings/qnetworksettingsservice.cpp
index 4634496..cbbfd10 100644
--- a/src/networksettings/qnetworksettingsservice.cpp
+++ b/src/networksettings/qnetworksettingsservice.cpp
@@ -29,6 +29,19 @@
#include "qnetworksettingsservice.h"
#include "qnetworksettingsservice_p.h"
+/*!
+ \qmltype NetworkService
+ \inqmlmodule QtDeviceUtilities.NetworkSettings
+ \brief Represents a network service.
+
+ The NetworkService QML type represents a network service.
+
+ Instances of NetworkService cannot be created directly; instead, they can
+ be retrieved via NetworkSettingsManager.
+
+ \sa {NetworkSettingsManager::services}{NetworkSettingsManager.services}
+*/
+
QNetworkSettingsService::QNetworkSettingsService(const QString& aServiceId, QObject* parent) :
QObject(parent)
,d_ptr(new QNetworkSettingsServicePrivate(aServiceId, this))
@@ -36,107 +49,275 @@ QNetworkSettingsService::QNetworkSettingsService(const QString& aServiceId, QObj
}
+/*!
+ \qmlproperty string NetworkService::id
+ \readonly
+ \brief Holds a unique ID of this service.
+*/
QString QNetworkSettingsService::id() const
{
Q_D(const QNetworkSettingsService);
return d->m_id;
}
+/*!
+ \qmlproperty string NetworkService::name
+ \readonly
+ \brief Holds the name of this service.
+*/
QString QNetworkSettingsService::name() const
{
Q_D(const QNetworkSettingsService);
return d->m_name;
}
+/*!
+ \qmlmethod void NetworkService::setAutoConnect(bool auto)
+*/
void QNetworkSettingsService::setAutoConnect(const bool autoconnect)
{
Q_UNUSED(autoconnect);
}
+/*!
+ \qmlproperty enumeration NetworkService::state
+ \readonly
+ \brief Holds the state of this service.
+
+ See \l [QML] {NetworkInterface::state}{NetworkInterface.state}
+ for possible states.
+*/
QNetworkSettingsState::States QNetworkSettingsService::state()
{
Q_D(QNetworkSettingsService);
return d->m_state.state();
}
+/*!
+ \qmlproperty enumeration NetworkService::type
+ \readonly
+ \brief Holds the type of this service.
+
+ See \l [QML] {NetworkInterface::type}{NetworkInterface.type}
+ for possible types.
+*/
QNetworkSettingsType::Types QNetworkSettingsService::type()
{
Q_D(QNetworkSettingsService);
return d->m_type.type();
}
+/*!
+ \qmlproperty NetworkSettingsIPv4 NetworkService::ipv4
+ \readonly
+ \brief Holds the IPv4 address for this service.
+*/
QNetworkSettingsIPv4* QNetworkSettingsService::ipv4()
{
Q_D(QNetworkSettingsService);
return &d->m_ipv4config;
}
+/*!
+ \qmlproperty NetworkSettingsIPv6 NetworkService::ipv6
+ \readonly
+ \brief Holds the IPv6 address for this service.
+*/
QNetworkSettingsIPv6* QNetworkSettingsService::ipv6()
{
Q_D(QNetworkSettingsService);
return &d->m_ipv6config;
}
+/*!
+ \qmlproperty NetworkSettingsProxy NetworkService::proxy
+ \readonly
+ \brief Holds the proxy settings for this service.
+*/
QNetworkSettingsProxy* QNetworkSettingsService::proxy()
{
Q_D(QNetworkSettingsService);
return &d->m_proxyConfig;
}
+/*!
+ \qmlproperty NetworkSettingsWireless NetworkService::wirelessConfig
+ \readonly
+ \brief Holds the wireless configuration for this service.
+*/
QNetworkSettingsWireless* QNetworkSettingsService::wirelessConfig()
{
Q_D(QNetworkSettingsService);
return &d->m_wifiConfig;
}
+/*!
+ \qmlproperty object NetworkService::domains
+ \readonly
+ \brief The model containing the domains associated with this service.
+
+ The \e domains property can be used as a model for a view
+ that lists the domain addresses associated with this service.
+
+ \sa domains.count, domains.append(), domains.remove(), domains.resetChanges()
+*/
+
+/*!
+ \qmlproperty int NetworkService::domains.count
+ \readonly
+ \brief Holds the number of domain addresses in the \l domains model.
+*/
+
+/*!
+ \qmlmethod void NetworkService::domains.append(string address)
+ \brief Adds \a address into the \l domains model.
+*/
+
+/*!
+ \qmlmethod void NetworkService::domains.remove(int index)
+ \brief Removes the entry at index \a index from the \l domains model.
+*/
+
+/*!
+ \qmlmethod void NetworkService::domains.resetChanges()
+ \brief Clears unsaved changes from the \l domains model.
+*/
+
QAbstractItemModel* QNetworkSettingsService::domains()
{
Q_D(QNetworkSettingsService);
return &d->m_domainsConfig;
}
+/*!
+ \qmlproperty object NetworkService::nameservers
+ \readonly
+ \brief The model containing the domain name servers associated with this
+ service.
+
+ The \e nameservers property can be used as a model for a view
+ that lists the domain name server (DNS) addresses associated with this
+ service.
+
+ \sa nameservers.count, nameservers.append(), nameservers.remove(), nameservers.resetChanges()
+*/
+
+/*!
+ \qmlproperty int NetworkService::nameservers.count
+ \readonly
+ \brief Holds the number of domain name server addresses in the
+ \l nameservers model.
+*/
+
+/*!
+ \qmlmethod void NetworkService::nameservers.append(string address)
+ \brief Adds \a address into the \l nameservers model.
+*/
+
+/*!
+ \qmlmethod void NetworkService::nameservers.remove(int index)
+ \brief Removes the entry at index \a index from the \l nameservers model.
+*/
+
+/*!
+ \qmlmethod void NetworkService::nameservers.resetChanges()
+ \brief Clears unsaved changes from the \l nameservers model.
+*/
+
QAbstractItemModel* QNetworkSettingsService::nameservers()
{
Q_D(QNetworkSettingsService);
return &d->m_nameserverConfig;
}
+/*!
+ \qmlmethod void NetworkService::setupIpv4Config()
+ \brief Sets up the IPv4 configuration.
+
+ Call this method after changing the IPv4 settings.
+
+ \sa ipv4
+*/
void QNetworkSettingsService::setupIpv4Config()
{
Q_D(QNetworkSettingsService);
d->setupIpv4Config();
}
+/*!
+ \qmlmethod void NetworkService::setupIpv6Config()
+ \brief Sets up the IPv6 configuration.
+
+ Call this method after changing the IPv6 settings.
+
+ \sa ipv6
+*/
void QNetworkSettingsService::setupIpv6Config()
{
Q_D(QNetworkSettingsService);
d->setupIpv6Config();
}
+/*!
+ \qmlmethod void NetworkService::setupNameserversConfig()
+ \brief Sets up the domain name server configuration.
+
+ Call this method after modifying the list of domain name servers.
+
+ \sa nameservers
+*/
void QNetworkSettingsService::setupNameserversConfig()
{
Q_D(QNetworkSettingsService);
d->setupNameserversConfig();
}
+/*!
+ \qmlmethod void NetworkService::setupDomainsConfig()
+ \brief Sets up the domains configuration.
+
+ Call this method after modifying the list of domain addresses.
+
+ \sa domains
+*/
void QNetworkSettingsService::setupDomainsConfig()
{
Q_D(QNetworkSettingsService);
d->setupDomainsConfig();
}
+/*!
+ \qmlmethod void NetworkService::setupNetworkSettingsProxy()
+ \brief Sets up the network proxy configuration.
+
+ Call this method after modifying the network proxy settings.
+
+ \sa proxy
+*/
void QNetworkSettingsService::setupNetworkSettingsProxy()
{
Q_D(QNetworkSettingsService);
d->setupQNetworkSettingsProxy();
}
+/*!
+ \qmlmethod void NetworkService::connectService()
+ \brief Initiates the process of connecting to this network service.
+
+ \sa disconnectService()
+*/
void QNetworkSettingsService::connectService()
{
Q_D(QNetworkSettingsService);
d->connectService();
}
+/*!
+ \qmlmethod void NetworkService::disconnectService()
+ \brief Disconnects this service.
+
+ \sa connectService()
+*/
void QNetworkSettingsService::disconnectService()
{
Q_D(QNetworkSettingsService);
diff --git a/src/networksettings/qnetworksettingsservicemodel.cpp b/src/networksettings/qnetworksettingsservicemodel.cpp
index 868cfa3..2755eda 100644
--- a/src/networksettings/qnetworksettingsservicemodel.cpp
+++ b/src/networksettings/qnetworksettingsservicemodel.cpp
@@ -125,6 +125,12 @@ QList<QNetworkSettingsService*> QNetworkSettingsServiceModel::getModel()
//Filter model
+/*!
+ \qmltype NetworkSettingsServiceFilter
+ \inqmlmodule QtDeviceutilities.NetworkSettings
+ \abstract
+*/
+
QNetworkSettingsServiceFilter::QNetworkSettingsServiceFilter(QObject* parent)
:QSortFilterProxyModel(parent)
{
@@ -136,6 +142,14 @@ QNetworkSettingsServiceFilter::~QNetworkSettingsServiceFilter()
}
+/*!
+ \qmlproperty enumeration NetworkSettingsServiceFilter::type
+
+ \value NetworkSettingsType.Wired Wired network
+ \value NetworkSettingsType.Wifi Wifi network
+ \value NetworkSettingsType.Bluetooth Bluetooth network
+ \value NetworkSettingsType.Unknown Unknown network type
+*/
QNetworkSettingsType::Types QNetworkSettingsServiceFilter::type() const
{
return m_type;
@@ -166,6 +180,11 @@ bool QNetworkSettingsServiceFilter::filterAcceptsRow( int source_row, const QMod
return false;
}
+/*!
+ \qmlmethod NetworkService NetworkSettingsServiceFilter::itemFromRow(int index)
+
+ Returns the service at \a index in the model.
+*/
QVariant QNetworkSettingsServiceFilter::itemFromRow(const int row) const
{
QModelIndex idx = index(row, 0);
diff --git a/src/networksettings/wpasupplicant/qwifidevice.cpp b/src/networksettings/wpasupplicant/qwifidevice.cpp
index 3b6fdd1..8441700 100644
--- a/src/networksettings/wpasupplicant/qwifidevice.cpp
+++ b/src/networksettings/wpasupplicant/qwifidevice.cpp
@@ -38,6 +38,7 @@ QT_BEGIN_NAMESPACE
\inmodule B2Qt.Wifi.Cpp
\ingroup wifi-cppclasses
\brief Represents a physical device.
+ \internal
Use this class to query if a device is Wifi capable, before attempting
to use the functionality of QWifiManager.
diff --git a/src/settingsui/settingsuiplugin/settingsuiplugin_plugin.cpp b/src/settingsui/settingsuiplugin/settingsuiplugin_plugin.cpp
index 8b141e3..f428916 100644
--- a/src/settingsui/settingsuiplugin/settingsuiplugin_plugin.cpp
+++ b/src/settingsui/settingsuiplugin/settingsuiplugin_plugin.cpp
@@ -29,6 +29,49 @@
#include "settingsuiplugin_plugin.h"
#include <qqml.h>
+/*!
+ \qmlmodule QtDeviceUtilities.SettingsUI 1.0
+ \title Qt Device Utilities: Settings UI
+ \ingroup qtee-qmlmodules
+ \brief Provides a system-wide settings UI.
+
+ The \c DeviceUtilities.SettingsUI module provides a single QML type,
+ SettingsUI, that allows applications to integrate a standard, system-wide
+ settings view into their user interface.
+
+ Import the module as follows:
+
+ \badcode
+ import QtDeviceUtilities.SettingsUI 1.0
+ \endcode
+
+ \section1 QML Types
+*/
+
+/*!
+ \qmltype SettingsUI
+ \inqmlmodule QtDeviceUtilities.SettingsUI
+ \brief Provides a QML type for displaying a system-wide settings UI.
+
+ With the SettingsUI type, applications can easily integrate a standard,
+ system-wide settings view into their user interface.
+
+ For example:
+
+ \qml
+ import QtQuick 2.6
+ import QtDeviceUtilities.SettingsUI 1.0
+
+ SettingsUI {
+ id: settingsUI
+ anchors.fill: parent
+ }
+ \endqml
+
+ There is no need to import the various \c {DeviceUtilities.*} modules and
+ to declare a custom settings UI, unless specifically required.
+*/
+
void SettingsuipluginPlugin::registerTypes(const char *uri)
{
// @uri QtDeviceUtilities.SettingsUI