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