SeExpr
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
VectorControl Class Reference

A vector or color control (named vector because it edits a SeExpr2::Vec3d literal) More...

#include <ExprControl.h>

Inheritance diagram for VectorControl:
ExprControl

Public Member Functions

 VectorControl (int id, VectorEditable *number)
 
QColor getColor ()
 Interface for getting the color (used for linked color picking) More...
 
void setColor (QColor color)
 Interface for setting the color (used for linked color picking) More...
 
- Public Member Functions inherited from ExprControl
 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) More...
 
void updateControl ()
 update the individual slider and eidt box controls More...
 

Private Attributes

VectorEditable_numberEditable
 Number model. More...
 
ExprLineEdit_edits [3]
 All three line edit widgets (for each component) More...
 
ExprCSwatchFrame_swatch
 
ExprChannelSlider_sliders [3]
 All three channel sliders (for each component) More...
 

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 Attributes inherited from ExprControl
int _id
 
bool _updating
 
QHBoxLayout * hbox
 
QCheckBox * _colorLinkCB
 
QLabel * _label
 
Editable_editable
 

Detailed Description

A vector or color control (named vector because it edits a SeExpr2::Vec3d literal)

Definition at line 187 of file ExprControl.h.

Constructor & Destructor Documentation

VectorControl::VectorControl ( int  id,
VectorEditable number 
)

Member Function Documentation

void VectorControl::editChanged ( int  id,
const QString &  text 
)
privateslot

Definition at line 450 of file ExprControl.cpp.

References ExprControl::_updating, and setValue().

Referenced by VectorControl().

QColor VectorControl::getColor ( )
virtual

Interface for getting the color (used for linked color picking)

Reimplemented from ExprControl.

Definition at line 429 of file ExprControl.cpp.

References _numberEditable, SeExpr2::clamp(), and VectorEditable::v.

Referenced by sliderChanged().

void VectorControl::setColor ( QColor  color)
virtual

Interface for setting the color (used for linked color picking)

Reimplemented from ExprControl.

Definition at line 436 of file ExprControl.cpp.

References setValue().

void VectorControl::setValue ( int  id,
float  value 
)
private

set the value in the model (in response to editing from controls)

Definition at line 487 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().

void VectorControl::sliderChanged ( int  id,
float  val 
)
privateslot
void VectorControl::swatchChanged ( QColor  color)
privateslot

Definition at line 420 of file ExprControl.cpp.

References _swatch, ExprCSwatchFrame::getValue(), and setValue().

Referenced by VectorControl().

void VectorControl::updateControl ( )
private

Member Data Documentation

ExprLineEdit* VectorControl::_edits[3]
private

All three line edit widgets (for each component)

Definition at line 194 of file ExprControl.h.

Referenced by updateControl(), and VectorControl().

VectorEditable* VectorControl::_numberEditable
private

Number model.

Definition at line 192 of file ExprControl.h.

Referenced by getColor(), setValue(), sliderChanged(), updateControl(), and VectorControl().

ExprChannelSlider* VectorControl::_sliders[3]
private

All three channel sliders (for each component)

Definition at line 195 of file ExprControl.h.

Referenced by updateControl(), and VectorControl().

ExprCSwatchFrame* VectorControl::_swatch
private

Definition at line 195 of file ExprControl.h.

Referenced by setValue(), swatchChanged(), and VectorControl().


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