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. | |
~GraphicsLinesForCurve () | |
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, SplineDrawer &splineDrawer, QPainterPath &pathMultiValued, LineStyle &lineMultiValued) |
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, GeometryWindow *geometryWindow) |
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, SplineDrawer &splineDrawer, QPainterPath &pathMultiValued, LineStyle &lineMultiValued) |
Calls to moveLinesWithDraggedPoint have finished so update the lines correspondingly. | |
void | updateHighlightOpacity (double highlightOpacity) |
Update the highlight opacity value. This may or may not affect the current display immediately depending on the state. | |
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 27 of file GraphicsLinesForCurve.h.
GraphicsLinesForCurve::GraphicsLinesForCurve | ( | const QString & | curveName | ) |
Single constructor.
Definition at line 34 of file GraphicsLinesForCurve.cpp.
GraphicsLinesForCurve::~GraphicsLinesForCurve | ( | ) |
Definition at line 44 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 55 of file GraphicsLinesForCurve.cpp.
double GraphicsLinesForCurve::identifierToOrdinal | ( | const QString & | identifier | ) | const |
Get ordinal for specified identifier.
Definition at line 186 of file GraphicsLinesForCurve.cpp.
void GraphicsLinesForCurve::lineMembershipPurge | ( | const LineStyle & | lineStyle, |
SplineDrawer & | splineDrawer, | ||
QPainterPath & | pathMultiValued, | ||
LineStyle & | lineMultiValued ) |
Mark the end of addPoint calls. Remove stale lines, insert missing lines, and draw the graphics lines.
Definition at line 206 of file GraphicsLinesForCurve.cpp.
void GraphicsLinesForCurve::lineMembershipReset | ( | ) |
Mark points as unwanted. Afterwards, lineMembershipPurge gets called.
Definition at line 252 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 286 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 309 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 323 of file GraphicsLinesForCurve.cpp.
void GraphicsLinesForCurve::updateAfterCommand | ( | GraphicsScene & | scene, |
const PointStyle & | pointStyle, | ||
const Point & | point, | ||
GeometryWindow * | geometryWindow ) |
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 366 of file GraphicsLinesForCurve.cpp.
void GraphicsLinesForCurve::updateCurveStyle | ( | const CurveStyle & | curveStyle | ) |
Update the curve style for this curve.
Definition at line 403 of file GraphicsLinesForCurve.cpp.
void GraphicsLinesForCurve::updateGraphicsLinesToMatchGraphicsPoints | ( | const LineStyle & | lineStyle, |
SplineDrawer & | splineDrawer, | ||
QPainterPath & | pathMultiValued, | ||
LineStyle & | lineMultiValued ) |
Calls to moveLinesWithDraggedPoint have finished so update the lines correspondingly.
Definition at line 429 of file GraphicsLinesForCurve.cpp.
void GraphicsLinesForCurve::updateHighlightOpacity | ( | double | highlightOpacity | ) |
Update the highlight opacity value. This may or may not affect the current display immediately depending on the state.
Definition at line 415 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 468 of file GraphicsLinesForCurve.cpp.