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
meshcellparams.h File Reference
#include "meshinfil.h"
#include "meshresult.h"
#include <QByteArray>
#include <QString>
#include <QStringList>
#include <QVector>
Include dependency graph for meshcellparams.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mesh::CellParamSpec
 Describes one editable per-cell parameter: how to label it, how to configure a numeric editor for it, and whether it is live yet. More...
 

Namespaces

namespace  mesh
 

Functions

const QVector< CellParamSpec > & mesh::cellParamSpecs ()
 The registry, in display order. Stable for the process lifetime.
 
const CellParamSpecmesh::cellParamSpec (const QByteArray &key)
 Look up one spec by key; returns nullptr when unknown.
 
QString mesh::cellParamLabel (const QByteArray &key, const QString &depthUnitLabel)
 Full label for key including the unit suffix when the parameter is a length. depthUnitLabel comes from UnitSystem::depthLabel().
 
double mesh::cellParamValue (const MeshResult &mesh, int tri, const QByteArray &key)
 Current value of key on triangle tri.
 

Detailed Description

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

Registry of the per-cell (per-triangle) 2D mesh parameters the user can prescribe interactively, plus the read/write dispatch every editing surface shares.

One table drives the mesh-editing toolbar's parameter selector, the Cell Data assignment dialog's target selector, and the undo command's value plumbing, so a new parameter is added in exactly one place.

This header is deliberately read-only and layer-free. Writes live in map/meshcommands.h, where they funnel through SWMM2DMeshLayer::applyMeshTriangle* (which emits attributeChanged, the signal that keeps the toolbar, the properties panel and the map in sync no matter which surface made the edit) and onto the undo stack.

Parameters awaiting engine support (the 2D two-zone groundwater set) are listed with enabled = false: they show greyed in every selector so the roadmap is visible, and applyCellParam refuses them.