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 GENERICORIENTATIONSENSOR_H
5#define GENERICORIENTATIONSENSOR_H
6
7#include <QtSensors/qsensorbackend.h>
8#include <QtSensors/qorientationsensor.h>
9#include <QtSensors/qaccelerometer.h>
10
11class genericorientationsensor : public QSensorBackend, public QAccelerometerFilter
12{
13public:
14 static char const * const id;
15
16 genericorientationsensor(QSensor *sensor);
17
18 void start() override;
19 void stop() override;
20
21 bool filter(QAccelerometerReading *reading) override;
22
23private:
24 QOrientationReading m_reading;
25 QAccelerometer *accelerometer;
26};
27
28#endif
29
30

source code of qtsensors/src/plugins/sensors/generic/genericorientationsensor.h