A vector or color control (named vector because it edits a SeVec3d literal). More...
#include <SeExprEdControl.h>
Public Member Functions | |
SeExprEdVectorControl (int id, SeExprEdVectorEditable *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). | |
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 | |
SeExprEdVectorEditable * | _numberEditable |
Number model. | |
SeExprEdLineEdit * | _edits [3] |
All three line edit widgets (for each component). | |
SeExprEdCSwatchFrame * | _swatch |
SeExprEdChannelSlider * | _sliders [3] |
All three channel sliders (for each component). |
A vector or color control (named vector because it edits a SeVec3d literal).
Definition at line 177 of file SeExprEdControl.h.
SeExprEdVectorControl::SeExprEdVectorControl | ( | int | id, | |
SeExprEdVectorEditable * | number | |||
) |
Definition at line 377 of file SeExprEdControl.cpp.
References _edits, _numberEditable, _sliders, _swatch, editChanged(), SeExprEdControl::hbox, SeExprEdVectorEditable::isColor, SeExprEdChannelSlider::setDisplayColor(), sliderChanged(), swatchChanged(), updateControl(), and SeExprEdVectorEditable::v.
void SeExprEdVectorControl::editChanged | ( | int | id, | |
const QString & | text | |||
) | [private, slot] |
Definition at line 446 of file SeExprEdControl.cpp.
References SeExprEdControl::_updating, and setValue().
Referenced by SeExprEdVectorControl().
QColor SeExprEdVectorControl::getColor | ( | ) | [virtual] |
Interface for getting the color (used for linked color picking).
Reimplemented from SeExprEdControl.
Definition at line 425 of file SeExprEdControl.cpp.
References _numberEditable, SeExpr::clamp(), and SeExprEdVectorEditable::v.
Referenced by sliderChanged().
void SeExprEdVectorControl::setColor | ( | QColor | color | ) | [virtual] |
Interface for setting the color (used for linked color picking).
Reimplemented from SeExprEdControl.
Definition at line 432 of file SeExprEdControl.cpp.
References setValue().
void SeExprEdVectorControl::setValue | ( | int | id, | |
float | value | |||
) | [private] |
set the value in the model (in response to editing from controls)
Definition at line 483 of file SeExprEdControl.cpp.
References SeExprEdControl::_id, _numberEditable, _swatch, SeExprEdControl::controlChanged(), SeExprEdCSwatchFrame::setValue(), updateControl(), and SeExprEdVectorEditable::v.
Referenced by editChanged(), setColor(), sliderChanged(), and swatchChanged().
void SeExprEdVectorControl::sliderChanged | ( | int | id, | |
float | val | |||
) | [private, slot] |
Definition at line 439 of file SeExprEdControl.cpp.
References SeExprEdControl::_id, _numberEditable, SeExprEdControl::_updating, getColor(), SeExprEdVectorEditable::isColor, SeExprEdControl::linkColorEdited(), SeExprEdVectorEditable::max, SeExprEdVectorEditable::min, and setValue().
Referenced by SeExprEdVectorControl().
void SeExprEdVectorControl::swatchChanged | ( | QColor | color | ) | [private, slot] |
Definition at line 416 of file SeExprEdControl.cpp.
References _swatch, SeExprEdCSwatchFrame::getValue(), and setValue().
Referenced by SeExprEdVectorControl().
void SeExprEdVectorControl::updateControl | ( | ) | [private] |
update the individual slider and eidt box controls
Definition at line 455 of file SeExprEdControl.cpp.
References _edits, SeExprEdControl::_label, _numberEditable, _sliders, SeExprEdControl::_updating, b, SeExpr::clamp(), SeExprEdVectorEditable::isColor, SeExprEdVectorEditable::max, SeExpr::max(), SeExprEdVectorEditable::min, SeExpr::min(), SeExprEdChannelSlider::setValue(), and SeExprEdVectorEditable::v.
Referenced by SeExprEdVectorControl(), and setValue().
SeExprEdLineEdit* SeExprEdVectorControl::_edits[3] [private] |
All three line edit widgets (for each component).
Definition at line 184 of file SeExprEdControl.h.
Referenced by SeExprEdVectorControl(), and updateControl().
Number model.
Definition at line 182 of file SeExprEdControl.h.
Referenced by getColor(), SeExprEdVectorControl(), setValue(), sliderChanged(), and updateControl().
SeExprEdChannelSlider* SeExprEdVectorControl::_sliders[3] [private] |
All three channel sliders (for each component).
Definition at line 185 of file SeExprEdControl.h.
Referenced by SeExprEdVectorControl(), and updateControl().
Definition at line 185 of file SeExprEdControl.h.
Referenced by SeExprEdVectorControl(), setValue(), and swatchChanged().