aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpositioners.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove hard-coded notes for 'Corresponding handler' for QML signalsTopi Reinio2020-03-101-8/+0
| | | | | | | | QDoc will generate these notes automatically. Task-number: QTBUG-37355 Change-Id: I8ed058ecbbcc630ad0351f6ce167c3fa61936f6f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: list Grid's alignment properties as "since 5.1"Mitch Curtis2020-02-181-0/+1
| | | | | | | | | They were added in 9b801abc3a6967392e27daa35ba7cd802b7164e4 (or 233e83b20512a5e3748542f1c279a5c7ec6310ad, depending on what you ask Gerrit or Git). Change-Id: Ia1c064c04bc3e1a23e6b8caf7d479625368f7fe6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Remove references to Qt Quick 1Kai Koehne2018-10-011-20/+4
| | | | | | | | | | Qt Quick 1 is dead since Qt 5.0, so it doesn't make much sense anymore to link to different names there, or highlight behavioral differences. Task-number: QTBUG-70780 Change-Id: Iac5e0b226621f127714e722a11208ca1b21d977f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-191-5/+5
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-8/+8
| | | | | | | | | | | | | 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.9' into devLars Knoll2017-05-021-0/+2
|\ | | | | | | Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| * Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Revert "Positioners: allow distinguishing between implicit/explicit child size"Mitch Curtis2017-04-051-68/+32
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 2556bfdab42dc0aefb34bb7cf304063c7db0ff00. This is no longer necessary, as there are now no users of this functionality in other modules. Change-Id: If92bbdb3e5e95b4103610d68d22e929cf30c4e5e Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | sources: Add missing override and remove redundant virtualAlexander Volkov2017-02-231-3/+3
| | | | | | | | | | | | | | Change-Id: I48e26b1491024d41ebf75d40f0d1a7e9a1b20f22 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Positioners: allow distinguishing between implicit/explicit child sizeMitch Curtis2017-02-231-32/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt Quick Controls 2, we plan on using positioners to layout an icon next to text in a button, for example. Consider the following example: AbstractButton { id: button text: "Button" contentItem: Row { Text { text: button.text width: parent.width } } background: Rectangle { radius: 5 color: "lightsteelblue" opacity: button.pressed ? 1.0 : 0.8 } } In Qt Quick Controls 2, implicit size propagates "up" from the delegates/building blocks to the control, whereas explicit size propagates "down" from the control to the delegates/building blocks. Providing a reasonable implicit size is important to make controls behave well in layouts, etc., and the internal building blocks must follow the size of the control to retain sensible looks when a control is resized. In the example above, contentItem needs to have a "natural" (implicit) size representing the ideal fit of the content, but it needs to respect the explicitly provided size from the control too. With the current behavior, as the explicit width of the Row is 0, the Text item (via the width binding) sets explicit width to 0, and Row uses that explicit width rather than the implicit width, thus, Row here will have an implicit width of 0, which is not what the control wants. This patch: - Allows subclasses of positioners to set QQuickBasePositionerPrivate::useImplicitSize to true in order to tell positioners to use implicit size rather than explicit size. This is not exposed as public API, as this behavior is typically not something desirable in the positioners themselves. For example, Row { Rectangle { width: 100; height: 100 } } would have an implicit size of 0, as Rectangle has no implicit size. - Adds QQuickImplicitRow and QQuickImplicitGrid, which are private subclasses of their respective positioners that simply set useImplicitSize to true in their constructors. - Exports the wrappers privately so that they can be registered by other modules as QML types. Change-Id: Ie68aabd7fbf6c76375badf6e338f2f238f3fc392 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Positioners: remove unused header includesMitch Curtis2017-02-231-3/+0
|/ | | | | | Change-Id: I1d2a57d5a5392986460e2427b4ee2a1b2b17dbaa Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Improve visibility into Positioner positioning from QMLMichael Brasser2017-01-131-0/+93
| | | | | | | | | | Add a forceLayout function, similar to the views, as well as a signal that indicates when positioning has completed. Change-Id: Ice01ea0840c707e403fdd4ea59d92a89e2ed8e4b Task-number: QTBUG-44762 Task-number: QTBUG-32114 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Port existing qmlInfo callers to qmlWarningRobin Burchell2017-01-111-4/+4
| | | | | | | | | | | | | Now that qmlInfo actually reports info messages, we want to change existing callers to use warning-level messages to preserve the original message level. This was done through: perl -p -i -e "s/qmlInfo\(/qmlWarning\(/" **/*.{cpp,h,qdoc} .. with a little care taken to only add the hunks that should be changed. Change-Id: I511cee11ce0a26ec1048cd2b84c7536b812a0d89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-051-4/+4
|\ | | | | | | Change-Id: I081d9b15796b4133d2ba6f1a862f15b873a4846d
| * QQuickPositioners: fix sentence structure in apidocFrederik Schwarzer2016-10-041-4/+4
| | | | | | | | | | Change-Id: I14eb860386dfad57ab8cf492cb782970497756b9 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>
* QQuickPositioner: move paddings into extraDataLiang Qi2015-06-151-36/+57
| | | | | | | | Includes Column, Row, Grid and Flow. Task-number: QTBUG-46529 Change-Id: Ib49e4fa08d95a94b3eca9fc20865acb9281aaad1 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Column, Row, Grid, Flow: add support for paddingLiang Qi2015-05-181-31/+267
| | | | | | | | | | [ChangeLog][QtQuick] Added padding, leftPadding, topPadding, rightPadding and bottomPadding properties in Positioners, including Column, Row, Grid and Flow. Task-number: QTBUG-41559 Change-Id: If3be7b2243a79c01dad0a5600e22d30eeea43c8a Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Cleanup math function includes and usageAllan Sandfeld Jensen2015-02-191-1/+0
| | | | | | | | Use std::math on floats and doubles, and qMath on qreals, and only include the math headers actually needed. Change-Id: I1d511d7b1bac0050eaa947c7baee760b736858bf Reviewed-by: Sean Harmer <sean.harmer@kdab.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>
* 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>
* Make item.layer and item.layer.effect work inside positioners.Gunnar Sletta2014-05-081-1/+3
| | | | | | | Task-number: QTBUG-31269 Change-Id: Ic3bb76ea5a5055df614f2eaacd3031445f118ca7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Positioners: fix layout mirroringJ-P Nurmi2014-01-251-19/+61
| | | | | | | | | Listen to positioner geometry changes when the _effective_ layout direction is RTL. Task-number: QTBUG-35095 Change-Id: If06955c6bb04e5bed2126b05489229278c192173 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Correct a small typo to QtQuick::Grid::horizontalItemAlignmentJan Arve Saether2013-10-111-1/+1
| | | | | Change-Id: I09d56b69d9d958e7ad4bebd78dd66316a84a50b6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-021-34/+34
| | | | | | | | | | 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 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-5/+5
| | | | | | | | | | | -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: Made Qt Quick items' \since consistent.Jerome Pasion2013-09-251-2/+2
| | | | | | | | | | | | | | | | Qt 5.2: -"\since QtQuick 2.2" -> "\since 5.2" Qt 5.1: -"\since QtQuick 2.1" -> "\since 5.1" -"\since Qt 5.1" -> "\since 5.1" Qt 5.0: -"\since QtQuick 2.0" -> "\since 5.0" Task-number: QTBUG-32172 Change-Id: I699b00b31373a434ddb8f4caccfef40c588bf8a4 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc fixes to the Positioners/Layouts documentationJan Arve Saether2013-05-301-7/+7
| | | | | | | | | | | * Add references to Qt Quick Layouts * Don't lie about that Positioners can resize the items * Rename title from "Item Layouts" to "Item Positioners" to avoid confusion with Qt Quick Layouts Change-Id: I43e3ad6e6d9e4b08a1233868c75f0efcab43f8c3 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix some broken linksSze Howe Koh2013-05-201-19/+19
| | | | | Change-Id: I1385a8947107a7c80b32306fc587aff45536a4ec Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: Create links to Qt Quick 1Sze Howe Koh2013-04-241-4/+4
| | | | | | | | | | | Point to the porting guide, so that users who search for the old names will be directed to an explanation of the name change. Also made some new links to Qt Quick 2, and changed "favour" -> "favor" (Sanity Bot complained) Change-Id: If30c8d619d8fdb9df72b7b5f3efd356f1e07b23a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Qt Quick: Fix module name format (Pt 1/2)Sze Howe Koh2013-04-231-8/+8
| | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Attempt to differentiate between the whole module ("Qt Quick") and the QML import ("QtQuick") by encoding the latter with monospace font. There are places in the text where both representations are valid. Change-Id: Id6e157a4191aaa4e23a9cd5c76abfe902fe43d33 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix for Positioner attached propertyFilip Piechocki2013-04-161-13/+31
| | | | | | | | | | | Modified Positioner attached properties update - original code was trying to update visible and not visible items by looking only at the positionedItems array, which was wrong as that array contains only visible items. Hidden ones are stored in unpositionedItems array so second loop was added to affect these items also. Task-number: QTBUG-30477 Change-Id: If03abb76f4da708884a7e2cf6ade83c09eca45bf Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix usages of \since for QML itemsThomas McGuire2013-03-131-2/+2
| | | | | | | | | | \since uses the QML import, not the Qt version. When adding a new property, it needs a REVISION argument and the type needs to be registered again for the new version. Change-Id: I2e636e9d26c8e989729eadad2ef73a836c35caa1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Allow aligning items in a gridFabian Bumberger2013-01-281-2/+109
| | | | | | | | This change introduces two new properties, horizontalItemAlignment and verticalItemAlignment to a Grid element. This gives the user the possibility to align the items. Change-Id: I7322a689f1bbc1da342bd618f6c30dd8c139ee29 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>
* Renamed QQuickItem::pos property to positionShawn Rutledge2012-11-291-1/+1
| | | | | | | | | 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>
* 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>
* Fix various broken links in documentationBea Lam2012-08-031-8/+8
| | | | | 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-5/+10
| | | | | | | | | | -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>
* Change Quick docs to refer to "types" rather than "elements"Martin Jones2012-07-161-8/+8
| | | | | | Task-number: QTBUG-24785 Change-Id: I223479b879514abaacb123852323c1cfada7a5e1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Doc: Grouped Qt Quick types into several groupsJerome Pasion2012-06-061-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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>
* Doc: Sanitized QML typesNico Vertriest2012-05-241-6/+6
| | | | | | | | | | -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>
* 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>
* populate transition for positionersBea Lam2012-05-011-18/+123
| | | | | | | | | | Fix positioners to apply a "populate" transition for initially added items. This is consistent with ListView and GridView and also fixes the behaviour from QtQuick 1.x where the positioners were instead running the "move" transition for initially added items. Change-Id: Ib43f1141ce3e7379df085c178b684f89b8567403 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-131-26/+26
| | | | | | | | | | 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>
* Clean up transition objects for positionersBea Lam2012-03-101-3/+22
| | | | | | | | These must be cleaned up whenever items are removed from the internal PositionedItem lists. Change-Id: I56f64a29bd98c603b00faaead514fd43780c18de Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Avoid using QQuickViewItem as base classBea Lam2012-03-101-6/+58
| | | | | | | | | | This patch renames it to QQuickItemViewTransitionableItem, and FxViewItem and PositionedItem now create instances of this instead of subclassing it, to reduce the memory used when transitions are not required. Change-Id: Ie050cda5a121bff9542c7ba7356f6eacf37d241a Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix setting of target lists when target Transition is not setBea Lam2012-03-071-11/+5
| | | | | | | | | | | Target items are now set from QQuickViewItem::prepareTransition() instead of QQuickItemView and QQuickPositioner to ensure they are for a displaced transition even if there is no matching target transition. Task-number: QTBUG-24535 Change-Id: I0a6c7e3c6198786527014d421b96fc562c6186dc Reviewed-by: Martin Jones <martin.jones@nokia.com>