summaryrefslogtreecommitdiffstats
path: root/src/sensors
Commit message (Collapse)AuthorAgeFilesLines
* Make overridden QObject functions public to enable Python bindingsJuha Vuolle2021-08-042-6/+5
| | | | | | | | | | | | | | | QSensorGesture implements a custom metaobject and does not use Q_OBJECT macro directly, but rather the key functions are overridden manually. These functions are now made public to allow Python bindings for the sensor gestures. Task-number: PYSIDE-487 Task-number: QTBUG-92505 Change-Id: I3682bfa1a39b2a6d85413eb1679492d9b5bd9513 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 5bcc6622c4283703c9f8cb5fcf9e983b6e91b377) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Specify units in the tilt sensor documentationJuha Vuolle2021-08-021-5/+7
| | | | | | | | | Task-number: QTBUG-66318 Task-number: QTBUG-92512 Change-Id: Ifaa10eb16006ee9037a8a73eb47176638326fdf2 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 2c38243d9f4a59260a207170ae799edbd08e3d6e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unrelated remark from QTiltSensor documentationJuha Vuolle2021-07-021-1/+1
| | | | | | | | | | | | The removed part looks like an accidental copy-paste from the QTiltSensor::calibrate() function implementation. Task-number: QTBUG-92512 Change-Id: If706b8d4e8f0ebc83dfe0e87d6baa0134587354f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 455e5a973be5f7c3afaff147f4482a69d134b5bd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix and improve sensor configuration file lookupJuha Vuolle2021-07-013-14/+23
| | | | | | | | | | | | | | | | | This commit addresses some of the sensor configuration lookup issues - The CMake rule to use compile-time flag was opposite than intended - The configuration file is now looked from all returned configuration paths, not just the last one which seemed a bit arbitrary - Update related documentation, and while doing that also remove references to "N900" which probably won't say that much to people these days (N900 was a smart phone released 12 years ago) Task-number: QTBUG-92505 Task-number: QTBUG-92512 Change-Id: Ib66ae052a815bbe3af32bd896931e65375e8546e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 108e7d9e5fad438e565305104ec3712bff6561b6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove obsolete gesture emulator documentationJuha Vuolle2021-06-292-75/+0
| | | | | | | | Task-number: QTBUG-92512 Change-Id: I698e967c106c79f410b2befc7085012b3f999056 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 2e18032f1f4228d2ed8270dac29efabcc9ca1ffc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove TI Sensor tag supportJuha Vuolle2021-06-293-28/+4
| | | | | | | | | | | | | | | | | The TI Sensor tag support is specific to a firmware version, and while it could be updated on an ongoing basis, there has not been expressed use for it beyond its initial use cases. As with Qt sensors in general, sensors and platforms can be later reintroduced without compatibility issues should such needs emerge. [ChangeLog][TI Sensor tag] Remove support Task-number: QTBUG-92512 Change-Id: I70c8514701787cc1d21195546a48b38d8009434f Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit acd80292bb9a62105204f012cf70d56d8c4b9ada) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update QtSensors platform- and sensor support in Qt6Juha Vuolle2021-06-2915-1000/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the sensor frontend implementations of QAltimeter, QDistanceSensor, QHolsterSensor and their QML counterparts. Since the BlackBerry backend removal in 2015 these sensors have not had a backend support. Sensorfw is not currently supported by Qt6, and as the sole backend provider the following sensors have been removed from documentation until such support is reintroduced: QIRProximitySensor, QLidSensor, QTapSensor and their QML counterparts. [ChangeLog][QAltimeter] Remove support [ChangeLog][QDistanceSensor] Remove support [ChangeLog][QHolsterSensor] Remove support [ChangeLog][QIRProximitySensor] Disable documentation [ChangeLog][QLidSensor] Disable documentation [ChangeLog][QTapSensor] Disable documentation Task-number: QTBUG-92512 Change-Id: Ic89e91bf65e7a70a2faf0fb566bb24f2f1005a4e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit d40c4d0b3766043cf4fbaa87acd76b11bf733369) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtSensors Qt6 documentation base updateJuha Vuolle2021-06-297-179/+97
| | | | | | | | | | | | | | | | | The QtSensors module shall be released in 6.2 for the first time in Qt 6 series. This commit updates the basic things of the documentation accordingly. Documentation for sensor support, platform support, and examples shall be updated with followup commits. [ChangeLog][sensorfw] sensorfw removed from docs for now Task-number: QTBUG-92512 Change-Id: I7c5e447766109bf9da8ab3cc56fe22ec42dbd875 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 175a5ab34240c723ad2c2a2d60ad38a01ed6d218) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Sensor identifier autotest and fix related findingsJuha Vuolle2021-06-151-0/+5
| | | | | | | | | | | | | | | | | This commit adds a (QML) test for sensor identifier (and activation whose logic is closely related). The related changes: * Change sensor 'identifier' and 'type' properties to QByteArray. This now matches with C++ side that uses QByteArray * Allow changing of 'identifier' after componentComplete. This is now aligned with C++ side. Changing identifier is fine as long as the backend is not connected. Task-number: QTBUG-92513 Task-number: QTBUG-92505 Change-Id: I326d840d5a4efb13a3a6578711563e8054cc9961 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit c3cc1253ba159e6f4c9bd4c92da2b8c300ee94f2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make sensor possible to indicate it is no longer busyJuha Vuolle2021-06-154-8/+27
| | | | | | | | | | | | | | | | The current implementation allowed sensor backend to only indicate that it is busy, but not to tell when it was freed again. This commit allows sensor backend to indicate also that it's busy state has cleared. It is up to the sensor implementation to decide if it makes sense / is possible to do that or not. Task-number: QTBUG-92513 Task-number: QTBUG-92505 Change-Id: Ied4857850e81346031fd83aa347d9955081118e8 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit f8445fdcbf75e455443304bc290c48c37961e9f1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Increase QtSensors QML autotest coverageJuha Vuolle2021-06-151-0/+5
| | | | | | | | | | | | | | | | | This commit introduces QML based auto tests in order to increase the autotest coverage. Additionally the QML sensor activity handling is fixed which caused the newly added tests to fail. There are also long-standing bugs about these activeChanged() double emits. Task-number: QTBUG-92514 Task-number: QTBUG-70770 Task-number: QTBUG-80755 Change-Id: I98f036f665a056c441efa00aab76ec47bc628057 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 54b3ca67ad7230a21d76c581dd4287401acb230f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace Q_FOREACH with ranged for loopsJuha Vuolle2021-06-084-26/+17
| | | | | | Task-number: QTBUG-92505 Change-Id: I1e8334473c883f76285736f6a26138ea882f5351 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Replace Q_NULLPTR with nullptrKevin Funk2021-06-0224-27/+27
| | | | | Change-Id: I9885deb29ebcd5db51a00cbcc2f063bfc418e23f Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Doc: Fix documentation issuesTopi Reinio2021-06-022-8/+4
| | | | | | | | | * Add src/sensorsquick to the documentation project * Remove links to UWP and SailFish from the overview page Task-number: QTBUG-91875 Change-Id: I7c7ed24ddc487c48f423d8b4ffa44154d51872d6 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Few cleanups and modernizationsJuha Vuolle2021-06-026-11/+10
| | | | | | | | | | | This commit introduces few source compatible changes: - Change obsoleted Q_ENUMS => Q_ENUM - Mark QSensor::type property as CONSTANT as it cannot change - Add change signal to QSensor::identifier and a testcase for it Task-number: QTBUG-92505 Change-Id: I6e3a652929d15bc5211448be2ae9254ed6d21118 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix and simplify sensor_explorer exampleJuha Vuolle2021-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Rename subclass static variable which shadowed baseclass methodJuha Vuolle2021-05-1942-63/+71
| | | | | | | | | | | The 'type' static variable shadowed the 'QSensors::type()' method of the baseclass. While this is easy to workaround it is better to remove such naming clash. Task-number: QTBUG-60246 Change-Id: Id0ddae978377ea4d4d0202a572c554c2541f9364 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QtSensors: Fix iOS sensor backend loadingTamás Martinec2021-04-301-2/+6
| | | | | | | | | | Setting the default backend to the last registered backend if the current default is a dummy backend. Task-number: QTBUG-92508 Change-Id: Id67625544f0da2dae118998429c0aeeee2a94cb2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
* Compile-config test for winrtJuha Vuolle2021-04-201-1/+15
| | | | | | | | | | | | | While winrt as a "windows phone" is not supported anymore, the APIs are available on windows and can be supported where applicable (bluetooth, positioning, sensors, ...). This commit adds a configuration tests for the presence of these headers and libraries. Task-number: QTBUG-92502 Change-Id: Ia6dcb0a6b8ecdbcf1d1bcf79e42f95ace75f6657 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtSensors initial cmake supportLorn Potter2021-04-1915-414/+206
| | | | | | | | | | | | | | | | | 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-193-9/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove two QChar related deprecation warningsJuha Vuolle2020-12-181-2/+2
| | | | | Change-Id: Ia2ecc159b8c53035673a7250230ed0a56bfa06a2 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-302-3/+3
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I36a9c2a142b8485755b8849b839eac972e288bf6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-251-1/+0
| | | | | | | Task-number: QTBUG-84469 Change-Id: I4ef3c22412f5978b3474c0ccd90bae08fd7f1297 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Make sure to advocate latest sensors importKai Koehne2020-03-061-3/+3
| | | | | Change-Id: I37f010fa8f9ab3f4b3c1f355110228ae1ce58dc3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix library namev5.14.0-beta2v5.14.0-beta1BogDan Vatra2019-10-011-1/+1
| | | | | | Fixes: QTBUG-78616 Change-Id: I63ae0ef7d83cf2336ede280530de54688bf4fa76 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc: Replace WinRT with UWP in Qt Sensors module docsLeena Miettinen2019-09-201-2/+3
| | | | | | | | | The name of the platform offering in the docs was changed to "Qt for UWP", because WinRT is no longer supported. Task-number: QTBUG-61884 Change-Id: I9b824e630e040d1b9789981596c238615033fd69 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Remove non-existing arguments from docsLeena Miettinen2019-09-193-11/+11
| | | | | | | | | | ...for QSensorGesture::detected() and QSensorGestureRecognizer::detected() Also, the Q_QDOC defines are not needed any more. Change-Id: I3fe2fb779caceeb41187815d272aca053af695b3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-162-2/+2
|\ | | | | | | Change-Id: I882051b1e585c1af4a27930aa8c575ef641583b5
| * Doc: Prefer public over private API in linksPaul Wicking2019-07-112-2/+2
| | | | | | | | | | | | | | | | This change uses the public API and removes references to private API. Task-number: QTBUG-76978 Change-Id: Ifd53dc520a38ff87b12271b7b446fd42753bb7f3 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* | Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-07-091-0/+1
| | | | | | | | | | | | Task-number: QTBUG-74391 Change-Id: Iacab2b6735bef1d52c640cb7b3e51ae3aa010a56 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Doc: Fix qdoc errorsNico Vertriest2019-04-301-1/+1
| | | | | | | | | | Change-Id: I989cc21bdbbd56c3b14b934b3256bda3a01a6764 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-261-2/+0
|\| | | | | | | Change-Id: I580be02701e5e4b5a57f59206d6a50cc98ddf220
| * Remove .jar dependenciesBogDan Vatra2019-04-261-2/+0
| | | | | | | | | | | | Fixes: QTBUG-75381 Change-Id: Iacd5760e176908645e1a49115e122f2e5e3469ca Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta2Qt Forward Merge Bot2019-03-271-1/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5f26c3f31900ece899f9ce9870057eb5638c4b59
| * Doc: Fix name of global QML singletonUlf Hermann2019-03-201-1/+1
| | | | | | | | | | | | | | | | The module API is called "QmlSensors", not "SensorGlobal". Fixes: QTBUG-74571 Change-Id: Ia998082be99517393389ba3a9785150e97d9c15f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-042-0/+7
|\| | | | | | | Change-Id: Ibfc32051293768600890a744df4b41a8a56558f3
| * add missing QT_BEGIN_NAMESPACE and QT_END_NAMESPACELorn Potter2018-11-292-0/+7
| | | | | | | | | | | | Change-Id: I262ee674a240bba87e84e21ceb486cb12d53053d Reviewed-by: Lincoln Ramsay <a1291762@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Compile-fix (g++ 8): move #include of mocs outside namespaceEdward Welbourne2018-11-2920-20/+29
| | | | | | | | | | | | Change-Id: I7a1697ff968d052a2a8268299db8fde4f9f34338 Reviewed-by: Lincoln Ramsay <a1291762@gmail.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-251-1/+1
|\| | | | | | | Change-Id: Ia2080f82b1ed04535e198aab57ff08ef544072fc
| * iOS: remove iOS from compatmap for AmbientLight sensorv5.12.0-beta4v5.12.0-beta3v5.12.0-beta2v5.12.0-beta1Lorn Potter2018-09-201-1/+1
| | | | | | | | | | | | Task-number: QTBUG-70625 Change-Id: I6ae8520d2451c5e64a9e9648f86af2bf3957f9b9 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QSensorGesture: Add Qt 6 fixme comment asking to make QObject virtuals publicFriedemann Kleint2018-09-041-0/+1
|/ | | | | | | | | Qt for Python cannot currently be generated for the class since QObject::metaObject() is private. Task-number: PYSIDE-487 Change-Id: Ib368aa79bb3cd9b912d48455880d2f8ea9425f70 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Bump Qt sensors qml import versions in doc and qmltypesAlex Blasche2018-04-191-2/+2
| | | | | Change-Id: If3027bc22486bec4b4b02eea85497578c8bb1b1a Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Doc: Remove incorrect \relates commandv5.11.0-beta4v5.11.0-beta3Topi Reinio2018-03-261-1/+0
| | | | | | | | | QDoc cannot handle the case of setting a class to be related to another class (unless they are nested); adding \relates to another class will overwrite the class output page. Change-Id: I9978b915b339e4e1baafb708012b6fdf9a3b9aad Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Fix libclang related warning for templated methodPaul Wicking2018-03-201-1/+1
| | | | | | | Corrected method signature in documentation. Change-Id: I86343f9e0bd4df04a4c24f6d7c02be663ebac0d9 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-201-1/+1
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I17dec1cd2d4934710663e5fa97c926a65fe301e5
| * Doc: correct clang error messageNico Vertriest2017-12-191-1/+1
| | | | | | | | | | | | | | qsensorbackend.cpp:149: (qdoc) warning: clang found diagnostics parsing \fn QSensorBackend::setReading(T *reading) Change-Id: I274c9eea76eab9071f47d8bebcfd163d5867281a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Add missing override and remove redundant virtualAlexander Volkov2017-11-147-17/+17
| | | | | | | | | | Change-Id: I51c0fc424f44ae68c3c1c4cf6377e7701ee5a0dd Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | add sensor plugin for TI sensortagLorn Potter2017-10-021-0/+21
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QSensorBackend] Support for TI Sensortag sensor board. Introduce env var QT_SENSORTAG_ID for specifying a specific sensor tag. On mac, this is the sensortag uuid, on linux it is the sensor tag's bluetooth address. Change-Id: I7c5db8dac15ddbfdb0709bd6462759b4a70d32b7 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-212-2/+2
| | | | | | | | | | Change-Id: Ib258bbc787f43e563fff8af8151ceae87471c672 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>