QNetworkSettingsInterface Class

Represents a network interface. More...

Header: #include <QNetworkSettingsInterface>
qmake: QT += networksettings
Inherits: QObject

Properties

  • name : const QString
  • powered : bool
  • state : const QNetworkSettingsState::State
  • type : const QNetworkSettingsType::Type

Public Functions

QNetworkSettingsInterface(QObject *parent = nullptr)
QString name() const
bool powered() const
void scanServices()
void setPowered(const bool powered)
QNetworkSettingsState::State state()
QNetworkSettingsType::Type type()

Signals

void nameChanged()
void poweredChanged()
void stateChanged()
void typeChanged()

Detailed Description

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 Documentation

[read-only] name : const QString

Holds the name of the network interface.

Access functions:

QString name() const

Notifier signal:

void nameChanged()

powered : bool

Holds whether the network interface is powered on of off.

Access functions:

bool powered() const
void setPowered(const bool powered)

Notifier signal:

void poweredChanged()

[read-only] state : const QNetworkSettingsState::State

Holds the state of the network interface.

Access functions:

QNetworkSettingsState::State state()

Notifier signal:

void stateChanged()

See also QNetworkSettingsState::State.

[read-only] type : const QNetworkSettingsType::Type

Holds the type of the network interface.

Access functions:

QNetworkSettingsType::Type type()

Notifier signal:

void typeChanged()

See also QNetworkSettingsType::Type.

Member Function Documentation

[explicit] QNetworkSettingsInterface::QNetworkSettingsInterface(QObject *parent = nullptr)

Creates a new network interface with the parent parent.

QString QNetworkSettingsInterface::name() const

Returns the name of the network interface.

Note: Getter function for property name.

bool QNetworkSettingsInterface::powered() const

Returns whether the network interface is powered on or off.

Note: Getter function for property powered.

See also setPowered().

[invokable] void QNetworkSettingsInterface::scanServices()

Initiates a scan for network interface services.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

void QNetworkSettingsInterface::setPowered(const bool powered)

Sets the powered state in the network interface to powered.

Note: Setter function for property powered.

See also powered().

QNetworkSettingsState::State QNetworkSettingsInterface::state()

Returns the state of the network interface.

Note: Getter function for property state.

QNetworkSettingsType::Type QNetworkSettingsInterface::type()

Returns the type of the network interface.

Note: Getter function for property type.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.