Commit Graph

16 Commits

Author SHA1 Message Date
Jonas Karlsson 7b243c46f3 Dice example: fix deprecated warning
"Injection of parameters into signal handlers is deprecated"

Change-Id: I12f6257b4cf2f5b79d9ba7153ad256292eebc0fd
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-01-26 19:57:58 +01:00
Kai Köhne 9a61a3a987 Demos: Add dependency info to example metadata
Add metadata about build time / runtime dependencies in the form
of Qt documentation modules. This should allow Qt Creator to hide
examples where needed Qt modules are not installed (because they
are optional in the Qt Online Installer).

Pick-to: 6.7
Task-number: QTBUG-120759
Change-Id: I03d8d75b273fe497803b9af9783b90e397b0638d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-19 10:26:22 +01:00
Bartlomiej Moskal ffc1984fd3 QDice Example: Add a timer-guard for rolling dices
There is a problem in QQ3DPhysics. onBodyContact may still refer to
already deleted object - which causes the application to crash.
It happens when Accelerometer spam a lot with scene.spawnDice(...)
calls.

To avoid this crash, the timer-guard for rolling dices was added.

Pick-to: 6.7 6.6
Fixes: QTBUG-120364
Change-Id: I3ca3811662fb2400d61cb256c8b34885a6fe028a
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2024-01-16 09:06:00 +01:00
Tuukka Turunen 84a7477e2a Add possibility to adjust dice size with a slider
New slider UI controls added to adjust dice size.

Pick-to: 6.7 6.6
Change-Id: Ie01efacff8eae0a33644f943bfd50d2cd258a7b1
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-01-12 11:04:10 +01:00
Nicholas Bennett 39074ca944 Fix menu icon on Android, fix initial msg not wrapping on small screens
The menu button icon did not appear on Android with the text method, so
added an icon svg to use on all platforms.

The initial label pop up was not wrapping on small screens so added a
height, modified properties to keep the original text size but wrap the
text.

Fixes: QAA-2183
Pick-to: 6.6 6.7
Change-Id: I2265e7558dfec839530b5f9b6a7a4129d7b081b2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-22 12:22:52 +02:00
Rami Potinkara 33d02572d8 Docs: add QML Media Player and Dice to Mobile category
Task-number: QTBUG-117458
Pick-to: 6.7
Change-Id: Iccc2c7bc47118c21fce72f23ef489bb4476a8644
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-12-19 20:03:00 +02:00
Nicholas Bennett 4d21bd9e57 Add app icon for ios target to Dice example application
Updated the CMakeLists file, added the icon and json file.

Task-number: QTBUG-117125
Pick-to: 6.6
Change-Id: I2691c2e84e7ebc0b25bb34eece9a08f5e922eb58
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-12-08 09:55:43 +02:00
Nicholas Bennett 81d73cdbb5 Add Android icon and target SDK for dice example app
Added target SDK 33 with CMake and added icon for Android target,
using Qt creator to generate icons and the AndroidManifest xml
file. Gradle files were excluded.

Task-number: QTBUG-118513
Pick-to: 6.6
Change-Id: I57953099350017975702309496e4e4f1a87e9d1f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-12-04 09:02:05 +00:00
Nicholas Bennett bc2e698936 Docs: Update dice example app documentation
A had initially intended to expand this documentation more exhaustively,
however, I decided that example documentation that describes each discrete feature already exists.
Added sections, expanded a bit, referenced existing applicable example
documents, and the fact that this example will be available already
built for Android in the Google Play Store.

Fixes: QTBUG-114599
Pick-to: 6.6
Change-Id: Id989d82a40fb95808a42aa1b497b4d76161b5d74
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-02 04:11:45 +00:00
Nicholas Bennett 62b33327c0 Dice Demo: Add sound effects and shake to roll
Added the features in line with the spike outcome.
In addition, I modified the spawnDice function to
estimate if all dice are at rest before enabling spawning.
This prevents duplicate shake events and double tap
fumbles.

Task-number: QTBUG-116491
Pick-to: 6.6
Change-Id: Ia0dc59e469e008da5fc3afe2a7342381eadc1008
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-02 03:40:04 +00:00
Kai Köhne 0bc36e534e Dice: Extract calculation of 45degrees
Don't calculate this inside the for loop.

Pick-to: 6.5 6.6
Change-Id: I09d46e363325071086332d901235f0feeabbb474
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2023-08-14 18:25:28 +02:00
Kai Köhne 0f05ed1e01 Examples: Explicitly mention Quick3D requirement in the documentation
Quick3D is an optional component in the online installer. As the examples are part of qtdoc,
they are however installed & available also if Quick3D is missing.

Let's at least mention the dependency in the respective examples' documentation.
Add a general 'Running the Example' section if missing, too.

Pick-to: 6.5 6.6
Fixes: QTBUG-114998
Change-Id: If4d3b48b3d0352a0359f6962d4eb1bc2e1e67c95
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-08-11 13:58:36 +02:00
Jonas Karlsson 41625c4721 Dice example: remove workaround
The bug is fixed but the workaround was actually not needed to begin
with since the bug only affects nodes with a position and a parent with
scale which is not the case here.

Pick-to: 6.5 6.6
Change-Id: I99766586d2671b3286085d54c7cf8cca7e0f9b7b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-07-17 12:09:56 +00:00
Kai Köhne 68e3af8836 Dice example: Add tags
Pick-to: 6.5 6.6
Change-Id: If2dc727786ae7e4ca582fb7268a96c8e2657b875
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2023-06-26 13:40:11 +02:00
Kai Köhne 67d2885605 Reformat .qml files in dice example
Use qmlformat -i on all files.

Pick-to: 6.5 6.6
Change-Id: I163d1faf281fc085b824e092056cebe57fce5a6b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-22 17:27:34 +02:00
Jonas Karlsson 34ecd60038 Add the 'dice' example
Fixes: QTBUG-113600
Pick-to: 6.5 6.5.2 6.6
Change-Id: I13b8327f2dcf3e7eaec80c7c10038b22a1656df3
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-06-21 00:50:04 +02:00