SeExpr
|
#include <ExprShortEdit.h>
Signals | |
void | exprChanged () |
Public Member Functions | |
ExprShortEdit (QWidget *parent, bool expanded=true, bool applyOnSelect=true) | |
virtual | ~ExprShortEdit () |
std::string | getExpressionString () const |
QString | getExpression () const |
void | setExpressionString (const std::string &expression) |
void | clearExtraCompleters () |
void | registerExtraFunction (const std::string &name, const std::string &docString) |
void | registerExtraVariable (const std::string &name, const std::string &docString) |
void | updateCompleter () |
void | setSimple (bool enabled) |
void | setDetailsMenu (QMenu *menu) |
void | setSearchPath (const QString &context, const QString &path) |
void | setLineWrapMode (QTextEdit::LineWrapMode mode) |
void | setVerticalScrollBarPolicy (Qt::ScrollBarPolicy policy) |
void | setHorizontalScrollBarPolicy (Qt::ScrollBarPolicy policy) |
void | showDetails (int idx) |
virtual QSize | sizeHint () const |
virtual void | hideErrors (bool hidden, const std::string &err) |
Public Attributes | |
QToolButton * | expandButton |
ExprShortTextEdit * | edit |
Protected Slots | |
virtual void | detailPressed () |
virtual void | expandPressed () |
virtual void | textFinished () |
virtual void | handleTextEdited () |
virtual void | controlChanged (int id) |
virtual void | rebuildControls () |
virtual void | expressionApplied () |
virtual void | dialogClosed () |
Protected Member Functions | |
void | checkErrors () |
Protected Attributes | |
QTimer * | controlRebuildTimer |
QToolButton * | editDetail |
ExprControlCollection * | controls |
ExprDialog * | _dialog |
QVBoxLayout * | vboxlayout |
QHBoxLayout * | hboxlayout |
QLabel * | error |
std::string | _context |
std::string | _searchPath |
bool | _applyOnSelect |
Definition at line 46 of file ExprShortEdit.h.
ExprShortEdit::ExprShortEdit | ( | QWidget * | parent, |
bool | expanded = true , |
||
bool | applyOnSelect = true |
||
) |
Definition at line 95 of file ExprShortEdit.cpp.
References controlRebuildTimer, controls, detailPressed(), edit, editDetail, error, expandButton, expandPressed(), hboxlayout, rebuildControls(), stop_xpm, sum_xpm, textFinished(), and vboxlayout.
|
virtual |
Definition at line 145 of file ExprShortEdit.cpp.
|
protected |
Definition at line 294 of file ExprShortEdit.cpp.
References expr(), getExpressionString(), hideErrors(), SeExpr2::Expression::isValid(), and SeExpr2::Expression::parseError().
Referenced by controlChanged(), setExpressionString(), and textFinished().
void ExprShortEdit::clearExtraCompleters | ( | ) |
Definition at line 269 of file ExprShortEdit.cpp.
References ExprCompletionModel::clearFunctions(), ExprCompletionModel::clearVariables(), ExprShortTextEdit::completionModel, and edit.
|
protectedvirtualslot |
Definition at line 257 of file ExprShortEdit.cpp.
References checkErrors(), controls, edit, exprChanged(), getExpression(), and ExprControlCollection::updateText().
Referenced by expandPressed().
|
protectedvirtualslot |
Definition at line 155 of file ExprShortEdit.cpp.
References showDetails().
Referenced by ExprShortEdit().
|
protectedvirtualslot |
Definition at line 184 of file ExprShortEdit.cpp.
Referenced by showDetails().
|
protectedvirtualslot |
Definition at line 210 of file ExprShortEdit.cpp.
References controlChanged(), controlRebuildTimer, controls, and expandButton.
Referenced by ExprShortEdit().
|
signal |
Referenced by controlChanged(), setExpressionString(), and textFinished().
|
protectedvirtualslot |
Definition at line 179 of file ExprShortEdit.cpp.
References _dialog, ExprDialog::getExpressionString(), and setExpressionString().
Referenced by showDetails().
QString ExprShortEdit::getExpression | ( | ) | const |
Definition at line 247 of file ExprShortEdit.cpp.
References edit.
Referenced by controlChanged(), getExpressionString(), and rebuildControls().
std::string ExprShortEdit::getExpressionString | ( | ) | const |
Definition at line 252 of file ExprShortEdit.cpp.
References getExpression().
Referenced by checkErrors(), and showDetails().
|
protectedvirtualslot |
Definition at line 227 of file ExprShortEdit.cpp.
|
virtual |
|
protectedvirtualslot |
Definition at line 189 of file ExprShortEdit.cpp.
References ExprShortTextEdit::completer, ExprShortTextEdit::completionModel, controls, edit, expandButton, getExpression(), ExprCompletionModel::local_variables, ExprControlCollection::numControls(), ExprControlCollection::rebuildControls(), and vboxlayout.
Referenced by ExprShortEdit().
void ExprShortEdit::registerExtraFunction | ( | const std::string & | name, |
const std::string & | docString | ||
) |
Definition at line 276 of file ExprShortEdit.cpp.
References ExprCompletionModel::addFunction(), ExprShortTextEdit::completionModel, and edit.
void ExprShortEdit::registerExtraVariable | ( | const std::string & | name, |
const std::string & | docString | ||
) |
Definition at line 282 of file ExprShortEdit.cpp.
References ExprCompletionModel::addVariable(), ExprShortTextEdit::completionModel, and edit.
void ExprShortEdit::setDetailsMenu | ( | QMenu * | menu | ) |
Definition at line 322 of file ExprShortEdit.cpp.
References editDetail.
void ExprShortEdit::setExpressionString | ( | const std::string & | expression | ) |
Definition at line 238 of file ExprShortEdit.cpp.
References checkErrors(), controlRebuildTimer, edit, and exprChanged().
Referenced by expressionApplied().
void ExprShortEdit::setHorizontalScrollBarPolicy | ( | Qt::ScrollBarPolicy | policy | ) |
Definition at line 332 of file ExprShortEdit.cpp.
References edit.
void ExprShortEdit::setLineWrapMode | ( | QTextEdit::LineWrapMode | mode | ) |
Definition at line 337 of file ExprShortEdit.cpp.
References edit.
void ExprShortEdit::setSearchPath | ( | const QString & | context, |
const QString & | path | ||
) |
Definition at line 149 of file ExprShortEdit.cpp.
References _context, and _searchPath.
void ExprShortEdit::setSimple | ( | bool | enabled | ) |
Definition at line 315 of file ExprShortEdit.cpp.
References edit, editDetail, and expandButton.
void ExprShortEdit::setVerticalScrollBarPolicy | ( | Qt::ScrollBarPolicy | policy | ) |
Definition at line 327 of file ExprShortEdit.cpp.
References edit.
void ExprShortEdit::showDetails | ( | int | idx | ) |
Definition at line 160 of file ExprShortEdit.cpp.
References _applyOnSelect, _context, _dialog, _searchPath, ExprDialog::browser, ExprShortTextEdit::completionModel, dialogClosed(), edit, ExprDialog::editor, ExprBrowser::expandAll(), expressionApplied(), getExpressionString(), ExprEditor::replaceExtras(), ExprBrowser::setApplyOnSelect(), ExprDialog::setExpressionString(), ExprBrowser::setSearchPath(), ExprDialog::show(), and ExprDialog::showEditor().
Referenced by detailPressed().
|
inlinevirtual |
Definition at line 96 of file ExprShortEdit.h.
|
protectedvirtualslot |
Definition at line 230 of file ExprShortEdit.cpp.
References checkErrors(), controlRebuildTimer, and exprChanged().
Referenced by ExprShortEdit().
void ExprShortEdit::updateCompleter | ( | ) |
Definition at line 288 of file ExprShortEdit.cpp.
References ExprShortTextEdit::completer, ExprShortTextEdit::completionModel, and edit.
|
protected |
Definition at line 60 of file ExprShortEdit.h.
Referenced by showDetails().
|
protected |
Definition at line 58 of file ExprShortEdit.h.
Referenced by setSearchPath(), and showDetails().
|
protected |
Definition at line 54 of file ExprShortEdit.h.
Referenced by expressionApplied(), and showDetails().
|
protected |
Definition at line 59 of file ExprShortEdit.h.
Referenced by setSearchPath(), and showDetails().
|
protected |
Definition at line 51 of file ExprShortEdit.h.
Referenced by expandPressed(), ExprShortEdit(), setExpressionString(), and textFinished().
|
protected |
Definition at line 53 of file ExprShortEdit.h.
Referenced by controlChanged(), expandPressed(), ExprShortEdit(), and rebuildControls().
ExprShortTextEdit* ExprShortEdit::edit |
Definition at line 101 of file ExprShortEdit.h.
Referenced by clearExtraCompleters(), controlChanged(), ExprShortEdit(), getExpression(), rebuildControls(), registerExtraFunction(), registerExtraVariable(), setExpressionString(), setHorizontalScrollBarPolicy(), setLineWrapMode(), setSimple(), setVerticalScrollBarPolicy(), showDetails(), and updateCompleter().
|
protected |
Definition at line 52 of file ExprShortEdit.h.
Referenced by ExprShortEdit(), setDetailsMenu(), and setSimple().
|
protected |
Definition at line 57 of file ExprShortEdit.h.
Referenced by ExprShortEdit(), and hideErrors().
QToolButton* ExprShortEdit::expandButton |
Definition at line 100 of file ExprShortEdit.h.
Referenced by expandPressed(), ExprShortEdit(), rebuildControls(), and setSimple().
|
protected |
Definition at line 56 of file ExprShortEdit.h.
Referenced by ExprShortEdit().
|
protected |
Definition at line 55 of file ExprShortEdit.h.
Referenced by ExprShortEdit(), and rebuildControls().