![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Undoable write of one or more [2D_INFILTRATION_DEFAULTS] tag rows — the region-level peer of MeshSetTriangleInfilCommand.
More...
#include <meshcommands.h>
Public Member Functions | |
| MeshSetInfilDefaultsCommand (SWMM2DMeshLayer *layer, QVector< QString > tags, QVector< mesh::InfilRow > newRows, QVector< mesh::InfilRow > oldRows, QVector< bool > oldExisted, const QString &text, MapCanvas *canvas, QUndoCommand *parent=nullptr) | |
| void | undo () override |
| void | redo () override |
| int | id () const override |
Public Member Functions inherited from MapCommand | |
| MapCommand (const QString &text, MapCanvas *canvas, QUndoCommand *parent=nullptr) | |
Constructs a map command with a human-readable text. | |
| MapCanvas * | canvas () const |
Additional Inherited Members | |
Protected Attributes inherited from MapCommand | |
| MapCanvas * | m_canvas |
Undoable write of one or more [2D_INFILTRATION_DEFAULTS] tag rows — the region-level peer of MeshSetTriangleInfilCommand.
Editing a default is how an assignment stays editable as regions instead of being frozen into N per-cell rows (engine D-I3): the row reaches every cell carrying the tag that has no override of its own, and none of them gain one.
The old state records, per tag, both the previous row and whether a row EXISTED — the same distinction MeshSetTriangleInfilCommand draws per cell. A tag that had no default row must go back to having none: writing the resolved numbers back would leave a row that shadows the '*' fallback, so a later edit to '*' would stop reaching the region. undo() therefore erases through SWMM2DMeshLayer::clearMeshInfilDefault for those tags and rewrites through applyMeshInfilDefault for the rest.
The layer is held as a QPointer: if it is closed, the command becomes inert rather than dangling.
| MeshSetInfilDefaultsCommand::MeshSetInfilDefaultsCommand | ( | SWMM2DMeshLayer * | layer, |
| QVector< QString > | tags, | ||
| QVector< mesh::InfilRow > | newRows, | ||
| QVector< mesh::InfilRow > | oldRows, | ||
| QVector< bool > | oldExisted, | ||
| const QString & | text, | ||
| MapCanvas * | canvas, | ||
| QUndoCommand * | parent = nullptr |
||
| ) |
| layer | Mesh layer that owns the mesh. |
| tags | Region tags to write ("*" = the mesh-wide fallback). |
| newRows | Parallel to tags: the row each tag receives. |
| oldRows | Parallel to tags: each tag's pre-edit row (ignored where oldExisted is false). |
| oldExisted | Parallel to tags: false means the tag had no default row, so undo must ERASE rather than rewrite. |
| text | Undo-stack label. |
|
inlineoverride |
|
override |
|
override |