KSeExpr 6.0.0.0
Public Slots | Signals | Public Member Functions | Public Attributes | 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 QString &str)
 

Signals

void apply ()
 
void preview ()
 

Public Member Functions

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

Public Attributes

ExprTextEditexprTe {nullptr}
 

Private Attributes

ExprControlCollectioncontrols {nullptr}
 
QListWidget * errorWidget {nullptr}
 
QTimer * controlRebuildTimer {nullptr}
 
QTimer * previewTimer {nullptr}
 
std::atomic< bool > _updatingText {false}
 
int errorHeight
 

Detailed Description

Definition at line 19 of file ExprEditor.h.

Constructor & Destructor Documentation

◆ ExprEditor()

ExprEditor::ExprEditor ( QWidget *  parent)

◆ ~ExprEditor()

ExprEditor::~ExprEditor ( )
override

Definition at line 58 of file ExprEditor.cpp.

References controlRebuildTimer, and previewTimer.

Member Function Documentation

◆ addError()

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

Definition at line 214 of file ExprEditor.cpp.

References errorWidget, and exprTe.

◆ appendStr()

void ExprEditor::appendStr ( const QString &  str)

Definition at line 209 of file ExprEditor.cpp.

References exprTe.

◆ apply

void ExprEditor::apply ( )
signal

Referenced by sendApply(), and setExpr().

◆ clearErrors()

void ExprEditor::clearErrors ( )

Definition at line 263 of file ExprEditor.cpp.

References errorHeight, errorWidget, and exprTe.

Referenced by ExprEditor(), and setExpr().

◆ clearExtraCompleters()

void ExprEditor::clearExtraCompleters ( )

◆ controlChanged

void ExprEditor::controlChanged ( int  id)
slot

◆ controlCollectionWidget()

ExprControlCollection * ExprEditor::controlCollectionWidget ( ) const

Definition at line 122 of file ExprEditor.cpp.

References controls.

◆ exprChanged

void ExprEditor::exprChanged ( )
slot

Definition at line 167 of file ExprEditor.cpp.

References _updatingText, and controlRebuildTimer.

Referenced by ExprEditor().

◆ getExpr()

QString ExprEditor::getExpr ( )

◆ insertStr

void ExprEditor::insertStr ( const QString &  str)
slot

Definition at line 203 of file ExprEditor.cpp.

References exprTe.

Referenced by setControlCollectionWidget().

◆ nextError

void ExprEditor::nextError ( )
slot

Definition at line 255 of file ExprEditor.cpp.

References errorWidget.

Referenced by ExprEditor().

◆ preview

void ExprEditor::preview ( )
signal

Referenced by sendPreview().

◆ rebuildControls

void ExprEditor::rebuildControls ( )
slot

◆ registerExtraFunction()

void ExprEditor::registerExtraFunction ( const QString &  name,
const QString &  docString 
)

◆ registerExtraVariable()

void ExprEditor::registerExtraVariable ( const QString &  name,
const QString &  docString 
)

◆ replaceExtras()

void ExprEditor::replaceExtras ( const ExprCompletionModel completer)

◆ selectError

void ExprEditor::selectError ( )
slot

Definition at line 144 of file ExprEditor.cpp.

References errorWidget, and exprTe.

Referenced by ExprEditor().

◆ sendApply

void ExprEditor::sendApply ( )
slot

Definition at line 157 of file ExprEditor.cpp.

References apply().

Referenced by ExprEditor().

◆ sendPreview

void ExprEditor::sendPreview ( )
slot

Definition at line 162 of file ExprEditor.cpp.

References preview().

Referenced by ExprEditor().

◆ setControlCollectionWidget()

void ExprEditor::setControlCollectionWidget ( ExprControlCollection widget)
virtual

◆ setExpr()

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

Definition at line 192 of file ExprEditor.cpp.

References apply(), clearErrors(), and exprTe.

Referenced by ExprBrowser::handleSelection().

◆ updateCompleter()

void ExprEditor::updateCompleter ( )

Definition at line 293 of file ExprEditor.cpp.

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

◆ updateStyle()

void ExprEditor::updateStyle ( )

Definition at line 298 of file ExprEditor.cpp.

References exprTe, and ExprTextEdit::updateStyle().

Member Data Documentation

◆ _updatingText

std::atomic<bool> ExprEditor::_updatingText {false}
private

Definition at line 82 of file ExprEditor.h.

Referenced by controlChanged(), and exprChanged().

◆ controlRebuildTimer

QTimer* ExprEditor::controlRebuildTimer {nullptr}
private

Definition at line 79 of file ExprEditor.h.

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

◆ controls

ExprControlCollection* ExprEditor::controls {nullptr}
private

◆ errorHeight

int ExprEditor::errorHeight
private

Definition at line 83 of file ExprEditor.h.

Referenced by clearErrors().

◆ errorWidget

QListWidget* ExprEditor::errorWidget {nullptr}
private

Definition at line 77 of file ExprEditor.h.

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

◆ exprTe

ExprTextEdit* ExprEditor::exprTe {nullptr}

◆ previewTimer

QTimer* ExprEditor::previewTimer {nullptr}
private

Definition at line 80 of file ExprEditor.h.

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


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