aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
Commit message (Collapse)AuthorAgeFilesLines
* Templates: rename the C++ module to qtquicktemplates2J-P Nurmi2016-04-13107-26548/+0
| | | | | Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add SwitchDelegateMitch Curtis2016-04-134-18/+248
| | | | | | | | | | | SwitchDelegate is an item delegate that is used in lists, and can be checked and unchecked. It derives from QQuickItemDelegate and hence has background press effects. The order of the indicator and text is reversed (compared to Switch) to reflect what is most commonly seen on mobile. Change-Id: I6f8fca8d1a8c91f2cb9d8bbbb685ad163712dfa1 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Expose checkable where necessary, instead of in QQuickAbstractButtonMitch Curtis2016-04-136-8/+43
| | | | | | | | | | | | | QQuickCheckBox, QQuickRadioButton and QQuickSwitch are inherently checkable, so having this property available to QML doesn't make sense. QQuickButton and QQuickMenuItem are the two classes that need to expose the property. Change-Id: Ic421c195295c4bef0fc934c98fa9e781d98c9b67 Task-number: QTBUG-51554 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickAbstractButton: fix the order of nextCheckState() vs. clicked()J-P Nurmi2016-04-121-4/+4
| | | | | | Task-number: QTBUG-52448 Change-Id: I4ee2c16f3dccc61e07268f9e8ced530a06d2adf3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7J-P Nurmi2016-04-113-7/+7
|\
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-113-7/+7
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/ScrollBar.qml src/imports/controls/material/ScrollBar.qml src/imports/controls/universal/ScrollBar.qml src/templates/qquickscrollbar.cpp tests/auto/controls/data/tst_scrollbar.qml Change-Id: I646882e0563f72df682bac49f96875a08b1b0de9
| | * Doc: fix ButtonGroup::buttons typeJ-P Nurmi2016-04-111-1/+1
| | | | | | | | | | | | | | | Change-Id: Id78ef819c56d4639c33e7b4823c2c2600486befa Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
| | * Fix ScrollBars with paddingsJoni Poikelin2016-04-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Padding was not taken into account when calculating the new position, which caused there to be small offset between the mouse press and the resulting handle position by the amount of padding used. Task-number: QTBUG-52233 Change-Id: Ibd8c4375b030a27a6124aefc4bc9af570d14d3a9 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
| | * ComboBox: fix usage in an asynchronous LoaderJ-P Nurmi2016-03-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following comment in QQmlDelegateModel::object() helped to find a solution ie. using createdItem() instead of initItem(): If asynchronous is true or the component is being loaded asynchronously due to an ancestor being loaded asynchronously, item() may return 0. In this case createdItem() will be emitted when the item is available. [...] Change-Id: If3bf8e60834534ca07c8db8f502f4f11969057e8 Task-number: QTBUG-51972 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | | Add RadioDelegateMitch Curtis2016-04-114-1/+172
|/ / | | | | | | | | | | | | | | | | | | | | RadioDelegate is an item delegate that is used in lists, and can be checked and unchecked. It derives from QQuickItemDelegate and hence has background press effects. The order of the indicator and text is reversed (compared to RadioButton) to reflect what is most commonly seen on mobile. Change-Id: I143ee9a30cd8ce1d624354f4cb981c41dfddc2d2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Add CheckDelegateMitch Curtis2016-04-115-0/+284
| | | | | | | | | | | | | | | | | | | | | | | | CheckDelegate is an item delegate that is used in lists, and can be checked and unchecked. It derives from QQuickItemDelegate and hence has background press effects. The order of the indicator and text is reversed (compared to CheckBox) to reflect what is most commonly seen on mobile. Change-Id: I6fdac226fe87247052389b2e49f6cf20d7be44fb Task-number: QTBUG-52208 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Correct Switch position & visualPosition documentationMitch Curtis2016-04-111-2/+2
| | | | | | | | | | | | | | | | The position is defined as a percentage of the indicator's size, not the control's. Change-Id: I5f758aa432413c2d93e394f19a1b1109e356a31d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Add Control::activeKeyFocusJ-P Nurmi2016-04-112-5/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a convenience property that combines Item::activeFocus and Control::focusReason. This allows us to solve QTBUG-51796 in an elegant way - we can simply set Qt::StrongFocus policy on most of the interactive controls, such as buttons. The only thing we need to make sure is to use activeKeyFocus instead of activeFocus in the styles. This ensures that key focus is only visualized when actually interacting with keys - not when interacting via touch or mouse. This is a generalized version of the solution that was already used in the Universal style ApplicationWindow. Change-Id: Ifbf78e3e412f3791c8f7c369bb2de53af9ac6b0f Task-number: QTBUG-51796 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | QQuickPopup: Deduplicate the code a bitKonstantin Ritt2016-04-101-8/+2
| | | | | | | | | | Change-Id: Ie6fea8d57886ba2c6ed3b3016cd6402f86395f34 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Relayout on setting the header or footer to nullKonstantin Ritt2016-04-092-8/+8
| | | | | | | | | | | | | | | | | | Passing null to i.e. Page's header resets the header item to Page's initial value, so that Page with unset header must look exactly like Page that never had header set. Change-Id: I553e5d2463e099723b74b0eec1b2224ae8ee970f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Relayout on the header|footer geometry and visibility changesKonstantin Ritt2016-04-092-10/+52
| | | | | | | | | | | | | | | | When the header or footer item's visibility changes, contentItem's geometry have to be adjusted. Change-Id: I9e73c48ff2301f8b371fc797ac4972ef5937b22f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Stop Button's pressAndHold once the button is not pressed anymoreKonstantin Ritt2016-04-071-1/+1
| | | | | | | | | | | | | | | | | | A custom-shaped Button's contains() could return false just anywhere within the content rect, so we should handle this exactly the same way as for the drag threshold overrun. Change-Id: Ie1665933be228334c6f95e97bd42e2dcd892b947 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Doc: Rename Qt Labs Controls to Qt Quick Controls 2Nico Vertriest2016-04-0734-38/+38
| | | | | | | | | | | | | | | | Replaced all remaining instances of "Qt Labs Controls" Change-Id: Iab8ca27d98a16a7c99bd364c66efc8b98d93eacc Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* | Improve documentation for delegate controlsMitch Curtis2016-04-011-1/+3
| | | | | | | | | | | | | | | | | | | | - Add "Delegate Controls" doc page. This will list future delegate controls, such as CheckDelegate, RadioDelegate and SwitchDelegate. - Add GIF for ItemDelegate. Change-Id: If8c66ab2178185f96d190f29ef7815beaa6e8d68 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | QQuickItemDelegate: remove unused private declarationsMitch Curtis2016-03-311-6/+0
| | | | | | | | | | Change-Id: I6525612814ff5f2d56db53c305aa4a6ea057dcea Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Docs: add examples how to sync active states for ScrollBar & IndicatorJ-P Nurmi2016-03-232-0/+14
| | | | | | | | | | Change-Id: I353f9c8b0dec4eef71d27300645a1dc3cbca82cd Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Inherit QQuickDrawer from QQuickPopupJ-P Nurmi2016-03-234-244/+203
| | | | | | | | | | | | Change-Id: Icf71270e63aedd93ba975ab9743de68c3a54e849 Task-number: QTBUG-51007 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Support ApplicationWindow attached property for items inside PopupJ-P Nurmi2016-03-231-0/+10
| | | | | | | | | | | | Change-Id: Ie8fb9fcf415670102d9364f85120bc315a8a067e Task-number: QTBUG-51991 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Introduce ToolTipJ-P Nurmi2016-03-223-0/+710
| | | | | | | | | | | | Change-Id: I917f7e83219788fc63389773eb07ee39757bed7f Task-number: QTBUG-51003 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-03-221-4/+16
|\| | | | | | | | | | | | | Conflicts: src/templates/qquickpopup.cpp Change-Id: Idb43ff6aff692d01e9bc03450a474bf18a7e41fa
| * Fix QQuickPopupPositionerJ-P Nurmi2016-03-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | tst_tooltip revealed a bug that QQuickPopupPositioner wasn't cleaning up its ancestor listeners properly. When QQuickPopup was destructed, it left a listener on the window root item. When the root item got later destructed, it tried to call a listener (the popup) that was already deleted. Change-Id: If041458da24be927f0bad19b9549dcabd1931977 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
| * Popup: fix marginsJ-P Nurmi2016-03-211-1/+13
| | | | | | | | | | | | Change-Id: I09f974a00a5a2a8f14645ff5d9bfbd6bad03d324 Task-number: QTBUG-51990 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Drawer: respect swipe velocityMitch Curtis2016-03-221-9/+13
| | | | | | | | | | | | | | | | A fast enough swipe should open/close the drawer, even if it doesn't cross the position threshold. Change-Id: Iede4ec669f7d42d197e8a42623714c977b0c8a03 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Fix build with '-qreal float'J-P Nurmi2016-03-222-3/+3
| | | | | | | | | | | | Change-Id: I190fe5408db582cdb393cf611ea0e661ed009d45 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
* | Remove RangeSlider::track in favor of Control::backgroundJ-P Nurmi2016-03-212-34/+1
| | | | | | | | | | | | | | In the series of minimalizing the delegate APIs. Change-Id: I11e519f5226bf44d18b42fd31276c5528b18ec46 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Remove Slider::track in favor of Control::backgroundJ-P Nurmi2016-03-212-33/+1
| | | | | | | | | | | | | | In the series of minimalizing the delegate APIs. Change-Id: I664f4227ff55876be2594c8855dacc7c92eddc94 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | ProgressBar: use contentItem instead of indicatorJ-P Nurmi2016-03-212-33/+1
| | | | | | | | | | Change-Id: I8bd21b32b6f3d333c119d77b629b46fe411c06eb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Fix QQuickPopup::setVisible()J-P Nurmi2016-03-211-4/+11
| | | | | | | | | | | | | | | | | | | | Make sure to store the visibility flag even if the component is not yet completed. This way QQuickPopup::componentComplete() will run the enter transition as it was supposed. Change-Id: I1e4536e2fdb575b80174ae445626af43bdc45ed6 Task-number: QTBUG-51989 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Popup: make ApplicationWindow attached properties availableJ-P Nurmi2016-03-213-2/+11
| | | | | | | | | | | | Change-Id: Idde9fb49c222abc1ceabd15256695fd1961a9f76 Task-number: QTBUG-51991 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Change the default value of QQuickPopup::closePolicyJ-P Nurmi2016-03-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Popup::ClosePolicy was introduced, I thought that it would be better to not set OnPressOutside by default, because not all popups necessarily want to close on press outside. However, I've realized that every time I do Button { onClicked: popup.open() Popup { } } ...there's literally no interactive way to close the popup (popups don't take focus by default, so Esc doesn't work). Provided that a top-level QWidget with the Qt::Popup flag set also closes automatically on press outside, it probably makes more sense for us to follow the same pattern so that poor new users don't have to lookup the docs just to figure out how to make a popup close. :) In this case it's less troublesome to specify a different default value in those special scenarios/subclasses where closing on press outside is not desired (eg. the upcoming Popup-based Drawer). Change-Id: Iaeab4c548d63728df12232d8b65d469f0a2d80f5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | ScrollBar: add increase(), decrease() and stepSizeJ-P Nurmi2016-03-212-1/+81
| | | | | | | | | | Change-Id: I052b650fee7ae94cc826446d285d653a41bd1e75 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | ScrollBar: use contentItem instead of handleJ-P Nurmi2016-03-212-33/+24
| | | | | | | | | | | | | | | | Thanks to virtual resizeContent() we can finally use contentItem like everywhere else, and cleanup the special handle item. Change-Id: I9e52ec3ff327d19cda3d85d2e2d9b73d80442bbc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | ScrollIndicator: use contentItem instead of indicatorJ-P Nurmi2016-03-212-33/+26
| | | | | | | | | | | | | | | | Thanks to virtual resizeContent() we can finally use contentItem like everywhere else, and cleanup the special indicator item. Change-Id: Ia2bd62684d49a05c199e490750a31c13d2c22182 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Add QQuickVelocityCalculatorMitch Curtis2016-03-214-6/+204
| | | | | | | | | | | | | | | | This can be used by classes like QQuickDrawer and QQuickSwipeDelegate to handle calculation of flick velocity. Change-Id: I783c5fccad8509a8ea0ad4559f3f8b0c47b7a9a2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Use fonts from theme for editable controlsNikita Krupenko2016-03-194-2/+9
| | | | | | | | | | | | | | Also set proper fonts for editable controls in Material theme. Change-Id: I78b8f8597a653af593787e569d6ba5ee7bf182a9 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Move QQuickSwitch::positionAt() to QQuickSwitchPrivateJ-P Nurmi2016-03-192-11/+11
| | | | | | | | | | | | | | | | Hide it from the semi-public API for now, so we don't need to commit to it until we know if it's really needed. Change-Id: Ic9b8deaa5d39bffb6f4649a64306687aea8db3fa Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Move QQuickScrollBar::positionAt() to QQuickScrollBarPrivateJ-P Nurmi2016-03-192-14/+16
| | | | | | | | | | | | | | | | Hide it from the semi-public API for now, so we don't need to commit to it until we know if it's really needed. Change-Id: Ic53cf2b34f293afcfc7c827db660ba6d5c678f0f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Cleanup whitespaceJ-P Nurmi2016-03-192-1/+1
| | | | | | | | | | Change-Id: I97ac45fe3b3205f4f5073cb0c59215ba6c010a13 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Clarify ComboBox::increase() and decrease() docsJ-P Nurmi2016-03-191-3/+8
| | | | | | | | | | Change-Id: I1057412b72c0912c41f23553681f0b32a32d4711 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Rename QQuickPressAndHoldHelper to QQuickPressHandlerJ-P Nurmi2016-03-197-55/+55
| | | | | | | | | | | | | | | | | | | | The editors need also pressed() and released() signals. The actual signals will be added in a follow-up commit. This just renames the class to something that is not exclusively tied to press-and-hold. Task-number: QTBUG-51009 Change-Id: Ib6c7ec9f213c0c9deb08bb450206661ec34aaa82 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Add Popup::localeJ-P Nurmi2016-03-185-7/+60
| | | | | | | | | | | | Change-Id: I1f07318f3e018debd74e41bc0a1443c45def7bf3 Task-number: QTBUG-50984 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Add Popup::fontJ-P Nurmi2016-03-185-1/+78
| | | | | | | | | | | | Change-Id: I66feeb597e9f4a6176d6462640b3e26823a3d761 Task-number: QTBUG-50984 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Rename Qt Labs Controls to Qt Quick Controls 2 - doc asset filenamesMitch Curtis2016-03-1832-73/+73
| | | | | | | | | | | | | | | | | | This renames all documentation assets (snippets, images), but leaves .qdoc files and the .qdocconf file in an attempt to avoid conflicts with controls 1. Change-Id: I08692233e8d645de8d9746fe74edc14d31bb744e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Rename Qt Labs Controls to Qt Quick Controls 2 - build systemMitch Curtis2016-03-1855-118/+118
| | | | | | | | | | | | | | | | | | The imports will be done later, as we don't want to change them until the module is releasable (which requires things like selection handles, etc.). Change-Id: I2140cff7058fc3b696e92ca8c0e5e06dca9a7c9c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7J-P Nurmi2016-03-185-26/+15
|\ \