KSeExpr 6.0.0.0
|
#include <ExprEditor.h>
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) |
ExprControlCollection * | controlCollectionWidget () 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 | |
ExprTextEdit * | exprTe {nullptr} |
Private Attributes | |
ExprControlCollection * | controls {nullptr} |
QListWidget * | errorWidget {nullptr} |
QTimer * | controlRebuildTimer {nullptr} |
QTimer * | previewTimer {nullptr} |
std::atomic< bool > | _updatingText {false} |
int | errorHeight |
Definition at line 19 of file ExprEditor.h.
ExprEditor::ExprEditor | ( | QWidget * | parent | ) |
Definition at line 64 of file ExprEditor.cpp.
References clearErrors(), controlRebuildTimer, errorWidget, exprChanged(), exprTe, nextError(), previewTimer, selectError(), sendApply(), and sendPreview().
|
override |
Definition at line 58 of file ExprEditor.cpp.
References controlRebuildTimer, and previewTimer.
void ExprEditor::addError | ( | int | startPos, |
int | endPos, | ||
const QString & | error | ||
) |
Definition at line 214 of file ExprEditor.cpp.
References errorWidget, and exprTe.
void ExprEditor::appendStr | ( | const QString & | str | ) |
Definition at line 209 of file ExprEditor.cpp.
References exprTe.
|
signal |
Referenced by sendApply(), and setExpr().
void ExprEditor::clearErrors | ( | ) |
Definition at line 263 of file ExprEditor.cpp.
References errorHeight, errorWidget, and exprTe.
Referenced by ExprEditor(), and setExpr().
void ExprEditor::clearExtraCompleters | ( | ) |
Definition at line 272 of file ExprEditor.cpp.
References ExprCompletionModel::clearFunctions(), ExprCompletionModel::clearVariables(), ExprTextEdit::completionModel, and exprTe.
|
slot |
Definition at line 43 of file ExprEditor.cpp.
References _updatingText, controls, exprTe, previewTimer, and ExprControlCollection::updateText().
Referenced by setControlCollectionWidget().
ExprControlCollection * ExprEditor::controlCollectionWidget | ( | ) | const |
Definition at line 122 of file ExprEditor.cpp.
References controls.
|
slot |
Definition at line 167 of file ExprEditor.cpp.
References _updatingText, and controlRebuildTimer.
Referenced by ExprEditor().
QString ExprEditor::getExpr | ( | ) |
Definition at line 187 of file ExprEditor.cpp.
References exprTe.
Referenced by ExprBrowser::saveExpression(), ExprBrowser::saveExpressionAs(), and ExprBrowser::saveLocalExpressionAs().
|
slot |
Definition at line 203 of file ExprEditor.cpp.
References exprTe.
Referenced by setControlCollectionWidget().
|
slot |
|
signal |
Referenced by sendPreview().
|
slot |
Definition at line 177 of file ExprEditor.cpp.
References ExprTextEdit::completer, ExprTextEdit::completionModel, controls, exprTe, ExprCompletionModel::local_variables, and ExprControlCollection::rebuildControls().
Referenced by setControlCollectionWidget().
void ExprEditor::registerExtraFunction | ( | const QString & | name, |
const QString & | docString | ||
) |
Definition at line 278 of file ExprEditor.cpp.
References ExprCompletionModel::addFunction(), ExprTextEdit::completionModel, and exprTe.
void ExprEditor::registerExtraVariable | ( | const QString & | name, |
const QString & | docString | ||
) |
Definition at line 283 of file ExprEditor.cpp.
References ExprCompletionModel::addVariable(), ExprTextEdit::completionModel, and exprTe.
void ExprEditor::replaceExtras | ( | const ExprCompletionModel & | completer | ) |
Definition at line 288 of file ExprEditor.cpp.
References ExprTextEdit::completionModel, exprTe, and ExprCompletionModel::syncExtras().
|
slot |
Definition at line 144 of file ExprEditor.cpp.
References errorWidget, and exprTe.
Referenced by ExprEditor().
|
slot |
|
slot |
|
virtual |
Definition at line 128 of file ExprEditor.cpp.
References controlChanged(), controlRebuildTimer, controls, insertStr(), and rebuildControls().
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().
void ExprEditor::updateCompleter | ( | ) |
Definition at line 293 of file ExprEditor.cpp.
References ExprTextEdit::completer, ExprTextEdit::completionModel, and exprTe.
void ExprEditor::updateStyle | ( | ) |
Definition at line 298 of file ExprEditor.cpp.
References exprTe, and ExprTextEdit::updateStyle().
|
private |
Definition at line 82 of file ExprEditor.h.
Referenced by controlChanged(), and exprChanged().
|
private |
Definition at line 79 of file ExprEditor.h.
Referenced by exprChanged(), ExprEditor(), setControlCollectionWidget(), and ~ExprEditor().
|
private |
Definition at line 76 of file ExprEditor.h.
Referenced by controlChanged(), controlCollectionWidget(), rebuildControls(), and setControlCollectionWidget().
|
private |
Definition at line 83 of file ExprEditor.h.
Referenced by clearErrors().
|
private |
Definition at line 77 of file ExprEditor.h.
Referenced by addError(), clearErrors(), ExprEditor(), nextError(), and selectError().
ExprTextEdit* ExprEditor::exprTe {nullptr} |
Definition at line 73 of file ExprEditor.h.
Referenced by addError(), appendStr(), clearErrors(), clearExtraCompleters(), controlChanged(), ExprEditor(), getExpr(), insertStr(), rebuildControls(), registerExtraFunction(), registerExtraVariable(), replaceExtras(), selectError(), setExpr(), updateCompleter(), and updateStyle().
|
private |
Definition at line 80 of file ExprEditor.h.
Referenced by controlChanged(), ExprEditor(), and ~ExprEditor().