Commit Graph

15 Commits

Author SHA1 Message Date
Friedemann Kleint c20463631d QtQuick: Remove usages of qWaitForWindowShown(QWindow *).
Change-Id: I722e20b2fb8d8c6c19c6f3f2cb16910d7433e9a4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-24 16:53:08 +02:00
Martin Jones 2a4bb96084 Add methods to PathView: positionViewAtIndex(), indexAt(), itemAt()
These methods are already present in ListView and GridView.

Change-Id: I3777fccdecd77c8ab756a0062c71c6e1bfb749ef
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-07-23 06:38:18 +02:00
Martin Jones 0fc361f96b Changing PathView model after componentComplete should reset position
If the model is changed after the component is completed, the offset
and currentIndex should be reset to 0.

Change-Id: Ie36eb0c17ce6602c6ae15b5ee7aeb8b1a6e7854b
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-07-23 03:30:23 +02:00
Friedemann Kleint bd618f62d8 QtDeclarative: Remove usage of deprecated qWaitForWindowShown().
- Replace by qWaitForWindowExposed() or
  qWaitForWindowActive() where applicable.
- Use QVERIFY to verify success.
- Stabilize some tests by checking for 'active',
  add missing call to show().

Change-Id: I6cae063e44a3839760ed9f61dacb26cd1717118d
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-19 14:37:49 +02:00
Alan Alpert feb996e3ab QQuickCanvas renames
QQuickCanvas is now called QQuickWindow
QQuickCanvas::rootItem is now QQuickWindow::contentItem
QQuickItem::canvas is now QQuickItem::window
QQuickItem::ItemChangeData::canvas is also renamed window
QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow
The functions related to the color property have dropped the clear from
their names.

The first three changes have interim compatibility measures in place to
ease the transition.

Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-07-17 07:26:15 +02:00
Martin Jones 6a013bf73b PathView needs drag events similar to Flickable
Added dragging property and dragStarted() and dragEnded() signals.

Task-number: QTBUG-21740
Change-Id: I718835ff7e46af615951ec5f248eba41bac31071
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-07-04 10:12:10 +02:00
Martin Jones 7722786a13 Changing PathView offset doesn't set currentIndex appropriately
If the highlightRangeMode is StrictlyEnforceRange then the
currentIndex should always be updated when the path offset changes.

Task-number: QTBUG-19835
Change-Id: I2371e5abd430e770bbb8f9f9d5f4e1d17e0d8ff5
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-06-27 08:49:46 +02:00
Martin Jones 805c30e809 Allow qtdeclarative to compile with -no-widgets
We have no hard requirement for QtWidgets library, so we should
build without it.

Change-Id: I85c85cc1a52bf9daa7ab7916f19bf7cc3ad5845f
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
2012-06-05 04:35:50 +02:00
Andrew den Exter 447e5acb88 Reset the PathView currentIndex to 0 when all items are removed.
The default currentIndex for an empty PathView is 0, and except when
there is no model or an empty model setCurrentIndex won't allow a
currentIndex outside the valid index range for the model. This changes
the wrapping for negative numbers in setCurrentIndex so that it is
consistent with decrementCurrentIndex and forces the currentIndex to
0 if there are no model items.

Task-number: QTBUG-21316
Change-Id: Id4d4d78e9832d05baf8a9d148e7f81ee89c9bc61
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-05-31 02:23:00 +02:00
Andrew den Exter 2533a40cf2 Fix PathView not updating after all items are removed from the model.
Always clear the layoutScheduled flag on a refill even if there are no
items to create, otherwise future layouts won't be scheduled because
it appears one is already pending.

Fixes an issue in the dragselection example where items that should
have moved to the PathView instead disappeared.

Change-Id: I4302b5b43184c697a78f5c09dc3811326e2271ca
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-05-28 05:30:34 +02:00
Martin Jones 9575a325c2 PathView was moving view too soon on drag
In order to allow gesture grabbing to work correctly, the view shouldn't
react to a drag until the event after the one that triggered it.

Change-Id: I3b84e501aa0f82da821498fa26abe8bbf66a6252
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-05-14 05:37:29 +02:00
Martin Jones 912c25633e Support snapMode in PathView
PathView missed out on snapMode, which is especially useful for
its SnapOneItem mode.

Change-Id: I0e9b080ef72d9bc1e305445cd8dfde8e21e4e3da
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-04-04 06:00:40 +02:00
Martin Jones adb8811e96 PathView was missing the maximumFlickVelocity property
Change-Id: I0ed4ff0fe169187f7a8e03597be7407e9896100d
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-03-26 06:10:56 +02:00
Martin Jones 5d901a7435 Restore view to sensible position if grab is cancelled.
If the mouse grab is stolen, return to allowed bounds.

Change-Id: Icc44da32ff62bed273f0ccbb5498766981cdf9a4
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-03-20 04:24:32 +01:00
Matthew Vogt b855240b78 Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.

Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.

Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-24 04:51:31 +01:00