![]() |
LibrePCB Developers Documentation
|
The Schematic class represents one schematic page of a project and is always part of a circuit. More...
#include <schematic.h>
Signals | |
void | symbolAdded (SI_Symbol &symbol) |
void | symbolRemoved (SI_Symbol &symbol) |
void | netSegmentAdded (SI_NetSegment &netSegment) |
void | netSegmentRemoved (SI_NetSegment &netSegment) |
void | polygonAdded (SI_Polygon &polygon) |
void | polygonRemoved (SI_Polygon &polygon) |
void | textAdded (SI_Text &text) |
void | textRemoved (SI_Text &text) |
void | attributesChanged () override |
This signal is emitted when the value of attributes has changed. More... | |
![]() | |
virtual void | attributesChanged ()=0 |
This signal is emitted when the value of attributes has changed. More... | |
Public Member Functions | |
Schematic ()=delete | |
Schematic (const Schematic &other)=delete | |
Schematic (Project &project, std::unique_ptr< TransactionalDirectory > directory, const QString &directoryName, const Uuid &uuid, const ElementName &name) | |
~Schematic () noexcept | |
Project & | getProject () const noexcept |
const QString & | getDirectoryName () const noexcept |
TransactionalDirectory & | getDirectory () noexcept |
bool | isEmpty () const noexcept |
const Uuid & | getUuid () const noexcept |
const ElementName & | getName () const noexcept |
const PositiveLength & | getGridInterval () const noexcept |
const LengthUnit & | getGridUnit () const noexcept |
void | setName (const ElementName &name) noexcept |
void | setGridInterval (const PositiveLength &interval) noexcept |
void | setGridUnit (const LengthUnit &unit) noexcept |
const QMap< Uuid, SI_Symbol * > & | getSymbols () const noexcept |
void | addSymbol (SI_Symbol &symbol) |
void | removeSymbol (SI_Symbol &symbol) |
const QMap< Uuid, SI_NetSegment * > & | getNetSegments () const noexcept |
void | addNetSegment (SI_NetSegment &netsegment) |
void | removeNetSegment (SI_NetSegment &netsegment) |
const QMap< Uuid, SI_Polygon * > & | getPolygons () const noexcept |
void | addPolygon (SI_Polygon &polygon) |
void | removePolygon (SI_Polygon &polygon) |
const QMap< Uuid, SI_Text * > & | getTexts () const noexcept |
void | addText (SI_Text &text) |
void | removeText (SI_Text &text) |
void | addToProject () |
void | removeFromProject () |
void | save () |
void | updateAllNetLabelAnchors () noexcept |
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... | |
Schematic & | operator= (const Schematic &rhs)=delete |
bool | operator== (const Schematic &rhs) noexcept |
bool | operator!= (const Schematic &rhs) noexcept |
![]() | |
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... | |
virtual QString | getUserDefinedAttributeValue (const QString &key) const noexcept |
Get the value of a user defined attribute (if available) More... | |
Private Attributes | |
Project & | mProject |
A reference to the Project object (from the ctor) More... | |
const QString | mDirectoryName |
std::unique_ptr< TransactionalDirectory > | mDirectory |
bool | mIsAddedToProject |
Uuid | mUuid |
ElementName | mName |
PositiveLength | mGridInterval |
LengthUnit | mGridUnit |
QMap< Uuid, SI_Symbol * > | mSymbols |
QMap< Uuid, SI_NetSegment * > | mNetSegments |
QMap< Uuid, SI_Polygon * > | mPolygons |
QMap< Uuid, SI_Text * > | mTexts |
The Schematic class represents one schematic page of a project and is always part of a circuit.
A schematic can contain following items:
|
delete |
Schematic | ( | Project & | project, |
std::unique_ptr< TransactionalDirectory > | directory, | ||
const QString & | directoryName, | ||
const Uuid & | uuid, | ||
const ElementName & | name | ||
) |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
void addSymbol | ( | SI_Symbol & | symbol | ) |
void removeSymbol | ( | SI_Symbol & | symbol | ) |
|
inlinenoexcept |
void addNetSegment | ( | SI_NetSegment & | netsegment | ) |
void removeNetSegment | ( | SI_NetSegment & | netsegment | ) |
|
inlinenoexcept |
void addPolygon | ( | SI_Polygon & | polygon | ) |
void removePolygon | ( | SI_Polygon & | polygon | ) |
void addText | ( | SI_Text & | text | ) |
void removeText | ( | SI_Text & | text | ) |
void addToProject | ( | ) |
void removeFromProject | ( | ) |
void save | ( | ) |
|
noexcept |
|
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.
|
inlinenoexcept |
|
inlinenoexcept |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
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).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |