aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickabstractbutton_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QQuickAbstractButton: add preliminary support for mnemonicsJ-P Nurmi2017-06-141-0/+10
| | | | | | | | | | This patch adds mnemonic shortcut functionality. We don't have a nice way to visualize mnemonics yet, so we just remove the ampersands from the UI for now. Change-Id: I90f54bd18d5d17f11e02c18c8461bfc25ce51cf1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make QQuickIcon a value typeJ-P Nurmi2017-05-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickIcon no longer inherits QObject, but becomes a light-weight implicitly shared Q_GADGET-type, that is passed by value the same way fonts and colors are. Before: SUB: OS: Fedora 25 (Workstation Edition) SUB: QPA: xcb SUB: GL_VENDOR: Intel Open Source Technology Center SUB: GL_RENDERER: Mesa DRI Intel(R) Haswell Desktop SUB: GL_VERSION: 3.0 Mesa 13.0.4 SUB: running: benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml SUB: 110 frames SUB: 109 frames SUB: 109 frames SUB: 109 frames SUB: 109 frames SUB: Average: SUB: 109.2 frames; using samples; MedianAll=109; StdDev=0.447214, CoV=0.00409536 After: [...] SUB: running: benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml SUB: 123 frames SUB: 124 frames SUB: 124 frames SUB: 122 frames SUB: 125 frames SUB: Average: SUB: 123.6 frames; using samples; MedianAll=124; StdDev=1.14018, CoV=0.00922472 Change-Id: I604532204fb94fc0726d0c9b8b6097f9ebc265e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-04-211-6/+5
|\ | | | | | | | | | | | | | | Conflicts: src/imports/controls/RoundButton.qml src/imports/controls/universal/RadioDelegate.qml Change-Id: I4cb14c19bd5f6e19b70b03fb394c76712e6dda08
| * Override QQuickControlPrivate::handleXxx()J-P Nurmi2017-04-201-4/+4
| | | | | | | | | | | | Change-Id: I5c5be24142a758637e18df24b43847a8c6079346 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * QQuickAbstractButton: align handleXxx() with QQuickControlJ-P Nurmi2017-04-201-3/+3
| | | | | | | | | | | | | | | | Match the signature of the upcoming QQuickControlPrivate::handleXxx() virtuals. Change-Id: Ieed3587443bea715b1b6eb2cc334130b2df7deb8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickControl: implement focus handling on touchJ-P Nurmi2017-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickControl::focusPolicy was only managed in mousePressEvent() and mouseReleaseEvent(). All controls call the base class implementations of these event handlers to get the focus policy handling "for free". Move focus policy handling to handlePress() and handleRelease() that can be re-used for touch events, and make sure that various controls call the base class implementation of touch event handlers. There's still a bit of duplication in QQuickControl::touchEvent() and the overridden handlers in sub-classes, but this will be improved step by step. QQuickControlPrivate::handlePress/Move/Release/Ungrab() are planned to be made virtual, overridden in subclasses, and only called from QQuickControl event handlers. Most mouse and touch event handlers in QQuickControl subclasses can be removed later when we get there. Task-number: QTBUG-58389 Change-Id: I7e82dc2ef49762a005c482ce1353e03cc841659f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add AbstractButton::actionJ-P Nurmi2017-04-101-0/+4
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls][AbstractButton] Added AbstractButton::action property. Task-number: QTBUG-50705 Change-Id: I773459df336a9e0cb9dbf980471485f81bbdab71 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | AbstractButton: add display propertyMitch Curtis2017-03-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This property allows control over how icons and text are displayed within buttons, without having to implement custom delegates. It is also necessary for the upcoming Action type. [ChangeLog][Controls][AbstractButton] Added display property to allow control over how icons and text are displayed within buttons, without having to implement custom delegates. Task-number: QTBUG-49820 Change-Id: Ie924e2c54ed49961fd40129999875c8175606ecd Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | AbstractButton: add support for iconsMitch Curtis2017-03-241-0/+2
|/ | | | | | | | | | | | | | | | | | | | | This patch adds the following properties to AbstractButton: - icon.name - icon.source - icon.width - icon.height - icon.color Derived types implement the behavior behind these properties using the new private IconImage type. [ChangeLog][Controls][AbstractButton] Added support for icons. The following properties are now available for derived types to use: icon.name, icon.source, icon.width, icon.height, icon.color. Task-number: QTBUG-49820 Change-Id: I3b5e4eaac390543deef60883e13539646a6bb060 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickAbstractButton: handle touch eventsJ-P Nurmi2017-01-241-1/+2
| | | | | | | | This makes it possible to interact with multiple buttons at the same time. Change-Id: Ice17efcb8b6dc5337455cd38ee88c39dfef2baae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Revise QQuickAbstractButton internalsJ-P Nurmi2017-01-021-0/+5
| | | | | | | | | | | | | | | | Move the logic of press/move/release/cancel event handlers into methods in the private class, that can be reused or overridden from subclasses. Change-Id: Ie1f73e07c3389955c1d624e5b5a7e6bd240d0490 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add AbstractButton::toggled() signalJ-P Nurmi2016-12-021-0/+2
|/ | | | | | | | | | [ChangeLog][Controls][AbstractButton] Added a toggled() signal that is emitted whenever a checkable button is interactively toggled by the user by using either touch, mouse, or keys. Task-number: QTBUG-57203 Change-Id: If0b0d71d19cbed00f04d8a4309894a055c4254c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-221-0/+1
|\ | | | | | | Change-Id: I37aab846346692fd4bff08b0dbab66db3a8e2716
| * Fix Switch to stay pressed as appropriateJ-P Nurmi2016-09-191-0/+1
| | | | | | | | | | | | | | | | | | | | Switch is a special type of button that should stay pressed (similarly to Slider) even if the finger slips outside the bounds of the control. It was doing that only when dragged from the handle, not when dragged from the background. Change-Id: I462c66cfe2e67fc3c95215ffeafe3e5771174418 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickAbstractButton: make the press point available via private APIJ-P Nurmi2016-07-111-1/+1
|/ | | | | | | | | | | | The Material style ripple effect needs it to be able to anchor waves at the press point. Export QQuickAbstractButtonPrivate to make it accessible, and update the press point before emitting pressedChanged() since that's what the ripple effect reacts to. Press point dependent ripple effects follow in separate commits. Change-Id: I63eb51eeabcbeb307dea9d0b1731bdb51b518ec7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Move highlighted to subclasses that actually use itMitch Curtis2016-04-271-1/+0
| | | | | Change-Id: I70468b35b2a3a03c6e2d557a67443291697c8b42 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add QQuickAbstractButton::downMitch Curtis2016-04-151-0/+2
| | | | | | | | | | | | | | | | | This property will determine whether or not the button is visually pressed. Having such a distinction allows users more control over their controls. The patch also fixes the problem with ComboBox where pressing on the ComboBox when it's open would cause a delegate in the popup to show as being pressed. Unless explicitly set, this property follows the value of the pressed property. To return to the default value, set it to undefined. Change-Id: I29ecf325ed2ede125613f0c878b0427937599866 Task-number: QTBUG-51005 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Templates: update license headersJ-P Nurmi2016-04-141-2/+2
| | | | | | | This file is part of the Qt Quick Templates 2 module of the Qt Toolkit. Change-Id: I39ef9cbb00f55a32b7a43f11ffbdfbb40b84e124 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Templates: rename the C++ module to qtquicktemplates2J-P Nurmi2016-04-131-0/+100
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>