7 #include "CmdAbstract.h" 8 #include "CmdFactory.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);
47 void 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();
int curvesGraphsNumPoints(const QString &curveName) const
See CurvesGraphs::curvesGraphsNumPoints.
const CoordSystem & coordSystem() const
Currently active CoordSystem.
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
bool successfulRead() const
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will ex...
Storage of data belonging to one coordinate system.
void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.
Storage of one imported image and the data attached to that image.
Container for one set of digitized Points.
QString reasonForUnsuccessfulRead() const
Return an informative text message explaining why startup loading failed. Applies if successfulRead r...
void setDocumentAxesPointsRequired(DocumentAxesPointsRequired documentAxesPointsRequired)
Set the number of axes points required.
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.
QPixmap pixmap() const
Return the image that is being digitized.
const Curve & curveAxes() const
Get method for axis curve.
QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
QString selectedCurveName() const
Currently selected curve name. This is used to set the selected curve combobox in MainWindow...
void setSelectedCurveName(const QString &selectedCurveName)
Save curve name that is selected for the current coordinate system, for the next time the coordinate ...