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

#include <ExprEditor.h>

Inheritance diagram for ExprEditor:

Public Slots

void exprChanged ()
 
void rebuildControls ()
 
void controlChanged (int id)
 
void nextError ()
 
void selectError ()
 
void sendApply ()
 
void sendPreview ()
 
void insertStr (const std::string &str)
 

Signals

void apply ()
 
void preview ()
 

Public Member Functions

 ExprEditor (QWidget *parent, ExprControlCollection *controls)
 
virtual ~ExprEditor ()
 
std::string getExpr ()
 
void setExpr (const std::string &expression, const bool apply=false)
 
void appendStr (const std::string &str)
 
void addError (const int startPos, const int endPos, const std::string &error)
 
void clearErrors ()
 
void clearExtraCompleters ()
 
void registerExtraFunction (const std::string &name, const std::string &docString)
 
void registerExtraVariable (const std::string &name, const std::string &docString)
 
void replaceExtras (const ExprCompletionModel &completer)
 
void updateCompleter ()
 
void updateStyle ()
 

Private Attributes

ExprTextEditexprTe
 
ExprControlCollectioncontrols
 
QListWidget * errorWidget
 
QTimer * controlRebuildTimer
 
QTimer * previewTimer
 
bool _updatingText
 
int errorHeight
 

Detailed Description

Definition at line 97 of file ExprEditor.h.

Constructor & Destructor Documentation

ExprEditor::ExprEditor ( QWidget *  parent,
ExprControlCollection controls 
)
ExprEditor::~ExprEditor ( )
virtual

Definition at line 90 of file ExprEditor.cpp.

References controlRebuildTimer, and previewTimer.

Member Function Documentation

void ExprEditor::addError ( const int  startPos,
const int  endPos,
const std::string &  error 
)

Definition at line 425 of file ExprEditor.cpp.

References errorHeight, and errorWidget.

Referenced by ExprDialog::applyExpression().

void ExprEditor::appendStr ( const std::string &  str)

Definition at line 420 of file ExprEditor.cpp.

References exprTe.

void ExprEditor::apply ( )
signal

Referenced by sendApply(), and setExpr().

void ExprEditor::clearErrors ( )

Definition at line 450 of file ExprEditor.cpp.

References errorHeight, and errorWidget.

Referenced by ExprDialog::applyExpression(), ExprEditor(), and setExpr().

void ExprEditor::clearExtraCompleters ( )
void ExprEditor::controlChanged ( int  id)
slot

Definition at line 75 of file ExprEditor.cpp.

References _updatingText, controls, exprTe, previewTimer, and ExprControlCollection::updateText().

Referenced by ExprEditor().

void ExprEditor::exprChanged ( )
slot

Definition at line 174 of file ExprEditor.cpp.

References _updatingText, and controlRebuildTimer.

Referenced by ExprEditor().

std::string ExprEditor::getExpr ( )
void ExprEditor::insertStr ( const std::string &  str)
slot

Definition at line 415 of file ExprEditor.cpp.

References exprTe.

Referenced by ExprEditor().

void ExprEditor::nextError ( )
slot

Definition at line 443 of file ExprEditor.cpp.

References errorWidget.

Referenced by ExprDialog::applyExpression(), and ExprEditor().

void ExprEditor::preview ( )
signal

Referenced by sendPreview().

void ExprEditor::rebuildControls ( )
slot
void ExprEditor::registerExtraFunction ( const std::string &  name,
const std::string &  docString 
)
void ExprEditor::registerExtraVariable ( const std::string &  name,
const std::string &  docString 
)
void ExprEditor::replaceExtras ( const ExprCompletionModel completer)
void ExprEditor::selectError ( )
slot

Definition at line 151 of file ExprEditor.cpp.

References errorWidget, and exprTe.

Referenced by ExprEditor().

void ExprEditor::sendApply ( )
slot

Definition at line 164 of file ExprEditor.cpp.

References apply().

Referenced by ExprEditor().

void ExprEditor::sendPreview ( )
slot

Definition at line 169 of file ExprEditor.cpp.

References preview().

Referenced by ExprEditor().

void ExprEditor::setExpr ( const std::string &  expression,
const bool  apply = false 
)
void ExprEditor::updateCompleter ( )

Definition at line 478 of file ExprEditor.cpp.

References ExprTextEdit::completer, ExprTextEdit::completionModel, and exprTe.

void ExprEditor::updateStyle ( )

Definition at line 483 of file ExprEditor.cpp.

References exprTe, and ExprTextEdit::updateStyle().

Member Data Documentation

bool ExprEditor::_updatingText
private

Definition at line 153 of file ExprEditor.h.

Referenced by controlChanged(), and exprChanged().

QTimer* ExprEditor::controlRebuildTimer
private

Definition at line 149 of file ExprEditor.h.

Referenced by exprChanged(), ExprEditor(), and ~ExprEditor().

ExprControlCollection* ExprEditor::controls
private

Definition at line 146 of file ExprEditor.h.

Referenced by controlChanged(), ExprEditor(), and rebuildControls().

int ExprEditor::errorHeight
private

Definition at line 154 of file ExprEditor.h.

Referenced by addError(), and clearErrors().

QListWidget* ExprEditor::errorWidget
private

Definition at line 147 of file ExprEditor.h.

Referenced by addError(), clearErrors(), ExprEditor(), nextError(), and selectError().

ExprTextEdit* ExprEditor::exprTe
private
QTimer* ExprEditor::previewTimer
private

Definition at line 150 of file ExprEditor.h.

Referenced by controlChanged(), ExprEditor(), and ~ExprEditor().


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