![]() |
Mapper
0.9.0
API documentation
|
An undo step which does nothing. More...
#include <undo.h>
Public Member Functions | |
NoOpUndoStep (Map *map, bool valid) | |
Constructs an undo step for the given map, and determines its validness. More... | |
~NoOpUndoStep () override | |
Destructor. More... | |
bool | isValid () const override |
Returns the validness as given to the constructor. More... | |
UndoStep * | undo () override |
Returns a valid NoOpUndoStep. 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... | |
virtual bool | getModifiedParts (PartSet &out) const |
Adds the list of the step's modified parts to the container provided by out. More... | |
virtual void | getModifiedObjects (int part_index, ObjectSet &out) const |
Adds the list of the step's modified objects to the container provided by out. More... | |
void | save (QXmlStreamWriter &xml) const |
Saves the undo step to the stream in xml format. 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... | |
![]() | |
virtual void | saveImpl (QXmlStreamWriter &xml) const |
Saves undo properties to the the xml stream. More... | |
virtual void | loadImpl (QXmlStreamReader &xml, SymbolDictionary &symbol_dict) |
Loads undo properties from the the xml stream. 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 does nothing.
Its validness depends on the argument given to the constructor. It always returns a valid NoOpUndoStep from undo().
This class is used to catch unknown types of undo step when loading files from newer version of Mapper. Another use is unit-testing the UndoManager.
Constructs an undo step for the given map, and determines its validness.
|
override |
Destructor.
|
overridevirtual |
Returns the validness as given to the constructor.
Reimplemented from OpenOrienteering::UndoStep.
|
overridevirtual |
Returns a valid NoOpUndoStep.
Prints a warning if this undo step is not valid.
Implements OpenOrienteering::UndoStep.