summaryrefslogtreecommitdiffstats
path: root/examples/sensors/sensor_explorer
Commit message (Collapse)AuthorAgeFilesLines
* Move sensor_explorer QML example to manual testsJuha Vuolle2023-02-229-590/+0
| | | | | | | | | | | | | | | | The example is useful as a sensor testing tool, but less necessary as an example. The primary demonstrative element of the example was how to iterate the available sensors, which is covered in a documentation snippet (followup commit). This commit also renames the pre-existing widget-based sensor_explorer manual test to avoid name conflicts, as well as removes the qdoc and qmake support from the now-a-manual-test application. Task-number: QTBUG-110939 Pick-to: 6.5 Change-Id: I422f62f852d0a7e40a76f555ec8aa98404164f7a Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Change from count() to size() with Qt containersJuha Vuolle2022-10-041-5/+5
| | | | | | | | | | As the preferred method. Potentially may be deprecated similar to QString/QByteArray Fixes: QTBUG-107068 Change-Id: I0cfc9d7f8e2e450849f1d22c5b98aa353748ecf6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> 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-135-222/+10
| | | | | | | | | | | 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>
* Improve examples CMakeLists.txtKai Köhne2022-02-211-6/+3
| | | | | | | | | | | | | | | | | - 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>
* CMake: Update sensor_explorer example to new QML CMake APICraig Scott2021-08-232-23/+10
| | | | | | | Task-number: QTBUG-95093 Pick-to: 6.2 Change-Id: Id53456e11225f524fb5ec40539fdc216b62ecf4e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix and simplify sensor_explorer exampleJuha Vuolle2021-06-0220-1302/+486
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit strives to both fix and simplify the application and bring its intended demonstrative purpose more forward, consequently hopefully also making the example easier to understand and maintain. First, the sensor_explorer example used QQC1 functionalities which are no longer available in Qt6. The removed elements were such that the datamodels needed to be redesigned. This commit changes the example to use bit more standard Qt model-view approach. Second, the sensor_explorer application has not worked in years on Android due to missing QML plugin installation. While this could be fixed, in the name of simplicity the example is now a single binary. Third, the explorer allowed editing of sensor values. While this could be a feature of the example, it perhaps deviates from the gist of the example making it more difficult to understand. Thus the editing was not added as part of the example rewrite. It can be added later though. Task-number: QTBUG-92514 Task-number: QTBUG-92505 Task-number: QTBUG-63054 Change-Id: Icd620ea605a87ba74a42cd1309a3c02d05b146ac Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Enable sensor_explorer example standalone buildJuha Vuolle2021-04-273-9/+10
| | | | | | | | | | | | | This commit enables building of the example outside of the source tree. Currently the example does not work with Qt 6.2 but requires more "content work" that shall be done under QTBUG-92514 Also removed the Widgets related code as the example is a Quick application. Task-number: QTBUG-92502 Change-Id: I016cf6697dc4603c77437c7f20601937b1fca293 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add cmake support for two examples missing itJuha Vuolle2021-04-261-0/+54
| | | | | | | | | The grue example remains commented out, it will be addressed with a separate commit as part of the QTBUG-92514 Task-number: QTBUG-92502 Change-Id: Ieb1a61b942ac6adc6880e33478059893a9492730 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtSensors initial cmake supportLorn Potter2021-04-192-0/+55
| | | | | | | | | | | | | | | | | 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>
* Base commit to make QtSensors runnable on WindowsJuha Vuolle2021-04-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Fair amount of work remains after the commit still, but this should allow further development as a compilable baseline: code compiles, autotests pass, and most example applications at least start. The changes: -Change examples to use QtQuickControls 2 as per removal of v1 -Fix ambiguous conditional expression compilation error -Link against runtimeobject library (previously part of winrt QPA?) -Change the .pro file rule to win32 as winrt moniker does not exist anymore -Remove references to deleted winrt event dispatcher -Fix error handling: getdefault may be successful even if there is no default sensor -Fix QCOMPARE failure output (toString has changed in Qt6) -Remove qtimestamp alias which was deprecated already in Qt5 -Remove unit test hook that does not seem to be used anywhere -From typedef to ‘using’ for readability -Q_ENUMS -> Q_ENUM as the former has been obsoleted by the latter -Add qt6 changes qdoc page Task-number: QTBUG-88616 Change-Id: I92c168228ba76106b2c636c88f54331c76c3d2e6 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* sensor_explorer: Fix warnings about deprecated QQmlListProperty APIv5.15.0-beta1Friedemann Kleint2020-02-132-2/+2
| | | | | | | | | | | Pass the list by pointer, fixing: sensors/sensor_explorer/import/explorer.cpp:120:64: warning: ‘QQmlListProperty<T>::QQmlListProperty(QObject*, QList<T*>&) [with T = QSensorItem]’ is deprecated sensors/sensor_explorer/import/sensoritem.cpp:328:62: warning: ‘QQmlListProperty<T>::QQmlListProperty(QObject*, QList<T*>&) [with T = QPropertyInfo]’ is deprecated: Use constructor taking QList pointer, and gain improved performance [-Wdeprecated-declarations] Change-Id: I0652e806354d3ba43c551e4a3733bafd73f0ddfe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Enable shadow-building the sensor_explorer example on WindowsFriedemann Kleint2019-10-253-19/+74
| | | | | | | | | | | | When package-testing, a shadow-build of the example fails due to the import plugin not finding "main.moc", which is apparently caused by the directory structure and using DESTDIR = ./ Add header "main.h" to avoid having to deal with "main.moc". Change-Id: I04024c8d282b4f56d9942c0c8414d0b6ff9b1d20 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add missing override and remove redundant virtualAlexander Volkov2017-11-141-1/+1
| | | | | Change-Id: I51c0fc424f44ae68c3c1c4cf6377e7701ee5a0dd Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix sensor explorer build on macOSEike Ziller2017-05-291-1/+3
| | | | | | | | | The QML module is looked for next to the application binary, which on macOS is within the application bundle. Task-number: QTBUG-56669 Change-Id: I18abfcaf383fb075fec4d3158db58e7ea68ee280 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix licensingJani Heikkinen2017-05-1010-20/+50
| | | | | | | | | | | | | | | | | - 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>
* Fix loading of QML pluginsv5.8.0-alpha1Simon Hausmann2016-08-261-1/+1
| | | | | | | | | | Since commit 709f6370884b110def2e4665df8fa7bbf5fae734 the plugin loader is strict about requiring the correct interface id, to avoid loading unrelated plugins in the loader thread (which they may not be prepared to do). Change-Id: I84e4d927489f9a14615db399b560af4b352bf045 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'gerrit/5.6' into 5.7Alex Blasche2016-05-193-12/+7
|\ | | | | | | Change-Id: Ie2002a0be7fcb6bd9b81792a1e50b4ffb6c1acc3
| * fix example installsOswald Buddenhagen2016-05-101-0/+2
| | | | | | | | | | | | Change-Id: Id7b94644f9db10bce3ef3539f4ff275f5f6f37b0 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * make plugin .json naming better follow the project structureOswald Buddenhagen2016-05-103-2/+2
| | | | | | | | | | | | | | | | it's more intuitive that way, and easier to deal with for the example source install magic. Change-Id: I547717463756c4b0bb86e401abfb5ddf7a605020 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * make use of COPIESOswald Buddenhagen2016-04-281-10/+3
| | | | | | | | | | Change-Id: I1df10894b0d0e4adba411db2dfc818f8bd39f6df Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-0/+0
|\| | | | | | | | | | | | | Conflicts: src/sensors/doc/src/compatmap.qdoc Change-Id: I7bd464cbd506f630798091fef3896050ade7b3f8
| * Purge sRGB chunks from PNGs in documentation.Edward Welbourne2016-03-011-0/+0
| | | | | | | | | | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce -force Change-Id: Ie54ce7153b23632cf2673f6f82ae8b3e4dec6e67 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* | Updated license headersAntti Kokko2016-01-206-96/+198
|/ | | | | | | | | | From Qt 5.7 -> examples are lisenced under BSD license, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new BSD header instead of LGPL21 one (in those files which will be under BSD) Change-Id: Ife4aff1bffc18ca3094f6dd3c1c3d00e2898d237 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1710-60/+60
| | | | | | | | | 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>
* Update license headers and add new licensesJani Heikkinen2014-08-246-114/+66
| | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I99c601a398559886c2900f3e04833acfceba8263 Reviewed-by: Antti Kokko <antti.kokko@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Change slashes depending on host in examples.Friedemann Kleint2014-04-151-1/+1
| | | | | | Task-number: QTBUG-38224 Change-Id: I3c7a3d0b3a47696aeb2eee799ae119419ea60713 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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-3/+3
| | | | | Change-Id: I8541601c0bfe2b7c80e88b4617e8215b266fb0bd Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QML examples: Avoid using release/debug output subdirectoryv5.2.0-rc1Topi Reinio2013-11-211-0/+4
| | | | | | | | | | | | | | | Qt Sensors examples that include additional QML modules fail to run on Windows, because the application located under a debug or release subdirectory does not see the module import path. This change fixes the issue by adjusting examples' DESTDIR on Windows builds. Task-number: QTBUG-33875 Change-Id: Iab8ebc1acd80cf4fe88a7a35b44c42f767da5ccf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Doc: Update Sensor Explorer exampleTopi Reinio2013-11-1119-698/+251
| | | | | | | | | | | | | | | | Following changes are made to the example - Use of Qt Quick Controls / TableView to present the sensor information, reducing the example to a single QML file - Updated launcher main.cpp for the QML example - Remove separate example doc for the import subproject - Various fixes to example doc, add a screenshot - Ensure import module + qmldir are built/deployed to correct location Task-number: QTBUG-32881 Task-number: QTBUG-33875 Change-Id: I0ed7c7ebc916fcad6da5e3c66d81be8f348a93e1 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Sensors examples: Use resource system for QML examplesTopi Reinio2013-05-232-0/+19
| | | | | | | | | | | 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/+91
| | | | | Change-Id: Ie8636ec443f43b1f238342e0f6f7d321e13dce09 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QtSensors examples: Install plugins under the example tree structureTopi Reinio2012-09-272-1/+2
| | | | | | | | | | | | | QtSensors 'Grue' and 'Sensor Explorer' examples include qml imports, a Qt plugin and a shared library. Modify the related .pro files to install everything under QT_INSTALL_EXAMPLES, instead of the main Qt install directory. Task-number: QTBUG-26860 Change-Id: I32d4f66e5b18468c17b668ecb76f969ed15e4c50 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Alex <ablasche@gmail.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QtMobility.sensors has a new implementationLincoln Ramsay2012-09-261-1/+1
| | | | | | | | | This implementation fixes the limitations the original code had and separates the QtSensors C++ API from the QML API so that changes to one don't need to affect the other. Change-Id: I519463f3c7cfbad3bce5c291ce166b8793d5ed4a Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2414-192/+192
| | | | | | | | | | 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>
* Make sensor explorer example againv5.0.0-beta1Thomas McGuire2012-08-282-6/+0
| | | | | | | | | | In QML it is now no longer allowed to override signals with a new signal that has the same name. In this case, the property change notification signal was overridden. Turns out that is not needed anyway here. Change-Id: I7e0a3f00098867dfb98273f264cc8dddd15cfaec Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Fix QTBUG-26860 - install examples to qtsensors directoryLorn Potter2012-08-162-6/+3
| | | | | Change-Id: Iab2407798616ed08ce7789020fe47b00e226d62d Reviewed-by: Alex <ablasche@gmail.com>
* Get all the examples building and running on Desktop.Lincoln Ramsay2012-06-203-2/+50
| | | | | | | | 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-2026-0/+1703
| | | | | | | 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-2426-1704/+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>
* Add .qmltypes files for Creator.Lincoln Ramsay2012-03-281-1/+1
| | | | | | | | | | Only doing this for the actual QML APIs, not the examples ones. Can run make rebuild_qmltypes from a build directory to rebuild the .qmltypes files automatically. Change-Id: Ie1253646dde25861673c303b015a9ba9a4f0fbe3 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Update QML plugins to the new style.Lincoln Ramsay2012-03-163-2/+5
| | | | | Change-Id: Ie419b58c4789e539be5370dc0b7d2518009bbe91 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Rename declarative symbols.Lincoln Ramsay2012-03-087-16/+16
| | | | | | | Use the script rename-qtdeclarative-symbols.sh. Change-Id: Ib1a62731a6c95590978a488c4afbd804f14fb958 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
* Allow opening examples directly from Qt Creator.Lincoln Ramsay2012-02-292-0/+4
| | | | | | | | 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-2720-59/+12
| | | | | | | | | | | 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-1420-119/+39
| | | | | Change-Id: Ib81ebf326a1ee4330a268c8d57934e3d77ea68bb Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3014-14/+14
| | | | | | | | | | | 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>