Gui::DoubleSpinBox Class Reference

The DoubleSpinBox class does exactly the same as Qt's QDoubleSpinBox but has expression support. More...

#include <SpinBox.h>

Public Member Functions

bool apply (const std::string &propName)
 
 DoubleSpinBox (QWidget *parent=nullptr)
 
void keyPressEvent (QKeyEvent *event)
 
void paintEvent (QPaintEvent *event)
 
void resizeEvent (QResizeEvent *event)
 
void setNumberExpression (App::NumberExpression *)
 
virtual ~DoubleSpinBox ()
 
- Public Member Functions inherited from Gui::ExpressionSpinBox
void bind (const App::ObjectIdentifier &_path)
 
 ExpressionSpinBox (QAbstractSpinBox *)
 
void setExpression (std::shared_ptr< App::Expression > expr)
 
virtual ~ExpressionSpinBox ()
 
- Public Member Functions inherited from Gui::ExpressionBinding
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 ()
 

Additional Inherited Members

- Protected Types inherited from Gui::ExpressionSpinBox
enum class  Number { KeepCurrent = 0 , SetIfNumber = 1 }
 
- Protected Member Functions inherited from Gui::ExpressionSpinBox
void clearExpression ()
 
void drawControl (QStyleOptionSpinBox &)
 
bool handleKeyEvent (const QString &)
 
void onChange ()
 
virtual void openFormulaDialog ()
 
void resizeWidget ()
 
virtual void setNumberExpression (App::NumberExpression *)=0
 
void showInvalidExpression (const QString &)
 
void showValidExpression (Number number)
 
void updateExpression ()
 
- Protected Member Functions inherited from Gui::ExpressionBinding
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 inherited from Gui::ExpressionSpinBox
QLineEditlineedit
 
QAbstractSpinBoxspinbox
 
- Protected Attributes inherited from Gui::ExpressionBinding
QPalette defaultPalette
 
boost::signals2::scoped_connection expressionchanged
 
int iconHeight
 
ExpressionLabeliconLabel
 
bool m_autoApply
 
boost::signals2::scoped_connection objectdeleted
 

Detailed Description

The DoubleSpinBox class does exactly the same as Qt's QDoubleSpinBox but has expression support.

Author
Stefan Tröger

Constructor & Destructor Documentation

◆ DoubleSpinBox()

DoubleSpinBox::DoubleSpinBox ( QWidget parent = nullptr)

◆ ~DoubleSpinBox()

DoubleSpinBox::~DoubleSpinBox ( )
virtual

Member Function Documentation

◆ apply()

bool DoubleSpinBox::apply ( const std::string &  propName)
virtual

◆ keyPressEvent()

void DoubleSpinBox::keyPressEvent ( QKeyEvent *  event)

◆ paintEvent()

void DoubleSpinBox::paintEvent ( QPaintEvent *  event)

◆ resizeEvent()

void DoubleSpinBox::resizeEvent ( QResizeEvent *  event)

◆ setNumberExpression()

void DoubleSpinBox::setNumberExpression ( App::NumberExpression expr)
virtual

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