Commit Graph

23 Commits

Author SHA1 Message Date
Martin Jones f67ba78760 Stop flicking on a full pixel.
When the user flicks/moves the view, stop on a full pixel.  This
ensures optimal presentation when static without affecting the
smoothness of animation.

Change-Id: I2d8ae084151f56d8e569fde35fb498866ad60f9c
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-05-09 00:56:16 +02:00
Frederik Gladhorn 63240b5533 Fix typos.
Change-Id: I770f74c1aa323e9ec924da13d1ccd7747ac0def3
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-27 11:40:19 +02:00
Adriano Rezende adb0848513 Add contains method to QQuickItem public API
This method can be overwritten in order to provide fine grained control
over the mouse events handled by the item.

Change-Id: I23cb61958d3ac0b2f5091c47fa9e0ed07dc5e5d0
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-04-19 06:16:28 +02:00
Andras Becsi 62e88faeb4 Flickable should only call ungrabMouse() if it is the mouse grabber
Check whether the Flickable is the mouse grabber before ungrabbing
in mouseReleaseEvent() to suppress warnings in case event delivery
does not rely on mouse grabbing.

Change-Id: I3c3398ebbb9d8ab2cb6181677752b73e265cf02f
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-04-04 12:14:50 +02:00
Laszlo Agocs 1312f4d1fe Allow flick on press-move-release in Flickable.
Right now it needs at least a press-move-move-release to start a flick
which is not ideal for touchscreens because a quick, short flick may
result in reporting only a single move.

Change-Id: I9bf2b4fea23b0eea9d9d00f0e79ce34f4d964bea
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-03-21 08:04:33 +01:00
Martin Jones 5d901a7435 Restore view to sensible position if grab is cancelled.
If the mouse grab is stolen, return to allowed bounds.

Change-Id: Icc44da32ff62bed273f0ccbb5498766981cdf9a4
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-03-20 04:24:32 +01:00
Martin Jones d7f2a77f2b Set more sensible Flickable default input filtering parameters
Shouldn't throw anything away by default.  Also fix bug that
flicking back into bounds from outside bounds halved velocity.

Change-Id: I3c2d303a9e46910439dc8bfb01771376f634a684
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-03-15 04:22:43 +01:00
Casper van Donderen c291efff26 Remove the usage of deprecated qdoc macros.
QDoc now has support for Doxygen style commands for italics, bold
and list items. This change applies that change in QDoc to the
actual documentation.

Task-number: QTBUG-24578
Change-Id: I62d203f21df63a95ee236e578b10418fd9680707
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-03-13 16:34:49 +01:00
Martin Jones fb1ce5ed0d Improve interaction of nested Flickables and PathView
Don't require a flick to come to a complete stop before
allowing another flickable element to begin its
gesture.

Change-Id: I74c1998e01e04c70c76253cd09edc02f593123d0
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-03-13 02:02:49 +01:00
Gatis Paeglis 1914a723a7 Fix for QTBUG-22777. Removed unnecessary check.
Change-Id: I82de9e1d6eb4b8bdb8c90c69e686b700a02f40aa
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-03-12 23:32:37 +01:00
Matthew Vogt 0284817d6c Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
2012-03-05 11:39:54 +10:00
Laszlo Agocs 82a252afdd Use velocity from touch events only when they are valid
Add the capability flags to the extended mouse events. Otherwise it is
not possible to tell if the velocity is valid.

While the original version is fine if velocity is guaranteed to be
available whenever QT_TRANSLATE_TOUCH_TO_MOUSE is set, some platform
and driver combinations, e.g.  the evdevtouch plugin that comes with
Qt, do not provide velocity data in touch events. The touch-only mode
of QML may be very useful in these cases too, we just need to fall
back to the built-in velocity calculation.

Change-Id: Iec5e7632a66380dc04c9435b09f5c173107bbe00
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-03-02 08:26:52 +01:00
Matthew Vogt b855240b78 Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.

Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.

Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-24 04:51:31 +01:00
Martin Jones eb447afb37 Use use touch events to generate mouse events in Quick canvas.
Allowing the canvas to deal with mouse event emulation provides
a couple of advantages: 1. touches outside a reactive area can
be ignored, allowing a touch within a reactive area to become
the "mouse touch". 2. we can extend the mouse events with
data available in touch events for use within the quick elements;
specifically velocity in this case.

Change-Id: Id9df397f1a3a03dbda2ef5dcf6189e7eb3377356
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-02-10 02:55:35 +01:00
Martin Jones 60a6f89690 Ensure Flickable moving and flicking properties are correct.
Flicking, then touching to stop the flick should set flicking
property to false.  Moving or flicking vertically should not
set flickingHorizontally, and vise-versa.

Change-Id: Iee42a92ffff2707f0691ffa285dec514b47c9986
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-02-07 03:54:04 +01:00
Martin Jones c1e668a967 Multiple fast flicks with large content moves faster
Repeatedly flicking quickly in a large view moves faster than the velocity
of the touch.

Task-number: QTBUG-18600
Change-Id: Ie6747e0d945022e0c0c5f6c5f95bc35403a14d56
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-02 03:55:21 +01:00
Andras Becsi f1e823e290 Flickable should be controllable programatically
Add flick(xVelocity, yVelocity) and cancelFlick() functions.
The functionality provided by these functions is already covered
by current unit tests.

Task-number: https://bugreports.qt.nokia.com/browse/QTBUG-23865
Change-Id: Ie284232bfbd98ae7c70ca060760fb016b4a45ee1
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-01 07:02:25 +01:00
Jason McDonald 45b14259fc Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 23:52:43 +01:00
Jason McDonald e6b224aa28 Update obsolete contact address.
Replace Nokia contact email address with Qt Project website.

Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-01-23 06:28:53 +01:00
Martin Jones 3582101128 Flickable now emits contentX/YChanged after the content is updated
Currently view content is not created until after onContentYChanged
handlers are called, which is not what the user would expect
This change moves the contentX/YChanged emission to
after the content update and also removes the need for a
connect() in Flickable init.

Task-number: QTBUG-23462
Change-Id: I11e87a78160033e3ec6a9e7de733474f8345050d
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-01-06 08:27:24 +01:00
Jason McDonald da0839735c Update copyright year in license headers.
Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 09:12:53 +01:00
Andras Becsi a231d3c67a Use input event timestamps in QQuickFlickable if available.
Change-Id: If89ad205dec9ffdba4ca196cdc1a2e5fd9258260
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-12-20 13:36:16 +01:00
Kent Hansen 6c8378eaf1 Say hello to QtQuick module
This change moves the QtQuick 2 types and C++ API (including
SceneGraph) to a new module (AKA library), QtQuick.

99% of this change is moving files from src/declarative to
src/quick, and from tests/auto/declarative to
tests/auto/qtquick2.

The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to
a plugin, src/imports/qtquick2, just like it's done for QtQuick 1.

All tools, examples, and tests that use QtQuick C++ API have gotten
"QT += quick" or "QT += quick-private" added to their .pro file.

A few additional internal QtDeclarative classes had to be exported
(via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the
QtQuick 2 implementation.

The old header locations (e.g. QtDeclarative/qquickitem.h) will
still be supported for some time, but will produce compile-time
warnings. (To avoid the QtQuick implementation using the
compatibility headers (since QtDeclarative's includepath comes
first), a few include statements were modified, e.g. from
"#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".)

There's a change in qtbase that automatically adds QtQuick to the
module list if QtDeclarative is used. Together with the compatibility
headers, this should help reduce the migration pain for existing
projects.

In theory, simply getting an existing QtDeclarative-based project
to compile and link shouldn't require any changes for now -- but
porting to the new scheme is of course recommended, and will
eventually become mandatory.

Task-number: QTBUG-22889
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-12-02 14:18:20 +01:00