7 #include "CmdSelectCoordSystem.h" 10 #include "DocumentSerialize.h" 11 #include "EngaugeAssert.h" 13 #include "MainWindow.h" 14 #include <QApplication> 16 #include <QTextStream> 17 #include "QtToString.h" 18 #include <QXmlStreamReader> 20 const QString CMD_DESCRIPTION (
"Select Coordinate System");
24 CoordSystemIndex coordSystemIndex) :
28 m_coordSystemIndexBefore (document.coordSystemIndex()),
29 m_coordSystemIndexAfter (coordSystemIndex)
31 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSelectCoordSystem::CmdSelectCoordSystem";
36 const QString &cmdDescription,
37 QXmlStreamReader & ) :
42 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSelectCoordSystem::CmdSelectCoordSystem";
45 CmdSelectCoordSystem::~CmdSelectCoordSystem ()
51 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSelectCoordSystem::cmdRedo" 52 <<
" index=" << m_coordSystemIndexBefore <<
"->" << m_coordSystemIndexAfter;
61 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSelectCoordSystem::cmdUndo" 62 <<
" index=" << m_coordSystemIndexAfter <<
"->" << m_coordSystemIndexBefore;
71 writer.writeStartElement(DOCUMENT_SERIALIZE_CMD);
72 writer.writeEndElement();
void updateCoordSystem(CoordSystemIndex coordSystemIndex)
Select a different CoordSystem.
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
void saveOrCheckPostCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
void saveOrCheckPreCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
virtual void cmdUndo()
Undo method that is called when QUndoStack is moved one command backward.
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
Storage of one imported image and the data attached to that image.
CmdSelectCoordSystem(MainWindow &mainWindow, Document &document, CoordSystemIndex coordSystem)
Constructor for normal creation.
Document & document()
Return the Document that this command will modify during redo and undo.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...