QNetworkSettingsService Class

The QNetworkSettingsService class represents a network service. More...

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

Properties

  • domains : QAbstractItemModel* const
  • id : const QString
  • ipv4 : QNetworkSettingsIPv4* const
  • ipv6 : QNetworkSettingsIPv6* const
  • name : const QString
  • nameservers : QAbstractItemModel* const
  • proxy : QNetworkSettingsProxy* const
  • state : const QNetworkSettingsState::States
  • type : const QNetworkSettingsType::Types
  • wirelessConfig : QNetworkSettingsWireless* const

Public Functions

QNetworkSettingsService(const QString &aServiceId, QObject *parent = Q_NULLPTR)
void connectService()
void disconnectService()
void doConnectService()
QAbstractItemModel *domains()
QString id() const
QNetworkSettingsIPv4 *ipv4()
QNetworkSettingsIPv6 *ipv6()
QString name() const
QAbstractItemModel *nameservers()
bool placeholderState() const
QNetworkSettingsProxy *proxy()
void removeService()
void setAutoConnect(const bool autoconnect)
void setPlaceholderState(bool placeholderState)
void setupDomainsConfig()
void setupIpv4Config()
void setupIpv6Config()
void setupNameserversConfig()
void setupNetworkSettingsProxy()
QNetworkSettingsState::States state()
QNetworkSettingsType::Types type()
QNetworkSettingsWireless *wirelessConfig()

Signals

void connectionStateCleared()
void domainsChanged()
void ipv4Changed()
void ipv6Changed()
void nameChanged()
void nameserversChanged()
void proxyChanged()
void serviceConnected(QNetworkSettingsService *service)
void serviceDisconnected(QNetworkSettingsService *service)
void stateChanged()
void typeChanged()
void wirelessChanged()

Detailed Description

See also QNetworkSettingsManager::services().

Property Documentation

domains : QAbstractItemModel* const

This property holds the model containing the domains associated with this service.

This property can be used as a model for a view that lists the domain addresses associated with this service.

Access functions:

QAbstractItemModel *domains()

Notifier signal:

void domainsChanged()

id : const QString

Holds a unique ID of this service.

Access functions:

QString id() const

ipv4 : QNetworkSettingsIPv4* const

Holds the IPv4 address for this service.

Access functions:

QNetworkSettingsIPv4 *ipv4()

Notifier signal:

void ipv4Changed()

ipv6 : QNetworkSettingsIPv6* const

Holds the IPv6 address for this service.

Access functions:

QNetworkSettingsIPv6 *ipv6()

Notifier signal:

void ipv6Changed()

name : const QString

Holds the name of this service.

Access functions:

QString name() const

Notifier signal:

void nameChanged()

nameservers : QAbstractItemModel* const

This property holds the model containing the domain name servers associated with this service.

This property can be used as a model for a view that lists the domain name server (DNS) addresses associated with this service.

Access functions:

QAbstractItemModel *nameservers()

Notifier signal:

void nameserversChanged()

proxy : QNetworkSettingsProxy* const

Holds the proxy settings for this service.

Access functions:

QNetworkSettingsProxy *proxy()

Notifier signal:

void proxyChanged()

state : const QNetworkSettingsState::States

Holds the state of this service.

Access functions:

QNetworkSettingsState::States state()

Notifier signal:

void stateChanged()

See also QNetworkSettingsState::States.

type : const QNetworkSettingsType::Types

Holds the type of this service.

Access functions:

QNetworkSettingsType::Types type()

Notifier signal:

void typeChanged()

See also QNetworkSettingsType::Types.

wirelessConfig : QNetworkSettingsWireless* const

Holds the wireless configuration for this service.

Access functions:

QNetworkSettingsWireless *wirelessConfig()

Notifier signal:

void wirelessChanged()

Member Function Documentation

QNetworkSettingsService::QNetworkSettingsService(const QString &aServiceId, QObject *parent = Q_NULLPTR)

Creates a network service with the identifier aServiceId and parent parent.

[signal] void QNetworkSettingsService::connectionStateCleared()

This signal is emitted when the connection state is cleared.

[signal] void QNetworkSettingsService::serviceConnected(QNetworkSettingsService *service)

This signal is emitted when the connection to the network service is created.

[signal] void QNetworkSettingsService::serviceDisconnected(QNetworkSettingsService *service)

This signal is emitted when the connection to the network service is cut.

void QNetworkSettingsService::connectService()

Initiates the process of connecting to this network service.

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

See also disconnectService().

void QNetworkSettingsService::disconnectService()

Disconnects this service.

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

See also connectService().

void QNetworkSettingsService::doConnectService()

Creates a connection to this network service.

See also connectService() and disconnectService().

QAbstractItemModel *QNetworkSettingsService::domains()

Returns the model containing the domains associated with this network settings service.

Note: Getter function for property domains.

QString QNetworkSettingsService::id() const

Returns the unique identifier of the network service.

Note: Getter function for property id.

QNetworkSettingsIPv4 *QNetworkSettingsService::ipv4()

Returns the IPv4 address of the network service.

Note: Getter function for property ipv4.

QNetworkSettingsIPv6 *QNetworkSettingsService::ipv6()

Returns the IPv6 address of the network service.

Note: Getter function for property ipv6.

QString QNetworkSettingsService::name() const

Returns the network service name.

Note: Getter function for property name.

QAbstractItemModel *QNetworkSettingsService::nameservers()

Returns the model containing the domain name servers associated with this network service.

Note: Getter function for property nameservers.

bool QNetworkSettingsService::placeholderState() const

Returns the placeholder state of the network service.

See also setPlaceholderState().

QNetworkSettingsProxy *QNetworkSettingsService::proxy()

Returns the address of proxy used for the network service.

Note: Getter function for property proxy.

void QNetworkSettingsService::removeService()

Removes this service from the service cache and clears any remembered credentials.

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

void QNetworkSettingsService::setAutoConnect(const bool autoconnect)

Sets automatic connections to the network service to autoconnect.

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

void QNetworkSettingsService::setPlaceholderState(bool placeholderState)

Sets the placeholder state of the network service to placeholderState.

See also placeholderState().

void QNetworkSettingsService::setupDomainsConfig()

Sets up the domain configuration.

Call this method after modifying the list of domain addresses.

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

See also domains.

void QNetworkSettingsService::setupIpv4Config()

Sets up the IPv4 configuration.

Call this method after changing the IPv4 settings.

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

See also ipv4().

void QNetworkSettingsService::setupIpv6Config()

Sets up the IPv6 configuration.

Call this method after changing the IPv6 settings.

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

See also ipv6().

void QNetworkSettingsService::setupNameserversConfig()

Sets up the domain name server configuration.

Call this method after changing the domain name server settings.

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

See also nameservers.

void QNetworkSettingsService::setupNetworkSettingsProxy()

Sets up the network proxy configuration.

Call this method after modifying the network proxy settings.

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

See also proxy.

QNetworkSettingsState::States QNetworkSettingsService::state()

Returns the network service state.

Note: Getter function for property state.

See also QNetworkSettingsState::States.

QNetworkSettingsType::Types QNetworkSettingsService::type()

Returns the network service type.

Note: Getter function for property type.

See also QNetworkSettingsType::Types.

QNetworkSettingsWireless *QNetworkSettingsService::wirelessConfig()

Returns the wireless configuration of the network service.

Note: Getter function for property wirelessConfig.

© 2021 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.