diff --git a/libs/image/brushengine/kis_callback_based_paintop_property.h b/libs/image/brushengine/kis_callback_based_paintop_property.h index 460c4cf58b..3c963bcc41 100644 --- a/libs/image/brushengine/kis_callback_based_paintop_property.h +++ b/libs/image/brushengine/kis_callback_based_paintop_property.h @@ -1,60 +1,57 @@ /* * Copyright (c) 2016 Dmitry Kazakov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __KIS_CALLBACK_BASED_PAINTOP_PROPERTY_H #define __KIS_CALLBACK_BASED_PAINTOP_PROPERTY_H #include - template -class KisCallbackBasedPaintopProperty : public ParentClass +class KRITAIMAGE_EXPORT KisCallbackBasedPaintopProperty : public ParentClass { public: KisCallbackBasedPaintopProperty(typename ParentClass::Type type, const QString &id, const QString &name, KisPaintOpSettingsRestrictedSP settings, - QObject *parent) - : ParentClass(type, id, name, settings, parent) {} + QObject *parent); KisCallbackBasedPaintopProperty(const QString &id, const QString &name, KisPaintOpSettingsRestrictedSP settings, - QObject *parent) - : ParentClass(id, name, settings, parent) {} + QObject *parent); typedef std::function Callback; typedef std::function VisibleCallback; - void setReadCallback(Callback func) { m_readFunc = func; } - void setWriteCallback(Callback func) { m_writeFunc = func; } - void setIsVisibleCallback(VisibleCallback func) { m_visibleFunc = func; } + void setReadCallback(Callback func); + void setWriteCallback(Callback func); + void setIsVisibleCallback(VisibleCallback func); protected: - void readValueImpl() override { if (m_readFunc) m_readFunc(this); } - void writeValueImpl() override { if (m_writeFunc) m_writeFunc(this); } - bool isVisible() const override { return m_visibleFunc ? m_visibleFunc(this) : true; } + void readValueImpl() override; + void writeValueImpl() override; + bool isVisible() const override; private: Callback m_readFunc; Callback m_writeFunc; VisibleCallback m_visibleFunc; }; #endif /* __KIS_CALLBACK_BASED_PAINTOP_PROPERTY_H */ diff --git a/libs/image/brushengine/kis_callback_based_paintop_property_impl.h b/libs/image/brushengine/kis_callback_based_paintop_property_impl.h new file mode 100644 index 0000000000..6bd3b2e8da --- /dev/null +++ b/libs/image/brushengine/kis_callback_based_paintop_property_impl.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2016 Dmitry Kazakov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __KIS_CALLBACK_BASED_PAINTOP_PROPERTY_IMPL_H +#define __KIS_CALLBACK_BASED_PAINTOP_PROPERTY_IMPL_H + +#include + +template +KisCallbackBasedPaintopProperty::KisCallbackBasedPaintopProperty(typename ParentClass::Type type, + const QString &id, + const QString &name, + KisPaintOpSettingsRestrictedSP settings, + QObject *parent) + : ParentClass(type, id, name, settings, parent) +{ +} + +template +KisCallbackBasedPaintopProperty::KisCallbackBasedPaintopProperty(const QString &id, + const QString &name, + KisPaintOpSettingsRestrictedSP settings, + QObject *parent) + : ParentClass(id, name, settings, parent) +{ +} + +template +void KisCallbackBasedPaintopProperty::setReadCallback(Callback func) +{ + m_readFunc = func; +} + +template +void KisCallbackBasedPaintopProperty::setWriteCallback(Callback func) +{ + m_writeFunc = func; +} + +template +void KisCallbackBasedPaintopProperty::setIsVisibleCallback(VisibleCallback func) +{ + m_visibleFunc = func; +} + +template +void KisCallbackBasedPaintopProperty::readValueImpl() +{ + if (m_readFunc) m_readFunc(this); +} + +template +void KisCallbackBasedPaintopProperty::writeValueImpl() +{ + if (m_writeFunc) m_writeFunc(this); +} + +template +bool KisCallbackBasedPaintopProperty::isVisible() const +{ + return m_visibleFunc ? m_visibleFunc(this) : true; +} + +#endif /* __KIS_CALLBACK_BASED_PAINTOP_PROPERTY_IMPL_H */ diff --git a/libs/image/brushengine/kis_combo_based_paintop_property.cpp b/libs/image/brushengine/kis_combo_based_paintop_property.cpp index 0be5984886..33ed1aa75b 100644 --- a/libs/image/brushengine/kis_combo_based_paintop_property.cpp +++ b/libs/image/brushengine/kis_combo_based_paintop_property.cpp @@ -1,75 +1,76 @@ /* * Copyright (c) 2016 Dmitry Kazakov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "kis_combo_based_paintop_property.h" #include "kis_paintop_settings.h" #include "QIcon" struct KisComboBasedPaintOpProperty::Private { QList items; QList icons; }; KisComboBasedPaintOpProperty::KisComboBasedPaintOpProperty(const QString &id, const QString &name, KisPaintOpSettingsRestrictedSP settings, QObject *parent) : KisUniformPaintOpProperty(Combo, id, name, settings, parent), m_d(new Private) { } KisComboBasedPaintOpProperty::KisComboBasedPaintOpProperty(Type type, const QString &id, const QString &name, KisPaintOpSettingsRestrictedSP settings, QObject *parent) : KisUniformPaintOpProperty(Combo, id, name, settings, parent), m_d(new Private) { KIS_ASSERT_RECOVER_RETURN(type == Combo); } KisComboBasedPaintOpProperty::~KisComboBasedPaintOpProperty() { } QList KisComboBasedPaintOpProperty::items() const { return m_d->items; } void KisComboBasedPaintOpProperty::setItems(const QList &list) { m_d->items = list; } QList KisComboBasedPaintOpProperty::icons() const { return m_d->icons; } void KisComboBasedPaintOpProperty::setIcons(const QList &list) { m_d->icons = list; } +#include "kis_callback_based_paintop_property_impl.h" template class KisCallbackBasedPaintopProperty; diff --git a/libs/image/brushengine/kis_combo_based_paintop_property.h b/libs/image/brushengine/kis_combo_based_paintop_property.h index 71434fba2a..a94341e44c 100644 --- a/libs/image/brushengine/kis_combo_based_paintop_property.h +++ b/libs/image/brushengine/kis_combo_based_paintop_property.h @@ -1,62 +1,62 @@ /* * Copyright (c) 2016 Dmitry Kazakov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __KIS_COMBO_BASED_PAINTOP_PROPERTY_H #define __KIS_COMBO_BASED_PAINTOP_PROPERTY_H #include #include "kis_uniform_paintop_property.h" #include "kis_types.h" #include "kritaimage_export.h" class QIcon; class KRITAIMAGE_EXPORT KisComboBasedPaintOpProperty : public KisUniformPaintOpProperty { public: KisComboBasedPaintOpProperty(const QString &id, const QString &name, KisPaintOpSettingsRestrictedSP settings, QObject *parent); ~KisComboBasedPaintOpProperty() override; // callback-compatible c-tor KisComboBasedPaintOpProperty(Type type, const QString &id, const QString &name, KisPaintOpSettingsRestrictedSP settings, QObject *parent); QList items() const; void setItems(const QList &list); QList icons() const; void setIcons(const QList &list); private: struct Private; const QScopedPointer m_d; }; #include "kis_callback_based_paintop_property.h" -extern template class KRITAIMAGE_EXPORT KisCallbackBasedPaintopProperty; +extern template class KisCallbackBasedPaintopProperty; typedef KisCallbackBasedPaintopProperty KisComboBasedPaintOpPropertyCallback; #endif /* __KIS_COMBO_BASED_PAINTOP_PROPERTY_H */ diff --git a/libs/image/brushengine/kis_slider_based_paintop_property.cpp b/libs/image/brushengine/kis_slider_based_paintop_property.cpp index 90b4ea8a91..2a926ae372 100644 --- a/libs/image/brushengine/kis_slider_based_paintop_property.cpp +++ b/libs/image/brushengine/kis_slider_based_paintop_property.cpp @@ -1,27 +1,142 @@ /* * Copyright (c) 2016 Dmitry Kazakov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "kis_slider_based_paintop_property.h" #include "kis_paintop_settings.h" + +template +KisSliderBasedPaintOpProperty::KisSliderBasedPaintOpProperty(Type type, + const QString &id, + const QString &name, + KisPaintOpSettingsRestrictedSP settings, + QObject *parent) + : KisUniformPaintOpProperty(type, id, name, settings, parent), + m_min(T(0)), + m_max(T(100)), + m_singleStep(T(1)), + m_pageStep(T(10)), + m_exponentRatio(1.0), + m_decimals(2) +{ +} + +template +KisSliderBasedPaintOpProperty::KisSliderBasedPaintOpProperty(const QString &id, + const QString &name, + KisPaintOpSettingsRestrictedSP settings, + QObject *parent) + : KisUniformPaintOpProperty(Int, id, name, settings, parent), + m_min(T(0)), + m_max(T(100)), + m_singleStep(T(1)), + m_pageStep(T(10)), + m_exponentRatio(1.0), + m_decimals(2) +{ + qFatal("Should have never been called!"); +} + +template +T KisSliderBasedPaintOpProperty::min() const +{ + return m_min; +} + +template +T KisSliderBasedPaintOpProperty::max() const +{ + return m_max; +} + +template +void KisSliderBasedPaintOpProperty::setRange(T min, T max) +{ + m_min = min; + m_max = max; +} + +template +T KisSliderBasedPaintOpProperty::singleStep() const +{ + return m_singleStep; +} + +template +void KisSliderBasedPaintOpProperty::setSingleStep(T value) +{ + m_singleStep = value; +} + +template +T KisSliderBasedPaintOpProperty::pageStep() const +{ + return m_pageStep; +} + +template +void KisSliderBasedPaintOpProperty::setPageStep(T value) +{ + m_pageStep = value; +} + +template +qreal KisSliderBasedPaintOpProperty::exponentRatio() const +{ + return m_exponentRatio; +} + +template +void KisSliderBasedPaintOpProperty::setExponentRatio(qreal value) +{ + m_exponentRatio = value; +} + +template +int KisSliderBasedPaintOpProperty::decimals() const +{ + return m_decimals; +} + +template +void KisSliderBasedPaintOpProperty::setDecimals(int value) +{ + m_decimals = value; +} + +template +QString KisSliderBasedPaintOpProperty::suffix() const +{ + return m_suffix; +} + +template +void KisSliderBasedPaintOpProperty::setSuffix(QString value) +{ + m_suffix = value; +} + + +#include "kis_callback_based_paintop_property_impl.h" + template class KisSliderBasedPaintOpProperty; template class KisSliderBasedPaintOpProperty; template class KisCallbackBasedPaintopProperty>; template class KisCallbackBasedPaintopProperty>; diff --git a/libs/image/brushengine/kis_slider_based_paintop_property.h b/libs/image/brushengine/kis_slider_based_paintop_property.h index dd6456d76c..debc74f086 100644 --- a/libs/image/brushengine/kis_slider_based_paintop_property.h +++ b/libs/image/brushengine/kis_slider_based_paintop_property.h @@ -1,143 +1,95 @@ /* * Copyright (c) 2016 Dmitry Kazakov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __KIS_SLIDER_BASED_PAINTOP_PROPERTY_H #define __KIS_SLIDER_BASED_PAINTOP_PROPERTY_H #include "kis_uniform_paintop_property.h" /** * This is a general class for the properties that can be represented * in the GUI as an integer or double slider. The GUI representation * creates a slider and connects it to this property using all the * information contained in it. * * Methods of this property basically copy the methods of * Kis{,Double}SliderSpinbox */ template -class KisSliderBasedPaintOpProperty : public KisUniformPaintOpProperty +class KRITAIMAGE_EXPORT KisSliderBasedPaintOpProperty : public KisUniformPaintOpProperty { public: KisSliderBasedPaintOpProperty(Type type, const QString &id, const QString &name, KisPaintOpSettingsRestrictedSP settings, - QObject *parent) - : KisUniformPaintOpProperty(type, id, name, settings, parent), - m_min(T(0)), - m_max(T(100)), - m_singleStep(T(1)), - m_pageStep(T(10)), - m_exponentRatio(1.0), - m_decimals(2) - { - } + QObject *parent); KisSliderBasedPaintOpProperty(const QString &id, const QString &name, KisPaintOpSettingsRestrictedSP settings, - QObject *parent) - : KisUniformPaintOpProperty(Int, id, name, settings, parent), - m_min(T(0)), - m_max(T(100)), - m_singleStep(T(1)), - m_pageStep(T(10)), - m_exponentRatio(1.0), - m_decimals(2) - { - qFatal("Should have never been called!"); - } - - T min() const { - return m_min; - } - T max() const { - return m_max; - } - void setRange(T min, T max) { - m_min = min; - m_max = max; - } - - T singleStep() const { - return m_singleStep; - } - void setSingleStep(T value) { - m_singleStep = value; - } - - T pageStep() const { - return m_pageStep; - } - void setPageStep(T value) { - m_pageStep = value; - } - - qreal exponentRatio() const { - return m_exponentRatio; - } - void setExponentRatio(qreal value) { - m_exponentRatio = value; - } - - int decimals() const { - return m_decimals; - } - void setDecimals(int value) { - m_decimals = value; - } - - QString suffix() const { - return m_suffix; - } - void setSuffix(QString value) { - m_suffix = value; - } + QObject *parent); + T min() const; + T max() const; + void setRange(T min, T max); + + T singleStep() const; + void setSingleStep(T value); + T pageStep() const; + void setPageStep(T value); + + qreal exponentRatio() const; + void setExponentRatio(qreal value); + int decimals() const; + void setDecimals(int value); + + QString suffix() const; + void setSuffix(QString value); + private: T m_min; T m_max; T m_singleStep; T m_pageStep; qreal m_exponentRatio; int m_decimals; QString m_suffix; }; #include "kis_callback_based_paintop_property.h" -extern template class KRITAIMAGE_EXPORT KisSliderBasedPaintOpProperty; -extern template class KRITAIMAGE_EXPORT KisSliderBasedPaintOpProperty; -extern template class KRITAIMAGE_EXPORT KisCallbackBasedPaintopProperty>; -extern template class KRITAIMAGE_EXPORT KisCallbackBasedPaintopProperty>; +extern template class KisSliderBasedPaintOpProperty; +extern template class KisSliderBasedPaintOpProperty; +extern template class KisCallbackBasedPaintopProperty>; +extern template class KisCallbackBasedPaintopProperty>; typedef KisSliderBasedPaintOpProperty KisIntSliderBasedPaintOpProperty; typedef KisSliderBasedPaintOpProperty KisDoubleSliderBasedPaintOpProperty; typedef KisCallbackBasedPaintopProperty> KisIntSliderBasedPaintOpPropertyCallback; typedef KisCallbackBasedPaintopProperty> KisDoubleSliderBasedPaintOpPropertyCallback; #endif /* __KIS_SLIDER_BASED_PAINTOP_PROPERTY_H */ diff --git a/libs/image/brushengine/kis_uniform_paintop_property.cpp b/libs/image/brushengine/kis_uniform_paintop_property.cpp index 4387c906c5..50efa9a5ab 100644 --- a/libs/image/brushengine/kis_uniform_paintop_property.cpp +++ b/libs/image/brushengine/kis_uniform_paintop_property.cpp @@ -1,139 +1,140 @@ /* * Copyright (c) 2016 Dmitry Kazakov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "kis_uniform_paintop_property.h" #include #include "kis_debug.h" #include "kis_paintop_settings.h" struct KisUniformPaintOpProperty::Private { Private(Type _type, const QString &_id, const QString &_name, KisPaintOpSettingsSP _settings) : type(_type), id(_id), name(_name), settings(_settings), isReadingValue(false), isWritingValue(false) {} Type type; QString id; QString name; QVariant value; KisPaintOpSettingsSP settings; bool isReadingValue; bool isWritingValue; }; KisUniformPaintOpProperty::KisUniformPaintOpProperty(Type type, const QString &id, const QString &name, KisPaintOpSettingsRestrictedSP settings, QObject *parent) : QObject(parent), m_d(new Private(type, id, name, settings)) { } KisUniformPaintOpProperty::KisUniformPaintOpProperty(const QString &id, const QString &name, KisPaintOpSettingsRestrictedSP settings, QObject *parent) : QObject(parent), m_d(new Private(Bool, id, name, settings)) { } KisUniformPaintOpProperty::~KisUniformPaintOpProperty() { } QString KisUniformPaintOpProperty::id() const { return m_d->id; } QString KisUniformPaintOpProperty::name() const { return m_d->name; } KisUniformPaintOpProperty::Type KisUniformPaintOpProperty::type() const { return m_d->type; } QVariant KisUniformPaintOpProperty::value() const { return m_d->value; } QWidget *KisUniformPaintOpProperty::createPropertyWidget() { return 0; } void KisUniformPaintOpProperty::setValue(const QVariant &value) { if (m_d->value == value) return; m_d->value = value; emit valueChanged(value); if (!m_d->isReadingValue) { m_d->isWritingValue = true; writeValueImpl(); m_d->isWritingValue = false; } } void KisUniformPaintOpProperty::requestReadValue() { if (m_d->isWritingValue) return; m_d->isReadingValue = true; readValueImpl(); m_d->isReadingValue = false; } KisPaintOpSettingsSP KisUniformPaintOpProperty::settings() const { // correct conversion weak-to-strong shared pointer return m_d->settings ? m_d->settings : KisPaintOpSettingsSP(); } bool KisUniformPaintOpProperty::isVisible() const { return true; } void KisUniformPaintOpProperty::readValueImpl() { } void KisUniformPaintOpProperty::writeValueImpl() { } +#include "kis_callback_based_paintop_property_impl.h" template class KisCallbackBasedPaintopProperty; diff --git a/libs/ui/brushhud/kis_uniform_paintop_property_widget.h b/libs/ui/brushhud/kis_uniform_paintop_property_widget.h index bacbaa04e3..92303e34d8 100644 --- a/libs/ui/brushhud/kis_uniform_paintop_property_widget.h +++ b/libs/ui/brushhud/kis_uniform_paintop_property_widget.h @@ -1,119 +1,115 @@ /* * Copyright (c) 2016 Dmitry Kazakov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __KIS_UNIFORM_PAINTOP_PROPERTY_WIDGET_H #define __KIS_UNIFORM_PAINTOP_PROPERTY_WIDGET_H #include #include #include "kis_uniform_paintop_property.h" class KisUniformPaintOpPropertyWidget : public QWidget { Q_OBJECT public: KisUniformPaintOpPropertyWidget(KisUniformPaintOpPropertySP property, QWidget *parent); ~KisUniformPaintOpPropertyWidget() override; protected: KisUniformPaintOpPropertySP property() const; protected Q_SLOTS: virtual void setValue(const QVariant &value) = 0; Q_SIGNALS: void valueChanged(const QVariant &value); private: struct Private; const QScopedPointer m_d; }; class KisSliderSpinBox; class KisDoubleSliderSpinBox; class QCheckBox; -template class KisSliderBasedPaintOpProperty; -typedef KisSliderBasedPaintOpProperty KisIntSliderBasedPaintOpProperty; -typedef KisSliderBasedPaintOpProperty KisDoubleSliderBasedPaintOpProperty; - class KisUniformPaintOpPropertyIntSlider : public KisUniformPaintOpPropertyWidget { Q_OBJECT public: KisUniformPaintOpPropertyIntSlider(KisUniformPaintOpPropertySP property, QWidget *parent); void setValue(const QVariant &value) override; private Q_SLOTS: void slotSliderChanged(int value); private: KisSliderSpinBox *m_slider; }; class KisUniformPaintOpPropertyDoubleSlider : public KisUniformPaintOpPropertyWidget { Q_OBJECT public: KisUniformPaintOpPropertyDoubleSlider(KisUniformPaintOpPropertySP property, QWidget *parent); void setValue(const QVariant &value) override; private Q_SLOTS: void slotSliderChanged(qreal value); private: KisDoubleSliderSpinBox *m_slider; }; class KisUniformPaintOpPropertyCheckBox : public KisUniformPaintOpPropertyWidget { Q_OBJECT public: KisUniformPaintOpPropertyCheckBox(KisUniformPaintOpPropertySP property, QWidget *parent); void setValue(const QVariant &value) override; private Q_SLOTS: void slotCheckBoxChanged(bool value); private: QCheckBox *m_checkBox; }; class QComboBox; class KisUniformPaintOpPropertyComboBox : public KisUniformPaintOpPropertyWidget { Q_OBJECT public: KisUniformPaintOpPropertyComboBox(KisUniformPaintOpPropertySP property, QWidget *parent); void setValue(const QVariant &value) override; private Q_SLOTS: void slotComboBoxChanged(int value); private: QComboBox *m_comboBox; }; #endif /* __KIS_UNIFORM_PAINTOP_PROPERTY_WIDGET_H */