![]() |
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-cell parameter across a set of triangles. More...
#include <meshcommands.h>
Public Member Functions | |
| MeshSetTriangleAttributeCommand (SWMM2DMeshLayer *layer, QByteArray key, QVector< int > triangles, QVector< double > newValues, QVector< double > oldValues, 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-cell parameter across a set of triangles.
Stores the pre-edit value of every touched triangle (NaN for "was unset"). redo() writes the new values, undo() restores the old ones — both through the file-local applyCellParam helper in meshcommands.cpp, so the layer emits attributeChanged and every view refreshes either way. The layer is held as a QPointer: if it is closed, the command becomes inert rather than dangling.
| MeshSetTriangleAttributeCommand::MeshSetTriangleAttributeCommand | ( | SWMM2DMeshLayer * | layer, |
| QByteArray | key, | ||
| QVector< int > | triangles, | ||
| QVector< double > | newValues, | ||
| QVector< double > | oldValues, | ||
| const QString & | text, | ||
| MapCanvas * | canvas, | ||
| QUndoCommand * | parent = nullptr |
||
| ) |
| layer | Mesh layer that owns the triangles. |
| key | mesh::CellParamSpec key ("mannings", "initDepth", …). |
| triangles | Triangle indices to write. |
| newValues | Parallel to triangles: the value to write to each. |
| oldValues | Parallel to triangles: the pre-edit value of each (NaN = the attribute was unset). |
| text | Undo-stack label. |
|
inlineoverride |
|
override |
|
override |