20#ifndef LIBREPCB_CORE_ATTRIBUTETYPE_H
21#define LIBREPCB_CORE_ATTRIBUTETYPE_H
63 const QString& typeNameTr)
noexcept;
77 virtual bool isValueValid(
const QString& value)
const noexcept = 0;
78 virtual QString
valueFromTr(
const QString& value)
const noexcept = 0;
The AttributeType class.
Definition attributetype.h:42
const QString & getNameTr() const noexcept
Definition attributetype.h:69
QString mTypeName
Definition attributetype.h:93
Type_t
Available Attribute Types.
Definition attributetype.h:47
const QString & getName() const noexcept
Definition attributetype.h:68
const AttributeUnit * mDefaultUnit
Definition attributetype.h:96
virtual QString printableValueTr(const QString &value, const AttributeUnit *unit=nullptr) const noexcept=0
const AttributeUnit * tryExtractUnitFromValue(QString &value) const noexcept
Definition attributetype.cpp:88
Type_t getType() const noexcept
Definition attributetype.h:67
static QList< const AttributeType * > getAllTypes() noexcept
Definition attributetype.cpp:106
Type_t mType
Definition attributetype.h:92
static const AttributeType & fromString(const QString &type)
Definition attributetype.cpp:119
AttributeType(const AttributeType &other)=delete
const QList< const AttributeUnit * > & getAvailableUnits() const noexcept
Definition attributetype.h:70
const AttributeUnit * getUnitFromString(const QString &unit) const
Definition attributetype.cpp:66
virtual bool isValueValid(const QString &value) const noexcept=0
QList< const AttributeUnit * > mAvailableUnits
Definition attributetype.h:95
virtual QString valueFromTr(const QString &value) const noexcept=0
virtual ~AttributeType() noexcept
Definition attributetype.cpp:56
QString mTypeNameTr
Definition attributetype.h:94
const AttributeUnit * getDefaultUnit() const noexcept
Definition attributetype.h:74
bool isUnitAvailable(const AttributeUnit *unit) const noexcept
Definition attributetype.cpp:80
The AttributeUnit class.
Definition attributeunit.h:40
Definition occmodel.cpp:76