14#include <QApplication>
18#include <QXmlStreamReader>
29 m_coordSystemIndexBefore (
document.coordSystemIndex()),
30 m_coordSystemIndexAfter (coordSystemIndex)
37 const QString &cmdDescription,
38 QXmlStreamReader &reader) :
45 QXmlStreamAttributes attributes = reader.attributes();
47 QStringList requiredAttributesLeaf;
51 requiredAttributesLeaf,
65 <<
" index=" << m_coordSystemIndexBefore <<
"->" << m_coordSystemIndexAfter;
76 <<
" index=" << m_coordSystemIndexAfter <<
"->" << m_coordSystemIndexBefore;
92 writer.writeEndElement();
const QString CMD_DESCRIPTION("Add axis point")
const QString CMD_DESCRIPTION("Select Coordinate System")
unsigned int CoordSystemIndex
Zero-based index for identifying CoordSystem instantiations.
const QString DOCUMENT_SERIALIZE_COORD_SYSTEM_INDEX_BEFORE
const QString DOCUMENT_SERIALIZE_COORD_SYSTEM_INDEX_AFTER
const QString DOCUMENT_SERIALIZE_CMD
const QString DOCUMENT_SERIALIZE_CMD_TYPE
const QString DOCUMENT_SERIALIZE_CMD_DESCRIPTION
const QString DOCUMENT_SERIALIZE_CMD_SELECT_COORD_SYSTEM
log4cpp::Category * mainCat
Document & document()
Return the Document that this command will modify during redo and undo.
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
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 saveOrCheckPreCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
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.
CmdSelectCoordSystem(MainWindow &mainWindow, Document &document, CoordSystemIndex coordSystem)
Constructor for normal creation.
virtual void cmdUndo()
Undo method that is called when QUndoStack is moved one command backward.
virtual ~CmdSelectCoordSystem()
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
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...
void updateCoordSystem(CoordSystemIndex coordSystemIndex)
Select a different CoordSystem.
#define LOG4CPP_INFO_S(logger)