Commit Graph

15 Commits

Author SHA1 Message Date
Bumjoon Park a7248458f7 Imageelements example: Update by coding conventions from official doc
- Fix qmllint warning.
- string are translated.
- JS statements no longer end with semi-colon.

Pick-to: 6.5
Change-Id: I39236ffa20fd1131609f170c64ecb4e68273539a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-04 06:09:43 +00:00
Lucie Gérard 0dc4fd240a Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-06-11 08:05:15 +02:00
Oliver Eftevaag 34bc389543 Fix ImageElements example to use a QML module
Removed the 'content' directory, and placed all images into a 'pics'
directory.

CMakeLists.txt is now also using qt_add_qml_module()

Pick-to: 6.2
Change-Id: I673b7adea1832f304003f95e171118b0822b3c83
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-09-03 17:10:32 +02:00
Oliver Eftevaag 9454685db8 Add qsTr() around 2 strings in imageelements example
Making some strings translatable

Change-Id: I7a088e9e9966996ee20ab8bee29cf17c060120d7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-08-30 22:56:29 +02:00
Oliver Eftevaag e771c12ae7 ImageElements example: Use QQC2 and update copyright
Updating the example to use qt quick controls 2 where it makes sense, as
well as copyright headers.

Task-number: QTBUG-95737
Pick-to: 6.2
Change-Id: Ie22ab8551926916abd0a478adc16d1d4daeb13ad
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2021-08-27 17:09:49 +02:00
Laszlo Agocs af521a8df6 Resume AnimatedSprite playback when visibility changes
Amends f5e2783 that was made in 5.6 to avoid updating the AnimatedSprite
when not visible. The problem is, if the sprite was running, the
expectation is that becoming visible again resumes the playback.

It can be argued what the correct behavior is: do we expect the playback
to resume from the point when the sprite went invisible, or should it
take the time spent as invisible into account? This patch only corrects
the immediate problem and provides the former, i.e. playback will resume
from the point it had when becoming invisible.

The AnimatedSprite scene in the imageelements example is improved to be
able to test this. It can also exercise all the start/pause/resume/advance
functions now.

Fixes: QTBUG-63942
Pick-to: 5.15
Change-Id: Ieb6d046168a2132659848a36ee0b694c580159b1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-04-24 10:24:58 +02:00
Ulf Hermann 90b4528b84 Avoid discouraged patterns in examples
In particular, use required properties where applicable, explicitly
import QtQml where we use it, avoid unqualified access into the root
scope of a component, use JavaScript functions with explicit parameters
as signal handlers.

Change-Id: I3eaaba47cc3c7a2a12d488e36f9eec145cedbb0e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-11 19:26:05 +01:00
Mitch Curtis e41d067227 AnimatedSprite: set implicit size based on implicit frame size
By doing so, users no longer need to set an implicit or explicit size
for AnimatedSprite.

[ChangeLog][QtQuick][AnimatedSprite] AnimatedSprite's implicitWidth and
implicitHeight are now based on frameWidth and frameHeight,
respectively. This means it is no longer necessary to explicitly size
AnimatedSprite.

Task-number: QTBUG-36341
Change-Id: I3eb87e9b1c6bb93b3c667123c345341f34e2eee8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-26 22:59:42 +00:00
Kai Koehne ea6cd0de3c Fix outdated BSD license header
Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-10-17 11:18:11 +00:00
Jani Heikkinen 20c207815a Fixed license headers
Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
2015-02-17 13:33:18 +00:00
Jani Heikkinen c5796292ad Update copyright headers
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>
2015-02-12 10:28:11 +00:00
Sergio Ahumada 83deab8d1b Update copyright year in Digia's license headers
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-10 19:52:37 +01:00
Iikka Eklund 46010aa7a2 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-23 08:22:24 +02:00
Yann Bodson 63b7decc0f Improve examples documentation
Add more details and snippets to the examples for text and
imageelements.

Change-Id: If0b20a0dca1778a8a4cc0ebf1e43017bdce839ec
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-04-20 04:09:37 +02:00
Matthew Vogt 0284817d6c Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
2012-03-05 11:39:54 +10:00