1 /* 2 * Copyright (c) 2006 Cyrille Berger <cberger@cberger.net> 3 * 4 * This library is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License as published by 6 * the Free Software Foundation; version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef _KIS_DYNAMIC_SENSOR_TIME_H_ 20 #define _KIS_DYNAMIC_SENSOR_TIME_H_ 21 22 #include "kis_dynamic_sensor.h" 23 // 24 class KisDynamicSensorTime : public QObject, public KisDynamicSensor 25 { 26 Q_OBJECT 27 public: 28 using KisSerializableConfiguration::fromXML; 29 using KisSerializableConfiguration::toXML; 30 31 32 KisDynamicSensorTime(); ~KisDynamicSensorTime()33 ~KisDynamicSensorTime() override { } 34 qreal value(const KisPaintInformation&) override; 35 void reset() override; 36 QWidget* createConfigurationWidget(QWidget* parent, QWidget*) override; 37 public Q_SLOTS: 38 virtual void setPeriodic(bool periodic); 39 virtual void setLength(qreal length); 40 41 42 void toXML(QDomDocument&, QDomElement&) const override; 43 void fromXML(const QDomElement&) override; 44 private: 45 bool m_periodic; 46 }; 47 48 #endif 49