| 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 | namespace QtSensorsPrivate { |
| 13 | |
| 14 | class NetHadessSensorProxyInterface; |
| 15 | |
| 16 | } // namespace QtSensorsPrivate |
| 17 | |
| 18 | class IIOSensorProxyOrientationSensor : public IIOSensorProxySensorBase |
| 19 | { |
| 20 | Q_OBJECT |
| 21 | public: |
| 22 | static char const * const id; |
| 23 | |
| 24 | IIOSensorProxyOrientationSensor(QSensor *sensor); |
| 25 | ~IIOSensorProxyOrientationSensor(); |
| 26 | |
| 27 | void start() override; |
| 28 | void stop() override; |
| 29 | |
| 30 | protected: |
| 31 | void updateProperties(const QVariantMap &changedProperties) override; |
| 32 | |
| 33 | private: |
| 34 | void updateOrientation(const QString &orientation); |
| 35 | |
| 36 | QOrientationReading m_reading; |
| 37 | QtSensorsPrivate::NetHadessSensorProxyInterface *m_sensorProxyInterface; |
| 38 | }; |
| 39 | |
| 40 | #endif // IIOSENSORPROXY_ORIENTATIONSENSOR_H |
| 41 | |