aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpathview.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Flickable: Use increased default flick parameters on BB10Oleg Shparber2013-12-111-16/+1
| | | | | | | | | | | | | | | Due to the high resolution the display default flicking speed is rather slow. This change introduces increased values of QML_FLICK_DEFAULTMAXVELOCITY and QML_FLICK_DEFAULTDECELERATION which feel closer to the native experience. Also cleans up the flick variables a little by moving them to their own header, so that QQuickPathView can also benefit from the improved behavior on BB10. Change-Id: I80878d4cc2a53a8f530b1dc8674f729f70a83119 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* moveOffset in QQuickPathView::modelUpdated uninitializedMarco Bubke2013-11-091-1/+1
| | | | | | | Get a error for compiling with gcc 2.8.1. Change-Id: If93ed69695fb523eff05cae2960e3743dc496310 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-11-051-1/+1
| | | | | | Change-Id: Ie7408409ddbaa354370267f2dd74326ec56a4186 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
* Remove ancient and unused leftoversGunnar Sletta2013-10-221-5/+3
| | | | | Change-Id: Ia3a2aa2244748c2f3f2df8853f5bddfbbc4bc19f Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-021-37/+37
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix PathView stealing mouse grab from its child items.Andrew den Exter2013-10-011-11/+22
| | | | | | | | | | Apply the improvements that have been applied to Flickables handling of child items over time to PathView to bring its behavior back in line. Task-number: QTBUG-33699 Change-Id: I76a412d75c48f9cf2f12f5f6f1aa01ff62d06364 Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Fixed and updated Qt Quick's \qmlmodule pageJerome Pasion2013-09-251-1/+1
| | | | | | | | | | | -incremented version to Qt Quick 2.2 (in \qmlmodule page) -import changed to QtQuick 2.2 -\inqmlmodule no longer needs the version. QDoc will ignore the version but it is better to remove it now to avoid confusion Task-number: QTBUG-32172 Change-Id: I40b52e59667014720be40a35b3a8fb9836825e31 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: PathView::currentItem is an Item, not an int.David Faure2013-09-171-4/+4
| | | | | | Change-Id: If06c747b424ac8dd6b880aa296af5e5957bb9b51 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Clean up docs for PathView.highlightRangeMode enum valuesTopi Reinio2013-08-011-16/+19
| | | | | | | | | Fix PathView.NoHighlightRange description, move the enum values into a list, and do some minor editing. Task-number: QTBUG-16160 Change-Id: I5356c21ea3244ce43defa346da11696a8706c71f Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix lupdate-warning "Cannot invoke tr() like this".Friedemann Kleint2013-04-231-1/+1
| | | | | Change-Id: I3ded3d9ab9fa202a3133c53fd6e17a8354481d0c Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Move the model classes from QtQuick to QtQmlAlan Alpert2013-01-241-33/+51
| | | | | | | | | | | | | | | | | | | | | | | | This is needed for proper support of non-GUI instantiators in QtQml. Only private C++ classes are affected. Aside from name changes, model classes now operate on QObjects instead of QQuickItems, leading to minor changes in the implementation of QtQuick classes using them. The old QML type names will still be registered in the QtQuick import for the forseeable future, but pointing to the new classes. The new QML types will be added in a second commit. Classes Affected: QQuickVisualDataGroup -> QQmlDataGroup QQuickVisualDataModel -> QQmlDelegateModel QQuickVisualItemModel -> QQmlObjectModel QQuickVisualModel -> QQmlInstanceModel QQuickChangeSet -> QQmlChangeSet QQuickListAccessor -> QQmlListAccessor QQuickListCompositor -> QQmlListCompositor QQuickPackage -> QQuickPackage (just moved for now) Change-Id: Ia19e630e53bfa9e5d459e289596cd11df1ea3930 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Fix crash in PathViewTasuku Suzuki2013-01-181-3/+7
| | | | | | Change-Id: I259e7af1755ff9615782bbce03fc41ea1957cab3 Task-number: QTBUG-29176 Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add cacheItemCount property to PathViewMartin Jones2012-08-281-52/+115
| | | | | | | | | | | | cacheItemCount specifies the number of items to cache off the path when pathItemCount is specified. This allows up to cacheItemCount items to be kept alive when they move off the path, and also to asynchronously create items off path in preparation for display when the path offset changes. This is the equivalent of cacheBuffer for other views. Task-number: QTBUG-23931 Change-Id: I03497537d3f929e5e3579536850dd43eb2724c38 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Various small doc fixes and improvementsBea Lam2012-08-091-0/+4
| | | | | | | | | | Adds some missing docs and fixes some incorrect doc references. Also removes AnimatedImage docs that were exactly the same as those in base Image type docs. Change-Id: I1357d3c00e63f1b08683bb78246de93dcc0dac7f Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix various broken links in documentationBea Lam2012-08-031-3/+3
| | | | | Change-Id: I9e2dac37d18e3ca62e4a92be25e5c2e60ffeba00 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiates.Jerome Pasion2012-07-301-1/+2
| | | | | | | | | | -To simplify QDoc, \qmlclass is now \qmltype. -'\instantiates <C+++ class>' is for the types that are defined in C++. Change-Id: I29242d33daf7b972d8b86a356b9689638866b950 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Remove QListModelInterface.Andrew den Exter2012-07-251-1/+0
| | | | | | | | | | Implement ListModel and XmlListModel using QAbstractListModel instead. Task-number: QTBUG-15728 Change-Id: I14e03d90883d341f4b1d89c1e9fc9dc1534fde78 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Add methods to PathView: positionViewAtIndex(), indexAt(), itemAt()Martin Jones2012-07-231-0/+150
| | | | | | | These methods are already present in ListView and GridView. Change-Id: I3777fccdecd77c8ab756a0062c71c6e1bfb749ef Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Changing PathView model after componentComplete should reset positionMartin Jones2012-07-231-23/+37
| | | | | | | | 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>
* QQuickCanvas renamesAlan Alpert2012-07-171-2/+2
| | | | | | | | | | | | | | | | 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>
* Change Quick docs to refer to "types" rather than "elements"Martin Jones2012-07-161-4/+4
| | | | | | Task-number: QTBUG-24785 Change-Id: I223479b879514abaacb123852323c1cfada7a5e1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* PathView needs drag events similar to FlickableMartin Jones2012-07-041-1/+47
| | | | | | | | 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>
* PathView element with 1 item moves in wrong direction when dragged rightMartin Jones2012-06-271-2/+2
| | | | | | | | | | The shortest direction calculation used integer math to determine which direction to move. For an odd modelCount, the wrong direction could be chosen. For a modelCount of 1 it was particularly obvious. Task-number: QTBUG-21337 Change-Id: I5e75c74153a5b4c62d1536226cd0703dcae04178 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Changing PathView offset doesn't set currentIndex appropriatelyMartin Jones2012-06-271-1/+3
| | | | | | | | | 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>
* Create new documentation structureChris Adams2012-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | The documentation currently has no clear separation between Qt QML and Qt Quick. With recent commits like: 6c8378eaf1edbbefe6aaa3672b0127816a004fd7 and ab1e510121c8a679fdaca12ccd30e0f7ac12a26b the separation between the language definition and implementation, provided by Qt QML, and the standard library for the QML language, provided by Qt Quick, is clear. This commit creates a new documentation structure that is more navigable and separates concepts into logical categories, with clear separation between QtQML and QtQuick. It also provides a more generic QML Application Developer Resources page which contains links to information for QML application developers. Change-Id: Ia807ccfbfd24ffa0e1c7f0a51ed9d2ed3aa6a733 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Doc: Grouped Qt Quick types into several groupsJerome Pasion2012-06-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -created new groups and converted some overviews into group pages -edited type documentation and added \ingroup -articles still need title fixes and link fixes Groups: qtquick-visual-types qtquick-item-graphics qtquick-shaders qtquick-canvas qtquick-text qtquick-text-validator qtquick-interaction qtquick-positioners qtquick-transformations qtquick-states qtquick-animation-define qtquick-animation-properties qtquick-animation-control qtquick-animation-modifiers qtquick-images-sprites qtquick-images qtquick-models qtquick-containers qtquick-views qtquick-paths qtquick-utility Task: QTBUG-25685 Change-Id: I81d4df3320bf5daad5cabb5e42408013fb24f464 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix doc snippets paths and parsing errorsBea Lam2012-05-311-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtqml.qdocconf and qtquick.qdocconf now refer to the correct snippets and source directories. Snippet paths in .qdoc and .cpp files have been updated to refer to the new shortened path references, e.g. \snippet qml/file.cpp instead of \snippet doc/src/snippets/qml/file.cpp. This also deletes snippets from src/qml/doc/snippets that belonged under src/quick/doc/snippets (and were already duplicated there anyway) and restores some snippet files that shouldn't have been deleted. Also fixes some inline snippets to use \code .. \endcode instead of \qml .. \endqml as they contained javascript or partial QML snippets that were causing parsing errors from qdoc. There are still snippet errors arising from qmlintro.qdoc as the qmlintro snippets directory that it refers to cannot be located. There are also two references to a removed snippet identifier in examples/qml/cppextensions/plugins/plugin.cpp that need to be fixed in conjunction with the related docs in a later commit as the relevant code has changed and the docs are now invalid. Task-number: QTBUG-25721 Change-Id: I50c665245a74c140470c58a32546591d187dfe4b Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Reset the PathView currentIndex to 0 when all items are removed.Andrew den Exter2012-05-311-11/+9
| | | | | | | | | | | | | 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>
* Fix PathView not updating after all items are removed from the model.Andrew den Exter2012-05-281-1/+3
| | | | | | | | | | | | 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>
* Don't parent (QObject) delegate items to views.Andrew den Exter2012-05-281-2/+0
| | | | | | | | | | | | This keeps object ownership within the context the items were created in and simplifies lifetime management as the VisualDataModel has sole license to delete objects and doesn't have to keep guards against a view and all it's children being deleted. Delegates are still reparented in the item heirarchy. Change-Id: Ife5afdfe294a5a8ca1ca3638a086f72452e4915c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Doc: Sanitized QML typesNico Vertriest2012-05-241-1/+1
| | | | | | | | | | -modified \brief -checked QML modules -added qml directory to the qdocconf file -added particles directory to the qdocconf file Change-Id: I589e32d3106cda37c7fa4d55a941afd9876fc2b2 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Lazily create QMetaObjectsAaron Kennedy2012-05-241-12/+20
| | | | | | | | | | For internal QML built types, creating a metaobject each time is just wasteful. Additionally, as the property caches were always created from the intermediate QMetaObject, it was difficult to pass information directly from the compiler to the property cache. Change-Id: I769526b0edaaf16a86883f3065b75618b94e4077 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* PathView was moving view too soon on dragMartin Jones2012-05-141-4/+2
| | | | | | | | 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>
* Doc: Moving Qt Quick docs for new doc structureGeir Vattekar2012-05-091-5/+5
| | | | | | | | | | | | | | | -moved documentation from doc/src/qtquick2 doc/src/localstorage doc/src/particles to src/quick/doc/ -fixed qdocconf file -fixed snippets, images, and other qdoc errors related to the new directories -fixed links in the main Qt Quick page Change-Id: Ie3408c2624f623c17de07e5635d5c7284d02b973 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* QtDeclarative: Fix compiler warnings.Friedemann Kleint2012-04-231-1/+0
| | | | | | | | | | - QString from ASCII conversion, remove global-static QString variable from class. - Signed/unsigned comparison. - Unused variable. Change-Id: I4ea3e72da85ba7ed329196d39085d7bba8bfa389 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add contains method to QQuickItem public APIAdriano Rezende2012-04-191-7/+6
| | | | | | | | This method can be overwritten in order to provide fine grained control over the mouse events handled by the item. Change-Id: I23cb61958d3ac0b2f5091c47fa9e0ed07dc5e5d0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Support snapMode in PathViewMartin Jones2012-04-041-42/+101
| | | | | | | | PathView missed out on snapMode, which is especially useful for its SnapOneItem mode. Change-Id: I0e9b080ef72d9bc1e305445cd8dfde8e21e4e3da Reviewed-by: Bea Lam <bea.lam@nokia.com>
* PathView was missing the maximumFlickVelocity propertyMartin Jones2012-03-261-7/+62
| | | | | Change-Id: I0ed4ff0fe169187f7a8e03597be7407e9896100d Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Restore view to sensible position if grab is cancelled.Martin Jones2012-03-201-0/+3
| | | | | | | If the mouse grab is stolen, return to allowed bounds. Change-Id: Icc44da32ff62bed273f0ccbb5498766981cdf9a4 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-131-3/+3
| | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I62d203f21df63a95ee236e578b10418fd9680707 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Improve interaction of nested Flickables and PathViewMartin Jones2012-03-131-1/+3
| | | | | | | | | Don't require a flick to come to a complete stop before allowing another flickable element to begin its gesture. Change-Id: I74c1998e01e04c70c76253cd09edc02f593123d0 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-34/+35
| | | | | | | | | | | | | 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>
* Flicking a pathview with large delegate spacing is inconsistentMartin Jones2012-02-211-11/+64
| | | | | | | | | | | | The deceleration is inconsistent and dragging slowly is jerky. This was largely due to the poor resolution of the path points. pointAt() now interpolates, and the dragging logic is more accurate. Also removed the rounding of item positioning so that side-by-side items don't bounce around. Task-number: QTBUG-24312 Change-Id: I956aff0b83c3c1211d5657159c3de1e4ef0b5171 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove warnings with clangYann Bodson2012-02-071-4/+4
| | | | | Change-Id: I924f0adc036b47e2342bf383d308c6a5269c2de6 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>