1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef GENERICROTATIONSENSOR_H |
5 | #define GENERICROTATIONSENSOR_H |
6 | |
7 | #include <QtSensors/qsensorbackend.h> |
8 | #include <QtSensors/qrotationsensor.h> |
9 | #include <QtSensors/qaccelerometer.h> |
10 | #include <QtSensors/qmagnetometer.h> |
11 | |
12 | class genericrotationsensor : public QSensorBackend, public QSensorFilter |
13 | { |
14 | public: |
15 | static char const * const id; |
16 | |
17 | genericrotationsensor(QSensor *sensor); |
18 | |
19 | void start() override; |
20 | void stop() override; |
21 | |
22 | bool filter(QSensorReading *reading) override; |
23 | |
24 | private: |
25 | QRotationReading m_reading; |
26 | QAccelerometer *accelerometer; |
27 | }; |
28 | |
29 | #endif |
30 | |
31 | |