The NetworkInfo element allows you to get information and receive notifications from the network. More...
This element is part of the QtMobility.systeminfo 1.1 module. It is a convience class to make QML usage easier.
Note: To use notification signals, you need to set the monitor* properties to true.
To use this in a mode other than the default mode given by currentMode, set the mode with mode.
import Qt 4.7 import QtMobility.systeminfo 1.1 Rectangle { NetworkInfo { id: wlaninfo mode: NetworkInfo.WlanMode; monitorNameChanges: true monitorSignalStrengthChanges: true } Text { id: signame color: "white" text: wlaninfo.networkName +" "+wlaninfo.networkSignalStrength; anchors.horizontalCenter: parent.horizontalCenter; anchors.verticalCenter: parent.verticalCenter; } }
See also QSystemNetworkInfo.
Returns this NetworkInfo's network interface's MAC address.
Sets this NetworkInfo to use QSystemNetworkInfo::NetworkModes. Does not set the mode of the underlaying system.
If not set, the default is whatever defaultMode is.
Returns this NetworkInfo's network name.
Returns this NetworkInfo's network signal strength.
Returns this NetworkInfo's network status.
The following table shows the mapping between the NetworkInfo NetworkStatus property and the QSystemNetworkInfo::NetworkStatus enum.
NetworkInfo.networkStatus | QSystemNetworkInfo::NetworkStatus |
---|---|
"Undefined" | |
"No Network Available" | |
"Emergency Only" | |
"Searching" | |
"Busy" | |
"Connected" | |
"Home Network" | |
"Denied" | |
"Roaming" |
This handler is called when network MCC has changed. Note: To receive this notification, you must first call startCurrentMobileCountryCodeChanged.
This handler is called when network MNC has changed. Note: To receive this notification, you must first call startCurrentMobileNetworkCodeChanged.
This handler is called when the systems default network mode has changed. Note: To receive this notification, you must first call startModeChanged.
This handler is called when network name has changed. Note: To receive this notification, you must first call startNameChanged.
This handler is called when network signal strength has changed. Note: To receive this notification, you must first call startSignalStrengthChanged.
This handler is called when network status has changed. Note: To receive this notification, you must first call startStatusChanged.
QNetworkInterface NetworkInfo::interfaceForMode () |
Returns the QNetworkInterface for this NetworkInfo.