2016-02-10 05:59:29 +01:00
|
|
|
#ifndef VELLIPTICALARC_P
|
|
|
|
#define VELLIPTICALARC_P
|
|
|
|
|
|
|
|
#include <QSharedData>
|
2016-02-28 20:43:23 +01:00
|
|
|
#include "../vmisc/vabstractapplication.h"
|
2016-02-10 05:59:29 +01:00
|
|
|
#include "vpointf.h"
|
|
|
|
|
2016-02-28 21:00:45 +01:00
|
|
|
#ifdef Q_CC_GNU
|
|
|
|
#pragma GCC diagnostic push
|
|
|
|
#pragma GCC diagnostic ignored "-Weffc++"
|
|
|
|
#endif
|
|
|
|
|
2016-02-10 05:59:29 +01:00
|
|
|
class VEllipticalArcData : public QSharedData
|
|
|
|
{
|
|
|
|
public:
|
2016-04-10 13:40:04 +02:00
|
|
|
VEllipticalArcData ();
|
2016-04-10 16:40:55 +02:00
|
|
|
VEllipticalArcData (qreal radius1, qreal radius2, const QString &formulaRadius1, const QString &formulaRadius2,
|
|
|
|
qreal rotationAngle);
|
|
|
|
VEllipticalArcData(qreal radius1, qreal radius2, qreal rotationAngle);
|
2016-04-10 13:40:04 +02:00
|
|
|
VEllipticalArcData(const VEllipticalArcData &arc);
|
2016-02-10 05:59:29 +01:00
|
|
|
|
|
|
|
virtual ~VEllipticalArcData();
|
|
|
|
|
|
|
|
/** @brief radius1 elliptical arc major radius. */
|
2016-04-10 16:40:55 +02:00
|
|
|
qreal radius1;
|
2016-02-10 05:59:29 +01:00
|
|
|
/** @brief radius2 elliptical arc minor radius. */
|
2016-04-10 16:40:55 +02:00
|
|
|
qreal radius2;
|
2016-02-10 05:59:29 +01:00
|
|
|
/** @brief formulaRadius1 formula for elliptical arc major radius. */
|
2016-04-10 16:40:55 +02:00
|
|
|
QString formulaRadius1;
|
2016-02-10 05:59:29 +01:00
|
|
|
/** @brief formulaRadius2 formula for elliptical arc minor radius. */
|
2016-04-10 16:40:55 +02:00
|
|
|
QString formulaRadius2;
|
2016-02-10 05:59:29 +01:00
|
|
|
/** @brief rotationAngle in degree. */
|
2016-04-10 16:40:55 +02:00
|
|
|
qreal rotationAngle;
|
2016-02-10 05:59:29 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
VEllipticalArcData &operator=(const VEllipticalArcData &) Q_DECL_EQ_DELETE;
|
|
|
|
};
|
|
|
|
|
2016-04-10 13:40:04 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VEllipticalArcData::VEllipticalArcData()
|
2016-04-10 16:40:55 +02:00
|
|
|
: radius1(0),
|
2016-04-10 13:40:04 +02:00
|
|
|
radius2(0),
|
|
|
|
formulaRadius1(),
|
|
|
|
formulaRadius2(),
|
|
|
|
rotationAngle(0)
|
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2016-04-10 16:40:55 +02:00
|
|
|
VEllipticalArcData::VEllipticalArcData(qreal radius1, qreal radius2, const QString &formulaRadius1,
|
|
|
|
const QString &formulaRadius2, qreal rotationAngle)
|
|
|
|
: radius1(radius1),
|
2016-04-10 13:40:04 +02:00
|
|
|
radius2(radius2),
|
|
|
|
formulaRadius1(formulaRadius1),
|
|
|
|
formulaRadius2(formulaRadius2),
|
|
|
|
rotationAngle(rotationAngle)
|
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2016-04-10 16:40:55 +02:00
|
|
|
VEllipticalArcData::VEllipticalArcData(qreal radius1, qreal radius2, qreal rotationAngle)
|
|
|
|
: radius1(radius1),
|
2016-04-10 13:40:04 +02:00
|
|
|
radius2(radius2),
|
|
|
|
formulaRadius1(QString().number(qApp->fromPixel(radius1))),
|
|
|
|
formulaRadius2(QString().number(qApp->fromPixel(radius2))),
|
|
|
|
rotationAngle(rotationAngle)
|
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VEllipticalArcData::VEllipticalArcData(const VEllipticalArcData &arc)
|
|
|
|
: QSharedData(arc),
|
|
|
|
radius1(arc.radius1),
|
|
|
|
radius2(arc.radius2),
|
|
|
|
formulaRadius1(arc.formulaRadius1),
|
|
|
|
formulaRadius2(arc.formulaRadius2),
|
|
|
|
rotationAngle(arc.rotationAngle)
|
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2016-02-10 05:59:29 +01:00
|
|
|
VEllipticalArcData::~VEllipticalArcData()
|
|
|
|
{}
|
|
|
|
|
2016-02-28 21:00:45 +01:00
|
|
|
#ifdef Q_CC_GNU
|
|
|
|
#pragma GCC diagnostic pop
|
|
|
|
#endif
|
|
|
|
|
2016-02-10 05:59:29 +01:00
|
|
|
#endif // VELLIPTICALARC_P
|
|
|
|
|