Engauge Digitizer 2
Loading...
Searching...
No Matches
GraphicsLinesForCurves.h
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef GRAPHICS_LINES_FOR_CURVES_H
8#define GRAPHICS_LINES_FOR_CURVES_H
9
10#include <QHash>
11
12class CurveStyles;
14class GraphicsPoint;
15class GraphicsScene;
16class Point;
17class QGraphicsItem;
18class QPointF;
19class QTextStream;
20class Transformation;
21
22typedef QHash<QString, GraphicsLinesForCurve*> GraphicsLinesContainer;
23
26{
27public:
30
33 void addPoint (const QString &curveName,
34 const QString &pointIdentifier,
35 double ordinal,
36 GraphicsPoint &point);
37
39 void addRemoveCurves (GraphicsScene &scene,
40 const QStringList &curveNames);
41
43 void lineMembershipPurge (const CurveStyles &curveStyles);
44
46 void lineMembershipReset ();
47
49 void print () const;
50
52 void printStream (QString indentation,
53 QTextStream &str) const;
54
56 void removePoint (const QString &identifier);
57
61
63 void resetOnLoad();
64
67 const CurveStyles &curveStyles,
68 const QString &curveName,
69 const Point &point);
70
72 void updateCurveStyles (const CurveStyles &modelCurveStyles);
73
76
78 void updatePointOrdinalsAfterDrag (const CurveStyles &curveStyles,
79 const Transformation &transformation);
80
81private:
82
83 GraphicsLinesContainer m_graphicsLinesForCurve;
84};
85
86#endif // GRAPHICS_LINES_FOR_CURVES_H
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
Definition CurveStyles.h:23
This class stores the GraphicsLine objects for one Curve.
This class stores the GraphicsLinesForCurves objects, one per Curve.
GraphicsLinesForCurves()
Single constructor.
void updatePointOrdinalsAfterDrag(const CurveStyles &curveStyles, const Transformation &transformation)
See GraphicsScene::updateOrdinalsAfterDrag.
void removePoint(const QString &identifier)
Remove the specified point. The act of deleting it will automatically remove it from the GraphicsScen...
void updateCurveStyles(const CurveStyles &modelCurveStyles)
Update the curve style for every curve.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void resetOnLoad()
Reset, when loading a document after the first, to same state that first document was at when loaded.
void removeTemporaryPointIfExists()
Remove temporary point if it exists.
void updateAfterCommand(GraphicsScene &scene, const CurveStyles &curveStyles, const QString &curveName, const Point &point)
Update the GraphicsScene with the specified Point from the Document. If it does not exist yet in the ...
void updateGraphicsLinesToMatchGraphicsPoints(const CurveStyles &curveStyles)
Calls to moveLinesWithDraggedPoint have finished so update the lines correspondingly.
void addRemoveCurves(GraphicsScene &scene, const QStringList &curveNames)
Add new curves and remove expired curves to match the specified list.
void addPoint(const QString &curveName, const QString &pointIdentifier, double ordinal, GraphicsPoint &point)
Add new point.
void lineMembershipReset()
Mark points as unwanted. Afterwards, lineMembershipPurge gets called.
void print() const
Debugging method for printing directly from symbolic debugger.
void lineMembershipPurge(const CurveStyles &curveStyles)
Mark the end of addPoint calls. Remove stale lines, insert missing lines, and draw the graphics lines...
Graphics item for drawing a circular or polygonal Point.
Add point and line handling to generic QGraphicsScene.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition Point.h:24
Affine transformation between screen and graph coordinates, based on digitized axis points.