Gui::UIntSpinBox Class Reference

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

Additional Inherited Members

- Protected Types inherited from Gui::ExpressionSpinBox
enum class  Number { KeepCurrent = 0 , SetIfNumber = 1 }
 
- 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 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]

Author
Werner Mayer

Constructor & Destructor Documentation

◆ UIntSpinBox()

◆ ~UIntSpinBox()

UIntSpinBox::~UIntSpinBox ( )
virtual

Member Function Documentation

◆ apply()

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

◆ keyPressEvent()

void UIntSpinBox::keyPressEvent ( QKeyEvent *  event)

◆ maximum()

uint UIntSpinBox::maximum ( void  ) const

◆ minimum()

uint UIntSpinBox::minimum ( void  ) const

◆ paintEvent()

void UIntSpinBox::paintEvent ( QPaintEvent *  event)

◆ resizeEvent()

void UIntSpinBox::resizeEvent ( QResizeEvent *  event)

◆ setMaximum()

void UIntSpinBox::setMaximum ( uint  value)

References minimum(), and setRange().

◆ setMinimum()

void UIntSpinBox::setMinimum ( uint  value)

References maximum(), and setRange().

◆ setNumberExpression()

void UIntSpinBox::setNumberExpression ( App::NumberExpression expr)
protectedvirtual

◆ setRange()

void UIntSpinBox::setRange ( uint  minVal,
uint  maxVal 
)

◆ setValue

void UIntSpinBox::setValue ( uint  value)
slot

◆ textFromValue()

QString UIntSpinBox::textFromValue ( int  v) const
protectedvirtual

◆ validate()

QValidator::State UIntSpinBox::validate ( QString &  input,
int pos 
) const
virtual

◆ value()

◆ valueChanged

void Gui::UIntSpinBox::valueChanged ( uint  value)
signal

Referenced by UIntSpinBox().

◆ valueFromText()

int UIntSpinBox::valueFromText ( const QString &  text) const
protectedvirtual

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