Add DropArea item and Drag attached property.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Mon, 12 Sep 2011 04:17:08 +0000 (14:17 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 10 Oct 2011 03:48:01 +0000 (05:48 +0200)
commitc825865cdd88445aa1db94cdf0da89426919acdb
tree93418f7a0ab78ddb3b51e59b0a30e30d3c1872b5
parent65bf7aa06a59790d0aea30b909577747510bb5d1
Add DropArea item and Drag attached property.

Refactors drag API to improve compatibility with traditional drag and
drop by reusing events and adding drop actions.

Event sending is removed from MouseArea, instead the Drag object can
be attached to the item that is dragged and it will send drag events
when the position of that item is changed or when its active
property changes.

The DragTarget item is renamed to DropArea and can now communicate
supported and suggested actions.

Task-number: QTBUG-19747
Change-Id: I46cb77e68cf1ff32bbcbf0945facb593c9c2243c
Reviewed-on: http://codereview.qt-project.org/4638
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
33 files changed:
doc/src/snippets/declarative/drag.qml [new file with mode: 0644]
examples/declarative/draganddrop/dragtarget.qmlproject [moved from examples/declarative/dragtarget/dragtarget.qmlproject with 100% similarity]
examples/declarative/draganddrop/tiles/DragTile.qml [moved from examples/declarative/dragtarget/tiles/DragTile.qml with 63% similarity]
examples/declarative/draganddrop/tiles/DropTile.qml [moved from examples/declarative/dragtarget/tiles/DropTile.qml with 85% similarity]
examples/declarative/draganddrop/tiles/tiles.qml [moved from examples/declarative/dragtarget/tiles/tiles.qml with 87% similarity]
examples/declarative/draganddrop/views/gridview.qml [new file with mode: 0644]
examples/declarative/dragtarget/lists/listmodel.qml [deleted file]
examples/declarative/dragtarget/lists/lists.qmlproject [deleted file]
examples/declarative/dragtarget/text/dragtext.qml [deleted file]
examples/declarative/dragtarget/text/text.qmlproject [deleted file]
examples/declarative/modelviews/visualdatamodel/dragselection.qml
src/declarative/items/items.pri
src/declarative/items/qsgcanvas.cpp
src/declarative/items/qsgcanvas_p.h
src/declarative/items/qsgdrag.cpp [new file with mode: 0644]
src/declarative/items/qsgdrag_p.h [new file with mode: 0644]
src/declarative/items/qsgdragtarget.cpp [deleted file]
src/declarative/items/qsgdroparea.cpp [new file with mode: 0644]
src/declarative/items/qsgdroparea_p.h [moved from src/declarative/items/qsgdragtarget_p.h with 50% similarity]
src/declarative/items/qsgevent.h [deleted file]
src/declarative/items/qsgitem.cpp
src/declarative/items/qsgitem.h
src/declarative/items/qsgitem_p.h
src/declarative/items/qsgitemsmodule.cpp
src/declarative/items/qsgmousearea.cpp
src/declarative/items/qsgmousearea_p.h
src/declarative/items/qsgmousearea_p_p.h
tests/auto/declarative/declarative.pro
tests/auto/declarative/qsgdrag/qsgdrag.pro [new file with mode: 0644]
tests/auto/declarative/qsgdrag/tst_qsgdrag.cpp [new file with mode: 0644]
tests/auto/declarative/qsgdroparea/qsgdroparea.pro [new file with mode: 0644]
tests/auto/declarative/qsgdroparea/tst_qsgdroparea.cpp [new file with mode: 0644]
tools/qmlplugindump/main.cpp