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::ExprControlCollection ( QWidget *  parent = 0,
bool  showAddButton = true 
)

Definition at line 40 of file ExprControlCollection.cpp.

References addControlDialog(), controlLayout, and showAddButton.

◆ ~ExprControlCollection()

ExprControlCollection::~ExprControlCollection ( )

Definition at line 59 of file ExprControlCollection.cpp.

References editableExpression.

Member Function Documentation

◆ addControlDialog

void ExprControlCollection::addControlDialog ( )
privateslot

◆ controlChanged

void ExprControlCollection::controlChanged ( int  id)
signal

Notification that a specific control was changed.

Referenced by rebuildControls(), and singleControlChanged().

◆ insertString

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().

◆ linkColorEdited

void ExprControlCollection::linkColorEdited ( int  id,
QColor  color 
)
privateslot

Notification by a control that a color is edited (when it is linked)

Definition at line 431 of file ExprControlCollection.cpp.

References _linkedId, and linkColorOutput().

Referenced by rebuildControls().

◆ linkColorInput

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 435 of file ExprControlCollection.cpp.

References _controls, and _linkedId.

◆ linkColorLink

void ExprControlCollection::linkColorLink ( int  id)
privateslot

Notification by a control that a new color link is desired.

Definition at line 424 of file ExprControlCollection.cpp.

References _controls, and _linkedId.

Referenced by rebuildControls().

◆ linkColorOutput

void ExprControlCollection::linkColorOutput ( QColor  color)
signal

Gives information about when a link color was changed.

Referenced by linkColorEdited().

◆ numControls()

int ExprControlCollection::numControls ( )
inline

Number of controls.

Definition at line 107 of file ExprControlCollection.h.

References _controls.

Referenced by ExprShortEdit::rebuildControls().

◆ rebuildControls()

bool ExprControlCollection::rebuildControls ( const QString &  expressionText,
std::vector< QString > &  variables 
)

◆ setAnimCurveCallback()

static void ExprControlCollection::setAnimCurveCallback ( AnimCurveControl::AnimCurveCallback  callback)
inlinestatic

Anim curve callback.

Definition at line 112 of file ExprControlCollection.h.

References AnimCurveControl::setAnimCurveCallback().

◆ showEditor()

void ExprControlCollection::showEditor ( int  idx)

Definition at line 413 of file ExprControlCollection.cpp.

References _controls, and AnimCurveControl::editGraphClicked().

Referenced by ExprDialog::_showEditor().

◆ singleControlChanged

void ExprControlCollection::singleControlChanged ( int  id)
privateslot

Notification when by a control whenever it is edited.

Definition at line 446 of file ExprControlCollection.cpp.

References controlChanged().

Referenced by rebuildControls().

◆ updateText()

void ExprControlCollection::updateText ( const int  id,
QString &  text 
)

Request new text, given taking into account control id's new values.

Definition at line 441 of file ExprControlCollection.cpp.

References editableExpression, and EditableExpression::getEditedExpr().

Referenced by ExprEditor::controlChanged(), and ExprShortEdit::controlChanged().

Member Data Documentation

◆ _controls

std::vector<ExprControl *> ExprControlCollection::_controls
private

◆ _linkedId

int ExprControlCollection::_linkedId
private

◆ controlLayout

QVBoxLayout* ExprControlCollection::controlLayout
private

Definition at line 98 of file ExprControlCollection.h.

Referenced by ExprControlCollection(), and rebuildControls().

◆ count

int ExprControlCollection::count
private

Definition at line 85 of file ExprControlCollection.h.

Referenced by addControlDialog().

◆ editableExpression

EditableExpression* ExprControlCollection::editableExpression
private

Definition at line 89 of file ExprControlCollection.h.

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

◆ showAddButton

bool ExprControlCollection::showAddButton
private

Definition at line 86 of file ExprControlCollection.h.

Referenced by ExprControlCollection(), and rebuildControls().


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