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.h
Go to the documentation of this file.
1
8#ifndef SWMMLAYER_H
9#define SWMMLAYER_H
10
11#include <QByteArray>
12#include <QMap>
13#include <QObject>
14#include <QPaintDevice>
15#include <QPainter>
16#include <QPair>
17#include <QRectF>
18#include <QString>
19#include <QVector>
20#include <QUuid>
21
22#include <cmath>
23#include <memory>
24#include <vector>
25
26#include "map/mapextent.h"
27// Slice Z.13-attach — per-layer temporal-animation config. Stored by
28// value, so the header is required (forward-decl insufficient).
29#include "render/temporalspec.h"
30
31#include "render/labelconfig.h" // VS.10 — base-class label configuration
32// Slice Z.14-attach — per-layer polygon clip mask.
33#include "render/maskspec.h"
34// Slice Z.15-attach — per-layer auxiliary-storage (manual overrides DB).
36// Slice Z.16-attach — per-layer external-table joins (list — a layer
37// can carry multiple joins keyed on different attributes / sources).
38#include "render/joinspec.h"
39// Slice Z.12-attach — per-layer embedded chart (pie/bar/time-series).
40#include "render/diagramspec.h"
41
42// Forward declarations for the unified style-dialog hook (Slice U-2).
44
45// Forward decl for renderer plumbing (Slice BI Phase 8.13.6.6).
46// Most layers don't own a per-layer renderer; SWMMModelLayer and
47// SWMM2DMeshLayer override the virtual accessors below.
48namespace OpenSWMM::Render {
49class IFeatureRenderer;
50class RuleList; // Slice B.1 — see ruleList() virtual below.
51}
52#include <memory>
53
76inline QRectF snapTileRectToDevicePx(double pxLeft, double pyTop,
77 double pxRight, double pyBottom,
78 qreal dpr)
79{
80 if (dpr <= 0.0) dpr = 1.0;
81 const double l = std::round(pxLeft * dpr) / dpr;
82 const double t = std::round(pyTop * dpr) / dpr;
83 const double r = std::round(pxRight * dpr) / dpr;
84 const double b = std::round(pyBottom * dpr) / dpr;
85 return QRectF(l, t, r - l, b - t);
86}
87
88inline qreal painterDevicePixelRatio(const QPainter *p)
89{
90 return (p && p->device()) ? p->device()->devicePixelRatioF() : 1.0;
91}
92
93// Forward-declare to avoid pulling the full basemapconnection.h into every
94// translation unit that includes this header.
95using BasemapHttpHeaders = QMap<QString, QString>;
96
99class QPainter;
100class MapExtent;
101class QGraphicsScene;
102class QSize;
103
115class OpenSWMMVisLayer : public QObject
116{
117 Q_OBJECT
118 Q_ENUMS(SWMMLayerType)
119 Q_PROPERTY(QString Name READ name WRITE setName NOTIFY nameChanged)
120 Q_PROPERTY(bool Visible READ isVisible WRITE setVisible NOTIFY visibilityChanged)
121 Q_PROPERTY(double Opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
122 Q_PROPERTY(QString LayerId READ layerId CONSTANT)
124 Q_PROPERTY(QVector<OpenSWMMVisLayer*> Children READ children NOTIFY childrenChanged FINAL)
125 // Read-only CRS summary shown in the Properties window — e.g.
126 // "EPSG:2926 - NAD83(HARN) / Washington South" or "(none)".
127 Q_PROPERTY(QString CRS READ crsDescription NOTIFY srsChanged)
128
129public:
130
155
156 // ----- Constructors ----------------------------------------------------
157
159
160 explicit OpenSWMMVisLayer(const QString &name = "Unlabeled Layer",
161 OpenSWMMVisWorkspace *parent = nullptr);
162
163 virtual ~OpenSWMMVisLayer();
164
165 // ----- Identity --------------------------------------------------------
166
170 [[nodiscard]] QString layerId() const;
171
175 [[nodiscard]] QString name() const;
176
180 void setName(const QString &name);
181
185 [[nodiscard]] OpenSWMMVisLayerType layerType() const;
186
187 // ----- Visibility & rendering -----------------------------------------
188
192 [[nodiscard]] bool isVisible() const;
193
197 void setVisible(bool visible);
198
203 [[nodiscard]] double opacity() const;
204
208 void setOpacity(double opacity);
209
210 // ----- Spatial reference & extent -------------------------------------
211
217 [[nodiscard]] SpatialReferenceSystem *srs() const;
218
223 void setSRS(SpatialReferenceSystem *srs, bool ownsSRS = false);
224
232 [[nodiscard]] QString crsDescription() const;
233
237 [[nodiscard]] MapExtent extent() const;
238
242 void setExtent(const MapExtent &extent);
243
244 // ----- Self-description for the Layer Properties dialog ----------------
245 // MVC: the layer (model) describes its own source + type-specific
246 // metadata; LayerStyleDialog (view) merely renders these. New layer types
247 // add metadata by overriding these — no dialog edit required.
248
256 [[nodiscard]] virtual QString sourceDescription() const { return {}; }
257
265 [[nodiscard]] virtual QVector<QPair<QString, QString>>
266 extendedMetadata() const { return {}; }
267
268 // ----- Raster layer identification ------------------------------------
269
276 [[nodiscard]] virtual bool isRasterLayer() const { return false; }
277
290 [[nodiscard]] virtual bool isBasemapLayer() const { return false; }
291
292 // ----- Direct QPainter rendering (QGIS-style buffer path) -------------
293
310 virtual void render(QPainter *painter,
311 const MapExtent &extent,
312 const QSize &imageSize,
314
337 virtual void fetchCache(const MapExtent &extent,
338 const QSize &viewportSize,
340
341 // ----- Viewport size (set by MapCanvas before each refresh) -----------
342
345 void setViewportSize(int w, int h) { m_vpW = w; m_vpH = h; }
346
347 [[nodiscard]] int viewportWidth() const { return m_vpW; }
348 [[nodiscard]] int viewportHeight() const { return m_vpH; }
349
350 // ----- Hierarchy -------------------------------------------------------
351
355 [[nodiscard]] QVector<OpenSWMMVisLayer *> children() const;
356
357 // ----- Scene item management -------------------------------------------
358
374 virtual void populateScene(QGraphicsScene *scene,
375 const MapExtent &canvasExtent,
376 const SpatialReferenceSystem *canvasSRS) = 0;
377
381 virtual void depopulateScene(QGraphicsScene *scene);
382
393 virtual void refreshScene(QGraphicsScene *scene,
394 const MapExtent &canvasExtent,
395 const SpatialReferenceSystem *canvasSRS);
396
401 [[nodiscard]] double layerZValue() const;
402
415 [[nodiscard]] virtual std::vector<std::unique_ptr<openswmmvis::ui::ILayerStyleSubject>>
417
421 void setLayerZValue(double z);
422
428 virtual void onCanvasCRSChanged(const SpatialReferenceSystem *newCanvasSRS);
429
430 // ----- Renderer plumbing (default: layer has no renderer) -------------
431 //
432 // Most layer kinds (basemaps, GIS rasters) don't own a per-layer
433 // IFeatureRenderer. Subclasses that do (SWMMModelLayer,
434 // SWMM2DMeshLayer) override these. stylefileio.cpp consults the
435 // virtual surface so it stays layer-agnostic.
436 [[nodiscard]] virtual OpenSWMM::Render::IFeatureRenderer *renderer() const { return nullptr; }
437 // NOTE: body is out-of-line in openswmmvislayer.cpp. Destroying the
438 // by-value unique_ptr param requires IFeatureRenderer to be a complete
439 // type; MSVC instantiates that deleter in the callee, so an inline body
440 // here would fail with C2027 ("use of undefined type") wherever this
441 // header is included without ifeaturerenderer.h.
442 virtual void setRenderer(std::unique_ptr<OpenSWMM::Render::IFeatureRenderer>);
443
444 // ----- Rule Model (Phase B seam, Slice B.1) ---------------------------
445 //
446 // The Rule Model (RENDERING_RULE_MODEL_PLAN.md) is the user-facing
447 // styling surface. A layer opts in by returning a non-null RuleList;
448 // LayerStyleDialog detects this in a subsequent slice (B.2) and
449 // mounts the Active Rule combo + Rule List in the Symbology tab.
450 //
451 // Default returns nullptr — every existing layer continues to use
452 // the legacy styleSubjects() path unchanged. Subclasses migrate
453 // one at a time (Slices B.3 → B.4 → B.5).
454 [[nodiscard]] virtual OpenSWMM::Render::RuleList *ruleList() { return nullptr; }
455 [[nodiscard]] virtual const OpenSWMM::Render::RuleList *ruleList() const { return nullptr; }
456
457 // ----- Temporal animation (Slice Z.13-attach) -------------------------
458 //
459 // Per-layer animation config. Defaults to `enabled=false` so every
460 // existing layer keeps painting at a static reference time and the
461 // legacy status-bar animation toolbar continues to drive the canvas
462 // unchanged. Layers opt in by writing a TemporalSpec via setTemporalSpec
463 // (e.g. SWMMResultsLayer auto-enables on Single mode with the file's
464 // full time range; vector layers leave it disabled until the user
465 // assigns a datetime field through the Temporal tab).
466 [[nodiscard]] const OpenSWMM::Render::TemporalSpec &temporalSpec() const
467 { return m_temporalSpec; }
469
470 // ----- Optional labels (VS.10) ----------------------------------------
471 //
472 // Uniform, optional element labelling for every layer kind. Default
473 // disabled (LabelConfig::enabled == false). Feature-bearing layers paint
474 // labels per this config; subclasses that need extra bookkeeping on
475 // change (e.g. SWMMModelLayer syncing its legacy m_showLabels flag)
476 // override setLabelConfig() and chain to the base. Results / 2D layers
477 // inherit the storage so the Labels tab applies to them too.
478 [[nodiscard]] const OpenSWMM::Render::LabelConfig &labelConfig() const
479 { return m_labelConfig; }
480 virtual void setLabelConfig(const OpenSWMM::Render::LabelConfig &cfg);
481
482 // ----- Polygon clip mask (Slice Z.14-attach) --------------------------
483 //
484 // Optional clip-by-polygon mask. Default-disabled, so every existing
485 // layer keeps painting unmasked. Z.14-paint integration consumes the
486 // spec at paint time; the data model + tab UI ship in the matching
487 // slices.
488 [[nodiscard]] const OpenSWMM::Render::MaskSpec &maskSpec() const
489 { return m_maskSpec; }
490 void setMaskSpec(const OpenSWMM::Render::MaskSpec &spec);
491
492 // ----- Auxiliary storage (Slice Z.15-attach) --------------------------
493 //
494 // Per-feature manual style overrides persisted to a sidecar SQLite
495 // DB. The spec is tiny — toggle + DB path; the override rows live
496 // in the DB itself, managed by the Auxiliary Storage tab UI and
497 // applied at paint time by Z.15-paint (separate slice).
498 [[nodiscard]] const OpenSWMM::Render::AuxiliaryStorageSpec &
499 auxStorageSpec() const { return m_auxStorageSpec; }
501
502 // ----- External-table joins (Slice Z.16-attach) -----------------------
503 //
504 // A layer may carry zero or more joins. The list is the unit of
505 // change — replace the whole list to mutate. Z.16-paint integration
506 // walks this list at attribute-access time, lazily building the
507 // joined columns from each enabled JoinSpec's source.
508 [[nodiscard]] const QVector<OpenSWMM::Render::JoinSpec> &joins() const
509 { return m_joins; }
510 void setJoins(const QVector<OpenSWMM::Render::JoinSpec> &joins);
511
512 // ----- Embedded chart diagram (Slice Z.12-attach) ---------------------
513 //
514 // One DiagramSpec per layer — pie / bar / histogram / time-series
515 // chart painted at each feature's anchor point. Default disabled;
516 // the Z.12-paint follow-up consumes the spec at paint time.
517 [[nodiscard]] const OpenSWMM::Render::DiagramSpec &diagramSpec() const
518 { return m_diagramSpec; }
520
521 // ----- Workspace accessor ---------------------------------------------
522 //
523 // Returns the workspace that owns this layer (or its session). Used
524 // by features that need to resolve sibling layers — e.g. Z.14-paint's
525 // mask resolver, which looks up the polygon source layer by id.
526 // May return nullptr for layers constructed without a workspace
527 // (typically only in tests).
528 [[nodiscard]] OpenSWMMVisWorkspace *workspace() const { return mParent; }
529
530 // ----- HTTP authentication & headers ----------------------------------
531
537 void setBasicAuth(const QString &username, const QString &password);
538
543 void setHttpHeaders(const BasemapHttpHeaders &headers);
544 [[nodiscard]] BasemapHttpHeaders httpHeaders() const { return m_httpHeaders; }
545
546signals:
547
548 void nameChanged(const QString &newName);
550 void visibilityChanged(bool visible);
553 void extentChanged(const MapExtent &newExtent);
568 void joinsChanged(const QVector<OpenSWMM::Render::JoinSpec> &joins);
574
575protected:
576
577 bool addChild(OpenSWMMVisLayer *child);
578 bool removeChild(OpenSWMMVisLayer *child);
580
581 QByteArray m_authHeader;
583
584private:
585 QString m_layerId;
586 OpenSWMMVisWorkspace *mParent = nullptr;
587 QString mName;
588 QVector<OpenSWMMVisLayer*> mChildren;
590 bool m_visible = true;
591 double m_opacity = 1.0;
592 SpatialReferenceSystem *m_srs = nullptr;
593 bool m_ownsSRS = false;
594 MapExtent m_extent;
595 double m_layerZValue = 0.0;
596 int m_vpW = 0;
597 int m_vpH = 0;
599 // Slice Z.13-attach — per-layer animation config (default disabled).
600 OpenSWMM::Render::TemporalSpec m_temporalSpec;
601 // VS.10 — per-layer label configuration (default disabled).
602 OpenSWMM::Render::LabelConfig m_labelConfig;
603 // Slice Z.14-attach — per-layer clip mask (default disabled).
605 // Slice Z.15-attach — per-layer manual-overrides DB (default disabled).
607 // Slice Z.16-attach — per-layer external-table joins (default empty).
608 QVector<OpenSWMM::Render::JoinSpec> m_joins;
609 // Slice Z.12-attach — per-feature embedded chart (default disabled).
610 OpenSWMM::Render::DiagramSpec m_diagramSpec;
611};
612
613Q_DECLARE_METATYPE(OpenSWMMVisLayer *)
614Q_DECLARE_METATYPE(QVector<OpenSWMMVisLayer *>)
615
616#endif // SWMMLAYER_H
617
Typed config for the Layer Properties → Auxiliary Storage tab (Slice Z.15).
QMap< QString, QString > BasemapHttpHeaders
Arbitrary HTTP header map for basemap requests.
Definition basemapconnection.h:33
An axis-aligned bounding box in the coordinate space of a given CRS.
Definition mapextent.h:26
Abstract interface — every vector layer's paint path goes here.
Definition ifeaturerenderer.h:85
Ordered owning container for Rules on one layer.
Definition rulelist.h:48
Abstract base class for all layers displayed in the MapCanvas.
Definition openswmmvislayer.h:116
const OpenSWMM::Render::MaskSpec & maskSpec() const
Definition openswmmvislayer.h:488
QString Name
Definition openswmmvislayer.h:119
void setTemporalSpec(const OpenSWMM::Render::TemporalSpec &spec)
Definition openswmmvislayer.cpp:124
bool removeChild(OpenSWMMVisLayer *child)
Definition openswmmvislayer.cpp:279
const OpenSWMM::Render::TemporalSpec & temporalSpec() const
Definition openswmmvislayer.h:466
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 c...
Definition openswmmvislayer.cpp:373
QString crsDescription() const
Returns a human-readable summary of this layer's CRS for display in the Properties window.
Definition openswmmvislayer.cpp:236
virtual bool isRasterLayer() const
Returns true for layers that render into a raster buffer (WMS, WMTS, GISRaster) rather than populatin...
Definition openswmmvislayer.h:276
OpenSWMMVisLayerType LayerType
Definition openswmmvislayer.h:123
void childrenChanged()
virtual void render(QPainter *painter, const MapExtent &extent, const QSize &imageSize, const SpatialReferenceSystem *srs)
Renders this layer's content directly into painter.
Definition openswmmvislayer.cpp:365
void setBasicAuth(const QString &username, const QString &password)
Sets HTTP Basic authentication for all subsequent network requests.
Definition openswmmvislayer.cpp:299
virtual QString sourceDescription() const
Human-readable source of this layer: a file path, a service URL, or a description for in-memory / der...
Definition openswmmvislayer.h:256
virtual const OpenSWMM::Render::RuleList * ruleList() const
Definition openswmmvislayer.h:455
void setVisible(bool visible)
Shows or hides this layer.
Definition openswmmvislayer.cpp:93
void temporalSpecChanged(const OpenSWMM::Render::TemporalSpec &spec)
BasemapHttpHeaders httpHeaders() const
Definition openswmmvislayer.h:544
virtual void refreshScene(QGraphicsScene *scene, const MapExtent &canvasExtent, const SpatialReferenceSystem *canvasSRS)
Smart scene refresh — updates existing items instead of destroying and recreating.
Definition openswmmvislayer.cpp:346
virtual ~OpenSWMMVisLayer()
Definition openswmmvislayer.cpp:50
const OpenSWMM::Render::AuxiliaryStorageSpec & auxStorageSpec() const
Definition openswmmvislayer.h:499
double opacity() const
Returns the layer opacity in the range [0.0, 1.0]. 0.0 = fully transparent; 1.0 = fully opaque.
Definition openswmmvislayer.cpp:103
void setOpacity(double opacity)
Sets the layer opacity. Values are clamped to [0.0, 1.0].
Definition openswmmvislayer.cpp:105
QString name() const
Returns the user-visible name of this layer.
Definition openswmmvislayer.cpp:62
void setAuxStorageSpec(const OpenSWMM::Render::AuxiliaryStorageSpec &spec)
Definition openswmmvislayer.cpp:160
void repaintRequested()
virtual void onCanvasCRSChanged(const SpatialReferenceSystem *newCanvasSRS)
Called when the user changes the canvas CRS so layers can pre-compute any CRS-dependent transform cac...
Definition openswmmvislayer.cpp:293
void diagramSpecChanged(const OpenSWMM::Render::DiagramSpec &spec)
OpenSWMMVisLayerType
Discriminator for the concrete layer class.
Definition openswmmvislayer.h:136
@ SWMMTabularDataLayer
Definition openswmmvislayer.h:144
@ SWMMTabularyTimeSeriesLayer
Definition openswmmvislayer.h:145
@ SWMMDefaultLayer
Definition openswmmvislayer.h:137
@ SWMMVectorLayer
Definition openswmmvislayer.h:141
@ SWMMRasterLayer
Definition openswmmvislayer.h:142
@ SWMMFeatureLayer
Definition openswmmvislayer.h:152
@ SWMMWMSLayer
Definition openswmmvislayer.h:147
@ SWMMImageryLayer
Definition openswmmvislayer.h:143
@ SWMMSubProjectLayer
Definition openswmmvislayer.h:146
@ SWMMWMTSLayer
Definition openswmmvislayer.h:148
@ SWMMGISLayer
Definition openswmmvislayer.h:140
@ SWMMAnnotationLayer
Definition openswmmvislayer.h:151
double Opacity
Definition openswmmvislayer.h:121
const OpenSWMM::Render::LabelConfig & labelConfig() const
Definition openswmmvislayer.h:478
QString layerId() const
Returns the layer's immutable unique identifier (UUID).
Definition openswmmvislayer.cpp:60
virtual void populateScene(QGraphicsScene *scene, const MapExtent &canvasExtent, const SpatialReferenceSystem *canvasSRS)=0
Creates / updates QGraphicsItems representing this layer in the scene.
void setSRS(SpatialReferenceSystem *srs, bool ownsSRS=false)
Sets (or replaces) the CRS for this layer.
Definition openswmmvislayer.cpp:203
QString LayerId
Definition openswmmvislayer.h:122
double layerZValue() const
Returns the z-value base assigned to this layer by the canvas. Items within the layer should use z-va...
Definition openswmmvislayer.cpp:380
SpatialReferenceSystem * srs() const
Returns the spatial reference system for this layer, or nullptr if the layer has no known CRS.
Definition openswmmvislayer.cpp:201
const OpenSWMM::Render::DiagramSpec & diagramSpec() const
Definition openswmmvislayer.h:517
void setName(const QString &name)
Sets the user-visible name.
Definition openswmmvislayer.cpp:64
bool addChild(OpenSWMMVisLayer *child)
Definition openswmmvislayer.cpp:269
void nameChanged(const QString &newName)
void setJoins(const QVector< OpenSWMM::Render::JoinSpec > &joins)
Definition openswmmvislayer.cpp:177
void setLayerZValue(double z)
Called by the canvas to set this layer's z-value band.
Definition openswmmvislayer.cpp:382
virtual QVector< QPair< QString, QString > > extendedMetadata() const
Ordered key→value pairs of TYPE-SPECIFIC metadata, rendered by the Metadata tab below the common bloc...
Definition openswmmvislayer.h:266
virtual void setRenderer(std::unique_ptr< OpenSWMM::Render::IFeatureRenderer >)
Definition openswmmvislayer.cpp:387
void setDiagramSpec(const OpenSWMM::Render::DiagramSpec &spec)
Definition openswmmvislayer.cpp:189
bool Visible
Definition openswmmvislayer.h:120
void visibilityChanged(bool visible)
void opacityChanged(double opacity)
virtual OpenSWMM::Render::RuleList * ruleList()
Definition openswmmvislayer.h:454
QString CRS
Definition openswmmvislayer.h:127
void setHttpHeaders(const BasemapHttpHeaders &headers)
Sets arbitrary extra HTTP headers applied to every request.
Definition openswmmvislayer.cpp:308
QVector< OpenSWMMVisLayer * > children() const
Returns the ordered list of child layers.
Definition openswmmvislayer.cpp:264
bool isVisible() const
Returns true when this layer should be drawn.
Definition openswmmvislayer.cpp:91
QByteArray m_authHeader
"Basic <base64>" or empty
Definition openswmmvislayer.h:581
void extentChanged(const MapExtent &newExtent)
BasemapHttpHeaders m_httpHeaders
arbitrary headers (incl. "referer")
Definition openswmmvislayer.h:582
OpenSWMMVisLayerType layerType() const
Returns the layer type discriminator.
Definition openswmmvislayer.cpp:73
int viewportHeight() const
Definition openswmmvislayer.h:348
void setExtent(const MapExtent &extent)
Sets the layer spatial extent (in the layer's CRS).
Definition openswmmvislayer.cpp:254
virtual bool isBasemapLayer() const
Returns true for world-spanning basemap layers (XYZ tile providers, WMS/WMTS services covering the wh...
Definition openswmmvislayer.h:290
void setViewportSize(int w, int h)
Called by MapCanvas before refreshScene so layers can request the correct pixel dimensions for tile/i...
Definition openswmmvislayer.h:345
OpenSWMMVisWorkspace * workspace() const
Definition openswmmvislayer.h:528
void setLayerType(OpenSWMMVisLayerType type)
Definition openswmmvislayer.cpp:78
void joinsChanged(const QVector< OpenSWMM::Render::JoinSpec > &joins)
MapExtent extent() const
Returns the layer extent in the layer's own CRS.
Definition openswmmvislayer.cpp:252
void auxStorageSpecChanged(const OpenSWMM::Render::AuxiliaryStorageSpec &spec)
const QVector< OpenSWMM::Render::JoinSpec > & joins() const
Definition openswmmvislayer.h:508
void maskSpecChanged(const OpenSWMM::Render::MaskSpec &spec)
void layerTypeChanged(OpenSWMMVisLayerType newType)
void setMaskSpec(const OpenSWMM::Render::MaskSpec &spec)
Definition openswmmvislayer.cpp:149
virtual std::vector< std::unique_ptr< openswmmvis::ui::ILayerStyleSubject > > styleSubjects()
Slice U-2 — return the styleable subjects for the unified LayerStyleDialog.
Definition openswmmvislayer.cpp:360
virtual void setLabelConfig(const OpenSWMM::Render::LabelConfig &cfg)
Definition openswmmvislayer.cpp:134
virtual OpenSWMM::Render::IFeatureRenderer * renderer() const
Definition openswmmvislayer.h:436
QVector< OpenSWMMVisLayer * > Children
Definition openswmmvislayer.h:124
int viewportWidth() const
Definition openswmmvislayer.h:347
void labelConfigChanged()
virtual void depopulateScene(QGraphicsScene *scene)
Removes all QGraphicsItems belonging to this layer from the scene.
Definition openswmmvislayer.cpp:313
void srsChanged(SpatialReferenceSystem *newSRS)
Top-level project container managing sessions, the SWMM model layer, and persistence paths for one SW...
Definition openswmmvisworkspace.h:42
Definition swmm2dmeshlayer.h:64
Definition swmm2dresultslayer.h:550
Renders the SWMM network elements (nodes, links, subcatchments, rain gages) for one OpenSWMMEngine mo...
Definition swmmmodellayer.h:133
Overlays time-stepped simulation results on the SWMM network geometry.
Definition swmmresultslayer.h:96
Represents a coordinate reference system backed by a GDAL OGRSpatialReference.
Definition spatialreferencesystem.h:28
One styleable thing the dialog can edit.
Definition ilayerstylesubject.h:39
DiagramType t
Definition diagramspec.cpp:20
Typed config for the Layer Properties → Diagrams tab (Slice Z.12).
enum OpenSWMM::Render::@788::Value::Type type
QGraphicsScene * scene
Definition inletdrawingview.cpp:78
Typed config for the Layer Properties → Joins tab (Slice Z.16).
Shared label-configuration value-type used by every layer that paints text labels.
ArrowPlacement p
Definition linesymbollayer.cpp:27
Axis-aligned bounding box in a map coordinate system, used by MapCanvas and all layer types to define...
Typed config for the Layer Properties → Mask tab (Slice Z.14).
int h
Definition mesh2dresultsexport.cpp:387
int w
Definition mesh2dresultsexport.cpp:387
int b
local residual indices, a < b
Definition meshquadmatch.cpp:46
Definition gisrasterlayer.h:40
Definition openswmmvislayer.h:43
qreal painterDevicePixelRatio(const QPainter *p)
Definition openswmmvislayer.h:88
QRectF snapTileRectToDevicePx(double pxLeft, double pyTop, double pxRight, double pyBottom, qreal dpr)
Snap a tile's logical-pixel rect to device pixel boundaries.
Definition openswmmvislayer.h:76
QMap< QString, QString > BasemapHttpHeaders
Definition openswmmvislayer.h:95
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
Per-layer auxiliary-storage configuration.
Definition auxiliarystoragespec.h:46
Per-layer diagram configuration.
Definition diagramspec.h:59
Per-layer label rendering parameters.
Definition labelconfig.h:47
Per-layer mask configuration.
Definition maskspec.h:52
Per-layer temporal-animation configuration.
Definition temporalspec.h:57
Typed config for the Layer Properties → Temporal tab (Slice Z.13).