LibrePCB Developers Documentation
Schematic Class Referencefinal

The Schematic class represents one schematic page of a project and is always part of a circuit. More...

#include <schematic.h>

Inherits QObject.

+ Collaboration diagram for Schematic:

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 ()
 

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
 
ProjectgetProject () const noexcept
 
const QString & getDirectoryName () const noexcept
 
TransactionalDirectorygetDirectory () noexcept
 
bool isEmpty () const noexcept
 
const UuidgetUuid () const noexcept
 
const ElementNamegetName () const noexcept
 
const PositiveLengthgetGridInterval () const noexcept
 
const LengthUnitgetGridUnit () 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
 
Schematicoperator= (const Schematic &rhs)=delete
 
bool operator== (const Schematic &rhs) noexcept
 
bool operator!= (const Schematic &rhs) noexcept
 

Private Attributes

ProjectmProject
 A reference to the Project object (from the ctor) More...
 
const QString mDirectoryName
 
std::unique_ptr< TransactionalDirectorymDirectory
 
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
 

Detailed Description

The Schematic class represents one schematic page of a project and is always part of a circuit.

A schematic can contain following items:

Constructor & Destructor Documentation

◆ Schematic() [1/3]

Schematic ( )
delete

◆ Schematic() [2/3]

Schematic ( const Schematic other)
delete

◆ Schematic() [3/3]

Schematic ( Project project,
std::unique_ptr< TransactionalDirectory directory,
const QString &  directoryName,
const Uuid uuid,
const ElementName name 
)

◆ ~Schematic()

~Schematic ( )
noexcept

Member Function Documentation

◆ getProject()

Project & getProject ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getDirectoryName()

const QString & getDirectoryName ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getDirectory()

TransactionalDirectory & getDirectory ( )
inlinenoexcept

◆ isEmpty()

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

◆ getUuid()

const Uuid & getUuid ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getName()

const ElementName & getName ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getGridInterval()

const PositiveLength & getGridInterval ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getGridUnit()

const LengthUnit & getGridUnit ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ setName()

void setName ( const ElementName name)
noexcept
+ Here is the caller graph for this function:

◆ setGridInterval()

void setGridInterval ( const PositiveLength interval)
inlinenoexcept
+ Here is the caller graph for this function:

◆ setGridUnit()

void setGridUnit ( const LengthUnit unit)
inlinenoexcept
+ Here is the caller graph for this function:

◆ getSymbols()

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

◆ addSymbol()

void addSymbol ( SI_Symbol symbol)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeSymbol()

void removeSymbol ( SI_Symbol symbol)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNetSegments()

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

◆ addNetSegment()

void addNetSegment ( SI_NetSegment netsegment)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeNetSegment()

void removeNetSegment ( SI_NetSegment netsegment)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPolygons()

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

◆ addPolygon()

void addPolygon ( SI_Polygon polygon)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removePolygon()

void removePolygon ( SI_Polygon polygon)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTexts()

const QMap< Uuid, SI_Text * > & getTexts ( ) const
inlinenoexcept

◆ addText()

void addText ( SI_Text text)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeText()

void removeText ( SI_Text text)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToProject()

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

◆ removeFromProject()

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

◆ save()

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

◆ updateAllNetLabelAnchors()

void updateAllNetLabelAnchors ( )
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

Schematic & operator= ( const Schematic rhs)
delete

◆ operator==()

bool operator== ( const Schematic rhs)
inlinenoexcept

◆ operator!=()

bool operator!= ( const Schematic rhs)
inlinenoexcept

◆ symbolAdded

void symbolAdded ( SI_Symbol symbol)
signal
+ Here is the caller graph for this function:

◆ symbolRemoved

void symbolRemoved ( SI_Symbol symbol)
signal
+ Here is the caller graph for this function:

◆ netSegmentAdded

void netSegmentAdded ( SI_NetSegment netSegment)
signal
+ Here is the caller graph for this function:

◆ netSegmentRemoved

void netSegmentRemoved ( SI_NetSegment netSegment)
signal
+ Here is the caller graph for this function:

◆ polygonAdded

void polygonAdded ( SI_Polygon polygon)
signal
+ Here is the caller graph for this function:

◆ polygonRemoved

void polygonRemoved ( SI_Polygon polygon)
signal
+ Here is the caller graph for this function:

◆ textAdded

void textAdded ( SI_Text text)
signal
+ Here is the caller graph for this function:

◆ textRemoved

void textRemoved ( SI_Text text)
signal
+ Here is the caller graph for this function:

◆ attributesChanged

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

Member Data Documentation

◆ mProject

Project& mProject
private

A reference to the Project object (from the ctor)

◆ mDirectoryName

const QString mDirectoryName
private

◆ mDirectory

std::unique_ptr<TransactionalDirectory> mDirectory
private

◆ mIsAddedToProject

bool mIsAddedToProject
private

◆ mUuid

Uuid mUuid
private

◆ mName

ElementName mName
private

◆ mGridInterval

PositiveLength mGridInterval
private

◆ mGridUnit

LengthUnit mGridUnit
private

◆ mSymbols

QMap<Uuid, SI_Symbol*> mSymbols
private

◆ mNetSegments

QMap<Uuid, SI_NetSegment*> mNetSegments
private

◆ mPolygons

QMap<Uuid, SI_Polygon*> mPolygons
private

◆ mTexts

QMap<Uuid, SI_Text*> mTexts
private

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