SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
symbolstyle.h
Go to the documentation of this file.
1
22#ifndef OPENSWMM_RENDER_SYMBOLSTYLE_H
23#define OPENSWMM_RENDER_SYMBOLSTYLE_H
24
25#include "render/symbollayer.h"
26
27#include <QColor>
28#include <QJsonObject>
29#include <QList>
30
31namespace OpenSWMM::Render
32{
33
39{
40 QList<SymbolLayer> layers;
41 qreal opacity = 1.0;
43 [[nodiscard]] QJsonObject toJson() const;
44 void fromJson(const QJsonObject &j);
45};
46
60namespace SymbolProps
61{
62
65[[nodiscard]] QColor readColor(const QVariantMap &props, const QString &key,
66 const QColor &fallback = QColor());
67
69void writeColor(QVariantMap &props, const QString &key, const QColor &c);
70
74[[nodiscard]] QColor firstColor(const SymbolStyle &style,
75 const QColor &fallback = QColor());
76
81void overrideColorInPlace(SymbolStyle &style, const QColor &c);
82
83} // namespace SymbolProps
84
85} // namespace OpenSWMM::Render
86
87#endif // OPENSWMM_RENDER_SYMBOLSTYLE_H
const char * key
Definition meshcellparams.cpp:24
QColor firstColor(const SymbolStyle &style, const QColor &fallback=QColor())
Definition symbolstyle.cpp:76
QColor readColor(const QVariantMap &props, const QString &key, const QColor &fallback=QColor())
Definition symbolstyle.cpp:52
void overrideColorInPlace(SymbolStyle &style, const QColor &c)
Definition symbolstyle.cpp:93
void writeColor(QVariantMap &props, const QString &key, const QColor &c)
Definition symbolstyle.cpp:71
Definition gisrasterlayer.h:40
Canonical colour prop accessors for SymbolLayer prop bags (gap A1.2).
Stack of SymbolLayer paint passes (bottom-up) plus an overall opacity.
Definition symbolstyle.h:39
void fromJson(const QJsonObject &j)
Definition symbolstyle.cpp:31
QList< SymbolLayer > layers
Definition symbolstyle.h:40
qreal opacity
Definition symbolstyle.h:41
QJsonObject toJson() const
Definition symbolstyle.cpp:18
One paint pass in a compositional SymbolStyle stack.