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

#include <kis_uniform_paintop_property_widget.h>

+ Inheritance diagram for KisUniformPaintOpPropertyCheckBox:

Public Member Functions

 KisUniformPaintOpPropertyCheckBox (KisUniformPaintOpPropertySP property, QWidget *parent)
 
void setValue (const QVariant &value) override
 
- Public Member Functions inherited from KisUniformPaintOpPropertyWidget
 KisUniformPaintOpPropertyWidget (KisUniformPaintOpPropertySP property, QWidget *parent)
 
void slotThemeChanged (QPalette pal)
 
 ~KisUniformPaintOpPropertyWidget () override
 

Private Slots

void slotCheckBoxChanged (bool value)
 

Private Attributes

QCheckBox * m_checkBox
 

Additional Inherited Members

- Signals inherited from KisUniformPaintOpPropertyWidget
void valueChanged (const QVariant &value)
 
- Protected Slots inherited from KisUniformPaintOpPropertyWidget
- Protected Member Functions inherited from KisUniformPaintOpPropertyWidget
KisUniformPaintOpPropertySP property () const
 

Detailed Description

Definition at line 72 of file kis_uniform_paintop_property_widget.h.

Constructor & Destructor Documentation

◆ KisUniformPaintOpPropertyCheckBox()

KisUniformPaintOpPropertyCheckBox::KisUniformPaintOpPropertyCheckBox ( KisUniformPaintOpPropertySP property,
QWidget * parent )

Definition at line 217 of file kis_uniform_paintop_property_widget.cpp.

219{
220 QVBoxLayout *layout = new QVBoxLayout(this);
221
222 m_checkBox = new QCheckBox(property->name(), this);
223 m_checkBox->setChecked(property->value().toBool());
224 connect(m_checkBox, SIGNAL(toggled(bool)), SLOT(slotCheckBoxChanged(bool)));
225
226 layout->addWidget(m_checkBox);
227}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisUniformPaintOpPropertyWidget(KisUniformPaintOpPropertySP property, QWidget *parent)

References connect(), m_checkBox, KisUniformPaintOpPropertyWidget::property(), and slotCheckBoxChanged().

Member Function Documentation

◆ setValue()

void KisUniformPaintOpPropertyCheckBox::setValue ( const QVariant & value)
overridevirtual

Implements KisUniformPaintOpPropertyWidget.

Definition at line 229 of file kis_uniform_paintop_property_widget.cpp.

230{
231 m_checkBox->setChecked(value.toBool());
232}
float value(const T *src, size_t ch)

References m_checkBox, and value().

◆ slotCheckBoxChanged

void KisUniformPaintOpPropertyCheckBox::slotCheckBoxChanged ( bool value)
privateslot

Definition at line 234 of file kis_uniform_paintop_property_widget.cpp.

235{
236 Q_EMIT valueChanged(value);
237}
void valueChanged(const QVariant &value)

References value(), and KisUniformPaintOpPropertyWidget::valueChanged().

Member Data Documentation

◆ m_checkBox

QCheckBox* KisUniformPaintOpPropertyCheckBox::m_checkBox
private

Definition at line 84 of file kis_uniform_paintop_property_widget.h.


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