LibrePCB Developers Documentation
RatioEdit Class Referencefinal

The RatioEdit class is a widget to view/edit librepcb::Ratio values. More...

#include <ratioedit.h>

+ Inheritance diagram for RatioEdit:
+ Collaboration diagram for RatioEdit:

Signals

void valueChanged (const Ratio &value)
 
- Signals inherited from NumberEditBase
void editingFinished ()
 

Public Member Functions

 RatioEdit (QWidget *parent=nullptr) noexcept
 
 RatioEdit (const RatioEdit &other)=delete
 
virtual ~RatioEdit () noexcept
 
const RatiogetValue () const noexcept
 
void setValue (const Ratio &value) noexcept
 
RatioEditoperator= (const RatioEdit &rhs)=delete
 
- Public Member Functions inherited from NumberEditBase
 NumberEditBase (QWidget *parent=nullptr) noexcept
 
 NumberEditBase (const NumberEditBase &other)=delete
 
virtual ~NumberEditBase () noexcept
 
void setReadOnly (bool readOnly) noexcept
 
void setSingleStep (tl::optional< double > step) noexcept
 
void setFrame (bool frame) noexcept
 
void selectAll () noexcept
 
NumberEditBaseoperator= (const NumberEditBase &rhs)=delete
 

Private Member Functions

void updateSpinBox () noexcept override
 
void spinBoxValueChanged (double value) noexcept override
 

Private Attributes

Ratio mMinValue
 
Ratio mMaxValue
 
Ratio mValue
 

Additional Inherited Members

virtual void updateSpinBox () noexcept=0
 
virtual void spinBoxValueChanged (double value) noexcept=0
 
- Protected Attributes inherited from NumberEditBase
QScopedPointer< DoubleSpinBoxmSpinBox
 

Detailed Description

The RatioEdit class is a widget to view/edit librepcb::Ratio values.

Constructor & Destructor Documentation

◆ RatioEdit() [1/2]

RatioEdit ( QWidget *  parent = nullptr)
explicitnoexcept

◆ RatioEdit() [2/2]

RatioEdit ( const RatioEdit other)
delete

◆ ~RatioEdit()

~RatioEdit ( )
virtualnoexcept

Member Function Documentation

◆ getValue()

const Ratio & getValue ( ) const
inlinenoexcept

◆ setValue()

void setValue ( const Ratio value)
noexcept

◆ operator=()

RatioEdit & operator= ( const RatioEdit rhs)
delete

◆ valueChanged

void valueChanged ( const Ratio value)
signal

◆ updateSpinBox()

void updateSpinBox ( )
overrideprivatevirtualnoexcept

Implements NumberEditBase.

+ Here is the call graph for this function:

◆ spinBoxValueChanged()

void spinBoxValueChanged ( double  value)
overrideprivatevirtualnoexcept

Implements NumberEditBase.

+ Here is the call graph for this function:

Member Data Documentation

◆ mMinValue

Ratio mMinValue
private

◆ mMaxValue

Ratio mMaxValue
private

◆ mValue

Ratio mValue
private

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