aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* ApplicationWindow: introduce attached propertiesJ-P Nurmi2015-11-163-0/+185
| | | | | | | | 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>
* Use QGuiApplicationPrivate::styleOverride for style optionLiang Qi2015-11-161-10/+4
| | | | | Change-Id: Iba15ea0a213036185e49acbabdb5d64cbdc28421 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Universal: handle Button::highlightedJ-P Nurmi2015-11-161-2/+2
| | | | | Change-Id: I060980e8110cdc9158ce7f1030186cbdbadbe48e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Cleanup & align the .pro filesJ-P Nurmi2015-11-166-12/+10
| | | | | | | | 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>
* Align the Material style pluginJ-P Nurmi2015-11-165-13/+26
| | | | | | | | Specifically for static builds, use a unique name and explicit initialization for plugin resources. Change-Id: I2182386adfc5bbc5074f4dde6c9605b73207307b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add missing QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCIIJ-P Nurmi2015-11-168-7/+15
| | | | | | | http://lists.qt-project.org/pipermail/development/2012-February/002001.html Change-Id: Id6815c3bd9b196590b0c93b8ddf2f977cdc6a511 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Introducing Panel typeGabriel de Dietrich2015-11-149-0/+763
| | | | | | | | | | | | | | | | | | | | 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>
* StackView: update material style transitionsJ-P Nurmi2015-11-121-4/+16
| | | | | | | | - add missing replace transitions - sync other transitions with the "base" style Change-Id: I15e3a0ff96a3cfe545ff7f685449f248596201c1 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Universal styleJ-P Nurmi2015-11-1252-0/+3914
| | | | | | | https://dev.windows.com/design Change-Id: I1d8c633ae246724649a6ed71b300a56ba9572405 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Material styleMitch Curtis2015-11-1240-0/+3921
| | | | | Change-Id: I93662a53b42858a5b65154c5ede334182e738dde Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Document DrawerMitch Curtis2015-11-094-0/+103
| | | | | 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-0611-503/+453
| | | | | | | | | | 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-042-1/+11
| | | | | | | | 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>
* Update plugins.qmltypesJ-P Nurmi2015-11-031-4/+8
| | | | | Change-Id: Ia404b3a89088231f242838f3964e666016351e83 Reviewed-by: J-P Nurmi <jpnurmi@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>
* Editors: hide placeholder text when h-centered & focusedJ-P Nurmi2015-11-022-2/+2
| | | | | | | | | | | | | | The same was done to QLineEdit in qtbase commit a2666d3. A quote from the commit message: A blinking cursor in the middle over horizontally centered placeholder text looks bad. Thus, horizontally centered content is now considered as an exception and the placeholder text is hidden when the line edit is focused. Change-Id: I5f86482c425fe878ecf6b4046dd835a0464d2150 Task-number: QTBUG-49147 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-028-47/+11
| | | | | | | | | 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-303-30/+30
| | | | | | | | 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>
* Move the code snippets to a more logical placeJ-P Nurmi2015-10-30106-1/+4031
| | | | | | | | | | They are part of the documentation, but just auto-tested to ensure that they are actually creatable and don't throw warnings. Therefore the logical place is in the doc/snippets folder instead of somewhere in the tests/ tree. Change-Id: Id79a19890f7457ef277e7434a3fc6b6fb20eaa25 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Simplify TextField & TextArea placeholderJ-P Nurmi2015-10-3011-108/+50
| | | | | | | | | | 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-303-33/+1
| | | | | | | | | | | | 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>
* Controls: get style settingsLiang Qi2015-10-292-2/+16
| | | | | | | | * cmd line arg(has priority): -style material * env var: QT_LABS_CONTROLS_STYLE=material Change-Id: Iae93da883417e1e244b40b613c276f2a10878bb6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickFileSelector: renamed extraSelectors() to style()Liang Qi2015-10-293-8/+8
| | | | | Change-Id: Iffb9ac2577dab509894fbc340802ed27eb81058a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* StackView: use XAnimatorJ-P Nurmi2015-10-291-6/+6
| | | | | Change-Id: Ia972ee8aa6dbf65b509900fbcee0bcbaf9aefcee Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix "Customizing SpinBox" qdoc warningsJ-P Nurmi2015-10-291-2/+2
| | | | | | Change-Id: Ia234c696d52b328dda2effa2f2713353556c9ac6 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* SpinBox: add validator, textFromValue and valueFromTextJ-P Nurmi2015-10-294-8/+163
| | | | | | | Change-Id: I45e01199453ac5fd64b7f98c165cc12eeb0ce8c3 Task-number: QTBUG-48989 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
* Fix mis-aligned text in tabsJ-P Nurmi2015-10-291-2/+2
| | | | | | | | | More like a workaround, but this development style is not worth spending too much effort on right now... Change-Id: I4287dd4bc48a2db08347cf7bd44727b4eadb9935 Task-number: QTBUG-48718 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.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>
* Update plugins.qmltypesJ-P Nurmi2015-10-292-0/+38
| | | | | Change-Id: I195aa7e2a6146298159f3364f7f651aa3e3996ba 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>
* QQuickFileSelector: added baseUrl() and setBaseUrl()Liang Qi2015-10-274-30/+49
| | | | | Change-Id: I1c147cf11f7d50c103438ed8f56a058820d17789 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickFileSelector: removed selectorIndicatorLiang Qi2015-10-271-3/+1
| | | | | Change-Id: I63984ef8777112057f86211e235c8ec9846250f9 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Start to use QQuickFileSelectorLiang Qi2015-10-275-211/+56
| | | | | | | | | * Doc in QQuickFileSelector was removed * Replace QFileSelector with QQuickFileSelector * Add "We mean it" in qquickfileselector_p.h Change-Id: Idb7d8c9ce09300c8ada5d049db35de1c52760daf Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Controls: copy QFileSelector from QtCore 3cae29b7Liang Qi2015-10-273-0/+533
| | | | | | | | | | qtbase:src/corelib/io/ -> qtquickcontrols:src/imports/controls/ qfileselector.h -> qquickfileselector_p.h qfileselector_p.h -> qquickfileselector_p_p.h qfileselector.cpp -> qquickfileselector.cpp Change-Id: Ib418b715a0578eeb8ac21c6f07e2e7378c0696ce Reviewed-by: J-P Nurmi <jpnurmi@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-235-17/+99
| | | | | | 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-2214-1/+853
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Flat style: fix inheritance for re-parented itemsJ-P Nurmi2015-10-221-2/+2
| | | | | Change-Id: I33e77f93477b20a4f7af4f10fa8dde95fad1863a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>