summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/heartrate-game/devicehandler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Bluetooth heartrate-game example: Make simulation switcheable by command ↵Friedemann Kleint2022-08-151-16/+13
| | | | | | | | | | | line arguments Introduce QCommandLineParser for simulation and verbosity settings. Change-Id: I00d01d2fa73db311944a2df68c6b116f0a31811b Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit f2d0f8709d17afac1d7d15ee746397eb17e948f9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Bluetooth heartrate-game example: Basic polishFriedemann Kleint2022-08-151-6/+3
| | | | | | | | | | | | | - Reorder includes by module - Reorder Q_OBJECT macros - Use member initialization - Update copyright year - Remove QML import versions Change-Id: I00a817c07bf50efcb9fed60372c374d34d138640 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 4c3d8adc17cdbe80a3eb65727997a4b7db426b3f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use SPDX license identifiersLucie Gérard2022-06-131-49/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Ifc22d8ae24532e9a1093ca613ed6590a1992bc39 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 664d2a1cf019f76adf433d41b1418e515ffce86c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Change QLowEnergyService::ServiceState enum to reflect future changesAndreas Buhr2021-04-081-3/+3
| | | | | | | | | | | | In the future, discoverDetails() should become optional. The state of a QLowEnergyService after its creation should have a name which does not imply it is not functional yet. This patch changes the name of the initial state from "DiscoveryRequired" to the neutral "RemoteService". Task-number: QTBUG-75340 Change-Id: Ib407e60f5fc7264a04a124561dacbcebb01bf252 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* rename error signals to errorOccurredAndreas Buhr2021-03-221-5/+5
| | | | | | | | | | | Currently, there is a name clash between the error getter and the error signal. This leads to extensive use of qOverload or similar. This patch renames all error signals to errorOccurred to resolve this. Task-number: QTBUG-62877 Change-Id: I615e2405f855433b6e142d820072c4d3f35ae28f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use scoped enum for constants in QBluetoothUuidAndreas Buhr2021-03-111-5/+5
| | | | | | | | | | | | QBluetoothUuid contains enums for ProtocolUuid, ServiceClassUuid, CharacteristicType and DescriptorType. So far, they all put their constants directly into the QBluetoothUuid namespace, making it easy to mix them up. This patch changes those to scoped enums. That way, each enum has its items in its own namespace. Change-Id: I86ea08ff31009dc8073d84cfe678e27920d693f7 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Rename QLEService::DiscoveringServices to DiscoveringServiceAlex Blasche2020-05-141-1/+1
| | | | | | | | | | | | Singular is a better fit to avoid the notion of several services being discovered at a given time. [ChangeLog][QtBluetooth][QLowEnergyService] Renamed DiscoveringServices enum value to DiscoveringService. Task-number: QTBUG-75344 Change-Id: I9ebe8a8ccba8bb49c55772ae81338f376826ee64 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix a few clazy/clang warnings in HeartRate Game exampleAlex Blasche2018-09-051-11/+8
| | | | | Change-Id: I2a7b8c403ca466998ddcbd8496c31feb9856f0ad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove direct usage of QLowEnergyController::ctorAlex Blasche2018-08-211-1/+1
| | | | | | | | QLowEnergyController::createCentral() is the official API to do the same. Change-Id: Idbd26d201b24add6697f6f9cdf1194511c160273 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Update to new QRandomGenerator APIv5.10.0-beta4Thiago Macieira2017-11-031-3/+3
| | | | | | Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-301-2/+12
|\ | | | | | | Change-Id: Iaa053dcb125490ee1e83d7e27cb75d4171297b9f
| * Fix outdated BSD license headerKai Koehne2017-10-171-2/+12
| | | | | | | | | | Change-Id: I28f5936913a6127806325df34af4bf71a142e72e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Use QRandomGenerator instead of q?randThiago Macieira2017-06-301-3/+4
|/ | | | | Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use heartrate-game example for snippets in BTLE overviewAlex Blasche2017-04-071-0/+12
| | | | | | | | | heartlistener example will be removed. Change-Id: Iaa5c5f629cf351b97c18f61b4fab2cbbd8d0744c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Update heartrate-game against latest heartlistener exampleAlex Blasche2017-04-061-2/+3
| | | | | | | | | | | | | | | | | | This patch incorporates the following two heartlistener patch: 1750983d3f053316c735d602c7f9a1b56dc4462b b01389be13b40833fa3f50a862b164c5d8389d1a The above two patches were applied to the heartlistener example after the fork for the new heartrate-game example was done. This patch applies the missing two patches. The first patch restricts the communication to Low Energy devices The second patch ensures that the device properly disables the heartrate notifications on disconnect events. Change-Id: Ia2904f2ae3d5cef22abcc9815c5e0c342370e83c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Permit BlueZ platforms to set the address type in heartrate-gameAlex Blasche2017-04-051-0/+21
| | | | | | | | | | | | | | | | | | BlueZ is the only platform that requires to set the BTLE address type. The patch introduces a new UI button which allows the user to toggle the address type. The UI element is disabled on all platforms but Linux/BlueZ systems. The number of devices returned in simulator mode is reduced to four devices. This was done purely for esthetical reasons as the additional address type button takes screen real estate away and five simulator devices require more screen real estate than the remaining space for device list. This avoid the need for scrolling. Change-Id: I14cf26b3c821db7768b9d018c2d09441cd97679a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add means to enable simulator build with one easy defineAlex Blasche2017-04-041-4/+5
| | | | | | | Otherwise it is only enabled on Win32 builds Change-Id: I23ce25411294ebe2dae2272c16789da897b43e82 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add new heartrate exampleAlex Blasche2017-04-031-0/+319
The example is a redesign by Lasse Räihä based in the heartrate-listener example. Change-Id: Iec0f48603408b37c7054839d520368eb1e436895 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>