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