Engauge Digitizer  2
CallbackSceneUpdateAfterCommand.cpp
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 #include "CallbackSceneUpdateAfterCommand.h"
8 #include "DataKey.h"
9 #include "Document.h"
10 #include "EngaugeAssert.h"
11 #include "GeometryWindow.h"
12 #include "GraphicsLinesForCurves.h"
13 #include "GraphicsScene.h"
14 #include "Point.h"
15 #include <QGraphicsItem>
16 
18  GraphicsScene &scene,
19  const Document &document,
20  GeometryWindow *geometryWindow) :
21  m_graphicsLinesForCurves (graphicsLinesForCurves),
22  m_scene (scene),
23  m_document (document),
24  m_geometryWindow (geometryWindow)
25 {
26 }
27 
28 CallbackSearchReturn CallbackSceneUpdateAfterCommand::callback (const QString &curveName,
29  const Point &point)
30 {
31  CallbackSearchReturn rtn = CALLBACK_SEARCH_RETURN_CONTINUE;
32 
33  m_graphicsLinesForCurves.updateAfterCommand (m_scene,
34  m_document.modelCurveStyles (),
35  curveName,
36  point,
37  m_geometryWindow);
38 
39  return rtn;
40 }
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition: Point.h:23
Window that displays the geometry information, as a table, for the current curve. ...
CallbackSearchReturn callback(const QString &, const Point &point)
Callback method.
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 ...
This class stores the GraphicsLinesForCurves objects, one per Curve.
Storage of one imported image and the data attached to that image.
Definition: Document.h:41
CallbackSceneUpdateAfterCommand(GraphicsLinesForCurves &graphicsLinesForCurves, GraphicsScene &scene, const Document &document, GeometryWindow *geometryWindow)
Single constructor.
Add point and line handling to generic QGraphicsScene.
Definition: GraphicsScene.h:33
CurveStyles modelCurveStyles() const
Get method for CurveStyles.
Definition: Document.cpp:696