summaryrefslogtreecommitdiffstats
path: root/examples/sysinfo/dialog.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2011-01-13 15:28:28 +1000
committerLorn Potter <lorn.potter@nokia.com>2011-01-13 15:28:28 +1000
commit9a8840abd5ea0900114311a26fea7864b472030a (patch)
treecb3b3e8fc2d898aa816c35a3c717acb72a05bc69 /examples/sysinfo/dialog.cpp
parent3d69c5d15db8f032bd11dd68dc628516e278e4e8 (diff)
fix keyboard types in gui
Diffstat (limited to 'examples/sysinfo/dialog.cpp')
-rw-r--r--examples/sysinfo/dialog.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/examples/sysinfo/dialog.cpp b/examples/sysinfo/dialog.cpp
index 83af9cbd8d..1868c13285 100644
--- a/examples/sysinfo/dialog.cpp
+++ b/examples/sysinfo/dialog.cpp
@@ -161,23 +161,23 @@ void Dialog::setupDevice()
//! [inputMethod flags]
QSystemDeviceInfo::InputMethodFlags methods = di->inputMethodType();
QStringList inputs;
- if((methods & QSystemDeviceInfo::Keys)){
+ if((methods & QSystemDeviceInfo::Keys)=QSystemDeviceInfo::Keypad){
inputs << "Keys";
}
- if((methods & QSystemDeviceInfo::Keypad)) {
+ if((methods & QSystemDeviceInfo::Keypad)=QSystemDeviceInfo::Keypad) {
inputs << "Keypad";
}
//! [inputMethod flags]
- if((methods & QSystemDeviceInfo::Keyboard)) {
+ if((methods & QSystemDeviceInfo::Keyboard)=QSystemDeviceInfo::Keyboard) {
inputs << "Keyboard";
}
- if((methods & QSystemDeviceInfo::SingleTouch)) {
+ if((methods & QSystemDeviceInfo::SingleTouch)=QSystemDeviceInfo::SingleTouch) {
inputs << "Touch Screen";
}
- if((methods & QSystemDeviceInfo::MultiTouch)) {
+ if((methods & QSystemDeviceInfo::MultiTouch)=QSystemDeviceInfo::MultiTouch) {
inputs << "Multi touch";
}
- if((methods & QSystemDeviceInfo::Mouse)){
+ if((methods & QSystemDeviceInfo::Mouse)=QSystemDeviceInfo::Mouse){
inputs << "Mouse";
}
@@ -210,24 +210,20 @@ void Dialog::setupDevice()
void Dialog::updateKeyboard(QSystemDeviceInfo::KeyboardTypeFlags type)
{
- if((type & QSystemDeviceInfo::UnknownKeyboard)) {
- uknownKeysRadioButton->setChecked(true);
- }
if ((type & QSystemDeviceInfo::SoftwareKeyboard)) {
softkeysRadioButton->setChecked(true);
- }
- if ((type & QSystemDeviceInfo::ITUKeypad)) {
+ } else if ((type & QSystemDeviceInfo::ITUKeypad)) {
ituRadioButton->setChecked(true);
- }
- if ((type & QSystemDeviceInfo::HalfQwertyKeyboard)) {
+ } else if ((type & QSystemDeviceInfo::HalfQwertyKeyboard)) {
halfKeysRadioButton->setChecked(true);
- }
- if ((type & QSystemDeviceInfo::FullQwertyKeyboard)) {
+ } else if ((type & QSystemDeviceInfo::FullQwertyKeyboard)) {
qwertyKeysRadioButton->setChecked(true);
- }
- if((type & QSystemDeviceInfo::WirelessKeyboard)) {
+ } else if((type & QSystemDeviceInfo::WirelessKeyboard)) {
wirelessRadioButton->setChecked(true);
+ } else {
+ uknownKeysRadioButton->setChecked(true);
}
+
keyboardLightCheckBox->setChecked(di->keypadLightOn(QSystemDeviceInfo::PrimaryKeypad));
}