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 94 of file ExprEditor.h.

Constructor & Destructor Documentation

◆ ExprEditor()

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

◆ ~ExprEditor()

ExprEditor::~ExprEditor ( )
virtual

Definition at line 85 of file ExprEditor.cpp.

References controlRebuildTimer, and previewTimer.

Member Function Documentation

◆ addError()

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

Definition at line 388 of file ExprEditor.cpp.

References errorHeight, and errorWidget.

Referenced by ExprDialog::applyExpression().

◆ appendStr()

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

Definition at line 386 of file ExprEditor.cpp.

References exprTe.

◆ apply

void ExprEditor::apply ( )
signal

Referenced by sendApply(), and setExpr().

◆ clearErrors()

void ExprEditor::clearErrors ( )

Definition at line 411 of file ExprEditor.cpp.

References errorHeight, and errorWidget.

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

◆ clearExtraCompleters()

void ExprEditor::clearExtraCompleters ( )

◆ controlChanged

void ExprEditor::controlChanged ( int  id)
slot

Definition at line 71 of file ExprEditor.cpp.

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

Referenced by ExprEditor().

◆ exprChanged

void ExprEditor::exprChanged ( )
slot

Definition at line 157 of file ExprEditor.cpp.

References _updatingText, and controlRebuildTimer.

Referenced by ExprEditor().

◆ getExpr()

std::string ExprEditor::getExpr ( )

◆ insertStr

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

Definition at line 384 of file ExprEditor.cpp.

References exprTe.

Referenced by ExprEditor().

◆ nextError

void ExprEditor::nextError ( )
slot

Definition at line 405 of file ExprEditor.cpp.

References errorWidget.

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

◆ preview

void ExprEditor::preview ( )
signal

Referenced by sendPreview().

◆ rebuildControls

void ExprEditor::rebuildControls ( )
slot

◆ registerExtraFunction()

void ExprEditor::registerExtraFunction ( const std::string &  name,
const std::string &  docString 
)

◆ registerExtraVariable()

void ExprEditor::registerExtraVariable ( const std::string &  name,
const std::string &  docString 
)

◆ replaceExtras()

void ExprEditor::replaceExtras ( const ExprCompletionModel completer)

◆ selectError

void ExprEditor::selectError ( )
slot

Definition at line 141 of file ExprEditor.cpp.

References errorWidget, and exprTe.

Referenced by ExprEditor().

◆ sendApply

void ExprEditor::sendApply ( )
slot

Definition at line 153 of file ExprEditor.cpp.

References apply().

Referenced by ExprEditor().

◆ sendPreview

void ExprEditor::sendPreview ( )
slot

Definition at line 155 of file ExprEditor.cpp.

References preview().

Referenced by ExprEditor().

◆ setExpr()

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

◆ updateCompleter()

void ExprEditor::updateCompleter ( )

Definition at line 432 of file ExprEditor.cpp.

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

◆ updateStyle()

void ExprEditor::updateStyle ( )

Definition at line 434 of file ExprEditor.cpp.

References exprTe, and ExprTextEdit::updateStyle().

Member Data Documentation

◆ _updatingText

bool ExprEditor::_updatingText
private

Definition at line 153 of file ExprEditor.h.

Referenced by controlChanged(), and exprChanged().

◆ controlRebuildTimer

QTimer* ExprEditor::controlRebuildTimer
private

Definition at line 150 of file ExprEditor.h.

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

◆ controls

ExprControlCollection* ExprEditor::controls
private

Definition at line 147 of file ExprEditor.h.

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

◆ errorHeight

int ExprEditor::errorHeight
private

Definition at line 154 of file ExprEditor.h.

Referenced by addError(), and clearErrors().

◆ errorWidget

QListWidget* ExprEditor::errorWidget
private

Definition at line 148 of file ExprEditor.h.

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

◆ exprTe

ExprTextEdit* ExprEditor::exprTe
private

◆ previewTimer

QTimer* ExprEditor::previewTimer
private

Definition at line 151 of file ExprEditor.h.

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


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