Engauge Digitizer 2
|
Storage of data belonging to one coordinate system. More...
#include <CoordSystem.h>
Public Member Functions | |
CoordSystem () | |
Single constructor. | |
~CoordSystem () | |
CoordSystem (const QString &fileName) | |
Constructor for opened Graphs, and error report files. The specified file is opened and read. | |
virtual void | addGraphCurveAtEnd (const QString &curveName) |
Add new graph curve to the list of existing graph curves. | |
virtual void | addPointAxisWithGeneratedIdentifier (const QPointF &posScreen, const QPointF &posGraph, QString &identifier, double ordinal, bool isXOnly) |
Add a single axis point with a generated point identifier. | |
virtual 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. | |
virtual void | addPointGraphWithGeneratedIdentifier (const QString &curveName, const QPointF &posScreen, QString &generatedIentifier, double ordinal) |
Add a single graph point with a generated point identifier. | |
virtual void | addPointGraphWithSpecifiedIdentifier (const QString &curveName, const QPointF &posScreen, const QString &identifier, double ordinal) |
Add a single graph point with the specified point identifier. Note that PointStyle is not applied to the point within the Graph. | |
virtual void | addPointsInCurvesGraphs (CurvesGraphs &curvesGraphs) |
Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs. | |
virtual void | checkAddPointAxis (const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage, bool isXOnly, DocumentAxesPointsRequired documentAxesPointsRequired) |
Check before calling addPointAxis. Also returns the next available ordinal number (to prevent clashes) | |
virtual void | checkEditPointAxis (const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage, DocumentAxesPointsRequired documentAxesPointsRequired) |
Check before calling editPointAxis. | |
virtual const Curve & | curveAxes () const |
Get method for axis curve. | |
virtual Curve * | curveForCurveName (const QString &curveName) |
See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME. | |
virtual const Curve * | curveForCurveName (const QString &curveName) const |
See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME. | |
virtual const CurvesGraphs & | curvesGraphs () const |
Make all Curves available, read only, for CmdAbstract classes only. | |
virtual QStringList | curvesGraphsNames () const |
See CurvesGraphs::curvesGraphsNames. | |
virtual int | curvesGraphsNumPoints (const QString &curveName) const |
See CurvesGraphs::curvesGraphsNumPoints. | |
virtual void | editPointAxis (const QPointF &posGraph, const QString &identifier) |
Edit the graph coordinates of a single axis point. Call this after checkAddPointAxis to guarantee success in this call. | |
virtual void | editPointGraph (bool isX, bool isY, double x, double y, const QStringList &identifiers, const Transformation &transformation) |
Edit the graph coordinates of one or more graph points. | |
bool | isXOnly (const QString &pointIdentifier) const |
Return true if y coordinate is undefined, otherwise x coordinae is undefined in DOCUMENT_AXES_POINT_REQUIRE_4 mode. | |
virtual void | iterateThroughCurvePointsAxes (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) |
See Curve::iterateThroughCurvePoints, for the axes curve. | |
virtual void | iterateThroughCurvePointsAxes (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const |
See Curve::iterateThroughCurvePoints, for the axes curve. | |
virtual void | iterateThroughCurveSegments (const QString &curveName, const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const |
See Curve::iterateThroughCurveSegments, for any axes or graph curve. | |
virtual void | iterateThroughCurvesPointsGraphs (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) |
See Curve::iterateThroughCurvePoints, for all the graphs curves. | |
virtual void | iterateThroughCurvesPointsGraphs (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const |
See Curve::iterateThroughCurvePoints, for all the graphs curves. | |
virtual bool | loadCurvesFile (const QString &curvesFile) |
Load the curve names in the specified Engauge file into the current graph. This is called near the end of the import process only. | |
void | loadPreVersion6 (QDataStream &str, double version, DocumentAxesPointsRequired &documentAxesPointsRequired) |
Load from file in pre-version 6 format. Number of axes points is read in and passed to Document. | |
void | loadVersion6 (QXmlStreamReader &reader, DocumentAxesPointsRequired &documentAxesPointsRequired) |
Load from file in version 6 format. Number of axes points is read in and passed to Document. | |
void | loadVersions7AndUp (QXmlStreamReader &reader) |
Load from file in versions 7 and 8 formats. Number of axes points is already defined at Document level. | |
virtual DocumentModelAxesChecker | modelAxesChecker () const |
Get method for DocumentModelAxesChecker. | |
virtual DocumentModelColorFilter | modelColorFilter () const |
Get method for DocumentModelColorFilter. | |
virtual DocumentModelCoords | modelCoords () const |
Get method for DocumentModelCoords. | |
virtual CurveStyles | modelCurveStyles () const |
Get method for CurveStyles. | |
virtual DocumentModelDigitizeCurve | modelDigitizeCurve () const |
Get method for DocumentModelDigitizeCurve. | |
virtual DocumentModelExportFormat | modelExport () const |
Get method for DocumentModelExportFormat. | |
virtual DocumentModelGeneral | modelGeneral () const |
Get method for DocumentModelGeneral. | |
virtual DocumentModelGridDisplay | modelGridDisplay () const |
Get method for DocumentModelGridDisplay. | |
virtual DocumentModelGridRemoval | modelGridRemoval () const |
Get method for DocumentModelGridRemoval. | |
virtual DocumentModelGuideline | modelGuideline () const |
Get method for DocumentModelGuideline. | |
virtual DocumentModelPointMatch | modelPointMatch () const |
Get method for DocumentModelPointMatch. | |
virtual DocumentModelSegments | modelSegments () const |
Get method for DocumentModelSegments. | |
virtual void | movePoint (const QString &pointIdentifier, const QPointF &deltaScreen) |
See Curve::movePoint. | |
virtual int | nextOrdinalForCurve (const QString &curveName) const |
Default next ordinal value for specified curve. | |
virtual QPointF | positionGraph (const QString &pointIdentifier) const |
See Curve::positionGraph. | |
virtual QPointF | positionScreen (const QString &pointIdentifier) const |
See Curve::positionScreen. | |
virtual void | print () const |
Debugging method for printing directly from symbolic debugger. | |
virtual void | printStream (QString indentation, QTextStream &str) const |
Debugging method that supports print method of this class and printStream method of some other class(es) | |
virtual QString | reasonForUnsuccessfulRead () const |
Return an informative text message explaining why startup loading failed. Applies if successfulRead returns false. | |
virtual void | removePointAxis (const QString &identifier) |
Perform the opposite of addPointAxis. | |
virtual void | removePointGraph (const QString &identifier) |
Perform the opposite of addPointGraph. | |
virtual void | removePointsInCurvesGraphs (CurvesGraphs &curvesGraphs) |
Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs. | |
virtual void | saveXml (QXmlStreamWriter &writer) const |
Save graph to xml. | |
virtual QString | selectedCurveName () const |
Currently selected curve name. This is used to set the selected curve combobox in MainWindow. | |
virtual void | setCurveAxes (const Curve &curveAxes) |
Let CmdAbstract classes overwrite axes Curve. Applies to current coordinate system. | |
virtual void | setCurvesGraphs (const CurvesGraphs &curvesGraphs) |
Let CmdAbstract classes overwrite CurvesGraphs. Applies to current coordinate system. | |
virtual void | setModelAxesChecker (const DocumentModelAxesChecker &modelAxesChecker) |
Set method for DocumentModelAxesChecker. | |
virtual void | setModelColorFilter (const DocumentModelColorFilter &modelColorFilter) |
Set method for DocumentModelColorFilter. | |
virtual void | setModelCoords (const DocumentModelCoords &modelCoords) |
Set method for DocumentModelCoords. | |
virtual void | setModelCurveStyles (const CurveStyles &modelCurveStyles) |
Set method for CurveStyles. | |
virtual void | setModelDigitizeCurve (const DocumentModelDigitizeCurve &modelDigitizeCurve) |
Set method for DocumentModelDigitizeCurve. | |
virtual void | setModelExport (const DocumentModelExportFormat &modelExport) |
Set method for DocumentModelExportFormat. | |
virtual void | setModelGeneral (const DocumentModelGeneral &modelGeneral) |
Set method for DocumentModelGeneral. | |
virtual void | setModelGridDisplay (const DocumentModelGridDisplay &modelGridDisplay) |
Set method for DocumentModelGridDisplay. | |
virtual void | setModelGridRemoval (const DocumentModelGridRemoval &modelGridRemoval) |
Set method for DocumentModelGridRemoval. | |
virtual void | setModelGuideline (const DocumentModelGuideline &modelGuideline) |
Set method for DocumentModelGuideline. | |
void | setModelPointMatch (const DocumentModelPointMatch &modelPointMatch) |
Set method for DocumentModelPointMatch. | |
virtual void | setModelSegments (const DocumentModelSegments &modelSegments) |
Set method for DocumentModelSegments. | |
virtual void | setSelectedCurveName (const QString &selectedCurveName) |
Save curve name that is selected for the current coordinate system, for the next time the coordinate system reappears. | |
virtual bool | successfulRead () const |
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will explain why. | |
virtual void | updatePointOrdinals (const Transformation &transformation) |
Update point ordinals after point addition/removal or dragging. | |
Public Member Functions inherited from CoordSystemInterface | |
CoordSystemInterface () | |
Single constructor. | |
virtual | ~CoordSystemInterface () |
Storage of data belonging to one coordinate system.
There can be one or more coordinate systems per graph, and one or more graphs in the image belonging to a Document
Definition at line 43 of file CoordSystem.h.
CoordSystem::CoordSystem | ( | ) |
Single constructor.
Definition at line 39 of file CoordSystem.cpp.
CoordSystem::~CoordSystem | ( | ) |
Definition at line 63 of file CoordSystem.cpp.
CoordSystem::CoordSystem | ( | const QString & | fileName | ) |
Constructor for opened Graphs, and error report files. The specified file is opened and read.
|
virtual |
Add new graph curve to the list of existing graph curves.
Implements CoordSystemInterface.
Definition at line 68 of file CoordSystem.cpp.
|
virtual |
Add a single axis point with a generated point identifier.
Call this after checkAddPointAxis to guarantee success in this call.
posScreen | Screen coordinates from QGraphicsView |
posGraph | Graph coordiantes from user |
identifier | Identifier for new axis point |
ordinal | Unique, for curve, ordinal number |
isXOnly | True if graph coordinates have only x coordinate |
Implements CoordSystemInterface.
Definition at line 78 of file CoordSystem.cpp.
|
virtual |
Add a single axis point with the specified point identifier.
Call this after checkAddPointAxis to guarantee success in this call.
posScreen | Screen coordinates from QGraphicsView |
posGraph | Graph coordiantes from user |
identifier | Identifier for new axis point |
ordinal | Unique, for curve, ordinal number |
isXOnly | True if graph coordinates have only x coordinate |
Implements CoordSystemInterface.
Definition at line 100 of file CoordSystem.cpp.
|
virtual |
Add a single graph point with a generated point identifier.
Implements CoordSystemInterface.
Definition at line 121 of file CoordSystem.cpp.
|
virtual |
Add a single graph point with the specified point identifier. Note that PointStyle is not applied to the point within the Graph.
Implements CoordSystemInterface.
Definition at line 139 of file CoordSystem.cpp.
|
virtual |
Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs.
Implements CoordSystemInterface.
Definition at line 156 of file CoordSystem.cpp.
|
virtual |
Check before calling addPointAxis. Also returns the next available ordinal number (to prevent clashes)
Implements CoordSystemInterface.
Definition at line 180 of file CoordSystem.cpp.
|
virtual |
Check before calling editPointAxis.
Implements CoordSystemInterface.
Definition at line 205 of file CoordSystem.cpp.
|
virtual |
Get method for axis curve.
Implements CoordSystemInterface.
Definition at line 229 of file CoordSystem.cpp.
|
virtual |
See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME.
Implements CoordSystemInterface.
Definition at line 236 of file CoordSystem.cpp.
|
virtual |
See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME.
Implements CoordSystemInterface.
Definition at line 249 of file CoordSystem.cpp.
|
virtual |
Make all Curves available, read only, for CmdAbstract classes only.
Implements CoordSystemInterface.
Definition at line 262 of file CoordSystem.cpp.
|
virtual |
See CurvesGraphs::curvesGraphsNames.
Implements CoordSystemInterface.
Definition at line 267 of file CoordSystem.cpp.
|
virtual |
See CurvesGraphs::curvesGraphsNumPoints.
Implements CoordSystemInterface.
Definition at line 272 of file CoordSystem.cpp.
|
virtual |
Edit the graph coordinates of a single axis point. Call this after checkAddPointAxis to guarantee success in this call.
Implements CoordSystemInterface.
Definition at line 277 of file CoordSystem.cpp.
|
virtual |
Edit the graph coordinates of one or more graph points.
Implements CoordSystemInterface.
Definition at line 288 of file CoordSystem.cpp.
bool CoordSystem::isXOnly | ( | const QString & | pointIdentifier | ) | const |
Return true if y coordinate is undefined, otherwise x coordinae is undefined in DOCUMENT_AXES_POINT_REQUIRE_4 mode.
Applies to axes points only
Definition at line 336 of file CoordSystem.cpp.
|
virtual |
See Curve::iterateThroughCurvePoints, for the axes curve.
Implements CoordSystemInterface.
Definition at line 341 of file CoordSystem.cpp.
|
virtual |
See Curve::iterateThroughCurvePoints, for the axes curve.
Implements CoordSystemInterface.
Definition at line 348 of file CoordSystem.cpp.
|
virtual |
See Curve::iterateThroughCurveSegments, for any axes or graph curve.
Implements CoordSystemInterface.
Definition at line 355 of file CoordSystem.cpp.
|
virtual |
See Curve::iterateThroughCurvePoints, for all the graphs curves.
Implements CoordSystemInterface.
Definition at line 366 of file CoordSystem.cpp.
|
virtual |
See Curve::iterateThroughCurvePoints, for all the graphs curves.
Implements CoordSystemInterface.
Definition at line 373 of file CoordSystem.cpp.
|
virtual |
Load the curve names in the specified Engauge file into the current graph. This is called near the end of the import process only.
Implements CoordSystemInterface.
Definition at line 380 of file CoordSystem.cpp.
void CoordSystem::loadPreVersion6 | ( | QDataStream & | str, |
double | version, | ||
DocumentAxesPointsRequired & | documentAxesPointsRequired ) |
Load from file in pre-version 6 format. Number of axes points is read in and passed to Document.
Definition at line 387 of file CoordSystem.cpp.
void CoordSystem::loadVersion6 | ( | QXmlStreamReader & | reader, |
DocumentAxesPointsRequired & | documentAxesPointsRequired ) |
Load from file in version 6 format. Number of axes points is read in and passed to Document.
Definition at line 561 of file CoordSystem.cpp.
void CoordSystem::loadVersions7AndUp | ( | QXmlStreamReader & | reader | ) |
Load from file in versions 7 and 8 formats. Number of axes points is already defined at Document level.
Definition at line 625 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelAxesChecker.
Implements CoordSystemInterface.
Definition at line 685 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelColorFilter.
Implements CoordSystemInterface.
Definition at line 690 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelCoords.
Implements CoordSystemInterface.
Definition at line 698 of file CoordSystem.cpp.
|
virtual |
Get method for CurveStyles.
Implements CoordSystemInterface.
Definition at line 703 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelDigitizeCurve.
Implements CoordSystemInterface.
Definition at line 711 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelExportFormat.
Implements CoordSystemInterface.
Definition at line 716 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelGeneral.
Implements CoordSystemInterface.
Definition at line 721 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelGridDisplay.
Implements CoordSystemInterface.
Definition at line 726 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelGridRemoval.
Implements CoordSystemInterface.
Definition at line 731 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelGuideline.
Implements CoordSystemInterface.
Definition at line 736 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelPointMatch.
Implements CoordSystemInterface.
Definition at line 741 of file CoordSystem.cpp.
|
virtual |
Get method for DocumentModelSegments.
Implements CoordSystemInterface.
Definition at line 746 of file CoordSystem.cpp.
|
virtual |
See Curve::movePoint.
Implements CoordSystemInterface.
Definition at line 751 of file CoordSystem.cpp.
|
virtual |
Default next ordinal value for specified curve.
Implements CoordSystemInterface.
Definition at line 762 of file CoordSystem.cpp.
|
virtual |
See Curve::positionGraph.
Implements CoordSystemInterface.
Definition at line 778 of file CoordSystem.cpp.
|
virtual |
Implements CoordSystemInterface.
Definition at line 786 of file CoordSystem.cpp.
|
virtual |
Debugging method for printing directly from symbolic debugger.
Implements CoordSystemInterface.
Definition at line 794 of file CoordSystem.cpp.
|
virtual |
Debugging method that supports print method of this class and printStream method of some other class(es)
Implements CoordSystemInterface.
Definition at line 804 of file CoordSystem.cpp.
|
virtual |
Return an informative text message explaining why startup loading failed. Applies if successfulRead returns false.
Implements CoordSystemInterface.
Definition at line 841 of file CoordSystem.cpp.
|
virtual |
Perform the opposite of addPointAxis.
Implements CoordSystemInterface.
Definition at line 848 of file CoordSystem.cpp.
|
virtual |
Perform the opposite of addPointGraph.
Implements CoordSystemInterface.
Definition at line 855 of file CoordSystem.cpp.
|
virtual |
Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs.
Implements CoordSystemInterface.
Definition at line 862 of file CoordSystem.cpp.
|
virtual |
Save graph to xml.
Implements CoordSystemInterface.
Definition at line 883 of file CoordSystem.cpp.
|
virtual |
Currently selected curve name. This is used to set the selected curve combobox in MainWindow.
Implements CoordSystemInterface.
Definition at line 903 of file CoordSystem.cpp.
|
virtual |
Let CmdAbstract classes overwrite axes Curve. Applies to current coordinate system.
Implements CoordSystemInterface.
Definition at line 908 of file CoordSystem.cpp.
|
virtual |
Let CmdAbstract classes overwrite CurvesGraphs. Applies to current coordinate system.
Implements CoordSystemInterface.
Definition at line 917 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelAxesChecker.
Implements CoordSystemInterface.
Definition at line 926 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelColorFilter.
Implements CoordSystemInterface.
Definition at line 931 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelCoords.
Implements CoordSystemInterface.
Definition at line 947 of file CoordSystem.cpp.
|
virtual |
Set method for CurveStyles.
Implements CoordSystemInterface.
Definition at line 952 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelDigitizeCurve.
Implements CoordSystemInterface.
Definition at line 967 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelExportFormat.
Implements CoordSystemInterface.
Definition at line 972 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelGeneral.
Implements CoordSystemInterface.
Definition at line 977 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelGridDisplay.
Implements CoordSystemInterface.
Definition at line 982 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelGridRemoval.
Implements CoordSystemInterface.
Definition at line 987 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelGuideline.
Implements CoordSystemInterface.
Definition at line 992 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelPointMatch.
Implements CoordSystemInterface.
Definition at line 997 of file CoordSystem.cpp.
|
virtual |
Set method for DocumentModelSegments.
Implements CoordSystemInterface.
Definition at line 1002 of file CoordSystem.cpp.
|
virtual |
Save curve name that is selected for the current coordinate system, for the next time the coordinate system reappears.
Implements CoordSystemInterface.
Definition at line 1007 of file CoordSystem.cpp.
|
virtual |
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will explain why.
Implements CoordSystemInterface.
Definition at line 1012 of file CoordSystem.cpp.
|
virtual |
Update point ordinals after point addition/removal or dragging.
See GraphicsScene::updatePointOrdinalsAfterDrag. Graph coordinates of point must be up to date
Implements CoordSystemInterface.
Definition at line 1017 of file CoordSystem.cpp.