summaryrefslogtreecommitdiffstats
path: root/examples/sensors/maze
Commit message (Collapse)AuthorAgeFilesLines
* Remove sensors maze exampleJuha Vuolle2023-02-2224-921/+0
| | | | | | | | | | | | | | | The Maze (QML) example is a nice game implementation, but doesn't add much demonstration value in comparison to sensorsshowcase example. The one unique thing it does demonstrate is tilt sensor. Tiltsensor can be added to the sensorsshowcase too; but OTOH tilt is in some sense just 'a' sensor among the sensors, and there is probably no need to use all of them in the examples. Task-number: QTBUG-110939 Pick-to: 6.5 Change-Id: I2fd997750b05b3962428955a2929e149af6b72bd Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I8e1e210b85a5c02947a259edec14a915fa64cfc5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-071-0/+3
| | | | | | | | | | | | | 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: If432c07e9205f97f3c256ca2a8e682478d9dd82c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-138-369/+16
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I114588b3215fecda3a9127931f17a33bd4ef1edb Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* iOS: Add missing Info.plist for maze exampleAlexandru Croitor2022-04-051-0/+32
| | | | | | | | | | | | | | | Previously configuring the example failed with CMake Error: Target maze Info.plist template "qtsensors/examples/sensors/maze/Info.plist" could not be found. Amends a798ef4e3d3bf93be82bfc0ad5d2ca2af0dcd2d5 Pick-to: 6.2 6.3 Task-number: QTBUG-102256 Change-Id: I855d6db47bd1daaea45c5124e96c5c32121b971c Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
* Improve examples CMakeLists.txtKai Köhne2022-02-211-6/+4
| | | | | | | | | | | | | | | | | - Remove "# generated from xyz.pro" comment from pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Pick-to: 6.3 Change-Id: Ie7432614f6060152eb3278724877670059c71495 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Take custom info.plists and Androidmanifests into use with cmakeTamas Martinec2021-11-261-1/+12
| | | | | | | Task-number: QTBUG-97977 Pick-to: 6.2 Change-Id: I85ad6298d964bfe9fe5b8ddd9e83cb1e66664b6c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Bump almost all cmake_minimum_required calls to 3.16Alexandru Croitor2021-09-221-1/+1
| | | | | | | | | | | | | 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: I51ba79ad25f77c6989acb0cb471967b6403c96f2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* QtSensors: Fix qmake compilation problems in Maze and Accelbubble on AndroidTamas Martinec2021-09-061-46/+39
| | | | | | | | | | The AndroidManifest.xml files were updated according to the latest template in qtbase\src\android\templates\. Pick-to: 6.2 Task-number: QTBUG-92514 Change-Id: Ic1fe8ce6ce937ed91632832187e1208e3536e656 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Improve QtSensors maze example applicationJuha Vuolle2021-07-022-155/+152
| | | | | | | | | | | | | | | | | | | | | | The original problem was that the example accesses tilt sensor readings even if such sensor is not present, which yields errors. In addition to fixing that, few other concerns are addressed as well. As a summary: - show a screen blocker if tilt sensor is not found - run tilt read / game timer only when the game is running - display the tilt sensor identifier - remove the use of nonexistent TiltSensor::enabled property - separate initial element instantiation from new game generation - remove unnecessary start timer - log dynamic element creation errors, and remove unnecessary component 'ready' checks (as only local QML is used) Pick-to: 6.2 Task-number: QTBUG-72328 Task-number: QTBUG-92514 Change-Id: I6a1589297c3c34b85e2876ede52eab31e07dd950 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Remove QML import versions from QtSensor examplesJuha Vuolle2021-07-016-7/+7
| | | | | | | | | QML import versioning is optional and often unnecessary in Qt 6. Pick-to: 6.2 Task-number: QTBUG-92505 Change-Id: I60acf84d8c75560396b896597b143dad283a2e5b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtSensors initial cmake supportLorn Potter2021-04-191-0/+65
| | | | | | | | | | | | | | | | | This commit introduces the bare minimum cmake support that should unblock the CI and allow further verification and development on most platforms: macOS, Linux, Win, iOS and Android. Some clarifications: * The support for sensorfw backend is very preliminary and can be enabled later if needed (no Qt6 version of the sensorfw). * The simulator backend is dropped as obsolete / unnecessary. * Three examples are currently commented out and shall be ported with a later commit. Task-number: QTBUG-92502 Change-Id: Id523d43ed3ef177010dc73afc5812ed374cff0dd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: rename the java package name in manifestsAssam Boudjelthia2021-02-121-2/+2
| | | | | | Task-number: QTBUG-86969 Change-Id: I11bad2d6945e27a859b68471816ef428d3834189 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Update AndroidManifest.xml to be compatible with Qt 5.14Eskil Abrahamsen Blomfeldt2019-10-251-4/+2
| | | | | | | Necessary changes to be compatible with AAB changes in Qt 5.14. Change-Id: Ic574ac5d2401e9241eeb48061959c069a5c0e725 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Fix building maze example on AndroidAlex Blasche2019-04-261-1/+1
| | | | | | | | Qt 5.13 raised the minimal SDK version of Qt for Android to v21. Change-Id: I4c15254ef3aa2d5898c0ce7f5f6b8ffe62202fb9 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Be consistent about values related to pi (radian / degree ratio)Edward Welbourne2017-07-061-2/+2
| | | | | | | | | | | | | | | Use JavaScript's Math.PI to compute 180 / pi (the number of degrees in one radian), rather than a hand-coded value for this constant. Store the result in a readonly property double to avoid repeating the computation. Tweak the pitch and roll calculations to use more apt Math methods: use hypot rather than sqrt of a sum of squares, and use atan2 instead of a tan of a ratio (whose denominator is always positive, so this doesn't change which angle we get). Task-number: QTBUG-58083 Change-Id: Ic3f865dfcbd9b02a0b93f065995d850386aef18c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix licensingJani Heikkinen2017-05-108-26/+96
| | | | | | | | | | | | | | | | | - Remove unused old license files - Update BSD and FDL license headers - Unify licensing * Examples are nowdays licensed under BSD, update correct license header to there * Tools and tests are nowdays licensed under GPL-EXCEPT, update correct license header to those * Src is nowdays licensed under LGPL, update correct license header to there Task-number: QTBUG-57147 Change-Id: I5d9d7a3bc5e360f01ec73fb6a2a873f3173b5918 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Example: use atan2 for simpler angle calculationsEdward Welbourne2017-01-161-15/+1
| | | | | | | | | This replaces calls to sqrt, acos and asin (plus some arithmetic and fix-up) with a single call to atan2; it also avoids dividing by a potentially zero length. Change-Id: I694fa9e3e2bcdbcf1a4eb4c5d428e2c53ea21732 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Purge sRGB chunks from PNGs in examples.Edward Welbourne2016-03-015-0/+0
| | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce Change-Id: I4e15dcbf74334985f4a3e366443b2be7016e76a3 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* Update copyright headersJani Heikkinen2015-02-178-34/+34
| | | | | | | | | 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: I141862df4ed2475c05ebbeb8fe447c4a6e736849 Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Fix a couple of issues in the maze exampleAlex Blasche2014-09-183-7/+64
| | | | | | | | | | | | | | | | | | | 1.) Remove dependency on QtSystemInfo. The module is not officially supported at this stage and screen saver related code is not really required for the example. 2.) Add AndroidManifest.xml to lock the screen orientation in portrait mode. Since the example depends on the tilt sensor a rotating UI is messing the game up. 3.) Port app to current TiltSensor API. The game works but its biggest problem remains the UI. It uses fixed-size UI elements which makes it tiny on High DPI screens. Task-number: QTBUG-31076 Change-Id: I73df9361b5171da930df66072e8ee9eba89b71ad Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix the examples so they can be deployed on AndroidAndy Shaw2014-03-102-5/+3
| | | | | | Change-Id: I8d3b0c84091cf7743164c083318e0a115e948d1c Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix some typos in comments and documentationSergio Ahumada2014-03-041-1/+1
| | | | | Change-Id: I8541601c0bfe2b7c80e88b4617e8215b266fb0bd Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Sensors examples: Use resource system for QML examplesTopi Reinio2013-05-232-0/+24
| | | | | | | | | | | Adds resources (.qml, .js, images, etc.) used in QML examples as Qt resources. This enables running the examples successfully when shadow building, without copying the files around. Task-number: QTBUG-31076 Change-Id: I0f3352cffdc334f6139aac60acd3345710516d65 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Doc: Modularized the Qt Sensor DocsGeir Vattekar2012-10-121-0/+67
| | | | | Change-Id: Ie8636ec443f43b1f238342e0f6f7d321e13dce09 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Rename QtMobility.sensors 1.3 to QtSensors 5.0Lincoln Ramsay2012-10-111-1/+1
| | | | | Change-Id: I2b24533d38db1f8e205de19b67fe0b21625bbf6b Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Remove the QtSensors 5.0 importLincoln Ramsay2012-10-091-3/+3
| | | | | | | | | | | The gesture tests that were part of the sensors2 unit test have been retained. The tilt sensor tests were not, though they could be used as a base to make a unit test for the new tilt sensor class. Change any existing imports to use QtMobility.sensors 1.3. Change-Id: I8a7130b3c73980fdd577e96c10aecda15e79f8b2 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Add TiltSensor to QtMobility.sensors 1.3Lincoln Ramsay2012-10-031-2/+0
| | | | | | | | | | | This has been adapted from the TiltSensor type in QtSensors 5.0 import but the code there has been split into multiple pieces. There's a C++ class, a generic backend and a QML interface. Change-Id: Ic09465a5f76250a02a13938abe4789958137376f Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-247-42/+42
| | | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I85014238e262cb59d8d92b0d708851e82e5633da Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix QTBUG-26860 - install examples to qtsensors directoryLorn Potter2012-08-161-2/+2
| | | | | Change-Id: Iab2407798616ed08ce7789020fe47b00e226d62d Reviewed-by: Alex <ablasche@gmail.com>
* Get all the examples building and running on Desktop.Lincoln Ramsay2012-06-204-12/+56
| | | | | | | | Build the required C++ stubs for each example and deploy all the files so that the examples are runnable. Change-Id: I03d23cb37e1c484110a58934a9b0aa550d6915a6 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Remove device-specific files.Lincoln Ramsay2012-06-202-23/+0
| | | | | | | These aren't needed anymore. Change-Id: I723dfd8a85cd05c11135601908a90386cb840967 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Remove the 'special' naming of examples.Lincoln Ramsay2012-06-2021-0/+956
| | | | | | | Just go back to the naming convention we had before. Change-Id: Iefecb7a5e0ab3aa4d22267b4f475a8e9c1c96058 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Unfork the examples.Wolfgang Beck2012-05-2427-975/+0
| | | | | | | | | | | | Some examples were forked off and updated. Unfork by bringing these changes back (a later update will bring the other examples in line with this new style). The changes are primarily made up of file renaming. Also, JPG files have been converted to PNG. Some documentation updates have been done. Change-Id: Ib090abb5ebea2003d479d2336a23317f52b8c4d8 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
* Allow opening examples directly from Qt Creator.Lincoln Ramsay2012-02-291-0/+2
| | | | | | | | The MT_SYSROOT environment variable is set in this case so we can use this to set the correct installation path. Change-Id: I923b1ea97468414a123c97a01b0405604827a99b Reviewed-by: Zsolt Simon <zsolt.simon@nokia.com>
* Update the examples.Lincoln Ramsay2012-02-275-34/+16
| | | | | | | | | | | Use .pro files, no .qmlproject files. Remove unused settings.json and notions.json files. Install to EXAMPLES_PREFIX when it is defined. Dest paths match info.json identifiers. No execute bit on non-executable files. Change-Id: Ib09320bd976b8aec7512531ce11ed92f05912dde Reviewed-by: Wolfgang Beck <wolfgang.beck@nokia.com>
* Update Examples for SDK teamWolfgang Beck2012-02-147-77/+38
| | | | | Change-Id: Ib81ebf326a1ee4330a268c8d57934e3d77ea68bb Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-307-7/+7
| | | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I1ecfbf66a49bb91dd995d92c871ca36148adc645 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-237-7/+7
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Ie8628548cde5d3b251f319cbb6f33e6c08852d9e Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Components exchangeableWolfgang Beck2012-01-186-17/+63
| | | | | | Change-Id: If028c67235567de4d7d99775dcd48e8c0a1ebf75 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
* Fix doc errors for Examples of the SDK teamWolfgang Beck2012-01-131-1/+1
| | | | | | Change-Id: Id0acbc70ede7229903679d73d283b24eb8be91d3 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
* Examples for SDK TeamWolfgang Beck2012-01-136-151/+168
| | | | | | | Change-Id: I93f92a85419f0519f887ccd12a39bf61d7db7aae Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Wolfgang Beck <wolfgang.beck@nokia.com>
* Fix secounds misspellingWolfgang Beck2012-01-121-1/+1
| | | | | | Change-Id: Ic303d8e84044cc687589fe9105bb5689e29fe9de Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-055-5/+5
| | | | | | Change-Id: I7fdedc329cf80f84f1f6e0c6c9da3f7d1ebcd70d Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add MAZE tutorialWolfgang Beck2011-12-091-0/+11
| | | | | | | Change-Id: I076d5071aa27ba10da6885b1d856c24ca6bb4f7d Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Wolfgang Beck <wolfgang.beck@nokia.com>
* new identifier format.Lorn Potter2011-11-291-1/+1
| | | | | | | Change-Id: Iade5565150d17017a492b4a81e9fee4a4744a722 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Wolfgang Beck <wolfgang.beck@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Remove auto generated section in qmlproject filesWolfgang Beck2011-10-191-2/+0
| | | | | Change-Id: I483555c82c4cb1477bb14a885d92625b320ec973 Reviewed-by: Wolfgang Beck <wolfgang.beck@nokia.com>
* MTMW-306 Update cubehouse exampleWolfgang Beck2011-10-181-1/+1
| | | | | Change-Id: I473898a4a6a46c89edb7d7b6ada7027dd9ae96d6 Reviewed-by: Wolfgang Beck <wolfgang.beck@nokia.com>
* update license headersLincoln Ramsay2011-10-105-5/+5
| | | | | | | Change-Id: Ifbbcb23eed144e7ac4a91bc5d132dea32937f93c Reviewed-on: http://codereview.qt-project.org/6275 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* MTMW-345-346 CR change for TiltSensorWolfgang Beck2011-10-101-5/+6
| | | | | | | Change-Id: I735e0a6ab3aaad4290216c8501e8be684f7d0e6b Reviewed-on: http://codereview.qt-project.org/5938 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Wolfgang Beck <wolfgang.beck@nokia.com>