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
ReorderObjectsCommand Class Reference

Records a per-category object order change for undo/redo. More...

#include <mapundostack.h>

Inheritance diagram for ReorderObjectsCommand:
Collaboration diagram for ReorderObjectsCommand:

Public Member Functions

 ReorderObjectsCommand (SWMMModelLayer *layer, SWMMModelLayer::Category cat, QVector< int > oldOrder, QVector< int > newOrder, QUndoCommand *parent=nullptr)
 
void undo () override
 
void redo () override
 

Detailed Description

Records a per-category object order change for undo/redo.

Stores the old permutation (or empty = "was default") and the new one. undo() calls clearObjectOrder when the old permutation was the default identity, otherwise restores the old permutation.

Constructor & Destructor Documentation

◆ ReorderObjectsCommand()

ReorderObjectsCommand::ReorderObjectsCommand ( SWMMModelLayer layer,
SWMMModelLayer::Category  cat,
QVector< int >  oldOrder,
QVector< int >  newOrder,
QUndoCommand *  parent = nullptr 
)

Member Function Documentation

◆ redo()

void ReorderObjectsCommand::redo ( )
override
Here is the call graph for this function:

◆ undo()

void ReorderObjectsCommand::undo ( )
override
Here is the call graph for this function:

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