Add containsPress property to MouseArea
authorMartin Jones <martin.jones@jollamobile.com>
Fri, 11 Jul 2014 04:10:49 +0000 (14:10 +1000)
committerMartin Jones <martin.jones@jollamobile.com>
Wed, 16 Jul 2014 05:54:58 +0000 (07:54 +0200)
commit112efda64ba24e7d9255a36065223e9800a50c21
treec35446169d49b7ab4d4bf9a21b983cbc251206a5
parent427bee6cb616d515ae04bc47193e35e19e1b519e
Add containsPress property to MouseArea

It is very common to use pressed and containsMouse properties
together to highlight a pressed item, e.g.

    property bool highlighted: pressed && containsMouse

The containsPress property allows simplification and optimization of
user code.

[ChangeLog][QtQuick] Add containsPress property to MouseArea

Task-number: QTBUG-40130
Change-Id: Ie286d431154eb37a99e57e4cf881d68d7cbbe31d
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
examples/quick/mousearea/doc/src/mousearea.qdoc
examples/quick/mousearea/mousearea.qml
src/quick/items/qquickitemsmodule.cpp
src/quick/items/qquickmousearea.cpp
src/quick/items/qquickmousearea_p.h
tests/auto/quick/qquickmousearea/data/containsPress.qml [new file with mode: 0644]
tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp