aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpositioners.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge master <-> api_changesMatthew Vogt2012-03-051-165/+210
|\ | | | | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
| * Improved transitions for Row, Column, Grid, FlowBea Lam2012-03-021-165/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | The view transitions functionality for ListView and GridView has been integrated into the positioner elements. Not all of this functionality is available for positioners, though, since they don't have models (and thus cannot identify certain model operations) and they don't manage the lifetime of their children. Task-number: QTBUG-24336 Change-Id: I71588de289555d2ef5a763af11358bc0af7b31a7 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Make sure positioners remove change listeners for invisible items.Martin Jones2012-02-291-0/+5
| | | | | | | | | | | | | | | | Children that are invisble weren't having their change listeners removed, which showed illegal accesses on destruction in valgrind. Change-Id: Icae798e773168323781e9ab88b3dae6a5aea0952 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* | Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-31/+31
|/ | | | | | | | | | | | | 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>
* Positioners cleanupAlan Alpert2012-02-221-74/+81
| | | | | | | | Use qreal for positions and spacing instead of ints, and make the positionedItems list take care of filtering out invisible items. Change-Id: Icad93ad89c848e40a70bd7a9539bd810e27020df Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Doc improvements for positionersBea Lam2012-02-221-220/+161
| | | | | | | | | | | - Fix docs that say opacity changes can trigger an add transition since this is no longer the case - Be more clear about when the move transition is applied - Be more clear about which anchors are allowed/disallowed in which positioners - Add example to Positioner attached property Change-Id: I78417ac5b8eba1af5587955121b7fd4e2ca21169 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Whitespace fixes for positionersAlan Alpert2012-02-221-21/+21
| | | | | Change-Id: I53a8a023e218cd41b2c01a7c931c95edfbaee780 Reviewed-by: Bea Lam <bea.lam@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>
* Fix docs: wrong types of Positioner attached propertiesLeonardo Sobral Cunha2012-01-251-3/+3
| | | | | Change-Id: I9ec9a070dfe5fdaebd11f4b92b9f44b034f24855 Reviewed-by: Martin Jones <martin.jones@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>
* Avoid anchor/positioning loopsAlan Alpert2012-01-231-7/+11
| | | | | | | Task-number: QTBUG-23740 Change-Id: I84922ac2dc6e499fc22b923298ca31eda382c622 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/+1532
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>