QNetworkSettingsService Class

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

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

Properties

  • autoConnect : bool
  • domains : QAbstractItemModel* const
  • id : const QString
  • ipv4 : QNetworkSettingsIPv4* const
  • ipv6 : QNetworkSettingsIPv6* const
  • name : const QString
  • nameservers : QAbstractItemModel* const
  • proxy : QNetworkSettingsProxy* const
  • state : const QNetworkSettingsState::State
  • type : const QNetworkSettingsType::Type
  • wirelessConfig : QNetworkSettingsWireless* const

Public Functions

QNetworkSettingsService(const QString &aServiceId, QObject *parent = nullptr)
bool autoConnect() const
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(bool autoconnect)
void setPlaceholderState(bool placeholderState)
void setupDomainsConfig()
void setupIpv4Config()
void setupIpv6Config()
void setupNameserversConfig()
void setupNetworkSettingsProxy()
QNetworkSettingsState::State state()
QNetworkSettingsType::Type type()
QNetworkSettingsWireless *wirelessConfig()

Signals

void autoConnectChanged()
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

autoConnect : bool

Holds autoconnect property for this service.

Autoconnect property determines whether the service connects automatically when it is available.

Access functions:

bool autoConnect() const[see note below]
void setAutoConnect(bool autoconnect)[see note below]

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

Notifier signal:

void autoConnectChanged()

[read-only] 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()

[read-only] id : const QString

Holds a unique ID of this service.

Access functions:

QString id() const

[read-only] ipv4 : QNetworkSettingsIPv4* const

Holds the IPv4 address for this service.

Access functions:

QNetworkSettingsIPv4 *ipv4()

Notifier signal:

void ipv4Changed()

[read-only] ipv6 : QNetworkSettingsIPv6* const

Holds the IPv6 address for this service.

Access functions:

QNetworkSettingsIPv6 *ipv6()

Notifier signal:

void ipv6Changed()

[read-only] name : const QString

Holds the name of this service.

Access functions:

QString name() const

Notifier signal:

void nameChanged()

[read-only] 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()

[read-only] proxy : QNetworkSettingsProxy* const

Holds the proxy settings for this service.

Access functions:

QNetworkSettingsProxy *proxy()

Notifier signal:

void proxyChanged()

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

Holds the state of this service.

Access functions:

QNetworkSettingsState::State state()

Notifier signal:

void stateChanged()

See also QNetworkSettingsState::State.

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

Holds the type of this service.

Access functions:

QNetworkSettingsType::Type type()

Notifier signal:

void typeChanged()

See also QNetworkSettingsType::Type.

[read-only] 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 = 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.

[invokable] bool QNetworkSettingsService::autoConnect() const

Returns the automatic connection status of the network service.

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

Note: Getter function for property autoConnect.

See also setAutoConnect().

[invokable] 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().

[invokable] 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.

[invokable] 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.

[invokable] void QNetworkSettingsService::setAutoConnect(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.

Note: Setter function for property autoConnect.

See also autoConnect().

void QNetworkSettingsService::setPlaceholderState(bool placeholderState)

Sets the placeholder state of the network service to placeholderState.

See also placeholderState().

[invokable] 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.

[invokable] 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().

[invokable] 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().

[invokable] 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.

[invokable] 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::State QNetworkSettingsService::state()

Returns the network service state.

Note: Getter function for property state.

See also QNetworkSettingsState::State.

QNetworkSettingsType::Type QNetworkSettingsService::type()

Returns the network service type.

Note: Getter function for property type.

See also QNetworkSettingsType::Type.

QNetworkSettingsWireless *QNetworkSettingsService::wirelessConfig()

Returns the wireless configuration of the network service.

Note: Getter function for property wirelessConfig.

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