#include <SeExprEdControlCollection.h>
Public Slots | |
void | linkColorInput (QColor color) |
Signals | |
void | controlChanged (int id) |
Notification that a specific control was changed. | |
void | linkColorOutput (QColor color) |
Gives information about when a link color was changed. | |
void | insertString (const std::string &controlString) |
Public Member Functions | |
SeExprEdControlCollection (QWidget *parent=0, bool showAddButton=true) | |
~SeExprEdControlCollection () | |
void | updateText (const int id, QString &text) |
Request new text, given taking into account control id's new values. | |
bool | rebuildControls (const QString &expressionText, std::vector< QString > &variables) |
Rebuild the controls given the new expressionText. Return any local variables found. | |
int | numControls () |
Number of controls. | |
void | showEditor (int idx) |
Static Public Member Functions | |
static void | setAnimCurveCallback (SeExprEdAnimCurveControl::AnimCurveCallback callback) |
Anim curve callback. | |
Private Slots | |
void | addControlDialog () |
When a user clicks "Add Widget" button. | |
void | singleControlChanged (int id) |
Notification when by a control whenever it is edited. | |
void | linkColorLink (int id) |
Notification by a control that a new color link is desired. | |
void | linkColorEdited (int id, QColor color) |
Notification by a control that a color is edited (when it is linked). | |
Private Attributes | |
int | _linkedId |
int | count |
bool | showAddButton |
SeExprEdEditableExpression * | editableExpression |
std::vector< SeExprEdControl * > | _controls |
QVBoxLayout * | controlLayout |
Widget that holds and manages controls for a SeExpression This is typically used by a SeExprEditor or a SeExprEdShortEdit widget This widget also is responsible for finding all user local variables (for use in autocomplete)
Definition at line 68 of file SeExprEdControlCollection.h.
SeExprEdControlCollection::SeExprEdControlCollection | ( | QWidget * | parent = 0 , |
|
bool | showAddButton = true | |||
) |
Definition at line 33 of file SeExprEdControlCollection.cpp.
References addControlDialog(), and controlLayout.
SeExprEdControlCollection::~SeExprEdControlCollection | ( | ) |
Definition at line 53 of file SeExprEdControlCollection.cpp.
References editableExpression.
void SeExprEdControlCollection::addControlDialog | ( | ) | [private, slot] |
When a user clicks "Add Widget" button.
Definition at line 234 of file SeExprEdControlCollection.cpp.
References SeExprEdAddDialog::animCurveLink, SeExprEdAddDialog::animCurveLookup, SeExprEdAddDialog::color, SeExprEdAddDialog::colorCurveLookup, count, SeExprEdAddDialog::curveLookup, SeExprEdAddDialog::floatDefault, SeExprEdAddDialog::floatMax, SeExprEdAddDialog::floatMin, insertString(), SeExprEdAddDialog::intDefault, SeExprEdAddDialog::intMax, SeExprEdAddDialog::intMin, SeExprEdAddDialog::stringDefaultWidget, SeExprEdAddDialog::stringNameWidget, SeExprEdAddDialog::stringTypeWidget, SeExprEdAddDialog::tabWidget, SeExprEdAddDialog::variableName, SeExprEdAddDialog::vectorDefault0, SeExprEdAddDialog::vectorDefault1, SeExprEdAddDialog::vectorDefault2, SeExprEdAddDialog::vectorMax, and SeExprEdAddDialog::vectorMin.
Referenced by SeExprEdControlCollection().
void SeExprEdControlCollection::controlChanged | ( | int | id | ) | [signal] |
Notification that a specific control was changed.
Referenced by rebuildControls(), and singleControlChanged().
void SeExprEdControlCollection::insertString | ( | const std::string & | controlString | ) | [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().
void SeExprEdControlCollection::linkColorEdited | ( | int | id, | |
QColor | color | |||
) | [private, slot] |
Notification by a control that a color is edited (when it is linked).
Definition at line 390 of file SeExprEdControlCollection.cpp.
References _linkedId, and linkColorOutput().
Referenced by rebuildControls().
void SeExprEdControlCollection::linkColorInput | ( | QColor | color | ) | [slot] |
Notification from outside that a linked color widget was changed and should be forwarded to any linked controls
Definition at line 398 of file SeExprEdControlCollection.cpp.
void SeExprEdControlCollection::linkColorLink | ( | int | id | ) | [private, slot] |
Notification by a control that a new color link is desired.
Definition at line 381 of file SeExprEdControlCollection.cpp.
References _controls, and _linkedId.
Referenced by rebuildControls().
void SeExprEdControlCollection::linkColorOutput | ( | QColor | color | ) | [signal] |
Gives information about when a link color was changed.
Referenced by linkColorEdited().
int SeExprEdControlCollection::numControls | ( | ) | [inline] |
Number of controls.
Definition at line 93 of file SeExprEdControlCollection.h.
References _controls.
Referenced by SeExprEdShortEdit::rebuildControls().
bool SeExprEdControlCollection::rebuildControls | ( | const QString & | expressionText, | |
std::vector< QString > & | variables | |||
) |
Rebuild the controls given the new expressionText. Return any local variables found.
Definition at line 293 of file SeExprEdControlCollection.cpp.
References _controls, _linkedId, controlChanged(), controlLayout, SeExprEdEditableExpression::controlsMatch(), editableExpression, SeExprEdEditableExpression::getVariables(), linkColorEdited(), linkColorLink(), SeExprEdEditableExpression::setExpr(), showAddButton, singleControlChanged(), SeExprEdEditableExpression::size(), SeExprEdEditableExpression::updateString(), and x.
Referenced by SeExprEdShortEdit::rebuildControls(), and SeExprEditor::rebuildControls().
static void SeExprEdControlCollection::setAnimCurveCallback | ( | SeExprEdAnimCurveControl::AnimCurveCallback | callback | ) | [inline, static] |
Anim curve callback.
Definition at line 98 of file SeExprEdControlCollection.h.
void SeExprEdControlCollection::showEditor | ( | int | idx | ) |
Definition at line 366 of file SeExprEdControlCollection.cpp.
References _controls, and SeExprEdAnimCurveControl::editGraphClicked().
Referenced by SeExprEdDialog::_showEditor().
void SeExprEdControlCollection::singleControlChanged | ( | int | id | ) | [private, slot] |
Notification when by a control whenever it is edited.
Definition at line 414 of file SeExprEdControlCollection.cpp.
References controlChanged().
Referenced by rebuildControls().
void SeExprEdControlCollection::updateText | ( | const int | id, | |
QString & | text | |||
) |
Request new text, given taking into account control id's new values.
Definition at line 406 of file SeExprEdControlCollection.cpp.
References editableExpression, and SeExprEdEditableExpression::getEditedExpr().
Referenced by SeExprEdShortEdit::controlChanged(), and SeExprEditor::controlChanged().
std::vector<SeExprEdControl*> SeExprEdControlCollection::_controls [private] |
Definition at line 84 of file SeExprEdControlCollection.h.
Referenced by linkColorInput(), linkColorLink(), numControls(), rebuildControls(), and showEditor().
int SeExprEdControlCollection::_linkedId [private] |
Definition at line 70 of file SeExprEdControlCollection.h.
Referenced by linkColorEdited(), linkColorInput(), linkColorLink(), and rebuildControls().
QVBoxLayout* SeExprEdControlCollection::controlLayout [private] |
Definition at line 85 of file SeExprEdControlCollection.h.
Referenced by rebuildControls(), and SeExprEdControlCollection().
int SeExprEdControlCollection::count [private] |
Definition at line 73 of file SeExprEdControlCollection.h.
Referenced by addControlDialog().
Definition at line 77 of file SeExprEdControlCollection.h.
Referenced by rebuildControls(), updateText(), and ~SeExprEdControlCollection().
bool SeExprEdControlCollection::showAddButton [private] |
Definition at line 74 of file SeExprEdControlCollection.h.
Referenced by rebuildControls().