Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

NetworkInfo

The NetworkInfo element provides various information about the network status. More...

Inherits QtObject

Properties

Signals

Methods

Detailed Description

Property Documentation

read-onlycurrentNetworkMode : enumeration

This property holds the current network mode. Possible values are:

  • NetworkInfo.UnknownMode - The network is unknown or an error occured.
  • NetworkInfo.GsmMode - Global System for Mobile (GSM) network.
  • NetworkInfo.CdmaMode - Code Division Multiple Access (CDMA) network.
  • NetworkInfo.WcdmaMode - Wideband Code Division Multiple Access (WCDMA) network.
  • NetworkInfo.WlanMode - Wireless local area network (WLAN) network.
  • NetworkInfo.EthernetMode - Local area network (LAN), or Ethernet network.
  • NetworkInfo.BluetoothMode - Bluetooth network.
  • NetworkInfo.WimaxMode - Worldwide Interoperability for Microwave Access (WiMAX) network.
  • NetworkInfo.LteMode - 3GPP Long Term Evolution (LTE) network.
  • NetworkInfo.TdscdmaMode - Time Division Synchronous Code Division Multiple Access (TD-SCDMA) network.

monitorCellId : bool

This property is obsoleted, and will be removed soon. You don't need to use it at all.


monitorCurrentCellDataTechnology : bool

This property is obsoleted, and will be removed soon. You don't need to use it at all.


monitorCurrentMobileCountryCode : bool

This property is obsoleted, and will be removed soon. You don't need to use it at all.


monitorCurrentMobileNetworkCode : bool

This property is obsoleted, and will be removed soon. You don't need to use it at all.


monitorCurrentNetworkMode : bool

This property holds whether or not monitor the change of current network mode.


monitorLocationAreaCode : bool

This property is obsoleted, and will be removed soon. You don't need to use it at all.


monitorNetworkInterfaceCount : bool

This property is obsoleted, and will be removed soon. You don't need to use it at all.


monitorNetworkName : bool

This property holds whether or not monitor the change of network names.


monitorNetworkSignalStrength : bool

This property holds whether or not monitor the change of network signal strength.


monitorNetworkStatus : bool

This property holds whether or not monitor the network status.


Signal Documentation

NetworkInfo::onCellIdChanged(int interfaceIndex, string id)

This handler is called whenever the cell ID of interfaceIndex has been changed to id. Note that it won't be called unless monitorCellId is set true.

See also cellId and monitorCellId.


NetworkInfo::onCurrentCellDataTechnologyChanged(int interfaceIndex, CellDataTechnology tech)

This handler is called whenever the cell data technology of interfaceIndex has been changed to tech. Note that the signal won't emit until monitorCurrentCellDataTechnology is set true.

See also currentCellDataTechnology and monitorCurrentCellDataTechnology.


NetworkInfo::onCurrentMobileCountryCodeChanged(int interfaceIndex, string mcc)

This handler is called whenever the current mobile country code of interfaceIndex has been changed to mcc. Note that it won't be called unless monitorCurrentMobileCountryCode is set true.

See also currentMobileCountryCode and monitorCurrentMobileCountryCode.


NetworkInfo::onCurrentMobileNetworkCodeChanged(int interfaceIndex, string mnc)

This handler is called whenever the current mobile network code of interfaceIndex has been changed to mnc. Note that it won't be called unless monitorCurrentMobileNetworkCode is set true.

See also currentMobileNetworkCode and monitorCurrentMobileNetworkCode.


NetworkInfo::onLocationAreaCodeChanged(int interfaceIndex, string lac)

This handler is called whenever the location area code of interfaceIndex has been changed to lac. Note that it won't be called unless monitorLocationAreaCode is set true.

See also locationAreaCode and monitorLocationAreaCode.


NetworkInfo::onNetworkInterfaceCountChanged(NetworkMode mode, int count)

This handler is called whenever the number of interfaces of mode has changed to count. Note that it won't called until monitorNetworkInterfaceCount is set true.

See also networkInterfaceCount and monitorNetworkInterfaceCount.


NetworkInfo::onNetworkNameChanged(NetworkMode mode, int interfaceIndex, string name)

This handler is called whenever the network name of mode and interfaceIndex has been changed to name. Note that it won't called until monitorNetworkName is set true.

See also networkName and monitorNetworkName.


NetworkInfo::onNetworkSignalStrengthChanged(NetworkMode mode, int interfaceIndex, int strength)

This handler is called whenever the signal strength for the interfaceIndex of mode has changed to strength. Note that it won't be called until monitorNetworkSignalStrength is set true.

See also networkSignalStrength and monitorNetworkSignalStrength.


NetworkInfo::onNetworkStatusChanged(NetworkMode mode, int interfaceIndex, NetworkStatus status)

This handler is called whenever the status of mode and interfaceIndex has been changed to status. Note that it won't be called until monitorNetworkStatus is set true.

See also networkStatus and monitorNetworkStatus.


Method Documentation

CellDataTechnology NetworkInfo::currentCellDataTechnology(int interface)

Returns the current cell data technology of the given interface. Possible values are:

  • NetworkInfo.UnknownDataTechnology - The cellular technology is unknown or an error occured.
  • NetworkInfo.GprsDataTechnology - General Packet Radio Service (GPRS) data service.
  • NetworkInfo.EdgeDataTechnology - Enhanced Data Rates for GSM Evolution (EDGE) data service.
  • NetworkInfo.UmtsDataTechnology - Universal Mobile Telecommunications System (UMTS) data service.
  • NetworkInfo.HspaDataTechnology - High Speed Packet Access (HSPA) data service.

NetworkStatus NetworkInfo::networkStatus(NetworkMode mode, int interface)

Returns the status of the given mode and interface. Possible values are:

  • NetworkInfo.UnknownStatus - The status is unknown or an error occured.
  • NetworkInfo.NoNetworkAvailable - There is no network available.
  • NetworkInfo.EmergencyOnly - The network only allows emergency calls.
  • NetworkInfo.Searching - The device is searching or connecting to the network.
  • NetworkInfo.Busy - The network is too busy to be connected.
  • NetworkInfo.Denied - The connection to the network has been denied.
  • NetworkInfo.HomeNetwork - The device is connected to the home network.
  • NetworkInfo.Roaming - The device is connected to some roaming network.

int NetworkInfo::networkInterfaceCount(NetworkMode mode)

Returns the interface count of the given mode.


int NetworkInfo::networkSignalStrength(NetworkMode mode, int interface)

Returns the signal strength of the given mode and interface. If the information is not available, or error occurs, -1 is returned.


string NetworkInfo::cellId(int interface)

Returns the cell ID of the given interface. If this information is not available or error occurs, an empty string is returned.

See also onCellIdChanged.


string NetworkInfo::currentMobileCountryCode(int interface)

Returns the current mobile country code of the given interface. If this information is not available or error occurs, an empty string is returned.


string NetworkInfo::currentMobileNetworkCode(int interface)

Returns the current mobile network code of the given interface. If this information is not available or error occurs, an empty string is returned.


string NetworkInfo::homeMobileCountryCode(int interface)

Returns the home Mobile Country Code (MCC) for interface. An empty string is returned if the information is not available or on error.


string NetworkInfo::homeMobileNetworkCode(int interface)

Returns the home Mobile Network Code (MNC) for interface. An empty string is returned if the information is not available or on error.


string NetworkInfo::imsi(int interface)

Returns the International Mobile Subscriber Identity (IMSI) for interface. If this information is not available, or error occurs, an empty string is returned.


string NetworkInfo::locationAreaCode(int interface)

Returns the location area code of the given interface. If this information is not available or error occurs, an empty string is returned.


string NetworkInfo::macAddress(NetworkMode mode, int interface)

Returns the MAC address for interface of mode. If the MAC address is not available or error occurs, an empty string is returned.


string NetworkInfo::networkName(NetworkMode mode, int interface)

Returns the name of the given mode and interface. 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.


Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web