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
Go to the documentation of this file.
1
25#ifndef OPENSWMMVIS_MESH_MESHCELLPARAMS_H
26#define OPENSWMMVIS_MESH_MESHCELLPARAMS_H
27
28#include "meshinfil.h"
29#include "meshresult.h"
30
31#include <QByteArray>
32#include <QString>
33#include <QStringList>
34#include <QVector>
35
36namespace mesh {
37
41{
47 enum class Kind { Double, Enum };
48
49 QByteArray key;
50 QString label;
51 QString prefix;
52 bool lengthUnit = false;
53 double min = 0.0;
54 double max = 1.0;
55 double step = 0.01;
56 double defaultValue = 0.0;
57 int decimals = 4;
58 bool enabled = true;
59 QString tooltip;
67 QStringList enumLabels;
68};
69
71[[nodiscard]] const QVector<CellParamSpec> &cellParamSpecs();
72
74[[nodiscard]] const CellParamSpec *cellParamSpec(const QByteArray &key);
75
78[[nodiscard]] QString cellParamLabel(const QByteArray &key,
79 const QString &depthUnitLabel);
80
92[[nodiscard]] double cellParamValue(const MeshResult &mesh, int tri,
93 const QByteArray &key);
94
95} // namespace mesh
96
97#endif // OPENSWMMVIS_MESH_MESHCELLPARAMS_H
const char * key
Definition meshcellparams.cpp:24
Per-cell 2D infiltration: value types, tag/override resolution and method↔parameter masks.
Definition meshcommands.h:302
QString cellParamLabel(const QByteArray &key, const QString &depthUnitLabel)
Full label for key including the unit suffix when the parameter is a length. depthUnitLabel comes fro...
Definition meshcellparams.cpp:178
const QVector< CellParamSpec > & cellParamSpecs()
The registry, in display order. Stable for the process lifetime.
Definition meshcellparams.cpp:91
const CellParamSpec * cellParamSpec(const QByteArray &key)
Look up one spec by key; returns nullptr when unknown.
Definition meshcellparams.cpp:171
double cellParamValue(const MeshResult &mesh, int tri, const QByteArray &key)
Current value of key on triangle tri.
Definition meshcellparams.cpp:186
Describes one editable per-cell parameter: how to label it, how to configure a numeric editor for it,...
Definition meshcellparams.h:41
Kind kind
Definition meshcellparams.h:63
bool lengthUnit
true → append the project depth unit
Definition meshcellparams.h:52
double defaultValue
Definition meshcellparams.h:56
bool enabled
false → engine support pending
Definition meshcellparams.h:58
QStringList enumLabels
Definition meshcellparams.h:67
double step
Definition meshcellparams.h:55
QString label
combo / property label, already translated
Definition meshcellparams.h:50
int decimals
Definition meshcellparams.h:57
QString tooltip
Definition meshcellparams.h:59
Kind
Definition meshcellparams.h:47
double max
Definition meshcellparams.h:54
double min
Definition meshcellparams.h:53
QByteArray key
stable id, e.g. "mannings", "initDepth"
Definition meshcellparams.h:49
QString prefix
spin-box prefix, e.g. "n=" ({} for none)
Definition meshcellparams.h:51
Result of MeshGenerator::generate.
Definition meshresult.h:116