Add attached properties to the positioners.
authorGlenn Watson <glenn.watson@nokia.com>
Tue, 16 Aug 2011 01:48:14 +0000 (11:48 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 17 Aug 2011 22:24:09 +0000 (00:24 +0200)
commit74f3a67fe80fecf7ba2fd76e1758b6c0f68ce918
tree1f50ac2696414113387da29de3213c9ed494ec68
parentdc5644758a2cdbe67111e3471488b89b1ddddd8c
Add attached properties to the positioners.

Added an attached property type to the base positioner class.
This allows items within a positioner (Row, Column, Grid, Flow) to
determine their index inside the positioner, as well as whether
they are the first or last items. Non-visible items are ignored,
as in the positioner layout objects themselves. It may be useful
to expand this in the future to contain more information specific
to the positioner, for example row/column for Grid.

Task-number: QTBUG-19211
Change-Id: I10a8c9ca5528dd12811125cae8a9b4d2e3747972
Reviewed-on: http://codereview.qt.nokia.com/2983
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 files changed:
doc/src/declarative/whatsnew.qdoc
examples/declarative/positioners/positioners-attachedproperties.qml [new file with mode: 0644]
src/declarative/items/qsgitemsmodule.cpp
src/declarative/items/qsgpositioners.cpp
src/declarative/items/qsgpositioners_p.h
tests/auto/declarative/qsgpositioners/data/attachedproperties-column.qml [new file with mode: 0644]
tests/auto/declarative/qsgpositioners/data/attachedproperties-dynamic.qml [new file with mode: 0644]
tests/auto/declarative/qsgpositioners/data/attachedproperties-flow.qml [new file with mode: 0644]
tests/auto/declarative/qsgpositioners/data/attachedproperties-grid.qml [new file with mode: 0644]
tests/auto/declarative/qsgpositioners/data/attachedproperties-row.qml [new file with mode: 0644]
tests/auto/declarative/qsgpositioners/data/rectangleComponent.qml [new file with mode: 0644]
tests/auto/declarative/qsgpositioners/tst_qsgpositioners.cpp