aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Use QMutable*Event classes to copy and synthesize eventsVolker Hilsheimer2020-11-181-1/+1
| | | | | | | | | | QMutableTouch/SinglePointEvent can be publicly copy constructed from their non-mutable counterparts, make use of that. Change-Id: I7f56a9f9649bb7726cca1eaddccfdc3f21d47554 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQmlListProperty: Use qsizetype rather than int for sizesUlf Hermann2020-11-091-10/+10
| | | | | | | | | | [ChangeLog][QtQml] The QQmlListProperty callback functions use qsizetype now as type for the size of a list. This is in line with the containers that you might use to back the list. Fixes: QTBUG-88269 Change-Id: Ia38403cb32f241e6c70e1a580dbeff1d6d694331 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove QQuickPointerEvent etc.; deliver QPointerEvents directlyShawn Rutledge2020-09-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | QEventPoint does not have an accessor to get the QPointerEvent that it came from, because that's inconsistent with the idea that QPointerEvent instances are temporary, stack-allocated and movable (the pointer would often be wrong or null, therefore could not be relied upon). So most functions that worked directly with QQuickEventPoint before (which fortunately are still private API) now need to receive the QPointerEvent too, which we choose to pass by pointer. QEventPoint is always passed by reference (const where possible) to be consistent with functions in QPointerEvent that take QEventPoint by reference. QEventPoint::velocity() should be always in scene coordinates now, which saves us the trouble of transforming it to each item's coordinate system during delivery, but means that it will need to be done in handlers or applications sometimes. If we were going to transform it, it would be important to also store the sceneVelocity separately in QEventPoint so that the transformation could be done repeatedly for different items. Task-number: QTBUG-72173 Change-Id: I7ee164d2e6893c4e407fb7d579c75aa32843933a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Privately export QQuickItemLayerLaszlo Agocs2020-09-131-1/+1
| | | | | | | Required by Quick 3D. Change-Id: I0da6aa8163da71b2d27cb0e358473aa5ecc85a1f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Quick: Clean up some includesUlf Hermann2020-06-041-21/+18
| | | | | | | Uniformly use <...> and sort them by modules. Change-Id: I11cd160783dfb141d8824d635bdc56a63aaee50f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Replace QFlagPointer with QTaggedPointerSimon Hausmann2020-04-031-3/+12
| | | | | | | | The latter has the advantage of allowing the use of a real type for the tag, instead of the generic flag/flag2 boolean accessors. Change-Id: Icc9e854ce4af3eb5808a4bed45aa22f377e223da Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Introduce new mechanism to manage palette functionality in QMLVitaly Fanaskov2020-03-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main goals of these changes: 1) Add an ability to work with disabled and inactive palettes from QML 2) Eliminate massive code duplication in qtquickcontrols2 module 3) Provide easily extensible architecture for this piece of functionality Architectural part. Palette It was decided to not change existing QPalette, but add thin wrappers around it to provide all required functionality. These wrappers are highly coupled with QPalette class because of using some enum values from it. There are two new classes QQuickPalette and QQuickColorGroup. QQuickPalette class inherits QQuickColorGroup class and represents Active/All color group. QQuickPalette also provides an access to three color groups: Active, Inactive, and Disabled. In order to access colors the special class QQuickPaletteColorProvider is used. This is a wrapper around QPalette that provides some convenience functions. Interface The private property "palette" should be exposed. Implementation All private parts of classes that implement QQuickAbstractPaletteProvider have to inherit QQuickPaletteProviderPrivateBase class. This template class implement all functionality: create palette, resolve dependencies, connect objects etc. This is important to mention that related data is lazily allocatable on demand only. Hence, there is no memory overhead for regular items. Change-Id: I911424b730451b1ad47f68fd8007953b66eddb28 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add major version to all Q_REVISIONsUlf Hermann2020-02-191-1/+5
| | | | | Change-Id: Id72fbe10c16de61bd847773d0055d83cfe03f63c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add PointerHandler.cursorShape propertyShawn Rutledge2020-01-311-0/+5
| | | | | | | | | | | | | | | | | | Also, QQuickItemPrivate::setHasCursorInChild() was unable to check the QQuickItemPrivate::hasCursor variable, because the function argument hasCursor was shadowing that, even though the comment "nope! sorry, I have a cursor myself" hints that the intention was to check that. So this change exposed a problem there, and we have to fix that too, in order to keep the tst_qquickwindow::cursor() test passing. [ChangeLog][Event Handlers] Pointer Handlers now have a cursorShape property to set the cursor when the handler is active and the mouse is hovering, and restore to the previous cursor when the mouse leaves. Fixes: QTBUG-68073 Change-Id: Ib5c66bd59c4691c4210ee5465e1c95e7bdcf5ae1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* QQmlListProperty: Add replace and removeLast functionsUlf Hermann2020-01-151-1/+1
| | | | | | | | | | | This allows us to implement QmlListWrapper::virtualPut(). Also, the additional functions make the list properties useful in other contexts. Fixes: QTBUG-79263 Change-Id: I528bc69222ca7743f0fc3697c3aed2a3468b4d87 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-091-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/particles/qquickitemparticle.cpp src/qmlmodels/qqmladaptormodel.cpp tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp Change-Id: Ibd8fbb91da6893a09f4ffe61ad0b95d8149bbc87
| * QQuickWindow: make subFocusItem a QPointerFabian Kosmale2020-01-031-1/+1
| | | | | | | | | | | | | | | | | | While running the fuzz tester, a crash was found related to the fact that the subFocusItem was already partially deleted. Task-number: QTBUG-34779 Change-Id: I62c48cf40baabc9f0a81074cc6408e9073459165 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Avoid initializing QFlags with 0 or nullptrAllan Sandfeld Jensen2019-11-221-2/+2
| | | | | | | | | | | | | | | | | | It is being deprecated. Change-Id: I844bd92af85bc53a8fc0371408d05277bd49f511 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Specify parameters of type registration in class declarationsUlf Hermann2019-09-261-4/+18
|/ | | | | | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-041-6/+7
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I20ad6f8a260f387a3b73566a32c35a5772b401a5
| * Fix read access violation when using KeyNavigation attached propertyTom Scheler2019-07-021-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the KeyNavigation.up property of an item to another item will implicitly set the reverse (KeyNavigation.down) property on that other item pointing back to the item. Once the item is destroyed, you will have an invalid pointer stored in the other item pointing to the destroyed item. Using QPointer<> instead of raw pointers fixes that issue, because they will become null on QObject's destruction. Added QQuickItem test that verifies the issue is solved. Fixes: QTBUG-75399 Change-Id: Ibb3e976c4eb9fcd81604bcc2eb757257d3653930 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Refactor transform code in pinchhandler to a separate functionJan Arve Sæther2019-04-021-0/+5
|/ | | | | | | This is needed in order for the wheel handler to have the same behavior. Change-Id: I42851789787b8da96618d82227b34c53ace15e9b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add handlers declared as Flickable children to its contentItemShawn Rutledge2019-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | QQuickItemPrivate::data_append() was not invoked when any kind of Pointer Handler was directly declared in a Flickable (or subclass) because QQuickFlickable redefines the default property to be its own flickableData property. So we need to repeat the special handling in QQuickFlickablePrivate::data_append() too. The handler must be added to the private->extra->pointerHandlers vector, so that QQuickItemPrivate::handlePointerEvent() will attempt to deliver events to those handlers. TapHandler seems OK (especially with its default gesturePolicy so that it does not do an exclusive grab). PointHandler seems OK. DragHandler competes with Flickable for the exclusive grab. pressDelay can help; or set acceptedDevices: PointerDevice.Mouse to allow the mouse to drag but not flick, and the touchscreen to flick but not drag. Fixes: QTBUG-71918 Fixes: QTBUG-73035 Change-Id: Icb97ed5230abe0cb6ec0230b5b5759a0528df7e8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Add dynamically-created Event Handlers to the relevant handlers vectorShawn Rutledge2018-12-071-0/+1
| | | | | | | | | | | | | | | | | If any kind of Pointer Handler is created dynamically in JS by calling Component.createObject(), QObject::setParent() is called rather than passing the parent to the constructor, so QQuickItemPrivate::data_append() did not take care of adding the handler to QQuickItemPrivate's extra->pointerHandlers vector. We need to use the auto-parent mechanism (just as we did with handling dynamic creation of nested Windows in 8cb02e23abbefc9d020707fc1a2d8b6eb4e103b6). Added QQuickItemPrivate::addPointerHandler() to put the prepend() and implied setAcceptedMouseButtons() in one place. Fixes: QTBUG-71427 Change-Id: I3be3dd033c1c89e6e5b5c3463e1a720bbe963281 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-081-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/3rdparty/masm/yarr/YarrJIT.h src/quick/items/qquickwindow.cpp Change-Id: I551404e1558d56c0b0626346ad1c86406bff0ec7
| * Add QQuickItemPrivate::updateOrAddItemChangeListener()Mitch Curtis2018-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is identical to the existing updateOrAddGeometryChangeListener(), except that it updates the regular "types" member, not "gTypes". This function will allow preventing duplicate change listeners, at the expensive of a call to QVector::indexOf(). It's useful when there is no other way for calling code to check if a listener will be a duplicate before adding it. Task-number: QTBUG-69056 Task-number: QTBUG-70729 Change-Id: Idba039f355023e8d45a8b46e4af95aa81c13c3f4 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Format QQuickItemPrivate::ChangeListenerErik Verbruggen2018-08-161-4/+18
| | | | | | | | | | Change-Id: If57543709fb7ecb649307c7fa95835dd20a3f558 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Replace MultiPtHndlr.pointDistanceThreshold with PointerHandler.marginShawn Rutledge2018-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not just useful for PinchHandler: TapHandler has a good use for it too. But unfortunately if the handler's parent Item has a custom mask, we don't have a way to augment the mask with a margin; so if margin is set, we assume the bounds are rectangular. QQuickMultiPointHandler::eligiblePoints() now calls wantsEventPoint() rather than bounds-checking the point directly: this adds flexibility, potentially allowing an override in subclasses, if we need it later. Task-number: QTBUG-68077 Change-Id: I65c95f00c532044a5862654e58c9c5f8c973df81 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Add HoverHandler to detect a hovering mouse pointerShawn Rutledge2018-06-281-0/+1
|/ | | | | | | | | | Detect whether the handler's parent contains the mouse, while the point property tracks the event point (position etc.) Task-number: QTBUG-68072 Change-Id: Ica99332596eab3e344852a11f1ceb7aaf6348c86 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* finish renaming of containsMask -> containmentMaskShawn Rutledge2018-02-281-1/+1
| | | | | | | | Followup to 6fa746fa6 to rename setContainsMask and registerAsContainsMask Change-Id: Ifdfaf58dccb5fd3665615418e7f1ea09cb914c55 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* use the override keyword consistently and correctly (clang-tidy)Shawn Rutledge2018-02-271-4/+4
| | | | | Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* init variables where they are declared when possible (clang-tidy)Shawn Rutledge2018-02-261-13/+10
| | | | | | | | clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-15/+15
| | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-121-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/shapes/qquickshape.cpp src/imports/shapes/qquickshape_p_p.h src/qml/compiler/qqmlpropertycachecreator_p.h src/qml/jsruntime/qv4value_p.h src/quick/items/qquickloader_p.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tools/qmlprofiler/qmlprofilerapplication.cpp Change-Id: Iafc66ae84bf78630ed72a986acb678e9d19e3a69
| * Fix Shapes not playing well with QtGraphicalEffectsPaolo Angelelli2018-01-311-0/+4
| | | | | | | | | | | | | | | | | | | | This patch allow shapes to skip the sync optimization in situations where the shape is added to a shader effect either directly or as nested inside another item, and is set to be invisible. Task-number: QTBUG-63105 Change-Id: I595fbc052032f420982be1267d22a24bcffb7212 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-02-021-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/compiler/qqmlirbuilder.cpp src/qml/compiler/qqmlirbuilder_p.h src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4codegen_p.h src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4compilercontext_p.h src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir.cpp src/qml/compiler/qv4jsir_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4runtimecodegen.cpp src/qml/jsruntime/qv4script.cpp src/qml/jsruntime/qv4script_p.h src/qml/qml/qqmltypeloader.cpp src/quick/items/qquickanimatedimage.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp tests/auto/qml/qmlplugindump/qmlplugindump.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp tools/qmljs/qmljs.cpp Done-with: Shawn Rutledge <shawn.rutledge@qt.io> Done-with: Lars Knoll <lars.knoll@qt.io> Done-with: Ulf Hermann <ulf.hermann@qt.io> Change-Id: I010e6525440a85f3b9a10bb9083f8e4352751b1d
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-241-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/debugger/qqmlprofiler_p.h src/qml/jsruntime/qv4engine.cpp src/qml/memory/qv4mm.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlobjectcreator_p.h src/qml/types/qqmldelegatemodel.cpp src/quick/items/qquickitem_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/BLACKLIST tests/benchmarks/qml/holistic/tst_holistic.cpp Change-Id: I520f349ab4b048dd337d9647113564fc257865c2
| | * Move setVisible into QQuickItemPrivatePaolo Angelelli2017-12-241-0/+2
| | | | | | | | | | | | | | | Change-Id: I6bda48f5e982d8e93b8d9a604c275bc0cc0434de Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * remove unimplemented QQuickItemPrivate::_q_windowChanged declarationShawn Rutledge2017-12-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | It was added in 4c5445ddb0e7388247783c868925c086bdd666f7 but never implemented. Change-Id: I748295b2a1d82ed19444c0e447e1d7e88baf34b1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Support masking of QQuickItemsPaolo Angelelli2018-01-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding a new property, containsMask, to QQuickItem, that can be set to any QObject defining a Q_INVOKABLE bool contains(const QPointF &point). When this property is set, the mask object contains method is used in place of the item own contains method. [ChangeLog][QtQuick][QQuickItem] Added containsMask property. Task-number: QTBUG-20524 Change-Id: I5b0696e2cddc6ae3e217ce149c5f44980fdb69aa Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-061-0/+2
|\| | | | | | | | | | | Change-Id: I1ed923d72566af663555898c3ec708191eef8ae9
| * | QQuickWindow: if an Item has PointerHandlers it's a delivery targetShawn Rutledge2017-10-171-0/+2
| | | | | | | | | | | | | | | | | | | | | even if it does not accept mouse or touch itself. Change-Id: I4f1a05231c0ff1e89b8f7f28f0760b3af49c78a8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Replace Q_NULLPTR with nullptrKevin Funk2017-09-271-1/+1
| | | | | | | | | | | | | | | Change-Id: I0c01862dbb475494c84e39c695cb563df8cbcfa8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-16/+16
|/ / | | | | | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add QQuickItemPrivate::filterKeyEvent()J-P Nurmi2017-08-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows Qt Quick Controls 2 to support attached Keys signal handlers for an editable ComboBox by forwarding its internal text editor's key events to the attached Keys handler of the ComboBox control. Task-number: QTBUG-61135 Change-Id: Ib642133a19389beb04a3b53375c083d17e185500 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-08-081-1/+2
|\ \ | | | | | | | | | Change-Id: I0af7b0c3e0a21aae68c82ec11c5ca579c1661ce9
| * | Add QQuickItem::ItemEnabledHasChangedJ-P Nurmi2017-07-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The itemChange() method has been very useful for Qt Quick Controls 2 to efficiently react to various item changes, but a notification for the enabled state was missing, so it always had to be handled as a special case using signals and slots. This change allows QQC2 to handle enabled state changes the same way e.g. visibility changes are handled. It's also nice to be able to update a control's internal state before the actual notifier signal is emitted. [ChangeLog][QtQuick][QQuickItem] Added a ItemEnabledHasChanged value to the ItemChange enum. QQuickItem::itemChange(ItemEnabledHasChanged) gets called when the item's effective enabled state has changed. The new enabled state is stored in ItemChangeData::boolValue. Change-Id: Iae96ec21f2b94f453632282473decd1c66097a75 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-05-081-5/+2
|\| | | | | | | | | | | Change-Id: Ia06843de255547174efa556b1ab76be4b4be4287
| * | QQuickContents: Use QRectF rather than reinventing itRobin Burchell2017-04-171-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | No major impact on benchmarks -- if anything, this improves the new delegates_item_childrenRect by 2-3 frames. Change-Id: I50fef6f0bc9531eabd1d42079886dca754e1ce2a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | | Add QQuickItem acceptTouchEvents/setAcceptTouchEvents; require for touchShawn Rutledge2017-04-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been suboptimal to speculatively deliver touch events to Items which are not interested; even worse is when we must deliver to a parent item which is filtering events, when the child Item will not accept the touch event anyway. So now it is required that any QQuickItem subclass which wishes to accept touch events must call setAcceptTouchEvents(true) (typically in its constructor). If it does not do this, it will not get any touch events (and this saves us the trouble of looking for parents which filter touch events, too). It is consistent with needing to call setAcceptHoverEvents() to get hover events, and setAcceptedMouseButtons() to get mouse events. [ChangeLog][QtQuick][QQuickItem] When subclassing QQuickItem, it is now required to call setAcceptTouchEvents(true) if you need the item to receive touch events. Change-Id: Idc76c04f4e7f1d4a613087e756e96dac368f4f23 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-03-021-0/+7
|\| | | | | | | | | | | Change-Id: I7e43a0a47d49de38617f6afc7548f9a9e212a851
| * | Add samples property for Item.layer and ShaderEffectSourceLaszlo Agocs2017-02-231-0/+7
| |/ | | | | | | | | | | | | | | | | | | [ChangeLog][Qt Quick] Added the properties ShaderEffectSource.samples and Item.layer.samples to allow requesting MSAA rendering of an item subtree, without enabling multisampling for the entire scene. Task-number: QTBUG-58945 Change-Id: I9102cfabba10d4dc1e7ad2aa0b258ada6d9a5a47 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | clarify further exclusive vs. passive grabsShawn Rutledge2017-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | Add documentation to the grab-related event and eventpoint methods. Rename "grabber" functions which relate only to the exclusive grab, in cases where it would otherwise be ambiguous. And a few other documentation changes. Change-Id: I1a203c8c06a19d4abdb000f08b387c38341ef476 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | QQuickWindow: deliver updates to handlers even if they don't grabShawn Rutledge2017-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | The "weak grab" concept depends on this. First we deliver to grabbers, then we deliver to non-grabbing handlers (but not to non-grabbing items). Avoid re-delivering to grabbing handlers which already received the same event. Change-Id: If51e1cd9372e3bed1daea3758e9ef8e37c0ba5e3 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Merge branch remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2016-12-201-5/+9
|\| | | | | | | Change-Id: I9ed2e696108f11c9153012fcf092541fd0e0d7c8