![]() |
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 per-edge attribute across a set of edge slots. More...
#include <meshcommands.h>
Public Member Functions | |
| MeshSetEdgeAttributeCommand (SWMM2DMeshLayer *layer, QByteArray key, QVector< int > edgeSlots, QVector< mesh::MeshEdgeBC > newBCs, QVector< mesh::MeshEdgeBC > oldBCs, 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 per-edge attribute across a set of edge slots.
Slots are stored flat (mesh::edgeSlot(cell, edgeLocal)) and both sides of the edit hold the WHOLE MeshEdgeBC, not just the changed field: the BC fields are interdependent through type (a stage value is meaningless once the type flips to Wall), so a partial restore would leave the slot in a state the user never saw.
Conveyance dispatches to applyMeshEdgeConveyance rather than applyMeshEdgeBC in BOTH directions, so the engine's interior-edge symmetry invariant (both halves carry the same value) survives undo.
| MeshSetEdgeAttributeCommand::MeshSetEdgeAttributeCommand | ( | SWMM2DMeshLayer * | layer, |
| QByteArray | key, | ||
| QVector< int > | edgeSlots, | ||
| QVector< mesh::MeshEdgeBC > | newBCs, | ||
| QVector< mesh::MeshEdgeBC > | oldBCs, | ||
| const QString & | text, | ||
| MapCanvas * | canvas, | ||
| QUndoCommand * | parent = nullptr |
||
| ) |
| layer | Mesh layer that owns the edges. |
| key | Attribute key ("conveyance", "bcType", "head", "slope", "flow", "tseries", "curve", "group", or "bc" for a whole boundary-condition write). "conveyance" selects the mirroring write path; every other key writes the slot. |
| edgeSlots | Flat edge slots (mesh::edgeSlot(cell, edgeLocal)). |
| newBCs | Parallel to edgeSlots: post-edit slot value. |
| oldBCs | Parallel to edgeSlots: pre-edit slot value. |
|
inlineoverride |
|
override |
|
override |