LibrePCB Developers Documentation
|
The ComponentInstance class. More...
#include <componentinstance.h>
Inherits QObject.
Signals | |
void | attributesChanged () |
void | primaryDeviceChanged (const BI_Device *device) |
Public Member Functions | |
ComponentInstance ()=delete | |
ComponentInstance (const ComponentInstance &other)=delete | |
ComponentInstance (Circuit &circuit, const Uuid &uuid, const Component &cmp, const Uuid &symbVar, const CircuitIdentifier &name) | |
~ComponentInstance () noexcept | |
const Uuid & | getUuid () const noexcept |
const CircuitIdentifier & | getName () const noexcept |
const QString & | getValue () const noexcept |
const QPointer< const BI_Device > & | getPrimaryDevice () const noexcept |
const Component & | getLibComponent () const noexcept |
const ComponentSymbolVariant & | getSymbolVariant () const noexcept |
const QMap< Uuid, ComponentSignalInstance * > & | getSignals () const noexcept |
ComponentSignalInstance * | getSignalInstance (const Uuid &signalUuid) const noexcept |
const AttributeList & | getAttributes () const noexcept |
const ComponentAssemblyOptionList & | getAssemblyOptions () const noexcept |
QSet< Uuid > | getCompatibleDevices () const noexcept |
QVector< std::shared_ptr< const Part > > | getParts (const tl::optional< Uuid > &assemblyVariant) const noexcept |
bool | getLockAssembly () const noexcept |
Circuit & | getCircuit () const noexcept |
const QHash< Uuid, SI_Symbol * > & | getSymbols () const noexcept |
const QList< BI_Device * > & | getDevices () const noexcept |
QSet< Uuid > | getUsedDeviceUuids () const noexcept |
int | getRegisteredElementsCount () const noexcept |
bool | isUsed () const noexcept |
bool | isAddedToCircuit () const noexcept |
void | setName (const CircuitIdentifier &name) noexcept |
Set the name of this component instance in the circuit. More... | |
void | setValue (const QString &value) noexcept |
Set the value of this component instance in the circuit. More... | |
void | setAttributes (const AttributeList &attributes) noexcept |
void | setAssemblyOptions (const ComponentAssemblyOptionList &options) noexcept |
void | setLockAssembly (bool lock) noexcept |
void | addToCircuit () |
void | removeFromCircuit () |
void | registerSymbol (SI_Symbol &symbol) |
void | unregisterSymbol (SI_Symbol &symbol) |
void | registerDevice (BI_Device &device) |
void | unregisterDevice (BI_Device &device) |
void | serialize (SExpression &root) const |
Serialize into librepcb::SExpression node. More... | |
ComponentInstance & | operator= (const ComponentInstance &rhs)=delete |
Private Member Functions | |
void | updatePrimaryDevice () noexcept |
bool | checkAttributesValidity () const noexcept |
const QStringList & | getLocaleOrder () const noexcept |
Private Attributes | |
Circuit & | mCircuit |
bool | mIsAddedToCircuit |
Uuid | mUuid |
The unique UUID of this component instance in the circuit. More... | |
CircuitIdentifier | mName |
The unique name of this component instance in the circuit (e.g. "R42") More... | |
QString | mValue |
The value of this component instance in the circuit (e.g. the resistance of a resistor) More... | |
const Component & | mLibComponent |
Reference to the component in the project's library. More... | |
const ComponentSymbolVariant * | mCompSymbVar |
Pointer to the used symbol variant of mLibComponent. More... | |
QScopedPointer< AttributeList > | mAttributes |
All attributes of this component. More... | |
QMap< Uuid, ComponentSignalInstance * > | mSignals |
All signal instances (Key: component signal UUID) More... | |
ComponentAssemblyOptionList | mAssemblyOptions |
Assembly options including MPNs. More... | |
bool | mLockAssembly |
Whether mAssemblyOptions can be modified from the board editor or not. More... | |
QHash< Uuid, SI_Symbol * > | mRegisteredSymbols |
All registered symbols. More... | |
QList< BI_Device * > | mRegisteredDevices |
All registered devices (of all boards) More... | |
QPointer< const BI_Device > | mPrimaryDevice |
The ComponentInstance class.
|
delete |
|
delete |
|
explicit |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
|
noexcept |
Set the name of this component instance in the circuit.
name | The new name of this component in the circuit |
|
noexcept |
Set the value of this component instance in the circuit.
value | The new value |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
void addToCircuit | ( | ) |
void removeFromCircuit | ( | ) |
void registerSymbol | ( | SI_Symbol & | symbol | ) |
void unregisterSymbol | ( | SI_Symbol & | symbol | ) |
void registerDevice | ( | BI_Device & | device | ) |
void unregisterDevice | ( | BI_Device & | device | ) |
void serialize | ( | SExpression & | root | ) | const |
Serialize into librepcb::SExpression node.
root | Root node to serialize into. |
|
delete |
|
signal |
|
signal |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
|
private |
|
private |
The unique UUID of this component instance in the circuit.
|
private |
The unique name of this component instance in the circuit (e.g. "R42")
|
private |
The value of this component instance in the circuit (e.g. the resistance of a resistor)
|
private |
Reference to the component in the project's library.
|
private |
Pointer to the used symbol variant of mLibComponent.
|
private |
All attributes of this component.
|
private |
All signal instances (Key: component signal UUID)
|
private |
Assembly options including MPNs.
|
private |
Whether mAssemblyOptions can be modified from the board editor or not.
All registered symbols.
|
private |
All registered devices (of all boards)
|
private |