Engauge Digitizer 2
Loading...
Searching...
No Matches
GraphicsLinesForCurves.h
Go to the documentation of this file.
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;
13class GeometryWindow;
15class GraphicsPoint;
16class GraphicsScene;
17class LineStyle;
18class Point;
19class QGraphicsItem;
20class QPainterPath;
21class QPointF;
22class QTextStream;
23class SplineDrawer;
24class Transformation;
25
26typedef QHash<QString, GraphicsLinesForCurve*> GraphicsLinesContainer;
27
30{
31public:
34
37 void addPoint (const QString &curveName,
38 const QString &pointIdentifier,
39 double ordinal,
40 GraphicsPoint &point);
41
43 void addRemoveCurves (GraphicsScene &scene,
44 const QStringList &curveNames);
45
47 void lineMembershipPurge (const CurveStyles &curveStyles,
48 SplineDrawer &splineDrawer,
49 QPainterPath &pathMultiValued,
50 LineStyle &lineMultiValued);
51
53 void lineMembershipReset ();
54
56 void print () const;
57
59 void printStream (QString indentation,
60 QTextStream &str) const;
61
63 void removePoint (const QString &identifier);
64
68
70 void resetOnLoad();
71
74 const CurveStyles &curveStyles,
75 const QString &curveName,
76 const Point &point,
77 GeometryWindow *geometryWindow);
78
80 void updateCurveStyles (const CurveStyles &modelCurveStyles);
81
84 SplineDrawer &splineDrawer,
85 QPainterPath &pathMultiValued,
86 LineStyle &lineMultiValued);
87
89 void updateHighlightOpacity (double highlightOpacity);
90
92 void updatePointOrdinalsAfterDrag (const CurveStyles &curveStyles,
93 const Transformation &transformation);
94
95private:
96
97 GraphicsLinesContainer m_graphicsLinesForCurve;
98};
99
100#endif // GRAPHICS_LINES_FOR_CURVES_H
QHash< QString, GraphicsLinesForCurve * > GraphicsLinesContainer
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
Definition CurveStyles.h:23
Window that displays the geometry information, as a table, for the current curve.
This class stores the GraphicsLine objects for one Curve.
void updateHighlightOpacity(double highlightOpacity)
Update the highlight opacity value. This may or may not affect the current display immediately depend...
GraphicsLinesForCurves()
Single constructor.
void updateAfterCommand(GraphicsScene &scene, const CurveStyles &curveStyles, const QString &curveName, const Point &point, GeometryWindow *geometryWindow)
Update the GraphicsScene with the specified Point from the Document. If it does not exist yet in the ...
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 lineMembershipPurge(const CurveStyles &curveStyles, SplineDrawer &splineDrawer, QPainterPath &pathMultiValued, LineStyle &lineMultiValued)
Mark the end of addPoint calls. Remove stale lines, insert missing lines, and draw the graphics lines...
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 updateGraphicsLinesToMatchGraphicsPoints(const CurveStyles &curveStyles, SplineDrawer &splineDrawer, QPainterPath &pathMultiValued, LineStyle &lineMultiValued)
Calls to moveLinesWithDraggedPoint have finished so update the lines correspondingly.
void lineMembershipReset()
Mark points as unwanted. Afterwards, lineMembershipPurge gets called.
void print() const
Debugging method for printing directly from symbolic debugger.
Graphics item for drawing a circular or polygonal Point.
Add point and line handling to generic QGraphicsScene.
Details for a specific Line.
Definition LineStyle.h:20
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition Point.h:26
This class takes the output from Spline and uses that to draw the curve in the graphics window,...
Affine transformation between screen and graph coordinates, based on digitized axis points.