SeExpr
|
A vector or color control (named vector because it edits a SeExpr2::Vec3d literal) More...
#include <ExprControl.h>
Public Member Functions | |
VectorControl (int id, VectorEditable *number) | |
QColor | getColor () |
Interface for getting the color (used for linked color picking) | |
void | setColor (QColor color) |
Interface for setting the color (used for linked color picking) | |
![]() | |
ExprControl (int id, Editable *editable, bool showColorLink) | |
virtual | ~ExprControl () |
void | linkDisconnect (int newId) |
Private Slots | |
void | sliderChanged (int id, float val) |
void | editChanged (int id, const QString &text) |
void | swatchChanged (QColor color) |
Private Member Functions | |
void | setValue (int id, float 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 |
Number model. | |
ExprLineEdit * | _edits [3] |
All three line edit widgets (for each component) | |
ExprCSwatchFrame * | _swatch |
ExprChannelSlider * | _sliders [3] |
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) |
![]() | |
int | _id |
bool | _updating |
QHBoxLayout * | hbox |
QCheckBox * | _colorLinkCB |
QLabel * | _label |
Editable * | _editable |
A vector or color control (named vector because it edits a SeExpr2::Vec3d literal)
Definition at line 196 of file ExprControl.h.
VectorControl::VectorControl | ( | int | id, |
VectorEditable * | number ) |
Definition at line 273 of file ExprControl.cpp.
References _edits, _numberEditable, _sliders, editChanged(), for(), ExprControl::hbox, VectorEditable::isColor, ExprChannelSlider::setDisplayColor(), sliderChanged(), and updateControl().
|
privateslot |
Definition at line 335 of file ExprControl.cpp.
References ExprControl::_updating, and setValue().
Referenced by VectorControl().
|
virtual |
Interface for getting the color (used for linked color picking)
Reimplemented from ExprControl.
Definition at line 318 of file ExprControl.cpp.
References _numberEditable, clamp(), and VectorEditable::v.
Referenced by sliderChanged().
|
virtual |
Interface for setting the color (used for linked color picking)
Reimplemented from ExprControl.
Definition at line 323 of file ExprControl.cpp.
References setValue().
|
private |
set the value in the model (in response to editing from controls)
Definition at line 367 of file ExprControl.cpp.
References ExprControl::_id, _numberEditable, _swatch, ExprControl::controlChanged(), ExprCSwatchFrame::setValue(), updateControl(), VectorEditable::v, and value().
Referenced by editChanged(), setColor(), sliderChanged(), and swatchChanged().
|
privateslot |
Definition at line 329 of file ExprControl.cpp.
References ExprControl::_id, _numberEditable, ExprControl::_updating, getColor(), VectorEditable::isColor, ExprControl::linkColorEdited(), VectorEditable::max, VectorEditable::min, setValue(), and value().
Referenced by VectorControl().
|
privateslot |
Definition at line 310 of file ExprControl.cpp.
References _swatch, ExprCSwatchFrame::getValue(), and setValue().
|
private |
update the individual slider and eidt box controls
Definition at line 343 of file ExprControl.cpp.
References _edits, ExprControl::_label, _numberEditable, _sliders, ExprControl::_updating, clamp(), VectorEditable::isColor, VectorEditable::max, VectorEditable::min, r, ExprChannelSlider::setValue(), 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(), and swatchChanged().