1 #include "CmdAbstract.h"
2 #include "CmdFactory.h"
3 #include "CmdMediator.h"
5 #include "DocumentSerialize.h"
6 #include "EngaugeAssert.h"
8 #include "LoggerUpload.h"
9 #include "MainWindow.h"
13 #include <QUndoCommand>
14 #include <QXmlStreamReader>
15 #include <QXmlStreamWriter>
16 #include "Transformation.h"
20 const QImage &image) :
23 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdMediator::CmdMediator image=" << image.width() <<
"x" << image.height ();
25 connectSignals(mainWindow);
29 const QString &fileName) :
32 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdMediator::CmdMediator filename=" << fileName.toLatin1().data();
34 connectSignals(mainWindow);
41 void CmdMediator::connectSignals (
MainWindow &mainWindow)
43 connect (
this, SIGNAL (cleanChanged (
bool)), &mainWindow, SLOT (slotCleanChanged (
bool)));
95 return m_document.
pixmap ();
105 writer.writeStartElement(DOCUMENT_SERIALIZE_CMD_MEDIATOR);
107 for (
int i = 0; i < index(); i++) {
113 writer.writeEndElement();
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.
const Curve & curveAxes() const
Get method for axis curve.
int curvesGraphsNumPoints(const QString &curveName) const
See CurvesGraphs::curvesGraphsNumPoints.
QPixmap pixmap() const
Return the image that is being digitized.
bool successfulRead() const
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will ex...
Storage of one imported image and the data attached to that image.
Container for one set of digitized Points.
QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.
virtual void saveXml(QXmlStreamWriter &writer) const =0
Save commands as xml for later uploading.
QString reasonForUnsuccessfulRead() const
Return an informative text message explaining why startup loading failed. Applies if successfulRead r...
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...