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
openswmmvis::map::EditFeatureGeometryCommand Class Reference

Replace one feature's geometry. More...

#include <featurecommands.h>

Inheritance diagram for openswmmvis::map::EditFeatureGeometryCommand:
Collaboration diagram for openswmmvis::map::EditFeatureGeometryCommand:

Public Member Functions

 EditFeatureGeometryCommand (FeatureLayer *layer, openswmmvis::feature::FeatureId id, const openswmmvis::feature::FeatureGeometry &oldGeom, const openswmmvis::feature::FeatureGeometry &newGeom, const QString &text, bool mergeable, MapCanvas *canvas, QUndoCommand *parent=nullptr)
 
void redo () override
 
void undo () override
 
int id () const override
 
bool mergeWith (const QUndoCommand *other) override
 
- Public Member Functions inherited from openswmmvis::map::FeatureCommandBase
 FeatureCommandBase (const QString &text, FeatureLayer *layer, MapCanvas *canvas, QUndoCommand *parent=nullptr)
 
FeatureLayerlayer () const
 
QString lastError () const
 The message from the last failed apply, for the caller to show. Empty when the command has not failed.
 
- Public Member Functions inherited from MapCommand
 MapCommand (const QString &text, MapCanvas *canvas, QUndoCommand *parent=nullptr)
 Constructs a map command with a human-readable text.
 
MapCanvascanvas () const
 

Additional Inherited Members

- Protected Member Functions inherited from openswmmvis::map::FeatureCommandBase
void recordFailure (const QString &err) const
 
- Protected Attributes inherited from openswmmvis::map::FeatureCommandBase
QPointer< FeatureLayerm_layer
 
QString m_lastError
 
- Protected Attributes inherited from MapCommand
MapCanvasm_canvas
 

Detailed Description

Replace one feature's geometry.

Merges with a following edit of the SAME feature so a vertex drag collapses to one undo step, the way MoveNodeCommand::mergeWith (mapundostack.h:339) does for a node drag. Set mergeable false for a discrete edit (insert / delete vertex, add hole, add part) that should stand on its own.

Constructor & Destructor Documentation

◆ EditFeatureGeometryCommand()

openswmmvis::map::EditFeatureGeometryCommand::EditFeatureGeometryCommand ( FeatureLayer layer,
openswmmvis::feature::FeatureId  id,
const openswmmvis::feature::FeatureGeometry oldGeom,
const openswmmvis::feature::FeatureGeometry newGeom,
const QString &  text,
bool  mergeable,
MapCanvas canvas,
QUndoCommand *  parent = nullptr 
)

Member Function Documentation

◆ id()

int openswmmvis::map::EditFeatureGeometryCommand::id ( ) const
inlineoverride

◆ mergeWith()

bool openswmmvis::map::EditFeatureGeometryCommand::mergeWith ( const QUndoCommand *  other)
override

◆ redo()

void openswmmvis::map::EditFeatureGeometryCommand::redo ( )
override
Here is the call graph for this function:

◆ undo()

void openswmmvis::map::EditFeatureGeometryCommand::undo ( )
override
Here is the call graph for this function:

The documentation for this class was generated from the following files: