QNetworkSettingsWireless Class
The QNetworkSettingsWireless class encapsulates the configuration for a Wifi network service. More...
Header: | #include <QNetworkSettingsWireless> |
qmake: | QT += networksettings |
Inherits: | QObject |
Public Types
flags | Securities |
enum class | Security { None, WEP, WPA, WPA2 } |
Properties
- hidden : const bool
- isOutOfRange : bool
- signalStrength : int
Public Functions
QNetworkSettingsWireless(QObject *parent = nullptr) | |
bool | hidden() const |
bool | outOfRange() const |
void | setHidden(const bool hidden) |
void | setOutOfRange(const bool aOutOfRange) |
void | setSecurity(const QNetworkSettingsWireless::Securities securities) |
void | setSignalStrength(const int signalStrength) |
int | signalStrength() const |
bool | supportsSecurity(QNetworkSettingsWireless::Security security) |
Signals
void | hiddenChanged() |
void | outOfRangeChanged() |
void | passwordChanged() |
void | signalStrengthChanged() |
Member Type Documentation
enum class QNetworkSettingsWireless::Security
flags QNetworkSettingsWireless::Securities
This enum type holds the wireless security protocol used to protect the connection.
Constant | Value | Description |
---|---|---|
QNetworkSettingsWireless::Security::None | 0x0000 | Not protected |
QNetworkSettingsWireless::Security::WEP | 0x0002 | Wired Equivalent Privacy (WEP) |
QNetworkSettingsWireless::Security::WPA | 0x0004 | Wi-Fi Protected Access (WPA) |
QNetworkSettingsWireless::Security::WPA2 | 0x0008 | Wi-Fi Protected Access, version 2 (WPA2) |
The Securities type is a typedef for QFlags<Security>. It stores an OR combination of Security values.
Property Documentation
[read-only]
hidden : const bool
Holds whether the wireless SSID is hidden.
Access functions:
bool | hidden() const |
Notifier signal:
void | hiddenChanged() |
isOutOfRange : bool
Holds whether the Wifi access point is out of range.
Access functions:
bool | outOfRange() const |
void | setOutOfRange(const bool aOutOfRange) |
Notifier signal:
void | outOfRangeChanged() |
signalStrength : int
Holds the Wifi signal strength, in the range from 0 to 100.
Access functions:
int | signalStrength() const |
void | setSignalStrength(const int signalStrength) |
Notifier signal:
void | signalStrengthChanged() |
Member Function Documentation
[explicit]
QNetworkSettingsWireless::QNetworkSettingsWireless(QObject *parent = nullptr)
Creates a new Wifi network configuration with the parent parent.
[signal]
void QNetworkSettingsWireless::passwordChanged()
This signal is sent when the password has changed.
void QNetworkSettingsWireless::setHidden(const bool hidden)
Sets hidden status.
The QNetworkSettingsWireless::hiddenChanged signal is emitted when the hidden status is changed.
See also hidden().
void QNetworkSettingsWireless::setSecurity(const QNetworkSettingsWireless::Securities securities)
Sets securities flags.
[invokable]
bool QNetworkSettingsWireless::supportsSecurity(QNetworkSettingsWireless::Security security)
Returns whether the Wifi network supports the wireless security protocol specified in security.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
See also QNetworkSettingsWireless::Security.
© 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.