14 #include <QXmlStreamReader> 21 const QPointF &posScreen,
22 const QPointF &posGraph,
28 m_posScreen (posScreen),
29 m_posGraph (posGraph),
36 <<
" ordinal=" << ordinal;
41 const QString &cmdDescription,
42 QXmlStreamReader &reader) :
49 QXmlStreamAttributes attributes = reader.attributes();
59 QString (
"Missing attribute(s) %1, %2, %3, %4, %5, %6 and/or %7")
115 const char FORMAT =
'g';
116 const int PRECISION = 16;
130 writer.writeEndElement();
CmdAddPointAxis(MainWindow &mainWindow, Document &document, const QPointF &posScreen, const QPointF &posGraph, double ordinal, bool isXOnly)
Constructor for normal creation.
virtual void cmdUndo()
Undo method that is called when QUndoStack is moved one command backward.
const QString CMD_DESCRIPTION("Add axis point")
#define LOG4CPP_INFO_S(logger)
void restoreDocumentState(Document &document) const
Restore the document previously saved by saveDocumentState.
const QString DOCUMENT_SERIALIZE_SCREEN_Y
const QString DOCUMENT_SERIALIZE_BOOL_TRUE
const QString DOCUMENT_SERIALIZE_GRAPH_X
void saveOrCheckPostCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
const QString DOCUMENT_SERIALIZE_CMD_ADD_POINT_AXIS
QString QPointFToString(const QPointF &pos)
const QString DOCUMENT_SERIALIZE_ORDINAL
const QString DOCUMENT_SERIALIZE_CMD_TYPE
const QString DOCUMENT_SERIALIZE_BOOL_FALSE
void saveOrCheckPreCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
const QString DOCUMENT_SERIALIZE_CMD_DESCRIPTION
Base class for CmdBase leaf subclasses that involve point additions, deletions and/or modifications.
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
const QString DOCUMENT_SERIALIZE_POINT_IS_X_ONLY
void updateAfterCommand()
See GraphicsScene::updateAfterCommand.
Storage of one imported image and the data attached to that image.
const QString DOCUMENT_SERIALIZE_GRAPH_Y
const QString DOCUMENT_SERIALIZE_IDENTIFIER
const QString DOCUMENT_SERIALIZE_SCREEN_X
log4cpp::Category * mainCat
void addPointAxisWithGeneratedIdentifier(const QPointF &posScreen, const QPointF &posGraph, QString &identifier, double ordinal, bool isXOnly)
Add a single axis point with a generated point identifier.
virtual ~CmdAddPointAxis()
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
void xmlExitWithError(QXmlStreamReader &reader, const QString &message)
Show specified message for an error while reading xml, then quit.
Document & document()
Return the Document that this command will modify during redo and undo.
const QString DOCUMENT_SERIALIZE_CMD
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
void updatePointOrdinals(const Transformation &transformation)
Update point ordinals after point addition/removal or dragging.
void saveDocumentState(const Document &document)
Save the document state for restoration by restoreDocumentState.