|
Engauge Digitizer 2
|
This class stores the GraphicsLine objects for one Curve. More...
#include <GraphicsLinesForCurve.h>
Public Member Functions | |
| GraphicsLinesForCurve (const QString &curveName) | |
| Single constructor. | |
| void | addPoint (const QString &pointIdentifier, double ordinal, GraphicsPoint &point) |
| Add new line. | |
| double | identifierToOrdinal (const QString &identifier) const |
| Get ordinal for specified identifier. | |
| void | lineMembershipPurge (const LineStyle &lineStyle) |
| Mark the end of addPoint calls. Remove stale lines, insert missing lines, and draw the graphics lines. | |
| void | lineMembershipReset () |
| Mark points as unwanted. Afterwards, lineMembershipPurge gets called. | |
| void | printStream (QString indentation, QTextStream &str) const |
| Debugging method that supports print method of this class and printStream method of some other class(es) | |
| void | removePoint (double ordinal) |
| Remove the specified point. The act of deleting it will automatically remove it from the GraphicsScene. | |
| void | removeTemporaryPointIfExists () |
| Remove temporary point if it exists. | |
| void | updateAfterCommand (GraphicsScene &scene, const PointStyle &pointStyle, const Point &point) |
| Update the GraphicsScene with the specified Point from the Document. If it does not exist yet in the scene, we add it. | |
| void | updateCurveStyle (const CurveStyle &curveStyle) |
| Update the curve style for this curve. | |
| void | updateGraphicsLinesToMatchGraphicsPoints (const LineStyle &lineStyle) |
| Calls to moveLinesWithDraggedPoint have finished so update the lines correspondingly. | |
| void | updatePointOrdinalsAfterDrag (const LineStyle &lineStyle, const Transformation &transformation) |
| See GraphicsScene::updateOrdinalsAfterDrag. Pretty much the same steps as Curve::updatePointOrdinals. | |
This class stores the GraphicsLine objects for one Curve.
The container is a QMap since that container maintains order by key
Definition at line 24 of file GraphicsLinesForCurve.h.
| GraphicsLinesForCurve::GraphicsLinesForCurve | ( | const QString & | curveName | ) |
Single constructor.
Definition at line 30 of file GraphicsLinesForCurve.cpp.
| GraphicsLinesForCurve::~GraphicsLinesForCurve | ( | ) |
Definition at line 39 of file GraphicsLinesForCurve.cpp.
| void GraphicsLinesForCurve::addPoint | ( | const QString & | pointIdentifier, |
| double | ordinal, | ||
| GraphicsPoint & | point | ||
| ) |
Add new line.
The GraphicsPoint arguments are not const since this line binds to the points, so dragging points also drags the lines. The ordinal is already in the GraphicsPoint as DATA_KEY_ORDINAL
Definition at line 50 of file GraphicsLinesForCurve.cpp.
| double GraphicsLinesForCurve::identifierToOrdinal | ( | const QString & | identifier | ) | const |
Get ordinal for specified identifier.
Definition at line 143 of file GraphicsLinesForCurve.cpp.
| void GraphicsLinesForCurve::lineMembershipPurge | ( | const LineStyle & | lineStyle | ) |
Mark the end of addPoint calls. Remove stale lines, insert missing lines, and draw the graphics lines.
Definition at line 163 of file GraphicsLinesForCurve.cpp.
| void GraphicsLinesForCurve::lineMembershipReset | ( | ) |
Mark points as unwanted. Afterwards, lineMembershipPurge gets called.
Definition at line 203 of file GraphicsLinesForCurve.cpp.
| void GraphicsLinesForCurve::printStream | ( | QString | indentation, |
| QTextStream & | str | ||
| ) | const |
Debugging method that supports print method of this class and printStream method of some other class(es)
Definition at line 237 of file GraphicsLinesForCurve.cpp.
| void GraphicsLinesForCurve::removePoint | ( | double | ordinal | ) |
Remove the specified point. The act of deleting it will automatically remove it from the GraphicsScene.
Definition at line 260 of file GraphicsLinesForCurve.cpp.
| void GraphicsLinesForCurve::removeTemporaryPointIfExists | ( | ) |
Remove temporary point if it exists.
Temporary point handling is so complicated that this method quietly allows redundant calls to this method, without complaining that the point has already been removed when called again
Definition at line 274 of file GraphicsLinesForCurve.cpp.
| void GraphicsLinesForCurve::updateAfterCommand | ( | GraphicsScene & | scene, |
| const PointStyle & | pointStyle, | ||
| const Point & | point | ||
| ) |
Update the GraphicsScene with the specified Point from the Document. If it does not exist yet in the scene, we add it.
Definition at line 315 of file GraphicsLinesForCurve.cpp.
| void GraphicsLinesForCurve::updateCurveStyle | ( | const CurveStyle & | curveStyle | ) |
Update the curve style for this curve.
Definition at line 350 of file GraphicsLinesForCurve.cpp.
| void GraphicsLinesForCurve::updateGraphicsLinesToMatchGraphicsPoints | ( | const LineStyle & | lineStyle | ) |
Calls to moveLinesWithDraggedPoint have finished so update the lines correspondingly.
Definition at line 362 of file GraphicsLinesForCurve.cpp.
| void GraphicsLinesForCurve::updatePointOrdinalsAfterDrag | ( | const LineStyle & | lineStyle, |
| const Transformation & | transformation | ||
| ) |
See GraphicsScene::updateOrdinalsAfterDrag. Pretty much the same steps as Curve::updatePointOrdinals.
Definition at line 395 of file GraphicsLinesForCurve.cpp.