QNetworkInfo ClassThe QNetworkInfo class provides various information about the network status. More... #include <QNetworkInfo> Inherits: QObject. Public Types
Public Functions
Signals
Additional Inherited Members
Detailed DescriptionThe QNetworkInfo class provides various information about the network status. To support the cases where one has multiple interfaces / modems for the same network mode, you can specify which interface you refer to. For those cases, the 'interface' parameter is the index of the interface, starting from 0. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QNetworkInfo::UnknownDataTechnology | 0 | The cellular technology is unknown or an error occured. |
QNetworkInfo::GprsDataTechnology | 1 | General Packet Radio Service (GPRS) data service. |
QNetworkInfo::EdgeDataTechnology | 2 | Enhanced Data Rates for GSM Evolution (EDGE) data service. |
QNetworkInfo::UmtsDataTechnology | 3 | Universal Mobile Telecommunications System (UMTS) data service. |
QNetworkInfo::HspaDataTechnology | 4 | High Speed Packet Access (HSPA) data service. |
This enumeration describes the type of the network.
Constant | Value | Description |
---|---|---|
QNetworkInfo::UnknownMode | 0 | The network is unknown or an error occured. |
QNetworkInfo::GsmMode | 1 | Global System for Mobile (GSM) network. |
QNetworkInfo::CdmaMode | 2 | Code Division Multiple Access (CDMA) network. |
QNetworkInfo::WcdmaMode | 3 | Wideband Code Division Multiple Access (WCDMA) network. |
QNetworkInfo::WlanMode | 4 | Wireless local area network (WLAN) network. |
QNetworkInfo::EthernetMode | 5 | Local area network (LAN), or Ethernet network. |
QNetworkInfo::BluetoothMode | 6 | Bluetooth network. |
QNetworkInfo::WimaxMode | 7 | Worldwide Interoperability for Microwave Access (WiMAX) network. |
QNetworkInfo::LteMode | 8 | 3GPP Long Term Evolution (LTE) network. |
QNetworkInfo::TdscdmaMode | 9 | Time Division Synchronous Code Division Multiple Access (TD-SCDMA) network. |
This enumeration describes the status of the network.
Constant | Value | Description |
---|---|---|
QNetworkInfo::UnknownStatus | 0 | The status is unknown or an error occured. |
QNetworkInfo::NoNetworkAvailable | 1 | There is no network available. |
QNetworkInfo::EmergencyOnly | 2 | The network only allows emergency calls. |
QNetworkInfo::Searching | 3 | The device is searching or connecting to the network. |
QNetworkInfo::Busy | 4 | The network is too busy to be connected. |
QNetworkInfo::Denied | 5 | The connection to the network has been denied. |
QNetworkInfo::HomeNetwork | 6 | The device is connected to the home network. |
QNetworkInfo::Roaming | 7 | The device is connected to some roaming network. |
Constructs a QNetworkInfo object with the given parent.
Destroys the object
Returns the cell ID of the connected tower or based station for interface. If this information is not available or error occurs, an empty string is returned.
This signal is emitted whenever the cell ID for interface has changed to id.
Returns the current cell data technology used for interface.
This signal is emitted whenever the current cell data technology for interface has changed to tech.
Returns the current Mobile Country Code (MCC) for interface. An empty string is returned if the information is not available or an error occurs.
This signal is emitted whenever the current Mobile Country Code (MCC) for interface has changed to mcc.
Returns the current Mobile Network Code (MNC) for interface. An empty string is returned if the information is not available or an error occurs.
This signal is emitted whenever the current Mobile Network Code (MNC) for interface has changed to mnc.
Returns the current active network mode. If there are more than one modes activated, the preferred one is returned.
This signal is emitted whenever the current network has changed to mode.
Returns the home Mobile Country Code (MCC) for interface. An empty string is returned if the information is not available or an error occurs.
Returns the home Mobile Network Code (MNC) for interface. An empty string is returned if the information is not available or an error occurs.
Returns the International Mobile Subscriber Identity (IMSI) for interface. If this information is not available, or error occurs, an empty string is returned.
Returns the first found interface for interface of mode. If none is found, or it can't be represented by QNetworkInterface (e.g. Bluetooth), and empty object is returned.
Returns the location area code of the current cellular radio network for interface. If this information is not available or error occurs, an empty string is returned.
This signal is emitted whenever the location area code for interface has changed to lac.
Returns the MAC address for interface of mode. If the MAC address is not available or error occurs, an empty string is returned.
Returns the number of interfaces for the mode. If the information is not available, or error occurs, -1 is returned.
This signal is emitted whenever the number of interfaces for the mode has changed to count.
Returns the name of the operator for interface of mode. If the information is not available, or an error occurs, an empty string is returned.
In case of WLAN, the SSID is returned; for Ethernet, the domain name is returned if available.
This signal is emitted whenever the name for the interface of mode has changed to name.
Returns the signal strength for interface of mode, in 0 - 100 scale. If the information is not available, or error occurs, -1 is returned.
This signal is emitted whenever the signal strength for the interface of mode has changed to strength.
Returns the current status for interface of mode.
This signal is emitted whenever the status for the interface of mode has changed to status.