Fixed merge conflicts

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2016-02-27 16:53:17 +02:00
parent 39b404673d
commit 3d628d815b
4 changed files with 29 additions and 15 deletions

View File

@ -58,7 +58,7 @@ VEllipticalArc::VEllipticalArc (VPointF center, qreal radius1, qreal radius2,
d (new VEllipticalArcData(center, radius1, radius2, formulaRadius1, formulaRadius2,
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),
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,
f1, formulaF1, rotationAngle))
{
EllipticalArcName();
CreateName();
FindF2(length);
}
@ -87,7 +87,7 @@ VEllipticalArc::VEllipticalArc(qreal length, VPointF center, qreal radius1, qrea
: VAbstractCurve(GOType::EllipticalArc, NULL_ID, Draw::Calculation),
d (new VEllipticalArcData(center, radius1, radius2, f1, rotationAngle))
{
EllipticalArcName();
CreateName();
FindF2(length);
}
@ -372,13 +372,25 @@ QPointF VEllipticalArc::CutArc(const qreal &length) const
void VEllipticalArc::setId(const quint32 &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);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -92,10 +92,10 @@ public:
QPointF CutArc (const qreal &length, VEllipticalArc &arc1, VEllipticalArc &arc2) const;
QPointF CutArc (const qreal &length) const;
virtual void setId(const quint32 &id) Q_DECL_OVERRIDE;
protected:
virtual void CreateName() Q_DECL_OVERRIDE;
private:
QSharedDataPointer<VEllipticalArcData> d;
void EllipticalArcName();
void FindF2(qreal length);
qreal MaxLength() const;

View File

@ -30,5 +30,5 @@ HEADERS += \
$$PWD/vsplinepoint_p.h \
$$PWD/vgeometrydef.h \
$$PWD/vellipticalarc.h \
$$PWD/vellipticalarc_p.h
$$PWD/vabstractcurve_p.h
$$PWD/vellipticalarc_p.h \
$$PWD/vabstractcurve_p.h

View File

@ -54,7 +54,8 @@ SOURCES += \
tst_vcommandline.cpp \
tst_tstranslation.cpp \
tst_vdetail.cpp \
tst_findpoint.cpp
tst_findpoint.cpp \
tst_vellipticalarc.cpp
HEADERS += \
tst_vposter.h \
@ -76,7 +77,8 @@ HEADERS += \
tst_vcommandline.h \
tst_tstranslation.h \
tst_vdetail.h \
tst_findpoint.h
tst_findpoint.h \
tst_vellipticalarc.h
# Set using ccache. Function enable_ccache() defined in common.pri.
$$enable_ccache()