Commit Graph

14 Commits

Author SHA1 Message Date
Oliver Eftevaag 12e4871465 Canvas example: Improve usage of best practices
This commit updates the example in order to adopt as many best
practices and follow our coding conventions from our official
documentation.

- qmllint will report no erros with this patch (As long as the shared
  module is imported).
- strings are translated.
- JS statements no longer end with semi-colon.
- Removed unused properties and marked those that are only read as
readonly

Pick-to: 6.5 6.5.0
Change-Id: Ibe0d0750d48018b618a5cf8c3bcecb7e29488274
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-02 17:54:31 +01: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 1d3cdac6e4 Update canvas example to use QtQuickControls2
The QtQuick examples should ideally have a more native look and feel.
Making them use controls from QtQuickControl will cause them to adapt to
the desktop style.

This patch replaces the previous Sliders from the 'shared' directory,
with Sliders from QtQuickControls2

Task-number: QTBUG-90880
Change-Id: I90521abf7059950521bc3d1a54994d2cca07259d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2021-03-10 17:53:22 +01: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
Jens Bache-Wiig f289fdc53e Various improvements to Canvas examples
I noticed these examples were rather "aestetically
challenged" and decided to make it a test case for our
WIP style guidelines.

- Use consistent margins (12 px)
- Use proposed color palettes
- Use proposed fonts and header styles

I created a new Slider graphic and moved this into
the shared folder as I think it is useful for other examples.

I removed a lot of unused files which seem to have been added
but never actually used.

I also found several bugs in our implementation, including
not scaling or rotation around the correct origin.

In many cases I simplified the examples, removing
variables/sliders where they did not add significantly
to the example itself.

Change-Id: Ie09da33deaf56a3ec45a2031b87a24a8602e994a
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-26 15:13:35 +01: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
Michael Brasser 3912bbacea Update usage of smooth and antialiasing.
Change-Id: Icc8b28bdd466389ed3f269f076f1bdb6e9abe3f2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-08-28 01:51:19 +02:00
Charles Yin 4236e7f7ee Refactor context2d thread logic
1. Use QQuickContext2DRenderThread for Threaded rendering
2. Make FBO target works with all render strategies
3. Remove some unnessary locks, call texture methods by invoking meta calls
4. Run existing tests with all render targets and strategies (except Cooperative)

Change-Id: I0db5c91d848b86bcc1536c30d7a5804b66a817f1
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-07-31 07:44:12 +02:00
Alan Alpert 0ac61552a4 Expound on canvas example documentation
Change-Id: I5bf82697dcbadaa9dc58e11ee22b2ab8c1a28852
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-04-26 04:53:08 +02:00
Charles Yin 6b8c356401 Refactor canvas examples by following the new example guidelines.
Change-Id: I1cc749ad11b8439239ba739f40e99b78af7351ab
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-03-14 01:31:08 +01:00
Matthew Vogt 0284817d6c Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
2012-03-05 11:39:54 +10:00