File indexing completed on 2024-06-23 04:27:52
0001 /* 0002 * SPDX-FileCopyrightText: 2022 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KISSENSORPACKINTERFACE_H 0008 #define KISSENSORPACKINTERFACE_H 0009 0010 #include "kritapaintop_export.h" 0011 #include <QSharedData> 0012 0013 struct KisSensorData; 0014 struct KisCurveOptionDataCommon; 0015 class KisPropertiesConfiguration; 0016 0017 class PAINTOP_EXPORT KisSensorPackInterface : public QSharedData 0018 { 0019 public: 0020 virtual ~KisSensorPackInterface(); 0021 0022 virtual KisSensorPackInterface * clone() const = 0; 0023 0024 virtual std::vector<const KisSensorData *> constSensors() const = 0; 0025 virtual std::vector<KisSensorData *> sensors() = 0; 0026 0027 virtual bool compare(const KisSensorPackInterface *rhs) const = 0; 0028 virtual bool read(KisCurveOptionDataCommon &data, const KisPropertiesConfiguration *setting) const = 0; 0029 virtual void write(const KisCurveOptionDataCommon &data, KisPropertiesConfiguration *setting) const = 0; 0030 virtual int calcActiveSensorLength(const QString &activeSensorId) const; 0031 }; 0032 0033 template<> 0034 inline KisSensorPackInterface* QSharedDataPointer<KisSensorPackInterface>::clone() 0035 { 0036 return d->clone(); 0037 } 0038 0039 #endif // KISSENSORPACKINTERFACE_H