Renamed classes to more correct names.

--HG--
branch : develop
This commit is contained in:
dismine 2014-08-15 20:27:30 +03:00
parent 2cfe392322
commit 62f573ec55
20 changed files with 124 additions and 124 deletions

View File

@ -5,11 +5,11 @@ SOURCES += \
container/vincrement.cpp \ container/vincrement.cpp \
container/vvariable.cpp \ container/vvariable.cpp \
container/vinternalvariable.cpp \ container/vinternalvariable.cpp \
container/vlengthline.cpp \
container/vlengthspline.cpp \
container/vlengtharc.cpp \
container/vlineangle.cpp \ container/vlineangle.cpp \
container/vlengthcurve.cpp container/varclength.cpp \
container/vcurvelength.cpp \
container/vlinelength.cpp \
container/vsplinelength.cpp
HEADERS += \ HEADERS += \
container/vcontainer.h \ container/vcontainer.h \
@ -18,9 +18,9 @@ HEADERS += \
container/vincrement.h \ container/vincrement.h \
container/vvariable.h \ container/vvariable.h \
container/vinternalvariable.h \ container/vinternalvariable.h \
container/vlengthline.h \
container/vlengthspline.h \
container/vlengtharc.h \
container/vlineangle.h \ container/vlineangle.h \
container/variables.h \ container/variables.h \
container/vlengthcurve.h container/vcurvelength.h \
container/varclength.h \
container/vlinelength.h \
container/vsplinelength.h

View File

@ -1,6 +1,6 @@
/************************************************************************ /************************************************************************
** **
** @file vlengtharc.cpp ** @file varclength.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 28 7, 2014 ** @date 28 7, 2014
** **
@ -26,40 +26,40 @@
** **
*************************************************************************/ *************************************************************************/
#include "vlengtharc.h" #include "varclength.h"
#include "../geometry/vabstractcurve.h" #include "../geometry/vabstractcurve.h"
#include "../widgets/vapplication.h" #include "../widgets/vapplication.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthArc::VLengthArc() VArcLength::VArcLength()
:VLengthCurve() :VCurveLength()
{ {
type = VarType::LengthArc; type = VarType::ArcLength;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthArc::VLengthArc(const quint32 &id, const quint32 &parentId, const VAbstractCurve *arc) VArcLength::VArcLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *arc)
:VLengthCurve(id, parentId, arc) :VCurveLength(id, parentId, arc)
{ {
type = VarType::LengthArc; type = VarType::ArcLength;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthArc::VLengthArc(const VLengthArc &var) VArcLength::VArcLength(const VArcLength &var)
:VLengthCurve(var) :VCurveLength(var)
{} {}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthArc &VLengthArc::operator=(const VLengthArc &var) VArcLength &VArcLength::operator=(const VArcLength &var)
{ {
if ( &var == this ) if ( &var == this )
{ {
return *this; return *this;
} }
VLengthCurve::operator=(var); VCurveLength::operator=(var);
return *this; return *this;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthArc::~VLengthArc() VArcLength::~VArcLength()
{} {}

View File

@ -1,6 +1,6 @@
/************************************************************************ /************************************************************************
** **
** @file vlengtharc.h ** @file varclength.h
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 28 7, 2014 ** @date 28 7, 2014
** **
@ -26,21 +26,21 @@
** **
*************************************************************************/ *************************************************************************/
#ifndef VLENGTHARC_H #ifndef VARCLENGTH_H
#define VLENGTHARC_H #define VARCLENGTH_H
#include "vlengthcurve.h" #include "vcurvelength.h"
class VAbstractCurve; class VAbstractCurve;
class VLengthArc :public VLengthCurve class VArcLength :public VCurveLength
{ {
public: public:
VLengthArc(); VArcLength();
VLengthArc(const quint32 &id, const quint32 &parentId, const VAbstractCurve *arc); VArcLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *arc);
VLengthArc(const VLengthArc &var); VArcLength(const VArcLength &var);
VLengthArc &operator=(const VLengthArc &var); VArcLength &operator=(const VArcLength &var);
virtual ~VLengthArc(); virtual ~VArcLength();
}; };
#endif // VLENGTHARC_H #endif // VARCLENGTH_H

View File

@ -32,9 +32,9 @@
#include "vinternalvariable.h" #include "vinternalvariable.h"
#include "vmeasurement.h" #include "vmeasurement.h"
#include "vincrement.h" #include "vincrement.h"
#include "vlengtharc.h" #include "varclength.h"
#include "vlengthline.h" #include "vsplinelength.h"
#include "vlengthspline.h" #include "vlinelength.h"
#include "vlineangle.h" #include "vlineangle.h"
#endif // VARIABLES_H #endif // VARIABLES_H

View File

@ -139,14 +139,14 @@ void VContainer::setData(const VContainer &data)
case (VarType::Increment): case (VarType::Increment):
CopyVar<VIncrement>(data, i.key()); CopyVar<VIncrement>(data, i.key());
break; break;
case (VarType::LengthLine): case (VarType::LineLength):
CopyVar<VLengthLine>(data, i.key()); CopyVar<VLengthLine>(data, i.key());
break; break;
case (VarType::LengthSpline): case (VarType::SplineLength):
CopyVar<VLengthSpline>(data, i.key()); CopyVar<VSplineLength>(data, i.key());
break; break;
case (VarType::LengthArc): case (VarType::ArcLength):
CopyVar<VLengthArc>(data, i.key()); CopyVar<VArcLength>(data, i.key());
break; break;
case (VarType::LineAngle): case (VarType::LineAngle):
CopyVar<VLineAngle>(data, i.key()); CopyVar<VLineAngle>(data, i.key());
@ -446,19 +446,19 @@ const QMap<QString, VIncrement *> VContainer::DataIncrements() const
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
const QMap<QString, VLengthLine *> VContainer::DataLengthLines() const const QMap<QString, VLengthLine *> VContainer::DataLengthLines() const
{ {
return DataVar<VLengthLine>(VarType::LengthLine); return DataVar<VLengthLine>(VarType::LineLength);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
const QMap<QString, VLengthSpline *> VContainer::DataLengthSplines() const const QMap<QString, VSplineLength *> VContainer::DataLengthSplines() const
{ {
return DataVar<VLengthSpline>(VarType::LengthSpline); return DataVar<VSplineLength>(VarType::SplineLength);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
const QMap<QString, VLengthArc *> VContainer::DataLengthArcs() const const QMap<QString, VArcLength *> VContainer::DataLengthArcs() const
{ {
return DataVar<VLengthArc>(VarType::LengthArc); return DataVar<VArcLength>(VarType::ArcLength);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -187,8 +187,8 @@ public:
const QMap<QString, VMeasurement *> DataMeasurements() const; const QMap<QString, VMeasurement *> DataMeasurements() const;
const QMap<QString, VIncrement *> DataIncrements() const; const QMap<QString, VIncrement *> DataIncrements() const;
const QMap<QString, VLengthLine *> DataLengthLines() const; const QMap<QString, VLengthLine *> DataLengthLines() const;
const QMap<QString, VLengthSpline *> DataLengthSplines() const; const QMap<QString, VSplineLength *> DataLengthSplines() const;
const QMap<QString, VLengthArc *> DataLengthArcs() const; const QMap<QString, VArcLength *> DataLengthArcs() const;
const QMap<QString, VLineAngle *> DataAngleLines() const; const QMap<QString, VLineAngle *> DataAngleLines() const;

View File

@ -1,6 +1,6 @@
/************************************************************************ /************************************************************************
** **
** @file vlengthcurve.cpp ** @file vcurvelength.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 15 8, 2014 ** @date 15 8, 2014
** **
@ -26,19 +26,19 @@
** **
*************************************************************************/ *************************************************************************/
#include "vlengthcurve.h" #include "vcurvelength.h"
#include "../widgets/vapplication.h" #include "../widgets/vapplication.h"
#include "../geometry/vabstractcurve.h" #include "../geometry/vabstractcurve.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthCurve::VLengthCurve() VCurveLength::VCurveLength()
:VInternalVariable(), id(0), parentId(0) :VInternalVariable(), id(0), parentId(0)
{ {
type = VarType::Unknown; type = VarType::Unknown;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthCurve::VLengthCurve(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve) VCurveLength::VCurveLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve)
:VInternalVariable(), id(id), parentId(parentId) :VInternalVariable(), id(id), parentId(parentId)
{ {
type = VarType::Unknown; type = VarType::Unknown;
@ -48,12 +48,12 @@ VLengthCurve::VLengthCurve(const quint32 &id, const quint32 &parentId, const VAb
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthCurve::VLengthCurve(const VLengthCurve &var) VCurveLength::VCurveLength(const VCurveLength &var)
:VInternalVariable(var), id(var.GetId()), parentId(var.GetParentId()) :VInternalVariable(var), id(var.GetId()), parentId(var.GetParentId())
{} {}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthCurve &VLengthCurve::operator=(const VLengthCurve &var) VCurveLength &VCurveLength::operator=(const VCurveLength &var)
{ {
if ( &var == this ) if ( &var == this )
{ {
@ -66,11 +66,11 @@ VLengthCurve &VLengthCurve::operator=(const VLengthCurve &var)
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthCurve::~VLengthCurve() VCurveLength::~VCurveLength()
{} {}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
bool VLengthCurve::Filter(quint32 id) bool VCurveLength::Filter(quint32 id)
{ {
if (parentId != 0)//Do not check if value zero if (parentId != 0)//Do not check if value zero
{// Not all curves have parents. Only those who was created after cutting the parent curve. {// Not all curves have parents. Only those who was created after cutting the parent curve.

View File

@ -1,6 +1,6 @@
/************************************************************************ /************************************************************************
** **
** @file vlengthcurve.h ** @file vcurvelength.h
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 15 8, 2014 ** @date 15 8, 2014
** **
@ -26,21 +26,21 @@
** **
*************************************************************************/ *************************************************************************/
#ifndef VLENGTHCURVE_H #ifndef VCURVELENGTH_H
#define VLENGTHCURVE_H #define VCURVELENGTH_H
#include "vinternalvariable.h" #include "vinternalvariable.h"
class VAbstractCurve; class VAbstractCurve;
class VLengthCurve : public VInternalVariable class VCurveLength : public VInternalVariable
{ {
public: public:
VLengthCurve(); VCurveLength();
VLengthCurve(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve); VCurveLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve);
VLengthCurve(const VLengthCurve &var); VCurveLength(const VCurveLength &var);
VLengthCurve &operator=(const VLengthCurve &var); VCurveLength &operator=(const VCurveLength &var);
virtual ~VLengthCurve(); virtual ~VCurveLength();
virtual bool Filter(quint32 id); virtual bool Filter(quint32 id);
quint32 GetId() const; quint32 GetId() const;
@ -51,15 +51,15 @@ protected:
}; };
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
inline quint32 VLengthCurve::GetId() const inline quint32 VCurveLength::GetId() const
{ {
return id; return id;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
inline quint32 VLengthCurve::GetParentId() const inline quint32 VCurveLength::GetParentId() const
{ {
return parentId; return parentId;
} }
#endif // VLENGTHCURVE_H #endif // VCURVELENGTH_H

View File

@ -31,7 +31,7 @@
#include <QString> #include <QString>
enum class VarType : char { Measurement, Increment, LengthLine, LengthSpline, LengthArc, LineAngle, Unknown }; enum class VarType : char { Measurement, Increment, LineLength, SplineLength, ArcLength, LineAngle, Unknown };
class VInternalVariable class VInternalVariable
{ {

View File

@ -1,6 +1,6 @@
/************************************************************************ /************************************************************************
** **
** @file vlengthline.cpp ** @file vlinelength.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 28 7, 2014 ** @date 28 7, 2014
** **
@ -26,7 +26,7 @@
** **
*************************************************************************/ *************************************************************************/
#include "vlengthline.h" #include "vlinelength.h"
#include "../geometry/vpointf.h" #include "../geometry/vpointf.h"
#include "../widgets/vapplication.h" #include "../widgets/vapplication.h"
@ -36,7 +36,7 @@
VLengthLine::VLengthLine() VLengthLine::VLengthLine()
:VInternalVariable(), p1Id(0), p2Id(0) :VInternalVariable(), p1Id(0), p2Id(0)
{ {
type = VarType::LengthLine; type = VarType::LineLength;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -46,7 +46,7 @@ VLengthLine::VLengthLine(const VPointF *p1, const quint32 &p1Id, const VPointF *
SCASSERT(p1 != nullptr); SCASSERT(p1 != nullptr);
SCASSERT(p2 != nullptr); SCASSERT(p2 != nullptr);
type = VarType::LengthLine; type = VarType::LineLength;
name = QString(line_+"%1_%2").arg(p1->name(), p2->name()); name = QString(line_+"%1_%2").arg(p1->name(), p2->name());
SetValue(p1, p2); SetValue(p1, p2);
} }

View File

@ -1,6 +1,6 @@
/************************************************************************ /************************************************************************
** **
** @file vlengthline.h ** @file vlinelength.h
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 28 7, 2014 ** @date 28 7, 2014
** **
@ -26,8 +26,8 @@
** **
*************************************************************************/ *************************************************************************/
#ifndef VLENGTHLINE_H #ifndef VLINELENGTH_H
#define VLENGTHLINE_H #define VLINELENGTH_H
#include "vinternalvariable.h" #include "vinternalvariable.h"
@ -63,4 +63,4 @@ inline quint32 VLengthLine::GetP2Id() const
return p2Id; return p2Id;
} }
#endif // VLENGTHLINE_H #endif // VLINELENGTH_H

View File

@ -1,6 +1,6 @@
/************************************************************************ /************************************************************************
** **
** @file vlengthsplines.cpp ** @file vsplinelength.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 28 7, 2014 ** @date 28 7, 2014
** **
@ -26,21 +26,21 @@
** **
*************************************************************************/ *************************************************************************/
#include "vlengthspline.h" #include "vsplinelength.h"
#include "../geometry/vabstractcurve.h" #include "../geometry/vabstractcurve.h"
#include "../widgets/vapplication.h" #include "../widgets/vapplication.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthSpline::VLengthSpline() VSplineLength::VSplineLength()
:VLengthCurve() :VCurveLength()
{ {
type = VarType::LengthSpline; type = VarType::SplineLength;
} }
VLengthSpline::VLengthSpline(const quint32 &id, const quint32 &parentId, const QString &name, const qreal &value) VSplineLength::VSplineLength(const quint32 &id, const quint32 &parentId, const QString &name, const qreal &value)
:VLengthCurve() :VCurveLength()
{ {
type = VarType::LengthSpline; type = VarType::SplineLength;
this->name = name; this->name = name;
this->value = value; this->value = value;
this->id = id; this->id = id;
@ -48,28 +48,28 @@ VLengthSpline::VLengthSpline(const quint32 &id, const quint32 &parentId, const Q
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthSpline::VLengthSpline(const quint32 &id, const quint32 &parentId, const VAbstractCurve *path) VSplineLength::VSplineLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *path)
:VLengthCurve(id, parentId, path) :VCurveLength(id, parentId, path)
{ {
type = VarType::LengthSpline; type = VarType::SplineLength;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthSpline::VLengthSpline(const VLengthSpline &var) VSplineLength::VSplineLength(const VSplineLength &var)
:VLengthCurve(var) :VCurveLength(var)
{} {}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthSpline &VLengthSpline::operator=(const VLengthSpline &var) VSplineLength &VSplineLength::operator=(const VSplineLength &var)
{ {
if ( &var == this ) if ( &var == this )
{ {
return *this; return *this;
} }
VLengthCurve::operator=(var); VCurveLength::operator=(var);
return *this; return *this;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthSpline::~VLengthSpline() VSplineLength::~VSplineLength()
{} {}

View File

@ -1,6 +1,6 @@
/************************************************************************ /************************************************************************
** **
** @file vlengthsplines.h ** @file vlengthspline.h
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 28 7, 2014 ** @date 28 7, 2014
** **
@ -26,22 +26,22 @@
** **
*************************************************************************/ *************************************************************************/
#ifndef VLENGTHSPLINES_H #ifndef VSPLINESLENGTH_H
#define VLENGTHSPLINES_H #define VSPLINESLENGTH_H
#include "vlengthcurve.h" #include "vcurvelength.h"
class VAbstractCurve; class VAbstractCurve;
class VLengthSpline :public VLengthCurve class VSplineLength :public VCurveLength
{ {
public: public:
VLengthSpline(); VSplineLength();
VLengthSpline(const quint32 &id, const quint32 &parentId, const QString &name, const qreal &value); VSplineLength(const quint32 &id, const quint32 &parentId, const QString &name, const qreal &value);
VLengthSpline(const quint32 &id, const quint32 &parentId, const VAbstractCurve *path); VSplineLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *path);
VLengthSpline(const VLengthSpline &var); VSplineLength(const VSplineLength &var);
VLengthSpline &operator=(const VLengthSpline &var); VSplineLength &operator=(const VSplineLength &var);
virtual ~VLengthSpline(); virtual ~VSplineLength();
}; };
#endif // VLENGTHSPLINES_H #endif // VSPLINELENGTH_H

View File

@ -1004,7 +1004,7 @@ void DialogTool::ValChenged(int row)
if (radioButtonLengthArc->isChecked()) if (radioButtonLengthArc->isChecked())
{ {
QString desc = QString("%1(%2) - %3").arg(item->text()) QString desc = QString("%1(%2) - %3").arg(item->text())
.arg(*data->GetVariable<VLengthArc *>(qApp->VarFromUser(item->text()))->GetValue()) .arg(*data->GetVariable<VArcLength *>(qApp->VarFromUser(item->text()))->GetValue())
.arg(tr("Arc length")); .arg(tr("Arc length"));
labelDescription->setText(desc); labelDescription->setText(desc);
return; return;
@ -1012,7 +1012,7 @@ void DialogTool::ValChenged(int row)
if (radioButtonLengthCurve->isChecked()) if (radioButtonLengthCurve->isChecked())
{ {
QString desc = QString("%1(%2) - %3").arg(item->text()) QString desc = QString("%1(%2) - %3").arg(item->text())
.arg(*data->GetVariable<VLengthSpline *>(qApp->VarFromUser(item->text()))->GetValue()) .arg(*data->GetVariable<VSplineLength *>(qApp->VarFromUser(item->text()))->GetValue())
.arg(tr("Curve length")); .arg(tr("Curve length"));
labelDescription->setText(desc); labelDescription->setText(desc);
return; return;

View File

@ -140,12 +140,12 @@ VToolArc* VToolArc::Create(const quint32 _id, const quint32 &center, QString &ra
if (typeCreation == Source::FromGui) if (typeCreation == Source::FromGui)
{ {
id = data->AddGObject(arc); id = data->AddGObject(arc);
data->AddCurveLength<VLengthArc>(id); data->AddCurveLength<VArcLength>(id);
} }
else else
{ {
data->UpdateGObject(id, arc); data->UpdateGObject(id, arc);
data->AddCurveLength<VLengthArc>(id); data->AddCurveLength<VArcLength>(id);
if (parse != Document::FullParse) if (parse != Document::FullParse)
{ {
doc->UpdateToolData(id, data); doc->UpdateToolData(id, data);

View File

@ -142,8 +142,8 @@ VToolCutArc* VToolCutArc::Create(const quint32 _id, const QString &pointName, QS
arc1id = data->AddGObject(new VArc(arc1)); arc1id = data->AddGObject(new VArc(arc1));
arc2id = data->AddGObject(new VArc(arc2)); arc2id = data->AddGObject(new VArc(arc2));
data->AddCurveLength<VLengthArc>(arc1id, id); data->AddCurveLength<VArcLength>(arc1id, id);
data->AddCurveLength<VLengthArc>(arc2id, id); data->AddCurveLength<VArcLength>(arc2id, id);
} }
else else
{ {
@ -155,8 +155,8 @@ VToolCutArc* VToolCutArc::Create(const quint32 _id, const QString &pointName, QS
data->UpdateGObject(arc1id, new VArc(arc1)); data->UpdateGObject(arc1id, new VArc(arc1));
data->UpdateGObject(arc2id, new VArc(arc2)); data->UpdateGObject(arc2id, new VArc(arc2));
data->AddCurveLength<VLengthArc>(arc1id, id); data->AddCurveLength<VArcLength>(arc1id, id);
data->AddCurveLength<VLengthArc>(arc2id, id); data->AddCurveLength<VArcLength>(arc2id, id);
if (parse != Document::FullParse) if (parse != Document::FullParse)
{ {

View File

@ -136,11 +136,11 @@ void VToolCutSpline::Create(const quint32 _id, const QString &pointName, QString
VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve()); VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve());
spl1id = data->AddGObject(spline1); spl1id = data->AddGObject(spline1);
data->AddCurveLength<VLengthSpline>(spl1id, id); data->AddCurveLength<VSplineLength>(spl1id, id);
VSpline *spline2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4(), spl->GetKcurve()); VSpline *spline2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4(), spl->GetKcurve());
spl2id = data->AddGObject(spline2); spl2id = data->AddGObject(spline2);
data->AddCurveLength<VLengthSpline>(spl2id, id); data->AddCurveLength<VSplineLength>(spl2id, id);
} }
else else
{ {
@ -152,11 +152,11 @@ void VToolCutSpline::Create(const quint32 _id, const QString &pointName, QString
VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve()); VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve());
data->UpdateGObject(spl1id, spline1); data->UpdateGObject(spl1id, spline1);
data->AddCurveLength<VLengthSpline>(spl1id, id); data->AddCurveLength<VSplineLength>(spl1id, id);
VSpline *spline2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4(), spl->GetKcurve()); VSpline *spline2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4(), spl->GetKcurve());
data->UpdateGObject(spl2id, spline2); data->UpdateGObject(spl2id, spline2);
data->AddCurveLength<VLengthSpline>(spl2id, id); data->AddCurveLength<VSplineLength>(spl2id, id);
if (parse != Document::FullParse) if (parse != Document::FullParse)
{ {

View File

@ -198,18 +198,18 @@ void VToolCutSplinePath::Create(const quint32 _id, const QString &pointName, QSt
if (typeCreation == Source::FromGui) if (typeCreation == Source::FromGui)
{ {
splPath1id = data->AddGObject(splPath1); splPath1id = data->AddGObject(splPath1);
data->AddCurveLength<VLengthSpline>(splPath1id, id); data->AddCurveLength<VSplineLength>(splPath1id, id);
splPath2id = data->AddGObject(splPath2); splPath2id = data->AddGObject(splPath2);
data->AddCurveLength<VLengthSpline>(splPath2id, id); data->AddCurveLength<VSplineLength>(splPath2id, id);
} }
else else
{ {
data->UpdateGObject(splPath1id, splPath1); data->UpdateGObject(splPath1id, splPath1);
data->AddCurveLength<VLengthSpline>(splPath1id, id); data->AddCurveLength<VSplineLength>(splPath1id, id);
data->UpdateGObject(splPath2id, splPath2); data->UpdateGObject(splPath2id, splPath2);
data->AddCurveLength<VLengthSpline>(splPath2id, id); data->AddCurveLength<VSplineLength>(splPath2id, id);
if (parse != Document::FullParse) if (parse != Document::FullParse)
{ {

View File

@ -154,12 +154,12 @@ void VToolSpline::Create(const quint32 _id, const quint32 &p1, const quint32 &p4
if (typeCreation == Source::FromGui) if (typeCreation == Source::FromGui)
{ {
id = data->AddGObject(spline); id = data->AddGObject(spline);
data->AddCurveLength<VLengthSpline>(id); data->AddCurveLength<VSplineLength>(id);
} }
else else
{ {
data->UpdateGObject(id, spline); data->UpdateGObject(id, spline);
data->AddCurveLength<VLengthSpline>(id); data->AddCurveLength<VSplineLength>(id);
if (parse != Document::FullParse) if (parse != Document::FullParse)
{ {
doc->UpdateToolData(id, data); doc->UpdateToolData(id, data);

View File

@ -136,12 +136,12 @@ void VToolSplinePath::Create(const quint32 _id, VSplinePath *path, VMainGraphics
if (typeCreation == Source::FromGui) if (typeCreation == Source::FromGui)
{ {
id = data->AddGObject(path); id = data->AddGObject(path);
data->AddCurveLength<VLengthSpline>(id); data->AddCurveLength<VSplineLength>(id);
} }
else else
{ {
data->UpdateGObject(id, path); data->UpdateGObject(id, path);
data->AddCurveLength<VLengthSpline>(id); data->AddCurveLength<VSplineLength>(id);
if (parse != Document::FullParse) if (parse != Document::FullParse)
{ {
doc->UpdateToolData(id, data); doc->UpdateToolData(id, data);