aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickswipedelegate_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Register C++ types declarativelyMitch Curtis2020-08-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapt to the new way of registering C++ types. The types need to be seen at compile time so that code can be generated that invokes them. This patch: - Adds QML_* macros where applicable. - Adapts the build system files to the new way of registering modules. - Splits up the QtQuick.Controls[.*].impl files into their own plugins, as we can only register one QML module per .pro file. - Removes C++ type registration calls in every plugin. - Moves private types from src/quickcontrols2/quickcontrols2.pro to src/quickcontrols2/impl/quickcontrols2-impl.pro. Some of these types need to be exposed to QML, but quickcontrols2.pro is already in use to declare the QtQuick.Controls import (and also provides the public C++ QQuickStyle API), and the new QML_IMPORT_NAME/VERSION syntax only allows one module per project. As some of the types that need to be exposed to QML are also referenced by some C++ code (e.g. tests, etc.), we just move all of the private types to the new library. Follow-up patches will register the QML types declaratively. Task-number: QTBUG-82922 Change-Id: Iaf9ee106237d61701d57a8896f3822304c8151a6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Adapt to geometryChanged => geometryChange renamingMitch Curtis2020-04-241-1/+1
| | | | | | Task-number: QTBUG-82994 Change-Id: Iaf530d2a6f4dc92641d0c10e16e7b931f90646ac Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove old QQuickPalette implementationVitaly Fanaskov2020-03-181-1/+0
| | | | | | | | | | | | | | The existing implementation was removed in order to reduce massive code duplication and simplify color resolving process. Unit tests were fixed accordingly. See related changes in the qtdeclarative module for the further details. [ChangeLog][General] the palette API is a part of QQuickItem now. Change-Id: Ic94ab4632e626c11d9b26f035e2a8a119c9088ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickSwipeDelegate: don't re-position until component completeJ-P Nurmi2018-04-121-0/+1
| | | | | | | | | | This avoids a binding loop with implicitBackgroundWidth. The problem is that reposition() calls QQuickControl::background(), which may force an early execution that triggers a whole bunch of expressions to be re-evaluated. Change-Id: I6d780a3ecb78cfb0581fee859a7ead0eb7ecdc1a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickTheme::ScopeJ-P Nurmi2018-03-151-0/+1
| | | | | | | | | | | Replace the old enums that were originally copied from QPlatformTheme, including irrelevant entries for DockWidget, MdiSubWindow, MessageBox, with a unified enum that will be matched to cover everything needed for theming fonts and palettes for Qt Quick Controls 2. Task-number: QTBUG-67062 Change-Id: Ia99d092f28c00210c0c7f24d4241eb5a5d9ceb5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Mark properties as FINALJ-P Nurmi2017-06-061-1/+1
| | | | | | | | | This is a little optimization trick for the QML engine. We basically tell it to not lookup overridden/overshadowed properties further in subclasses/composite types. Change-Id: I04168c58d00c07e5a354259cabefb3664ffd95b3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickSwipeDelegate: disable touch events to fix swiping on touchJ-P Nurmi2017-05-021-0/+1
| | | | | | | | Don't allow QQuickControl to accept touch events, because QQuickSwipeDelegate is still based on synthesized mouse events. Change-Id: I750ab3b602882ff9d34e013bc08ed4584482138f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Port from QT_NO_ACCESSIBILITY to QT_CONFIG(accessibility)J-P Nurmi2017-02-241-1/+1
| | | | | Change-Id: I03deebff661746d49e537af5b1c8899b938efb0d 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>
* | Add SwipeDelegate::swipe.open()J-P Nurmi2016-11-251-0/+4
|/ | | | | | | | | | | | This allows nice tricks, such as opening the swipe on click to expose more details for clicked delegates. [ChangeLog][Controls][SwipeDelegate] Added swipe.open(side) method that can be used to programmatically open the side item on the specified side, which can be either SwipeDelegate.Left or SwipeDelegate.Right. Change-Id: I64000e41ef62e04bf11a3819e03353c3ae4690cb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-11-231-60/+1
|\ | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickswipedelegate_p.h Change-Id: I5446503c1e4f21cb37f4fffeb3453d1c84b54b30
| * SwipeDelegate: don't emit clicked when released outsideMitch Curtis2016-11-231-56/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there are no delegates and hence the mouse hasn't been grabbed, we should clear the pressed state when the mouse is dragged outside the control. We can do so by falling back to the event handling of the base class (QQuickItemDelegate) when we have no delegates. This also ensures that the canceled() signal is emitted. A similar thing is done for controls with delegates, except that only the vertical position of the mouse is checked, as we still want to initiate swipes horizontally. Change-Id: I7738f5b9e8e8b6ce4a733008fa4ff73596e854ea Task-number: QTBUG-56312 Task-number: QTBUG-57285 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | SwipeDelegate: comment out the revision of swipe.completed()J-P Nurmi2016-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QML engine cannot handle revisioned grouped or attached properties: import QtQuick.Controls 2.1 SwipeDelegate { swipe.onCompleted: { } } => ".onCompleted" is not available due to component versioning." Change-Id: I5bc944aeac7c7f16f482208a523110ccaa42241b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-07-151-0/+2
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickswipedelegate.cpp tests/auto/controls/data/tst_swipedelegate.qml tests/auto/controls/data/tst_textarea.qml tests/auto/controls/data/tst_textfield.qml Change-Id: I244f4ead4d14238c41db0bd965d7a2938f2ea8fc
| * SwipeDelegate: reposition contentItem, background on width changesMitch Curtis2016-07-121-0/+2
| | | | | | | | | | | | Change-Id: I6af4f1a4517e79f2e34b0bbca401b0eefd0c6ff4 Task-number: QTBUG-54660 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | SwipeDelegate: add swipe.pressed and swipe.clicked()Mitch Curtis2016-07-141-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | These allow users to detect when non-interactive left/right/behind items are being pressed and clicked. [ChangeLog][SwipeDelegate] Added swipe.pressed and swipe.clicked() for detecting when non-interactive left/right/behind items are pressed and clicked. Change-Id: I858f0a8e4f85b3f80f93eb4f1680d8e121acdd41 Task-number: QTBUG-54651 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | SwipeDelegate: add swipe.completed() signalMitch Curtis2016-07-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows users to respond to completion of the swipe by e.g. removing the item from the list it is in. [ChangeLog][SwipeDelegate] Added swipe.completed() for responding to completion of swipes. Change-Id: I3d605f18a1aff8892a6e088188b606a630e99506 Task-number: QTBUG-54651 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | SwipeDelegate: add swipe.close()Mitch Curtis2016-07-131-0/+2
|/ | | | | | | | | | | | This allows users to close the swipe after an action has been triggered, for example. [ChangeLog][SwipeDelegate] Added swipe.close() for setting swipe.position to 0. Change-Id: Ib12a6592ac1ba46baafd88a41ea8f297599c7bbc Task-number: QTBUG-54651 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* SwipeDelegate: rename exposure to swipe, active to completeMitch Curtis2016-05-231-12/+12
| | | | | | | | | "swipe" is both shorter and easier to understand. "complete" is easier to understand. Task-number: QTBUG-53519 Change-Id: I87ecba4ac878f033111ee56fa618b80b227858a7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Q_QUICKTEMPLATES2_EXPORT => Q_QUICKTEMPLATES2_PRIVATE_EXPORTMitch Curtis2016-04-271-2/+2
| | | | | | | They're all private classes. Change-Id: I2f1463429109c5651f9cca5bc7aabe5cf0f79637 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix SwipeDelegate to inherit ItemDelegateJ-P Nurmi2016-04-211-2/+2
| | | | | Change-Id: I33df7b5002b898ee9c839eef588d6d4e1a9936de Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Templates: update license headersJ-P Nurmi2016-04-141-1/+1
| | | | | | | 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/+145
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>