Fixed merge conflicts
--HG-- branch : feature
This commit is contained in:
parent
39b404673d
commit
3d628d815b
|
@ -58,7 +58,7 @@ VEllipticalArc::VEllipticalArc (VPointF center, qreal radius1, qreal radius2,
|
||||||
d (new VEllipticalArcData(center, radius1, radius2, formulaRadius1, formulaRadius2,
|
d (new VEllipticalArcData(center, radius1, radius2, formulaRadius1, formulaRadius2,
|
||||||
f1, formulaF1, f2, formulaF2, rotationAngle))
|
f1, formulaF1, f2, formulaF2, rotationAngle))
|
||||||
{
|
{
|
||||||
EllipticalArcName();
|
CreateName();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -66,7 +66,7 @@ VEllipticalArc::VEllipticalArc(VPointF center, qreal radius1, qreal radius2, qre
|
||||||
: VAbstractCurve(GOType::EllipticalArc, NULL_ID, Draw::Calculation),
|
: VAbstractCurve(GOType::EllipticalArc, NULL_ID, Draw::Calculation),
|
||||||
d (new VEllipticalArcData(center, radius1, radius2, f1, f2, rotationAngle))
|
d (new VEllipticalArcData(center, radius1, radius2, f1, f2, rotationAngle))
|
||||||
{
|
{
|
||||||
EllipticalArcName();
|
CreateName();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -77,7 +77,7 @@ VEllipticalArc::VEllipticalArc(qreal length, QString formulaLength, VPointF cent
|
||||||
d (new VEllipticalArcData(formulaLength, center, radius1, radius2, formulaRadius1, formulaRadius2,
|
d (new VEllipticalArcData(formulaLength, center, radius1, radius2, formulaRadius1, formulaRadius2,
|
||||||
f1, formulaF1, rotationAngle))
|
f1, formulaF1, rotationAngle))
|
||||||
{
|
{
|
||||||
EllipticalArcName();
|
CreateName();
|
||||||
FindF2(length);
|
FindF2(length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ VEllipticalArc::VEllipticalArc(qreal length, VPointF center, qreal radius1, qrea
|
||||||
: VAbstractCurve(GOType::EllipticalArc, NULL_ID, Draw::Calculation),
|
: VAbstractCurve(GOType::EllipticalArc, NULL_ID, Draw::Calculation),
|
||||||
d (new VEllipticalArcData(center, radius1, radius2, f1, rotationAngle))
|
d (new VEllipticalArcData(center, radius1, radius2, f1, rotationAngle))
|
||||||
{
|
{
|
||||||
EllipticalArcName();
|
CreateName();
|
||||||
FindF2(length);
|
FindF2(length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,13 +372,25 @@ QPointF VEllipticalArc::CutArc(const qreal &length) const
|
||||||
void VEllipticalArc::setId(const quint32 &id)
|
void VEllipticalArc::setId(const quint32 &id)
|
||||||
{
|
{
|
||||||
VAbstractCurve::setId(id);
|
VAbstractCurve::setId(id);
|
||||||
setName(EARC_ + QString("%1_%2").arg(d->center.name()).arg(id));
|
CreateName();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VEllipticalArc::EllipticalArcName()
|
void VEllipticalArc::CreateName()
|
||||||
{
|
{
|
||||||
setName(EARC_ + QString("%1").arg(this->GetCenter().name()));
|
QString name = EARC_ + QString("%1").arg(this->GetCenter().name());
|
||||||
|
|
||||||
|
if (VAbstractCurve::id() != NULL_ID)
|
||||||
|
{
|
||||||
|
name += QString("_%1").arg(VAbstractCurve::id());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetDuplicate() > 0)
|
||||||
|
{
|
||||||
|
name += QString("_%1").arg(GetDuplicate());
|
||||||
|
}
|
||||||
|
|
||||||
|
setName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -92,10 +92,10 @@ public:
|
||||||
QPointF CutArc (const qreal &length, VEllipticalArc &arc1, VEllipticalArc &arc2) const;
|
QPointF CutArc (const qreal &length, VEllipticalArc &arc1, VEllipticalArc &arc2) const;
|
||||||
QPointF CutArc (const qreal &length) const;
|
QPointF CutArc (const qreal &length) const;
|
||||||
virtual void setId(const quint32 &id) Q_DECL_OVERRIDE;
|
virtual void setId(const quint32 &id) Q_DECL_OVERRIDE;
|
||||||
|
protected:
|
||||||
|
virtual void CreateName() Q_DECL_OVERRIDE;
|
||||||
private:
|
private:
|
||||||
QSharedDataPointer<VEllipticalArcData> d;
|
QSharedDataPointer<VEllipticalArcData> d;
|
||||||
|
|
||||||
void EllipticalArcName();
|
|
||||||
void FindF2(qreal length);
|
void FindF2(qreal length);
|
||||||
|
|
||||||
qreal MaxLength() const;
|
qreal MaxLength() const;
|
||||||
|
|
|
@ -8,7 +8,7 @@ SOURCES += \
|
||||||
$$PWD/vpointf.cpp \
|
$$PWD/vpointf.cpp \
|
||||||
$$PWD/vspline.cpp \
|
$$PWD/vspline.cpp \
|
||||||
$$PWD/vsplinepath.cpp \
|
$$PWD/vsplinepath.cpp \
|
||||||
$$PWD/vsplinepoint.cpp \
|
$$PWD/vsplinepoint.cpp \
|
||||||
$$PWD/vellipticalarc.cpp
|
$$PWD/vellipticalarc.cpp
|
||||||
|
|
||||||
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
||||||
|
@ -29,6 +29,6 @@ HEADERS += \
|
||||||
$$PWD/vsplinepoint.h \
|
$$PWD/vsplinepoint.h \
|
||||||
$$PWD/vsplinepoint_p.h \
|
$$PWD/vsplinepoint_p.h \
|
||||||
$$PWD/vgeometrydef.h \
|
$$PWD/vgeometrydef.h \
|
||||||
$$PWD/vellipticalarc.h \
|
$$PWD/vellipticalarc.h \
|
||||||
$$PWD/vellipticalarc_p.h
|
$$PWD/vellipticalarc_p.h \
|
||||||
$$PWD/vabstractcurve_p.h
|
$$PWD/vabstractcurve_p.h
|
||||||
|
|
|
@ -54,7 +54,8 @@ SOURCES += \
|
||||||
tst_vcommandline.cpp \
|
tst_vcommandline.cpp \
|
||||||
tst_tstranslation.cpp \
|
tst_tstranslation.cpp \
|
||||||
tst_vdetail.cpp \
|
tst_vdetail.cpp \
|
||||||
tst_findpoint.cpp
|
tst_findpoint.cpp \
|
||||||
|
tst_vellipticalarc.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
tst_vposter.h \
|
tst_vposter.h \
|
||||||
|
@ -76,7 +77,8 @@ HEADERS += \
|
||||||
tst_vcommandline.h \
|
tst_vcommandline.h \
|
||||||
tst_tstranslation.h \
|
tst_tstranslation.h \
|
||||||
tst_vdetail.h \
|
tst_vdetail.h \
|
||||||
tst_findpoint.h
|
tst_findpoint.h \
|
||||||
|
tst_vellipticalarc.h
|
||||||
|
|
||||||
# Set using ccache. Function enable_ccache() defined in common.pri.
|
# Set using ccache. Function enable_ccache() defined in common.pri.
|
||||||
$$enable_ccache()
|
$$enable_ccache()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user