LibrePCB Developers Documentation
Loading...
Searching...
No Matches
LengthEdit Class Referencefinal

The LengthEdit class is a widget to view/edit librepcb::Length values. More...

#include <lengthedit.h>

+ Inheritance diagram for LengthEdit:
+ Collaboration diagram for LengthEdit:

Signals

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

Public Member Functions

 LengthEdit (QWidget *parent=nullptr) noexcept
 
 LengthEdit (const LengthEdit &other)=delete
 
virtual ~LengthEdit () noexcept
 
Length getValue () const noexcept
 
void setValue (const Length &value) noexcept
 
LengthEditoperator= (const LengthEdit &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 setDefaultValueToolTip (const Length &value) 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.
 
void resetUnit () noexcept
 
void configureClientSettings (const QString &uniqueIdentifier) noexcept
 
void configure (const LengthUnit &defaultUnit, const QVector< PositiveLength > &steps, const QString &uniqueIdentifier) noexcept
 
virtual void stepBy (int steps) override
 
QSize minimumSizeHint () const override
 
QSize sizeHint () const override
 
LengthEditBaseoperator= (const LengthEditBase &rhs)=delete
 

Private Member Functions

virtual void valueChangedImpl (const Length &diff) noexcept override
 

Additional Inherited Members

- Public Types inherited from LengthEditBase
enum class  StepBehavior
 
- Protected Member Functions inherited from LengthEditBase
virtual QAbstractSpinBox::StepEnabled stepEnabled () const 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
QPointer< QAction > mChangeUnitAction
 
LengthUnit mDefaultUnit
 
std::optional< LengthUnitmSelectedUnit
 
Length mMinimum
 
Length mMaximum
 
Length mValue
 
StepBehavior mStepBehavior
 
QVector< PositiveLengthmSteps
 
Length mSingleStepUp
 Zero means "no step available".
 
Length mSingleStepDown
 Zero means "no step available".
 
QSize mAdditionalSize
 
QString mSettingsKey
 Empty means "do not save".
 

Detailed Description

The LengthEdit class is a widget to view/edit librepcb::Length values.

Constructor & Destructor Documentation

◆ LengthEdit() [1/2]

LengthEdit ( QWidget *  parent = nullptr)
explicitnoexcept

◆ LengthEdit() [2/2]

LengthEdit ( const LengthEdit other)
delete

◆ ~LengthEdit()

~LengthEdit ( )
virtualnoexcept

Member Function Documentation

◆ getValue()

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

◆ setValue()

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

◆ operator=()

LengthEdit & operator= ( const LengthEdit rhs)
delete

◆ valueChanged

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

◆ valueChangedImpl()

void valueChangedImpl ( const Length diff)
overrideprivatevirtualnoexcept

Implements LengthEditBase.


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