KSeExpr 4.0.4.0
ColorSwatchControl Class Reference

A control for editing color swatches. More...

#include <ExprControl.h>

Inheritance diagram for ColorSwatchControl:
ExprControl

Public Member Functions

 ColorSwatchControl (int id, ColorSwatchEditable *swatchEditable)
Public Member Functions inherited from ExprControl
 ExprControl (int id, Editable *editable, bool showColorLink)
 ~ExprControl () override=default
virtual QColor getColor ()
 Interface for getting the color (used for linked color picking)
virtual void setColor (QColor)
 Interface for setting the color (used for linked color picking)
void linkDisconnect (int newId)

Private Slots

void buildSwatchWidget ()
void colorChanged (int index, KSeExpr::Vec3d value)
void colorAdded (int index, KSeExpr::Vec3d value)
void colorRemoved (int index)

Private Attributes

ColorSwatchEditable_swatchEditable {nullptr}
 model for the color swatches control
ExprColorSwatchWidget_swatch {nullptr}
 Edit box for the color swatches.
bool _indexLabel

Additional Inherited Members

Public Slots inherited from ExprControl
void linkStateChange (int state)
Signals inherited from ExprControl
void controlChanged (int id)
void linkColorEdited (int id, QColor color)
void linkColorLink (int id)
Protected Member Functions inherited from ExprControl
void resizeEvent (QResizeEvent *event) override
Protected Attributes inherited from ExprControl
int _id
std::atomic< bool > _updating {}
QHBoxLayout * hbox {nullptr}
QCheckBox * _colorLinkCB {nullptr}
QLabel * _label {nullptr}
Editable_editable {nullptr}

Detailed Description

A control for editing color swatches.

Definition at line 281 of file ExprControl.h.

Constructor & Destructor Documentation

◆ ColorSwatchControl()

ColorSwatchControl::ColorSwatchControl ( int id,
ColorSwatchEditable * swatchEditable )

Member Function Documentation

◆ buildSwatchWidget

void ColorSwatchControl::buildSwatchWidget ( )
privateslot

◆ colorAdded

void ColorSwatchControl::colorAdded ( int index,
KSeExpr::Vec3d value )
privateslot

◆ colorChanged

void ColorSwatchControl::colorChanged ( int index,
KSeExpr::Vec3d value )
privateslot

◆ colorRemoved

void ColorSwatchControl::colorRemoved ( int index)
privateslot

Member Data Documentation

◆ _indexLabel

bool ColorSwatchControl::_indexLabel
private

Definition at line 299 of file ExprControl.h.

Referenced by buildSwatchWidget(), and ColorSwatchControl().

◆ _swatch

ExprColorSwatchWidget* ColorSwatchControl::_swatch {nullptr}
private

Edit box for the color swatches.

Definition at line 288 of file ExprControl.h.

Referenced by buildSwatchWidget(), and colorRemoved().

◆ _swatchEditable

ColorSwatchEditable* ColorSwatchControl::_swatchEditable {nullptr}
private

model for the color swatches control

Definition at line 286 of file ExprControl.h.

Referenced by buildSwatchWidget(), colorAdded(), colorChanged(), colorRemoved(), and ColorSwatchControl().


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