SeExpr
|
#include <ExprControlCollection.h>
Public Slots | |
void | linkColorInput (QColor color) |
Signals | |
void | controlChanged (int id) |
Notification that a specific control was changed. More... | |
void | linkColorOutput (QColor color) |
Gives information about when a link color was changed. More... | |
void | insertString (const std::string &controlString) |
Public Member Functions | |
ExprControlCollection (QWidget *parent=0, bool showAddButton=true) | |
~ExprControlCollection () | |
void | updateText (const int id, QString &text) |
Request new text, given taking into account control id's new values. More... | |
bool | rebuildControls (const QString &expressionText, std::vector< QString > &variables) |
Rebuild the controls given the new expressionText. Return any local variables found. More... | |
int | numControls () |
Number of controls. More... | |
void | showEditor (int idx) |
Static Public Member Functions | |
static void | setAnimCurveCallback (AnimCurveControl::AnimCurveCallback callback) |
Anim curve callback. More... | |
Private Slots | |
void | addControlDialog () |
When a user clicks "Add Widget" button. More... | |
void | singleControlChanged (int id) |
Notification when by a control whenever it is edited. More... | |
void | linkColorLink (int id) |
Notification by a control that a new color link is desired. More... | |
void | linkColorEdited (int id, QColor color) |
Notification by a control that a color is edited (when it is linked) More... | |
Private Attributes | |
int | _linkedId |
int | count |
bool | showAddButton |
EditableExpression * | editableExpression |
std::vector< ExprControl * > | _controls |
QVBoxLayout * | controlLayout |
Widget that holds and manages controls for an Expression This is typically used by an ExprEditor or a ExprShortEdit widget This widget also is responsible for finding all user local variables (for use in autocomplete)
Definition at line 81 of file ExprControlCollection.h.
ExprControlCollection::ExprControlCollection | ( | QWidget * | parent = 0 , |
bool | showAddButton = true |
||
) |
Definition at line 41 of file ExprControlCollection.cpp.
References addControlDialog(), and controlLayout.
ExprControlCollection::~ExprControlCollection | ( | ) |
Definition at line 61 of file ExprControlCollection.cpp.
References editableExpression.
|
privateslot |
When a user clicks "Add Widget" button.
Definition at line 279 of file ExprControlCollection.cpp.
References ExprAddDialog::animCurveLink, ExprAddDialog::animCurveLookup, ExprAddDialog::color, ExprAddDialog::colorCurveLookup, count, ExprAddDialog::curveLookup, ExprAddDialog::deepWaterLookup, ExprAddDialog::floatDefault, ExprAddDialog::floatMax, ExprAddDialog::floatMin, ExprAddDialog::initSwatch(), insertString(), ExprAddDialog::intDefault, ExprAddDialog::intMax, ExprAddDialog::intMin, ExprAddDialog::stringDefaultWidget, ExprAddDialog::stringNameWidget, ExprAddDialog::stringTypeWidget, ExprAddDialog::swatchLookup, ExprAddDialog::tabWidget, ExprAddDialog::variableName, ExprAddDialog::vectorDefault0, ExprAddDialog::vectorDefault1, ExprAddDialog::vectorDefault2, ExprAddDialog::vectorMax, and ExprAddDialog::vectorMin.
Referenced by ExprControlCollection().
|
signal |
Notification that a specific control was changed.
Referenced by rebuildControls(), and singleControlChanged().
|
signal |
Emitted to request that a new widget string should be added to the expression i.e. after "Add Widget" was used
Referenced by addControlDialog().
|
privateslot |
Notification by a control that a color is edited (when it is linked)
Definition at line 449 of file ExprControlCollection.cpp.
References _linkedId, and linkColorOutput().
Referenced by rebuildControls().
|
slot |
Notification from outside that a linked color widget was changed and should be forwarded to any linked controls
Definition at line 457 of file ExprControlCollection.cpp.
|
privateslot |
Notification by a control that a new color link is desired.
Definition at line 440 of file ExprControlCollection.cpp.
References _controls, and _linkedId.
Referenced by rebuildControls().
|
signal |
Gives information about when a link color was changed.
Referenced by linkColorEdited().
|
inline |
Number of controls.
Definition at line 106 of file ExprControlCollection.h.
References _controls.
Referenced by ExprShortEdit::rebuildControls().
bool ExprControlCollection::rebuildControls | ( | const QString & | expressionText, |
std::vector< QString > & | variables | ||
) |
Rebuild the controls given the new expressionText. Return any local variables found.
Definition at line 349 of file ExprControlCollection.cpp.
References _controls, _linkedId, controlChanged(), controlLayout, EditableExpression::controlsMatch(), editableExpression, EditableExpression::getVariables(), linkColorEdited(), linkColorLink(), EditableExpression::setExpr(), showAddButton, singleControlChanged(), EditableExpression::size(), EditableExpression::updateString(), and x.
Referenced by ExprEditor::rebuildControls(), and ExprShortEdit::rebuildControls().
|
inlinestatic |
Anim curve callback.
Definition at line 111 of file ExprControlCollection.h.
References AnimCurveControl::setAnimCurveCallback().
void ExprControlCollection::showEditor | ( | int | idx | ) |
Definition at line 425 of file ExprControlCollection.cpp.
References _controls, and AnimCurveControl::editGraphClicked().
Referenced by ExprDialog::_showEditor().
|
privateslot |
Notification when by a control whenever it is edited.
Definition at line 473 of file ExprControlCollection.cpp.
References controlChanged().
Referenced by rebuildControls().
void ExprControlCollection::updateText | ( | const int | id, |
QString & | text | ||
) |
Request new text, given taking into account control id's new values.
Definition at line 465 of file ExprControlCollection.cpp.
References editableExpression, and EditableExpression::getEditedExpr().
Referenced by ExprEditor::controlChanged(), and ExprShortEdit::controlChanged().
|
private |
Definition at line 97 of file ExprControlCollection.h.
Referenced by linkColorInput(), linkColorLink(), numControls(), rebuildControls(), and showEditor().
|
private |
Definition at line 83 of file ExprControlCollection.h.
Referenced by linkColorEdited(), linkColorInput(), linkColorLink(), and rebuildControls().
|
private |
Definition at line 98 of file ExprControlCollection.h.
Referenced by ExprControlCollection(), and rebuildControls().
|
private |
Definition at line 86 of file ExprControlCollection.h.
Referenced by addControlDialog().
|
private |
Definition at line 90 of file ExprControlCollection.h.
Referenced by rebuildControls(), updateText(), and ~ExprControlCollection().
|
private |
Definition at line 87 of file ExprControlCollection.h.
Referenced by rebuildControls().