LibrePCB Developers Documentation
UnsignedLengthEdit Class Referencefinal

The UnsignedLengthEdit class is a widget to view/edit librepcb::UnsignedLength values. More...

#include <unsignedlengthedit.h>

+ Inheritance diagram for UnsignedLengthEdit:
+ Collaboration diagram for UnsignedLengthEdit:

Signals

void valueChanged (const librepcb::UnsignedLength &value)
 
- Signals inherited from LengthEditBase
void displayedUnitChanged (const LengthUnit &unit)
 

Public Member Functions

 UnsignedLengthEdit (QWidget *parent=nullptr) noexcept
 
 UnsignedLengthEdit (const UnsignedLengthEdit &other)=delete
 
virtual ~UnsignedLengthEdit () noexcept
 
UnsignedLength getValue () const noexcept
 
void setValue (const UnsignedLength &value) noexcept
 
UnsignedLengthEditoperator= (const UnsignedLengthEdit &rhs)=delete
 
- Public Member Functions inherited from LengthEditBase
 LengthEditBase ()=delete
 
 LengthEditBase (const Length &min, const Length &max, const Length &value, QWidget *parent=nullptr) noexcept
 
 LengthEditBase (const LengthEditBase &other)=delete
 
virtual ~LengthEditBase () noexcept
 
const LengthUnitgetDisplayedUnit () const noexcept
 
void setDefaultUnit (const LengthUnit &unit) noexcept
 
void setChangeUnitActionVisible (bool visible) noexcept
 
void setStepBehavior (StepBehavior behavior) noexcept
 
void setSteps (const QVector< PositiveLength > &steps) noexcept
 Set the supported up/down step values. More...
 
void resetUnit () noexcept
 
void configureClientSettings (const QString &uniqueIdentifier) noexcept
 
void configure (const LengthUnit &defaultUnit, const QVector< PositiveLength > &steps, const QString &uniqueIdentifier) noexcept
 
QSize minimumSizeHint () const override
 
QSize sizeHint () const override
 
LengthEditBaseoperator= (const LengthEditBase &rhs)=delete
 

Private Member Functions

virtual void valueChangedImpl () noexcept override
 

Additional Inherited Members

- Public Types inherited from LengthEditBase
enum  StepBehavior
 
- Protected Member Functions inherited from LengthEditBase
virtual QAbstractSpinBox::StepEnabled stepEnabled () const override
 
virtual void stepBy (int steps) override
 
void setValueImpl (Length value) noexcept
 
void updateValueFromText (QString text) noexcept
 
void updateSingleStep () noexcept
 
void updateSingleStepPredefined () noexcept
 
void updateSingleStepHalfDouble () noexcept
 
void updateText () noexcept
 
LengthUnit extractUnitFromExpression (QString &expression) const noexcept
 
void changeUnitActionTriggered () noexcept
 
void setSelectedUnit (const LengthUnit &unit) noexcept
 
void saveSelectedUnit () noexcept
 
QString getValueStr (const LengthUnit &unit) const noexcept
 
- Protected Attributes inherited from LengthEditBase
QAction * mChangeUnitAction
 
LengthUnit mDefaultUnit
 
tl::optional< LengthUnitmSelectedUnit
 
Length mMinimum
 
Length mMaximum
 
Length mValue
 
StepBehavior mStepBehavior
 
QVector< PositiveLengthmSteps
 
Length mSingleStepUp
 Zero means "no step available". More...
 
Length mSingleStepDown
 Zero means "no step available". More...
 
QSize mAdditionalSize
 
QString mSettingsKey
 Empty means "do not save". More...
 

Detailed Description

The UnsignedLengthEdit class is a widget to view/edit librepcb::UnsignedLength values.

Constructor & Destructor Documentation

◆ UnsignedLengthEdit() [1/2]

UnsignedLengthEdit ( QWidget *  parent = nullptr)
explicitnoexcept

◆ UnsignedLengthEdit() [2/2]

UnsignedLengthEdit ( const UnsignedLengthEdit other)
delete

◆ ~UnsignedLengthEdit()

~UnsignedLengthEdit ( )
virtualnoexcept

Member Function Documentation

◆ getValue()

UnsignedLength getValue ( ) const
noexcept
+ Here is the caller graph for this function:

◆ setValue()

void setValue ( const UnsignedLength value)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

UnsignedLengthEdit& operator= ( const UnsignedLengthEdit rhs)
delete

◆ valueChanged

void valueChanged ( const librepcb::UnsignedLength value)
signal
+ Here is the caller graph for this function:

◆ valueChangedImpl()

void valueChangedImpl ( )
overrideprivatevirtualnoexcept

Implements LengthEditBase.

+ Here is the call graph for this function:

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