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

Backend configuration for the LengthEdit UI element. More...

#include <lengtheditcontext.h>

Inherits QObject.

+ Collaboration diagram for LengthEditContext:

Classes

struct  Steps
 Up/down step values. More...
 

Public Types

enum class  StepBehavior
 

Signals

void uiDataChanged ()
 
void valueChanged (const Length &value)
 
void valueChangedUnsigned (const UnsignedLength &value)
 
void valueChangedPositive (const PositiveLength &value)
 

Public Member Functions

 LengthEditContext ()=delete
 
 LengthEditContext (const LengthEditContext &other)=delete
 
 LengthEditContext (const WorkspaceSettings &ws, QObject *parent=nullptr) noexcept
 
virtual ~LengthEditContext () noexcept
 
ui::LengthEditData getUiData () const noexcept
 
void setUiData (const ui::LengthEditData &data) noexcept
 
void configure (const Length &value, const QVector< PositiveLength > &steps, const QString &uniqueIdentifier) noexcept
 
void configure (const UnsignedLength &value, const QVector< PositiveLength > &steps, const QString &uniqueIdentifier) noexcept
 
void configure (const PositiveLength &value, const QVector< PositiveLength > &steps, const QString &uniqueIdentifier) noexcept
 
void setValue (const Length &value) noexcept
 
void setValueUnsigned (const UnsignedLength &value) noexcept
 
void setValuePositive (const PositiveLength &value) noexcept
 
void setUnit (const LengthUnit &unit) noexcept
 
void setStepBehavior (StepBehavior behavior) noexcept
 
void stepBy (int steps) noexcept
 
LengthEditContextoperator= (const LengthEditContext &rhs)=delete
 

Protected Member Functions

 LengthEditContext (const WorkspaceSettings &ws, const Length &min, const Length &value, QObject *parent=nullptr) noexcept
 
void configureSettings (const QString &uniqueIdentifier) noexcept
 
void updateSingleStep () noexcept
 
void updateSingleStepPredefined () noexcept
 
void updateSingleStepHalfDouble () noexcept
 
void setValueImpl (const Length &value, bool emitValueChanged) noexcept
 

Protected Attributes

const WorkspaceSettingsmSettings
 
Length mMinimum
 
StepBehavior mStepBehavior
 
QVector< PositiveLengthmSteps
 
LengthUnit mUnit
 
Length mValue
 
Length mSingleStepUp
 Zero means "no step available".
 
Length mSingleStepDown
 Zero means "no step available".
 
QString mSettingsKey
 Empty means "do not save".
 

Detailed Description

Backend configuration for the LengthEdit UI element.

Member Enumeration Documentation

◆ StepBehavior

enum class StepBehavior
strong
Enumerator
PredefinedSteps 
HalfAndDouble 

Constructor & Destructor Documentation

◆ LengthEditContext() [1/4]

LengthEditContext ( )
delete

◆ LengthEditContext() [2/4]

LengthEditContext ( const LengthEditContext other)
delete

◆ LengthEditContext() [3/4]

LengthEditContext ( const WorkspaceSettings ws,
QObject *  parent = nullptr 
)
explicitnoexcept

◆ ~LengthEditContext()

~LengthEditContext ( )
virtualnoexcept

◆ LengthEditContext() [4/4]

LengthEditContext ( const WorkspaceSettings ws,
const Length min,
const Length value,
QObject *  parent = nullptr 
)
protectednoexcept

Member Function Documentation

◆ getUiData()

ui::LengthEditData getUiData ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUiData()

void setUiData ( const ui::LengthEditData &  data)
noexcept
+ Here is the call graph for this function:

◆ configure() [1/3]

void configure ( const Length value,
const QVector< PositiveLength > &  steps,
const QString &  uniqueIdentifier 
)
noexcept
+ Here is the call graph for this function:

◆ configure() [2/3]

void configure ( const UnsignedLength value,
const QVector< PositiveLength > &  steps,
const QString &  uniqueIdentifier 
)
noexcept

◆ configure() [3/3]

void configure ( const PositiveLength value,
const QVector< PositiveLength > &  steps,
const QString &  uniqueIdentifier 
)
noexcept

◆ setValue()

void setValue ( const Length value)
noexcept

◆ setValueUnsigned()

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

◆ setValuePositive()

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

◆ setUnit()

void setUnit ( const LengthUnit unit)
noexcept

◆ setStepBehavior()

void setStepBehavior ( StepBehavior  behavior)
noexcept

◆ stepBy()

void stepBy ( int  steps)
noexcept

◆ operator=()

LengthEditContext & operator= ( const LengthEditContext rhs)
delete

◆ uiDataChanged

void uiDataChanged ( )
signal
+ Here is the caller graph for this function:

◆ valueChanged

void valueChanged ( const Length value)
signal

◆ valueChangedUnsigned

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

◆ valueChangedPositive

void valueChangedPositive ( const PositiveLength value)
signal
+ Here is the caller graph for this function:

◆ configureSettings()

void configureSettings ( const QString &  uniqueIdentifier)
protectednoexcept
+ Here is the call graph for this function:

◆ updateSingleStep()

void updateSingleStep ( )
protectednoexcept
+ Here is the call graph for this function:

◆ updateSingleStepPredefined()

void updateSingleStepPredefined ( )
protectednoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSingleStepHalfDouble()

void updateSingleStepHalfDouble ( )
protectednoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValueImpl()

void setValueImpl ( const Length value,
bool  emitValueChanged 
)
protectednoexcept

Member Data Documentation

◆ mSettings

const WorkspaceSettings& mSettings
protected

◆ mMinimum

Length mMinimum
protected

◆ mStepBehavior

StepBehavior mStepBehavior
protected

◆ mSteps

QVector<PositiveLength> mSteps
protected

◆ mUnit

LengthUnit mUnit
protected

◆ mValue

Length mValue
protected

◆ mSingleStepUp

Length mSingleStepUp
protected

Zero means "no step available".

◆ mSingleStepDown

Length mSingleStepDown
protected

Zero means "no step available".

◆ mSettingsKey

QString mSettingsKey
protected

Empty means "do not save".


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