4 #include "CurvesGraphs.h"
5 #include "CurveStyles.h"
6 #include "DocumentModelAxesChecker.h"
7 #include "DocumentModelColorFilter.h"
8 #include "DocumentModelCoords.h"
9 #include "DocumentModelDigitizeCurve.h"
10 #include "DocumentModelExportFormat.h"
11 #include "DocumentModelGeneral.h"
12 #include "DocumentModelGridRemoval.h"
13 #include "DocumentModelPointMatch.h"
14 #include "DocumentModelSegments.h"
15 #include "PointStyle.h"
19 #include <QXmlStreamReader>
25 class QXmlStreamWriter;
47 const QPointF &posGraph,
57 const QPointF &posGraph,
58 const QString &identifier,
63 const QPointF &posScreen,
64 QString &generatedIentifier,
69 const QPointF &posScreen,
70 const QString &identifier,
78 const QPointF &posGraph,
80 QString &errorMessage);
84 const QPointF &posScreen,
85 const QPointF &posGraph,
87 QString &errorMessage);
106 const QString &identifier);
116 const Functor2wRet<const Point &, const Point &, CallbackSearchReturn> &ftorWithCallback)
const;
158 void movePoint (
const QString &pointIdentifier,
159 const QPointF &deltaScreen);
168 QPointF
positionGraph (
const QString &pointIdentifier)
const;
178 QTextStream &str)
const;
193 void saveXml (QXmlStreamWriter &writer)
const;
238 bool bytesIndicatePreVersion6 (
const QByteArray &bytes)
const;
240 void generateEmptyPixmap(
const QXmlStreamAttributes &attributes);
241 void loadImage(QXmlStreamReader &reader);
242 void loadPostVersion5 (QXmlStreamReader &reader);
243 void loadPreVersion6 (QDataStream &str);
250 bool m_successfulRead;
251 QString m_reasonForUnsuccessfulRead;
void addGraphCurveAtEnd(const QString &curveName)
Add new graph curve to the list of existing graph curves.
void addPointAxisWithSpecifiedIdentifier(const QPointF &posScreen, const QPointF &posGraph, const QString &identifier, double ordinal)
Add a single axis point with the specified point identifier.
QPointF positionScreen(const QString &pointIdentifier) const
See Curve::positionScreen.
Model for DlgSettingsGeneral and CmdSettingsGeneral.
void movePoint(const QString &pointIdentifier, const QPointF &deltaScreen)
See Curve::movePoint.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
DocumentModelColorFilter modelColorFilter() const
Get method for DocumentModelColorFilter.
void setModelAxesChecker(const DocumentModelAxesChecker &modelAxesChecker)
Set method for DocumentModelAxesChecker.
void setModelGridRemoval(const DocumentModelGridRemoval &modelGridRemoval)
Set method for DocumentModelGridRemoval.
void addPointGraphWithGeneratedIdentifier(const QString &curveName, const QPointF &posScreen, QString &generatedIentifier, double ordinal)
Add a single graph point with a generated point identifier.
DocumentModelPointMatch modelPointMatch() const
Get method for DocumentModelPointMatch.
void setModelPointMatch(const DocumentModelPointMatch &modelPointMatch)
Set method for DocumentModelPointMatch.
void removePointAxis(const QString &identifier)
Perform the opposite of addPointAxis.
void setModelGeneral(const DocumentModelGeneral &modelGeneral)
Set method for DocumentModelGeneral.
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
void setModelSegments(const DocumentModelSegments &modelSegments)
Set method for DocumentModelSegments.
void addPointGraphWithSpecifiedIdentifier(const QString &curveName, const QPointF &posScreen, const QString &identifier, double ordinal)
Add a single graph point with the specified point identifer. Note that PointStyle is not applied to t...
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.
DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.
void setModelDigitizeCurve(const DocumentModelDigitizeCurve &modelDigitizeCurve)
Set method for DocumentModelDigitizeCurve.
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...
void setModelCoords(const DocumentModelCoords &modelCoords)
Set method for DocumentModelCoords.
bool loadCurvesFile(const QString &curvesFile)
Load the curve names in the specified Engauge file into the current document. This is called near the...
void checkEditPointAxis(const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage)
Check before calling editPointAxis.
void removePointGraph(const QString &identifier)
Perform the opposite of addPointGraph.
void setModelExport(const DocumentModelExportFormat &modelExport)
Set method for DocumentModelExportFormat.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
void editPointAxis(const QPointF &posGraph, const QString &identifier)
Edit the graph coordinates of a single axis point. Call this after checkAddPointAxis to guarantee suc...
Container for all graph curves. The axes point curve is external to this class.
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
void setModelCurveStyles(const CurveStyles &modelCurveStyles)
Set method for CurveStyles.
CurveStyles modelCurveStyles() const
Get method for CurveStyles.
DocumentModelAxesChecker modelAxesChecker() const
Get method for DocumentModelAxesChecker.
void removePointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs.
DocumentModelDigitizeCurve modelDigitizeCurve() const
Get method for DocumentModelDigitizeCurve.
void setModelColorFilter(const DocumentModelColorFilter &modelColorFilter)
Set method for DocumentModelColorFilter.
Model for DlgSettingsCoords and CmdSettingsCoords.
QPointF positionGraph(const QString &pointIdentifier) const
See Curve::positionGraph.
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 addPointAxisWithGeneratedIdentifier(const QPointF &posScreen, const QPointF &posGraph, QString &identifier, double ordinal)
Add a single axis point with a generated point identifier.
void print() const
Debugging method for printing directly from symbolic debugger.
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
void iterateThroughCurveSegments(const QString &curveName, const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
See Curve::iterateThroughCurveSegments, for any axes or graph curve.
int nextOrdinalForCurve(const QString &curveName) const
Default next ordinal value for specified curve.
const CurvesGraphs & curvesGraphs() const
Make all Curves available, read only, for CmdAbstract classes only.
const Curve * curveForCurveName(const QString &curveName) const
See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME.
DocumentModelSegments modelSegments() const
Get method for DocumentModelSegments.
Model for DlgSettingsSegments and CmdSettingsSegments.
void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.
void setCurvesGraphs(const CurvesGraphs &curvesGraphs)
Let CmdAbstract classes overwrite CurvesGraphs.
void addPointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs.
void saveXml(QXmlStreamWriter &writer) const
Save document to xml.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
QString reasonForUnsuccessfulRead() const
Return an informative text message explaining why startup loading failed. Applies if successfulRead r...
DocumentModelGridRemoval modelGridRemoval() const
Get method for DocumentModelGridRemoval.
void updatePointOrdinals(const Transformation &transformation)
Update point ordinals after point addition/removal or dragging.
DocumentModelExportFormat modelExport() const
Get method for DocumentModelExportFormat.
void checkAddPointAxis(const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage)
Check before calling addPointAxis. Also returns the next available ordinal number (to prevent clashes...
DocumentModelGeneral modelGeneral() const
Get method for DocumentModelGeneral.