10 #include "CoordSystemContext.h" 11 #include "CoordSystemIndex.h" 12 #include "CurvesGraphs.h" 13 #include "CurveStyles.h" 14 #include "DocumentAxesPointsRequired.h" 15 #include "DocumentModelAxesChecker.h" 16 #include "DocumentModelColorFilter.h" 17 #include "DocumentModelCoords.h" 18 #include "DocumentModelDigitizeCurve.h" 19 #include "DocumentModelExportFormat.h" 20 #include "DocumentModelGeneral.h" 21 #include "DocumentModelGridRemoval.h" 22 #include "DocumentModelPointMatch.h" 23 #include "DocumentModelSegments.h" 24 #include "PointStyle.h" 28 #include <QXmlStreamReader> 36 class QXmlStreamWriter;
63 const QPointF &posGraph,
75 const QPointF &posGraph,
76 const QString &identifier,
82 const QPointF &posScreen,
83 QString &generatedIentifier,
88 const QPointF &posScreen,
89 const QString &identifier,
97 const QPointF &posGraph,
99 QString &errorMessage,
104 const QPointF &posScreen,
105 const QPointF &posGraph,
107 QString &errorMessage);
138 const QString &identifier);
141 bool isXOnly (
const QString &pointIdentifier)
const;
151 const Functor2wRet<const Point &, const Point &, CallbackSearchReturn> &ftorWithCallback)
const;
193 void movePoint (
const QString &pointIdentifier,
194 const QPointF &deltaScreen);
203 QPointF
positionGraph (
const QString &pointIdentifier)
const;
213 QTextStream &str)
const;
228 void saveXml (QXmlStreamWriter &writer)
const;
284 bool bytesIndicatePreVersion6 (
const QByteArray &bytes)
const;
286 void generateEmptyPixmap(
const QXmlStreamAttributes &attributes);
287 void loadImage(QXmlStreamReader &reader);
288 void loadPreVersion6 (QDataStream &str);
289 void loadVersion6 (QFile *file);
290 void loadVersion7 (QFile *file);
291 int versionFromFile (QFile *file)
const;
298 DocumentAxesPointsRequired m_documentAxesPointsRequired;
301 bool m_successfulRead;
302 QString m_reasonForUnsuccessfulRead;
void addCoordSystems(unsigned int numberCoordSystemToAdd)
Add some number (0 or more) of additional coordinate systems.
void addGraphCurveAtEnd(const QString &curveName)
Add new graph curve to the list of existing graph curves.
QPointF positionScreen(const QString &pointIdentifier) const
See Curve::positionScreen.
Model for DlgSettingsGeneral and CmdSettingsGeneral.
DocumentAxesPointsRequired documentAxesPointsRequired() const
Get method for DocumentAxesPointsRequired.
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(...
unsigned int coordSystemCount() const
Number of CoordSystem.
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
bool isXOnly(const QString &pointIdentifier) const
See Curve::isXOnly.
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.
const CoordSystem & coordSystem() const
Currently active CoordSystem.
Storage of data belonging to one coordinate system.
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 checkAddPointAxis(const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage, bool isXOnly)
Check before calling addPointAxis. Also returns the next available ordinal number (to prevent clashes...
void checkEditPointAxis(const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage)
Check before calling editPointAxis.
void setCoordSystemIndex(CoordSystemIndex coordSystemIndex)
Set the index of current active CoordSystem.
void removePointGraph(const QString &identifier)
Perform the opposite of addPointGraph.
CoordSystemIndex coordSystemIndex() const
Index of current active CoordSystem.
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.
void addPointAxisWithSpecifiedIdentifier(const QPointF &posScreen, const QPointF &posGraph, const QString &identifier, double ordinal, bool isXOnly)
Add a single axis point with the specified point identifier.
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 print() const
Debugging method for printing directly from symbolic debugger.
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
void addPointAxisWithGeneratedIdentifier(const QPointF &posScreen, const QPointF &posGraph, QString &identifier, double ordinal, bool isXOnly)
Add a single axis point with a generated point identifier.
void setDocumentAxesPointsRequired(DocumentAxesPointsRequired documentAxesPointsRequired)
Set the number of axes points required.
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.
This class plays the role of context class in a state machine, although the 'states' are actually dif...
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.
DocumentModelGeneral modelGeneral() const
Get method for DocumentModelGeneral.