summaryrefslogtreecommitdiffstats
path: root/examples/sysinfo/dialog.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2010-12-10 13:20:47 +1000
committerLorn Potter <lorn.potter@nokia.com>2010-12-10 13:20:47 +1000
commitd25714f2d8dee10551bc43d4d4f38da919b088a8 (patch)
tree75d5f61f6c11c2522879e91bd1624d1a8dff1c27 /examples/sysinfo/dialog.cpp
parent04045083d7dd22385893afc81a4ea333f1744fd8 (diff)
add some new things.
Diffstat (limited to 'examples/sysinfo/dialog.cpp')
-rw-r--r--examples/sysinfo/dialog.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/examples/sysinfo/dialog.cpp b/examples/sysinfo/dialog.cpp
index c022a6b78e..236675d780 100644
--- a/examples/sysinfo/dialog.cpp
+++ b/examples/sysinfo/dialog.cpp
@@ -188,6 +188,53 @@ void Dialog::setupDevice()
uniqueIDLabel->setText(di->uniqueID());
+ updateKeyboard(di->keyboardType());
+
+ keyboardFlipRadioButton->setChecked(di->isKeyboardFlipOpen());
+ wirelessKeyboardConnectedRadioButton->setChecked(di->isWirelessKeyboardConnected());
+
+ QString lockState;
+ QSystemDeviceInfo::LockType lock = di->lockStatus();
+ switch(lock) {
+ case QSystemDeviceInfo::UnknownLock:
+ lockState = "Unknown";
+ break;
+ case QSystemDeviceInfo::DeviceLocked:
+ lockState = "Device Locked";
+ break;
+ case QSystemDeviceInfo::DeviceUnlocked:
+ lockState = "Device unlocked";
+ break;
+ case QSystemDeviceInfo::TouchAndKeyboardLocked:
+ lockState = "Touch and keyboard locked";
+ break;
+ };
+ lockStateLabel->setText(lockState);
+
+}
+
+void Dialog::updateKeyboard(QSystemDeviceInfo::KeyboardTypeFlags type)
+{
+
+ if((type & QSystemDeviceInfo::UnknownKeyboard)) {
+ uknownKeysRadioButton->setChecked(true);
+ }
+ if ((type & QSystemDeviceInfo::SoftwareKeyboard)) {
+ softkeysRadioButton->setChecked(true);
+ }
+ if ((type & QSystemDeviceInfo::ITUKeypad)) {
+ ituRadioButton->setChecked(true);
+ }
+ if ((type & QSystemDeviceInfo::HalfQwertyKeyboard)) {
+ halfKeysRadioButton->setChecked(true);
+ }
+ if ((type & QSystemDeviceInfo::FullQwertyKeyboard)) {
+ qwertyKeysRadioButton->setChecked(true);
+ }
+ if((type & QSystemDeviceInfo::WirelessKeyboard)) {
+ wirelessRadioButton->setChecked(true);
+ }
+ keyboardLightCheckBox->setChecked(di->keypadLightOn(QSystemDeviceInfo::PrimaryKeypad));
}
void Dialog::updateDeviceLockedState()
@@ -793,6 +840,11 @@ void Dialog::updateProfile()
}
};
profileLabel->setText(profilestring);
+
+ QSystemDeviceInfo::ActiveProfileDetails *pDetails = di->getActiveProfileDetails();
+ messageRingtonVolumeLcdNumber->display(pDetails->messageRingtoneVolume());
+ voiceRingtoneVolumeLcdNumber->display(pDetails->voiceRingtoneVolume());
+ vibrationActiveRadioButton->setChecked(pDetails->vibrationActive());
}
}