15#include <QUndoCommand>
19class QXmlStreamAttributes;
20class QXmlStreamWriter;
29 const QString &cmdDescription);
40 virtual void saveXml (QXmlStreamWriter &writer)
const = 0;
57 const QStringList &requiredAttributesLeaf,
58 QXmlStreamReader &reader);
63 const QStringList &requiredAttributesLeaf,
64 QXmlStreamReader &reader);
106 unsigned int m_identifierIndexBeforeRedo;
107 unsigned int m_identifierIndexAfterRedo;
DigitizeState
Set of possible states of Digitize toolbar.
Document & document()
Return the Document that this command will modify during redo and undo.
void selectAddedPointForMoving(const QString &pointAdded)
Select point that was just added so it can be moved by the user next for convenience.
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
virtual void cmdUndo()=0
Undo method that is called when QUndoStack is moved one command backward.
void saveOrCheckPostCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
void restoreState()
Before any other operations associated with a Cmd class are performed, this method is called to resto...
void leafAttributes(const QXmlStreamAttributes &attributes, const QStringList &requiredAttributesLeaf, QXmlStreamReader &reader)
Same as often-used leafAndBaseAttributes, except this is used in the special case where a class inher...
void saveOrCheckPreCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
void resetSelection(const PointIdentifiers &pointIdentifiersToSelect)
Call this (for consistency) after writing leaf class attributes, to write the base class attributes.
virtual void saveXml(QXmlStreamWriter &writer) const =0
Save commands as xml for later uploading.
void leafAndBaseAttributes(const QXmlStreamAttributes &attributes, const QStringList &requiredAttributesLeaf, QXmlStreamReader &reader)
Before reading leaf class attributes, check all required attributes from leaf and this base class are...
void baseAttributes(QXmlStreamWriter &writer) const
After writing leaf class attributes, this writes the base class atributes.
CmdAbstract(MainWindow &mainWindow, Document &document, const QString &cmdDescription)
Single constructor.
void selectAddedPointsForMoving(const QStringList &pointsAdded)
Select points that were just added so they can be moved by the user next for convenience.
virtual void cmdRedo()=0
Redo method that is called when QUndoStack is moved one command forward.
Storage of one imported image and the data attached to that image.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Hash table class that tracks point identifiers as the key, with a corresponding boolean value.