Qt Mobility Reference Documentation

QML NetworkInfo Element

The NetworkInfo element allows you to get information and receive notifications from the network. More...

  • List of all members, including inherited members
  • Properties

    Signals

    Methods

    Detailed Description

    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 use the start* slots.

    To use this in a mode other than the default mode given by currentMode, set the mode with useMode.

     import Qt 4.7
     import QtMobility.systeminfo 1.0
    
     Rectangle {
    
         NetworkInfo {
             id: wlaninfo
             useMode: NetworkInfo.WlanMode;
         }
         Component.onCompleted: {
             wlaninfo.startNameChanged();
             wlaninfo.startSignalStrengthChanged();
         }
         Text {
             id: signame
             color: "white"
             text:  wlaninfo.networkName +" "+wlaninfo.networkSignalStrength;
             anchors.horizontalCenter: parent.horizontalCenter;
             anchors.verticalCenter: parent.verticalCenter;
         }
     }

    See also QSystemNetworkInfo.

    Property Documentation

    macAddress : string

    Returns this NetworkInfo's network interface's MAC address.


    networkName : string

    Returns this NetworkInfo's network name.


    networkSignalStrength : int

    Returns this NetworkInfo's network signal strength.


    networkStatus : string

    Returns this NetworkInfo's network status.


    useMode : enumeration

    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.


    Signal Documentation

    NetworkInfo::currentMobileCountryCodeChanged ()

    This handler is called when network MCC has changed. Note: To receive this notification, you must first call startCurrentMobileCountryCodeChanged.


    NetworkInfo::currentMobileNetworkCodeChanged ()

    This handler is called when network MNC has changed. Note: To receive this notification, you must first call startCurrentMobileNetworkCodeChanged.


    NetworkInfo::modeChanged ()

    This handler is called when the systems default network mode has changed. Note: To receive this notification, you must first call startModeChanged.


    NetworkInfo::nameChanged ()

    This handler is called when network name has changed. Note: To receive this notification, you must first call startNameChanged.


    NetworkInfo::signalStrengthChanged ()

    This handler is called when network signal strength has changed. Note: To receive this notification, you must first call startSignalStrengthChanged.


    NetworkInfo::statusChanged ()

    This handler is called when network status has changed. Note: To receive this notification, you must first call startStatusChanged.


    Method Documentation

    NetworkInfo::currentMobileCountryCodeChanged ()

    This function is needed to start currentMobileCountryCodeChanged notification.


    NetworkInfo::currentMobileNetworkCodeChanged ()

    This function is needed to start currentMobileNetworkCodeChanged notification.


    NetworkInfo::interfaceForMode ()

    Returns the QNetworkInterface for this NetworkInfo.


    NetworkInfo::mode ()

    This function returns the mode set by useMode(QSystemNetworkInfo::NetworkMode mode);


    NetworkInfo::modeChanged ()

    This function is needed to start modeChanged notification.


    NetworkInfo::signalStrengthChanged ()

    This function is needed to start signalStrengthChanged notification.


    NetworkInfo::startStatusChanged ()

    This function is needed to start statusChanged notification


    X

    Thank you for giving your feedback.

    Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.