Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
GraphicsLinesForCurve Class Reference

This class stores the GraphicsLine objects for one Curve. More...

#include <GraphicsLinesForCurve.h>

Inheritance diagram for GraphicsLinesForCurve:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GraphicsLinesForCurve()

GraphicsLinesForCurve::GraphicsLinesForCurve ( const QString &  curveName)

Single constructor.

Definition at line 30 of file GraphicsLinesForCurve.cpp.

◆ ~GraphicsLinesForCurve()

GraphicsLinesForCurve::~GraphicsLinesForCurve ( )

Definition at line 39 of file GraphicsLinesForCurve.cpp.

Member Function Documentation

◆ addPoint()

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.

◆ identifierToOrdinal()

double GraphicsLinesForCurve::identifierToOrdinal ( const QString &  identifier) const

Get ordinal for specified identifier.

Definition at line 143 of file GraphicsLinesForCurve.cpp.

◆ lineMembershipPurge()

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.

◆ lineMembershipReset()

void GraphicsLinesForCurve::lineMembershipReset ( )

Mark points as unwanted. Afterwards, lineMembershipPurge gets called.

Definition at line 203 of file GraphicsLinesForCurve.cpp.

◆ printStream()

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.

◆ removePoint()

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.

◆ removeTemporaryPointIfExists()

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.

◆ updateAfterCommand()

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.

◆ updateCurveStyle()

void GraphicsLinesForCurve::updateCurveStyle ( const CurveStyle curveStyle)

Update the curve style for this curve.

Definition at line 350 of file GraphicsLinesForCurve.cpp.

◆ updateGraphicsLinesToMatchGraphicsPoints()

void GraphicsLinesForCurve::updateGraphicsLinesToMatchGraphicsPoints ( const LineStyle lineStyle)

Calls to moveLinesWithDraggedPoint have finished so update the lines correspondingly.

Definition at line 362 of file GraphicsLinesForCurve.cpp.

◆ updatePointOrdinalsAfterDrag()

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.


The documentation for this class was generated from the following files: