File indexing completed on 2025-01-26 04:11:27

0001 /*
0002  *  SPDX-FileCopyrightText: 2022 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef KISHSVOPTION_H
0007 #define KISHSVOPTION_H
0008 
0009 #include <KisCurveOption.h>
0010 
0011 class KoColorTransformation;
0012 struct KisHSVOptionData;
0013 
0014 
0015 class PAINTOP_EXPORT KisHSVOption : public KisCurveOption
0016 {
0017 public:
0018     static KisHSVOption* createHueOption(const KisPropertiesConfiguration *setting);
0019     static KisHSVOption* createSaturationOption(const KisPropertiesConfiguration *setting);
0020     static KisHSVOption* createValueOption(const KisPropertiesConfiguration *setting);
0021 
0022     void apply(KoColorTransformation* transfo, const KisPaintInformation& info) const;
0023 
0024 private:
0025     KisHSVOption(const KisCurveOptionData &data);
0026 
0027     template<typename Data>
0028     static Data initializeData(const KisPropertiesConfiguration *setting);
0029 
0030 private:
0031     KoID m_id;
0032     mutable int m_paramId {-1};
0033 };
0034 
0035 #endif // KISHSVOPTION_H