aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgitemview_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Show header/footer if current index is set to first/last item or rowBea Lam2011-08-051-0/+2
| | | | | | | | Task-number: QTBUG-17853 Change-Id: I1d679cee31d6ee2a4bb2f2bf90f73eb12898189b Reviewed-on: http://codereview.qt.nokia.com/2664 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix outdated license headers.Jason McDonald2011-08-051-17/+17
| | | | | | | Change-Id: I81fd41433b03b13befe0b5c68ec248ea71e8c235 Reviewed-on: http://codereview.qt.nokia.com/2596 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Call base class init() from QSGListViewPrivateBea Lam2011-08-021-5/+6
| | | | | | | | | | | | | | | | Regression from 9b5f9c8056186c9cf3c40dbac66e5f90369339dc when QSGItemView was created. Also fixed other reimplemented methods in QSGListViewPrivate to call their base class functions (which are currently empty) and changed some virtual methods in QSGItemViewPrivate to non-virtual where they didn't need to be virtual. Task-number: QTBUG-20679 Change-Id: I489593b3eab4f5bbb4126906f170342d1e8811cd Reviewed-on: http://codereview.qt.nokia.com/2462 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Fix moving of multiple items, and moving items backwardsBea Lam2011-07-281-0/+1
| | | | | | | | | | | | | | To fix backward movements, all backward movements are now flipped into forward movements (as is done in ListModel implemenation). Movement of multiple items wasn't working as views weren't removing the right indexes in these cases. Task-number: QTBUG-19208 Change-Id: I9866ddabc241c066bb77329a6761d500d79aaf61 Reviewed-on: http://codereview.qt.nokia.com/2262 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Always position headers at a negative positionBea Lam2011-07-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Previously headers were either positioned at 0 if there were no items in the view, or at (0 - headerSize) if items were present. With this fix they are always positioned at (0 - headerSize) to be consistent. Due to the change, setPosition(-headerSize()) is now called from componentCompleted() to ensure the header is visible. This change also fixes GridView's header and footer positioning in TopToBottom + RightToLeft mode. Also added extra tests for header and footer positioning and fixed incorrect test value in tst_QSGGridView::positionViewAtIndex() (was 460 instead of 430 because previously rowPosAt() always added the header size, so if positionViewAtIndex() jumped past all visible items and caused them to be released, the new items started at +headerSize() instead of 0). Change-Id: I1015bed457d4ae964a7fb13702e2dfc470a168a9 Reviewed-on: http://codereview.qt.nokia.com/1618 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Make lastPosition() result consistent among GridView and ListViewBea Lam2011-07-211-3/+4
| | | | | | | | | | | | | | | | | | | lastPosition() returns the end position of the last item so it should always include a -1 calculation for the last item (as FxListItemSG::endPosition() and FxGridItemSG::endPosition() do) to get the last edge pixel of the item. With this fix, both views now calculate startPosition() and endPosition() in the same way. This also fixes positioning of GridView items in TopToBottom+RightToLeft layouts. Incorrect test values in positionViewAtIndex_rightToLeft() test are fixed (the last edge of a 1-pixel border shouldn't be visible, since the bottom edge of a 1-pixel border is actually drawn outside, not inside, the Rectangle). Change-Id: I253c3836f871c61e13c08f67007ebc75e09378d6 Reviewed-on: http://codereview.qt.nokia.com/1547 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Refactor ListView and GridView implementationsBea Lam2011-07-201-0/+208
Places common code into QSGItemView. Change-Id: Ic310dbe7e16774163ba393860da64a0da7d4ea0a Reviewed-on: http://codereview.qt.nokia.com/1200 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>