29 #ifndef VELLIPTICALARC_H
30 #define VELLIPTICALARC_H
32 #include <qcompilerdetection.h>
33 #include <QCoreApplication>
35 #include <QSharedDataPointer>
54 const QString &formulaRadius2, qreal f1,
const QString &formulaF1, qreal f2,
55 const QString &formulaF2, qreal rotationAngle,
const QString &formulaRotationAngle,
58 VEllipticalArc(
const VPointF ¢er, qreal radius1, qreal radius2, qreal f1, qreal f2, qreal rotationAngle);
60 VEllipticalArc(qreal length,
const QString &formulaLength,
const VPointF ¢er, qreal radius1, qreal radius2,
61 const QString &formulaRadius1,
const QString &formulaRadius2, qreal f1,
const QString &formulaF1,
62 qreal rotationAngle,
const QString &formulaRotationAngle, quint32 idObject = 0,
65 VEllipticalArc(qreal length,
const VPointF ¢er, qreal radius1, qreal radius2, qreal f1, qreal rotationAngle);
69 VEllipticalArc Rotate(QPointF originPoint, qreal degrees,
const QString &prefix = QString())
const;
71 VEllipticalArc Move(qreal length, qreal angle,
const QString &prefix = QString())
const;
77 #ifdef Q_COMPILER_RVALUE_REFS
95 virtual qreal
GetLength ()
const Q_DECL_OVERRIDE;
97 QPointF
GetP1()
const;
98 QPointF
GetP2()
const;
101 void setTransform(
const QTransform &matrix,
bool combine =
false);
106 virtual qreal
GetEndAngle ()
const Q_DECL_OVERRIDE;
109 QPointF
CutArc (
const qreal &length)
const;
115 virtual void FindF2(qreal length) Q_DECL_OVERRIDE;
118 QSharedDataPointer<VEllipticalArcData>
d;
120 QPointF
getPoint (qreal angle)
const;
130 return angle - 360.*qFloor(angle/360.);
VEllipticalArc Flip(const QLineF &axis, const QString &prefix=QString()) const
qreal GetRadius2() const
GetRadius2 return elliptical arc minor radius.
QString GetFormulaRadius2() const
GetFormulaRadius2 return formula for minor radius.
VEllipticalArc Rotate(QPointF originPoint, qreal degrees, const QString &prefix=QString()) const
VEllipticalArc & operator=(const VEllipticalArc &arc)
operator = assignment operator
virtual qreal GetStartAngle() const Q_DECL_OVERRIDE
static qreal normalizeAngle(qreal angle)
QPointF GetP1() const
GetP1 return point associated with start angle.
VEllipticalArc Move(qreal length, qreal angle, const QString &prefix=QString()) const
QString GetFormulaRadius1() const
GetFormulaRadius1 return formula for major radius.
virtual VPointF GetCenter() const Q_DECL_OVERRIDE
void SetFormulaRadius1(const QString &formula, qreal value)
VEllipticalArc()
VEllipticalArc default constructor.
virtual ~VEllipticalArc() Q_DECL_OVERRIDE
QPointF CutArc(const qreal &length, VEllipticalArc &arc1, VEllipticalArc &arc2) const
CutArc cut arc into two arcs.
qreal GetRadius1() const
GetRadius1 return elliptical arc major radius.
QSharedDataPointer< VEllipticalArcData > d
virtual QVector< QPointF > getPoints() const Q_DECL_OVERRIDE
GetPoints return list of points needed for drawing arc.
virtual void FindF2(qreal length) Q_DECL_OVERRIDE
void setTransform(const QTransform &matrix, bool combine=false)
QString GetFormulaRotationAngle() const
GetFormulaRotationAngle return formula for rotation angle.
void SetFormulaRotationAngle(const QString &formula, qreal value)
virtual qreal GetEndAngle() const Q_DECL_OVERRIDE
QPointF getPoint(qreal angle) const
GetPoint return point associated with angle.
QPointF GetP2() const
GetP2 return point associated with end angle.
qreal GetRotationAngle() const
GetRotationAngle return rotation angle.
QTransform getTransform() const
virtual qreal GetLength() const Q_DECL_OVERRIDE
GetLength return arc length.
void SetFormulaRadius2(const QString &formula, qreal value)
qreal getRealEndAngle() const
void Swap(VEllipticalArc &arc) Q_DECL_NOTHROW
virtual void CreateName() Q_DECL_OVERRIDE
The VPointF class keep data of point.
Q_DECLARE_TYPEINFO(VEllipticalArc, Q_MOVABLE_TYPE)