1 #include "CmdSettingsExportFormat.h"
3 #include "DocumentModelExportFormat.h"
4 #include "DocumentSerialize.h"
6 #include "MainWindow.h"
7 #include <QXmlStreamReader>
9 const QString CMD_DESCRIPTION (
"Export settings");
18 m_modelExportBefore (modelExportBefore),
19 m_modelExportAfter (modelExportAfter)
21 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSettingsExportFormat::CmdSettingsExportFormat";
26 const QString &cmdDescription,
27 QXmlStreamReader &reader) :
32 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSettingsExportFormat::CmdSettingsExportFormat";
34 m_modelExportBefore.
loadXml (reader);
35 m_modelExportAfter.
loadXml (reader);
38 CmdSettingsExportFormat::~CmdSettingsExportFormat ()
44 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSettingsExportFormat::cmdRedo";
52 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdSettingsExportFormat::cmdUndo";
60 writer.writeStartElement(DOCUMENT_SERIALIZE_CMD);
61 writer.writeAttribute(DOCUMENT_SERIALIZE_CMD_TYPE, DOCUMENT_SERIALIZE_CMD_SETTINGS_EXPORT);
62 writer.writeAttribute(DOCUMENT_SERIALIZE_CMD_DESCRIPTION, QUndoCommand::text ());
63 m_modelExportBefore.
saveXml (writer);
64 m_modelExportAfter.
saveXml(writer);
65 writer.writeEndElement();
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
void updateAfterCommand()
See GraphicsScene::updateAfterCommand.
Storage of one imported image and the data attached to that image.
void updateSettingsExportFormat(const DocumentModelExportFormat &modelExport)
Update with new export properties.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...