blob: c2f322a76c49120e4cd72790348ae407738cebc0 (
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
|
// 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 GENERICORIENTATIONSENSOR_H
#define GENERICORIENTATIONSENSOR_H
#include <QtSensors/qsensorbackend.h>
#include <QtSensors/qorientationsensor.h>
#include <QtSensors/qaccelerometer.h>
class genericorientationsensor : public QSensorBackend, public QAccelerometerFilter
{
public:
static char const * const id;
genericorientationsensor(QSensor *sensor);
void start() override;
void stop() override;
bool filter(QAccelerometerReading *reading) override;
private:
QOrientationReading m_reading;
QAccelerometer *accelerometer;
};
#endif
|