File indexing completed on 2024-05-12 15:59:35
0001 /* 0002 * SPDX-FileCopyrightText: 2007 Cyrille Berger <cberger@cberger.net> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #ifndef _KO_COLOR_TRANSFORMATION_FACTORY_H_ 0008 #define _KO_COLOR_TRANSFORMATION_FACTORY_H_ 0009 0010 #include <QHash> 0011 #include <QVariant> 0012 #include <QList> 0013 #include <QPair> 0014 #include <QString> 0015 0016 class KoColorTransformation; 0017 class KoColorSpace; 0018 class KoID; 0019 0020 #include "kritapigment_export.h" 0021 0022 /** 0023 * Allow to extend the number of color transformation of a 0024 * colorspace. 0025 */ 0026 class KRITAPIGMENT_EXPORT KoColorTransformationFactory 0027 { 0028 public: 0029 explicit KoColorTransformationFactory(const QString &id); 0030 virtual ~KoColorTransformationFactory(); 0031 public: 0032 QString id() const; 0033 public: 0034 /** 0035 * @return an empty list if the factory support all type of colorspaces models. 0036 */ 0037 virtual QList< QPair< KoID, KoID > > supportedModels() const = 0; 0038 virtual KoColorTransformation* createTransformation(const KoColorSpace* colorSpace, QHash<QString, QVariant> parameters) const = 0; 0039 private: 0040 struct Private; 0041 Private* const d; 0042 }; 0043 0044 #endif