LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WSI_AppDefaultMeasurementUnits Class Referencefinal

The WSI_AppDefaultMeasurementUnits class represents the application's default measurement units (for example the application's default length unit) More...

#include <wsi_appdefaultmeasurementunits.h>

+ Inheritance diagram for WSI_AppDefaultMeasurementUnits:
+ Collaboration diagram for WSI_AppDefaultMeasurementUnits:

Public Member Functions

 WSI_AppDefaultMeasurementUnits ()=delete
 
 WSI_AppDefaultMeasurementUnits (const WSI_AppDefaultMeasurementUnits &other)=delete
 
 WSI_AppDefaultMeasurementUnits (const SExpression &node)
 
 ~WSI_AppDefaultMeasurementUnits () noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
QString getLengthUnitLabelText () const noexcept
 
QComboBox * getLengthUnitComboBox () const noexcept
 
void restoreDefault () noexceptoverride
 
void apply () noexceptoverride
 
void revert () noexceptoverride
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
WSI_AppDefaultMeasurementUnitsoperator= (const WSI_AppDefaultMeasurementUnits &rhs)=delete
 
- Public Member Functions inherited from WSI_Base
 WSI_Base () noexcept
 
 WSI_Base (const WSI_Base &other)=delete
 
virtual ~WSI_Base () noexcept
 
WSI_Baseoperator= (const WSI_Base &rhs)=delete
 
- Public Member Functions inherited from SerializableObject
 SerializableObject () noexcept
 
virtual ~SerializableObject () noexcept
 
SExpression serializeToDomElement (const QString &name) const
 Serialize the object to a new S-Expression node. More...
 

Private Member Functions

void lengthUnitComboBoxIndexChanged (int index) noexcept
 
void updateLengthUnitComboBoxIndex () noexcept
 

Private Attributes

LengthUnit mLengthUnit
 The application's default length unit. More...
 
LengthUnit mLengthUnitTmp
 
QScopedPointer< QComboBox > mLengthUnitComboBox
 

Additional Inherited Members

- Static Public Member Functions inherited from SerializableObject
template<typename T >
static void serializeObjectContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainerUuidSorted (SExpression &root, const T &container, const QString &itemName)
 

Detailed Description

The WSI_AppDefaultMeasurementUnits class represents the application's default measurement units (for example the application's default length unit)

Author
ubruhin
Date
2014-10-04

Constructor & Destructor Documentation

WSI_AppDefaultMeasurementUnits ( const SExpression node)
explicit

+ Here is the call graph for this function:

Member Function Documentation

const LengthUnit& getLengthUnit ( ) const
inlinenoexcept
QString getLengthUnitLabelText ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

QComboBox* getLengthUnitComboBox ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

void restoreDefault ( )
overridevirtualnoexcept

Implements WSI_Base.

+ Here is the call graph for this function:

void apply ( )
overridevirtualnoexcept

Implements WSI_Base.

void revert ( )
overridevirtualnoexcept

Implements WSI_Base.

+ Here is the call graph for this function:

void serialize ( SExpression root) const
overridevirtual

Serialize the object into an existing S-Expression node.

This method inserts/appends all attributes and childs of the object to an existing S-Expression node. The content which already exists in the given S-Expression node will not be removed.

Note
The generated S-Expression node has always the format of the application's major version (it's not possible to generate DOMs of older versions).
Parameters
rootThe target DOM root node
Exceptions
ExceptionThis method throws an exception if an error occurs.

Implements SerializableObject.

+ Here is the call graph for this function:

void lengthUnitComboBoxIndexChanged ( int  index)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void updateLengthUnitComboBoxIndex ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

LengthUnit mLengthUnit
private

The application's default length unit.

Default: millimeters

LengthUnit mLengthUnitTmp
private
QScopedPointer<QComboBox> mLengthUnitComboBox
private

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