Commit Graph

16 Commits

Author SHA1 Message Date
Axel Spoerl ba61af0bf3 Migrate documentviewer example into plugin based architecture
This patch changes the document viewer example to a plugin based
architecture.
It adapts the documentation accordingly.

Change-Id: Ia24028aa27e21fb8ab36f5ef3a9953be60858b19
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-02 10:11:06 +02:00
Shawn Rutledge 80404e00bb photosurface: Add a "welcome" slide show at startup
The PDF is transparent, so the background shows through.

Pick-to: 6.5
Task-number: QTBUG-108924
Change-Id: I2fb78ad1b9453109a2d2eb19f2aad91f31679a0d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-03-23 15:27:49 +01:00
Shawn Rutledge b766d2f157 photosurface demo: Add a procedural texture background
Adapted from https://www.shadertoy.com/view/WdscWN via the Qt Quick
Effects Maker and further tweaking by hand.

Because we do not have a defined pattern to compile shaders from sources
with qmake, building this demo with qmake is no longer supported.

Pick-to: 6.5
Task-number: QTBUG-108924
Change-Id: I0b19b6aa9865f2e8c259fb1d12dffd9a28eae72e
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-03-23 15:27:45 +01:00
Oliver Eftevaag 8b3600e016 Minor tweeks to the photosurface demo
The commit 0391a2fb98
makes a lot of improvements to the demo, but it also makes it
no longer search your system's photos directory by default.

This commit also updates the project files.
The CMakeLists.txt file will use qt_add_qml_module() among other
things that our guildelines recommend.
The .qrc file will have the /qt/qml/photosurface prefix, in order to
make qmake compatible with the AUTO_RESOURCE_PREFIX module.

Task-number: QTBUG-108924
Pick-to: 6.5
Change-Id: I19291ead744f8eebcd4151f02b44f746b2040319
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-02-28 14:09:14 +00:00
Shawn Rutledge 489e346f37 Modernize the photosurface demo; update its walkthrough docs
- use Pointer Handlers idiomatically, rather than PinchArea and MouseArea
- give PinchHandler precedence over DragHandler
- use Controls ToolTip (much easier than the ad-hoc one from before)
- use ScrollView rather than ad-hoc scroll decorators
- improve usage of FolderListModel: required props, and stop
  concatenating folder + name
- set an informative window title
- bring the picture(s) being interacted with to the top
- use MomemtumAnimation from qtdeclarative/examples/quick/pointerhandlers
- when the animation ends, grow the canvas rightwards and downwards
  so that no images are lost by being "flung" in those directions
- make main.cpp optional again: handle arguments in QML
- use QtQuick.Dialogs and remove widgets dependency
- stop using context properties
- translate all strings
- fix qmllint warnings
- update the walkthrough docs to explain what we're doing

Pick-to: 6.5
Task-number: QTBUG-108924
Change-Id: I5b10e314373d31e1b57b1031d481fa2b9b7afe7b
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-02-24 17:36:06 +01:00
Lucie Gérard d490baa159 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: Iec124e0bceb4335370674a222970cd9c1b90763f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 10:01:38 +02:00
Lucie Gérard 37540e46fb Add license headers to cmake files
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.

Existing copyright statements remain intact

Task-number: QTBUG-88621
Change-Id: I9499ba4c20f610ffe8af0fc3e29e6581247f2c40
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-07 14:45:33 +02:00
Kai Köhne 0e7a4b0593 Examples: Remove unneeded CMake options
CMAKE_INCLUDE_CURRENT_DIR is not necessary anymore for moc since
CMake 3.8: https://cmake.org/cmake/help/latest/release/3.8.html#other-changes

Enable CMAKE_AUTOUIC only if .ui files are present.

Pick-to: 6.3
Change-Id: Ic34418e3306de0ee1769bc3153bb833f7951da19
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-25 10:17:05 +01:00
Kai Köhne 3dae1461ac Examples: Improve CMakeLists.txt files
Pick-to: 6.2 6.3
Change-Id: I7582f6c1b9daacaf694355269663b1d6616e0c05
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-20 18:05:52 +01:00
Joerg Bornemann 02524fb04f Remove CMAKE_AUTORCC from demos
All demos are using qt6_add_resources.

Pick-to: 6.2 6.3
Task-number: QTBUG-87643
Change-Id: I14c7d876b2ac3b1a24cec78fbd4463a46c71e564
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-20 12:59:29 +01:00
Alexandru Croitor c401aaa21e CMake: Bump almost all cmake_minimum_required calls to 3.16
Needed for subsequent change that will check and error out if the
version is lower than 3.16. We do that to ensure all policies
introduced by CMake up to version 3.16 have their behavior set to
NEW.

Pick-to: 6.2
Task-number: QTBUG-95018
Change-Id: I23a59d7bfa89ffdacf8002b03657b7da38669ee2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-09-22 19:51:30 +02:00
Assam Boudjelthia e1407d42de Remove dependencies from QtAndroidExtras
Change-Id: Ic5d0f3c60db8c7078aa5f57075c8b9a627594925
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-06-04 13:07:09 +00:00
Assam Boudjelthia 563dfa0812 Use qt_add_executable for photosurface example
This fails to build an apk on Android, it must use qt_add_executable
which handles some extra stuff internally.

Fixes: QTBUG-90747
Pick-to: 6.0
Change-Id: I600ae4f9fb5a4ad6bbb8d5c3a06d95314ec0552e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-29 14:30:42 +00:00
Alexandru Croitor a48182cb96 CMake: Regenerate projects before API change
Task-number: QTBUG-86815
Change-Id: Id8da24b8a26f0263324a8fed5fd9cedbfa3ee11a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-10-01 14:36:23 +02:00
Venugopal Shivashankar d48537ed2a Example: Add the app icon setup
The example's qmake setup includes the app icon config,
which is dropped in the CMake setup for some reason.

In addition, updated the app icon setup instructions
to use this example as a reference instead of the
snippet file.

Change-Id: I12bb8b007904164226dc78f2a2e162b08c9003e1
Fixes: QTBUG-83696
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-06-15 15:14:44 +02:00
Venugopal Shivashankar de6cc8c379 CMake: Port the build setup to CMake
Fixes: QTBUG-83910
Change-Id: If0ebd9d0b528cd84ffe92955b7d1c4d580d397fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-04 23:00:45 +02:00