2016-02-10 05:59:29 +01:00
|
|
|
#ifndef VELLIPTICALARC_P
|
|
|
|
#define VELLIPTICALARC_P
|
|
|
|
|
|
|
|
#include <QSharedData>
|
2020-10-15 17:05:21 +02:00
|
|
|
#include "../vmisc/vabstractvalapplication.h"
|
2016-08-06 20:42:40 +02:00
|
|
|
#include "../vmisc/diagnostic.h"
|
2016-02-10 05:59:29 +01:00
|
|
|
#include "vpointf.h"
|
|
|
|
|
2016-08-06 20:42:40 +02:00
|
|
|
QT_WARNING_PUSH
|
|
|
|
QT_WARNING_DISABLE_GCC("-Weffc++")
|
2017-05-30 17:44:16 +02:00
|
|
|
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
2016-02-28 21:00:45 +01:00
|
|
|
|
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,
|
2016-12-17 02:41:33 +01:00
|
|
|
qreal rotationAngle, const QString &formulaRotationAngle);
|
2016-04-10 16:40:55 +02:00
|
|
|
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-12-17 02:41:33 +01:00
|
|
|
/** @brief formulaRotationAngle formula for rotationAngle. */
|
|
|
|
QString formulaRotationAngle;
|
2018-01-05 18:41:09 +01:00
|
|
|
QTransform m_transform;
|
2016-02-10 05:59:29 +01:00
|
|
|
|
|
|
|
private:
|
2019-07-01 10:33:29 +02:00
|
|
|
Q_DISABLE_ASSIGN(VEllipticalArcData)
|
2016-02-10 05:59:29 +01:00
|
|
|
};
|
|
|
|
|
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(),
|
2016-12-17 02:41:33 +01:00
|
|
|
rotationAngle(0),
|
2018-01-05 18:41:09 +01:00
|
|
|
formulaRotationAngle(),
|
|
|
|
m_transform()
|
2016-04-10 13:40:04 +02:00
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2016-04-10 16:40:55 +02:00
|
|
|
VEllipticalArcData::VEllipticalArcData(qreal radius1, qreal radius2, const QString &formulaRadius1,
|
2016-12-17 02:41:33 +01:00
|
|
|
const QString &formulaRadius2, qreal rotationAngle,
|
|
|
|
const QString &formulaRotationAngle)
|
2016-04-10 16:40:55 +02:00
|
|
|
: radius1(radius1),
|
2016-04-10 13:40:04 +02:00
|
|
|
radius2(radius2),
|
|
|
|
formulaRadius1(formulaRadius1),
|
|
|
|
formulaRadius2(formulaRadius2),
|
2016-12-17 02:41:33 +01:00
|
|
|
rotationAngle(rotationAngle),
|
2018-01-05 18:41:09 +01:00
|
|
|
formulaRotationAngle(formulaRotationAngle),
|
|
|
|
m_transform()
|
2016-04-10 13:40:04 +02:00
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
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),
|
2021-02-06 14:52:21 +01:00
|
|
|
formulaRadius1(QString().number(VAbstractValApplication::VApp()->fromPixel(radius1))),
|
|
|
|
formulaRadius2(QString().number(VAbstractValApplication::VApp()->fromPixel(radius2))),
|
2016-12-17 02:41:33 +01:00
|
|
|
rotationAngle(rotationAngle),
|
2021-02-06 14:52:21 +01:00
|
|
|
formulaRotationAngle(QString().number(VAbstractValApplication::VApp()->fromPixel(rotationAngle))),
|
2018-01-05 18:41:09 +01:00
|
|
|
m_transform()
|
2016-04-10 13:40:04 +02:00
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VEllipticalArcData::VEllipticalArcData(const VEllipticalArcData &arc)
|
|
|
|
: QSharedData(arc),
|
|
|
|
radius1(arc.radius1),
|
|
|
|
radius2(arc.radius2),
|
|
|
|
formulaRadius1(arc.formulaRadius1),
|
|
|
|
formulaRadius2(arc.formulaRadius2),
|
2016-12-17 02:41:33 +01:00
|
|
|
rotationAngle(arc.rotationAngle),
|
2018-01-05 18:41:09 +01:00
|
|
|
formulaRotationAngle(arc.formulaRotationAngle),
|
|
|
|
m_transform(arc.m_transform)
|
2016-04-10 13:40:04 +02:00
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2016-02-10 05:59:29 +01:00
|
|
|
VEllipticalArcData::~VEllipticalArcData()
|
|
|
|
{}
|
|
|
|
|
2016-08-06 20:42:40 +02:00
|
|
|
QT_WARNING_POP
|
2016-02-28 21:00:45 +01:00
|
|
|
|
2016-02-10 05:59:29 +01:00
|
|
|
#endif // VELLIPTICALARC_P
|
|
|
|
|