28#ifndef OPENSWMM_RENDER_UNCLASSEDCOLORSRENDERER_H
29#define OPENSWMM_RENDER_UNCLASSEDCOLORSRENDERER_H
97 [[nodiscard]] QString
rendererId()
const override {
return QStringLiteral(
"unclassed"); }
99 const QVariantMap &attrs)
const override;
101 [[nodiscard]] QJsonObject
toJson()
const override;
102 void fromJson(
const QJsonObject &j)
override;
103 [[nodiscard]] std::unique_ptr<IFeatureRenderer>
clone()
const override;
106 QString m_classifyAttribute;
111 QColor m_noData = QColor(0, 0, 0, 0);
112 int m_legendLabelCount = 5;
Abstract interface — every vector layer's paint path goes here.
Definition ifeaturerenderer.h:85
Maps a continuous numeric attribute to a continuous colour ramp, no bin discretisation.
Definition unclassedcolorsrenderer.h:46
QJsonObject toJson() const override
Serialises this renderer to a JSON object. The "id" field equals rendererId(); remaining keys are ren...
Definition unclassedcolorsrenderer.cpp:125
const RasterColorRamp & ramp() const
Definition unclassedcolorsrenderer.h:56
void setClassifyAttribute(QString name)
Definition unclassedcolorsrenderer.h:53
void fromJson(const QJsonObject &j) override
Restores this renderer from a JSON object previously produced by toJson(). Implementations should tol...
Definition unclassedcolorsrenderer.cpp:144
QColor aboveRangeColor() const
Definition unclassedcolorsrenderer.h:76
QColor colorForValue(double v) const
Definition unclassedcolorsrenderer.cpp:54
void setBaseSymbol(SymbolStyle s)
Definition unclassedcolorsrenderer.h:68
QString classifyAttribute() const
Definition unclassedcolorsrenderer.h:52
~UnclassedColorsRenderer() override=default
const SymbolStyle & baseSymbol() const
Definition unclassedcolorsrenderer.h:67
double minValue() const
Definition unclassedcolorsrenderer.h:60
UnclassedColorsRenderer()=default
void setLegendLabelCount(int n)
Definition unclassedcolorsrenderer.h:89
QList< LegendSymbolItem > legendSymbolItems() const override
Returns one LegendSymbolItem per visible legend row. Drives the legend dock, the on-canvas legend ove...
Definition unclassedcolorsrenderer.cpp:100
void setAboveRangeColor(QColor c)
Definition unclassedcolorsrenderer.h:77
std::unique_ptr< IFeatureRenderer > clone() const override
Deep copy. Owning layers / map presets / undo stack call this when they need a renderer snapshot deco...
Definition unclassedcolorsrenderer.cpp:164
void setBelowRangeColor(QColor c)
Definition unclassedcolorsrenderer.h:73
SymbolStyle symbolFor(const FeatureRef &f, const QVariantMap &attrs) const override
Returns the SymbolStyle to paint for one feature.
Definition unclassedcolorsrenderer.cpp:78
void setRamp(RasterColorRamp ramp)
Definition unclassedcolorsrenderer.cpp:41
QString rendererId() const override
Stable string id ("single", "graduated", "categorized", "rule"). Used as the discriminator in JSON ro...
Definition unclassedcolorsrenderer.h:97
void setNoDataColor(QColor c)
Definition unclassedcolorsrenderer.h:82
QColor belowRangeColor() const
Definition unclassedcolorsrenderer.h:72
void setRange(double minValue, double maxValue)
Definition unclassedcolorsrenderer.cpp:46
int legendLabelCount() const
Definition unclassedcolorsrenderer.h:88
QColor noDataColor() const
Definition unclassedcolorsrenderer.h:81
double maxValue() const
Definition unclassedcolorsrenderer.h:61
RasterColorRamp — gradient mapping from a normalised value in [0,1] to a display QColor.
The single seam every layer paint path goes through.
double s
Scene px per model length unit.
Definition inletdrawingview.cpp:82
std::size_t n
Definition mesh2dresultsexport.cpp:426
Definition gisrasterlayer.h:40
QVector< int > v
pool vertex indices
Definition pslgminsize.cpp:159
QString name
Definition sectionmodelbuilders.cpp:474
Identifies one feature in one layer for the renderer pipeline.
Definition featureref.h:35
Stack of SymbolLayer paint passes (bottom-up) plus an overall opacity.
Definition symbolstyle.h:39
Gradient mapping from a normalised value in [0,1] to a QColor.
Definition colorramp.h:71
double minValue
Definition colorramp.h:72
static RasterColorRamp viridis(double min=0.0, double max=1.0)
Definition colorramp.cpp:200
double maxValue
Definition colorramp.h:73