File indexing completed on 2024-04-28 11:24:44
0001 /* 0002 SPDX-FileCopyrightText: 2015 Jasem Mutlaq <mutlaqja@ikarustech.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "indidustcap.h" 0010 #include "indistd.h" 0011 0012 namespace ISD 0013 { 0014 /** 0015 * @class LightBox 0016 * Handles operation of a remotely controlled light box. 0017 * 0018 * @author Jasem Mutlaq 0019 */ 0020 class LightBox : public ConcreteDevice 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 explicit LightBox(GenericDevice *parent) : ConcreteDevice(parent) {} 0026 0027 Q_SCRIPTABLE virtual bool isLightOn(); 0028 0029 public slots: 0030 /** 0031 * @brief SetBrightness Set light box brightness levels if dimmable. 0032 * @param val Value of brightness level. 0033 * @return True if operation is successful, false otherwise. 0034 */ 0035 Q_SCRIPTABLE bool setBrightness(uint16_t val); 0036 0037 /** 0038 * @brief SetLightEnabled Turn on/off light 0039 * @param enable true to turn on, false to turn off 0040 * @return True if operation is successful, false otherwise. 0041 */ 0042 Q_SCRIPTABLE bool setLightEnabled(bool enable); 0043 }; 0044 }