17 #ifndef _ExprControl_h_
18 #define _ExprControl_h_
19 #include <QtGui/QTextBrowser>
20 #include <QtGui/QPlainTextEdit>
21 #include <QtGui/QDialog>
22 #include <QtCore/QTimer>
23 #include <QtCore/QRegExp>
24 #include <QtGui/QLineEdit>
25 #include <QtGui/QCheckBox>
26 #include <QtGui/QSlider>
73 virtual void setColor(QColor color){Q_UNUSED(color)};
92 template<
class T,
class T2,
class T3> T
clamp(
const T val,
const T2 minval,
const T3 maxval)
94 if(val<minval)
return minval;
95 else if(val>maxval)
return maxval;
109 QLineEdit::setText(t);
130 : QSlider(orientation, parent) {}
134 virtual void leaveEvent(QEvent* event ) { Q_UNUSED(event); update(); }
135 virtual void enterEvent(QEvent* event ) { Q_UNUSED(event); update(); }
void editChanged(int id, const QString &text)
void linkColorEdited(int id, QColor color)
void colorChanged(int index, SeExpr2::Vec3d value)
Control for editing a normal curve ramp.
virtual void mouseMoveEvent(QMouseEvent *e)
void linkColorLink(int id)
SeExpr2::CurveFuncX curve
DeepWaterControl(int id, DeepWaterEditable *stringEditable)
void colorAdded(int index, SeExpr2::Vec3d value)
Generic Slider (used for int and float sliders)
virtual void paintEvent(QPaintEvent *e)
void editChanged(int id, const QString &text)
StringControl(int id, StringEditable *stringEditable)
A control for editing color swatches.
void linkStateChange(int state)
ExprLineEdit * _edits[3]
All three line edit widgets (for each component)
void swatchChanged(QColor color)
DeepWaterEditable * _deepWaterEditable
curve model
virtual QColor getColor()
Interface for getting the color (used for linked color picking)
ExprCurve * _curve
curve edit widget
Control for displaying a deep water spectrum.
QLineEdit * _edit
Edit box for the string.
ExprChannelSlider(int id, QWidget *parent)
A vector or color control (named vector because it edits a SeExpr2::Vec3d literal) ...
GenericCurveEditable< double > CurveEditable
void updateControl()
Update values in slider and textbox given what the model contains.
ExprCSwatchFrame * _swatch
void updateControl()
update the individual slider and eidt box controls
virtual void paintEvent(QPaintEvent *e)
void colorRemoved(int index)
void(* AnimCurveCallback)(const std::string &, animlib::AnimCurve &curve)
ExprColorSwatchWidget * _swatch
Edit box for the color swatches.
ExprSlider(Qt::Orientation orientation, QWidget *parent=0)
void setValue(int id, float value)
set the value in the model (in response to editing from controls)
A control for editing strings, filenames, and directories.
void valueChanged(int id, float value)
void controlChanged(int id)
virtual void leaveEvent(QEvent *event)
For any rgb or hsl value(except for negative s values)
ColorSwatchEditable * _swatchEditable
model for the color swatches control
ExprSlider * _slider
Slider for the number.
void setValue(float value)
ColorSwatchControl(int id, ColorSwatchEditable *swatchEditable)
virtual void wheelEvent(QWheelEvent *e)
ColorCurveEditable * _curveEditable
color curve model
void sliderChanged(int id, float val)
The result is computed int int< br >< divstyle="margin-left:40px;"> Picks values randomly between loRange and hiRange based on supplied index(which is automatically hashed). 
static void setAnimCurveCallback(AnimCurveCallback callback)
void linkDisconnect(int newId)
CurveControl(int id, CurveEditable *stringEditable)
QColor getColor()
Interface for getting the color (used for linked color picking)
virtual void wheelEvent(QWheelEvent *e)
virtual void mouseMoveEvent(QMouseEvent *e)
ExprSlider(QWidget *parent=0)
void setColor(QColor color)
Interface for setting the color (used for linked color picking)
Line Editor Widget(used for numbers)
ExprControl(int id, Editable *editable, bool showColorLink)
void setDisplayColor(QColor c)
ExprLineEdit(int id, QWidget *parent)
CurveEditable * _curveEditable
curve model
NumberEditable * _numberEditable
Pointer to the number control model.
void setValue(float value)
Update the model with the value and notify the collection.
ExprDeepWater * _deepWater
deep water widget
ExprLineEdit * _edit
Text box for the number.
virtual void mousePressEvent(QMouseEvent *e)
ExprGraphPreview * _preview
Base class for all controls for Expressions.
StringEditable * _stringEditable
model for the string control
NumberControl(int id, NumberEditable *number)
QColor getColor()
Interface for getting the color (used for linked color picking)
double clamp(double x, double lo, double hi)
CCurveControl(int id, ColorCurveEditable *stringEditable)
ExprColorCurve * _curve
color curve widget
void textChanged(const QString &newText)
virtual void setColor(QColor color)
Interface for setting the color (used for linked color picking)
AnimCurveControl(int id, AnimCurveEditable *curveEditable)
virtual void enterEvent(QEvent *event)
Channel Slider (i.e. for colors)
static AnimCurveCallback callback
void textChangedCB(const QString &text)
void textChanged(int id, const QString &text)
VectorControl(int id, VectorEditable *number)
GenericCurveEditable< SeExpr2::Vec3d > ColorCurveEditable
Number slider for either float or int data.
virtual void mousePressEvent(QMouseEvent *e)
virtual void setText(const QString &t)
VectorEditable * _numberEditable
Number model.
void sliderChanged(int val)
ExprChannelSlider * _sliders[3]
All three channel sliders (for each component)
Control for editing a color ramp curve.
void setColor(QColor color)
Interface for setting the color (used for linked color picking)
AnimCurveEditable * _editable