Go to the documentation of this file.
13 #include <QTextStream>
15 #include <QXmlStreamReader>
22 const QString &pointIdentifier,
23 const QPointF &posGraphBefore,
24 const QPointF &posGraphAfter,
29 m_pointIdentifier (pointIdentifier),
30 m_posGraphBefore (posGraphBefore),
31 m_posGraphAfter (posGraphAfter),
35 << pointIdentifier.toLatin1 ().data ()
36 <<
" posGraphBefore=" <<
QPointFToString (posGraphBefore).toLatin1 ().data ()
37 <<
" posGraphAfter=" <<
QPointFToString (posGraphAfter).toLatin1 ().data ();
42 const QString &cmdDescription,
43 QXmlStreamReader &reader) :
50 QXmlStreamAttributes attributes = reader.attributes();
59 QString (
"%1 %2, %3, %4, %5, %6 %7 %8")
60 .arg (QObject::tr (
"Missing attribute(s)"))
66 .arg (QObject::tr (
"and/or"))
121 writer.writeEndElement();
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_BOOL_TRUE
const QString CMD_DESCRIPTION("Edit axis point")
virtual void cmdUndo()
Undo method that is called when QUndoStack is moved one command backward.
Storage of one imported image and the data attached to that image.
const QString DOCUMENT_SERIALIZE_GRAPH_Y_AFTER
const QString DOCUMENT_SERIALIZE_IDENTIFIER
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
void saveDocumentState(const Document &document)
Save the document state for restoration by restoreDocumentState.
void updateAfterCommand()
See GraphicsScene::updateAfterCommand.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
void editPointAxis(const QPointF &posGraph, const QString &identifier)
Edit the graph coordinates of a single axis point. Call this after checkAddPointAxis to guarantee suc...
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
CmdEditPointAxis(MainWindow &mainWindow, Document &document, const QString &pointIdentifier, const QPointF &posGraphBefore, const QPointF &posGraphAfter, bool isXOnly)
Constructor for normal creation.
#define LOG4CPP_INFO_S(logger)
Base class for CmdBase leaf subclasses that involve point additions, deletions and/or modifications.
const QString DOCUMENT_SERIALIZE_CMD_TYPE
void saveOrCheckPostCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
void restoreDocumentState(Document &document) const
Restore the document previously saved by saveDocumentState.
void saveOrCheckPreCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
log4cpp::Category * mainCat
void updatePointOrdinals(const Transformation &transformation)
Update point ordinals after point addition/removal or dragging.
const QString DOCUMENT_SERIALIZE_POINT_IS_X_ONLY
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
const QString DOCUMENT_SERIALIZE_CMD_DESCRIPTION
const QString DOCUMENT_SERIALIZE_CMD
const QString DOCUMENT_SERIALIZE_BOOL_FALSE
QString QPointFToString(const QPointF &pos)
const QString DOCUMENT_SERIALIZE_GRAPH_X_AFTER
const QString DOCUMENT_SERIALIZE_GRAPH_X_BEFORE
const QString DOCUMENT_SERIALIZE_CMD_EDIT_POINT_AXIS
virtual ~CmdEditPointAxis()
const QString DOCUMENT_SERIALIZE_GRAPH_Y_BEFORE