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::AddFieldCommand Class Reference

Add a schema column; undo drops it. More...

#include <featurecommands.h>

Inheritance diagram for openswmmvis::map::AddFieldCommand:
Collaboration diagram for openswmmvis::map::AddFieldCommand:

Public Member Functions

 AddFieldCommand (FeatureLayer *layer, const openswmmvis::feature::FieldDef &field, MapCanvas *canvas, QUndoCommand *parent=nullptr)
 
void redo () override
 
void undo () 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

Add a schema column; undo drops it.

Warning
Undo depends on the GDAL build being able to delete a GeoPackage column (FeatureStore::removeField tests OLCDeleteField). When it cannot, undo leaves the column in place and records the reason in lastError rather than pretending to have removed it.

Constructor & Destructor Documentation

◆ AddFieldCommand()

openswmmvis::map::AddFieldCommand::AddFieldCommand ( FeatureLayer layer,
const openswmmvis::feature::FieldDef field,
MapCanvas canvas,
QUndoCommand *  parent = nullptr 
)

Member Function Documentation

◆ redo()

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

◆ undo()

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

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