![]() |
Mapper
0.9.0
API documentation
|
An undo step which is actually a sequence of sub UndoSteps. More...
#include <undo.h>
Public Member Functions | |
CombinedUndoStep (Map *map) | |
Constructs a composite undo step for the given map. More... | |
~CombinedUndoStep () override | |
Destructor. More... | |
bool | isValid () const override |
Returns true if all sub step can still be undone. More... | |
UndoStep * | undo () override |
Undoes all sub steps in-order and returns a corresponding UndoStep. More... | |
bool | getModifiedParts (PartSet &out) const override |
Adds the modified parts of all sub steps to the given set. More... | |
void | getModifiedObjects (int part_index, ObjectSet &out) const override |
Adds the modified objects of all sub steps to the given set. More... | |
int | getNumSubSteps () const |
Returns the number of sub steps. More... | |
void | push (UndoStep *step) |
Adds a sub step. More... | |
UndoStep * | getSubStep (int i) |
Returns the i-th sub step. More... | |
![]() | |
UndoStep (Type type, Map *map) | |
Constructs an undo step having the given type. More... | |
UndoStep (const UndoStep &)=delete | |
UndoStep (UndoStep &&)=delete | |
virtual | ~UndoStep () |
Destructor. More... | |
UndoStep & | operator= (const UndoStep &)=delete |
UndoStep & | operator= (UndoStep &&)=delete |
Type | getType () const |
Returns the type of the undo step. More... | |
void | save (QXmlStreamWriter &xml) const |
Saves the undo step to the stream in xml format. More... | |
Protected Member Functions | |
void | saveImpl (QXmlStreamWriter &xml) const override |
Saves undo properties to the the xml stream. More... | |
void | loadImpl (QXmlStreamReader &xml, SymbolDictionary &symbol_dict) override |
Loads undo properties from the the xml stream. More... | |
Additional Inherited Members | |
![]() | |
enum | Type { ReplaceObjectsUndoStepType = 0, DeleteObjectsUndoStepType = 1, AddObjectsUndoStepType = 2, SwitchSymbolUndoStepType = 3, SwitchDashesUndoStepType = 4, CombinedUndoStepType = 5, ValidNoOpUndoStepType = 6, ObjectTagsUndoStepType = 7, MapPartUndoStepType = 8, SwitchPartUndoStepTypeV0 = 9, SwitchPartUndoStepType = 10, InvalidUndoStepType = 999 } |
Types of undo steps for identification. More... | |
typedef std::set< int > | PartSet |
A set of integers referring to parts. More... | |
typedef std::set< Object * > | ObjectSet |
A set of pointers to objects. More... | |
![]() | |
static UndoStep * | getUndoStepForType (Type type, Map *map) |
Constructs an undo step of the given type. More... | |
static UndoStep * | load (QXmlStreamReader &xml, Map *map, SymbolDictionary &symbol_dict) |
Loads the undo step from the stream in xml format. More... | |
![]() | |
Type const | type |
The type of the undo step. More... | |
Map *const | map |
The map this undo step belongs. More... | |
An undo step which is actually a sequence of sub UndoSteps.
A CombinedUndoStep bundles a sequence of one or more UndoSteps, which it executes in reverse order.
OpenOrienteering::CombinedUndoStep::CombinedUndoStep | ( | Map * | map | ) |
Constructs a composite undo step for the given map.
|
override |
Destructor.
|
overridevirtual |
Adds the modified objects of all sub steps to the given set.
Reimplemented from OpenOrienteering::UndoStep.
Adds the modified parts of all sub steps to the given set.
Reimplemented from OpenOrienteering::UndoStep.
|
inline |
Returns the number of sub steps.
|
inline |
Returns the i-th sub step.
|
overridevirtual |
Returns true if all sub step can still be undone.
Reimplemented from OpenOrienteering::UndoStep.
|
overrideprotectedvirtual |
Loads undo properties from the the xml stream.
Reimplemented from OpenOrienteering::UndoStep.
|
inline |
Adds a sub step.
|
overrideprotectedvirtual |
Saves undo properties to the the xml stream.
Reimplemented from OpenOrienteering::UndoStep.
|
overridevirtual |
Undoes all sub steps in-order and returns a corresponding UndoStep.
Implements OpenOrienteering::UndoStep.