QSystemNetworkInfo Class Reference
The QSystemNetworkInfo class provides access to network information from the system. More...
#include <QSystemNetworkInfo>
Public Types
enum | NetworkMode { UnknownMode, GsmMode, CdmaMode, WcdmaMode, ..., WimaxMode } |
enum | NetworkStatus { UndefinedStatus, NoNetworkAvailable, EmergencyOnly, Searching, ..., Roaming } |
Properties
Public Functions
Signals
Detailed Description
The QSystemNetworkInfo class provides access to network information from the system.
Member Type Documentation
enum QSystemNetworkInfo::NetworkMode
This enum describes the type of network:
|
Constant | Value | Description |
QSystemNetworkInfo::UnknownMode | 0 | Unknown network, or network error. |
QSystemNetworkInfo::GsmMode | 1 | Global System for Mobile (GSM) network. |
QSystemNetworkInfo::CdmaMode | 2 | Code division multiple access (CDMA) network. |
QSystemNetworkInfo::WcdmaMode | 3 | Wideband Code Division Multiple Access (W-CDMA) network. |
QSystemNetworkInfo::WlanMode | 4 | Wireless Local Area Network (WLAN) network. |
QSystemNetworkInfo::EthernetMode | 5 | Wired Local Area network. |
QSystemNetworkInfo::BluetoothMode | 6 | Bluetooth network. |
QSystemNetworkInfo::WimaxMode | 7 | Wimax network. |
enum QSystemNetworkInfo::NetworkStatus
This enum describes the status of the network connection:
|
Constant | Value | Description |
QSystemNetworkInfo::UndefinedStatus | 0 | There is no network device, or error. |
QSystemNetworkInfo::NoNetworkAvailable | 1 | There is no network available. |
QSystemNetworkInfo::EmergencyOnly | 2 | Emergency calls only. |
QSystemNetworkInfo::Searching | 3 | Searching for or connecting with the network. |
QSystemNetworkInfo::Busy | 4 | Network is busy. |
QSystemNetworkInfo::Connected | 5 | Connected to network. |
QSystemNetworkInfo::HomeNetwork | 6 | On Home Network. |
QSystemNetworkInfo::Denied | 7 | Network access denied. |
QSystemNetworkInfo::Roaming | 8 | On Roaming network. |
Property Documentation
cellId : const int
This property holds the devices Cell ID Returns the Cell ID of the connected tower or based station.
Access functions:
currentMobileCountryCode : const QString
This property holds the current MCC.
Returns the current Mobile Country Code. In the case of none such as a Desktop, an empty string. /
Access functions:
QString | currentMobileCountryCode () |
Notifier signal:
currentMobileNetworkCode : const QString
This property holds the current MNC.
Returns the current Mobile Network Code. In the case of none such as a Desktop, an empty string.
Access functions:
QString | currentMobileNetworkCode () |
Notifier signal:
homeMobileCountryCode : const QString
This property holds the home MNC.
Returns the home Mobile Country Code. In the case of none such as a Desktop, an empty string.
Access functions:
QString | homeMobileCountryCode () |
homeMobileNetworkCode : const QString
This property holds the home MCC.
Returns the home Mobile Network Code. In the case of none such as a Desktop, an empty string. Note: Some platforms don't support retrieving this info. In this case the Network Code is returned only when the device is registered on home network.
Access functions:
QString | homeMobileNetworkCode () |
locationAreaCode : const int
This property holds the LAC.
Returns the Location Area Code. In the case of none such as a Desktop, an empty string.
Access functions:
Member Function Documentation
QSystemNetworkInfo::QSystemNetworkInfo ( QObject * parent = 0 )
Constructs a QSystemNetworkInfo object with the given parent.
QSystemNetworkInfo::~QSystemNetworkInfo ()
Destroys the QSystemNetworkInfo object.
void QSystemNetworkInfo::currentMobileCountryCodeChanged ( const QString & mcc ) [signal]
This signal is emitted whenever the Mobile Country Code changes, specified by mcc.
void QSystemNetworkInfo::currentMobileNetworkCodeChanged ( const QString & mnc ) [signal]
This signal is emitted whenever the network Mobile Network Code changes, specified by mnc.
QNetworkInterface QSystemNetworkInfo::interfaceForMode ( QSystemNetworkInfo::NetworkMode mode )
Returns the first found QNetworkInterface for type mode.
This signal is emitted whenever the network mode changes, specified by mode.
void QSystemNetworkInfo::networkNameChanged ( QSystemNetworkInfo::NetworkMode mode, const QString & netName ) [signal]
This signal is emitted whenever the network mode name changes, specified by netName.
void QSystemNetworkInfo::networkSignalStrengthChanged ( QSystemNetworkInfo::NetworkMode mode, int strength ) [signal]
This signal is emitted whenever the network mode signal strength changes, specified by strength.
This signal is emitted whenever the network status of mode changes, specified by status.