summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxitem.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-08-05 07:05:59 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-08-05 07:05:59 (GMT)
commit351257e7553817ea77a7d2d9738456200fc08b68 (patch)
tree8b80b622dc6c5c6a90600cdf981c85a1acee201d /src/declarative/fx/qfxitem.cpp
parentf55cf4660a9986c83de4573be5ad8444234d2324 (diff)
downloadQt-351257e7553817ea77a7d2d9738456200fc08b68.zip
Qt-351257e7553817ea77a7d2d9738456200fc08b68.tar.gz
Qt-351257e7553817ea77a7d2d9738456200fc08b68.tar.bz2
Document keepMouseFocus
Diffstat (limited to 'src/declarative/fx/qfxitem.cpp')
-rw-r--r--src/declarative/fx/qfxitem.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index b081edc..3411f03 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -1281,8 +1281,10 @@ void QFxItem::setBaselineOffset(qreal offset)
*/
/*!
- Returns a value indicating whether the mouse should
- remain with this item.
+ Returns a value indicating whether mouse input should
+ remain with this item exclusively.
+
+ \sa setKeepMouseGrab
*/
bool QFxItem::keepMouseGrab() const
{
@@ -1293,6 +1295,20 @@ bool QFxItem::keepMouseGrab() const
/*!
The flag indicating whether the mouse should remain
with this item is set to \a keep.
+
+ This is useful for items that wish to grab and keep mouse
+ interaction following a predefined gesture. For example,
+ an item that is interested in horizontal mouse movement
+ may set keepMouseGrab to true once a threshold has been
+ exceeded. Once keepMouseGrab has been set to true, filtering
+ items will not react to mouse events.
+
+ If the item does not indicate that it wishes to retain mouse grab,
+ a filtering item may steal the grab. For example, Flickable may attempt
+ to steal a mouse grab if it detects that the user has begun to
+ move the viewport.
+
+ \sa keepMouseGrab
*/
void QFxItem::setKeepMouseGrab(bool keep)
{