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
stylefileio.h File Reference

Native style-file (.swmm-style.json) import/export + minimal QGIS .qml import for the common renderer cases. More...

#include <QJsonObject>
#include <QString>
#include <QStringList>
Include dependency graph for stylefileio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OpenSWMM::Render::StyleFileIO
 
struct  OpenSWMM::Render::StyleFileIO::Result
 

Namespaces

namespace  OpenSWMM
 
namespace  OpenSWMM::Render
 

Detailed Description

Native style-file (.swmm-style.json) import/export + minimal QGIS .qml import for the common renderer cases.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Slice X.23. Goals:

  • Save / restore a layer's complete styling (renderer + label config) outside the .oswp container so the same style can be reused across projects.
  • Read enough of a QGIS .qml file to round-trip SingleSymbol / Graduated / Categorized renderers produced by QGIS for vector layers (the typical interop case for SWMM modellers who first style their data in QGIS). We don't aim for full QGIS schema coverage — anything we don't recognise is ignored and the user gets a warning in the return value.

Native format is JSON with this top-level shape: { "schema": "swmmvis-style/v1", "layerType": "SWMMModelLayer" | "GISVectorLayer" | ..., "renderer": { <IFeatureRenderer::toJson()> }, "labelConfig": { <LabelConfig::toJson()> }, "kindRenderers": { "<kindKey>": <renderer>, ... } // SWMM only }