aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable' into devGunnar Sletta2013-01-171-7/+15
|\ | | | | | | | | | | | | | | Conflicts: src/qml/doc/qtqml.qdocconf src/quick/doc/qtquick.qdocconf Change-Id: I087fa14720995a5e53c43567dc4a3c29eb9992a9
| * Greatly improved Scene Graph Overview documentationGunnar Sletta2013-01-161-6/+14
| | | | | | | | | | Change-Id: I86b6bb9007d268ec039614a1693ecd839901e6d9 Reviewed-by: Jerome Pasion <jerome.pasion@digia.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>
* | Deinline QQuickKeysAttached::keyToSignal.Robin Burchell2013-01-081-1/+21
|/ | | | | | | | This also means we don't need to expose the SigMap struct or value - it can be made file-local. This isn't performance-critical, so it shouldn't really matter. Change-Id: I08d48df4f903df49a6ea58e6f10f3f53a97d89de Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Fix other warnings in qtdeclarative found by GCC 4.7Thiago Macieira2012-12-231-2/+2
| | | | | | | | | | | | | qml/qml/qqmlimport.cpp:982:30: error: unused parameter 'errors' [-Werror=unused-parameter] quick/util/qquickanimationcontroller.cpp:66:6: error: unused parameter 'job' [-Werror=unused-parameter]' quick/items/qquickshadereffectnode.cpp:160:17: error: case value '38' not in enumerated type 'QVariant::Type' [-Werror=switch] quick/items/qquickwindowmanager.cpp:286:60: error: 'renderTime' may be used uninitialized in this function [-Werror=maybe-uninitialized] quick/items/qquickitem.cpp:5267:67: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] and a few more repeated from the above Change-Id: Id1950c6ba98f7f8475975716b21bd795ecb4bd20 Reviewed-by: Alan Alpert <aalpert@rim.com>
* Compile with QT_NO_WHEELEVENT.Volker Krause2012-12-191-0/+4
| | | | | | | | Change-Id: I2fbe6f45ba50e3db75bd02cfca47ddabfcd5fc49 Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Accessibility: Improve interface handling in QuickFrederik Gladhorn2012-12-191-3/+7
| | | | | | | | | | | | | | | | | | This changes how interfaces are handled: the QAccessibleQuickItem will simply subclass all interfaces and dynamically return 0 or the appropriate interface_cast. This makes our implementation a lot more flexible. To make use of the value interface, only a value property is needed (together with a corresponding role). Since the implementation of the interfaces became simpler, the value interface and some text interface improvements go along with the change. Change-Id: I003ec3016d48d730a4acac467bce322167842f4d Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Compile with -no-feature-cursor.Volker Krause2012-11-301-0/+4
| | | | | | Change-Id: I47fa7b978a8087086161b1e7bde2e0b2f91fd6e5 Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Renamed QQuickItem::pos property to positionShawn Rutledge2012-11-291-3/+3
| | | | | | | | | Abbreviated property names are less descriptive so we don't have many of them. Might as well be consistent. QWindow::pos was already renamed. Change-Id: Ib52673e68e7dc902b2f8942dba6b899074b2538b Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Enable module build with QT_NO_IMTasuku Suzuki2012-11-261-1/+18
| | | | | | Change-Id: I90f8ec7e6357db7b4038bb1646fe9d3835821556 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
* Change qml list interfaceMarco Bubke2012-10-231-9/+4
| | | | | Change-Id: I185c6f4cef6105544504324c1616b5995c219fe3 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Fix list functions for the data propertyMarco Bubke2012-10-181-11/+27
| | | | | | | | The Qml Designer needs this functions. Task-number: QTCREATORBUG-8039 Change-Id: I6e072723630cf971ad3eda921497699611ae934e Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QQuickItem: handle QEvent::StyleAnimationUpdateJ-P Nurmi2012-10-171-0/+3
| | | | | Change-Id: Id5c4de6bdcd395a1e32449e69d773e9a35fab4c9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix performance bottleneck in QQuickWindow::mouseMoveEvent().Sérgio Martins2012-10-111-1/+27
| | | | | | | | | | | | | | | | | | When a mouse move event is received, a lot of time is spent looking for items with cursors, recursively. With this patch, it will only recur into item hierarchies that contain cursors. Not having cursors is much more common than having them. Benchmark included: Before: 15 msecs per iteration (total: 62, iterations: 4) After: 0.000064 msecs per iteration (total: 68, iterations: 1048576) Task-number: QTBUG-27054 Change-Id: I3a5441652ca1c0b8d2cbc5683013562174f5af4a Reviewed-by: Alan Alpert <416365416c@gmail.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>
* doc: fix some typos in .cpp filesSergio Ahumada2012-09-071-1/+1
| | | | | Change-Id: Ica7685aefde84ec80d8af7a67541af454de4adce Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Doc: Fix documentation issues.Kim Motoyoshi Kalland2012-09-071-2/+4
| | | | | Change-Id: I03c4faa1aee60cd1ad706cb6c1b983f03311d251 Reviewed-by: aavit <qt_aavit@ovi.com>
* Doc: Fix some documentation issues.Kim Motoyoshi Kalland2012-09-051-13/+0
| | | | | Change-Id: I0f7e60fd6060381bd8790dfaacc3a39a890a0fe7 Reviewed-by: aavit <qt_aavit@ovi.com>
* Fix compiler warnings from MSVC2010Kai Koehne2012-08-281-2/+2
| | | | | Change-Id: I44eb0113374c221a166609c4fd29b5dad05ecc94 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Docs - add missing images and code, clean up sectionsBea Lam2012-08-281-1/+15
| | | | | | | | | | Includes the removal of concepts/modelviewsdata/localstorage.qdoc since that is a duplicate of the existing Local Storage module docs. Also removes classes from whatsnew.qdoc that are internal. Change-Id: I4170c1797bbec09bb67784b0b2ad67fd990365a8 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix various doc errorsBea Lam2012-08-281-6/+10
| | | | | | | | Also restore the main module "reference documentation" links added in 0e0f46c01cf6a183996d36c31987ca4a46b50bd9 Change-Id: I421f5a17e2946a2569537d8ba8a021f219aaf75a Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Add cacheItemCount property to PathViewMartin Jones2012-08-281-1/+1
| | | | | | | | | | | | 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>
* Improve docs related to visual parent conceptBea Lam2012-08-281-0/+10
| | | | | Change-Id: I73cc63c8a55cf949b94a2fa502cb331fb8adbda3 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Document various undocumented attributes of QQuickItemBea Lam2012-08-231-101/+951
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add docs for various properties and methods that are public but weren't documented. Also marked various things that shouldn't be documented as \internal. Newly documented attributes in C++ API include: - x, y, z, implicitWidth/Height, baselineOffset - transformOrigin, rotation, scale - stackBefore(), stackAfter() - mapTo*(), mapFrom*(), mapRectTo*(), mapRectFrom*() - childItems(), childAt() - updatePolish() and polish() - state - opacity, visible, enabled - mouse, hover, wheel, key, touch and grab event handlers - drag and drop event handlers - acceptedMouseButtons(), filtersChildMouseEvents(), acceptHoverEvents(), grabMouse, ungrabMouse() - focus, activeFocus, isFocusScope(), scopedFocusItem() - methodInputEvent(), inputMethodQuery() - Flag enum, setFlags(), flags() - window() Newly documented attributes in QML API include: - smooth, antialiasing - baselineOffset Change-Id: If8596b2a488e6ae37a3eb1f7d6dd0911479e9c0e Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Move docs closer to the members that they documentBea Lam2012-08-161-704/+542
| | | | | | | | | | This will make it easier to add docs for undocumented members in a later change. Includes some minor doc improvements. Change-Id: I809e1382297af604f7cac3abd4fed4a8e4e55967 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix various broken links in documentationBea Lam2012-08-031-17/+17
| | | | | 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-8/+16
| | | | | | | | | | -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>
* Fix resolution of cursor when items are overlapping.Andrew den Exter2012-07-261-0/+91
| | | | | | | | | | | | If MouseArea with cursorShapes are overlapping then cursor shape of the foremost item under the mouse cursor should be shown, but because the hover events are delivered to the foremost items first the opposite is occuring. This makes QQuickWindow responsible for correctly setting its own cursor instead of relying on items to work it out amongst themselves. Change-Id: Iedf144c583dfa3d1ff441e19db9601b5e171902a Reviewed-by: Martin Jones <martin.jones@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>
* Update element references to smooth.Michael Brasser2012-07-181-1/+1
| | | | | | | Change-Id: Ide30946e83c8c26d075b9ca3bb1f9e20afd69373 Reviewed-by: Glenn Watson <glenn.watson@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* QQuickCanvas renamesAlan Alpert2012-07-171-138/+138
| | | | | | | | | | | | | | | | 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-14/+14
| | | | | | Task-number: QTBUG-24785 Change-Id: I223479b879514abaacb123852323c1cfada7a5e1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Change antialiasing method for QML2.Kim Motoyoshi Kalland2012-07-131-22/+91
| | | | | | | | | | | | | Since multisampling can require a lot of memory, and might not be supported on some hardware, turn off multisampling and implement antialiasing in the vertex shader instead. The alternative method of antialiasing is implemented for Rectangle, Image, BorderImage and AnimatedImage, and must be explicitly enabled by setting the new antialiasing property. Task-number: QTBUG-26268 Change-Id: I39a93d978658a494bf51e9f0fd02d8414eb8be12 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Allow all explicit margins to override margins.Andrew den Exter2012-07-061-0/+2
| | | | | | Task-number: QTBUG-24515 Change-Id: Ibfc657dec9fd0c8e71cf3686a04ea7b00ad72c11 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Allow mouse interaction with 0 opacity items.Andrew den Exter2012-07-041-9/+23
| | | | | | | | | | | Don't filter event delivery to items with 0 opacity, and update the documentation the for opacity, visible and enabled properties and how each affects event delivery. Task-number: QTBUG-19193 Change-Id: Id48e4af763c9a7bbcc13b303342d303155dcadc9 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix some commented issues from the refactor merge.Michael Brasser2012-07-031-1/+1
| | | | | Change-Id: Ied56bdfc93162b7668be7b07841948b8b5968a70 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* anchors.mirrored should not exist in QtQuick 2Martin Jones2012-07-021-4/+0
| | | | | | | | | | anchors.mirrored was removed from QtQuick 1.1 before release, however QtQuick 2 was branched before it was removed, so it currently exists in QtQuick 2. Task-number: QTBUG-26369 Change-Id: Iab85f66f6c5f0ebadc5962cc6962cec15203d55d Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Remove QQuickItemPrivate::InitializationStatus.Andrew den Exter2012-06-301-31/+2
| | | | | | | Unused following changes to focus handling of unparented items. Change-Id: I18b8c1a233a62050d3e43786cc093b039697c922 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Propagate synthesized mouse events in parallel with touch.Shawn Rutledge2012-06-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old way of event propagation inside QQuickCanvas was to send the touch event through all elements, and if it was accepted along the way, stop. Otherwise generate a mouse event and propagate it through the items in the same way. With this patch the behavior is changed instead to do the propagation in parallel. The idea is to first send a touch, then a mouse event to each QML item (in paint order) that can potentially handle the events. When items filter their child elements, the same logic applies. Other changes/clarifications: - mouse events no longer get synthesized for more than one touch point - TouchPoints can be distributed to multiple Items - if an item accepts a touch point, it always gets updates, even if the point is stationary - events containing only stationary TouchPoints are discarded - PinchArea must accept any initial single TouchPoint in order to receive subsequent updates, even though it's not pinching yet. This means if PA is on top, items underneath don't get touches. New unit tests showing this behavior were added. This patch was written by Frederik Gladhorn, Laszlo Agocs and Shawn Rutledge. Due to the complexity of the logic some refactoring was done. QQuickMouseEventEx has been removed because it inherently relied on using the QEvent d pointer. Change-Id: If19ef687d7602e83cc11b18d2fecfbbdb4e44f5c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Implement QAbstractDeclarativeData::isSignalConnected hookKent Hansen2012-06-271-1/+1
| | | | | | | | | | QQml_isSignalConnected is no longer needed, since QObjectPrivate::isSignalConnected will now call the declarativeData hook. Change-Id: I0685b0fa909d6c6c2d275bfa8d41100d9926a046 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Make qtdeclarative compile with QT_NO_DRAGANDDROPTasuku Suzuki2012-06-241-0/+4
| | | | | | Change-Id: Ie92455495979b065b574f013d95fac17739fa40e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>
* Create new documentation structureChris Adams2012-06-211-8/+8
| | | | | | | | | | | | | | | | | | | | 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>
* Fix view delegate parent binding regression.Martin Jones2012-06-121-1/+6
| | | | | | | | | | | | 762b4d90110465aeceb96f44cd06dcda229dfe89 introduced a regression by setting the item parent after completion. This was to avoid rendering an incubated object before completion. However this breaks bindings. Restore setting the item parent before completion, and ensure items are not rendered until completed. Change-Id: Ifc9d0c34ee62e687889c32ffab7c091b4c8cc470 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Adapt to connection-related changes in qtbaseKent Hansen2012-06-121-3/+1
| | | | | | | | | | | | | | | | | | | The QQmlData hooks signalEmitted() and receivers() now receive the index in the signal index range (i.e., excluding non-signal methods). This was done to avoid Q(Meta)Object having to compute the class's method offset; the signal offset should be sufficient for everyone. This required adapting QQmlNotifier, QQmlBoundSignal, QQmlPropertyCache and friends to use the signal index range whenever a property's notify signal is involved in the internal connection lists and property captures. Using the signal index range also reduces the memory used for NotifyList::notifies, since useless entries for non-signal methods will no longer be created. Change-Id: I62872fbea5a1f829b8b03bae3fc1e6acd84cf886 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Improve on scenegraph documentation.Gunnar Sletta2012-06-081-1/+1
| | | | | | | Change-Id: Ib584a45454f6fd2a3c0bfb32a76b19839e4a2a09 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Fix handling of a direct child stealing focus from a parent-less item.Andrew den Exter2012-06-081-0/+14
| | | | | | | | | | | | When an item gains focus it will remove focus from the previous item that held focus. Normally this is the sub-focus item of an ancestor item, however if the item with focus is at the root of the tree there will be no sub-focus item and the focus of root item needs to be cleared instead. Likewise if an item doesn't have a parent, focus still needs to be removed from any sub focus item. Change-Id: I0f192692e21e288c87ba0104f3d597363190f87c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Performance should always be better with cacheBufferMartin Jones2012-06-081-1/+11
| | | | | | | | | | | | | Setting a cacheBuffer introduced more work for the scenegraph due to cached delegates' visibility being toggled. Changing visibility is expensive as it is proagated to all children. Introduce a cheap method of hiding a branch instead. Also avoid initiating incubation in the same frame as a completed creation. Change-Id: I573bcf37f441f96a7502d445be50ef4301f217d5 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Better documentation for subclassing QQuickItemAlan Alpert2012-06-061-0/+12
| | | | | | | Task-number: QTBUG-26025 Change-Id: Ia0fadf54ee8924f9892bc567c107efc4dca80628 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Doc: Grouped Qt Quick types into several groupsJerome Pasion2012-06-061-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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>
* Remove unused performance flags.Michael Brasser2012-06-061-3/+1
| | | | | | Change-Id: I9a9111703e2480af02b1af7033ea6bb12e7a75a5 Reviewed-by: Glenn Watson <glenn.watson@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>