![]() |
LibrePCB Developers Documentation
|
#include <bi_device.h>
Public Types | |
enum | Event |
typedef Slot< BI_Device, Event > | OnEditedSlot |
Signals | |
void | attributesChanged () override |
This signal is emitted when the value of attributes has changed. More... | |
void | strokeTextAdded (BI_StrokeText &strokeText) |
void | strokeTextRemoved (BI_StrokeText &strokeText) |
![]() | |
virtual void | attributesChanged ()=0 |
This signal is emitted when the value of attributes has changed. More... | |
Public Member Functions | |
BI_Device ()=delete | |
BI_Device (const BI_Device &other)=delete | |
BI_Device (Board &board, ComponentInstance &compInstance, const Uuid &deviceUuid, const Uuid &footprintUuid, const Point &position, const Angle &rotation, bool mirror, bool locked, bool loadInitialStrokeTexts) | |
~BI_Device () noexcept | |
const Uuid & | getComponentInstanceUuid () const noexcept |
ComponentInstance & | getComponentInstance () const noexcept |
const Device & | getLibDevice () const noexcept |
const Package & | getLibPackage () const noexcept |
const Footprint & | getLibFootprint () const noexcept |
const PackageModel * | getLibModel () const noexcept |
tl::optional< Uuid > | getLibModelUuid () const noexcept |
tl::optional< Uuid > | getDefaultLibModelUuid () const noexcept |
const Point & | getPosition () const noexcept |
const Angle & | getRotation () const noexcept |
bool | getMirrored () const noexcept |
bool | isLocked () const noexcept |
const AttributeList & | getAttributes () const noexcept |
BI_FootprintPad * | getPad (const Uuid &padUuid) const noexcept |
const QMap< Uuid, BI_FootprintPad * > & | getPads () const noexcept |
const QHash< Uuid, tl::optional< Length > > & | getHoleStopMasks () const noexcept |
bool | isUsed () const noexcept |
void | setPosition (const Point &pos) noexcept |
void | setRotation (const Angle &rot) noexcept |
void | setMirrored (bool mirror) |
void | setLocked (bool locked) noexcept |
void | setAttributes (const AttributeList &attributes) noexcept |
void | setModel (const tl::optional< Uuid > &uuid) |
StrokeTextList | getDefaultStrokeTexts () const noexcept |
const QMap< Uuid, BI_StrokeText * > & | getStrokeTexts () const noexcept |
void | addStrokeText (BI_StrokeText &text) |
void | removeStrokeText (BI_StrokeText &text) |
void | addToBoard () override |
void | removeFromBoard () override |
void | serialize (SExpression &root) const |
Serialize into librepcb::SExpression node. More... | |
QString | getUserDefinedAttributeValue (const QString &key) const noexcept override |
Get the value of a user defined attribute (if available) More... | |
QString | getBuiltInAttributeValue (const QString &key) const noexcept override |
Get the value of a built-in attribute (if available) More... | |
QVector< const AttributeProvider * > | getAttributeProviderParents () const noexcept override |
Get all parent attribute providers (fallback if attribute not found) More... | |
BI_Device & | operator= (const BI_Device &rhs)=delete |
![]() | |
BI_Base ()=delete | |
BI_Base (const BI_Base &other)=delete | |
BI_Base (Board &board) noexcept | |
virtual | ~BI_Base () noexcept |
Project & | getProject () const noexcept |
Circuit & | getCircuit () const noexcept |
Board & | getBoard () const noexcept |
virtual bool | isAddedToBoard () const noexcept |
BI_Base & | operator= (const BI_Base &rhs)=delete |
![]() | |
AttributeProvider () noexcept | |
AttributeProvider (const AttributeProvider &other)=delete | |
AttributeProvider & | operator= (const AttributeProvider &rhs)=delete |
virtual | ~AttributeProvider () noexcept |
QString | getAttributeValue (const QString &key) const noexcept |
Get the value of an attribute which can be used in texts (like "{{NAME}}") More... | |
Public Attributes | |
Signal< BI_Device, Event > | onEdited |
Private Member Functions | |
bool | checkAttributesValidity () const noexcept |
void | updateHoleStopMaskOffsets () noexcept |
const QStringList & | getLocaleOrder () const noexcept |
Private Attributes | |
ComponentInstance & | mCompInstance |
const Device * | mLibDevice |
const Package * | mLibPackage |
const Footprint * | mLibFootprint |
const PackageModel * | mLibModel |
nullptr if no model available/selected More... | |
Point | mPosition |
Angle | mRotation |
bool | mMirrored |
bool | mLocked |
AttributeList | mAttributes |
Not used yet, but specified in file format. More... | |
QMap< Uuid, BI_FootprintPad * > | mPads |
key: footprint pad UUID More... | |
QMap< Uuid, BI_StrokeText * > | mStrokeTexts |
QHash< Uuid, tl::optional< Length > > | mHoleStopMaskOffsets |
Additional Inherited Members | |
![]() | |
Board & | mBoard |
The BI_Device class.
typedef Slot<BI_Device, Event> OnEditedSlot |
|
strong |
|
delete |
BI_Device | ( | Board & | board, |
ComponentInstance & | compInstance, | ||
const Uuid & | deviceUuid, | ||
const Uuid & | footprintUuid, | ||
const Point & | position, | ||
const Angle & | rotation, | ||
bool | mirror, | ||
bool | locked, | ||
bool | loadInitialStrokeTexts | ||
) |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
void setMirrored | ( | bool | mirror | ) |
|
noexcept |
|
noexcept |
void setModel | ( | const tl::optional< Uuid > & | uuid | ) |
|
noexcept |
|
inlinenoexcept |
void addStrokeText | ( | BI_StrokeText & | text | ) |
void removeStrokeText | ( | BI_StrokeText & | text | ) |
|
overridevirtual |
Reimplemented from BI_Base.
|
overridevirtual |
Reimplemented from BI_Base.
void serialize | ( | SExpression & | root | ) | const |
Serialize into librepcb::SExpression node.
root | Root node to serialize into. |
|
overridevirtualnoexcept |
Get the value of a user defined attribute (if available)
key | The attribute name (e.g. "NAME" for "{{NAME}}") |
Reimplemented from AttributeProvider.
|
overridevirtualnoexcept |
Get the value of a built-in attribute (if available)
key | The attribute name (e.g. "NAME" for "{{NAME}}") |
Reimplemented from AttributeProvider.
|
overridevirtualnoexcept |
Get all parent attribute providers (fallback if attribute not found)
Reimplemented from AttributeProvider.
|
overridesignal |
This signal is emitted when the value of attributes has changed.
All derived classes must emit this signal when some attributes have changed their values (only attributes which can be fetched with getAttributeValue(), inclusive all attributes from all "parent" classes).
|
signal |
|
signal |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
|
private |
|
private |
|
private |
|
private |
nullptr
if no model available/selected
|
private |
|
private |
|
private |
|
private |
|
private |
Not used yet, but specified in file format.
|
private |
key: footprint pad UUID
|
private |