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
openswmmvis::ui::RasterSchemeBinding Class Referencefinal

Drives the GraduatedRasterRenderer live on a GISRasterLayer. More...

#include <classificationbindings.h>

Inheritance diagram for openswmmvis::ui::RasterSchemeBinding:
Collaboration diagram for openswmmvis::ui::RasterSchemeBinding:

Public Member Functions

 RasterSchemeBinding (GISRasterLayer *layer)
 
OpenSWMM::Render::ClassificationScheme scheme () const override
 
void setScheme (const OpenSWMM::Render::ClassificationScheme &s) override
 
QVector< doublesampleValues () const override
 
void autoClassify () override
 
QPair< double, doubledataRange () const override
 
QVector< doublecomputedEdges () const override
 
bool supportsContinuousMode () const override
 
bool supportsRangeModes () const override
 
bool supportsCustomRange () const override
 
- Public Member Functions inherited from openswmmvis::ui::IClassificationBinding
virtual ~IClassificationBinding ()=default
 
virtual QVector< QPair< QString, QString > > availableAttributes () const
 
virtual QString attribute () const
 
virtual void setAttribute (const QString &)
 

Detailed Description

Drives the GraduatedRasterRenderer live on a GISRasterLayer.

   The renderer is fetched from the layer on every call (never
   cached — the dialog's Cancel / undo path swaps it). dataRange() is
   the RENDERER's dataMin/dataMax (not fresh band statistics) so the
   editor's table agrees with what the map paints after a restore
   from JSON; computedEdges() mirrors the renderer's cached edges so
   the table never re-samples the raster. setScheme() reclassifies
   against the layer's (cached) band sample and notifies the layer,
   which drops its tiles and repaints. When the live renderer is not
   a GraduatedRasterRenderer (Paletted / RGB active) the binding is
   inert: scheme() is a default and setScheme() no-ops.

Constructor & Destructor Documentation

◆ RasterSchemeBinding()

openswmmvis::ui::RasterSchemeBinding::RasterSchemeBinding ( GISRasterLayer layer)
inlineexplicit

Member Function Documentation

◆ autoClassify()

void openswmmvis::ui::RasterSchemeBinding::autoClassify ( )
overridevirtual

Force a re-derive of class edges from current data, even when the scheme config is unchanged (the data itself may have changed). The default re-pushes the current scheme through the change channel; the GraduatedRendererBinding clears the renderer's cached breaks so the layer re-classifies against fresh samples.

Reimplemented from openswmmvis::ui::IClassificationBinding.

Here is the call graph for this function:

◆ computedEdges()

QVector< double > openswmmvis::ui::RasterSchemeBinding::computedEdges ( ) const
overridevirtual

The model's authoritative class edges (N+1 ascending, endpoints included) when it already holds them — e.g. a GraduatedRenderer's data-derived lastBreaks. Returning empty (the default) tells the editor to recompute edges itself via ClassificationScheme::levelEdges over dataRange() + sampleValues(). Lets the 1D table mirror the map's exact breaks without re-running the layer's sample gathering.

Reimplemented from openswmmvis::ui::IClassificationBinding.

Here is the call graph for this function:

◆ dataRange()

QPair< double, double > openswmmvis::ui::RasterSchemeBinding::dataRange ( ) const
overridevirtual

Outer data range the scheme classifies over (e.g. [dryDepth, maxDepth] or a field's min/max).

Implements openswmmvis::ui::IClassificationBinding.

Here is the call graph for this function:

◆ sampleValues()

QVector< double > openswmmvis::ui::RasterSchemeBinding::sampleValues ( ) const
overridevirtual

Values feeding Quantile / Jenks / StdDev auto-classification. Large sources should decimate. Empty is legal (the editor degrades to equal spacing).

Implements openswmmvis::ui::IClassificationBinding.

Here is the call graph for this function:

◆ scheme()

ClassificationScheme openswmmvis::ui::RasterSchemeBinding::scheme ( ) const
overridevirtual

Implements openswmmvis::ui::IClassificationBinding.

Here is the call graph for this function:

◆ setScheme()

void openswmmvis::ui::RasterSchemeBinding::setScheme ( const OpenSWMM::Render::ClassificationScheme )
overridevirtual

MUST route through the model's normal change channel (renderer install / bag setter) so every view repaints.

Implements openswmmvis::ui::IClassificationBinding.

Here is the call graph for this function:

◆ supportsContinuousMode()

bool openswmmvis::ui::RasterSchemeBinding::supportsContinuousMode ( ) const
inlineoverridevirtual

Continuous/Classified toggle is offered only when true. 1D graduated symbols are always classified → false; depth fill → true.

Reimplemented from openswmmvis::ui::IClassificationBinding.

◆ supportsCustomRange()

bool openswmmvis::ui::RasterSchemeBinding::supportsCustomRange ( ) const
inlineoverridevirtual

"Use custom range" checkbox + min/max is offered only when true — the static / 2D idiom (no animation range modes). Mutually exclusive with supportsRangeModes() in the editor (range modes win).

Reimplemented from openswmmvis::ui::IClassificationBinding.

◆ supportsRangeModes()

bool openswmmvis::ui::RasterSchemeBinding::supportsRangeModes ( ) const
inlineoverridevirtual

Animation range-mode row (Fixed over run / Per-frame / Fixed user) is offered only when true — the 1D-results idiom, where FixedUser reveals the min/max sub-row.

Reimplemented from openswmmvis::ui::IClassificationBinding.


The documentation for this class was generated from the following files: