LibrePCB Developers Documentation
BI_Device Class Referencefinal

The BI_Device class. More...

#include <bi_device.h>

+ Inheritance diagram for BI_Device:
+ Collaboration diagram for BI_Device:

Public Types

enum class  Event
 
typedef Slot< BI_Device, EventOnEditedSlot
 

Signals

void attributesChanged ()
 
void strokeTextAdded (BI_StrokeText &strokeText)
 
void strokeTextRemoved (BI_StrokeText &strokeText)
 

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 UuidgetComponentInstanceUuid () const noexcept
 
ComponentInstancegetComponentInstance () const noexcept
 
const DevicegetLibDevice () const noexcept
 
const PackagegetLibPackage () const noexcept
 
const FootprintgetLibFootprint () const noexcept
 
const PackageModelgetLibModel () const noexcept
 
tl::optional< UuidgetLibModelUuid () const noexcept
 
tl::optional< UuidgetDefaultLibModelUuid () const noexcept
 
const PointgetPosition () const noexcept
 
const AnglegetRotation () const noexcept
 
bool getMirrored () const noexcept
 
bool isLocked () const noexcept
 
const AttributeListgetAttributes () const noexcept
 
BI_FootprintPadgetPad (const Uuid &padUuid) const noexcept
 
const QMap< Uuid, BI_FootprintPad * > & getPads () const noexcept
 
const QHash< Uuid, tl::optional< Length > > & getHoleStopMasks () const noexcept
 
QVector< std::shared_ptr< const Part > > getParts (const tl::optional< Uuid > &assemblyVariant) const noexcept
 
bool isInAssemblyVariant (const Uuid &assemblyVariant) const noexcept
 
bool doesPackageRequireAssembly (bool resolveAuto) 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...
 
BI_Deviceoperator= (const BI_Device &rhs)=delete
 
- Public Member Functions inherited from BI_Base
 BI_Base ()=delete
 
 BI_Base (const BI_Base &other)=delete
 
 BI_Base (Board &board) noexcept
 
virtual ~BI_Base () noexcept
 
ProjectgetProject () const noexcept
 
CircuitgetCircuit () const noexcept
 
BoardgetBoard () const noexcept
 
virtual bool isAddedToBoard () const noexcept
 
virtual void addToBoard ()
 
virtual void removeFromBoard ()
 
BI_Baseoperator= (const BI_Base &rhs)=delete
 

Public Attributes

Signal< BI_Device, EventonEdited
 

Private Member Functions

bool checkAttributesValidity () const noexcept
 
void updateHoleStopMaskOffsets () noexcept
 
const QStringList & getLocaleOrder () const noexcept
 

Private Attributes

ComponentInstancemCompInstance
 
const DevicemLibDevice
 
const PackagemLibPackage
 
const FootprintmLibFootprint
 
const PackageModelmLibModel
 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

- Protected Attributes inherited from BI_Base
BoardmBoard
 

Detailed Description

The BI_Device class.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum class Event
strong
Enumerator
BoardLayersChanged 
PositionChanged 
RotationChanged 
MirroredChanged 
StopMaskOffsetsChanged 

Constructor & Destructor Documentation

◆ BI_Device() [1/3]

BI_Device ( )
delete

◆ BI_Device() [2/3]

BI_Device ( const BI_Device other)
delete

◆ BI_Device() [3/3]

BI_Device ( Board board,
ComponentInstance compInstance,
const Uuid deviceUuid,
const Uuid footprintUuid,
const Point position,
const Angle rotation,
bool  mirror,
bool  locked,
bool  loadInitialStrokeTexts 
)
+ Here is the call graph for this function:

◆ ~BI_Device()

~BI_Device ( )
noexcept

Member Function Documentation

◆ getComponentInstanceUuid()

const Uuid & getComponentInstanceUuid ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getComponentInstance()

ComponentInstance & getComponentInstance ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLibDevice()

const Device & getLibDevice ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLibPackage()

const Package & getLibPackage ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLibFootprint()

const Footprint & getLibFootprint ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLibModel()

const PackageModel * getLibModel ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLibModelUuid()

tl::optional< Uuid > getLibModelUuid ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDefaultLibModelUuid()

tl::optional< Uuid > getDefaultLibModelUuid ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPosition()

const Point & getPosition ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getRotation()

const Angle & getRotation ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getMirrored()

bool getMirrored ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ isLocked()

bool isLocked ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getAttributes()

const AttributeList & getAttributes ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPad()

BI_FootprintPad * getPad ( const Uuid padUuid) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPads()

const QMap< Uuid, BI_FootprintPad * > & getPads ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getHoleStopMasks()

const QHash< Uuid, tl::optional< Length > > & getHoleStopMasks ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getParts()

QVector< std::shared_ptr< const Part > > getParts ( const tl::optional< Uuid > &  assemblyVariant) const
noexcept
+ Here is the caller graph for this function:

◆ isInAssemblyVariant()

bool isInAssemblyVariant ( const Uuid assemblyVariant) const
noexcept
+ Here is the caller graph for this function:

◆ doesPackageRequireAssembly()

bool doesPackageRequireAssembly ( bool  resolveAuto) const
noexcept
+ Here is the caller graph for this function:

◆ isUsed()

bool isUsed ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPosition()

void setPosition ( const Point pos)
noexcept
+ Here is the caller graph for this function:

◆ setRotation()

void setRotation ( const Angle rot)
noexcept
+ Here is the caller graph for this function:

◆ setMirrored()

void setMirrored ( bool  mirror)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLocked()

void setLocked ( bool  locked)
noexcept
+ Here is the caller graph for this function:

◆ setAttributes()

void setAttributes ( const AttributeList attributes)
noexcept
+ Here is the caller graph for this function:

◆ setModel()

void setModel ( const tl::optional< Uuid > &  uuid)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDefaultStrokeTexts()

StrokeTextList getDefaultStrokeTexts ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStrokeTexts()

const QMap< Uuid, BI_StrokeText * > & getStrokeTexts ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ addStrokeText()

void addStrokeText ( BI_StrokeText text)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeStrokeText()

void removeStrokeText ( BI_StrokeText text)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToBoard()

void addToBoard ( )
overridevirtual

Reimplemented from BI_Base.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeFromBoard()

void removeFromBoard ( )
overridevirtual

Reimplemented from BI_Base.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

void serialize ( SExpression root) const

Serialize into librepcb::SExpression node.

Parameters
rootRoot node to serialize into.
+ Here is the call graph for this function:

◆ operator=()

BI_Device & operator= ( const BI_Device rhs)
delete

◆ attributesChanged

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

◆ strokeTextAdded

void strokeTextAdded ( BI_StrokeText strokeText)
signal
+ Here is the caller graph for this function:

◆ strokeTextRemoved

void strokeTextRemoved ( BI_StrokeText strokeText)
signal
+ Here is the caller graph for this function:

◆ checkAttributesValidity()

bool checkAttributesValidity ( ) const
privatenoexcept
+ Here is the caller graph for this function:

◆ updateHoleStopMaskOffsets()

void updateHoleStopMaskOffsets ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLocaleOrder()

const QStringList & getLocaleOrder ( ) const
privatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ onEdited

Signal<BI_Device, Event> onEdited

◆ mCompInstance

ComponentInstance& mCompInstance
private

◆ mLibDevice

const Device* mLibDevice
private

◆ mLibPackage

const Package* mLibPackage
private

◆ mLibFootprint

const Footprint* mLibFootprint
private

◆ mLibModel

const PackageModel* mLibModel
private

nullptr if no model available/selected

◆ mPosition

Point mPosition
private

◆ mRotation

Angle mRotation
private

◆ mMirrored

bool mMirrored
private

◆ mLocked

bool mLocked
private

◆ mAttributes

AttributeList mAttributes
private

Not used yet, but specified in file format.

◆ mPads

QMap<Uuid, BI_FootprintPad*> mPads
private

key: footprint pad UUID

◆ mStrokeTexts

QMap<Uuid, BI_StrokeText*> mStrokeTexts
private

◆ mHoleStopMaskOffsets

QHash<Uuid, tl::optional<Length> > mHoleStopMaskOffsets
private

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