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

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