18#include <QApplication>
22#include <QXmlStreamReader>
29 const QStringList &selectedPointIdentifiers) :
33 m_transformIsDefined (
mainWindow.transformIsDefined())
36 <<
" selected=" << selectedPointIdentifiers.count ();
39 QTextStream strCsv (&m_csv), strHtml (&m_html);
51 const QString &cmdDescription,
52 QXmlStreamReader &reader) :
59 QXmlStreamAttributes attributes = reader.attributes();
61 QStringList requiredAttributesLeaf;
66 requiredAttributesLeaf,
75 m_curvesGraphs.loadXml(reader);
88 if (m_transformIsDefined) {
95 QClipboard *clipboard = QApplication::clipboard();
96 clipboard->setMimeData (mimePointsExport, QClipboard::Clipboard);
124 m_curvesGraphs.saveXml(writer);
126 writer.writeEndElement();
const QString CMD_DESCRIPTION("Add axis point")
const QString CMD_DESCRIPTION("Copy")
const QString DOCUMENT_SERIALIZE_TRANSFORM_DEFINED
const QString DOCUMENT_SERIALIZE_CMD
const QString DOCUMENT_SERIALIZE_CMD_TYPE
const QString DOCUMENT_SERIALIZE_CMD_DESCRIPTION
const QString DOCUMENT_SERIALIZE_HTML
const QString DOCUMENT_SERIALIZE_CMD_COPY
const QString DOCUMENT_SERIALIZE_CSV
const QString DOCUMENT_SERIALIZE_BOOL_TRUE
const QString DOCUMENT_SERIALIZE_BOOL_FALSE
log4cpp::Category * mainCat
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 restoreState()
Before any other operations associated with a Cmd class are performed, this method is called to resto...
void saveOrCheckPreCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
void leafAndBaseAttributes(const QXmlStreamAttributes &attributes, const QStringList &requiredAttributesLeaf, QXmlStreamReader &reader)
Before reading leaf class attributes, check all required attributes from leaf and this base class are...
void baseAttributes(QXmlStreamWriter &writer) const
After writing leaf class attributes, this writes the base class atributes.
CmdAbstract(MainWindow &mainWindow, Document &document, const QString &cmdDescription)
Single constructor.
virtual void cmdRedo()
Redo method that is called when QUndoStack is moved one command forward.
CmdCopy(MainWindow &mainWindow, Document &document, const QStringList &selectedPointIdentifiers)
Constructor for normal creation.
virtual void saveXml(QXmlStreamWriter &writer) const
Save commands as xml for later uploading.
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.
void updatePointOrdinals(const Transformation &transformation)
Update point ordinals after point addition/removal or dragging.
Strategy class for exporting to the clipboard. This strategy is external to the Document class so tha...
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.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
void updateAfterCommand()
See GraphicsScene::updateAfterCommand.
Custom mime type for separate treatment of graph coordinates and, when there is no transform,...
#define LOG4CPP_INFO_S(logger)