aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickanimatedsprite_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-02-271-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4internalclass.cpp src/qml/parser/qqmljslexer.cpp src/qml/qml/v8/qv8engine.cpp src/qml/util/qqmladaptormodel_p.h src/quick/items/qquickanimatedsprite.cpp tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp Change-Id: I16702b7a0da29c2a332afee47728d6a6ebf4fb3f
| * use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add finished() signal to AnimatedSpriteMitch Curtis2018-02-261-0/+2
|/ | | | | | | | | | | | | | | | | | | | | It's nicer to respond to a sprite finishing its animation like this: onFinished: doStuff() than this: onRunningChanged: if (!running) doStuff() In addition, the latter will get executed even if the animation is manually stopped, whereas finished() is only emitted when the animation finishes naturally. [ChangeLog][QtQuick][AnimatedSprite] Added finished() signal to AnimatedSprite as a convenient way to react to an animation finishing. Change-Id: I558e8372b54bacacd5695cb0edf97d8b84b373f9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-2/+2
| | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8Liang Qi2016-10-101-0/+1
|\
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-101-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/quickwidgets/quickwidget/main.cpp src/qml/jsruntime/qv4jsonobject.cpp src/qml/jsruntime/qv4qobjectwrapper.cpp src/qml/jsruntime/qv4qobjectwrapper_p.h src/qml/qml/qqmlengine.cpp src/qml/qml/qqmlpropertycache.cpp src/qml/qml/qqmlpropertycache_p.h src/quick/items/qquickanimatedsprite.cpp src/quick/items/qquickitem.cpp src/quick/items/qquickitem.h src/quick/items/qquickitem_p.h src/quick/items/qquickview_p.h src/quick/scenegraph/qsgcontext.cpp src/quick/scenegraph/qsgdefaultrendercontext.cpp Change-Id: I172c6fbff97208f21ed4c8b6db3d1747a889f22b
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-301-0/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
| | | * Quick: Do not send SG updates when AnimatedSprite is not visibleErik Verbruggen2016-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-55935 Change-Id: I475c1bb3e7aae9499b1b07a52f3c10f54c8b3481 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | Make Sprite a configurable featureLars Knoll2016-10-101-0/+4
|/ / / | | | | | | | | | | | | | | | Change-Id: Iab5c5261cb3cdce3d02fa6cd19ae6f594b6fc649 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* / / Add QSGSpriteNode to the Scenegraph Adaptation LayerAndy Nichols2016-07-141-246/+40
|/ / | | | | | | | | | | | | | | | | | | | | | | Most core Qt Quick items use one of the nodes provided by the Scenegraph Adaptation Layer, however the two items that provide support for Sprites created their own custom nodes. There was significant redundancy in this, and it made it only possible to use the OpenGL adaptation. The AnimatedSprite and SpriteSequence items have been cleaned up, and now use the new QSGSpriteNode. Change-Id: Idc20b9c5da9dc1c94f6368021785382cdf7cec5a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-5/+5
|\| | | | | | | Change-Id: Icfa1d61fcc286c3418d4a625de11d2191336fa60
| * AnimatedSprite: don't access deleted scene graph nodesJ-P Nurmi2016-03-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | It’s a bad idea to store a scene graph paint node as a member variable. First of all, it should not access the node outside updatePaintNode(), that is, outside the render thread. Secondly, the node is owned by the scene graph and may be nuked whenever the scene graph feels so. Some creative re-parenting easily triggers a case where AnimatedSprite ends up accessing a node that was already deleted by the scene graph. Change-Id: I89205ac36333a2fcb094121afa61b6409fda5883 Task-number: QTBUG-51162 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-291-2/+2
|\| | | | | | | Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
| * Animated sprite would stop after running for 24 hours.Jan Arve Saether2016-01-271-2/+2
| | | | | | | | | | | | | | Fix is to use QElapsedTimer instead of QTime. Change-Id: I03d0a2428c7f0d82c4c54ab844023b09baf15175 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-261-0/+1
|\ | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qml.pro tools/qmlprofiler/qmlprofilerclient.cpp Change-Id: Id47f15a5ab38f8ec79f0a26c92805acba62caac4
| * AnimatedSprite: avoid unnecessary redrawsTim Blechmann2015-10-141-0/+1
| | | | | | | | | | | | | | | | | | AnimatedSprite currently triggers a redraw for every update. however this should only be done, when the next frame will actually be different to the current one. Change-Id: I550bd32c02807e4c3f4847fb2608f5ad0cf0a59a Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | | | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Port from Q_ENUMS to new macro Q_ENUM.Friedemann Kleint2015-06-191-1/+1
|/ | | | | | | | | | | Remove Q_ENUMS in favor of the new Q_ENUM macro which provides registration as meta enum and a debug stream operator. QQuickXmlListModel::Status is left unmodified as porting it creates a link error in tst_qquickxmllistmodel. Change-Id: Id5e6192c9f85e7c94332508fbd91873ddda31e1a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-19/+11
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Add Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-2/+2
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-121-16/+16
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-4/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Don't start running if a frame property is setAlan Alpert2012-06-201-3/+6
| | | | | | | | | | | | This fixes an error where running couldn't be reliably set, if a frame property was also being set during initialization. With this fixed, the autotest is no longer unstable. Also fixed is a related issue where start/stop/restart were active before componentComplete. Change-Id: I34c6d872f2f146d38c65167eda8c0a97525d7f4e Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Emit currentFrameChanged signal when neededAlan Alpert2012-06-121-0/+1
| | | | | | | Task-number: QTBUG-25039 Change-Id: I8bd5fd40a5fee1314f0401ed4708d73ed1cfad94 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Calculate vertex positions on CPUAlan Alpert2012-05-141-0/+2
| | | | | | | | Easier for SG to optimize with, not really gaining anything putting it on the GPU for these Elements. Change-Id: I239e70dafce441f5281ded185de63bc1afd7d85a Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Reload image on source changedAlan Alpert2012-05-141-0/+1
| | | | | | | Task-number: QTBUG-25041 Change-Id: Icc02aead76d8b764c9955ac5914e9e026c00461e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* End the deprecation period of SpriteImageAlan Alpert2012-05-141-1/+1
| | | | | | | Also remove the stale files left around. Change-Id: I2f275f23ebfb65045cc683ccd542cbc451b767fb Reviewed-by: Martin Jones <martin.jones@nokia.com>
* AnimatedSprite framespeed properties now restart animation.Alan Alpert2012-05-111-0/+3
| | | | | | | | | | For a simple element, we're taking the simple solution for the interaction of changing these parameters during an animation. Task-number: QTBUG-25045 Task-number: QTBUG-25043 Change-Id: I1fb37fc029f23ce92558cb2e5deed80a69784173 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-1/+1
| | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
* Add AnimatedSpriteAlan Alpert2012-02-281-0/+373
A simpler sprite image element for the simple usecase. Because sometimes an engine with stochastic capabilities is overkill. Change-Id: I2b76c5d417719e92a548f6266bffd563dc016983 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>