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

source code of qtsensors/src/plugins/sensors/iio-sensor-proxy/iiosensorproxylightsensor.h