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

#include <KisCurveOptionWidget.h>

+ Inheritance diagram for KisCurveOptionWidget:

Classes

struct  Private
 

Public Types

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

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
 

Protected Slots

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

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

QScopedPointer< KisCurveOptionInputControlsStrategyInterface > m_curveInputControlsStrategy
 
QComboBox * m_curveMode {nullptr}
 
Ui_WdgCurveOption2 * m_curveOptionWidget {nullptr}
 
QScopedPointer< KisCurveOptionRangeControlsStrategyInterface > m_curveRangeControlsStrategy
 
const QScopedPointer< Private > m_d
 
QWidget * m_widget {nullptr}
 
- Protected Attributes inherited from KisPaintOpOption
bool m_checkable {false}
 
bool m_locked {false}
 

Additional Inherited Members

- Signals inherited from KisPaintOpOption
void sigCheckedChanged (bool value)
 
void sigEnabledChanged (bool value)
 
void sigSettingChanged ()
 

Detailed Description

Definition at line 23 of file KisCurveOptionWidget.h.

Member Typedef Documentation

◆ data_type

Member Enumeration Documentation

◆ Flag

Enumerator
None 
SupportsCommonCurve 
SupportsCurveMode 
UseFloatingPointStrength 

Definition at line 27 of file KisCurveOptionWidget.h.

Constructor & Destructor Documentation

◆ KisCurveOptionWidget() [1/5]

KisCurveOptionWidget::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 )

Definition at line 41 of file KisCurveOptionWidget.cpp.

45 : KisCurveOptionWidget(optionData,
47 i18n("0%"), i18n("100%"),
48 enabledLink,
49 strengthRangeReader)
50{
51}
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)
KisPaintOpOption::PaintopCategory category() const

◆ KisCurveOptionWidget() [2/5]

KisCurveOptionWidget::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 )

Definition at line 53 of file KisCurveOptionWidget.cpp.

58 : KisCurveOptionWidget(optionData,
60 curveMinLabel, curveMaxLabel,
61 0, 100, i18n("%"),
62 enabledLink,
63 strengthRangeReader)
64{
65
66}

◆ KisCurveOptionWidget() [3/5]

KisCurveOptionWidget::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 )

Definition at line 68 of file KisCurveOptionWidget.cpp.

74 : KisCurveOptionWidget(optionData,
76 curveMinLabel, curveMaxLabel,
77 curveMinValue, curveMaxValue, curveValueSuffix,
78 i18n("Strength: "), i18n("%"), 100.0,
79 enabledLink,
80 strengthRangeReader)
81{
82}

◆ KisCurveOptionWidget() [4/5]

KisCurveOptionWidget::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 )

Definition at line 84 of file KisCurveOptionWidget.cpp.

92 : KisCurveOptionWidget(optionData,
94 strengthPrefix, strengthSuffix, strengthDisplayMultiplier,
95 enabledLink,
96 strengthRangeReader,
97 KisCurveRangeModel::factory(curveMinLabel,
98 curveMaxLabel,
99 curveMinValue,
100 curveMaxValue,
101 curveValueSuffix),
103 {},
105{
106}
static KisCurveOptionInputControlsStrategyFactory factory()
static KisCurveRangeModelFactory factory(const QString &yMinLabel, const QString &yMaxLabel, int curveMinValue, int curveMaxValue, const QString &curveValueSuffix)

◆ KisCurveOptionWidget() [5/5]

KisCurveOptionWidget::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 )
protected

Definition at line 108 of file KisCurveOptionWidget.cpp.

118 : KisPaintOpOption(optionData->id.name(), category, optionData[&KisCurveOptionDataCommon::isChecked], enabledLink)
119 , m_widget(new QWidget)
120 , m_curveOptionWidget(new Ui_WdgCurveOption2())
121 , m_d(new Private(optionData, enabledLink, strengthRangeReader,
122 strengthDisplayMultiplier,
123 curveRangeModelFactory))
124{
125 using namespace KisWidgetConnectionUtils;
126
127 setObjectName("KisCurveOptionWidget");
128
130 m_curveOptionWidget->sensorSelector->setOptionDataCursor(m_d->model.optionData);
131
132 KIS_SAFE_ASSERT_RECOVER (inputControlsFactory) {
134 }
135
137 inputControlsFactory(m_d->model.rangeModel.get(),
138 m_curveOptionWidget->curveWidget,
139 m_curveOptionWidget->intInPlaceholder,
140 m_curveOptionWidget->intOutPlaceholder));
141
142 if (rangeControlsFactory) {
144 rangeControlsFactory(m_d->model.rangeModel.get(),
145 m_curveOptionWidget->wdgRangeControlsPlaceholder));
146 } else {
147 m_curveOptionWidget->wdgRangeControlsPlaceholder->setVisible(false);
148 }
149
151
152 connect(&m_d->model, &KisCurveOptionModel::curveXMinLabelChanged,
153 m_curveOptionWidget->label_xmin, &QLabel::setText);
154 m_curveOptionWidget->label_xmin->setText(m_d->model.curveXMinLabel());
155
156 connect(&m_d->model, &KisCurveOptionModel::curveXMaxLabelChanged,
157 m_curveOptionWidget->label_xmax, &QLabel::setText);
158 m_curveOptionWidget->label_xmax->setText(m_d->model.curveXMaxLabel());
159
160 connect(&m_d->model, &KisCurveOptionModel::curveYMinLabelChanged,
161 m_curveOptionWidget->label_ymin, &QLabel::setText);
162 m_curveOptionWidget->label_ymin->setText(m_d->model.curveYMinLabel());
163
164 connect(&m_d->model, &KisCurveOptionModel::curveYMaxLabelChanged,
165 m_curveOptionWidget->label_ymax, &QLabel::setText);
166 m_curveOptionWidget->label_ymax->setText(m_d->model.curveYMaxLabel());
167
168 m_d->model.activeSensorIdData.bind(
169 std::bind(qOverload<const QString&>(&KisMultiSensorsSelector::setCurrent),
170 m_curveOptionWidget->sensorSelector,
171 std::placeholders::_1));
172 connect(m_curveOptionWidget->sensorSelector,
174 &m_d->model,
175 &KisCurveOptionModel::setactiveSensorId);
176
177 // set all the icons for the curve preset shapes
179
180 // various curve preset buttons with predefined curves
181 connect(m_curveOptionWidget->linearCurveButton, SIGNAL(clicked(bool)), this, SLOT(changeCurveLinear()));
182 connect(m_curveOptionWidget->revLinearButton, SIGNAL(clicked(bool)), this, SLOT(changeCurveReverseLinear()));
183 connect(m_curveOptionWidget->jCurveButton, SIGNAL(clicked(bool)), this, SLOT(changeCurveJShape()));
184 connect(m_curveOptionWidget->lCurveButton, SIGNAL(clicked(bool)), this, SLOT(changeCurveLShape()));
185 connect(m_curveOptionWidget->sCurveButton, SIGNAL(clicked(bool)), this, SLOT(changeCurveSShape()));
186 connect(m_curveOptionWidget->reverseSCurveButton, SIGNAL(clicked(bool)), this, SLOT(changeCurveReverseSShape()));
187 connect(m_curveOptionWidget->uCurveButton, SIGNAL(clicked(bool)), this, SLOT(changeCurveUShape()));
188 connect(m_curveOptionWidget->revUCurveButton, SIGNAL(clicked(bool)), this, SLOT(changeCurveArchShape()));
189
190 m_curveOptionWidget->strengthSlider->setPrefix(strengthPrefix);
191 m_curveOptionWidget->strengthSlider->setSuffix(strengthSuffix);
192
193 connect(m_curveOptionWidget->strengthSlider, qOverload<qreal>(&KisDoubleSliderSpinBox::valueChanged),
194 &m_d->model, &KisCurveOptionModel::setstrengthValueDenorm);
195
196 const bool useFloatingPointStrength = flags & UseFloatingPointStrength;
197
198 if (useFloatingPointStrength) {
199 m_curveOptionWidget->strengthSlider->setSingleStep(0.01);
200 }
201
202 m_d->model.LAGER_QT(effectiveStrengthStateDenorm).bind(
203 kismpl::unzip_wrapper([this, useFloatingPointStrength] (qreal value, qreal min, qreal max) {
204 KisSignalsBlocker b(m_curveOptionWidget->strengthSlider);
205 m_curveOptionWidget->strengthSlider->setRange(min, max, useFloatingPointStrength ? 2 : 0);
206 m_curveOptionWidget->strengthSlider->setValue(value);
207 }));
208
209 connectControl(m_curveOptionWidget->curveWidget, &m_d->model, "displayedCurve");
210
211 m_d->model.LAGER_QT(useCurve).bind(std::bind(&KisCurveOptionWidget::setCurveWidgetsEnabled, this, std::placeholders::_1));
212 connectControl(m_curveOptionWidget->checkBoxUseCurve, &m_d->model, "useCurve");
213
214 if (flags & SupportsCommonCurve) {
215 connectControl(m_curveOptionWidget->checkBoxUseSameCurve, &m_d->model, "useSameCurve");
216 } else {
217 m_curveOptionWidget->checkBoxUseSameCurve->setVisible(false);
218 }
219
220 if (flags & SupportsCurveMode) {
221 connectControl(m_curveOptionWidget->curveMode, &m_d->model, "curveMode");
222 } else {
223 m_curveOptionWidget->curveMode->setVisible(false);
224 m_curveOptionWidget->lblCurveMode->setVisible(false);
225 }
226
227 m_d->model.optionData.bind(std::bind(&KisCurveOptionWidget::emitSettingChanged, this));
228}
float value(const T *src, size_t ch)
QScopedPointer< KisCurveOptionInputControlsStrategyInterface > m_curveInputControlsStrategy
Ui_WdgCurveOption2 * m_curveOptionWidget
void setCurveWidgetsEnabled(bool value)
const QScopedPointer< Private > m_d
QScopedPointer< KisCurveOptionRangeControlsStrategyInterface > m_curveRangeControlsStrategy
void setCurrent(const QString &id)
void highlightedSensorChanged(const QString &id)
void setConfigurationPage(QWidget *page)
KisPaintOpOption(const QString &label, KisPaintOpOption::PaintopCategory category, bool checked)
#define KIS_SAFE_ASSERT_RECOVER(cond)
Definition kis_assert.h:126
void connectControl(KisCompositeOpListWidget *widget, QObject *source, const char *property)
constexpr auto unzip_wrapper
Definition KisMpl.h:70

References changeCurveArchShape(), changeCurveJShape(), changeCurveLinear(), changeCurveLShape(), changeCurveReverseLinear(), changeCurveReverseSShape(), changeCurveSShape(), changeCurveUShape(), KisPaintOpOption::emitSettingChanged(), KisCurveOptionInputControlsStrategy< QSpinBox >::factory(), KisMultiSensorsSelector::highlightedSensorChanged(), KIS_SAFE_ASSERT_RECOVER, m_curveInputControlsStrategy, m_curveOptionWidget, m_curveRangeControlsStrategy, m_d, m_widget, KisPaintOpOption::setConfigurationPage(), KisMultiSensorsSelector::setCurrent(), setCurveWidgetsEnabled(), SupportsCommonCurve, SupportsCurveMode, kismpl::unzip_wrapper, updateThemedIcons(), UseFloatingPointStrength, and value().

◆ ~KisCurveOptionWidget()

KisCurveOptionWidget::~KisCurveOptionWidget ( )
override

Definition at line 230 of file KisCurveOptionWidget.cpp.

231{
232 delete m_curveOptionWidget;
233}

References m_curveOptionWidget.

Member Function Documentation

◆ changeCurveArchShape

void KisCurveOptionWidget::changeCurveArchShape ( )
protectedslot

Definition at line 352 of file KisCurveOptionWidget.cpp.

353{
354 QList<QPointF> points;
355 points.push_back(QPointF(0,0));
356 points.push_back(QPointF(0.5,1));
357 points.push_back(QPointF(1,0));
358 m_d->model.setdisplayedCurve(KisCubicCurve(points).toString());
359}
QString toString(const QString &value)

References m_d.

◆ changeCurveJShape

void KisCurveOptionWidget::changeCurveJShape ( )
protectedslot

Definition at line 325 of file KisCurveOptionWidget.cpp.

326{
327 QList<QPointF> points;
328 points.push_back(QPointF(0,0));
329 points.push_back(QPointF(0.35,0.1));
330 points.push_back(QPointF(1,1));
331 m_d->model.setdisplayedCurve(KisCubicCurve(points).toString());
332}

References m_d.

◆ changeCurveLinear

void KisCurveOptionWidget::changeCurveLinear ( )
protectedslot

Definition at line 288 of file KisCurveOptionWidget.cpp.

289{
290 QList<QPointF> points;
291 points.push_back(QPointF(0,0));
292 points.push_back(QPointF(1,1));
293 m_d->model.setdisplayedCurve(KisCubicCurve(points).toString());
294}

References m_d.

◆ changeCurveLShape

void KisCurveOptionWidget::changeCurveLShape ( )
protectedslot

Definition at line 334 of file KisCurveOptionWidget.cpp.

335{
336 QList<QPointF> points;
337 points.push_back(QPointF(0,1));
338 points.push_back(QPointF(0.25,0.48));
339 points.push_back(QPointF(1,0));
340 m_d->model.setdisplayedCurve(KisCubicCurve(points).toString());
341}

References m_d.

◆ changeCurveReverseLinear

void KisCurveOptionWidget::changeCurveReverseLinear ( )
protectedslot

Definition at line 296 of file KisCurveOptionWidget.cpp.

297{
298 QList<QPointF> points;
299 points.push_back(QPointF(0,1));
300 points.push_back(QPointF(1,0));
301 m_d->model.setdisplayedCurve(KisCubicCurve(points).toString());
302}

References m_d.

◆ changeCurveReverseSShape

void KisCurveOptionWidget::changeCurveReverseSShape ( )
protectedslot

Definition at line 315 of file KisCurveOptionWidget.cpp.

316{
317 QList<QPointF> points;
318 points.push_back(QPointF(0,1));
319 points.push_back(QPointF(0.25,0.9));
320 points.push_back(QPointF(0.75,0.1));
321 points.push_back(QPointF(1,0));
322 m_d->model.setdisplayedCurve(KisCubicCurve(points).toString());
323}

References m_d.

◆ changeCurveSShape

void KisCurveOptionWidget::changeCurveSShape ( )
protectedslot

Definition at line 304 of file KisCurveOptionWidget.cpp.

305{
306 QList<QPointF> points;
307 points.push_back(QPointF(0,0));
308 points.push_back(QPointF(0.25,0.1));
309 points.push_back(QPointF(0.75,0.9));
310 points.push_back(QPointF(1, 1));
311 m_d->model.setdisplayedCurve(KisCubicCurve(points).toString());
312}

References m_d.

◆ changeCurveUShape

void KisCurveOptionWidget::changeCurveUShape ( )
protectedslot

Definition at line 343 of file KisCurveOptionWidget.cpp.

344{
345 QList<QPointF> points;
346 points.push_back(QPointF(0,1));
347 points.push_back(QPointF(0.5,0));
348 points.push_back(QPointF(1,1));
349 m_d->model.setdisplayedCurve(KisCubicCurve(points).toString());
350}

References m_d.

◆ curveWidget()

QWidget * KisCurveOptionWidget::curveWidget ( )
protected

Definition at line 283 of file KisCurveOptionWidget.cpp.

284{
285 return m_widget;
286}

References m_widget.

◆ isCheckable()

bool KisCurveOptionWidget::isCheckable ( ) const
overridevirtual

Reimplemented from KisPaintOpOption.

Definition at line 247 of file KisCurveOptionWidget.cpp.

248{
249 return m_d->model.isCheckable();
250}

References m_d.

◆ readOptionSetting()

void KisCurveOptionWidget::readOptionSetting ( const KisPropertiesConfigurationSP setting)
overridevirtual

Re-implement this to set the widgets with the values in setting.

Reimplemented from KisPaintOpOption.

Reimplemented in KisPaintThicknessOptionWidget, KisSmudgeLengthOptionWidget, KisMirrorOptionWidget, KisScatterOptionWidget, KisSharpnessOptionWidget, and KisSpacingOptionWidget.

Definition at line 240 of file KisCurveOptionWidget.cpp.

241{
242 KisCurveOptionDataCommon data(*m_d->model.optionData);
243 data.read(setting.data());
244 m_d->model.optionData.set(data);
245}

References KisSharedPtr< T >::data(), m_d, and KisCurveOptionDataCommon::read().

◆ setCurveWidgetsEnabled()

void KisCurveOptionWidget::setCurveWidgetsEnabled ( bool value)
protected

Definition at line 257 of file KisCurveOptionWidget.cpp.

258{
259 m_curveOptionWidget->checkBoxUseSameCurve->setEnabled(value);
260 m_curveOptionWidget->curveWidget->setEnabled(value);
261 m_curveOptionWidget->sensorSelector->setEnabled(value);
262 m_curveOptionWidget->label_xmax->setEnabled(value);
263 m_curveOptionWidget->label_xmin->setEnabled(value);
264 m_curveOptionWidget->label_ymax->setEnabled(value);
265 m_curveOptionWidget->label_ymin->setEnabled(value);
266 m_curveOptionWidget->intInPlaceholder->setEnabled(value);
267 m_curveOptionWidget->intOutPlaceholder->setEnabled(value);
268
269 m_curveOptionWidget->linearCurveButton->setEnabled(value);
270 m_curveOptionWidget->revLinearButton->setEnabled(value);
271 m_curveOptionWidget->jCurveButton->setEnabled(value);
272 m_curveOptionWidget->lCurveButton->setEnabled(value);
273 m_curveOptionWidget->revUCurveButton->setEnabled(value);
274 m_curveOptionWidget->reverseSCurveButton->setEnabled(value);
275 m_curveOptionWidget->uCurveButton->setEnabled(value);
276 m_curveOptionWidget->sCurveButton->setEnabled(value);
277
278 m_curveOptionWidget->curveMode->setEnabled(value);
279 m_curveOptionWidget->lblCurveMode->setEnabled(value);
280
281}

References m_curveOptionWidget, and value().

◆ show()

void KisCurveOptionWidget::show ( )

◆ strengthValueDenorm()

lager::cursor< qreal > KisCurveOptionWidget::strengthValueDenorm ( )
protected

Definition at line 252 of file KisCurveOptionWidget.cpp.

253{
254 return m_d->model.LAGER_QT(strengthValueDenorm);
255}
lager::cursor< qreal > strengthValueDenorm()

References m_d, and strengthValueDenorm().

◆ updateThemedIcons

void KisCurveOptionWidget::updateThemedIcons ( )
protectedslot

Definition at line 361 of file KisCurveOptionWidget.cpp.

362{
363 // set all the icons for the curve preset shapes
364 m_curveOptionWidget->linearCurveButton->setIcon(KisIconUtils::loadIcon("curve-preset-linear"));
365 m_curveOptionWidget->revLinearButton->setIcon(KisIconUtils::loadIcon("curve-preset-linear-reverse"));
366 m_curveOptionWidget->jCurveButton->setIcon(KisIconUtils::loadIcon("curve-preset-j"));
367 m_curveOptionWidget->lCurveButton->setIcon(KisIconUtils::loadIcon("curve-preset-l"));
368 m_curveOptionWidget->sCurveButton->setIcon(KisIconUtils::loadIcon("curve-preset-s"));
369 m_curveOptionWidget->reverseSCurveButton->setIcon(KisIconUtils::loadIcon("curve-preset-s-reverse"));
370 m_curveOptionWidget->uCurveButton->setIcon(KisIconUtils::loadIcon("curve-preset-u"));
371 m_curveOptionWidget->revUCurveButton->setIcon(KisIconUtils::loadIcon("curve-preset-arch"));
372
373 // this helps make the checkboxes show themselves on the dark color themes
374 QPalette pal = m_curveOptionWidget->sensorSelector->palette();
375 QPalette newPalette = pal;
376 newPalette.setColor(QPalette::Active, QPalette::Window, pal.text().color() );
377 m_curveOptionWidget->sensorSelector->setPalette(newPalette);
378
379}
QIcon loadIcon(const QString &name)

References KisIconUtils::loadIcon(), and m_curveOptionWidget.

◆ writeOptionSetting()

void KisCurveOptionWidget::writeOptionSetting ( KisPropertiesConfigurationSP setting) const
overridevirtual

Re-implement this to save the configuration to the paint configuration.

Reimplemented from KisPaintOpOption.

Reimplemented in KisPaintThicknessOptionWidget, KisSmudgeLengthOptionWidget, KisMirrorOptionWidget, KisScatterOptionWidget, KisSharpnessOptionWidget, and KisSpacingOptionWidget.

Definition at line 235 of file KisCurveOptionWidget.cpp.

236{
237 m_d->model.bakedOptionData().write(setting.data());
238}

References KisSharedPtr< T >::data(), and m_d.

Member Data Documentation

◆ m_curveInputControlsStrategy

QScopedPointer<KisCurveOptionInputControlsStrategyInterface> KisCurveOptionWidget::m_curveInputControlsStrategy
protected

Definition at line 111 of file KisCurveOptionWidget.h.

◆ m_curveMode

QComboBox* KisCurveOptionWidget::m_curveMode {nullptr}
protected

Definition at line 113 of file KisCurveOptionWidget.h.

113{nullptr};

◆ m_curveOptionWidget

Ui_WdgCurveOption2* KisCurveOptionWidget::m_curveOptionWidget {nullptr}
protected

Definition at line 110 of file KisCurveOptionWidget.h.

110{nullptr};

◆ m_curveRangeControlsStrategy

QScopedPointer<KisCurveOptionRangeControlsStrategyInterface> KisCurveOptionWidget::m_curveRangeControlsStrategy
protected

Definition at line 112 of file KisCurveOptionWidget.h.

◆ m_d

const QScopedPointer<Private> KisCurveOptionWidget::m_d
protected

Definition at line 115 of file KisCurveOptionWidget.h.

◆ m_widget

QWidget* KisCurveOptionWidget::m_widget {nullptr}
protected

Definition at line 109 of file KisCurveOptionWidget.h.

109{nullptr};

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