20#ifndef LIBREPCB_EDITOR_GRAPHICSLAYER_H
21#define LIBREPCB_EDITOR_GRAPHICSLAYER_H
70 explicit GraphicsLayer(
const QString& name,
const QString& nameTr,
71 const QColor& color,
const QColor& colorHighlighted,
72 bool visible =
true,
bool enabled =
true) noexcept;
78 const QColor&
getColor(
bool highlighted =
false) const noexcept {
86 void setColor(
const QColor& color)
noexcept;
117 const QString& name) const noexcept = 0;
120 const
Layer& outlineLayer) const noexcept;
The Layer class provides all supported geometry layers.
Definition layer.h:42
The Signal class is used to emit signals on non-QObject derived classes.
Definition signalslot.h:65
The Slot class is used to receive signals from non-QObject derived classes.
Definition signalslot.h:170
The GraphicsLayer class represents a graphical layer used in schematics and boards.
Definition graphicslayer.h:53
const QString & getNameTr() const noexcept
Definition graphicslayer.h:77
bool isEnabled() const noexcept
Definition graphicslayer.h:82
Slot< GraphicsLayer, Event > OnEditedSlot
Definition graphicslayer.h:65
const QString mName
Theme color name.
Definition graphicslayer.h:95
const QString & getName() const noexcept
Definition graphicslayer.h:76
void setEnabled(bool enable) noexcept
Definition graphicslayer.cpp:92
void setColor(const QColor &color) noexcept
Definition graphicslayer.cpp:71
Event
Definition graphicslayer.h:58
const QString mNameTr
Translated layer name as shown in the GUI.
Definition graphicslayer.h:96
bool getVisible() const noexcept
Definition graphicslayer.h:81
Signal< GraphicsLayer, Event > onEdited
Definition graphicslayer.h:64
void setColorHighlighted(const QColor &color) noexcept
Definition graphicslayer.cpp:78
void setVisible(bool visible) noexcept
Definition graphicslayer.cpp:85
QColor mColorHighlighted
Color of highlighted graphics items.
Definition graphicslayer.h:98
QColor mColor
Color of graphics items.
Definition graphicslayer.h:97
bool mIsEnabled
Availability of the layer itself.
Definition graphicslayer.h:100
GraphicsLayer & operator=(const GraphicsLayer &rhs)=delete
const QColor & getColor(bool highlighted=false) const noexcept
Definition graphicslayer.h:78
bool mIsVisible
Visibility of graphics items on that layer.
Definition graphicslayer.h:99
bool isVisible() const noexcept
Definition graphicslayer.h:83
The IF_GraphicsLayerProvider class defines an interface for classes which provide layers.
Definition graphicslayer.h:111
virtual std::shared_ptr< GraphicsLayer > getLayer(const QString &name) const noexcept=0
std::shared_ptr< GraphicsLayer > getGrabAreaLayer(const Layer &outlineLayer) const noexcept
Definition graphicslayer.cpp:108
virtual ~IF_GraphicsLayerProvider() noexcept
Definition graphicslayer.h:113
virtual QList< std::shared_ptr< GraphicsLayer > > getAllLayers() const noexcept=0
Definition occmodel.cpp:76