1 | // Copyright (C) 2016 Alexander Volkov <a.volkov@rusbitech.ru> |
2 | // Copyright (C) 2016 The Qt Company Ltd. |
3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
4 | |
5 | #ifndef IIOSENSORPROXY_ORIENTATIONSENSOR_H |
6 | #define IIOSENSORPROXY_ORIENTATIONSENSOR_H |
7 | |
8 | #include "iiosensorproxysensorbase.h" |
9 | |
10 | #include <qorientationsensor.h> |
11 | |
12 | class NetHadessSensorProxyInterface; |
13 | |
14 | class IIOSensorProxyOrientationSensor : public IIOSensorProxySensorBase |
15 | { |
16 | Q_OBJECT |
17 | public: |
18 | static char const * const id; |
19 | |
20 | IIOSensorProxyOrientationSensor(QSensor *sensor); |
21 | ~IIOSensorProxyOrientationSensor(); |
22 | |
23 | void start() override; |
24 | void stop() override; |
25 | |
26 | protected: |
27 | void updateProperties(const QVariantMap &changedProperties) override; |
28 | |
29 | private: |
30 | void updateOrientation(const QString &orientation); |
31 | |
32 | QOrientationReading m_reading; |
33 | NetHadessSensorProxyInterface *m_sensorProxyInterface; |
34 | }; |
35 | |
36 | #endif // IIOSENSORPROXY_ORIENTATIONSENSOR_H |
37 | |