Gui::ExpressionBinding Class Reference

#include <ExpressionBinding.h>

Public Member Functions

virtual bool apply ()
 
virtual bool apply (const std::string &propName)
 
bool autoApply () const
 
virtual void bind (const App::ObjectIdentifier &_path)
 
virtual void bind (const App::Property &prop)
 
 ExpressionBinding ()
 
QPixmap getIcon (const char *name, const QSize &size) const
 
bool hasExpression () const
 
bool isBound () const
 
void setAutoApply (bool value)
 
void unbind ()
 
virtual ~ExpressionBinding ()
 

Protected Member Functions

void expressionChange (const App::ObjectIdentifier &id)
 
std::string getEscapedExpressionString () const
 
std::shared_ptr< App::ExpressiongetExpression () const
 
std::string getExpressionString (bool no_throw=true) const
 
const App::ObjectIdentifiergetPath () const
 
void makeLabel (QLineEdit *parent)
 
void objectDeleted (const App::DocumentObject &)
 
virtual void onChange ()
 
virtual void setExpression (std::shared_ptr< App::Expression > expr)
 

Protected Attributes

QPalette defaultPalette
 
boost::signals2::scoped_connection expressionchanged
 
int iconHeight
 
ExpressionLabeliconLabel
 
bool m_autoApply
 
boost::signals2::scoped_connection objectdeleted
 

Constructor & Destructor Documentation

◆ ExpressionBinding()

ExpressionBinding::ExpressionBinding ( )

◆ ~ExpressionBinding()

ExpressionBinding::~ExpressionBinding ( )
virtual

Member Function Documentation

◆ apply() [1/2]

◆ apply() [2/2]

◆ autoApply()

bool Gui::ExpressionBinding::autoApply ( ) const

◆ bind() [1/2]

◆ bind() [2/2]

void ExpressionBinding::bind ( const App::Property prop)
virtual

Reimplemented in Gui::PropertyEditor::PropertyItem.

References bind().

◆ expressionChange()

void ExpressionBinding::expressionChange ( const App::ObjectIdentifier id)
protected

References onChange().

Referenced by bind().

◆ getEscapedExpressionString()

std::string ExpressionBinding::getEscapedExpressionString ( ) const
protected

◆ getExpression()

◆ getExpressionString()

◆ getIcon()

◆ getPath()

◆ hasExpression()

bool ExpressionBinding::hasExpression ( ) const

References getExpression(), and isBound().

Referenced by apply(), Gui::PropertyEditor::PropertyItem::data(), Gui::ExpressionSpinBox::drawControl(), Gui::PropertyEditor::PropertyItem::expressionAsString(), Gui::PropertyEditor::PropertyItem::hasAnyExpression(), Gui::ExpressionBindingPy::hasExpression(), Gui::ExpLineEdit::keyPressEvent(), Gui::PropertyEditor::PropertyItem::onChange(), Gui::PropertyEditor::PropertyStringItem::setValue(), Gui::PropertyEditor::PropertyFontItem::setValue(), Gui::PropertyEditor::PropertyIntegerItem::setValue(), Gui::PropertyEditor::PropertyIntegerConstraintItem::setValue(), Gui::PropertyEditor::PropertyFloatItem::setValue(), Gui::PropertyEditor::PropertyUnitItem::setValue(), Gui::PropertyEditor::PropertyFloatConstraintItem::setValue(), Gui::PropertyEditor::PropertyBoolItem::setValue(), Gui::PropertyEditor::PropertyVectorItem::setValue(), Gui::PropertyEditor::PropertyVectorDistanceItem::setValue(), Gui::PropertyEditor::PropertyMatrixItem::setValue(), Gui::PropertyEditor::PropertyPlacementItem::setValue(), Gui::PropertyEditor::PropertyEnumItem::setValue(), Gui::PropertyEditor::PropertyStringListItem::setValue(), Gui::PropertyEditor::PropertyFloatListItem::setValue(), Gui::PropertyEditor::PropertyIntegerListItem::setValue(), Gui::PropertyEditor::PropertyColorItem::setValue(), Gui::PropertyEditor::PropertyMaterialItem::setValue(), Gui::PropertyEditor::PropertyMaterialListItem::setValue(), Gui::PropertyEditor::PropertyFileItem::setValue(), Gui::PropertyEditor::PropertyPathItem::setValue(), Gui::PropertyEditor::PropertyTransientFileItem::setValue(), Gui::PropertyEditor::PropertyIntegerItem::toString(), Gui::PropertyEditor::PropertyIntegerConstraintItem::toString(), Gui::PropertyEditor::PropertyFloatItem::toString(), Gui::PropertyEditor::PropertyUnitItem::toString(), Gui::PropertyEditor::PropertyVectorItem::toString(), Gui::PropertyEditor::PropertyVectorListItem::toString(), Gui::PropertyEditor::PropertyVectorDistanceItem::toString(), Gui::PropertyEditor::PropertyRotationItem::value(), and Gui::PropertyEditor::PropertyPlacementItem::value().

◆ isBound()

◆ makeLabel()

◆ objectDeleted()

void ExpressionBinding::objectDeleted ( const App::DocumentObject obj)
protected

References unbind().

Referenced by bind().

◆ onChange()

virtual void Gui::ExpressionBinding::onChange ( )
protectedvirtual

◆ setAutoApply()

◆ setExpression()

◆ unbind()

void ExpressionBinding::unbind ( )

References expressionchanged, and objectdeleted.

Referenced by objectDeleted().

Member Data Documentation

◆ defaultPalette

QPalette Gui::ExpressionBinding::defaultPalette
protected

◆ expressionchanged

boost::signals2::scoped_connection Gui::ExpressionBinding::expressionchanged
protected

Referenced by bind(), and unbind().

◆ iconHeight

◆ iconLabel

◆ m_autoApply

bool Gui::ExpressionBinding::m_autoApply
protected

◆ objectdeleted

boost::signals2::scoped_connection Gui::ExpressionBinding::objectdeleted
protected

Referenced by bind(), and unbind().


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