From 57b15814c8865e517c43fe173c0ffcadf8557ade Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 23 Aug 2016 15:12:03 +0200 Subject: Doc: Document QtDeviceUtilities Added documentation for the following QML modules: QtDeviceUtilities.BluetoothSettings QtDeviceUtilities.DisplaySettings QtDeviceUtilities.LocalDeviceSettings QtDeviceUtilities.LocaleSettings QtDeviceUtilities.NetworkSettings QtDeviceUtilities.TimeDateSettings QtDeviceUtilities.SettingsUI And changed the name of this documentation module to 'Qt Device Utilities'. Task-number: QTBUG-55320 Change-Id: Iee0d8467dccddc0ee75d7a395ae91f68b12ab9f2 Reviewed-by: Kimmo Ollila --- src/networksettings/qnetworksettingsinterface.cpp | 70 +++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'src/networksettings/qnetworksettingsinterface.cpp') 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); -- cgit v1.2.3