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
OpenSWMMVisLayer Class Referenceabstract

Abstract base class for all layers displayed in the MapCanvas. More...

#include <openswmmvislayer.h>

Inheritance diagram for OpenSWMMVisLayer:
Collaboration diagram for OpenSWMMVisLayer:

Public Types

enum  OpenSWMMVisLayerType {
  SWMMDefaultLayer = 0 ,
  SWMMModelLayer = 1 ,
  SWMMResultsLayer = 2 ,
  SWMMGISLayer = 3 ,
  SWMMVectorLayer = 4 ,
  SWMMRasterLayer = 5 ,
  SWMMImageryLayer = 6 ,
  SWMMTabularDataLayer = 7 ,
  SWMMTabularyTimeSeriesLayer = 8 ,
  SWMMSubProjectLayer = 9 ,
  SWMMWMSLayer = 10 ,
  SWMMWMTSLayer = 11 ,
  SWMM2DMeshLayer = 12 ,
  SWMM2DResultsLayer = 13 ,
  SWMMAnnotationLayer = 14 ,
  SWMMFeatureLayer = 15
}
 Discriminator for the concrete layer class. More...
 

Signals

void nameChanged (const QString &newName)
 
void layerTypeChanged (OpenSWMMVisLayerType newType)
 
void visibilityChanged (bool visible)
 
void opacityChanged (double opacity)
 
void srsChanged (SpatialReferenceSystem *newSRS)
 
void extentChanged (const MapExtent &newExtent)
 
void childrenChanged ()
 
void repaintRequested ()
 
void temporalSpecChanged (const OpenSWMM::Render::TemporalSpec &spec)
 
void maskSpecChanged (const OpenSWMM::Render::MaskSpec &spec)
 
void auxStorageSpecChanged (const OpenSWMM::Render::AuxiliaryStorageSpec &spec)
 
void joinsChanged (const QVector< OpenSWMM::Render::JoinSpec > &joins)
 
void diagramSpecChanged (const OpenSWMM::Render::DiagramSpec &spec)
 
void labelConfigChanged ()
 

Public Member Functions

 OpenSWMMVisLayer (OpenSWMMVisWorkspace *parent)
 
 OpenSWMMVisLayer (const QString &name="Unlabeled Layer", OpenSWMMVisWorkspace *parent=nullptr)
 
virtual ~OpenSWMMVisLayer ()
 
QString layerId () const
 Returns the layer's immutable unique identifier (UUID).
 
QString name () const
 Returns the user-visible name of this layer.
 
void setName (const QString &name)
 Sets the user-visible name.
 
OpenSWMMVisLayerType layerType () const
 Returns the layer type discriminator.
 
bool isVisible () const
 Returns true when this layer should be drawn.
 
void setVisible (bool visible)
 Shows or hides this layer.
 
double opacity () const
 Returns the layer opacity in the range [0.0, 1.0]. 0.0 = fully transparent; 1.0 = fully opaque.
 
void setOpacity (double opacity)
 Sets the layer opacity. Values are clamped to [0.0, 1.0].
 
SpatialReferenceSystemsrs () const
 Returns the spatial reference system for this layer, or nullptr if the layer has no known CRS.
 
void setSRS (SpatialReferenceSystem *srs, bool ownsSRS=false)
 Sets (or replaces) the CRS for this layer.
 
QString crsDescription () const
 Returns a human-readable summary of this layer's CRS for display in the Properties window.
 
MapExtent extent () const
 Returns the layer extent in the layer's own CRS.
 
void setExtent (const MapExtent &extent)
 Sets the layer spatial extent (in the layer's CRS).
 
virtual QString sourceDescription () const
 Human-readable source of this layer: a file path, a service URL, or a description for in-memory / derived layers.
 
virtual QVector< QPair< QString, QString > > extendedMetadata () const
 Ordered key→value pairs of TYPE-SPECIFIC metadata, rendered by the Metadata tab below the common block the dialog builds itself.
 
virtual bool isRasterLayer () const
 Returns true for layers that render into a raster buffer (WMS, WMTS, GISRaster) rather than populating QGraphicsItems.
 
virtual bool isBasemapLayer () const
 Returns true for world-spanning basemap layers (XYZ tile providers, WMS/WMTS services covering the whole world) that should NOT be included when computing the data-driven full extent.
 
virtual void render (QPainter *painter, const MapExtent &extent, const QSize &imageSize, const SpatialReferenceSystem *srs)
 Renders this layer's content directly into painter.
 
virtual void fetchCache (const MapExtent &extent, const QSize &viewportSize, const SpatialReferenceSystem *srs)
 Triggers any asynchronous (or synchronous) tile/data fetch needed to populate this layer's internal cache for the given view state.
 
void setViewportSize (int w, int h)
 Called by MapCanvas before refreshScene so layers can request the correct pixel dimensions for tile/image requests.
 
int viewportWidth () const
 
int viewportHeight () const
 
QVector< OpenSWMMVisLayer * > children () const
 Returns the ordered list of child layers.
 
virtual void populateScene (QGraphicsScene *scene, const MapExtent &canvasExtent, const SpatialReferenceSystem *canvasSRS)=0
 Creates / updates QGraphicsItems representing this layer in the scene.
 
virtual void depopulateScene (QGraphicsScene *scene)
 Removes all QGraphicsItems belonging to this layer from the scene.
 
virtual void refreshScene (QGraphicsScene *scene, const MapExtent &canvasExtent, const SpatialReferenceSystem *canvasSRS)
 Smart scene refresh — updates existing items instead of destroying and recreating.
 
double layerZValue () const
 Returns the z-value base assigned to this layer by the canvas. Items within the layer should use z-values relative to this.
 
virtual std::vector< std::unique_ptr< openswmmvis::ui::ILayerStyleSubject > > styleSubjects ()
 Slice U-2 — return the styleable subjects for the unified LayerStyleDialog.
 
void setLayerZValue (double z)
 Called by the canvas to set this layer's z-value band.
 
virtual void onCanvasCRSChanged (const SpatialReferenceSystem *newCanvasSRS)
 Called when the user changes the canvas CRS so layers can pre-compute any CRS-dependent transform caches.
 
virtual OpenSWMM::Render::IFeatureRendererrenderer () const
 
virtual void setRenderer (std::unique_ptr< OpenSWMM::Render::IFeatureRenderer >)
 
virtual OpenSWMM::Render::RuleListruleList ()
 
virtual const OpenSWMM::Render::RuleListruleList () const
 
const OpenSWMM::Render::TemporalSpectemporalSpec () const
 
void setTemporalSpec (const OpenSWMM::Render::TemporalSpec &spec)
 
const OpenSWMM::Render::LabelConfiglabelConfig () const
 
virtual void setLabelConfig (const OpenSWMM::Render::LabelConfig &cfg)
 
const OpenSWMM::Render::MaskSpecmaskSpec () const
 
void setMaskSpec (const OpenSWMM::Render::MaskSpec &spec)
 
const OpenSWMM::Render::AuxiliaryStorageSpecauxStorageSpec () const
 
void setAuxStorageSpec (const OpenSWMM::Render::AuxiliaryStorageSpec &spec)
 
const QVector< OpenSWMM::Render::JoinSpec > & joins () const
 
void setJoins (const QVector< OpenSWMM::Render::JoinSpec > &joins)
 
const OpenSWMM::Render::DiagramSpecdiagramSpec () const
 
void setDiagramSpec (const OpenSWMM::Render::DiagramSpec &spec)
 
OpenSWMMVisWorkspaceworkspace () const
 
void setBasicAuth (const QString &username, const QString &password)
 Sets HTTP Basic authentication for all subsequent network requests.
 
void setHttpHeaders (const BasemapHttpHeaders &headers)
 Sets arbitrary extra HTTP headers applied to every request.
 
BasemapHttpHeaders httpHeaders () const
 

Protected Member Functions

bool addChild (OpenSWMMVisLayer *child)
 
bool removeChild (OpenSWMMVisLayer *child)
 
void setLayerType (OpenSWMMVisLayerType type)
 

Protected Attributes

QByteArray m_authHeader
 "Basic <base64>" or empty
 
BasemapHttpHeaders m_httpHeaders
 arbitrary headers (incl. "referer")
 

Properties

QString Name
 
bool Visible
 
double Opacity
 
QString LayerId
 
OpenSWMMVisLayerType LayerType
 
QVector< OpenSWMMVisLayer * > Children
 
QString CRS
 

Detailed Description

Abstract base class for all layers displayed in the MapCanvas.

Every layer has:

  • A unique ID, a user-visible name, and a type enum.
  • Visibility and opacity controlling whether/how it is drawn.
  • An optional spatial reference system (CRS).
  • A spatial extent in the layer's own CRS.
  • An ordered list of child layers (group / sub-project pattern).
  • A virtual render() entry point called by the MapCanvas paint loop.

Member Enumeration Documentation

◆ OpenSWMMVisLayerType

Discriminator for the concrete layer class.

Enumerator
SWMMDefaultLayer 
SWMMModelLayer 

SWMM network (nodes/links/subcatchments).

SWMMResultsLayer 

SWMM simulation results (colour-mapped).

SWMMGISLayer 

Generic GIS layer (abstract parent).

SWMMVectorLayer 

GDAL OGR vector features.

SWMMRasterLayer 

GDAL raster dataset.

SWMMImageryLayer 

Background imagery (WMS/WMTS).

SWMMTabularDataLayer 

Attribute-only tabular data.

SWMMTabularyTimeSeriesLayer 

Time-series tabular data.

SWMMSubProjectLayer 

Collection of layers for one SWMM sub-project.

SWMMWMSLayer 

OGC WMS service.

SWMMWMTSLayer 

OGC WMTS service.

SWMM2DMeshLayer 

Generated / loaded 2D triangular mesh (Slice AU).

SWMM2DResultsLayer 

2D surface routing results (depth heatmap) — Slice CF.MVP.

SWMMAnnotationLayer 

User-placed text annotations (styled labels).

SWMMFeatureLayer 

Editable, GeoPackage-backed user-drawn features (MESH_DIALOG_TABS_AND_FEATURE_LAYERS_PLAN §3).

Constructor & Destructor Documentation

◆ OpenSWMMVisLayer() [1/2]

OpenSWMMVisLayer::OpenSWMMVisLayer ( OpenSWMMVisWorkspace parent)
explicit

◆ OpenSWMMVisLayer() [2/2]

OpenSWMMVisLayer::OpenSWMMVisLayer ( const QString &  name = "Unlabeled Layer",
OpenSWMMVisWorkspace parent = nullptr 
)
explicit

◆ ~OpenSWMMVisLayer()

OpenSWMMVisLayer::~OpenSWMMVisLayer ( )
virtual

Member Function Documentation

◆ addChild()

bool OpenSWMMVisLayer::addChild ( OpenSWMMVisLayer child)
protected
Here is the call graph for this function:

◆ auxStorageSpec()

const OpenSWMM::Render::AuxiliaryStorageSpec & OpenSWMMVisLayer::auxStorageSpec ( ) const
inline

◆ auxStorageSpecChanged

void OpenSWMMVisLayer::auxStorageSpecChanged ( const OpenSWMM::Render::AuxiliaryStorageSpec spec)
signal

Slice Z.15-attach — emitted when the AuxiliaryStorageSpec changes.

Here is the caller graph for this function:

◆ children()

QVector< OpenSWMMVisLayer * > OpenSWMMVisLayer::children ( ) const

Returns the ordered list of child layers.

◆ childrenChanged

void OpenSWMMVisLayer::childrenChanged ( )
signal
Here is the caller graph for this function:

◆ crsDescription()

QString OpenSWMMVisLayer::crsDescription ( ) const

Returns a human-readable summary of this layer's CRS for display in the Properties window.

Format: "AUTH:CODE - description" when an authority code is available (e.g. "EPSG:2926 - NAD83(HARN) / Washington South"), otherwise the description alone or "(none)" if no CRS.

Here is the call graph for this function:

◆ depopulateScene()

void OpenSWMMVisLayer::depopulateScene ( QGraphicsScene *  scene)
virtual

Removes all QGraphicsItems belonging to this layer from the scene.

Reimplemented in OpenSWMMVisAnnotationLayer, GISRasterLayer, GISVectorLayer, SWMM2DMeshLayer, SWMM2DResultsLayer, SWMMModelLayer, SWMMResultsLayer, WCSLayer, WMSLayer, and WMTSLayer.

Here is the caller graph for this function:

◆ diagramSpec()

const OpenSWMM::Render::DiagramSpec & OpenSWMMVisLayer::diagramSpec ( ) const
inline

◆ diagramSpecChanged

void OpenSWMMVisLayer::diagramSpecChanged ( const OpenSWMM::Render::DiagramSpec spec)
signal

Slice Z.12-attach — emitted when the DiagramSpec changes.

Here is the caller graph for this function:

◆ extendedMetadata()

virtual QVector< QPair< QString, QString > > OpenSWMMVisLayer::extendedMetadata ( ) const
inlinevirtual

Ordered key→value pairs of TYPE-SPECIFIC metadata, rendered by the Metadata tab below the common block the dialog builds itself.

Default empty. Subclasses add only what is unique to them (e.g. a mesh: vertices / cells / edges / elevation range). QVector<QPair> preserves insertion order without a new type.

Reimplemented in OpenSWMMVisAnnotationLayer, FeatureLayer, GISRasterLayer, GISVectorLayer, SWMM2DMeshLayer, SWMM2DResultsLayer, SWMMModelLayer, and SWMMResultsLayer.

◆ extent()

MapExtent OpenSWMMVisLayer::extent ( ) const

Returns the layer extent in the layer's own CRS.

Here is the caller graph for this function:

◆ extentChanged

void OpenSWMMVisLayer::extentChanged ( const MapExtent newExtent)
signal
Here is the caller graph for this function:

◆ fetchCache()

void OpenSWMMVisLayer::fetchCache ( const MapExtent extent,
const QSize &  viewportSize,
const SpatialReferenceSystem srs 
)
virtual

Triggers any asynchronous (or synchronous) tile/data fetch needed to populate this layer's internal cache for the given view state.

Called by MapCanvas::refreshLayerItems() for every visible raster layer BEFORE the MapRenderJob is started. This decouples tile-requesting (potentially async HTTP) from tile-drawing (synchronous, in the background render thread).

  • WMSLayer: issues a GetMap HTTP request if the cached tile is stale, then returns immediately. When the reply arrives the layer emits repaintRequested() to trigger another render pass.
  • WMTSLayer: fires fetchTileIfNeeded() for every tile that covers the current viewport; already-cached tiles are skipped.
  • GISRasterLayer: runs GDALWarp synchronously (fast for local files) if the cache is stale.

The default implementation is a no-op.

Parameters
extentVisible geographic extent in canvas-CRS coordinates.
viewportSizePixel dimensions of the viewport.
srsCanvas CRS.

Reimplemented in XYZTileLayer, GISRasterLayer, WCSLayer, WMSLayer, and WMTSLayer.

Here is the caller graph for this function:

◆ httpHeaders()

BasemapHttpHeaders OpenSWMMVisLayer::httpHeaders ( ) const
inline

◆ isBasemapLayer()

virtual bool OpenSWMMVisLayer::isBasemapLayer ( ) const
inlinevirtual

Returns true for world-spanning basemap layers (XYZ tile providers, WMS/WMTS services covering the whole world) that should NOT be included when computing the data-driven full extent.

MapCanvas::fullExtent() uses this to skip basemap layers so that "Zoom to Full Extent" zooms to the project's data (SWMM network, DTM, bounded WMS coverage) rather than the whole globe. Layers with a specific, bounded geographic footprint (GISRasterLayer, local WMS/WMTS with EX_GeographicBoundingBox) return false so they participate in the extent union.

Reimplemented in GISRasterLayer, WCSLayer, WMTSLayer, and XYZTileLayer.

Here is the caller graph for this function:

◆ isRasterLayer()

virtual bool OpenSWMMVisLayer::isRasterLayer ( ) const
inlinevirtual

Returns true for layers that render into a raster buffer (WMS, WMTS, GISRaster) rather than populating QGraphicsItems.

The MapCanvas uses this to decide whether a layer participates in the background render job or in the QGraphicsScene overlay.

Reimplemented in GISRasterLayer, WCSLayer, WMSLayer, WMTSLayer, and XYZTileLayer.

Here is the caller graph for this function:

◆ isVisible()

bool OpenSWMMVisLayer::isVisible ( ) const

Returns true when this layer should be drawn.

Here is the caller graph for this function:

◆ joins()

const QVector< OpenSWMM::Render::JoinSpec > & OpenSWMMVisLayer::joins ( ) const
inline
Here is the caller graph for this function:

◆ joinsChanged

void OpenSWMMVisLayer::joinsChanged ( const QVector< OpenSWMM::Render::JoinSpec > &  joins)
signal

Slice Z.16-attach — emitted when the joins list changes (any add / remove / edit). Recipients re-resolve their attribute access through the new list.

Here is the caller graph for this function:

◆ labelConfig()

const OpenSWMM::Render::LabelConfig & OpenSWMMVisLayer::labelConfig ( ) const
inline
Here is the caller graph for this function:

◆ labelConfigChanged

void OpenSWMMVisLayer::labelConfigChanged ( )
signal

VS.10 — emitted whenever the layer's labelConfig() is mutated through setLabelConfig(). Canvas + legend observe this to repaint labels.

Here is the caller graph for this function:

◆ layerId()

QString OpenSWMMVisLayer::layerId ( ) const

Returns the layer's immutable unique identifier (UUID).

Here is the caller graph for this function:

◆ layerType()

OpenSWMMVisLayer::OpenSWMMVisLayerType OpenSWMMVisLayer::layerType ( ) const

Returns the layer type discriminator.

Here is the caller graph for this function:

◆ layerTypeChanged

void OpenSWMMVisLayer::layerTypeChanged ( OpenSWMMVisLayerType  newType)
signal
Here is the caller graph for this function:

◆ layerZValue()

double OpenSWMMVisLayer::layerZValue ( ) const

Returns the z-value base assigned to this layer by the canvas. Items within the layer should use z-values relative to this.

Here is the caller graph for this function:

◆ maskSpec()

const OpenSWMM::Render::MaskSpec & OpenSWMMVisLayer::maskSpec ( ) const
inline
Here is the caller graph for this function:

◆ maskSpecChanged

void OpenSWMMVisLayer::maskSpecChanged ( const OpenSWMM::Render::MaskSpec spec)
signal

Slice Z.14-attach — emitted when the per-layer MaskSpec changes.

Here is the caller graph for this function:

◆ name()

QString OpenSWMMVisLayer::name ( ) const

Returns the user-visible name of this layer.

◆ nameChanged

void OpenSWMMVisLayer::nameChanged ( const QString &  newName)
signal
Here is the caller graph for this function:

◆ onCanvasCRSChanged()

void OpenSWMMVisLayer::onCanvasCRSChanged ( const SpatialReferenceSystem newCanvasSRS)
virtual

Called when the user changes the canvas CRS so layers can pre-compute any CRS-dependent transform caches.

Parameters
newCanvasSRSThe new canvas CRS.

Reimplemented in OpenSWMMVisAnnotationLayer, GISRasterLayer, GISVectorLayer, SWMM2DMeshLayer, SWMM2DResultsLayer, SWMMModelLayer, SWMMResultsLayer, WCSLayer, WMSLayer, WMTSLayer, and XYZTileLayer.

Here is the caller graph for this function:

◆ opacity()

double OpenSWMMVisLayer::opacity ( ) const

Returns the layer opacity in the range [0.0, 1.0]. 0.0 = fully transparent; 1.0 = fully opaque.

Here is the caller graph for this function:

◆ opacityChanged

void OpenSWMMVisLayer::opacityChanged ( double  opacity)
signal
Here is the caller graph for this function:

◆ populateScene()

virtual void OpenSWMMVisLayer::populateScene ( QGraphicsScene *  scene,
const MapExtent canvasExtent,
const SpatialReferenceSystem canvasSRS 
)
pure virtual

Creates / updates QGraphicsItems representing this layer in the scene.

Derived classes override this to add their items to the scene. Items should be created in scene coordinates (= map CRS coordinates) after reprojecting from the layer's native CRS.

Called by the MapCanvas when:

  • The layer is first added.
  • The canvas CRS changes (after onCanvasCRSChanged).
  • The layer data changes (model loaded, tile fetched, etc.).
Parameters
sceneThe shared OpenSWMMVisScene to add items to.
canvasExtentVisible extent in canvas-CRS coordinates.
canvasSRSThe CRS currently used by the MapCanvas.

Implemented in WCSLayer, XYZTileLayer, OpenSWMMVisAnnotationLayer, GISRasterLayer, GISVectorLayer, SWMM2DMeshLayer, SWMM2DResultsLayer, SWMMModelLayer, SWMMResultsLayer, TabularDataLayer, WMSLayer, WMTSLayer, and OpenSWMMVisSession.

Here is the caller graph for this function:

◆ refreshScene()

void OpenSWMMVisLayer::refreshScene ( QGraphicsScene *  scene,
const MapExtent canvasExtent,
const SpatialReferenceSystem canvasSRS 
)
virtual

Smart scene refresh — updates existing items instead of destroying and recreating.

Override in subclasses to provide efficient incremental updates. The default implementation calls depopulateScene() then populateScene(), which is backward-compatible but causes flicker for raster/tile layers.

Raster/WMS layers should override to keep persistent scene items and update them in-place. Vector layers should override to skip rebuilding when only the view extent has changed (items are already in scene coords).

Reimplemented in OpenSWMMVisAnnotationLayer, GISRasterLayer, GISVectorLayer, SWMM2DMeshLayer, SWMM2DResultsLayer, SWMMModelLayer, SWMMResultsLayer, WCSLayer, WMSLayer, and WMTSLayer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeChild()

bool OpenSWMMVisLayer::removeChild ( OpenSWMMVisLayer child)
protected
Here is the call graph for this function:

◆ render()

void OpenSWMMVisLayer::render ( QPainter *  painter,
const MapExtent extent,
const QSize &  imageSize,
const SpatialReferenceSystem srs 
)
virtual

Renders this layer's content directly into painter.

Called by the background MapRenderJob for raster layers. The painter is backed by a QImage of imageSize pixels spanning the geographic area described by extent in CRS srs. Pixel (0,0) maps to (extent.xMin, extent.yMax).

The default implementation is a no-op. Raster layer subclasses (WMS, WMTS, GISRaster) override this to paint their cached tile/image data without touching QGraphicsScene.

Parameters
painterTarget painter (backed by viewport-sized QImage).
extentVisible geographic extent in canvas-CRS coordinates.
imageSizePixel dimensions of the target image.
srsCanvas CRS.

Reimplemented in XYZTileLayer, GISRasterLayer, TabularDataLayer, WCSLayer, WMSLayer, and WMTSLayer.

◆ renderer()

virtual OpenSWMM::Render::IFeatureRenderer * OpenSWMMVisLayer::renderer ( ) const
inlinevirtual

Reimplemented in GISVectorLayer, SWMM2DResultsLayer, SWMMResultsLayer, SWMM2DMeshLayer, and SWMMModelLayer.

Here is the caller graph for this function:

◆ repaintRequested

void OpenSWMMVisLayer::repaintRequested ( )
signal

◆ ruleList() [1/2]

virtual OpenSWMM::Render::RuleList * OpenSWMMVisLayer::ruleList ( )
inlinevirtual

Reimplemented in GISVectorLayer, SWMM2DMeshLayer, SWMM2DResultsLayer, SWMMModelLayer, and SWMMResultsLayer.

Here is the caller graph for this function:

◆ ruleList() [2/2]

virtual const OpenSWMM::Render::RuleList * OpenSWMMVisLayer::ruleList ( ) const
inlinevirtual

◆ setAuxStorageSpec()

void OpenSWMMVisLayer::setAuxStorageSpec ( const OpenSWMM::Render::AuxiliaryStorageSpec spec)
Here is the call graph for this function:

◆ setBasicAuth()

void OpenSWMMVisLayer::setBasicAuth ( const QString &  username,
const QString &  password 
)

Sets HTTP Basic authentication for all subsequent network requests.

Builds the "Authorization: Basic <base64(user:pass)>" header and stores it in m_authHeader. Call with an empty username to clear.

◆ setDiagramSpec()

void OpenSWMMVisLayer::setDiagramSpec ( const OpenSWMM::Render::DiagramSpec spec)
Here is the call graph for this function:

◆ setExtent()

void OpenSWMMVisLayer::setExtent ( const MapExtent extent)

Sets the layer spatial extent (in the layer's CRS).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setHttpHeaders()

void OpenSWMMVisLayer::setHttpHeaders ( const BasemapHttpHeaders headers)

Sets arbitrary extra HTTP headers applied to every request.

Includes the "referer" key as the HTTP Referer header.

◆ setJoins()

void OpenSWMMVisLayer::setJoins ( const QVector< OpenSWMM::Render::JoinSpec > &  joins)
Here is the call graph for this function:

◆ setLabelConfig()

void OpenSWMMVisLayer::setLabelConfig ( const OpenSWMM::Render::LabelConfig cfg)
virtual

Reimplemented in GISVectorLayer, SWMMModelLayer, and SWMMResultsLayer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLayerType()

void OpenSWMMVisLayer::setLayerType ( OpenSWMMVisLayerType  type)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLayerZValue()

void OpenSWMMVisLayer::setLayerZValue ( double  z)

Called by the canvas to set this layer's z-value band.

◆ setMaskSpec()

void OpenSWMMVisLayer::setMaskSpec ( const OpenSWMM::Render::MaskSpec spec)
Here is the call graph for this function:

◆ setName()

void OpenSWMMVisLayer::setName ( const QString &  name)

Sets the user-visible name.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setOpacity()

void OpenSWMMVisLayer::setOpacity ( double  opacity)

Sets the layer opacity. Values are clamped to [0.0, 1.0].

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRenderer()

void OpenSWMMVisLayer::setRenderer ( std::unique_ptr< OpenSWMM::Render::IFeatureRenderer )
virtual

Reimplemented in GISVectorLayer, SWMM2DResultsLayer, SWMMResultsLayer, SWMM2DMeshLayer, and SWMMModelLayer.

Here is the caller graph for this function:

◆ setSRS()

void OpenSWMMVisLayer::setSRS ( SpatialReferenceSystem srs,
bool  ownsSRS = false 
)

Sets (or replaces) the CRS for this layer.

Transfers ownership of srs to this layer if ownsSRS is true.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTemporalSpec()

void OpenSWMMVisLayer::setTemporalSpec ( const OpenSWMM::Render::TemporalSpec spec)
Here is the call graph for this function:

◆ setViewportSize()

void OpenSWMMVisLayer::setViewportSize ( int  w,
int  h 
)
inline

Called by MapCanvas before refreshScene so layers can request the correct pixel dimensions for tile/image requests.

Here is the caller graph for this function:

◆ setVisible()

void OpenSWMMVisLayer::setVisible ( bool  visible)

Shows or hides this layer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sourceDescription()

virtual QString OpenSWMMVisLayer::sourceDescription ( ) const
inlinevirtual

Human-readable source of this layer: a file path, a service URL, or a description for in-memory / derived layers.

Default empty — the dialog shows "(none)". Concrete layers override to return their real origin (e.g. modelFilePath(), resultsFilePath(), serviceUrl(), or "(generated mesh)").

Reimplemented in OpenSWMMVisAnnotationLayer, FeatureLayer, GISRasterLayer, GISVectorLayer, SWMM2DMeshLayer, SWMM2DResultsLayer, SWMMModelLayer, SWMMResultsLayer, TabularDataLayer, WCSLayer, WFSLayer, WMSLayer, WMTSLayer, and XYZTileLayer.

Here is the caller graph for this function:

◆ srs()

SpatialReferenceSystem * OpenSWMMVisLayer::srs ( ) const

Returns the spatial reference system for this layer, or nullptr if the layer has no known CRS.

Warning
The returned pointer is owned by the layer and must not be deleted.
Here is the caller graph for this function:

◆ srsChanged

void OpenSWMMVisLayer::srsChanged ( SpatialReferenceSystem newSRS)
signal
Here is the caller graph for this function:

◆ styleSubjects()

std::vector< std::unique_ptr< openswmmvis::ui::ILayerStyleSubject > > OpenSWMMVisLayer::styleSubjects ( )
virtual

Slice U-2 — return the styleable subjects for the unified LayerStyleDialog.

Each returned subject becomes one tab (or sub-tab inside a section) in the dialog. The dialog calls this once when it opens and owns the returned unique_ptrs.

Default implementation returns an empty list (which still yields a usable dialog — General/Rendering/Metadata tabs are built-in). Layers override to surface their style bags.

Reimplemented in GISRasterLayer, GISVectorLayer, SWMM2DMeshLayer, SWMM2DResultsLayer, SWMMModelLayer, and SWMMResultsLayer.

◆ temporalSpec()

const OpenSWMM::Render::TemporalSpec & OpenSWMMVisLayer::temporalSpec ( ) const
inline

◆ temporalSpecChanged

void OpenSWMMVisLayer::temporalSpecChanged ( const OpenSWMM::Render::TemporalSpec spec)
signal

Slice Z.13-attach — emitted when the per-layer TemporalSpec is replaced (any field different from the previous spec). The AnimationController observes this to retune its tick scheduling in Z.13-controller.

Here is the caller graph for this function:

◆ viewportHeight()

int OpenSWMMVisLayer::viewportHeight ( ) const
inline
Here is the caller graph for this function:

◆ viewportWidth()

int OpenSWMMVisLayer::viewportWidth ( ) const
inline
Here is the caller graph for this function:

◆ visibilityChanged

void OpenSWMMVisLayer::visibilityChanged ( bool  visible)
signal
Here is the caller graph for this function:

◆ workspace()

OpenSWMMVisWorkspace * OpenSWMMVisLayer::workspace ( ) const
inline
Here is the caller graph for this function:

Member Data Documentation

◆ m_authHeader

QByteArray OpenSWMMVisLayer::m_authHeader
protected

"Basic <base64>" or empty

◆ m_httpHeaders

BasemapHttpHeaders OpenSWMMVisLayer::m_httpHeaders
protected

arbitrary headers (incl. "referer")

Property Documentation

◆ Children

QVector<OpenSWMMVisLayer*> OpenSWMMVisLayer::Children
read

◆ CRS

QString OpenSWMMVisLayer::CRS
read

◆ LayerId

QString OpenSWMMVisLayer::LayerId
read

◆ LayerType

OpenSWMMVisLayerType OpenSWMMVisLayer::LayerType
read

◆ Name

QString OpenSWMMVisLayer::Name
readwrite

◆ Opacity

double OpenSWMMVisLayer::Opacity
readwrite

◆ Visible

bool OpenSWMMVisLayer::Visible
readwrite

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