aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix accessibility initializationJ-P Nurmi2015-11-202-0/+11
| | | | | | | | | | | | If accessibility is already enabled at construction time, QQuickControl does not get a notification of accessibility activation change. This patch fixes the issue that the attached property object was not created at all, by calling accessibilityActiveChange(true) when appropriate at component completion. Change-Id: I5d763d66c97a540687b217b8ae453d073f6bfdb4 Task-number: QTBUG-49361 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Keep the overlay visible when there are any childrenJ-P Nurmi2015-11-171-6/+3
| | | | | Change-Id: I1446e88d7102ebae0e9933710e8e67d8ce925c5b Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* ApplicationWindow: cleanup content item codeJ-P Nurmi2015-11-171-6/+3
| | | | | Change-Id: I0133870a273ff44a07ee1a372498c2c242a63b36 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Docs: PanelJ-P Nurmi2015-11-171-5/+63
| | | | | Change-Id: Ifdf779c8a7ab85a303d4a018397b8700e48e85fd Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* ApplicationWindow: introduce attached propertiesJ-P Nurmi2015-11-162-0/+183
| | | | | | | | The attached properties provide convenient direct access to an application window and its building blocks. Change-Id: I2d96842d80faec47c875156202c1e33a2af96ad3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Cleanup & align the .pro filesJ-P Nurmi2015-11-161-1/+1
| | | | | | | | Remove some superfluous spaces, include paths, and module deps. Also, use more explicit QT_PRIVATE for private dependencies. Change-Id: I85d48213441749ab18442928a20cbb4c9c6dad0b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Introducing Panel typeGabriel de Dietrich2015-11-148-0/+761
| | | | | | | | | | | | | | | | | | | | This is the base type to implement all sorts of Popups and Dialogs. Its main role is to keep the panel contents stacked on top of the application window contents and to ensure mouse and key events are forwarded or blocked depending on the visible panels modality. Currently, it only works with ApplicationWindow, which holds a QQuickOverlay. This special item is where the Panel contents gets reparented when the Panel becomes visible. It's also responsible for filtering the mouse events. Future developements may include adding a 'level' property instead of relying on the item's z value. This may or may not result into having several overlays per window. Change-Id: I18a4b8905e4d5a4a4697642b0553a1f9e86b669f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Button: add highlighted propertyMitch Curtis2015-11-132-0/+41
| | | | | | | | Since our focus is on embedded, this will be used as an alternative to the "isDefault" property that exists in Qt Quick Controls. Change-Id: I9b6612e3c3b30040295aeea6d217e90a17af4ebe Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Document DrawerMitch Curtis2015-11-091-0/+88
| | | | | Change-Id: Ifa4b5e0423752ab1fa9c74f318d9104a47fd31de Reviewed-by: Topi Reiniƶ <topi.reinio@digia.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>
* Repurpose ExclusiveGroup to ButtonGroupMitch Curtis2015-11-068-482/+438
| | | | | | | | | | This is another way of solving the naming clash with Qt Quick Controls, and narrows our focus to the types of controls that actually make sense to have in an "exclusive" group; buttons (Android calls them "selection controls"). Change-Id: Icf6efe583fe784c3594de8635be84bbf757a55cd Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Implement TabBar without ExclusiveGroupJ-P Nurmi2015-11-045-96/+55
| | | | | | | | | 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>
* Expose AbstractButton.Mitch Curtis2015-11-041-1/+9
| | | | | | | | It will be used as the type that ButtonGroup (will be renamed from ExclusiveGroup) manages. Change-Id: Iedcf81a33ac8e7acad3e119159791995bc2ce2eb Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix QQuickAbstractButtonPrivate::findExclusiveButtons()J-P Nurmi2015-11-041-2/+3
| | | | | | | | | Looks like we can't rely on QObject::findChildren(), because Repeater and item views (object model) don't set the QObject parent. So iterate QQuickItem::childItems() instead. Change-Id: I69e0b4f7f23c1587c887921bd255dd87be3abc54 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add AbstractButton::autoExclusiveJ-P Nurmi2015-11-035-16/+105
| | | | | | | | | | | | | | This feature is adopted from QtWidgets' QAbstractButton. It's no longer necessary to create an ExclusiveGroup to manage a simple list of radio buttons: Column { RadioButton { text: "Option 1" } RadioButton { text: "Option 2" } } Change-Id: Ib4cb718c3b3034c9c956b2f23db4b06b00547b8e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add AbstractButton::autoRepeatJ-P Nurmi2015-11-023-5/+119
| | | | | Change-Id: Idbb94bac9ccdfae730f6e4da6d63c664971f41a3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix StackView::busy and child event filteringJ-P Nurmi2015-11-024-20/+21
| | | | | | | | | | | 1) renamed busy() to isBusy() to follow the Qt convention :) 2) fixed spurious busyChanged() emissions (it was always emitted on push/replace/pop even when the state didn't change (null transitions) 3) with null transitions, the child event filter was never turned off and therefore StackView "froze" after the first push/replace/pop Change-Id: I07fffa73db5a182865c7b2779641e1f95ed8b30b Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Improve the hit testing of an interactive PageIndicatorJ-P Nurmi2015-11-021-4/+28
| | | | | | | | The Universal style has relatively large spacing between the dots. The small dots are hard to hit => select the nearest dot. Change-Id: I2207e887706be38c1a6091bd8aca13d26b9957a8 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Remove BusyIndicator::indicatorJ-P Nurmi2015-11-022-33/+1
| | | | | | | | | The indicator -property became redundant when contentItem was promoted to the Control base type. The content item is automatically resized to the available size, so it's even more convenient to use. Change-Id: I92435e1105171e45838ef1f49f653ad0f8d3152a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename QQuickSpinner to QQuickSpinButtonJ-P Nurmi2015-10-302-29/+29
| | | | | | | | The old name was a bit confusing, because Spinner is a synonym to SpinBox: https://en.wikipedia.org/wiki/Spinner_%28computing%29 Change-Id: Id1e70d58238b93366c387c453803eabd002368eb Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Simplify TextField & TextArea placeholderJ-P Nurmi2015-10-306-88/+37
| | | | | | | | | | Better not expose the extra Text item in the API. Ideally it should be implemented as a scenegraph node. We might even want to promote the placeholderText property (and add placeholderColor) to TextInput and TextEdit in Qt Quick core. Change-Id: I4f443c77d1c696b87a50ee184f868713dd50316f Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Remove PageIndicator::colorJ-P Nurmi2015-10-302-31/+0
| | | | | | | | | | | | The color property was added in e828b9514. The idea was that it would be convenient to match the indicator against a specific background color, and that the property would be designable. However, the color property is basically impossible to support for styles that have specific color palettes for dark and light themes. => Implement a custom delegate if customization is required. Change-Id: I044bbe560a59362c585c801271cd2852456287b7 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* SpinBox: add validator, textFromValue and valueFromTextJ-P Nurmi2015-10-292-3/+153
| | | | | | | Change-Id: I45e01199453ac5fd64b7f98c165cc12eeb0ce8c3 Task-number: QTBUG-48989 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
* QQuickSwitch: cleanup implementation details from the APIJ-P Nurmi2015-10-292-61/+62
| | | | | Change-Id: I7cb9df78455bd32cfe70f29a1d3f9392dc88930f Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Added QQuickControl::accessibleRole() and etcLiang Qi2015-10-2939-52/+168
| | | | | | | | * m_accessibleRole was removed * also applied to QQuickLabel, QQuickTextArea and QQuickTextField Change-Id: I4b487f32cccfba0e16b3dba7e39882e8cd7ea616 Reviewed-by: J-P Nurmi <jpnurmi@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>
* TabBar: fix the default layouting of dynamically added tabsJ-P Nurmi2015-10-272-0/+18
| | | | | | | | | | countChanged() used to be connected to updateLayout(), but this went missing somewhere around 73f931a7. Now we have the itemAdded() and itemRemoved() hooks that allow us to do the same more efficiently. Change-Id: I8a3eefb61555358d63fae63d066851038e332233 Task-number: QTBUG-48993 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Control: fix available sizeJ-P Nurmi2015-10-271-4/+4
| | | | | | | | | | | First of all, don't allow negative available size, because it doesn't make much sense. Secondly, geometryChanged() was comparing new width to old height, so availableHeightChanged() was emitted under wrong conditions. Furthermore, the comparisons should are better done fuzzy to avoid unnecessary change notifiers. Change-Id: Ic2bbc106670882b421f79db82d4b47d846e1c4e0 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* StackView: add dedicated replace transitionsJ-P Nurmi2015-10-233-16/+78
| | | | | | Change-Id: I614d11bb566c96166ebf8bc0d2f5d4286d823a5f Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Container: virtual itemAdded() & itemRemoved() hooksJ-P Nurmi2015-10-225-29/+28
| | | | | Change-Id: I05d94b4d7660b38d2fa47d2d2b60b8730ce1b182 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Move the internal ExclusiveGroup from TabBar to ContainerJ-P Nurmi2015-10-224-55/+87
| | | | | | | | | | | | | | | | 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>
* Re-introduce SpinBoxJ-P Nurmi2015-10-223-0/+674
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It came up in discussions at the QtWS that even if we have Tumbler, people still want and expect to have the good old SpinBox control. SpinBox has it pros, such as that it might work better inside a vertical Flickable, and that in multi-field forms it might visually align better with other controls like TextFields. An early mockup of SpinBox was removed in 1c0edf0. A quote from the commit message: SpinBox is a desktop centric control. It won't be provided in Qt Quick Controls 2.0, but maybe later when desktop support is re-considered. Qt Quick Controls 2.0 will focus on embedded and mobile. SpinBox is still available in 1.x. While it is true that SpinBox might not be optimal for touch or mobile, the real reason for the removal was that validating decimal number input is very complicated. Even though locales have well- defined thousand separators and decimal points, users have very different expectations on how strict or relaxed the input validation should be. This change re-introduces a touch-optimized integer-based SpinBox. What makes it more touch friendly than the earlier version is that it has now auto-repeating buttons. Limiting it to integers avoids the decimal number input validation problem. We can introduce a separate DoubleSpinBox later if necessary - just like in QtWidgets. Change-Id: I2819060eb5d1ae6a8c00b0f12be703456085079d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add ExclusiveGroup::isCheckable(QtObject)J-P Nurmi2015-10-222-0/+20
| | | | | Change-Id: Id426592985e38f918b1a0df8ef2acc1c3f69c3c7 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Promote current index handling from SwipeView to ContainerJ-P Nurmi2015-10-225-45/+40
| | | | | Change-Id: I845b0999aaf9c211447c83bed2103de898c30b3f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickControl: dynamically create a11y attached objectLiang Qi2015-10-2128-106/+329
| | | | | | | Using QAccessible::ActivationObserver approach. Change-Id: Ib99c1f9b7b0c37a3e8a4747db265c9df77acc1f8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Docs: disambiguate group sectionsJ-P Nurmi2015-10-2024-24/+24
| | | | | | Change-Id: Ia6e8a53b8b5261e1efd80dcd3351cd216d34edf4 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
* Docs: Input groupJ-P Nurmi2015-10-196-11/+13
| | | | | Change-Id: Iba6e3503d20e1f141c5dd81a2eeab6176e809914 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Docs: Containers groupJ-P Nurmi2015-10-198-36/+27
| | | | | Change-Id: I5eb80f21edb50413b33a96b934466964e56462aa Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: Navigation groupJ-P Nurmi2015-10-194-52/+19
| | | | | Change-Id: Id866d226fc651a39fffd887600b4bf54d2b7ac6e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: include ScrollBar in indicators & add a screenshotJ-P Nurmi2015-10-191-6/+5
| | | | | Change-Id: I1ff8df098a358d39020a63aa8f1d920f620f838e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: link from BusyIndicator to Customizing BusyIndicatorJ-P Nurmi2015-10-191-7/+1
| | | | | Change-Id: I1fc29fdf1c02988717191b25bfec4323ddfe59b0 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Doc: RangeSlider: Move methods out of property groupsTopi Reinio2015-10-191-30/+33
| | | | | | | | | QDoc doesn't support documenting methods inside a property group. Move them to the top level and use 'see also' to link between the groups and methods. Change-Id: I09fcdecb38ff63986f0d2a8c5d4151c47f249f1c Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* PageIndicator: fix initialization of the 'pressed' context-propertyJ-P Nurmi2015-10-162-10/+19
| | | | | | | | | Component.onCompleted was too late, so now it's done as soon as delegate instances are created. Change-Id: I2bc3e051de6e005c914494a7c674f6c04582ec23 Task-number: QTBUG-48721 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Docs: Indicators groupJ-P Nurmi2015-10-155-20/+13
| | | | | Change-Id: I092b50dd0f184523ec28e4145a4e6b1eab1c762a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: Buttons groupJ-P Nurmi2015-10-155-10/+10
| | | | | Change-Id: I2945a3c367244ec0b92cc8f2ba84a7b052d9a514 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: Control::fontJ-P Nurmi2015-10-141-0/+20
| | | | | Change-Id: If2196bc7c82f8edb630c48aad3e7e00e0d7c2cee Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Docs: LabelJ-P Nurmi2015-10-141-0/+30
| | | | | Change-Id: I744f622edbc6589e9371518f82431220b667e03e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: SwipeViewJ-P Nurmi2015-10-141-1/+19
| | | | | | Change-Id: Iabeb3ebc54f64d2f3d0b008a5f5a16a89f701f85 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Add RangeSliderMitch Curtis2015-10-143-0/+1064
| | | | | | | | | This is basically Slider, except with two handles. It's used to specify a range of values. Task-number: QTBUG-48667 Change-Id: Ib4f9afe5dc8343e307610943d338a2b574a01e4d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>