Seamly2D
Code documentation
vellipticalarc_p.h
Go to the documentation of this file.
1 #ifndef VELLIPTICALARC_P
2 #define VELLIPTICALARC_P
3 
4 #include <QSharedData>
5 #include "../vmisc/vabstractapplication.h"
6 #include "../vmisc/diagnostic.h"
7 #include "vpointf.h"
8 
9 QT_WARNING_PUSH
10 QT_WARNING_DISABLE_GCC("-Weffc++")
11 QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
12 
13 class VEllipticalArcData : public QSharedData
14 {
15 public:
17  VEllipticalArcData (qreal radius1, qreal radius2, const QString &formulaRadius1, const QString &formulaRadius2,
18  qreal rotationAngle, const QString &formulaRotationAngle);
19  VEllipticalArcData(qreal radius1, qreal radius2, qreal rotationAngle);
21 
22  virtual ~VEllipticalArcData();
23 
24  /** @brief radius1 elliptical arc major radius. */
25  qreal radius1;
26  /** @brief radius2 elliptical arc minor radius. */
27  qreal radius2;
28  /** @brief formulaRadius1 formula for elliptical arc major radius. */
29  QString formulaRadius1;
30  /** @brief formulaRadius2 formula for elliptical arc minor radius. */
31  QString formulaRadius2;
32  /** @brief rotationAngle in degree. */
34  /** @brief formulaRotationAngle formula for rotationAngle. */
36  /** @brief m_transform for elliptical arc */
37  QTransform m_transform;
38 
39 private:
40  VEllipticalArcData &operator=(const VEllipticalArcData &) Q_DECL_EQ_DELETE;
41 };
42 
43 //---------------------------------------------------------------------------------------------------------------------
45  : radius1(0)
46  , radius2(0)
47  , formulaRadius1()
48  , formulaRadius2()
49  , rotationAngle(0)
50  , formulaRotationAngle()
51  , m_transform()
52 {}
53 
54 //---------------------------------------------------------------------------------------------------------------------
55 VEllipticalArcData::VEllipticalArcData(qreal radius1, qreal radius2, const QString &formulaRadius1,
56  const QString &formulaRadius2, qreal rotationAngle,
57  const QString &formulaRotationAngle)
58  : radius1(radius1)
59  , radius2(radius2)
60  , formulaRadius1(formulaRadius1)
61  , formulaRadius2(formulaRadius2)
62  , rotationAngle(rotationAngle)
63  , formulaRotationAngle(formulaRotationAngle)
64  , m_transform()
65 {}
66 
67 //---------------------------------------------------------------------------------------------------------------------
68 VEllipticalArcData::VEllipticalArcData(qreal radius1, qreal radius2, qreal rotationAngle)
69  : radius1(radius1)
70  , radius2(radius2)
71  , formulaRadius1(QString().number(qApp->fromPixel(radius1)))
72  , formulaRadius2(QString().number(qApp->fromPixel(radius2)))
73  , rotationAngle(rotationAngle)
74  , formulaRotationAngle(QString().number(qApp->fromPixel(rotationAngle)))
75  , m_transform()
76 {}
77 
78 //---------------------------------------------------------------------------------------------------------------------
80  : QSharedData(arc)
81  , radius1(arc.radius1)
82  , radius2(arc.radius2)
83  , formulaRadius1(arc.formulaRadius1)
84  , formulaRadius2(arc.formulaRadius2)
85  , rotationAngle(arc.rotationAngle)
86  , formulaRotationAngle(arc.formulaRotationAngle)
87  , m_transform(arc.m_transform)
88 {}
89 
90 //---------------------------------------------------------------------------------------------------------------------
92 {}
93 
95 
96 #endif // VELLIPTICALARC_P
QString formulaRotationAngle
formulaRotationAngle formula for rotationAngle.
QString formulaRadius2
formulaRadius2 formula for elliptical arc minor radius.
VEllipticalArcData & operator=(const VEllipticalArcData &) Q_DECL_EQ_DELETE
QTransform m_transform
m_transform for elliptical arc
qreal radius2
radius2 elliptical arc minor radius.
qreal radius1
radius1 elliptical arc major radius.
qreal rotationAngle
rotationAngle in degree.
QString formulaRadius1
formulaRadius1 formula for elliptical arc major radius.
virtual ~VEllipticalArcData()
#define qApp
Definition: vapplication.h:67