Engauge Digitizer 2
|
This class plays the role of context class in a state machine, although the 'states' are actually different instantiations of the CoordSystem class. More...
#include <CoordSystemContext.h>
This class plays the role of context class in a state machine, although the 'states' are actually different instantiations of the CoordSystem class.
At any point in time, one CoordSystem is active (as selected by the user)
Definition at line 24 of file CoordSystemContext.h.
CoordSystemContext::CoordSystemContext | ( | ) |
Default constructor for constructing from opened file.
Definition at line 13 of file CoordSystemContext.cpp.
CoordSystemContext::~CoordSystemContext | ( | ) |
Definition at line 19 of file CoordSystemContext.cpp.
Add specified number of coordinate systems to the original one created by the constructor.
Definition at line 26 of file CoordSystemContext.cpp.
Add new graph curve to the list of existing graph curves.
Implements CoordSystemInterface.
Definition at line 37 of file CoordSystemContext.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 44 of file CoordSystemContext.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 59 of file CoordSystemContext.cpp.
|
virtual |
Add a single graph point with a generated point identifier.
Implements CoordSystemInterface.
Definition at line 74 of file CoordSystemContext.cpp.
|
virtual |
Add a single graph point with the specified point identifer. Note that PointStyle is not applied to the point within the Graph.
Implements CoordSystemInterface.
Definition at line 87 of file CoordSystemContext.cpp.
|
virtual |
Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs.
Implements CoordSystemInterface.
Definition at line 100 of file CoordSystemContext.cpp.
|
virtual |
Check before calling addPointAxis. Also returns the next available ordinal number (to prevent clashes)
Implements CoordSystemInterface.
Definition at line 107 of file CoordSystemContext.cpp.
|
virtual |
Check before calling editPointAxis.
Implements CoordSystemInterface.
Definition at line 124 of file CoordSystemContext.cpp.
const CoordSystem & CoordSystemContext::coordSystem | ( | ) | const |
Number of CoordSystem.
Definition at line 148 of file CoordSystemContext.cpp.
CoordSystemIndex CoordSystemContext::coordSystemIndex | ( | ) | const |
Index of current CoordSystem.
Definition at line 153 of file CoordSystemContext.cpp.
Get method for axis curve.
Implements CoordSystemInterface.
Definition at line 158 of file CoordSystemContext.cpp.
See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME.
Implements CoordSystemInterface.
Definition at line 165 of file CoordSystemContext.cpp.
See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME.
Implements CoordSystemInterface.
Definition at line 172 of file CoordSystemContext.cpp.
|
virtual |
Make all Curves available, read only, for CmdAbstract classes only.
Implements CoordSystemInterface.
Definition at line 179 of file CoordSystemContext.cpp.
|
virtual |
See CurvesGraphs::curvesGraphsNames.
Implements CoordSystemInterface.
Definition at line 186 of file CoordSystemContext.cpp.
See CurvesGraphs::curvesGraphsNumPoints.
Implements CoordSystemInterface.
Definition at line 193 of file CoordSystemContext.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 200 of file CoordSystemContext.cpp.
|
virtual |
Edit the graph coordinates of one or more graph points.
Implements CoordSystemInterface.
Definition at line 209 of file CoordSystemContext.cpp.
True/false if y/x value is empty.
Definition at line 226 of file CoordSystemContext.cpp.
|
virtual |
See Curve::iterateThroughCurvePoints, for the axes curve.
Implements CoordSystemInterface.
Definition at line 233 of file CoordSystemContext.cpp.
|
virtual |
See Curve::iterateThroughCurvePoints, for the axes curve.
Implements CoordSystemInterface.
Definition at line 240 of file CoordSystemContext.cpp.
|
virtual |
See Curve::iterateThroughCurveSegments, for any axes or graph curve.
Implements CoordSystemInterface.
Definition at line 247 of file CoordSystemContext.cpp.
|
virtual |
See Curve::iterateThroughCurvePoints, for all the graphs curves.
Implements CoordSystemInterface.
Definition at line 256 of file CoordSystemContext.cpp.
|
virtual |
See Curve::iterateThroughCurvePoints, for all the graphs curves.
Implements CoordSystemInterface.
Definition at line 263 of file CoordSystemContext.cpp.
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 270 of file CoordSystemContext.cpp.
void CoordSystemContext::loadPreVersion6 | ( | QDataStream & | str, |
double | version, | ||
DocumentAxesPointsRequired & | documentAxesPointsRequired ) |
Load from file in pre-version 6 format.
Definition at line 277 of file CoordSystemContext.cpp.
void CoordSystemContext::loadVersion6 | ( | QXmlStreamReader & | reader, |
DocumentAxesPointsRequired & | documentAxesPointsRequired ) |
Load from file in version 6 format, into the single CoordSystem.
Definition at line 288 of file CoordSystemContext.cpp.
void CoordSystemContext::loadVersions7AndUp | ( | QXmlStreamReader & | reader | ) |
Load one CoordSystem from file in version 7 format or newer, into the most recent CoordSystem which was just created before the call to this method.
Definition at line 297 of file CoordSystemContext.cpp.
|
virtual |
Get method for DocumentModelAxesChecker.
Implements CoordSystemInterface.
Definition at line 305 of file CoordSystemContext.cpp.
|
virtual |
Get method for DocumentModelColorFilter.
Implements CoordSystemInterface.
Definition at line 312 of file CoordSystemContext.cpp.
|
virtual |
Get method for DocumentModelCoords.
Implements CoordSystemInterface.
Definition at line 319 of file CoordSystemContext.cpp.
|
virtual |
Get method for CurveStyles.
Implements CoordSystemInterface.
Definition at line 326 of file CoordSystemContext.cpp.
|
virtual |
Get method for DocumentModelDigitizeCurve.
Implements CoordSystemInterface.
Definition at line 333 of file CoordSystemContext.cpp.
|
virtual |
Get method for DocumentModelExportFormat.
Implements CoordSystemInterface.
Definition at line 340 of file CoordSystemContext.cpp.
|
virtual |
Get method for DocumentModelGeneral.
Implements CoordSystemInterface.
Definition at line 347 of file CoordSystemContext.cpp.
|
virtual |
Get method for DocumentModelGridDisplay.
Implements CoordSystemInterface.
Definition at line 354 of file CoordSystemContext.cpp.
|
virtual |
Get method for DocumentModelGridRemoval.
Implements CoordSystemInterface.
Definition at line 361 of file CoordSystemContext.cpp.
|
virtual |
Get method for DocumentModelPointMatch.
Implements CoordSystemInterface.
Definition at line 368 of file CoordSystemContext.cpp.
|
virtual |
Get method for DocumentModelSegments.
Implements CoordSystemInterface.
Definition at line 375 of file CoordSystemContext.cpp.
|
virtual |
See Curve::movePoint.
Implements CoordSystemInterface.
Definition at line 382 of file CoordSystemContext.cpp.
Default next ordinal value for specified curve.
Implements CoordSystemInterface.
Definition at line 391 of file CoordSystemContext.cpp.
See Curve::positionGraph.
Implements CoordSystemInterface.
Definition at line 398 of file CoordSystemContext.cpp.
Implements CoordSystemInterface.
Definition at line 405 of file CoordSystemContext.cpp.
|
virtual |
Debugging method for printing directly from symbolic debugger.
Implements CoordSystemInterface.
Definition at line 412 of file CoordSystemContext.cpp.
|
virtual |
Debugging method that supports print method of this class and printStream method of some other class(es)
Implements CoordSystemInterface.
Definition at line 419 of file CoordSystemContext.cpp.
|
virtual |
Return an informative text message explaining why startup loading failed. Applies if successfulRead returns false.
Implements CoordSystemInterface.
Definition at line 428 of file CoordSystemContext.cpp.
Perform the opposite of addPointAxis.
Implements CoordSystemInterface.
Definition at line 435 of file CoordSystemContext.cpp.
Perform the opposite of addPointGraph.
Implements CoordSystemInterface.
Definition at line 442 of file CoordSystemContext.cpp.
|
virtual |
Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs.
Implements CoordSystemInterface.
Definition at line 449 of file CoordSystemContext.cpp.
|
virtual |
Save graph to xml.
Implements CoordSystemInterface.
Definition at line 456 of file CoordSystemContext.cpp.
|
virtual |
Currently selected curve name. This is used to set the selected curve combobox in MainWindow.
Implements CoordSystemInterface.
Definition at line 465 of file CoordSystemContext.cpp.
void CoordSystemContext::setCoordSystemIndex | ( | CoordSystemIndex | coordSystemIndex | ) |
Index of current CoordSystem.
Definition at line 470 of file CoordSystemContext.cpp.
Let CmdAbstract classes overwrite axes Curve. Applies to current coordinate system.
Implements CoordSystemInterface.
Definition at line 480 of file CoordSystemContext.cpp.
|
virtual |
Let CmdAbstract classes overwrite CurvesGraphs. Applies to current coordinate system.
Implements CoordSystemInterface.
Definition at line 487 of file CoordSystemContext.cpp.
|
virtual |
Set method for DocumentModelAxesChecker.
Implements CoordSystemInterface.
Definition at line 494 of file CoordSystemContext.cpp.
|
virtual |
Set method for DocumentModelColorFilter.
Implements CoordSystemInterface.
Definition at line 501 of file CoordSystemContext.cpp.
|
virtual |
Set method for DocumentModelCoords.
Implements CoordSystemInterface.
Definition at line 508 of file CoordSystemContext.cpp.
|
virtual |
Set method for CurveStyles.
Implements CoordSystemInterface.
Definition at line 515 of file CoordSystemContext.cpp.
|
virtual |
Set method for DocumentModelDigitizeCurve.
Implements CoordSystemInterface.
Definition at line 522 of file CoordSystemContext.cpp.
|
virtual |
Set method for DocumentModelExportFormat.
Implements CoordSystemInterface.
Definition at line 529 of file CoordSystemContext.cpp.
|
virtual |
Set method for DocumentModelGeneral.
Implements CoordSystemInterface.
Definition at line 536 of file CoordSystemContext.cpp.
|
virtual |
Set method for DocumentModelGridDisplay.
Implements CoordSystemInterface.
Definition at line 543 of file CoordSystemContext.cpp.
|
virtual |
Set method for DocumentModelGridRemoval.
Implements CoordSystemInterface.
Definition at line 550 of file CoordSystemContext.cpp.
|
virtual |
Set method for DocumentModelPointMatch.
Implements CoordSystemInterface.
Definition at line 557 of file CoordSystemContext.cpp.
|
virtual |
Set method for DocumentModelSegments.
Implements CoordSystemInterface.
Definition at line 564 of file CoordSystemContext.cpp.
Save curve name that is selected for the current coordinate system, for the next time the coordinate system reappears.
Implements CoordSystemInterface.
Definition at line 571 of file CoordSystemContext.cpp.
|
virtual |
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will explain why.
Implements CoordSystemInterface.
Definition at line 576 of file CoordSystemContext.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 583 of file CoordSystemContext.cpp.