7#ifndef OPENSWMM_RENDER_SUBLAYERS_DEPTHCOLORRAMPSUBLAYER_H
8#define OPENSWMM_RENDER_SUBLAYERS_DEPTHCOLORRAMPSUBLAYER_H
37 Q_CLASSINFO("group:
attribute", "Classification")
42 Q_CLASSINFO("group:
lowColor", "Ramp")
55 [[nodiscard]] QString
attribute()
const {
return m_attribute; }
64 [[nodiscard]]
bool useLogScale()
const {
return m_useLogScale; }
85 [[nodiscard]] QColor
colorAtF(
double f)
const;
87 [[nodiscard]] QJsonObject
toJson()
const override;
88 void fromJson(
const QJsonObject &j)
override;
91 QString m_attribute = QStringLiteral(
"depth");
92 QColor m_belowMinColor = QColor( 0, 0, 0, 0);
93 QColor m_aboveMaxColor = QColor(255, 255, 255, 200);
94 bool m_useLogScale =
false;
105 QString
id()
const override {
return m_id; }
106 QString
displayName()
const override {
return tr(
"Depth color ramp"); }
110 qreal
opacity()
const override {
return m_opacity; }
124 bool m_visible =
true;
125 qreal m_opacity = 1.0;
Shared classification model: mode + binner + ramp + range + per-class overrides, with a revision stam...
Definition classificationscheme.h:61
QColor highColor() const
Definition classificationscheme.h:114
QColor lowColor() const
Definition classificationscheme.h:112
QString rampName() const
Definition classificationscheme.h:104
double rangeMin() const
Definition classificationscheme.h:137
double rangeMax() const
Definition classificationscheme.h:139
bool invertRamp() const
Definition classificationscheme.h:107
Definition depthcolorrampsublayer.h:22
QColor belowMinColor() const
Definition depthcolorrampsublayer.h:62
double maxValue
Definition depthcolorrampsublayer.h:26
void setScheme(const ClassificationScheme &s)
Definition depthcolorrampsublayer.cpp:65
bool invertRamp() const
Definition depthcolorrampsublayer.h:59
double minValue
Definition depthcolorrampsublayer.h:25
bool useLogScale() const
Definition depthcolorrampsublayer.h:64
QColor lowColor
Definition depthcolorrampsublayer.h:31
void setMaxValue(double v)
Definition depthcolorrampsublayer.cpp:44
QColor aboveMaxColor
Definition depthcolorrampsublayer.h:34
double maxValue() const
Definition depthcolorrampsublayer.h:57
QJsonObject toJson() const override
Serialize the style to JSON.
Definition depthcolorrampsublayer.cpp:77
QColor highColor() const
Definition depthcolorrampsublayer.h:61
double minValue() const
Definition depthcolorrampsublayer.h:56
void setInvertRamp(bool v)
Definition depthcolorrampsublayer.cpp:52
QString attribute
Definition depthcolorrampsublayer.h:24
void setAttribute(const QString &v)
Definition depthcolorrampsublayer.cpp:30
QColor colorAtF(double f) const
Definition depthcolorrampsublayer.cpp:72
const ClassificationScheme & scheme() const
Definition depthcolorrampsublayer.h:79
bool useLogScale
Definition depthcolorrampsublayer.h:35
void setMinValue(double v)
Definition depthcolorrampsublayer.cpp:37
QColor belowMinColor
Definition depthcolorrampsublayer.h:33
QString colorRampName
Definition depthcolorrampsublayer.h:29
bool invertRamp
Definition depthcolorrampsublayer.h:30
void setAboveMaxColor(const QColor &v)
Definition depthcolorrampsublayer.cpp:56
void setUseLogScale(bool v)
Definition depthcolorrampsublayer.cpp:58
void setBelowMinColor(const QColor &v)
Definition depthcolorrampsublayer.cpp:55
QColor highColor
Definition depthcolorrampsublayer.h:32
void fromJson(const QJsonObject &j) override
Restore the style from JSON.
Definition depthcolorrampsublayer.cpp:88
QColor lowColor() const
Definition depthcolorrampsublayer.h:60
QColor aboveMaxColor() const
Definition depthcolorrampsublayer.h:63
QString colorRampName() const
Definition depthcolorrampsublayer.h:58
void setColorRampName(const QString &v)
Definition depthcolorrampsublayer.cpp:51
Definition depthcolorrampsublayer.h:99
bool isVisible() const override
Definition depthcolorrampsublayer.h:108
void setVisible(bool v) override
Definition depthcolorrampsublayer.cpp:112
SublayerStyle * style() override
Returns the property-bag QObject that owns this sublayer's style knobs.
Definition depthcolorrampsublayer.h:115
Kind kind() const override
Definition depthcolorrampsublayer.h:104
bool isDynamic() const override
Whether this sublayer's output depends on the current animation period.
Definition depthcolorrampsublayer.h:113
QList< LegendSymbolItem > legendSymbolItems() const override
Returns the legend rows this sublayer contributes.
Definition depthcolorrampsublayer.cpp:128
QSGNode * buildOrUpdateNode(QSGNode *existing, const SublayerContext &) override
Build (or update) the QSG node tree for this sublayer.
Definition depthcolorrampsublayer.cpp:159
void setOpacity(qreal o) override
Definition depthcolorrampsublayer.cpp:119
QString displayName() const override
Definition depthcolorrampsublayer.h:106
QString id() const override
Definition depthcolorrampsublayer.h:105
qreal opacity() const override
Definition depthcolorrampsublayer.h:110
DepthColorRampStyle * rampStyle() const
Definition depthcolorrampsublayer.h:120
One toggleable visual aspect of a results / model layer.
Definition isublayer.h:87
Kind
Coarse taxonomy of sublayer paint behaviours.
Definition isublayer.h:100
@ ColorRampFillKind
Definition isublayer.h:105
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.
Definition gisrasterlayer.h:40
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.
std::function< void(const QColor &)> setLowColor
Definition swmm2dresultsstylepanel.cpp:67
std::function< void(const QColor &)> setHighColor
Definition swmm2dresultsstylepanel.cpp:69