Engauge Digitizer 2
Loading...
Searching...
No Matches
CentipedeSegmentConstantREllipse.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2020 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 CENTIPEDE_SEGMENT_CONSTANT_R_ELLIPSE_H
8#define CENTIPEDE_SEGMENT_CONSTANT_R_ELLIPSE_H
9
10#include "CentipedeDebugPolar.h"
12
14class GraphicsArcItem;
16class GraphicsScene;
17
20{
21 Q_OBJECT;
22
23public:
26 const DocumentModelCoords &modelCoords,
29 const QPointF &posClickScreen);
31
32 virtual double distanceToClosestEndpoint (const QPointF &posScreen) const;
33 virtual void updateRadius (double radius);
34
35signals:
36
38 void signalUpdateAngles (QPointF posTangentialLow,
39 QPointF posTangentialCenter,
40 QPointF posTangentialHigh,
41 double widthToHeight,
42 double scaling);
43
44private:
46
47 void posScreenConstantRForXTHighLowAngles (double radius,
48 const QPointF &posLow,
49 const QPointF &posHigh) const;
50
51 GraphicsArcItem *m_graphicsItem;
52 GraphicsArcItemRelay *m_graphicsItemRelay;
53
54 // Two points where circle around click point intersects constant theta coordinate line
55 QPointF m_posRadialLow;
56 QPointF m_posRadialHigh;
57
58 // Two points where circle around click points intersects constant radius coordinate line
59 QPointF m_posTangentialLow;
60 QPointF m_posTangentialHigh;
61
62 // Origin
63 QPointF m_posOriginScreen;
64
65 // Debugging
66 CentipedeDebugPolar m_debugPolar;
67};
68
69#endif // CENTIPEDE_SEGMENT_CONSTANT_R_ELLIPSE_H
Class for collecting and then displaying debug information computed during constant R ellipse calcula...
QPointF posClickScreen() const
Center of circle in screen coordinates.
CentipedeSegmentAbstract(const DocumentModelGuideline &modelGuideline, const Transformation &transformation, const QPointF &posClickScreen)
Constructor with individual coordinates.
const DocumentModelGuideline & modelGuideline() const
Settings.
Transformation transformation() const
Transformation which is static through the entire lifetime of the Centipede class instances.
CentipedeSegmentConstantREllipse(GraphicsScene &scene, const DocumentModelCoords &modelCoords, const DocumentModelGuideline &modelGuideline, const Transformation &transformation, const QPointF &posClickScreen)
Constructor with individual coordinates.
virtual double distanceToClosestEndpoint(const QPointF &posScreen) const
Return distance to closest endpoint.
virtual void updateRadius(double radius)
Update geometry to reflect cursor movement.
void signalUpdateAngles(QPointF posTangentialLow, QPointF posTangentialCenter, QPointF posTangentialHigh, double widthToHeight, double scaling)
Send new geometry for later updating.
Model for DlgSettingsCoords and CmdSettingsCoords.
Model for managing the coordinate values corresponding Guidelines.
Enable postponed geometry changes for GraphicsArcItem, using a signal to trigger this class to update...
Draw an arc as an ellipse but without lines from the center to the start and end points.
Add point and line handling to generic QGraphicsScene.
Affine transformation between screen and graph coordinates, based on digitized axis points.