KSeExpr
4.0.4.0
|
A control for editing color swatches. More...
#include <ExprControl.h>
Public Member Functions | |
ColorSwatchControl (int id, ColorSwatchEditable *swatchEditable) | |
![]() | |
ExprControl (int id, Editable *editable, bool showColorLink) | |
~ExprControl () override=default | |
virtual QColor | getColor () |
Interface for getting the color (used for linked color picking) More... | |
virtual void | setColor (QColor) |
Interface for setting the color (used for linked color picking) More... | |
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 More... | |
ExprColorSwatchWidget * | _swatch {nullptr} |
Edit box for the color swatches. More... | |
bool | _indexLabel |
Additional Inherited Members | |
![]() | |
void | linkStateChange (int state) |
![]() | |
void | controlChanged (int id) |
void | linkColorEdited (int id, QColor color) |
void | linkColorLink (int id) |
![]() | |
void | resizeEvent (QResizeEvent *event) override |
![]() | |
int | _id |
std::atomic< bool > | _updating {} |
QHBoxLayout * | hbox {nullptr} |
QCheckBox * | _colorLinkCB {nullptr} |
QLabel * | _label {nullptr} |
Editable * | _editable {nullptr} |
A control for editing color swatches.
Definition at line 281 of file ExprControl.h.
ColorSwatchControl::ColorSwatchControl | ( | int | id, |
ColorSwatchEditable * | swatchEditable | ||
) |
Definition at line 630 of file ExprControl.cpp.
References _indexLabel, _swatchEditable, buildSwatchWidget(), and ColorSwatchEditable::labelType.
|
privateslot |
Definition at line 672 of file ExprControl.cpp.
References _indexLabel, _swatch, _swatchEditable, ExprControl::_updating, ExprColorSwatchWidget::addSwatch(), colorAdded(), colorChanged(), colorRemoved(), ColorSwatchEditable::colors, and ExprControl::hbox.
Referenced by colorRemoved(), and ColorSwatchControl().
|
privateslot |
Definition at line 650 of file ExprControl.cpp.
References ExprControl::_id, _swatchEditable, ExprControl::_updating, ColorSwatchEditable::add(), ColorSwatchEditable::colors, and ExprControl::controlChanged().
Referenced by buildSwatchWidget().
|
privateslot |
Definition at line 641 of file ExprControl.cpp.
References ExprControl::_id, _swatchEditable, ExprControl::_updating, ColorSwatchEditable::change(), ColorSwatchEditable::colors, and ExprControl::controlChanged().
Referenced by buildSwatchWidget().
|
privateslot |
Definition at line 659 of file ExprControl.cpp.
References ExprControl::_id, _swatch, _swatchEditable, ExprControl::_updating, buildSwatchWidget(), ColorSwatchEditable::colors, ExprControl::controlChanged(), and ColorSwatchEditable::remove().
Referenced by buildSwatchWidget().
|
private |
Definition at line 299 of file ExprControl.h.
Referenced by buildSwatchWidget(), and ColorSwatchControl().
|
private |
Edit box for the color swatches.
Definition at line 288 of file ExprControl.h.
Referenced by buildSwatchWidget(), and colorRemoved().
|
private |
model for the color swatches control
Definition at line 286 of file ExprControl.h.
Referenced by buildSwatchWidget(), colorAdded(), colorChanged(), colorRemoved(), and ColorSwatchControl().