Engauge Digitizer 2
Loading...
Searching...
No Matches
CentipedeDebugPolar.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_DEBUG_POLAR_H
8#define CENTIPEDE_DEBUG_POLAR_H
9
10#include <QPointF>
11
13class QColor;
14class QGraphicsEllipseItem;
15class QGraphicsScene;
16class QLineF;
17class Transformation;
18
21{
22public:
25
29 const QPointF &posScreenParallelogramTR,
30 const QPointF &posScreenParallelogramBL,
31 const QPointF &posScreenParallelogramBR,
34 double aAligned,
35 double bAligned,
36 double radius);
37
40
43
44 virtual ~CentipedeDebugPolar ();
45
47 double aAligned () const;
48
50 double angleEllipseFromMajorAxis () const;
51
53 double angleGraphAxisFromScreenAxis () const;
54
56 double bAligned () const;
57
59 void display (QGraphicsScene &scene,
60 const DocumentModelCoords &modelCoords,
61 const Transformation &transformation);
62
67 void dumpEllipseGraphicsItem (const QString &callerMethod,
68 const QGraphicsEllipseItem *ellipse) const;
69
71 QPointF posScreenParallelogramBL () const;
72
74 QPointF posScreenParallelogramBR () const;
75
77 QPointF posScreenParallelogramTL () const;
78
80 QPointF posScreenParallelogramTR () const;
81
83 double radius () const;
84
85private:
86
88 void addToLegend (QGraphicsScene &scene,
89 const QString &entry,
90 const QColor &color);
91
93 void displayTics (QGraphicsScene &scene,
94 const Transformation &transformation,
95 const QPointF &posOriginScreen,
96 const QPointF &posAAxisScreen,
97 const QColor &colorGraphCoordinates,
98 const QColor &colorScreenCoordinates);
99
101 QLineF portionOfLineLast (const QLineF &line,
102 int degrees,
103 int degreesBetweenHighlights) const;
104
106 QLineF portionOfLineNext (const QLineF &line,
107 int degrees,
108 int degreesBetweenHighlights) const;
109
110 QPointF m_posScreenParallelogramTL;
111 QPointF m_posScreenParallelogramTR;
112 QPointF m_posScreenParallelogramBL;
113 QPointF m_posScreenParallelogramBR;
114 double m_angleGraphAxisFromScreenAxis;
115 double m_angleEllipseFromMajorAxis;
116 double m_aAligned;
117 double m_bAligned;
118 double m_radius;
119 int m_legendYPos; // Positions legend entries
120};
121
122#endif // CENTIPEDE_DEBUG_POLAR_H
QPointF posScreenParallelogramTL() const
Get method for top left corner of rectangle.
double radius() const
Get method for radius.
QPointF posScreenParallelogramBL() const
Get method for bottom left corner of rectangle.
QPointF posScreenParallelogramBR() const
Get method for bottom right corner of rectangle.
void display(QGraphicsScene &scene, const DocumentModelCoords &modelCoords, const Transformation &transformation)
Display member variable values on scene.
CentipedeDebugPolar & operator=(const CentipedeDebugPolar &other)
Assignment operator.
double angleGraphAxisFromScreenAxis() const
Get method for top left corner of rectangle.
double aAligned() const
Get method for top left corner of rectangle.
double bAligned() const
Get method for top left corner of rectangle.
void dumpEllipseGraphicsItem(const QString &callerMethod, const QGraphicsEllipseItem *ellipse) const
Dump ellipse grahics item.
double angleEllipseFromMajorAxis() const
Get method for top left corner of rectangle.
CentipedeDebugPolar()
Default constructor with initial values overwritten later.
QPointF posScreenParallelogramTR() const
Get method for top right corner of rectangle.
Model for DlgSettingsCoords and CmdSettingsCoords.
Affine transformation between screen and graph coordinates, based on digitized axis points.