aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicklistview_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QQuickListView: prevent mouse delivery in floating header or footerShawn Rutledge2020-10-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Earlier we reimplemented the contains() method of ListView to prevent dragging in an Overlay or Pullback header or footer. But in QQuickWindow (QQuickWindowPrivate::pointerTargets()), an early check prevents delivery of pointer events to an item that is clipped and for which contains() returns false, and also to its children. In that case, the header or footer no longer responds to a mouse event even if you put a MouseArea in it. Reverts 6ad3445f1e159d9beea936b66d267dcaacdc5d6c; reimplemented using similar logic in a new QQuickListViewPrivate::wantsPointerEvent() method, overriding QQuickFlickablePrivate::wantsPointerEvent(), which is now checked in event-handling code in addition to checking the interactive flag. Done-with: Wang Chuan <ouchuanm@outlook.com> Pick-to: 5.15 Task-number: QTBUG-74046 Fixes: QTBUG-85302 Change-Id: I9474f035d26b74ee36c0ac19e45a77de2e694bf1 Reviewed-by: Wang Chuan <ouchuanm@outlook.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQuickItem: rename geometryChanged to geometryChangeMitch Curtis2020-04-231-1/+1
| | | | | | | | | | | | | | | | | | This brings it in line with the existing convention in this and other modules, where virtual handlers are named "nounChange"; e.g. itemChange. Signals are named "nounChanged". This also allows adding a geometryChanged signal, which would enable users to listen to one signal for all changes to x/y/width/height. [ChangeLog][QQuickItem] Renamed geometryChanged to geometryChange in order to follow existing naming conventions and have consistency with existing API, such as itemChange. Task-number: QTBUG-82994 Change-Id: I0547358c796a0047982ccfbf2c38bab952e7a634 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add major version to all Q_REVISIONsUlf Hermann2020-02-191-4/+6
| | | | | Change-Id: Id72fbe10c16de61bd847773d0055d83cfe03f63c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Don't allow dragging a ListView through a floating header or footerShawn Rutledge2019-12-041-0/+2
| | | | | | | | | | | | | | | | If the header or footer positioning is Overlay or PullBack, the list delegates appear to scroll underneath it. The header or footer can contain interactive content. If a mouse or touch press happens to "fall through" that, it should not be possible to drag the ListView contents from there. [ChangeLog][QtQuick][ListView] ListView no longer allows the user to press on an Overlay or PullBack header or footer and start scrolling, but only on the content delegates. Fixes: QTBUG-74046 Change-Id: I4d06c789286be2691d098aeebb10a57b2a335744 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Specify parameters of type registration in class declarationsUlf Hermann2019-09-261-1/+3
| | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Harmonize meta object revisions and minor versionsUlf Hermann2019-08-261-4/+4
| | | | | | | | | | In order to avoid complexity we want those to match. We can easily "rename" the meta object revisions as those are not public interfaces. Change-Id: I48e063d49758c7bacd9b7816bf5541cf67e07b0d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-3/+3
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Item views: Q_DECL_OVERRIDE -> overrideJ-P Nurmi2017-01-181-8/+8
| | | | | | Change-Id: I7dfbd5f47893a3244c96989ad7eea7e93ea28603 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* ListView: allow flicking to both directionsJ-P Nurmi2017-01-161-0/+2
| | | | | | | | | | | | | | | | Previously flicking was restricted to the orientation of the ListView. [ChangeLog][QtQuick][ListView] Made it possible to enable horizontal flicking in a vertical ListView, and vice versa. The only thing apps must do is to specify the desired flick direction and the content width (vertical ListView) or content height (horizontal ListView), which is not calculated by ListView. Change-Id: Ic370e57f5d18679940d48e7a2c20c200b2ef36d1 Task-number: QTBUG-52553 Task-number: QTBUG-56501 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-181-0/+4
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4variantobject.cpp src/qml/types/qquickworkerscript.cpp src/quick/scenegraph/util/qsgdefaultpainternode_p.h tools/qmljs/qmljs.cpp Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
| * Make ListView item configurableLars Knoll2016-10-101-0/+4
| | | | | | | | | | | | Change-Id: Iaecae9a9e1bf5e073f94e76531e65d381e7fa01f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Quick: mark some methods as constAnton Kudryavtsev2016-10-121-1/+1
|/ | | | | | | These methods do not modify objects. Change-Id: Ibb2622cad6fbcec31c785f5d032304c648372350 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Privately export QObjects included by QQuickPathView and QQuickListViewMitch Curtis2016-06-281-1/+3
| | | | | | | | | | | | | The Tumbler in Qt Quick Controls 2 needs this. The first part of this was already done with 3da510a2, but it turns out that all Q_OBJECTS in headers included from other modules must also be exported. Change-Id: Ic9ec19cfd944b85213471fc0983afb0d121a3638 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Privately export QQuickListView and QQuickPathViewMitch Curtis2016-06-231-1/+1
| | | | | | | The Tumbler in Qt Quick Controls 2 needs this. Change-Id: If42d6a7f56e0b0944379192e8074480b27c05ba9 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* ListView: fix random crashes when accessing deleted objectsJ-P Nurmi2015-11-261-1/+1
| | | | | | | | | | These crashes occur randomly with tst_combobox from qtquickcontrols2, and with the test case attached to the linked bug report. Change-Id: If7d91045f86ec33e7fe398ed02f3edf80700651a Task-number: QTBUG-48277 Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Port from Q_ENUMS to new macro Q_ENUM.Friedemann Kleint2015-06-191-6/+6
| | | | | | | | | | | Remove Q_ENUMS in favor of the new Q_ENUM macro which provides registration as meta enum and a debug stream operator. QQuickXmlListModel::Status is left unmodified as porting it creates a link error in tst_qquickxmllistmodel. Change-Id: Id5e6192c9f85e7c94332508fbd91873ddda31e1a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-19/+11
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Add Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-6/+6
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* ListView: add support for "pull back" header & footerJ-P Nurmi2014-08-081-0/+15
| | | | | | | | | | | [ChangeLog][QtQuick][ListView] Introduced headerPositioning and footerPositioning properties to control whether header and footer are positioned inline, as overlays, or so that they slide away and can be pulled back regardless of the content position. Change-Id: Ifef1faf1ce6acf2b55cd1b6408e22ec2de841409 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Make GridView/ListView attached "view" property available to all delegate typesNils Jeisecke2014-02-261-15/+1
| | | | | | | | | | | | | | | This is useful for accessing the view (e.g. "width", "cellWidth", ... properties) from within section (ListView only), header, footer and highlight delegate components. A typical usecase are components that are used in multiple views and therefore cannot use the views's id for access. The only attached property valid for those non-item delegates is "view". This has been added to the documentation. Change-Id: I33d976da778be23ed531a3b193ceee95ed9800d2 Task-number: QTBUG-32836 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-121-1/+1
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of the first half of QQmlGuard usageLars Knoll2013-07-051-3/+2
| | | | | | | | | QQmlGuard was being used as a more performant replacement for QPointer. QPointer got now fixed in Qt 5.0, making this class obsolete. Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-4/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Move the model classes from QtQuick to QtQmlAlan Alpert2013-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* Section headers ignore list delegate size changes when "colliding"Martin Jones2012-07-041-3/+1
| | | | | | | | Make section header updates part of the layout process. Task-number: QTBUG-23298 Change-Id: I4586bc58bc195fcc47f6db79346727eb6e3d3845 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Rename ListView *speed properties to *velocityBea Lam2012-06-261-10/+8
| | | | | Change-Id: I63c02d186b1832e7bf890a00caad150d5bf136cb Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Revert "Remove properties related to highlight speed"Bea Lam2012-06-251-0/+12
| | | | | | | | | | This reverts commit 18fb5506d524dbe380d5bf636c74c93fb85cbc31. Without these properties there's no way to set a constant movement speed. Change-Id: I49cd648846f801eb479ecce8cde09ff49ea11736 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix crash when dragging items outside visible area.Andrew den Exter2012-06-221-0/+1
| | | | | | | | | | | | | | | | | | If asynchronous item creation finishes while the content area of a ListView has been dragged full outside the visible area a full refill is triggered which can overwrite the requested index and potentially result in a single delegate item being assigned to multiple view items and later being doubly released. Only create the view item object in the createItem function to prevent this from happening. Secondly only reset the visible items if jumping outside the buffer range rather than just the fill range to prevent churn when the list only contains buffered items. Task-number: QTBUG-26232 Change-Id: I5bce845898ef5f699f34afc268594ef38e01d6a3 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove properties related to highlight speedBea Lam2012-06-221-12/+0
| | | | | | | | | | ListView should only have duration-type properties (i.e. highlightMoveDuration and highlightResizeDuration) as it's unnecessary to have both duration and speed properties for the highlight animation. (PathView and GridView only have the duration-related properties.) Change-Id: I1b94599e3e89afe6488ce2a882c2802354a859fe Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update Flickable velocity/overbound for each axis independentlyMartin Jones2012-06-131-1/+1
| | | | | | | | | We were attempting to update velocities/overbound correction for both axes even if only one of them had changed, leading to inaccurate values for one of the axes. Also removes a bunch of code duplication. Change-Id: I6a50b908992c976889373f541bdd1abad462e247 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-1/+2
|\ | | | | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
| * Don't create a separate section header for currentItemMartin Jones2012-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | The currentItem FxViewItem contained it's own section item, which when created would cause the current item delegate to be repositioned. This change associates the section item with the delegate item, via the attached object. Change-Id: Ie675d545539b56d0f1cf5a9b4ea26668978a5e72 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* | Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-7/+7
|/ | | | | | | | | | | | | 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>
* Remove commit headersAaron Kennedy2012-02-201-1/+0
| | | | | | | | These were used when we were porting from QtQuick 1 to QtQuick 2 but are no longer necessary. Change-Id: I0eeb7e13b4affdd6ab6c6dddea760afcdf38ee4f Reviewed-by: Martin Jones <martin.jones@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>
* Say hello to QtQuick moduleKent Hansen2011-12-021-0/+213
This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>