The UIntSpinBox class does basically the same as Qt's QSpinBox unless that it works with unsigned int's instead. More...
#include <SpinBox.h>
Public Slots | |
void | setValue (uint value) |
Signals | |
void | valueChanged (uint value) |
Public Member Functions | |
bool | apply (const std::string &propName) |
void | keyPressEvent (QKeyEvent *event) |
uint | maximum () const |
uint | minimum () const |
void | paintEvent (QPaintEvent *event) |
void | resizeEvent (QResizeEvent *event) |
void | setMaximum (uint value) |
void | setMinimum (uint value) |
void | setRange (uint minVal, uint maxVal) |
UIntSpinBox (QWidget *parent=nullptr) | |
virtual QValidator::State | validate (QString &input, int &pos) const |
uint | value () const |
virtual | ~UIntSpinBox () |
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 () |
Protected Member Functions | |
virtual void | setNumberExpression (App::NumberExpression *) |
virtual QString | textFromValue (int v) const |
virtual int | valueFromText (const QString &text) const |
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::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) |
Additional Inherited Members | |
Protected Types inherited from Gui::ExpressionSpinBox | |
enum class | Number { KeepCurrent = 0 , SetIfNumber = 1 } |
Protected Attributes inherited from Gui::ExpressionSpinBox | |
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 |
The UIntSpinBox class does basically the same as Qt's QSpinBox unless that it works with unsigned int's instead.
This allows to use numbers in the range of [0, UINT_MAX]
UIntSpinBox::UIntSpinBox | ( | QWidget * | parent = nullptr | ) |
|
virtual |
References Gui::UIntSpinBoxPrivate::mValidator.
|
virtual |
Reimplemented from Gui::ExpressionBinding.
References Gui::ExpressionBinding::apply(), and Gui::Command::Doc.
void UIntSpinBox::keyPressEvent | ( | QKeyEvent * | event | ) |
References Gui::ExpressionSpinBox::handleKeyEvent().
uint UIntSpinBox::maximum | ( | void | ) | const |
References Gui::UIntSpinBoxPrivate::mapToUInt().
Referenced by setMinimum(), and UIntSpinBox().
uint UIntSpinBox::minimum | ( | void | ) | const |
References Gui::UIntSpinBoxPrivate::mapToUInt().
Referenced by setMaximum(), and UIntSpinBox().
void UIntSpinBox::paintEvent | ( | QPaintEvent * | event | ) |
References Gui::ExpressionSpinBox::drawControl().
void UIntSpinBox::resizeEvent | ( | QResizeEvent * | event | ) |
References Gui::ExpressionSpinBox::resizeWidget().
void UIntSpinBox::setMaximum | ( | uint | value | ) |
References minimum(), and setRange().
void UIntSpinBox::setMinimum | ( | uint | value | ) |
References maximum(), and setRange().
|
protectedvirtual |
Implements Gui::ExpressionSpinBox.
References App::UnitExpression::getValue(), and setValue().
void UIntSpinBox::setRange | ( | uint | minVal, |
uint | maxVal | ||
) |
References Gui::UIntSpinBoxPrivate::mapToInt().
Referenced by Gui::Dialog::ParameterUInt::changeValue(), setMaximum(), setMinimum(), and UIntSpinBox().
|
slot |
References Gui::UIntSpinBoxPrivate::mapToInt().
Referenced by Gui::Dialog::ParameterUInt::changeValue(), setNumberExpression(), and UIntSpinBox().
|
protectedvirtual |
References Gui::UIntSpinBoxPrivate::mapToUInt().
|
virtual |
References Gui::UIntSpinBoxPrivate::mValidator, and Gui::UnsignedValidator::validate().
Referenced by AddonManager.CommandAddonManager::startup().
uint UIntSpinBox::value | ( | ) | const |
References Gui::UIntSpinBoxPrivate::mapToUInt().
Referenced by PathScripts.PathProperty.Property::displayString(), PathScripts.PathProperty.PropertyQuantity::displayString(), PathScripts.PathSetupSheetOpPrototype.Property::displayString(), PathScripts.PathSetupSheetOpPrototype.PropertyQuantity::displayString(), Mod.PartDesign.WizardShaft.SegmentFunction.SegmentFunction::evaluate(), PathScripts.PathProperty.Property::getValue(), PathScripts.PathSetupSheetOpPrototype.Property::getValue(), Mod.PartDesign.WizardShaft.SegmentFunction.IntervalFunction::lowervalue(), PathScripts.PathProperty.Property::setValue(), and PathScripts.PathSetupSheetOpPrototype.Property::setValue().
|
signal |
Referenced by UIntSpinBox().
|
protectedvirtual |
References Gui::UIntSpinBoxPrivate::mapToInt().