7#include "CmdAbstract.h"
9#include "CmdMediator.h"
11#include "DocumentSerialize.h"
12#include "EngaugeAssert.h"
14#include "LoggerUpload.h"
15#include "MainWindow.h"
19#include <QUndoCommand>
20#include <QXmlStreamReader>
21#include <QXmlStreamWriter>
22#include "Transformation.h"
26 const QImage &image) :
29 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdMediator::CmdMediator image=" << image.width() <<
"x" << image.height ();
31 connectSignals(mainWindow);
35 const QString &fileName) :
38 LOG4CPP_INFO_S ((*mainCat)) <<
"CmdMediator::CmdMediator filename=" << fileName.toLatin1().data();
40 connectSignals(mainWindow);
47void CmdMediator::connectSignals (
MainWindow &mainWindow)
49 connect (
this, SIGNAL (cleanChanged (
bool)), &mainWindow, SLOT (slotCleanChanged (
bool)));
106 return m_document.
pixmap ();
116 writer.writeStartElement(DOCUMENT_SERIALIZE_CMD_MEDIATOR);
118 for (
int i = 0; i < index(); i++) {
124 writer.writeEndElement();
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
virtual void saveXml(QXmlStreamWriter &writer) const =0
Save commands as xml for later uploading.
Storage of data belonging to one coordinate system.
Container for one set of digitized Points.
Storage of one imported image and the data attached to that image.
void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.
QPixmap pixmap() const
Return the image that is being digitized.
void setDocumentAxesPointsRequired(DocumentAxesPointsRequired documentAxesPointsRequired)
Set the number of axes points required.
const Curve & curveAxes() const
Get method for axis curve.
void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.
QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
const CoordSystem & coordSystem() const
Currently active CoordSystem.
bool successfulRead() const
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will ex...
QString reasonForUnsuccessfulRead() const
Return an informative text message explaining why startup loading failed. Applies if successfulRead r...
int curvesGraphsNumPoints(const QString &curveName) const
See CurvesGraphs::curvesGraphsNumPoints.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...