summaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports')
-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
6 files changed, 455 insertions, 21 deletions
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);