#include <SpinBox.h>
Public Member Functions | |
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 () |
Protected Types | |
enum class | Number { KeepCurrent = 0 , SetIfNumber = 1 } |
Protected Member Functions | |
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::Expression > | getExpression () const |
std::string | getExpressionString (bool no_throw=true) const |
const App::ObjectIdentifier & | getPath () const |
void | makeLabel (QLineEdit *parent) |
void | objectDeleted (const App::DocumentObject &) |
virtual void | onChange () |
virtual void | setExpression (std::shared_ptr< App::Expression > expr) |
Protected Attributes | |
QLineEdit * | lineedit |
QAbstractSpinBox * | spinbox |
Protected Attributes inherited from Gui::ExpressionBinding | |
QPalette | defaultPalette |
boost::signals2::scoped_connection | expressionchanged |
int | iconHeight |
ExpressionLabel * | iconLabel |
bool | m_autoApply |
boost::signals2::scoped_connection | objectdeleted |
|
strongprotected |
ExpressionSpinBox::ExpressionSpinBox | ( | QAbstractSpinBox * | sb | ) |
|
virtual |
|
virtual |
Reimplemented from Gui::ExpressionBinding.
References Gui::ExpressionBinding::bind(), Gui::ExpressionBinding::iconLabel, lineedit, and spinbox.
|
protected |
|
protected |
References Gui::ExpressionBinding::hasExpression(), and spinbox.
Referenced by Gui::UIntSpinBox::paintEvent(), Gui::IntSpinBox::paintEvent(), and Gui::DoubleSpinBox::paintEvent().
|
protected |
References Gui::ExpressionBinding::isBound(), and openFormulaDialog().
Referenced by Gui::UIntSpinBox::keyPressEvent(), Gui::IntSpinBox::keyPressEvent(), and Gui::DoubleSpinBox::keyPressEvent().
|
protectedvirtual |
Reimplemented from Gui::ExpressionBinding.
References clearExpression(), Gui::ExpressionBinding::getExpression(), Gui::ExpressionBinding::isBound(), SetIfNumber, and showValidExpression().
|
protectedvirtual |
Reimplemented in Gui::QuantitySpinBox.
References draftgeoutils.intersections::connect(), Gui::ExpressionBinding::getExpression(), Gui::ExpressionBinding::getPath(), App::PropertyQuantity::getUnit(), Gui::ExpressionBinding::isBound(), setExpression(), and spinbox.
Referenced by ExpressionSpinBox(), and handleKeyEvent().
|
protected |
|
virtual |
Reimplemented from Gui::ExpressionBinding.
References Gui::ExpressionBinding::isBound(), Gui::ExpressionBinding::setExpression(), and showInvalidExpression().
Referenced by openFormulaDialog().
|
protectedpure virtual |
Implemented in Gui::QuantitySpinBox, Gui::UIntSpinBox, Gui::IntSpinBox, and Gui::DoubleSpinBox.
Referenced by showValidExpression().
|
protected |
References Gui::ExpressionBinding::iconLabel, lineedit, and spinbox.
Referenced by Gui::QuantitySpinBox::setExpression(), setExpression(), and updateExpression().
|
protected |
References Base::Tools::fromStdString(), Gui::ExpressionBinding::getExpression(), Gui::ExpressionBinding::getIcon(), Gui::ExpressionBinding::iconHeight, Gui::ExpressionBinding::iconLabel, KeepCurrent, lineedit, ExpressionLabel::setExpressionText(), SetIfNumber, setNumberExpression(), spinbox, and DraftVecUtils::toString().
Referenced by onChange(), and updateExpression().
|
protected |
References clearExpression(), Gui::ExpressionBinding::getExpression(), Gui::ExpressionBinding::isBound(), KeepCurrent, showInvalidExpression(), and showValidExpression().
Referenced by resizeWidget().
|
protected |
Referenced by bind(), clearExpression(), ExpressionSpinBox(), resizeWidget(), showInvalidExpression(), and showValidExpression().
|
protected |