SeExpr

Signals | Public Member Functions | Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
ExprShortEdit Class Reference

`#include <ExprShortEdit.h>`

Inheritance diagram for ExprShortEdit:

## 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

## Detailed Description

Definition at line 45 of file ExprShortEdit.h.

## Constructor & Destructor Documentation

## ◆ ExprShortEdit()

ExprShortEdit::ExprShortEdit | ( | QWidget * | parent,
|  | bool | expanded = `true`,
|  | bool | applyOnSelect = `true`
| ) |  |

Definition at line 57 of file ExprShortEdit.cpp.

References controlRebuildTimer, controls, detailPressed(), edit, editDetail, error, expandButton, expandPressed(), hboxlayout, rebuildControls(), stop_xpm, sum_xpm, textFinished(), and vboxlayout.

## ◆ ~ExprShortEdit()

ExprShortEdit::~ExprShortEdit | ( |  | ) |
| virtual

Definition at line 103 of file ExprShortEdit.cpp.

## Member Function Documentation

## ◆ checkErrors()

void ExprShortEdit::checkErrors | ( |  | ) |
| protected

Definition at line 212 of file ExprShortEdit.cpp.

References expr(), getExpressionString(), and hideErrors().

Referenced by controlChanged(), setExpressionString(), and textFinished().

## ◆ clearExtraCompleters()

void ExprShortEdit::clearExtraCompleters | ( |  | ) |

Definition at line 197 of file ExprShortEdit.cpp.

References ExprCompletionModel::clearFunctions(), ExprCompletionModel::clearVariables(), ExprShortTextEdit::completionModel, and edit.

## ◆ controlChanged

void ExprShortEdit::controlChanged | ( | int | id | ) |
| protected virtual slot

Definition at line 187 of file ExprShortEdit.cpp.

References checkErrors(), controls, edit, exprChanged(), getExpression(), and ExprControlCollection::updateText().

Referenced by expandPressed().

## ◆ detailPressed

void ExprShortEdit::detailPressed | ( |  | ) |
| protected virtual slot

Definition at line 110 of file ExprShortEdit.cpp.

References showDetails().

Referenced by ExprShortEdit().

## ◆ dialogClosed

void ExprShortEdit::dialogClosed | ( |  | ) |
| protected virtual slot

Definition at line 132 of file ExprShortEdit.cpp.

Referenced by showDetails().

## ◆ expandPressed

void ExprShortEdit::expandPressed | ( |  | ) |
| protected virtual slot

Definition at line 150 of file ExprShortEdit.cpp.

References controlChanged(), controlRebuildTimer, controls, and expandButton.

Referenced by ExprShortEdit().

## ◆ exprChanged

void ExprShortEdit::exprChanged | ( |  | ) |
| signal

Referenced by controlChanged(), setExpressionString(), and textFinished().

## ◆ expressionApplied

void ExprShortEdit::expressionApplied | ( |  | ) |
| protected virtual slot

Definition at line 130 of file ExprShortEdit.cpp.

References _dialog, ExprDialog::getExpressionString(), and setExpressionString().

Referenced by showDetails().

## ◆ getExpression()

QString ExprShortEdit::getExpression | ( |  | ) | const

Definition at line 183 of file ExprShortEdit.cpp.

References edit.

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

## ◆ getExpressionString()

std::string ExprShortEdit::getExpressionString | ( |  | ) | const

Definition at line 185 of file ExprShortEdit.cpp.

References getExpression().

Referenced by checkErrors(), and showDetails().

## ◆ handleTextEdited

void ExprShortEdit::handleTextEdited | ( |  | ) |
| protected virtual slot

Definition at line 166 of file ExprShortEdit.cpp.

## ◆ hideErrors()

void ExprShortEdit::hideErrors | ( | bool | hidden,
|  | const std::string & | err
| ) |  |
| virtual

Definition at line 221 of file ExprShortEdit.cpp.

References error.

Referenced by checkErrors().

## ◆ rebuildControls

void ExprShortEdit::rebuildControls | ( |  | ) |
| protected virtual slot

Definition at line 134 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().

## ◆ registerExtraFunction()

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

Definition at line 202 of file ExprShortEdit.cpp.

References ExprCompletionModel::addFunction(), ExprShortTextEdit::completionModel, and edit.

## ◆ registerExtraVariable()

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

Definition at line 206 of file ExprShortEdit.cpp.

References ExprCompletionModel::addVariable(), ExprShortTextEdit::completionModel, and edit.

## ◆ setDetailsMenu()

void ExprShortEdit::setDetailsMenu | ( | QMenu * | menu | ) |

Definition at line 234 of file ExprShortEdit.cpp.

References editDetail.

## ◆ setExpressionString()

void ExprShortEdit::setExpressionString | ( | const std::string & | expression | ) |

Definition at line 175 of file ExprShortEdit.cpp.

References checkErrors(), controlRebuildTimer, edit, exprChanged(), and expression.

Referenced by expressionApplied().

## ◆ setHorizontalScrollBarPolicy()

void ExprShortEdit::setHorizontalScrollBarPolicy | ( | Qt::ScrollBarPolicy | policy | ) |

Definition at line 238 of file ExprShortEdit.cpp.

References edit.

## ◆ setLineWrapMode()

void ExprShortEdit::setLineWrapMode | ( | QTextEdit::LineWrapMode | mode | ) |

Definition at line 242 of file ExprShortEdit.cpp.

References edit.

## ◆ setSearchPath()

void ExprShortEdit::setSearchPath | ( | const QString & | context,
|  | const QString & | path
| ) |  |

Definition at line 105 of file ExprShortEdit.cpp.

References _context, _searchPath, and context.

## ◆ setSimple()

void ExprShortEdit::setSimple | ( | bool | enabled | ) |

Definition at line 228 of file ExprShortEdit.cpp.

References edit, editDetail, and expandButton.

## ◆ setVerticalScrollBarPolicy()

void ExprShortEdit::setVerticalScrollBarPolicy | ( | Qt::ScrollBarPolicy | policy | ) |

Definition at line 236 of file ExprShortEdit.cpp.

References edit.

## ◆ showDetails()

void ExprShortEdit::showDetails | ( | int | idx | ) |

Definition at line 112 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().

## ◆ sizeHint()

virtual QSize ExprShortEdit::sizeHint | ( |  | ) | const
| inline virtual

Definition at line 95 of file ExprShortEdit.h.

## ◆ textFinished

void ExprShortEdit::textFinished | ( |  | ) |
| protected virtual slot

Definition at line 168 of file ExprShortEdit.cpp.

References checkErrors(), controlRebuildTimer, and exprChanged().

Referenced by ExprShortEdit().

## ◆ updateCompleter()

void ExprShortEdit::updateCompleter | ( |  | ) |

Definition at line 210 of file ExprShortEdit.cpp.

References ExprShortTextEdit::completer, ExprShortTextEdit::completionModel, and edit.

## Member Data Documentation

## ◆ _applyOnSelect

bool ExprShortEdit::_applyOnSelect
| protected

Definition at line 58 of file ExprShortEdit.h.

Referenced by showDetails().

## ◆ _context

std::string ExprShortEdit::_context
| protected

Definition at line 56 of file ExprShortEdit.h.

Referenced by setSearchPath(), and showDetails().

## ◆ _dialog

ExprDialog* ExprShortEdit::_dialog
| protected

Definition at line 52 of file ExprShortEdit.h.

Referenced by expressionApplied(), and showDetails().

## ◆ _searchPath

std::string ExprShortEdit::_searchPath
| protected

Definition at line 57 of file ExprShortEdit.h.

Referenced by setSearchPath(), and showDetails().

## ◆ controlRebuildTimer

QTimer* ExprShortEdit::controlRebuildTimer
| protected

Definition at line 49 of file ExprShortEdit.h.

Referenced by expandPressed(), ExprShortEdit(), setExpressionString(), and textFinished().

## ◆ controls

ExprControlCollection* ExprShortEdit::controls
| protected

Definition at line 51 of file ExprShortEdit.h.

Referenced by controlChanged(), expandPressed(), ExprShortEdit(), and rebuildControls().

## ◆ edit

ExprShortTextEdit* ExprShortEdit::edit

Definition at line 100 of file ExprShortEdit.h.

Referenced by clearExtraCompleters(), controlChanged(), ExprShortEdit(), getExpression(), rebuildControls(), registerExtraFunction(), registerExtraVariable(), setExpressionString(), setHorizontalScrollBarPolicy(), setLineWrapMode(), setSimple(), setVerticalScrollBarPolicy(), showDetails(), and updateCompleter().

## ◆ editDetail

QToolButton* ExprShortEdit::editDetail
| protected

Definition at line 50 of file ExprShortEdit.h.

Referenced by ExprShortEdit(), setDetailsMenu(), and setSimple().

## ◆ error

QLabel* ExprShortEdit::error
| protected

Definition at line 55 of file ExprShortEdit.h.

Referenced by ExprShortEdit(), and hideErrors().

## ◆ expandButton

QToolButton* ExprShortEdit::expandButton

Definition at line 99 of file ExprShortEdit.h.

Referenced by expandPressed(), ExprShortEdit(), rebuildControls(), and setSimple().

## ◆ hboxlayout

QHBoxLayout* ExprShortEdit::hboxlayout
| protected

Definition at line 54 of file ExprShortEdit.h.

Referenced by ExprShortEdit().

## ◆ vboxlayout

QVBoxLayout* ExprShortEdit::vboxlayout
| protected

Definition at line 53 of file ExprShortEdit.h.

Referenced by ExprShortEdit(), and rebuildControls().

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

- /build/seexpr/src/SeExpr/src/SeExpr2/UI/ExprShortEdit.h
- /build/seexpr/src/SeExpr/src/SeExpr2/UI/ExprShortEdit.cpp