summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <aportale@trolltech.com>2009-09-19 11:37:38 (GMT)
committerAlessandro Portale <aportale@trolltech.com>2009-09-19 11:37:38 (GMT)
commitcd48ed92670a0d086589b202364f38f14e7221c9 (patch)
treea3e9d51e75822a1380699d7cd5fb87ee1522239d /src/gui/kernel/qapplication.cpp
parent3581668cd0ffbe47a05ce7467f8d89b8c9bb6101 (diff)
downloadQt-cd48ed92670a0d086589b202364f38f14e7221c9.zip
Qt-cd48ed92670a0d086589b202364f38f14e7221c9.tar.gz
Qt-cd48ed92670a0d086589b202364f38f14e7221c9.tar.bz2
Making Keypad Navigation more usable
All changes of this commit are #ifdef'ed in QT_KEYPAD_NAVIGATION. Most desktop Qts won't notice any change. Navigating between QWidgets was not alwys a pleasure on keypad devices. This commit fixes the navigation behavior for some widgets, mostly itemviews. Furthermore, it adds a 'directional' navigation mode. Until now, the existing keypad navigation used the tab order do go back and forth between widgets. The new mode is supposed to provide a more intuitive navigation. It is the new default mode on Symbian. Screens (and their resolutions) become bigger, and also low resolution screens can be used in landscape mode. That's why the directional mode was requested. Another popular request was to put some more convenience into QSlider: If a (horizontal) slider has focus and the user presses left/right, the value of the slider may directing change without being selected (edit mode). This commit also adds the manual test 'keypadnavigation'. Reviewed-by: Shane Kearns
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r--src/gui/kernel/qapplication.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 0ff7314..df4a935 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -4781,13 +4781,13 @@ void QApplicationPrivate::emitLastWindowClosed()
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
QT_KEYPAD_NAVIGATION defined.
-
+
\note On Symbian, setting the mode to Qt::NavigationModeCursorAuto will enable a
virtual mouse cursor on non touchscreen devices, which is controlled
by the cursor keys if there is no analog pointer device.
On other platforms and on touchscreen devices, it has the same
meaning as Qt::NavigationModeNone.
-
+
\since 4.6
\sa keypadNavigationEnabled()
@@ -4810,10 +4810,10 @@ void QApplication::setNavigationMode(Qt::NavigationMode mode)
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
QT_KEYPAD_NAVIGATION defined.
-
+
\note On Symbian, the default mode is Qt::NavigationModeNone for touch
devices, and Qt::NavigationModeKeypadDirectional.
-
+
\since 4.6
\sa keypadNavigationEnabled()
@@ -4829,12 +4829,11 @@ Qt::NavigationMode QApplication::navigationMode()
This feature is available in Qt for Embedded Linux, Symbian and Windows CE
only.
-
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
QT_KEYPAD_NAVIGATION defined.
-
+
\deprecated
\sa setNavigationMode()
@@ -4846,7 +4845,7 @@ void QApplication::setKeypadNavigationEnabled(bool enable)
QApplication::setNavigationMode(Qt::NavigationModeKeypadDirectional);
#else
QApplication::setNavigationMode(Qt::NavigationModeKeypadTabOrder);
-#endif
+#endif
}
else {
QApplication::setNavigationMode(Qt::NavigationModeNone);
@@ -4863,7 +4862,7 @@ void QApplication::setKeypadNavigationEnabled(bool enable)
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
QT_KEYPAD_NAVIGATION defined.
-
+
\deprecated
\sa navigationMode()