Krita Source Code Documentation
Loading...
Searching...
No Matches
KisLightnessStrengthOptionWidget Class Reference

#include <KisLightnessStrengthOptionWidget.h>

+ Inheritance diagram for KisLightnessStrengthOptionWidget:

Classes

struct  Private
 

Public Types

using data_type = KisLightnessStrengthOptionData
 
- Public Types inherited from KisCurveOptionWidget
using data_type = KisCurveOptionDataCommon
 
enum  Flag { None = 0x0 , SupportsCommonCurve = 0x1 , SupportsCurveMode = 0x2 , UseFloatingPointStrength = 0x4 }
 
- Public Types inherited from KisPaintOpOption
using OptionalLodLimitationsReader = std::optional<lager::reader<KisPaintopLodLimitations>>
 
enum  PaintopCategory {
  GENERAL , COLOR , TEXTURE , FILTER ,
  MASKING_BRUSH
}
 

Public Member Functions

 KisLightnessStrengthOptionWidget (lager::cursor< KisLightnessStrengthOptionData > optionData, lager::reader< bool > lightnessModeEnabled)
 
 ~KisLightnessStrengthOptionWidget ()
 
- Public Member Functions inherited from KisCurveOptionWidget
bool isCheckable () const override
 
 KisCurveOptionWidget (lager::cursor< KisCurveOptionDataCommon > optionData, KisPaintOpOption::PaintopCategory category, const QString &curveMinLabel, const QString &curveMaxLabel, int curveMinValue, int curveMaxValue, const QString &curveValueSuffix, lager::reader< bool > enabledLink=lager::make_constant(true), std::optional< lager::reader< std::tuple< qreal, qreal > > > strengthRangeReader=std::nullopt)
 
 KisCurveOptionWidget (lager::cursor< KisCurveOptionDataCommon > optionData, KisPaintOpOption::PaintopCategory category, const QString &curveMinLabel, const QString &curveMaxLabel, lager::reader< bool > enabledLink=lager::make_constant(true), std::optional< lager::reader< std::tuple< qreal, qreal > > > strengthRangeReader=std::nullopt)
 
 KisCurveOptionWidget (lager::cursor< KisCurveOptionDataCommon > optionData, KisPaintOpOption::PaintopCategory category, lager::reader< bool > enabledLink=lager::make_constant(true), std::optional< lager::reader< std::tuple< qreal, qreal > > > strengthRangeReader=std::nullopt)
 
 KisCurveOptionWidget (lager::cursor< KisCurveOptionDataCommon > optionData, PaintopCategory category, const QString &curveMinLabel, const QString &curveMaxLabel, int curveMinValue, int curveMaxValue, const QString &curveValueSuffix, const QString &strengthPrefix, const QString &strengthSuffix, qreal strengthDisplayMultiplier, lager::reader< bool > enabledLink=lager::make_constant(true), std::optional< lager::reader< std::tuple< qreal, qreal > > > strengthRangeReader=std::nullopt)
 
void readOptionSetting (const KisPropertiesConfigurationSP setting) override
 
void show ()
 
void writeOptionSetting (KisPropertiesConfigurationSP setting) const override
 
 ~KisCurveOptionWidget () override
 
- Public Member Functions inherited from KisPaintOpOption
KisPaintOpOption::PaintopCategory category () const
 
QWidget * configurationPage () const
 
OptionalLodLimitationsReader effectiveLodLimitations () const
 
virtual bool isChecked () const
 
bool isEnabled () const
 
bool isLocked () const
 
 KisPaintOpOption (const QString &label, KisPaintOpOption::PaintopCategory category, bool checked)
 
 KisPaintOpOption (const QString &label, KisPaintOpOption::PaintopCategory category, lager::cursor< bool > checkedCursor)
 
 KisPaintOpOption (const QString &label, KisPaintOpOption::PaintopCategory category, lager::cursor< bool > checkedCursor, lager::reader< bool > externallyEnabledLink)
 
QString label () const
 
virtual void lodLimitations (KisPaintopLodLimitations *l) const
 
virtual void setCanvasResourcesInterface (KoCanvasResourcesInterfaceSP canvasResourcesInterface)
 
virtual void setChecked (bool checked)
 
virtual void setImage (KisImageWSP image)
 
void setLocked (bool value)
 
virtual void setNode (KisNodeWSP node)
 
virtual void setResourcesInterface (KisResourcesInterfaceSP resourcesInterface)
 
void startReadOptionSetting (const KisPropertiesConfigurationSP setting)
 
void startWriteOptionSetting (KisPropertiesConfigurationSP setting) const
 
 ~KisPaintOpOption () override
 

Private Attributes

const QScopedPointer< Privatem_d
 

Additional Inherited Members

- Signals inherited from KisPaintOpOption
void sigCheckedChanged (bool value)
 
void sigEnabledChanged (bool value)
 
void sigSettingChanged ()
 
- Protected Slots inherited from KisCurveOptionWidget
void changeCurveArchShape ()
 
void changeCurveJShape ()
 
void changeCurveLinear ()
 
void changeCurveLShape ()
 
void changeCurveReverseLinear ()
 
void changeCurveReverseSShape ()
 
void changeCurveSShape ()
 
void changeCurveUShape ()
 
void updateThemedIcons ()
 
- Protected Slots inherited from KisPaintOpOption
void emitCheckedChanged (bool checked)
 
void emitEnabledChanged (bool enabled)
 
void emitSettingChanged ()
 
- Protected Member Functions inherited from KisCurveOptionWidget
QWidget * curveWidget ()
 
 KisCurveOptionWidget (lager::cursor< KisCurveOptionDataCommon > optionData, KisPaintOpOption::PaintopCategory category, const QString &strengthPrefix, const QString &strengthSuffix, qreal strengthDisplayMultiplier, lager::reader< bool > enabledLink, std::optional< lager::reader< std::tuple< qreal, qreal > > > strengthRangeReader, KisCurveRangeModelFactory curveRangeModelFactory, KisCurveOptionInputControlsStrategyFactory inputControlsFactory, KisCurveOptionRangeControlsStrategyFactory rangeControlsFactory, Flags flags)
 
void setCurveWidgetsEnabled (bool value)
 
lager::cursor< qreal > strengthValueDenorm ()
 
- Protected Member Functions inherited from KisPaintOpOption
KoCanvasResourcesInterfaceSP canvasResourcesInterface () const
 
virtual OptionalLodLimitationsReader lodLimitationsReader () const
 
KisResourcesInterfaceSP resourcesInterface () const
 
void setConfigurationPage (QWidget *page)
 
- Protected Attributes inherited from KisCurveOptionWidget
QScopedPointer< KisCurveOptionInputControlsStrategyInterfacem_curveInputControlsStrategy
 
QComboBox * m_curveMode {nullptr}
 
Ui_WdgCurveOption2 * m_curveOptionWidget {nullptr}
 
QScopedPointer< KisCurveOptionRangeControlsStrategyInterfacem_curveRangeControlsStrategy
 
const QScopedPointer< Privatem_d
 
QWidget * m_widget {nullptr}
 
- Protected Attributes inherited from KisPaintOpOption
bool m_checkable {false}
 
bool m_locked {false}
 

Detailed Description

Definition at line 14 of file KisLightnessStrengthOptionWidget.h.

Member Typedef Documentation

◆ data_type

Constructor & Destructor Documentation

◆ KisLightnessStrengthOptionWidget()

KisLightnessStrengthOptionWidget::KisLightnessStrengthOptionWidget ( lager::cursor< KisLightnessStrengthOptionData > optionData,
lager::reader< bool > lightnessModeEnabled )

Definition at line 24 of file KisLightnessStrengthOptionWidget.cpp.

25 : KisCurveOptionWidget(optionData.zoom(kislager::lenses::to_base<KisCurveOptionDataCommon>), KisPaintOpOption::GENERAL, lightnessModeEnabled)
26 , m_d(new Private(lightnessModeEnabled))
27{
28 QWidget* page = new QWidget;
29
30 QLabel *enabledLabel = new QLabel(i18n("Disabled: brush must be in Lightness mode for this option to apply"), page);
31 enabledLabel->setEnabled(true);
32 enabledLabel->setAlignment(Qt::AlignHCenter);
33
34 QVBoxLayout* pageLayout = new QVBoxLayout(page);
35 pageLayout->setContentsMargins(0, 0, 0, 0);
36 pageLayout->addWidget(enabledLabel);
37 pageLayout->addWidget(configurationPage());
38
39 m_d->warningLabelVisible.bind(std::bind(&QWidget::setVisible, enabledLabel, std::placeholders::_1));
40
42}
KisCurveOptionWidget(lager::cursor< KisCurveOptionDataCommon > optionData, KisPaintOpOption::PaintopCategory category, lager::reader< bool > enabledLink=lager::make_constant(true), std::optional< lager::reader< std::tuple< qreal, qreal > > > strengthRangeReader=std::nullopt)
void setConfigurationPage(QWidget *page)
QWidget * configurationPage() const

References KisPaintOpOption::configurationPage(), m_d, and KisPaintOpOption::setConfigurationPage().

◆ ~KisLightnessStrengthOptionWidget()

KisLightnessStrengthOptionWidget::~KisLightnessStrengthOptionWidget ( )

Definition at line 44 of file KisLightnessStrengthOptionWidget.cpp.

45{
46}

Member Data Documentation

◆ m_d

const QScopedPointer<Private> KisLightnessStrengthOptionWidget::m_d
private

Definition at line 25 of file KisLightnessStrengthOptionWidget.h.


The documentation for this class was generated from the following files: