diff options
author | Xizhi Zhu <xizhi.zhu@nokia.com> | 2012-03-07 14:10:47 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-08 11:05:03 +0100 |
commit | d80ebe9593a1a0f39bc717faded72fe1d09a832d (patch) | |
tree | b6fa148e9877b584b5b5fa39a4e6993a1278ceb3 /src/imports | |
parent | c6fce65191e0ab5dd3ca5372fd550b757769c400 (diff) |
Several monitor* is now obsoleted, and to be removed soon.
Change-Id: Ife090989d0c027df9e4ed8c9835b972c5daaaf0f
Reviewed-by: Steffen Hahn <steffen.hahn@nokia.com>
Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/systeminfo/qdeclarativenetworkinfo.cpp | 25 | ||||
-rw-r--r-- | src/imports/systeminfo/qdeclarativenetworkinfo_p.h | 12 |
2 files changed, 26 insertions, 11 deletions
diff --git a/src/imports/systeminfo/qdeclarativenetworkinfo.cpp b/src/imports/systeminfo/qdeclarativenetworkinfo.cpp index 5c12faea..997d0fec 100644 --- a/src/imports/systeminfo/qdeclarativenetworkinfo.cpp +++ b/src/imports/systeminfo/qdeclarativenetworkinfo.cpp @@ -67,6 +67,17 @@ QDeclarativeNetworkInfo::QDeclarativeNetworkInfo(QObject *parent) , isMonitorLocationAreaCode(false) , isMonitorNetworkName(false) { + connect(networkInfo, SIGNAL(networkInterfaceCountChanged(QNetworkInfo::NetworkMode,int)), + this, SLOT(_q_networkInterfaceCountChanged(QNetworkInfo::NetworkMode,int))); + connect(networkInfo, SIGNAL(currentCellDataTechnologyChanged(int,QNetworkInfo::CellDataTechnology)), + this, SLOT(_q_currentCellDataTechnologyChanged(int,QNetworkInfo::CellDataTechnology))); + connect(networkInfo, SIGNAL(cellIdChanged(int,QString)), this, SIGNAL(cellIdChanged(int,QString))); + connect(networkInfo, SIGNAL(currentMobileCountryCodeChanged(int,QString)), + this, SIGNAL(currentMobileCountryCodeChanged(int,QString))); + connect(networkInfo, SIGNAL(currentMobileNetworkCodeChanged(int,QString)), + this, SIGNAL(currentMobileNetworkCodeChanged(int,QString))); + connect(networkInfo, SIGNAL(locationAreaCodeChanged(int,QString)), + this, SIGNAL(locationAreaCodeChanged(int,QString))); } /*! @@ -120,6 +131,8 @@ void QDeclarativeNetworkInfo::setMonitorCurrentNetworkMode(bool monitor) */ QDeclarativeNetworkInfo::NetworkMode QDeclarativeNetworkInfo::currentNetworkMode() const { + connect(networkInfo, SIGNAL(currentNetworkModeChanged(QNetworkInfo::NetworkMode)), + this, SIGNAL(currentNetworkModeChanged())); return static_cast<QDeclarativeNetworkInfo::NetworkMode>(networkInfo->currentNetworkMode()); } @@ -175,7 +188,7 @@ void QDeclarativeNetworkInfo::_q_networkSignalStrengthChanged(QNetworkInfo::Netw /*! \qmlproperty bool NetworkInfo::monitorNetworkInterfaceCount - This property holds whether or not monitor the change of network interface count. + This property is obsoleted, and will be removed soon. You don't need to use it at all. */ bool QDeclarativeNetworkInfo::monitorNetworkInterfaceCount() const { @@ -223,7 +236,7 @@ void QDeclarativeNetworkInfo::_q_networkInterfaceCountChanged(QNetworkInfo::Netw /*! \qmlproperty bool NetworkInfo::monitorCurrentCellDataTechnology - This property holds whether or not monitor the change of current cell data technology. + This property is obsoleted, and will be removed soon. You don't need to use it at all. */ bool QDeclarativeNetworkInfo::monitorCurrentCellDataTechnology() const { @@ -336,7 +349,7 @@ void QDeclarativeNetworkInfo::_q_networkStatusChanged(QNetworkInfo::NetworkMode /*! \qmlproperty bool NetworkInfo::monitorCellId - This property holds whether or not monitor the change of cell IDs. + This property is obsoleted, and will be removed soon. You don't need to use it at all. */ bool QDeclarativeNetworkInfo::monitorCellId() const { @@ -383,7 +396,7 @@ QString QDeclarativeNetworkInfo::cellId(int interface) const /*! \qmlproperty bool NetworkInfo::monitorCurrentMobileCountryCode - This property holds whether or not monitor the change of current mobile country code. + This property is obsoleted, and will be removed soon. You don't need to use it at all. */ bool QDeclarativeNetworkInfo::monitorCurrentMobileCountryCode() const { @@ -428,7 +441,7 @@ QString QDeclarativeNetworkInfo::currentMobileCountryCode(int interface) const /*! \qmlproperty bool NetworkInfo::monitorCurrentMobileNetworkCode - This property holds whether or not monitor the change of current mobile network code. + This property is obsoleted, and will be removed soon. You don't need to use it at all. */ bool QDeclarativeNetworkInfo::monitorCurrentMobileNetworkCode() const { @@ -473,7 +486,7 @@ QString QDeclarativeNetworkInfo::currentMobileNetworkCode(int interface) const /*! \qmlproperty bool NetworkInfo::monitorLocationAreaCode - This property holds whether or not monitor the change of location area code. + This property is obsoleted, and will be removed soon. You don't need to use it at all. */ bool QDeclarativeNetworkInfo::monitorLocationAreaCode() const { diff --git a/src/imports/systeminfo/qdeclarativenetworkinfo_p.h b/src/imports/systeminfo/qdeclarativenetworkinfo_p.h index d3fc1fd4..426f4450 100644 --- a/src/imports/systeminfo/qdeclarativenetworkinfo_p.h +++ b/src/imports/systeminfo/qdeclarativenetworkinfo_p.h @@ -66,18 +66,20 @@ class QDeclarativeNetworkInfo : public QObject Q_ENUMS(NetworkMode) Q_ENUMS(NetworkStatus) - Q_PROPERTY(bool monitorCurrentNetworkMode READ monitorCurrentNetworkMode WRITE setMonitorCurrentNetworkMode NOTIFY monitorCurrentNetworkModeChanged) Q_PROPERTY(bool monitorNetworkSignalStrength READ monitorNetworkSignalStrength WRITE setMonitorNetworkSignalStrength NOTIFY monitorNetworkSignalStrengthChanged) + Q_PROPERTY(bool monitorNetworkStatus READ monitorNetworkStatus WRITE setMonitorNetworkStatus NOTIFY monitorNetworkStatusChanged) + Q_PROPERTY(bool monitorNetworkName READ monitorNetworkName WRITE setMonitorNetworkName NOTIFY monitorNetworkNameChanged) + + Q_PROPERTY(NetworkMode currentNetworkMode READ currentNetworkMode NOTIFY currentNetworkModeChanged) + + // obsoleted + Q_PROPERTY(bool monitorCurrentNetworkMode READ monitorCurrentNetworkMode WRITE setMonitorCurrentNetworkMode NOTIFY monitorCurrentNetworkModeChanged) Q_PROPERTY(bool monitorNetworkInterfaceCount READ monitorNetworkInterfaceCount WRITE setMonitorNetworkInterfaceCount NOTIFY monitorNetworkInterfaceCountChanged) Q_PROPERTY(bool monitorCurrentCellDataTechnology READ monitorCurrentCellDataTechnology WRITE setMonitorCurrentCellDataTechnology NOTIFY monitorCurrentCellDataTechnologyChanged) - Q_PROPERTY(bool monitorNetworkStatus READ monitorNetworkStatus WRITE setMonitorNetworkStatus NOTIFY monitorNetworkStatusChanged) Q_PROPERTY(bool monitorCellId READ monitorCellId WRITE setMonitorCellId NOTIFY monitorCellIdChanged) Q_PROPERTY(bool monitorCurrentMobileCountryCode READ monitorCurrentMobileCountryCode WRITE setMonitorCurrentMobileCountryCode NOTIFY monitorCurrentMobileCountryCodeChanged) Q_PROPERTY(bool monitorCurrentMobileNetworkCode READ monitorCurrentMobileNetworkCode WRITE setMonitorCurrentMobileNetworkCode NOTIFY monitorCurrentMobileNetworkCodeChanged) Q_PROPERTY(bool monitorLocationAreaCode READ monitorLocationAreaCode WRITE setMonitorLocationAreaCode NOTIFY monitorLocationAreaCodeChanged) - Q_PROPERTY(bool monitorNetworkName READ monitorNetworkName WRITE setMonitorNetworkName NOTIFY monitorNetworkNameChanged) - - Q_PROPERTY(NetworkMode currentNetworkMode READ currentNetworkMode NOTIFY currentNetworkModeChanged) public: enum CellDataTechnology { |