From 3c5cee15b884d30f3547e1ca3613f1118aa6e787 Mon Sep 17 00:00:00 2001 From: Dmitry Kazakov Date: Wed, 12 Oct 2022 09:39:37 +0300 Subject: [PATCH] Move KisLightnessStrengthOptionData back into the standard data objects Originally I though it would need some baking functionality so put it into a separate file. Now this baking is implemented at the level of KisCurveOptionWidget, so the file is not needed anymore. --- plugins/paintops/libpaintop/CMakeLists.txt | 1 - .../KisLightnessStrengthOptionData.cpp | 13 ------------- .../KisLightnessStrengthOptionData.h | 19 ------------------- .../KisLightnessStrengthOptionWidget.cpp | 2 ++ .../KisLightnessStrengthOptionWidget.h | 4 +++- .../libpaintop/KisStandardOptionData.h | 12 ++++++++++++ .../paintops/libpaintop/KisStandardOptions.h | 1 - 7 files changed, 17 insertions(+), 35 deletions(-) delete mode 100644 plugins/paintops/libpaintop/KisLightnessStrengthOptionData.cpp delete mode 100644 plugins/paintops/libpaintop/KisLightnessStrengthOptionData.h diff --git a/plugins/paintops/libpaintop/CMakeLists.txt b/plugins/paintops/libpaintop/CMakeLists.txt index ab23ff7312c..1bf9658a42c 100644 --- a/plugins/paintops/libpaintop/CMakeLists.txt +++ b/plugins/paintops/libpaintop/CMakeLists.txt @@ -50,7 +50,6 @@ set(kritalibpaintop_LIB_SRCS KisColorSourceOptionData.cpp KisColorSourceOptionModel.cpp KisColorSourceOptionWidget.cpp - KisLightnessStrengthOptionData.cpp KisLightnessStrengthOptionWidget.cpp KisTextureOptionData.cpp KisEmbeddedTextureData.cpp diff --git a/plugins/paintops/libpaintop/KisLightnessStrengthOptionData.cpp b/plugins/paintops/libpaintop/KisLightnessStrengthOptionData.cpp deleted file mode 100644 index 66631b5fab0..00000000000 --- a/plugins/paintops/libpaintop/KisLightnessStrengthOptionData.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Dmitry Kazakov - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ -#include "KisLightnessStrengthOptionData.h" - -KisLightnessStrengthOptionData::KisLightnessStrengthOptionData(const QString &prefix) - : KisCurveOptionData( - KoID("LightnessStrength", i18n("Lightness Strength"))) -{ - this->prefix = prefix; -} diff --git a/plugins/paintops/libpaintop/KisLightnessStrengthOptionData.h b/plugins/paintops/libpaintop/KisLightnessStrengthOptionData.h deleted file mode 100644 index 2e983ba8818..00000000000 --- a/plugins/paintops/libpaintop/KisLightnessStrengthOptionData.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Dmitry Kazakov - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ -#ifndef KISLIGHTNESSSTRENGTHOPTIONDATA_H -#define KISLIGHTNESSSTRENGTHOPTIONDATA_H - -#include - -class PAINTOP_EXPORT KisLightnessStrengthOptionData : public KisCurveOptionData -{ -public: - KisLightnessStrengthOptionData(const QString &prefix = QString()); - - // TODO: bake stuff! -}; - -#endif // KISLIGHTNESSSTRENGTHOPTIONDATA_H diff --git a/plugins/paintops/libpaintop/KisLightnessStrengthOptionWidget.cpp b/plugins/paintops/libpaintop/KisLightnessStrengthOptionWidget.cpp index d31ea8cfb77..f638692d198 100644 --- a/plugins/paintops/libpaintop/KisLightnessStrengthOptionWidget.cpp +++ b/plugins/paintops/libpaintop/KisLightnessStrengthOptionWidget.cpp @@ -8,6 +8,8 @@ #include #include #include +#include + struct KisLightnessStrengthOptionWidget::Private { diff --git a/plugins/paintops/libpaintop/KisLightnessStrengthOptionWidget.h b/plugins/paintops/libpaintop/KisLightnessStrengthOptionWidget.h index 6f0398bf99c..a6c096f4516 100644 --- a/plugins/paintops/libpaintop/KisLightnessStrengthOptionWidget.h +++ b/plugins/paintops/libpaintop/KisLightnessStrengthOptionWidget.h @@ -7,7 +7,9 @@ #define KISLIGHTNESSSTRENGTHOPTIONWIDGET_H #include -#include + +class KisLightnessStrengthOptionData; + class PAINTOP_EXPORT KisLightnessStrengthOptionWidget : public KisCurveOptionWidget2 { diff --git a/plugins/paintops/libpaintop/KisStandardOptionData.h b/plugins/paintops/libpaintop/KisStandardOptionData.h index 7b9c8d0a0d3..3e55f1ba97c 100644 --- a/plugins/paintops/libpaintop/KisStandardOptionData.h +++ b/plugins/paintops/libpaintop/KisStandardOptionData.h @@ -131,6 +131,18 @@ class KisStrengthOptionData : public KisCurveOptionData {} }; +class KisLightnessStrengthOptionData : public KisCurveOptionData +{ +public: + KisLightnessStrengthOptionData(const QString &prefix = QString()) + : KisCurveOptionData( + KoID("LightnessStrength", i18n("Lightness Strength"))) + { + this->prefix = prefix; + } +}; + + class KisCurveOptionWidget2; namespace KisPaintOpOptionUtils { diff --git a/plugins/paintops/libpaintop/KisStandardOptions.h b/plugins/paintops/libpaintop/KisStandardOptions.h index acb50b5846c..9a650519c1f 100644 --- a/plugins/paintops/libpaintop/KisStandardOptions.h +++ b/plugins/paintops/libpaintop/KisStandardOptions.h @@ -11,7 +11,6 @@ #include #include -#include template class KisStandardOption : public KisCurveOption2