25#ifndef OPENSWMM_RENDER_SUBLAYERS_MESHFILLSUBLAYER_H
26#define OPENSWMM_RENDER_SUBLAYERS_MESHFILLSUBLAYER_H
125 [[nodiscard]] QColor
fillColor()
const {
return m_fillColor; }
133 [[nodiscard]] QColor
noDataColor()
const {
return m_noDataColor; }
169 [[nodiscard]] QJsonObject
toJson()
const override;
170 void fromJson(
const QJsonObject &j)
override;
173 QColor m_fillColor = QColor(190, 180, 150);
174 double m_hillshadeStrength = 0.5;
175 bool m_useElevationRamp =
true;
177 QColor m_noDataColor = QColor(205, 205, 205, 120);
178 QString m_categoryPalette = QStringLiteral(
"Tab10");
189 QString
id()
const override {
return m_id; }
190 QString
displayName()
const override {
return tr(
"Mesh Terrain"); }
194 qreal
opacity()
const override {
return m_opacity; }
227 {
return m_categoriesPresent; }
231 bool m_visible =
true;
232 qreal m_opacity = 1.0;
234 bool m_attributeHasData =
true;
235 QString m_depthUnitLabel;
236 QVector<int> m_categoriesPresent;
Shared classification model: mode + binner + ramp + range + per-class overrides, with a revision stam...
Definition classificationscheme.h:61
One toggleable visual aspect of a results / model layer.
Definition isublayer.h:87
Kind
Coarse taxonomy of sublayer paint behaviours.
Definition isublayer.h:100
@ FillKind
Definition isublayer.h:103
Definition meshfillsublayer.h:41
QColor fillColor
Definition meshfillsublayer.h:88
QString categoryPalette() const
Definition meshfillsublayer.h:134
void setColorByAttribute(CellAttribute v)
Definition meshfillsublayer.cpp:95
QColor noDataColor() const
Definition meshfillsublayer.h:133
void setCategoryPalette(const QString &v)
Definition meshfillsublayer.cpp:119
void setScheme(const ClassificationScheme &s)
Definition meshfillsublayer.cpp:65
static QByteArray attributeKey(CellAttribute a)
Definition meshfillsublayer.cpp:38
void fromJson(const QJsonObject &j) override
Restore the style from JSON.
Definition meshfillsublayer.cpp:164
void setHillshadeStrength(double v)
Definition meshfillsublayer.cpp:79
bool useElevationRamp
Definition meshfillsublayer.h:90
bool useElevationRamp() const
Definition meshfillsublayer.h:131
void setFillColor(const QColor &v)
Definition meshfillsublayer.cpp:72
void setNoDataColor(const QColor &v)
Definition meshfillsublayer.cpp:112
QString categoryPalette
Definition meshfillsublayer.h:106
QColor categoryColorForValue(int v) const
Colour for enumeration value v of the current categorical attribute. v is the enum's own integer (mes...
Definition meshfillsublayer.cpp:135
void setUseElevationRamp(bool v)
Definition meshfillsublayer.cpp:88
bool colorsByCategory() const
Definition meshfillsublayer.cpp:128
QColor noDataColor
Definition meshfillsublayer.h:100
double hillshadeStrength() const
Definition meshfillsublayer.h:126
CellAttribute colorByAttribute() const
Definition meshfillsublayer.h:132
const ClassificationScheme & scheme() const
Definition meshfillsublayer.h:166
QByteArray colorByAttributeKey() const
Definition meshfillsublayer.h:138
double hillshadeStrength
Definition meshfillsublayer.h:89
CellAttribute
Definition meshfillsublayer.h:58
@ GwHg0
"gw.hg0" (engine support pending)
@ InfilMethod
"infil.method" (categorical)
@ Elevation
bed elevation — the historic default
@ GwHu0
"gw.hu0" (engine support pending)
@ InfilSuction
"infil.suction"
@ GwThetaS
"gw.thetaS" (engine support pending)
@ InfilDryTime
"infil.dryTime"
@ InfilDecay
"infil.decay"
@ GwZs
"gw.zs" (engine support pending)
@ GwKs
"gw.Ks" (engine support pending)
OpenSWMM::Render::MeshFillStyle::CellAttribute colorByAttribute
Definition meshfillsublayer.h:96
QJsonObject toJson() const override
Serialize the style to JSON.
Definition meshfillsublayer.cpp:149
bool colorsByElevation() const
Definition meshfillsublayer.h:142
OpenSWMM::Render::ClassificationScheme classification
Definition meshfillsublayer.h:94
static CellAttribute attributeFromKey(const QByteArray &key)
Definition meshfillsublayer.cpp:44
Definition meshfillsublayer.h:183
bool isVisible() const override
Definition meshfillsublayer.h:192
QString displayName() const override
Definition meshfillsublayer.h:190
qreal opacity() const override
Definition meshfillsublayer.h:194
QList< LegendSymbolItem > legendSymbolItems() const override
Returns the legend rows this sublayer contributes.
Definition meshfillsublayer.cpp:234
QString id() const override
Definition meshfillsublayer.h:189
void setAttributeHasData(bool hasData)
Whether the currently selected attribute has any non-NaN value in the host mesh. Pushed by SWMM2DMesh...
Definition meshfillsublayer.cpp:220
void setOpacity(qreal o) override
Definition meshfillsublayer.cpp:211
void setCategoriesPresent(const QVector< int > &values)
Enumeration values of the selected CATEGORICAL attribute that actually occur in the host mesh,...
Definition meshfillsublayer.cpp:227
const QVector< int > & categoriesPresent() const
Definition meshfillsublayer.h:226
SublayerStyle * style() override
Returns the property-bag QObject that owns this sublayer's style knobs.
Definition meshfillsublayer.h:199
Kind kind() const override
Definition meshfillsublayer.h:188
MeshFillStyle * fillStyle() const
Definition meshfillsublayer.h:204
bool isDynamic() const override
Whether this sublayer's output depends on the current animation period.
Definition meshfillsublayer.h:197
void setDepthUnitLabel(const QString &l)
Project depth-unit label ("m" / "ft"), used to suffix the legend title for length-valued attributes....
Definition meshfillsublayer.h:215
bool attributeHasData() const
Definition meshfillsublayer.h:211
QSGNode * buildOrUpdateNode(QSGNode *existing, const SublayerContext &) override
Build (or update) the QSG node tree for this sublayer.
Definition meshfillsublayer.cpp:300
void setVisible(bool v) override
Definition meshfillsublayer.cpp:204
Base class for per-sublayer style property bags.
Definition sublayerstyle.h:56
void styleChanged()
Emitted when any property changes.
Slice US.1 (UNIFIED_STYLING_AND_UI_CONSISTENCY_PLAN.md S1) — the shared classification value type emb...
double s
Scene px per model length unit.
Definition inletdrawingview.cpp:82
Toggleable visual aspect of an output layer.
const char * key
Definition meshcellparams.cpp:24
int a
Definition meshquadmatch.cpp:46
Definition gisrasterlayer.h:40
Definition contourchain.h:23
QVector< int > v
pool vertex indices
Definition pslgminsize.cpp:159
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
Per-frame parameters handed to ISublayer::buildOrUpdateNode().
Definition isublayer.h:73
QObject base class for per-sublayer style property bags.