![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include "mesh/meshinfil.h"#include "selection/selectionmanager.h"#include "ui/panels/swmmattributetablemodel.h"#include <QAbstractTableModel>#include <QHash>#include <QPointer>#include <QRectF>#include <QVector>Go to the source code of this file.
Classes | |
| class | MeshAttributeTableModel |
Tabular model over one 2D mesh layer's vertices, edges or cells, so the Attribute Table dock can list and edit mesh elements the same way it lists SWMM objects.
MVC contract (CLAUDE.md §5.1): the model owns NO mesh data. Rows are virtual — data() reads straight out of SWMM2DMeshLayer::mesh() / edgeBCs() on every call, and setData() writes through the mesh::push*ParamEdit helpers so an edit made here is the same undoable command the mesh-editing toolbar pushes. Everything the layer emits (attributeChanged, meshEditsChanged, sceneGeometryReady) is subscribed to, so an edit made in any other view refreshes the affected row here without a full reset.
Row identity:
mesh::edgeSlot(cell, edgeLocal), 3 edges on a triangle, 4 on a quad), so an interior edge occupies two slots; those collapse onto the lower slot, and rowForRef resolves either half to that one row.Scale: the model is fully virtual, so a multi-million-cell mesh costs only the one-time edge row index (O(3T)); the panel's WHERE bar and show-selected-only proxy do the filtering.