LibrePCB Developers Documentation
|
The AttributeType class. More...
#include <attributetype.h>
Public Types | |
enum class | Type_t |
Available Attribute Types. More... | |
Public Member Functions | |
AttributeType ()=delete | |
AttributeType (const AttributeType &other)=delete | |
AttributeType (Type_t type, const QString &typeName, const QString &typeNameTr) noexcept | |
virtual | ~AttributeType () noexcept |
Type_t | getType () const noexcept |
const QString & | getName () const noexcept |
const QString & | getNameTr () const noexcept |
const QList< const AttributeUnit * > & | getAvailableUnits () const noexcept |
const AttributeUnit * | getUnitFromString (const QString &unit) const |
const AttributeUnit * | getDefaultUnit () const noexcept |
bool | isUnitAvailable (const AttributeUnit *unit) const noexcept |
const AttributeUnit * | tryExtractUnitFromValue (QString &value) const noexcept |
virtual bool | isValueValid (const QString &value) const noexcept=0 |
virtual QString | valueFromTr (const QString &value) const noexcept=0 |
virtual QString | printableValueTr (const QString &value, const AttributeUnit *unit=nullptr) const noexcept=0 |
AttributeType & | operator= (const AttributeType &rhs)=delete |
Static Public Member Functions | |
static QList< const AttributeType * > | getAllTypes () noexcept |
static const AttributeType & | fromString (const QString &type) |
Protected Attributes | |
Type_t | mType |
QString | mTypeName |
QString | mTypeNameTr |
QList< const AttributeUnit * > | mAvailableUnits |
const AttributeUnit * | mDefaultUnit |
The AttributeType class.
|
strong |
Available Attribute Types.
Enumerator | |
---|---|
String |
|
Resistance |
|
Capacitance |
|
Inductance |
|
Voltage |
|
Current |
|
Power |
|
Frequency |
|
_COUNT |
|
delete |
|
delete |
|
noexcept |
|
virtualnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
const AttributeUnit * getUnitFromString | ( | const QString & | unit | ) | const |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
pure virtualnoexcept |
Implemented in AttrTypeCapacitance, AttrTypeCurrent, AttrTypeFrequency, AttrTypeInductance, AttrTypePower, AttrTypeResistance, AttrTypeString, and AttrTypeVoltage.
|
pure virtualnoexcept |
Implemented in AttrTypeCapacitance, AttrTypeCurrent, AttrTypeFrequency, AttrTypeInductance, AttrTypePower, AttrTypeResistance, AttrTypeString, and AttrTypeVoltage.
|
pure virtualnoexcept |
Implemented in AttrTypeCapacitance, AttrTypeCurrent, AttrTypeFrequency, AttrTypeInductance, AttrTypePower, AttrTypeResistance, AttrTypeString, and AttrTypeVoltage.
|
staticnoexcept |
|
static |
|
delete |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |