Go to the documentation of this file.
17 #include <QTextStream>
19 #include <QXmlStreamReader>
26 const QStringList &selectedPointIdentifiers) :
32 <<
" selected=" << selectedPointIdentifiers.count ();
36 QTextStream strCsv (&m_csv), strHtml (&m_html);
43 m_curvesGraphsRemoved);
48 const QString &cmdDescription,
49 QXmlStreamReader &reader) :
56 QXmlStreamAttributes attributes = reader.attributes();
62 QString (
"%1 %2, %3 %4 %5")
63 .arg (QObject::tr (
"Missing attribute(s)"))
66 .arg (QObject::tr (
"and/or"))
75 m_curvesGraphsRemoved.
loadXml(reader);
114 m_curvesGraphsRemoved.
saveXml(writer);
115 writer.writeEndElement();
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
CmdDelete(MainWindow &mainWindow, Document &document, const QStringList &selectedPointIdentifiers)
Constructor for normal creation.
void saveXml(QXmlStreamWriter &writer) const
Serialize curves.
void xmlExitWithError(QXmlStreamReader &reader, const QString &message)
Show specified message for an error while reading xml, then quit.
const Curve & curveAxes() const
Get method for axis curve.
Document & document()
Return the Document that this command will modify during redo and undo.
const QString DOCUMENT_SERIALIZE_BOOL_TRUE
void loadXml(QXmlStreamReader &reader)
Load from serialized xml post-version 5 file.
Storage of one imported image and the data attached to that image.
Strategy class for exporting to the clipboard. This strategy is external to the Document class so tha...
const QString DOCUMENT_SERIALIZE_TRANSFORM_DEFINED
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...
const QString CMD_DESCRIPTION("Delete")
#define LOG4CPP_INFO_S(logger)
Transformation transformation() const
Return read-only copy of transformation.
void removePointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs.
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.
const QString DOCUMENT_SERIALIZE_CSV
void restoreDocumentState(Document &document) const
Restore the document previously saved by saveDocumentState.
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
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_CMD_DELETE
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
void exportToClipboard(const QStringList &selected, const Transformation &transformation, QTextStream &strCsv, QTextStream &strHtml, const Curve &curveAxis, const CurvesGraphs &curvesGraphsAll, CurvesGraphs &curvesGraphsSelected) const
Export, curve-by-curve, raw data points to a string that will be copied to the clipboard.
const QString DOCUMENT_SERIALIZE_CMD_DESCRIPTION
const QString DOCUMENT_SERIALIZE_CMD
const QString DOCUMENT_SERIALIZE_HTML
const QString DOCUMENT_SERIALIZE_BOOL_FALSE
const CurvesGraphs & curvesGraphs() const
Make all Curves available, read only, for CmdAbstract classes only.
virtual void cmdUndo()
Undo method that is called when QUndoStack is moved one command backward.