aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickcontainer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Docs: add notes about the Qt.labs moduleJ-P Nurmi2016-01-191-0/+2
| | | | | Change-Id: I65c37f661689bf30e7a9119bb877dce68eeb634c Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Make tst_tabbar pass with a PathViewJ-P Nurmi2015-11-061-5/+17
| | | | | | | | | | | | The upcoming universal style uses PathView as a content item for TabBar. Compared to ListView, PathView has some differences in the hanling of current index. For example, the current index of an empty PathView is reseted to 0. This patch ensures that Container retains the correct current index during insert/move/remove operations, no matter which content item is used. Change-Id: I385121d75a410e27d7bef9f5042a51948c7d7db3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Container: fix stack before/after warningsJ-P Nurmi2015-11-061-7/+29
| | | | | | | | | | | When inserting items to a Container, reparent them to the "effective" content item. If the Container's content item is a ListView (Flickable), the effective content item is the content item of the ListView, not the ListView itself. Change-Id: I8c4abbac811b0aa6b56f2cdf87656a01279d5bf7 Task-number: QTBUG-48720 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Implement TabBar without ExclusiveGroupJ-P Nurmi2015-11-041-79/+21
| | | | | | | | | Make use of auto-exclusivity introduced in a108298. Fixes also the issue that the TabButton that corresponded currentIndex was not checked at startup. Change-Id: I44152e62c2dff30e8e0255c9403dcf46c4ea2f3a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* TabBar: fix binding loop on currentIndexJ-P Nurmi2015-10-271-6/+10
| | | | | | | | | | | | | | TabBar is a container of exclusive items aka TabButtons. In this case we let ExclusiveGroup manage the currently checked item, and just sync the current index when appropriate. In the case of a SwipeView, which contains arbitrary non-checkable items, we track the current index of the content item. However, we should avoid doing both at the same time, because it leads to a race between content item's current index and exclusive group's current item. Change-Id: Ib2d4dfe0d22d883be49b03a3b2311bdea7d937d9 Task-number: QTBUG-48993 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Container: virtual itemAdded() & itemRemoved() hooksJ-P Nurmi2015-10-221-17/+17
| | | | | Change-Id: I05d94b4d7660b38d2fa47d2d2b60b8730ce1b182 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Move the internal ExclusiveGroup from TabBar to ContainerJ-P Nurmi2015-10-221-9/+75
| | | | | | | | | | | | | | | | TabBar needs to support PathView as a content item (for the Universal style). PathView creates a highlight item, which wrongly ends up being added as a content child. It shows up as an extra empty TabBar item, and leads to a warning from ExclusiveGroup::addCheckable(). An exclusive group instance is lazily created only for those containers that need it. This allows us to simplify the virtual hooks for added and removed items, whereas otherwise we would had had to add more complex hooks (before _and_ after adding an item) to be able to control/ignore the highlight somehow from the TabBar subclass. Change-Id: I2c35a1dd80541bc6b30e713a760277940a5486ed Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Promote current index handling from SwipeView to ContainerJ-P Nurmi2015-10-221-4/+36
| | | | | Change-Id: I845b0999aaf9c211447c83bed2103de898c30b3f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: disambiguate group sectionsJ-P Nurmi2015-10-201-1/+1
| | | | | | Change-Id: Ia6e8a53b8b5261e1efd80dcd3351cd216d34edf4 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Docs: Containers groupJ-P Nurmi2015-10-191-0/+3
| | | | | Change-Id: I5eb80f21edb50413b33a96b934466964e56462aa Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Document Container::currentIndex & currentItemJ-P Nurmi2015-10-131-2/+2
| | | | | Change-Id: I7343be413f27a5761f790a3abf671eee89d17a3f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Docs: make Container non-qmlabstractJ-P Nurmi2015-10-131-2/+3
| | | | | | | It is registered as a type, just like Control. Change-Id: Ic9538c524b5fd38f63648aec401c83fde834bbc7 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename QtQuick.Controls 2.0 to Qt.labs.controls 1.0J-P Nurmi2015-10-011-12/+12
| | | | | Change-Id: I142622dd85e95ef70b11132e77ccf48701f2cabc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename QtQuick.Templates 2.0 to Qt.labs.templates 1.0J-P Nurmi2015-10-011-1/+1
| | | | | | Change-Id: I3263a600065dfa2bfe7334ec44a74e2dca83aa36 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Doc: Replaced the module name qualifier used for QML docsVenugopal Shivashankar2015-09-231-11/+11
| | | | | | | | Also made changes to avoid qdoc warnings about qml snippets. Change-Id: Ide047fe7a4901fcf4b03efdccf457662e60585d2 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Move currentIndex, add/insert/removeItem to QQuickContainerMitch Curtis2015-09-171-1/+67
| | | | | Change-Id: I6bb2adb4de972bb62f0e72c80cc50cf90964631f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename libQtQuickControls to libQtQuickTemplatesJ-P Nurmi2015-09-161-0/+378
Change-Id: I1e663bb7be2be8b3d4edf0c038862cc2150aec40 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>