aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickswipe_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Re-order all revisioned members and add explanatory commentsJ-P Nurmi2017-11-061-9/+15
| | | | | | | | | | We've come to realize that even though it's tempting to group similar properties together, organizing the API so that revisions are grouped together makes future maintenance more pleasant. It's a lot easier to to see what was added and when. Change-Id: I47ba7725260f2c259048848cc2a9b17bce2f01c7 Reviewed-by: J-P Nurmi <jpnurmi@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>
* | SwipeDelegate: rename swipe.rebound to swipe.transitionJ-P Nurmi2016-12-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "rebound" name originates from Flickable::rebound, but for swipe delegate the transition is not only applied on release, but also when calling swipe.open() or swipe.close(). Therefore the "rebound" name feels a bit off in this context. Furthermore, this patch adds the missing docs and a changelog entry. [ChangeLog][Controls][SwipeDelegate] Added a swipe.transition property that holds the transition that is applied when a swipe is released, or swipe.open() or swipe.close() is called. Change-Id: Ic38ec850c64dd21b8d9deb08609172c6cb0f6d71 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeDelegate: add swipe.opened() and swipe.closed() signalsJ-P Nurmi2016-12-141-0/+2
| | | | | | | | | | | | | | | | Emitted when the delegate has been opened or closed by swipe, _and_ the respective transition has finished. Change-Id: I8a242e24352d311fd8b41ceafd0a36619eff73f2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeDelegate: transition swipe.positionJ-P Nurmi2016-12-141-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the value of swipe.position jumped on mouse/touch release, or when open() or close() was called. Transitioning the swipe.position value smoothly to the target value makes it possible to use it as opacity/scale/etc. for the side items. Notice that this is backwards compatible with the old behavior. If no transition is set, the value jumps the same way it did before. In that case, Behavior on x makes the movement smooth. Task-number: QTBUG-57242 Change-Id: Id9c06b5b08fa73f2f575787e16dc6e20e4ccb545 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickSwipe: fix qdoc warningJ-P Nurmi2016-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | qdoc doesn't seem to like a C-style comment inside Q_PROPERTY macro: qquickswipe_p.h:66: warning: Failed to parse token /*REVISION 2*/ in property declaration Change-Id: Id73557b3706db06a7848bf37761ba8fcaebc1eb3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add SwipeDelegate::swipe.open()J-P Nurmi2016-11-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | SwipeDelegate: Add swipe.enabled propertyMitch Curtis2016-11-251-0/+5
|/ | | | | | | | | [ChangeLog][Controls][SwipeDelegate] Added swipe.enabled property to allow disabling of swiping. Task-number: QTBUG-57192 Change-Id: I733336690368ea3fb56a144a335a37e60a02f1b9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-11-231-0/+3
| | | | | | | Conflicts: src/quicktemplates2/qquickswipedelegate_p.h Change-Id: I5446503c1e4f21cb37f4fffeb3453d1c84b54b30
* SwipeDelegate: don't emit clicked when released outsideMitch Curtis2016-11-231-0/+117
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>