LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BoardLayerStack Class Referencefinal

The BoardLayerStack class provides and manages all available layers of a board. More...

#include <boardlayerstack.h>

+ Inheritance diagram for BoardLayerStack:
+ Collaboration diagram for BoardLayerStack:

Public Member Functions

 BoardLayerStack ()=delete
 
 BoardLayerStack (const BoardLayerStack &other)=delete
 
 BoardLayerStack (Board &board, const BoardLayerStack &other)
 
 BoardLayerStack (Board &board, const SExpression &node)
 
 BoardLayerStack (Board &board)
 
 ~BoardLayerStack () noexcept
 
BoardgetBoard () const noexcept
 
int getInnerLayerCount () const noexcept
 
QList< GraphicsLayer * > getAllowedPolygonLayers () const noexcept
 
QList< GraphicsLayer * > getAllLayers () const noexceptoverride
 
GraphicsLayergetLayer (const QString &name) const noexceptoverride
 
void setInnerLayerCount (int count) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
BoardLayerStackoperator= (const BoardLayerStack &rhs)=delete
 
- Public Member Functions inherited from SerializableObject
 SerializableObject () noexcept
 
virtual ~SerializableObject () noexcept
 
SExpression serializeToDomElement (const QString &name) const
 Serialize the object to a new S-Expression node. More...
 
- Public Member Functions inherited from IF_GraphicsLayerProvider
virtual ~IF_GraphicsLayerProvider ()
 
GraphicsLayergetGrabAreaLayer (const QString outlineLayerName) const noexcept
 
QList< GraphicsLayer * > getSchematicGeometryElementLayers () const noexcept
 
QList< GraphicsLayer * > getBoardGeometryElementLayers () const noexcept
 
QList< GraphicsLayer * > getLayers (const QStringList &layerNames) const noexcept
 

Private Slots

void layerAttributesChanged () noexcept
 
void boardAttributesChanged () noexcept
 

Private Member Functions

void addAllLayers () noexcept
 
void addLayer (const QString &name, bool disable=false) noexcept
 
void addLayer (GraphicsLayer *layer) noexcept
 

Private Attributes

BoardmBoard
 A reference to the Board object (from the ctor) More...
 
QList< GraphicsLayer * > mLayers
 
bool mLayersChanged
 
int mInnerLayerCount
 

Additional Inherited Members

- Static Public Member Functions inherited from SerializableObject
template<typename T >
static void serializeObjectContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainerUuidSorted (SExpression &root, const T &container, const QString &itemName)
 

Detailed Description

The BoardLayerStack class provides and manages all available layers of a board.

Constructor & Destructor Documentation

BoardLayerStack ( )
delete
BoardLayerStack ( const BoardLayerStack other)
delete
BoardLayerStack ( Board board,
const BoardLayerStack other 
)

+ Here is the call graph for this function:

BoardLayerStack ( Board board,
const SExpression node 
)

+ Here is the call graph for this function:

BoardLayerStack ( Board board)
explicit

+ Here is the call graph for this function:

~BoardLayerStack ( )
noexcept

Member Function Documentation

Board& getBoard ( ) const
inlinenoexcept
int getInnerLayerCount ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

QList< GraphicsLayer * > getAllowedPolygonLayers ( ) const
noexcept

+ Here is the call graph for this function:

QList<GraphicsLayer*> getAllLayers ( ) const
inlineoverridevirtualnoexcept

Implements IF_GraphicsLayerProvider.

+ Here is the caller graph for this function:

GraphicsLayer* getLayer ( const QString &  name) const
inlineoverridevirtualnoexcept

Implements IF_GraphicsLayerProvider.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setInnerLayerCount ( int  count)
noexcept

+ Here is the caller graph for this function:

void serialize ( SExpression root) const
overridevirtual

Serialize the object into an existing S-Expression node.

This method inserts/appends all attributes and childs of the object to an existing S-Expression node. The content which already exists in the given S-Expression node will not be removed.

Note
The generated S-Expression node has always the format of the application's major version (it's not possible to generate DOMs of older versions).
Parameters
rootThe target DOM root node
Exceptions
ExceptionThis method throws an exception if an error occurs.

Implements SerializableObject.

+ Here is the call graph for this function:

BoardLayerStack& operator= ( const BoardLayerStack rhs)
delete
void layerAttributesChanged ( )
privateslotnoexcept

+ Here is the caller graph for this function:

void boardAttributesChanged ( )
privateslotnoexcept

+ Here is the caller graph for this function:

void addAllLayers ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void addLayer ( const QString &  name,
bool  disable = false 
)
privatenoexcept

+ Here is the caller graph for this function:

void addLayer ( GraphicsLayer layer)
privatenoexcept

+ Here is the call graph for this function:

Member Data Documentation

Board& mBoard
private

A reference to the Board object (from the ctor)

QList<GraphicsLayer*> mLayers
private
bool mLayersChanged
private
int mInnerLayerCount
private

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