SeExpr
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Private Slots | Private Attributes | List of all members
ExprControlCollection Class Reference

#include <ExprControlCollection.h>

Inheritance diagram for ExprControlCollection:

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
 
EditableExpressioneditableExpression
 
std::vector< ExprControl * > _controls
 
QVBoxLayout * controlLayout
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

void ExprControlCollection::addControlDialog ( )
privateslot
void ExprControlCollection::controlChanged ( int  id)
signal

Notification that a specific control was changed.

Referenced by rebuildControls(), and singleControlChanged().

void ExprControlCollection::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 ExprControlCollection::linkColorEdited ( int  id,
QColor  color 
)
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().

void ExprControlCollection::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 457 of file ExprControlCollection.cpp.

References _controls, and _linkedId.

void ExprControlCollection::linkColorLink ( int  id)
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().

void ExprControlCollection::linkColorOutput ( QColor  color)
signal

Gives information about when a link color was changed.

Referenced by linkColorEdited().

int ExprControlCollection::numControls ( )
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 
)
static void ExprControlCollection::setAnimCurveCallback ( AnimCurveControl::AnimCurveCallback  callback)
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().

void ExprControlCollection::singleControlChanged ( int  id)
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().

Member Data Documentation

std::vector<ExprControl*> ExprControlCollection::_controls
private
int ExprControlCollection::_linkedId
private
QVBoxLayout* ExprControlCollection::controlLayout
private

Definition at line 98 of file ExprControlCollection.h.

Referenced by ExprControlCollection(), and rebuildControls().

int ExprControlCollection::count
private

Definition at line 86 of file ExprControlCollection.h.

Referenced by addControlDialog().

EditableExpression* ExprControlCollection::editableExpression
private

Definition at line 90 of file ExprControlCollection.h.

Referenced by rebuildControls(), updateText(), and ~ExprControlCollection().

bool ExprControlCollection::showAddButton
private

Definition at line 87 of file ExprControlCollection.h.

Referenced by rebuildControls().


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