aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickdial.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Dial: react immediately when using a mouseJ-P Nurmi2017-04-051-3/+3
| | | | | | | | | | | | The initial drag threshold is a necessary evil on touch to avoid conflicting with flickables, but leads to bad experience (QTBUG-47081) when using a mouse. Now that we have separate mouse and touch handling, we can apply immediate moves when using a mouse, but keep the old behavior on touch. Task-number: QTBUG-59920 Change-Id: I097cbdaed4933c0d907097b75f15ba16dcf615b1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Set explicit cursors on all interactive controlsJ-P Nurmi2017-04-051-0/+3
| | | | | | | | | | | | For example, if you have a floating button on top of a text editor, hovering the button must change the cursor from the editor's ibeam cursor to an arrow cursor. This applies to all interactive controls that call setAcceptedMouseButtons(). If a control blocks mouse events, it should not use some random cursor from another control underneath. Task-number: QTBUG-59629 Change-Id: I8a6ae306bbc76a9b22377361cb19cf9c3a872d31 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: fix linking error in qquickdial.cppJ-P Nurmi2017-03-281-1/+1
| | | | | | | | | | | Dial::valueAt() does not exist. qquickdial.cpp:515: warning: Can't link to 'valueAt()' The broken see also link was accidentally copied from Slider. Change-Id: I781b7d0bcf15d3b34dd2b8784a273d5cd7218469 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>
* Cancel incubation of replaced/destroyed delegatesJ-P Nurmi2017-02-101-1/+1
| | | | | | | | Resolves the "Object destroyed during incubation" issues. Task-number: QTBUG-50992 Change-Id: Ie58c958dafbf915da7494dac25351be98106c6ea Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix build with -no-feature-wheeleventJ-P Nurmi2017-01-311-0/+2
| | | | | Change-Id: I6f40794ae1977d1f23916bff6d0c58d44440fbe5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Default QQuickDial::live to trueJ-P Nurmi2017-01-271-13/+3
| | | | | | | | | [ChangeLog][Important Behavior Changes] On a popular demand, Dial has been changed to report live value updates. This can be disabled by setting Dial::live to false. Change-Id: Ie591ec33f56482b825250f64abf55118afec3e6b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use keepTouchGrab instead of keepMouseGrab when handling touch eventsJ-P Nurmi2017-01-241-5/+6
| | | | | Change-Id: I7ea3db90fbafea68c094d1525ee28972823960ac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Re-format constructorsJ-P Nurmi2017-01-191-2/+2
| | | | | | | | | | | It was a bit inconsistent before. Admittedly the colon at the end was the most commonly used style in the quicktemplates2 code base, but some had a line-break before the colon. This is now chosen as the one true coding style of QQC2. ;) It makes the initializer list aligned so that it stands out from the constructor body. Change-Id: I66835e088df90d7219af04915176006d2a934ddc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Format initializer listsJ-P Nurmi2017-01-191-13/+13
| | | | | | | | Initialize one member per line. Allow empty constructors with one initialized member on a single line. Change-Id: Ie115802561ebd19efd4dacda1fa868b64d279109 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>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-051-1/+1
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/quickcontrols2/quickcontrols2.pro Change-Id: If2f5e40487ba6515ba322f92380573727bdd6bc0
| * QQuickDial: account for when the wheel event is invertedJ-P Nurmi2017-01-051-1/+1
| | | | | | | | | | | | | | | | On macOS, the vertical scrolling with the wheel may be inverted, so we need to account for this when getting the y angle. Change-Id: Ia0f59beba905beff7b0cf12271a654c721bd5179 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | QQuickDial: handle touch eventsJ-P Nurmi2017-01-031-0/+62
| | | | | | | | | | | | | | | | | | | | In comparison to handling synthesized mouse events, handling touch events has the advantage that it gives multi-touch support. That is, it is possible to move multiple dials at the same time, each handling its own touch point. Change-Id: Icabd971147f291fa4df00c6215c847d7976fda5f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Revise QQuickDial internalsJ-P Nurmi2017-01-031-36/+64
| | | | | | | | | | | | | | | | Move the press/move/release/ungrab logic from mouse event handlers to QQuickDialPrivate methods that can be re-used for touch events. Change-Id: I6e4594a3b532d6049117a37b0880e16cc22cb6cf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickDial: operate on floating point coordinatesJ-P Nurmi2017-01-031-14/+14
| | | | | | | | | | | | | | | | | | Store the press point as QPointF, and pass also QPointF to QQuickDialPrivate::positionAt(). This makes it easier to add touch event handling later. Change-Id: I256cc5039a7f52a0a04dffa800763898f321b100 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: tweak wording for the moved() signalsJ-P Nurmi2016-12-021-1/+1
| | | | | | | | | | Change-Id: I932ed06617cf237c20a1473f4f4270898ad83337 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-12-011-0/+14
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/SpinBox.qml src/imports/controls/material/SpinBox.qml src/imports/controls/universal/SpinBox.qml tests/auto/controls/data/tst_swipedelegate.qml Change-Id: Ie1d1f487890f0a9f80a00df5e813e1d2e8303fe5
| * Dial: add missing wheel handlingJ-P Nurmi2016-11-291-0/+14
| | | | | | | | | | | | | | | | [ChangeLog][Controls][Dial] Added support for wheel handling when wheelEnabled is set to true. Change-Id: If0bc2f0ea9d7cde7726739cdfdbd795c908981f0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add Dial::moved() signalJ-P Nurmi2016-11-291-0/+17
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Dial] Added a moved() signal that is emitted whenever the dial is interactively moved by the user by using either touch, mouse, or keys. Task-number: QTBUG-57203 Change-Id: I4b4224309f11bdcafd5c7b88414d80ebe2616238 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-11-171-2/+2
|\| | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp src/quicktemplates2/qquickslider.cpp Change-Id: Ie12132690680706def6f516334a6ef0ba27336b3
| * Doc: rephase the "logical position" propertiesJ-P Nurmi2016-11-161-2/+2
| | | | | | | | | | | | | | | | | | The previous phrasing was poor and somewhat confusing. The logical position is expressed as a fraction of the value, in the range 0-1. Change-Id: I6c2a4cbb1385af69392d214dd02224ec876131e5 Task-number: QTBUG-57069 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-11-031-1/+3
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/BusyIndicator.qml src/imports/controls/ProgressBar.qml src/quicktemplates2/qquickpopup.cpp src/quicktemplates2/qquickpopup_p_p.h src/quicktemplates2/qquickstackview.cpp Change-Id: I9a1028a991de9fc3e26d3f973106301e9ada631c
| * Doc: revise brief descriptionsJ-P Nurmi2016-11-021-1/+1
| | | | | | | | | | | | Change-Id: If7bdd4c11aaeb2df87622c769b1a65ac82ac7e73 Task-number: QTBUG-55904 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Doc: show the non-wrapping Dial GIF in the detailed descriptionJ-P Nurmi2016-11-021-0/+2
| | | | | | | | | | | | | | | | | | There was no screenshot in the detailed description. This helps to see right away what kind of control it is. Change-Id: I0ecc585a5e6f650112e88bb3b37a2f5140d41261 Task-number: QTBUG-55904 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickDial::liveJ-P Nurmi2016-10-061-6/+40
|/ | | | | | | | | [ChangeLog][Controls][Dial] Added a live-property that determines whether the dial provides live updates for the value-property while the handle is dragged. Change-Id: I8da1190df1e9093f81271a8e11f2cea55759573f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Dial: clarify the documentation for some propertiesMitch Curtis2016-09-191-2/+15
| | | | | | | | | | - Document the range of the angle property - Fix handle's property type - Explain stepSize more thoroughly Change-Id: I72ce8b493b3faf49d7f155ac802109bd9bdb4089 Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Delete replaced delegates after Component.completed() is emittedMitch Curtis2016-09-121-0/+1
| | | | | | | | | This avoids the issue "Object destroyed during incubation" error. A proper fix is still required in the QML engine. Change-Id: I3c168cfe2d8c295662bcb5886e99a0f95748e302 Task-number: QTBUG-50992 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Dial: fix stepSize handlingMitch Curtis2016-08-101-2/+8
| | | | | | | | | | | As was done in for Slider in c4c803ce4: The correct formula for calculating the "range" or "span" is to-from, not from+(to-from), which is used in the formula for calculating value. Task-number: QTBUG-55228 Change-Id: Ic5463ef5ac5566efc5996aadd9ae39ec108d778f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Doc: add missing \since 5.7 tagsJ-P Nurmi2016-05-251-0/+1
| | | | | Change-Id: Ie4680c5dfadc95278215b688f4fc28577f557933 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: cleanup remaining "labs" referencesJ-P Nurmi2016-04-211-2/+0
| | | | | Change-Id: I5b0015476c3ceef8f82b00d99b084b1ce3bfaa6f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Doc: rename Qt.labs.controls 1.0 to QtQuick.Controls 2.0J-P Nurmi2016-04-211-13/+13
| | | | | | Change-Id: Id6c476424fa359d222f027584278346fc0984069 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Dial: make wrap default to falseMitch Curtis2016-04-211-2/+2
| | | | | | | | This is a safer default considering that potential applications of the dial include controlling audio volume. Change-Id: I343a6b758a795190e4b0ad9bdfc5766cbb6cb3bc Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add GIFs for DialMitch Curtis2016-04-211-3/+11
| | | | | Change-Id: I9b3670e9976a4b743f49a0eae3939e99944ea277 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Dial: add wrap propertyMitch Curtis2016-04-191-3/+45
| | | | | | | | | | | | | | | | | This works by preventing changes in position that are considered too large. A change is considered too large when the difference between the old and new positions is greater than or equal to 0.5 *and* the position of the mouse is below the center of the dial. This effectively makes it impossible to drag the dial from left to right when the mouse is below its center, but still allows doing so above its center. This is useful for applications such as volume dials, where a large change can be dangerous. Change-Id: I1d7800e5ba16dbe0642974b8e53d8fcd921a01d7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Move angle calculation to static global variable.Mitch Curtis2016-04-191-1/+3
| | | | | | | | | This also: - gives names to what were pretty odd looking expressions - rewrites those expressions to be easier to understand Change-Id: Ia06d5702590d10cc53b9ae939a6877b6c403e091 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* 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/+566
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>