7#include "CmdSelectCoordSystem.h"
10#include "DocumentSerialize.h"
11#include "EngaugeAssert.h"
13#include "MainWindow.h"
14#include "MimePoints.h"
15#include <QApplication>
18#include "QtToString.h"
19#include <QXmlStreamReader>
21const QString CMD_DESCRIPTION (
"Select Coordinate System");
25 CoordSystemIndex coordSystemIndex) :
29 m_coordSystemIndexBefore (document.coordSystemIndex()),
30 m_coordSystemIndexAfter (coordSystemIndex)
32 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSelectCoordSystem::CmdSelectCoordSystem";
37 const QString &cmdDescription,
38 QXmlStreamReader & ) :
43 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSelectCoordSystem::CmdSelectCoordSystem";
46CmdSelectCoordSystem::~CmdSelectCoordSystem ()
52 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSelectCoordSystem::cmdRedo"
53 <<
" index=" << m_coordSystemIndexBefore <<
"->" << m_coordSystemIndexAfter;
60 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSelectCoordSystem::cmdUndo"
61 <<
" index=" << m_coordSystemIndexAfter <<
"->" << m_coordSystemIndexBefore;
68 writer.writeStartElement(DOCUMENT_SERIALIZE_CMD);
69 writer.writeEndElement();
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
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 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.