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_LIGHTSENSOR_H |
6 | #define IIOSENSORPROXY_LIGHTSENSOR_H |
7 | |
8 | #include "iiosensorproxysensorbase.h" |
9 | |
10 | #include <qlightsensor.h> |
11 | |
12 | class NetHadessSensorProxyInterface; |
13 | |
14 | class IIOSensorProxyLightSensor : public IIOSensorProxySensorBase |
15 | { |
16 | Q_OBJECT |
17 | public: |
18 | static char const * const id; |
19 | |
20 | IIOSensorProxyLightSensor(QSensor *sensor); |
21 | ~IIOSensorProxyLightSensor(); |
22 | |
23 | void start() override; |
24 | void stop() override; |
25 | |
26 | protected: |
27 | void updateProperties(const QVariantMap &changedProperties) override; |
28 | |
29 | private: |
30 | void updateLightLevel(double lux); |
31 | |
32 | QLightReading m_reading; |
33 | NetHadessSensorProxyInterface *m_sensorProxyInterface; |
34 | }; |
35 | |
36 | #endif // IIOSENSORPROXY_LIGHTSENSOR_H |
37 | |