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

Go to the source code of this file.

Classes

class  MeshRegionDefaultsWidget
 
struct  MeshRegionDefaultsWidget::RegionRow
 One table row, as collectInputs() reads it back. More...
 

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

Phase GG0d — the mesh generation dialog's region-defaults table (workplans/INTEGRATED2D_GW_GUI_PLAN_2026-08-15.md §3.3).

One row per region tag the generated mesh will carry, plus a * row that always exists, is always first and cannot be removed. Columns:

Region | Manning's n | Initial depth | Method | P1 … P5 | Destination

Extracted into its own class rather than added to MeshGenerationDialog::buildUi() — that function is already ~734 lines in a 4142-line file (plan §7).

Two conventions the dialog depends on:

  • The * row's hydraulics are a read-only mirror. Roughness (Manning's n) and Initial depth stay the dialog's two spin boxes; setStarHydraulics() pushes their values in one way only. The dialog's collectInputs() still reads those spin boxes, so a user who never opens this table produces byte-identical output.
  • Blank means inherit. A region row's Manning's n / initial depth cell is blank until the user types into it; the table renders the inherited * value in italics and rows() reports NaN, so the dialog stamps only the rows that were actually given a value.

Infiltration follows the engine's D-I3 inheritance model instead: rows go to MeshResult::infilDefaults verbatim and are never flattened to per-cell rows. A row left at "None" contributes nothing — region rows then inherit the * row, and an all-"None" table emits no [2D_INFILTRATION*] section at all.