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

Shared plumbing: a QPointer to the layer plus error reporting. More...

#include <featurecommands.h>

Inheritance diagram for openswmmvis::map::FeatureCommandBase:
Collaboration diagram for openswmmvis::map::FeatureCommandBase:

Public Member Functions

 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
 

Protected Member Functions

void recordFailure (const QString &err) const
 

Protected Attributes

QPointer< FeatureLayerm_layer
 
QString m_lastError
 
- Protected Attributes inherited from MapCommand
MapCanvasm_canvas
 

Detailed Description

Shared plumbing: a QPointer to the layer plus error reporting.

Constructor & Destructor Documentation

◆ FeatureCommandBase()

openswmmvis::map::FeatureCommandBase::FeatureCommandBase ( const QString &  text,
FeatureLayer layer,
MapCanvas canvas,
QUndoCommand *  parent = nullptr 
)

Member Function Documentation

◆ lastError()

QString openswmmvis::map::FeatureCommandBase::lastError ( ) const
inline

The message from the last failed apply, for the caller to show. Empty when the command has not failed.

◆ layer()

FeatureLayer * openswmmvis::map::FeatureCommandBase::layer ( ) const
inline
Here is the caller graph for this function:

◆ recordFailure()

void openswmmvis::map::FeatureCommandBase::recordFailure ( const QString &  err) const
protected

Log err and remember it. Commands cannot show UI from redo()/undo() — QUndoStack may be replaying — so a failure is recorded, logged, and surfaced by whoever pushed the command.

Here is the caller graph for this function:

Member Data Documentation

◆ m_lastError

QString openswmmvis::map::FeatureCommandBase::m_lastError
mutableprotected

◆ m_layer

QPointer<FeatureLayer> openswmmvis::map::FeatureCommandBase::m_layer
protected

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