KSeExpr 6.0.0.0
|
A vector or color control (named vector because it edits a KSeExpr::Vec3d literal) More...
#include <ExprControl.h>
Public Member Functions | |
VectorControl (int id, VectorEditable *editable) | |
QColor | getColor () override |
Interface for getting the color (used for linked color picking) | |
void | setColor (QColor color) override |
Interface for setting the color (used for linked color picking) | |
![]() | |
ExprControl (int id, Editable *editable, bool showColorLink) | |
~ExprControl () override=default | |
void | linkDisconnect (int newId) |
Private Slots | |
void | sliderChanged (int id, double val) |
void | editChanged (int id, const QString &text) |
void | swatchChanged (QColor color) |
Private Member Functions | |
void | setValue (int n, double value) |
set the value in the model (in response to editing from controls) | |
void | updateControl () |
update the individual slider and eidt box controls | |
Private Attributes | |
VectorEditable * | _numberEditable {nullptr} |
Number model. | |
std::array< ExprLineEdit *, 3 > | _edits {} |
All three line edit widgets (for each component) | |
ExprCSwatchFrame * | _swatch {nullptr} |
std::array< ExprChannelSlider *, 3 > | _sliders {} |
All three channel sliders (for each component) | |
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 vector or color control (named vector because it edits a KSeExpr::Vec3d literal)
Definition at line 195 of file ExprControl.h.
VectorControl::VectorControl | ( | int | id, |
VectorEditable * | editable | ||
) |
Definition at line 293 of file ExprControl.cpp.
References _edits, _numberEditable, _sliders, _swatch, editChanged(), ExprControl::hbox, VectorEditable::isColor, sliderChanged(), swatchChanged(), updateControl(), and VectorEditable::v.
|
privateslot |
Definition at line 370 of file ExprControl.cpp.
References ExprControl::_updating, and setValue().
Referenced by VectorControl().
|
overridevirtual |
Interface for getting the color (used for linked color picking)
Reimplemented from ExprControl.
Definition at line 349 of file ExprControl.cpp.
References _numberEditable, clamp(), and VectorEditable::v.
Referenced by sliderChanged().
|
overridevirtual |
Interface for setting the color (used for linked color picking)
Reimplemented from ExprControl.
Definition at line 354 of file ExprControl.cpp.
References setValue().
|
private |
set the value in the model (in response to editing from controls)
Definition at line 409 of file ExprControl.cpp.
References ExprControl::_id, _numberEditable, _swatch, ExprControl::controlChanged(), ExprCSwatchFrame::setValue(), updateControl(), and VectorEditable::v.
Referenced by editChanged(), setColor(), sliderChanged(), and swatchChanged().
|
privateslot |
Definition at line 361 of file ExprControl.cpp.
References ExprControl::_id, _numberEditable, ExprControl::_updating, getColor(), VectorEditable::isColor, ExprControl::linkColorEdited(), VectorEditable::max, VectorEditable::min, and setValue().
Referenced by VectorControl().
|
privateslot |
Definition at line 341 of file ExprControl.cpp.
References _swatch, ExprCSwatchFrame::getValue(), and setValue().
Referenced by VectorControl().
|
private |
update the individual slider and eidt box controls
Definition at line 381 of file ExprControl.cpp.
References _edits, ExprControl::_label, _numberEditable, _sliders, ExprControl::_updating, clamp(), VectorEditable::isColor, VectorEditable::max, VectorEditable::min, and VectorEditable::v.
Referenced by setValue(), and VectorControl().
|
private |
All three line edit widgets (for each component)
Definition at line 202 of file ExprControl.h.
Referenced by updateControl(), and VectorControl().
|
private |
Number model.
Definition at line 200 of file ExprControl.h.
Referenced by getColor(), setValue(), sliderChanged(), updateControl(), and VectorControl().
|
private |
All three channel sliders (for each component)
Definition at line 206 of file ExprControl.h.
Referenced by updateControl(), and VectorControl().
|
private |
Definition at line 203 of file ExprControl.h.
Referenced by setValue(), swatchChanged(), and VectorControl().