summaryrefslogtreecommitdiffstats
path: root/src/networksettings/qnetworksettingsinterface.cpp
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2018-09-28 15:23:47 +0200
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2018-10-15 06:41:34 +0000
commit261e4c619214af5e5cf95ec08a7d46d702ae0a93 (patch)
treeb670a6f347a8a8053bee850162c6ed542fcb5524 /src/networksettings/qnetworksettingsinterface.cpp
parent0ecd391912f6338d5aef6105600fc8c321c83bd8 (diff)
Doc: Add documentation for C++ classes
Currently, only QML types are documented. Task-number: QTBUG-69686 Change-Id: Idc13bff25a154e88c6c769c0af37204573ec1118 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'src/networksettings/qnetworksettingsinterface.cpp')
-rw-r--r--src/networksettings/qnetworksettingsinterface.cpp68
1 files changed, 67 insertions, 1 deletions
diff --git a/src/networksettings/qnetworksettingsinterface.cpp b/src/networksettings/qnetworksettingsinterface.cpp
index 9fb0147..7bf6ae0 100644
--- a/src/networksettings/qnetworksettingsinterface.cpp
+++ b/src/networksettings/qnetworksettingsinterface.cpp
@@ -33,6 +33,45 @@
QT_BEGIN_NAMESPACE
/*!
+ \class QNetworkSettingsInterface
+ \inmodule QtDeviceUtilities
+ \brief Represents a network interface.
+
+ The QNetworkSettingsInterface class represents a network interface attached
+ to the host.
+
+ Instances of this class cannot be created directly. Instead, they can be
+ retrieved via QNetworkSettingsManager::interfaces().
+*/
+
+/*!
+ \property QNetworkSettingsInterface::state
+ \readonly
+ \brief Holds the state of the network interface.
+
+ \sa QNetworkSettingsState::States
+*/
+
+/*!
+ \property QNetworkSettingsInterface::name
+ \readonly
+ \brief Holds the name of the network interface.
+*/
+
+/*!
+ \property QNetworkSettingsInterface::powered
+ \brief Holds whether the network interface is powered on of off.
+*/
+
+/*!
+ \property QNetworkSettingsInterface::type
+ \readonly
+ \brief Holds the type of the network interface.
+
+ \sa QNetworkSettingsType::Types
+*/
+
+/*!
\qmltype NetworkInterface
\inqmlmodule QtDeviceUtilities.NetworkSettings
\brief Represents a network interface.
@@ -46,6 +85,10 @@ QT_BEGIN_NAMESPACE
\sa {NetworkSettingsManager::interfaces}{NetworkSettingsManager.interfaces}
*/
+
+/*!
+ Creates a new network interface with the parent \a parent.
+*/
QNetworkSettingsInterface::QNetworkSettingsInterface(QObject *parent) :
QObject(parent)
,d_ptr(new QNetworkSettingsInterfacePrivate(this))
@@ -58,6 +101,10 @@ QNetworkSettingsInterface::QNetworkSettingsInterface(QObject *parent) :
\readonly
\brief Holds the name of the network interface.
*/
+
+/*!
+ Returns the name of the network interface.
+*/
QString QNetworkSettingsInterface::name() const
{
Q_D(const QNetworkSettingsInterface);
@@ -95,6 +142,10 @@ QString QNetworkSettingsInterface::name() const
\value NetworkSettingsState.Undefined
Undefined state.
*/
+
+/*!
+ Returns the state of the network interface.
+*/
QNetworkSettingsState::States QNetworkSettingsInterface::state()
{
Q_D(QNetworkSettingsInterface);
@@ -113,6 +164,10 @@ QNetworkSettingsState::States QNetworkSettingsInterface::state()
\value NetworkSettingsType.Bluetooth Bluetooth network
\value NetworkSettingsType.Unknown Unknown network type
*/
+
+/*!
+ Returns the type of the network interface.
+*/
QNetworkSettingsType::Types QNetworkSettingsInterface::type()
{
Q_D(QNetworkSettingsInterface);
@@ -121,7 +176,11 @@ QNetworkSettingsType::Types QNetworkSettingsInterface::type()
/*!
\qmlproperty bool NetworkInterface::powered
- \brief Holds whether the network interface is powered on of off.
+ \brief Holds whether the network interface is powered on or off.
+*/
+
+/*!
+ Returns whether the network interface is powered on or off.
*/
bool QNetworkSettingsInterface::powered() const
{
@@ -129,6 +188,9 @@ bool QNetworkSettingsInterface::powered() const
return d->powered();
}
+/*!
+ Sets the powered state in the network interface to \a powered.
+*/
void QNetworkSettingsInterface::setPowered(const bool powered)
{
Q_D(QNetworkSettingsInterface);
@@ -139,6 +201,10 @@ void QNetworkSettingsInterface::setPowered(const bool powered)
\qmlmethod void NetworkInterface::scanServices()
\brief Initiates a scan for network interface services.
*/
+
+/*!
+ Initiates a scan for network interface services.
+*/
void QNetworkSettingsInterface::scanServices()
{
Q_D(QNetworkSettingsInterface);