Added VEllipticalArcRadius.
--HG-- branch : feature
This commit is contained in:
parent
aa24976f9a
commit
9e3fd67eb6
80
src/libs/vpatterndb/variables/vellipticalarcradius.cpp
Normal file
80
src/libs/vpatterndb/variables/vellipticalarcradius.cpp
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
/************************************************************************
|
||||||
|
**
|
||||||
|
** @file vellipticalarcradius.cpp
|
||||||
|
** @author Valentina Zhuravska <zhuravska19(at)gmail.com>
|
||||||
|
** @date 16 12, 2016
|
||||||
|
**
|
||||||
|
** @brief
|
||||||
|
** @copyright
|
||||||
|
** This source code is part of the Valentine project, a pattern making
|
||||||
|
** program, whose allow create and modeling patterns of clothing.
|
||||||
|
** Copyright (C) 2016 Valentina project
|
||||||
|
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
||||||
|
**
|
||||||
|
** Valentina is free software: you can redistribute it and/or modify
|
||||||
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
** the Free Software Foundation, either version 3 of the License, or
|
||||||
|
** (at your option) any later version.
|
||||||
|
**
|
||||||
|
** Valentina is distributed in the hope that it will be useful,
|
||||||
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
** GNU General Public License for more details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU General Public License
|
||||||
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
**
|
||||||
|
*************************************************************************/
|
||||||
|
#include "vellipticalarcradius.h"
|
||||||
|
|
||||||
|
#include <QMessageLogger>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
#include "../ifc/ifcdef.h"
|
||||||
|
#include "../vgeometry/vellipticalarc.h"
|
||||||
|
#include "vcurvevariable.h"
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VEllipticalArcRadius::VEllipticalArcRadius()
|
||||||
|
:VCurveVariable()
|
||||||
|
{
|
||||||
|
SetType(VarType::ArcRadius);
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VEllipticalArcRadius::VEllipticalArcRadius(const quint32 &id, const quint32 &parentId, const VEllipticalArc *elArc,
|
||||||
|
const int numberRadius, Unit patternUnit) : VCurveVariable(id, parentId)
|
||||||
|
{
|
||||||
|
SCASSERT(elArc != nullptr);
|
||||||
|
|
||||||
|
SetType(VarType::ArcRadius);
|
||||||
|
SetName(QString(radius_V+"%1"+"%2").arg(numberRadius).arg(elArc->name()));
|
||||||
|
if (numberRadius == 1)
|
||||||
|
{
|
||||||
|
SetValue(FromPixel(elArc->GetRadius1(), patternUnit));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetValue(FromPixel(elArc->GetRadius2(), patternUnit));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VEllipticalArcRadius::VEllipticalArcRadius(const VEllipticalArcRadius &var)
|
||||||
|
:VCurveVariable(var)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VEllipticalArcRadius &VEllipticalArcRadius::operator=(const VEllipticalArcRadius &var)
|
||||||
|
{
|
||||||
|
if ( &var == this )
|
||||||
|
{
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
VCurveVariable::operator=(var);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VEllipticalArcRadius::~VEllipticalArcRadius()
|
||||||
|
{}
|
51
src/libs/vpatterndb/variables/vellipticalarcradius.h
Normal file
51
src/libs/vpatterndb/variables/vellipticalarcradius.h
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/************************************************************************
|
||||||
|
**
|
||||||
|
** @file vellipticalarcradius.h
|
||||||
|
** @author Valentina Zhuravska <zhuravska19(at)gmail.com>
|
||||||
|
** @date 16 12, 2016
|
||||||
|
**
|
||||||
|
** @brief
|
||||||
|
** @copyright
|
||||||
|
** This source code is part of the Valentine project, a pattern making
|
||||||
|
** program, whose allow create and modeling patterns of clothing.
|
||||||
|
** Copyright (C) 2016 Valentina project
|
||||||
|
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
||||||
|
**
|
||||||
|
** Valentina is free software: you can redistribute it and/or modify
|
||||||
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
** the Free Software Foundation, either version 3 of the License, or
|
||||||
|
** (at your option) any later version.
|
||||||
|
**
|
||||||
|
** Valentina is distributed in the hope that it will be useful,
|
||||||
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
** GNU General Public License for more details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU General Public License
|
||||||
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
**
|
||||||
|
*************************************************************************/
|
||||||
|
#ifndef VELLIPTICALARCRADIUS_H
|
||||||
|
#define VELLIPTICALARCRADIUS_H
|
||||||
|
|
||||||
|
#include <qcompilerdetection.h>
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#include "../vmisc/def.h"
|
||||||
|
#include "../ifc/ifcdef.h"
|
||||||
|
#include "vcurvevariable.h"
|
||||||
|
|
||||||
|
class VEllipticalArc;
|
||||||
|
|
||||||
|
class VEllipticalArcRadius :public VCurveVariable
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
VEllipticalArcRadius();
|
||||||
|
VEllipticalArcRadius(const quint32 &id, const quint32 &parentId, const VEllipticalArc *elArc,
|
||||||
|
const int numberRadius, Unit patternUnit);
|
||||||
|
VEllipticalArcRadius(const VEllipticalArcRadius &var);
|
||||||
|
VEllipticalArcRadius &operator=(const VEllipticalArcRadius &var);
|
||||||
|
virtual ~VEllipticalArcRadius() Q_DECL_OVERRIDE;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // VELLIPTICALARCRADIUS_H
|
|
@ -1,60 +1,62 @@
|
||||||
# ADD TO EACH PATH $$PWD VARIABLE!!!!!!
|
# ADD TO EACH PATH $$PWD VARIABLE!!!!!!
|
||||||
# This need for corect working file translations.pro
|
# This need for corect working file translations.pro
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/vcontainer.cpp \
|
$$PWD/vcontainer.cpp \
|
||||||
$$PWD/calculator.cpp \
|
$$PWD/calculator.cpp \
|
||||||
$$PWD/vdetail.cpp \
|
$$PWD/vdetail.cpp \
|
||||||
$$PWD/vnodedetail.cpp \
|
$$PWD/vnodedetail.cpp \
|
||||||
$$PWD/vtranslatevars.cpp \
|
$$PWD/vtranslatevars.cpp \
|
||||||
$$PWD/variables/varcradius.cpp \
|
$$PWD/variables/varcradius.cpp \
|
||||||
$$PWD/variables/vcurveangle.cpp \
|
$$PWD/variables/vcurveangle.cpp \
|
||||||
$$PWD/variables/vcurvelength.cpp \
|
$$PWD/variables/vcurvelength.cpp \
|
||||||
$$PWD/variables/vcurvevariable.cpp \
|
$$PWD/variables/vcurvevariable.cpp \
|
||||||
$$PWD/variables/vincrement.cpp \
|
$$PWD/variables/vincrement.cpp \
|
||||||
$$PWD/variables/vinternalvariable.cpp \
|
$$PWD/variables/vinternalvariable.cpp \
|
||||||
$$PWD/variables/vlineangle.cpp \
|
$$PWD/variables/vlineangle.cpp \
|
||||||
$$PWD/variables/vlinelength.cpp \
|
$$PWD/variables/vlinelength.cpp \
|
||||||
$$PWD/variables/vmeasurement.cpp \
|
$$PWD/variables/vmeasurement.cpp \
|
||||||
$$PWD/variables/vvariable.cpp \
|
$$PWD/variables/vvariable.cpp \
|
||||||
$$PWD/vformula.cpp \
|
$$PWD/vformula.cpp \
|
||||||
$$PWD/vpatternpiecedata.cpp \
|
$$PWD/vpatternpiecedata.cpp \
|
||||||
$$PWD/vpatterninfogeometry.cpp \
|
$$PWD/vpatterninfogeometry.cpp \
|
||||||
$$PWD/vgrainlinegeometry.cpp \
|
$$PWD/vgrainlinegeometry.cpp \
|
||||||
$$PWD/variables/vcurveclength.cpp
|
$$PWD/variables/vcurveclength.cpp \
|
||||||
|
$$PWD/variables/vellipticalarcradius.cpp
|
||||||
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
|
||||||
|
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
||||||
HEADERS += \
|
|
||||||
$$PWD/vcontainer.h \
|
HEADERS += \
|
||||||
$$PWD/stable.h \
|
$$PWD/vcontainer.h \
|
||||||
$$PWD/calculator.h \
|
$$PWD/stable.h \
|
||||||
$$PWD/variables.h \
|
$$PWD/calculator.h \
|
||||||
$$PWD/vdetail.h \
|
$$PWD/variables.h \
|
||||||
$$PWD/vdetail_p.h \
|
$$PWD/vdetail.h \
|
||||||
$$PWD/vnodedetail.h \
|
$$PWD/vdetail_p.h \
|
||||||
$$PWD/vnodedetail_p.h \
|
$$PWD/vnodedetail.h \
|
||||||
$$PWD/vtranslatevars.h \
|
$$PWD/vnodedetail_p.h \
|
||||||
$$PWD/variables/varcradius.h \
|
$$PWD/vtranslatevars.h \
|
||||||
$$PWD/variables/varcradius_p.h \
|
$$PWD/variables/varcradius.h \
|
||||||
$$PWD/variables/vcurveangle.h \
|
$$PWD/variables/varcradius_p.h \
|
||||||
$$PWD/variables/vcurvelength.h \
|
$$PWD/variables/vcurveangle.h \
|
||||||
$$PWD/variables/vcurvevariable.h \
|
$$PWD/variables/vcurvelength.h \
|
||||||
$$PWD/variables/vcurvevariable_p.h \
|
$$PWD/variables/vcurvevariable.h \
|
||||||
$$PWD/variables/vincrement.h \
|
$$PWD/variables/vcurvevariable_p.h \
|
||||||
$$PWD/variables/vincrement_p.h \
|
$$PWD/variables/vincrement.h \
|
||||||
$$PWD/variables/vinternalvariable.h \
|
$$PWD/variables/vincrement_p.h \
|
||||||
$$PWD/variables/vinternalvariable_p.h \
|
$$PWD/variables/vinternalvariable.h \
|
||||||
$$PWD/variables/vlineangle.h \
|
$$PWD/variables/vinternalvariable_p.h \
|
||||||
$$PWD/variables/vlineangle_p.h \
|
$$PWD/variables/vlineangle.h \
|
||||||
$$PWD/variables/vlinelength.h \
|
$$PWD/variables/vlineangle_p.h \
|
||||||
$$PWD/variables/vlinelength_p.h \
|
$$PWD/variables/vlinelength.h \
|
||||||
$$PWD/variables/vmeasurement.h \
|
$$PWD/variables/vlinelength_p.h \
|
||||||
$$PWD/variables/vmeasurement_p.h \
|
$$PWD/variables/vmeasurement.h \
|
||||||
$$PWD/variables/vvariable.h \
|
$$PWD/variables/vmeasurement_p.h \
|
||||||
$$PWD/variables/vvariable_p.h \
|
$$PWD/variables/vvariable.h \
|
||||||
$$PWD/vformula.h \
|
$$PWD/variables/vvariable_p.h \
|
||||||
$$PWD/vpatternpiecedata.h \
|
$$PWD/vformula.h \
|
||||||
$$PWD/vpatterninfogeometry.h \
|
$$PWD/vpatternpiecedata.h \
|
||||||
$$PWD/vgrainlinegeometry.h \
|
$$PWD/vpatterninfogeometry.h \
|
||||||
$$PWD/variables/vcurveclength.h
|
$$PWD/vgrainlinegeometry.h \
|
||||||
|
$$PWD/variables/vcurveclength.h \
|
||||||
|
$$PWD/variables/vellipticalarcradius.h
|
||||||
|
|
Loading…
Reference in New Issue
Block a user