14#include <QXmlStreamReader>
21 const QString &curveName,
22 const QPointF &posScreen,
27 m_curveName (curveName),
28 m_posScreen (posScreen),
33 <<
" ordinal=" << m_ordinal;
38 const QString &cmdDescription,
39 QXmlStreamReader &reader) :
46 QXmlStreamAttributes attributes = reader.attributes();
54 QString (
"Missing attribute(s) %1, %2, %3, %4 and/or %5")
108 writer.writeEndElement();
const QString CMD_DESCRIPTION("Add graph point")
const QString DOCUMENT_SERIALIZE_IDENTIFIER
const QString DOCUMENT_SERIALIZE_CURVE_NAME
const QString DOCUMENT_SERIALIZE_CMD_ADD_POINT_GRAPH
const QString DOCUMENT_SERIALIZE_SCREEN_Y
const QString DOCUMENT_SERIALIZE_CMD
const QString DOCUMENT_SERIALIZE_ORDINAL
const QString DOCUMENT_SERIALIZE_SCREEN_X
const QString DOCUMENT_SERIALIZE_CMD_TYPE
const QString DOCUMENT_SERIALIZE_CMD_DESCRIPTION
log4cpp::Category * mainCat
QString QPointFToString(const QPointF &pos)
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.
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 saveOrCheckPreCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
CmdAddPointGraph(MainWindow &mainWindow, Document &document, const QString &curveName, const QPointF &posScreen, double ordinal)
Constructor for normal creation.
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
virtual ~CmdAddPointGraph()
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.
Base class for CmdBase leaf subclasses that involve point additions, deletions and/or modifications.
void saveDocumentState(const Document &document)
Save the document state for restoration by restoreDocumentState.
void restoreDocumentState(Document &document) const
Restore the document previously saved by saveDocumentState.
Storage of one imported image and the data attached to that image.
void updatePointOrdinals(const Transformation &transformation)
Update point ordinals after point addition/removal or dragging.
void addPointGraphWithGeneratedIdentifier(const QString &curveName, const QPointF &posScreen, QString &generatedIentifier, double ordinal)
Add a single graph point with a generated point identifier.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
void updateAfterCommand()
See GraphicsScene::updateAfterCommand.
#define LOG4CPP_INFO_S(logger)