SeExpr
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
 
ExprShortTextEditedit
 

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
 
ExprControlCollectioncontrols
 
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 )

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

◆ controlChanged

void ExprShortEdit::controlChanged ( int id)
protectedvirtualslot

◆ detailPressed

void ExprShortEdit::detailPressed ( )
protectedvirtualslot

Definition at line 110 of file ExprShortEdit.cpp.

References showDetails().

Referenced by ExprShortEdit().

◆ dialogClosed

void ExprShortEdit::dialogClosed ( )
protectedvirtualslot

Definition at line 132 of file ExprShortEdit.cpp.

Referenced by showDetails().

◆ expandPressed

void ExprShortEdit::expandPressed ( )
protectedvirtualslot

Definition at line 150 of file ExprShortEdit.cpp.

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

Referenced by ExprShortEdit().

◆ exprChanged

void ExprShortEdit::exprChanged ( )
signal

◆ expressionApplied

void ExprShortEdit::expressionApplied ( )
protectedvirtualslot

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

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

◆ registerExtraFunction()

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

◆ registerExtraVariable()

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

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

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

◆ sizeHint()

virtual QSize ExprShortEdit::sizeHint ( ) const
inlinevirtual

Definition at line 95 of file ExprShortEdit.h.

◆ textFinished

void ExprShortEdit::textFinished ( )
protectedvirtualslot

Definition at line 168 of file ExprShortEdit.cpp.

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

Referenced by ExprShortEdit().

◆ updateCompleter()

void ExprShortEdit::updateCompleter ( )

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

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