KSeExpr 4.0.4.0
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 preview(), 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 ( )

Definition at line 272 of file ExprEditor.cpp.

References exprTe.

◆ controlChanged

void ExprEditor::controlChanged ( int id)
slot

Definition at line 43 of file ExprEditor.cpp.

References _updatingText, controls, exprTe, and previewTimer.

Referenced by setControlCollectionWidget().

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

Definition at line 187 of file ExprEditor.cpp.

References exprTe.

◆ 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

References apply().

Referenced by sendPreview().

◆ rebuildControls

void ExprEditor::rebuildControls ( )
slot

Definition at line 177 of file ExprEditor.cpp.

References controls, and exprTe.

Referenced by setControlCollectionWidget().

◆ registerExtraFunction()

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

Definition at line 278 of file ExprEditor.cpp.

References exprTe.

◆ registerExtraVariable()

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

Definition at line 283 of file ExprEditor.cpp.

References exprTe.

◆ replaceExtras()

void ExprEditor::replaceExtras ( const ExprCompletionModel & completer)

Definition at line 288 of file ExprEditor.cpp.

References exprTe.

◆ 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.

◆ updateCompleter()

void ExprEditor::updateCompleter ( )

Definition at line 293 of file ExprEditor.cpp.

References exprTe.

◆ updateStyle()

void ExprEditor::updateStyle ( )

Definition at line 298 of file ExprEditor.cpp.

References exprTe.

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(), and ExprEditor().

◆ errorWidget

QListWidget* ExprEditor::errorWidget {nullptr}
private

Definition at line 77 of file ExprEditor.h.

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

◆ exprTe

◆ 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: