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