diff options
author | kranthi <kranthi.kumar-kuntala@nokia.com> | 2011-02-18 10:17:39 +0200 |
---|---|---|
committer | kranthi <kranthi.kumar-kuntala@nokia.com> | 2011-02-18 10:39:38 +0200 |
commit | 212d69f174ca87431e22876cd1ee2bd5644965f6 (patch) | |
tree | 2b1b3192a4cda1946d7a31e12ee52f27296690b0 /examples/sysinfo/dialog.cpp | |
parent | 362011b3b75e4d7fff232e7ff3acf6a1fd658c4d (diff) |
Thermal State and Changes example and auto tests added
Diffstat (limited to 'examples/sysinfo/dialog.cpp')
-rw-r--r-- | examples/sysinfo/dialog.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/examples/sysinfo/dialog.cpp b/examples/sysinfo/dialog.cpp index efcc46e515..301342866f 100644 --- a/examples/sysinfo/dialog.cpp +++ b/examples/sysinfo/dialog.cpp @@ -153,6 +153,7 @@ void Dialog::setupDevice() deviceLockPushButton->setChecked(di->isDeviceLocked()); updateSimStatus(); + updateThermalState(); updateProfile(); connect(di, SIGNAL(currentProfileChanged(QSystemDeviceInfo::Profile)), @@ -841,7 +842,6 @@ void Dialog::updateSimStatus() case QSystemDeviceInfo::SingleSimAvailable: { simstring = "Single Sim Available"; - } break; case QSystemDeviceInfo::DualSimAvailable: @@ -855,6 +855,40 @@ void Dialog::updateSimStatus() } } +void Dialog::updateThermalState() +{ + if(di) { + QString thermalState; + switch (di->currentThermalState()) { + case QSystemDeviceInfo::UnknownThermal: + { + thermalState = "Unknown"; + } + break; + case QSystemDeviceInfo::NormalThermal: + { + thermalState = "Normal"; + } + break; + case QSystemDeviceInfo::WarningThermal: + { + thermalState = "Warning"; + } + break; + case QSystemDeviceInfo::AlertThermal: + { + thermalState = "Alert"; + } + break; + case QSystemDeviceInfo::ErrorThermal: + { + thermalState = "Error"; + } + break; + }; + thermalStateLabel->setText(thermalState); + } +} void Dialog::storageChanged(bool added,const QString &volName) { |