Seamly2D
Code documentation
VContainer Class Reference

The VContainer class container of all variables. More...

#include <vcontainer.h>

Collaboration diagram for VContainer:

Public Member Functions

 VContainer (const VTranslateVars *trVars, const Unit *patternUnit)
 VContainer create empty container. More...
 
 VContainer (const VContainer &data)
 VContainer create container from another container. More...
 
 ~VContainer ()
 
VContaineroperator= (const VContainer &data)
 operator = copy constructor More...
 
void Swap (VContainer &data) Q_DECL_NOTHROW
 
template<typename T >
const QSharedPointer< T > GeometricObject (const quint32 &id) const
 
const QSharedPointer< VGObjectGetGObject (quint32 id) const
 GetGObject returns a point by id. More...
 
VPiece GetPiece (quint32 id) const
 
VPiecePath GetPiecePath (quint32 id) const
 
template<typename T >
QSharedPointer< T > GetVariable (QString name) const
 GetVariable return varible by name. More...
 
quint32 AddGObject (VGObject *obj)
 AddGObject add new GObject to container. More...
 
quint32 AddPiece (const VPiece &piece)
 
quint32 AddPiecePath (const VPiecePath &path)
 
void AddLine (const quint32 &firstPointId, const quint32 &secondPointId)
 AddLine add line to container. More...
 
void AddArc (const QSharedPointer< VAbstractCurve > &arc, const quint32 &id, const quint32 &parentId=null_id)
 
void AddSpline (const QSharedPointer< VAbstractBezier > &curve, quint32 id, quint32 parentId=null_id)
 
void AddCurveWithSegments (const QSharedPointer< VAbstractCubicBezierPath > &curve, const quint32 &id, quint32 parentId=null_id)
 
template<typename T >
void AddVariable (const QString &name, T *var)
 
template<typename T >
void AddVariable (const QString &name, const QSharedPointer< T > &var)
 
void RemoveVariable (const QString &name)
 
void RemovePiece (quint32 id)
 
template<class T >
void UpdateGObject (quint32 id, T *obj)
 UpdateGObject update GObject by id. More...
 
template<class T >
void UpdateGObject (quint32 id, const QSharedPointer< T > &obj)
 
void UpdatePiece (quint32 id, const VPiece &piece)
 
void UpdatePiecePath (quint32 id, const VPiecePath &path)
 
void Clear ()
 Clear clear data in container. Id will be 0. More...
 
void ClearForFullParse ()
 
void ClearGObjects ()
 ClearObject points, splines, arcs, spline paths will be cleared. More...
 
void ClearCalculationGObjects ()
 
void ClearVariables (const VarType &type=VarType::Unknown)
 
void removeCustomVariable (const QString &name)
 removeCustomVariable remove increment by name from increment table More...
 
const QHash< quint32, QSharedPointer< VGObject > > * DataGObjects () const
 data container with datagObjects return container of gObjects More...
 
const QHash< quint32, VPiece > * DataPieces () const
 
const QHash< QString, QSharedPointer< VInternalVariable > > * DataVariables () const
 
const QMap< QString, QSharedPointer< VMeasurement > > DataMeasurements () const
 
const QMap< QString, QSharedPointer< VIncrement > > variablesData () const
 
const QMap< QString, QSharedPointer< VLengthLine > > lineLengthsData () const
 
const QMap< QString, QSharedPointer< VCurveLength > > curveLengthsData () const
 
const QMap< QString, QSharedPointer< VCurveCLength > > controlPointLengthsData () const
 
const QMap< QString, QSharedPointer< VLineAngle > > lineAnglesData () const
 
const QMap< QString, QSharedPointer< VArcRadius > > arcRadiusesData () const
 
const QMap< QString, QSharedPointer< VCurveAngle > > curveAnglesData () const
 
const UnitGetPatternUnit () const
 
const VTranslateVarsGetTrVars () const
 

Static Public Member Functions

static const QSharedPointer< VGObjectGetFakeGObject (quint32 id)
 
static quint32 getId ()
 
static quint32 getNextId ()
 getNextId generate next unique id More...
 
static void UpdateId (quint32 newId)
 UpdateId update id. If new id bigger when current save new like current. More...
 
static void ClearUniqueNames ()
 
static void ClearUniqueIncrementNames ()
 
static void SetSize (qreal size)
 SetSize set value of size. More...
 
static void SetHeight (qreal height)
 SetGrowth set value of growth. More...
 
static qreal size ()
 size return size More...
 
static qreal * rsize ()
 
static qreal height ()
 height return height More...
 
static qreal * rheight ()
 
static bool IsUnique (const QString &name)
 
static QStringList AllUniqueNames ()
 

Private Member Functions

void AddCurve (const QSharedPointer< VAbstractCurve > &curve, const quint32 &id, quint32 parentId=null_id)
 
template<class T >
uint qHash (const QSharedPointer< T > &p)
 
template<typename key , typename val >
const val GetObject (const QHash< key, val > &obj, key id) const
 GetObject return object from container. More...
 
template<typename T >
void UpdateObject (const quint32 &id, const QSharedPointer< T > &point)
 UpdateObject update object in container. More...
 
template<typename T >
const QMap< QString, QSharedPointer< T > > DataVar (const VarType &type) const
 

Static Private Member Functions

template<typename key , typename val >
static quint32 AddObject (QHash< key, val > &obj, val value)
 AddObject add object to container. More...
 

Private Attributes

QSharedDataPointer< VContainerDatad
 

Static Private Attributes

static quint32 _id = null_id
 _id current id. New object will have value +1. For empty class equal 0. More...
 
static qreal _size = 50
 
static qreal _height = 176
 
static QSet< QString > uniqueNames = QSet<QString>()
 

Detailed Description

The VContainer class container of all variables.

Definition at line 140 of file vcontainer.h.

Constructor & Destructor Documentation

◆ VContainer() [1/2]

VContainer::VContainer ( const VTranslateVars trVars,
const Unit patternUnit 
)

VContainer create empty container.

Definition at line 107 of file vcontainer.cpp.

◆ VContainer() [2/2]

VContainer::VContainer ( const VContainer data)

VContainer create container from another container.

Parameters
datacontainer

Definition at line 132 of file vcontainer.cpp.

◆ ~VContainer()

VContainer::~VContainer ( )

Definition at line 137 of file vcontainer.cpp.

References ClearGObjects(), and ClearVariables().

Member Function Documentation

◆ AddArc()

◆ AddCurve()

void VContainer::AddCurve ( const QSharedPointer< VAbstractCurve > &  curve,
const quint32 &  id,
quint32  parentId = null_id 
)
private

◆ AddCurveWithSegments()

◆ AddGObject()

quint32 VContainer::AddGObject ( VGObject obj)

◆ AddLine()

void VContainer::AddLine ( const quint32 &  firstPointId,
const quint32 &  secondPointId 
)

◆ AddObject()

template<typename key , typename val >
quint32 VContainer::AddObject ( QHash< key, val > &  obj,
val  value 
)
staticprivate

AddObject add object to container.

Parameters
objcontainer
valueobject
Returns
id of object in container

Definition at line 500 of file vcontainer.cpp.

References getNextId(), and SCASSERT.

Referenced by AddGObject().

◆ AddPiece()

quint32 VContainer::AddPiece ( const VPiece piece)

Definition at line 225 of file vcontainer.cpp.

References d, and getNextId().

Referenced by PatternPieceTool::Create().

◆ AddPiecePath()

quint32 VContainer::AddPiecePath ( const VPiecePath path)

◆ AddSpline()

◆ AddVariable() [1/2]

template<typename T >
void VContainer::AddVariable ( const QString &  name,
const QSharedPointer< T > &  var 
)

Definition at line 334 of file vcontainer.h.

References d, and uniqueNames.

◆ AddVariable() [2/2]

◆ AllUniqueNames()

◆ arcRadiusesData()

const QMap< QString, QSharedPointer< VArcRadius > > VContainer::arcRadiusesData ( ) const

Definition at line 573 of file vcontainer.cpp.

References ArcRadius.

Referenced by EditFormulaDialog::arcRadii(), and DialogVariables::fillArcsRadiuses().

◆ Clear()

void VContainer::Clear ( )

Clear clear data in container. Id will be 0.

Definition at line 281 of file vcontainer.cpp.

References _id, ClearGObjects(), ClearUniqueNames(), ClearVariables(), d, and NULL_ID.

Referenced by MainWindow::Clear().

◆ ClearCalculationGObjects()

void VContainer::ClearCalculationGObjects ( )

Definition at line 322 of file vcontainer.cpp.

References Calculation, and d.

Referenced by VPattern::parseDraftBlockElement().

◆ ClearForFullParse()

void VContainer::ClearForFullParse ( )

◆ ClearGObjects()

void VContainer::ClearGObjects ( )

ClearObject points, splines, arcs, spline paths will be cleared.

Definition at line 316 of file vcontainer.cpp.

References d.

Referenced by MainWindow::addDraftBlock(), Clear(), ClearForFullParse(), and ~VContainer().

◆ ClearUniqueIncrementNames()

void VContainer::ClearUniqueIncrementNames ( )
static

Definition at line 635 of file vcontainer.cpp.

References ClearUniqueNames(), and uniqueNames.

Referenced by VPattern::LiteParseIncrements().

◆ ClearUniqueNames()

void VContainer::ClearUniqueNames ( )
static

◆ ClearVariables()

◆ controlPointLengthsData()

const QMap< QString, QSharedPointer< VCurveCLength > > VContainer::controlPointLengthsData ( ) const

◆ curveAnglesData()

const QMap< QString, QSharedPointer< VCurveAngle > > VContainer::curveAnglesData ( ) const

Definition at line 579 of file vcontainer.cpp.

References CurveAngle.

Referenced by EditFormulaDialog::curveAngles(), and DialogVariables::fillCurveAngles().

◆ curveLengthsData()

const QMap< QString, QSharedPointer< VCurveLength > > VContainer::curveLengthsData ( ) const

Definition at line 555 of file vcontainer.cpp.

References CurveLength.

Referenced by EditFormulaDialog::curveLengths(), and DialogVariables::fillCurveLengths().

◆ DataGObjects()

const QHash< quint32, QSharedPointer< VGObject > > * VContainer::DataGObjects ( ) const

◆ DataMeasurements()

const QMap< QString, QSharedPointer< VMeasurement > > VContainer::DataMeasurements ( ) const

Definition at line 537 of file vcontainer.cpp.

References Measurement.

Referenced by EditFormulaDialog::measurements(), and TMainWindow::RefreshTable().

◆ DataPieces()

◆ DataVar()

template<typename T >
const QMap< QString, QSharedPointer< T > > VContainer::DataVar ( const VarType type) const
private

Definition at line 612 of file vcontainer.cpp.

References d.

◆ DataVariables()

◆ GeometricObject()

template<typename T >
const QSharedPointer< T > VContainer::GeometricObject ( const quint32 &  id) const

Definition at line 266 of file vcontainer.h.

References d, NULL_ID, and SCASSERT.

Referenced by QT_WARNING_POP::AddAnchorPoint(), QT_WARNING_POP::AddNodeArc(), QT_WARNING_POP::AddNodeElArc(), QT_WARNING_POP::AddNodePoint(), QT_WARNING_POP::AddNodeSpline(), QT_WARNING_POP::AddNodeSplinePath(), VNodePoint::AddToFile(), VToolOptionsPropertyBrowser::changeDataToolCubicBezier(), VToolOptionsPropertyBrowser::changeDataToolSpline(), DialogLineIntersect::CheckIntersecion(), DialogCubicBezierPath::ChosenObject(), DialogSplinePath::ChosenObject(), PatternPieceDialog::ChosenObject(), VAbstractOperation::complexCurveToolTip(), VAbstractOperation::complexPointToolTip(), VToolDoublePoint::complexToolTip(), VToolSpline::ControlPointChangePosition(), VToolSplinePath::ControlPointChangePosition(), VNodeDetail::Convert(), InsertNodesDialog::correctCurveDirection(), VToolLine::Create(), PointIntersectXYTool::Create(), VToolCurveIntersectAxis::Create(), VToolLineIntersectAxis::Create(), VToolEndLine::Create(), VToolHeight::Create(), VToolAlongLine::Create(), VToolPointOfIntersectionArcs::Create(), VToolCutSpline::Create(), VToolCutArc::Create(), VToolCutSplinePath::Create(), VToolPointFromArcAndTangent::Create(), VToolTriangle::Create(), IntersectCircleTangentTool::Create(), IntersectCirclesTool::Create(), VToolPointOfIntersectionCurves::Create(), VToolArc::Create(), VToolArcWithLength::Create(), VToolEllipticalArc::Create(), VToolRotation::Create(), VToolLineIntersect::Create(), VToolNormal::Create(), VToolBisector::Create(), VToolShoulderPoint::Create(), VToolPointOfContact::Create(), VToolMirrorByLine::Create(), VToolMirrorByAxis::Create(), VToolCubicBezier::Create(), VToolCubicBezierPath::Create(), VToolSpline::Create(), VToolSplinePath::Create(), VToolTrueDarts::Create(), VToolMove::Create(), AnchorPointTool::Create(), VAbstractMirror::createArc(), VToolRotation::createArc(), VToolMove::createArc(), VAbstractMirror::createCurve(), VToolRotation::createCurve(), VToolMove::createCurve(), VAbstractMirror::createCurveWithSegments(), VToolRotation::createCurveWithSegments(), VToolMove::createCurveWithSegments(), VAbstractMirror::createItem(), VToolRotation::createItem(), VToolMove::createItem(), VAbstractTool::CreateNode(), VisToolMove::createOriginObjects(), VAbstractMirror::createPoint(), VToolRotation::createPoint(), VToolMove::createPoint(), VisToolMove::createRotatedObjects(), DialogCubicBezierPath::currentPointChanged(), DialogSplinePath::currentPointChanged(), anonymous_namespace{vpiecepath.cpp}::CurveEndPoint(), anonymous_namespace{vpiecepath.cpp}::CurvePoint(), anonymous_namespace{vpiecepath.cpp}::CurveStartPoint(), DoubleLinePointTool::DoubleLinePointTool(), VPiecePath::EndSegment(), anonymous_namespace{vlayoutpiece.cpp}::FindGrainlineGeometry(), PatternPieceTool::FindGrainlineGeometry(), anonymous_namespace{vlayoutpiece.cpp}::FindLabelGeometry(), PatternPieceTool::FindLabelGeometry(), VToolCubicBezier::FirstPointName(), VToolCubicBezier::ForthPointName(), VToolArc::getArc(), VToolBasePoint::GetBasePointPos(), VToolArc::getCenter(), VToolArcWithLength::getCenter(), VToolEllipticalArc::getCenter(), VToolArc::GetFormulaF1(), VToolArcWithLength::GetFormulaF1(), VToolEllipticalArc::GetFormulaF1(), VToolArc::GetFormulaF2(), VToolEllipticalArc::GetFormulaF2(), VToolArcWithLength::GetFormulaLength(), VToolArc::GetFormulaRadius(), VToolArcWithLength::GetFormulaRadius(), VToolEllipticalArc::GetFormulaRadius1(), VToolEllipticalArc::GetFormulaRadius2(), VToolEllipticalArc::GetFormulaRotationAngle(), VAbstractSpline::getLineColor(), VAbstractSpline::getLineWeight(), VPiece::getNodeSAPoints(), DialogCubicBezier::GetP1(), DialogSpline::GetP1(), DialogCubicBezier::GetP2(), DialogCubicBezier::GetP3(), DialogCubicBezier::GetP4(), DialogSpline::GetP4(), VAbstractSpline::GetPenStyle(), GroupsWidget::getPointName(), HistoryDialog::getPointName(), VToolCubicBezier::getSpline(), VToolSpline::getSpline(), VToolCubicBezierPath::getSplinePath(), VToolSplinePath::getSplinePath(), VToolSplinePath::hoverEnterEvent(), VToolCurveIntersectAxis::InitArc(), VAbstractOperation::InitCurve(), VAbstractSpline::InitDefShape(), InsertNodesDialog::insertCurveNodes(), VToolSpline::IsMovable(), VToolSplinePath::IsMovable(), VAbstractOperation::isPointNameVisible(), VToolDoublePoint::isPointNameVisible(), VToolSinglePoint::isPointNameVisible(), GroupsWidget::itemDoubleClicked(), VAbstractSpline::makeToolTip(), VToolArc::makeToolTip(), VToolArcWithLength::makeToolTip(), VToolEllipticalArc::makeToolTip(), VToolCutArc::makeToolTip(), VToolCutSpline::makeToolTip(), VToolCutSplinePath::makeToolTip(), DoubleLinePointTool::makeToolTip(), VToolAlongLine::makeToolTip(), VToolHeight::makeToolTip(), VToolLineIntersectAxis::makeToolTip(), VToolLinePoint::makeToolTip(), VToolShoulderPoint::makeToolTip(), VToolBasePoint::makeToolTip(), VToolLineIntersect::makeToolTip(), VToolPointOfContact::makeToolTip(), VToolLine::makeToolTip(), VToolSpline::mouseMoveEvent(), VToolSplinePath::mouseMoveEvent(), VToolSplinePath::mousePressEvent(), VPiecePath::NodeNextPoint(), VPiecePath::NodePreviousPoint(), VDrawTool::ObjectName(), VAbstractSpline::paint(), VPattern::ParseNodeArc(), VPattern::ParseNodeEllipticalArc(), VPattern::ParseNodePoint(), VPattern::ParseNodeSpline(), VPattern::ParseNodeSplinePath(), VPattern::ParseOldToolSpline(), VPattern::ParseOldToolSplinePath(), VPattern::ParseToolCubicBezier(), VPattern::ParseToolCubicBezierPath(), VPattern::ParseToolSplinePath(), VPiecePath::PathNodePoints(), VPiecePath::PathPoints(), DialogArc::pointNameChanged(), DialogArcWithLength::pointNameChanged(), DialogEllipticalArc::pointNameChanged(), DialogHeight::PointNameChanged(), DialogLineIntersect::PointNameChanged(), VAbstractTool::PointsList(), QT_WARNING_POP::PointsOnEdge(), DialogTool::PrepareList(), VPiecePath::PreparePointEkv(), VToolSpline::refreshCtrlPoints(), VToolSplinePath::refreshCtrlPoints(), DoubleLinePointTool::RefreshGeometry(), VToolLinePoint::RefreshGeometry(), VToolLine::RefreshGeometry(), VToolCubicBezier::RefreshGeometry(), VToolCubicBezierPath::RefreshGeometry(), AnchorPointVisual::RefreshGeometry(), IntersectCirclesVisual::RefreshGeometry(), IntersectCircleTangentVisual::RefreshGeometry(), VisToolMirrorByAxis::RefreshGeometry(), VisToolMirrorByLine::RefreshGeometry(), VisToolMove::RefreshGeometry(), VisToolRotation::RefreshGeometry(), PointIntersectXYVisual::RefreshGeometry(), VisToolAlongLine::RefreshGeometry(), VisToolBisector::RefreshGeometry(), VisToolCurveIntersectAxis::RefreshGeometry(), VisToolEndLine::RefreshGeometry(), VisToolHeight::RefreshGeometry(), VisToolLine::RefreshGeometry(), VisToolLineIntersect::RefreshGeometry(), VisToolLineIntersectAxis::RefreshGeometry(), VisToolNormal::RefreshGeometry(), VisToolPointFromArcAndTangent::RefreshGeometry(), VisToolPointOfContact::RefreshGeometry(), VisToolPointOfIntersectionArcs::RefreshGeometry(), VisToolShoulderPoint::RefreshGeometry(), VisToolTriangle::RefreshGeometry(), VisToolTrueDarts::RefreshGeometry(), PieceAnchorPointVisual::RefreshGeometry(), VisToolArc::RefreshGeometry(), VisToolArcWithLength::RefreshGeometry(), VisToolCubicBezier::RefreshGeometry(), VisToolCutArc::RefreshGeometry(), VisToolCutSpline::RefreshGeometry(), VisToolCutSplinePath::RefreshGeometry(), VisToolEllipticalArc::RefreshGeometry(), VisToolPointOfIntersectionCurves::RefreshGeometry(), VisToolSpline::RefreshGeometry(), VisOperation::refreshMirroredObjects(), VToolArc::RemoveReferens(), VToolArcWithLength::RemoveReferens(), VToolCubicBezier::RemoveReferens(), VToolCubicBezierPath::RemoveReferens(), VToolEllipticalArc::RemoveReferens(), VToolSpline::RemoveReferens(), VToolSplinePath::RemoveReferens(), VToolDoublePoint::SaveOptions(), VPiece::SeamAllowancePoints(), VPiecePath::SeamAllowancePoints(), VToolCubicBezier::SecondPointName(), InsertNodesDialog::SelectedObject(), VToolBasePoint::SetBasePointPos(), VToolArc::setCenter(), VToolArcWithLength::setCenter(), VToolEllipticalArc::setCenter(), DialogAlongLine::SetCurrentLength(), VToolArc::setDialog(), VToolArcWithLength::setDialog(), VToolCubicBezier::setDialog(), VToolCubicBezierPath::setDialog(), VToolEllipticalArc::setDialog(), VToolSpline::setDialog(), VToolSplinePath::setDialog(), VToolTrueDarts::setDialog(), IntersectCirclesTool::setDialog(), IntersectCircleTangentTool::setDialog(), PointIntersectXYTool::setDialog(), VToolCutArc::setDialog(), VToolCutSpline::setDialog(), VToolCutSplinePath::setDialog(), VToolAlongLine::setDialog(), VToolBisector::setDialog(), VToolCurveIntersectAxis::setDialog(), VToolEndLine::setDialog(), VToolHeight::setDialog(), VToolLineIntersectAxis::setDialog(), VToolNormal::setDialog(), VToolShoulderPoint::setDialog(), VToolBasePoint::setDialog(), VToolLineIntersect::setDialog(), VToolPointFromArcAndTangent::setDialog(), VToolPointOfContact::setDialog(), VToolPointOfIntersectionArcs::setDialog(), VToolPointOfIntersectionCurves::setDialog(), VToolTriangle::setDialog(), VAbstractSpline::setLineColor(), VAbstractSpline::setLineWeight(), VAbstractSpline::SetPenStyle(), VAbstractOperation::setPointNamePosition(), VToolSinglePoint::setPointNamePosition(), VNodePoint::setPointNamePosition(), VAbstractOperation::setPointNameVisiblity(), VToolDoublePoint::setPointNameVisiblity(), VToolSinglePoint::setPointNameVisiblity(), VNodePoint::setPointNameVisiblity(), VToolArc::SetVisualization(), VToolArcWithLength::SetVisualization(), VToolCubicBezier::SetVisualization(), VToolCubicBezierPath::SetVisualization(), VToolEllipticalArc::SetVisualization(), VToolSpline::SetVisualization(), VToolSplinePath::SetVisualization(), VToolCutArc::SetVisualization(), VToolCutSpline::SetVisualization(), VToolCutSplinePath::SetVisualization(), VAbstractSpline::shape(), DialogCurveIntersectAxis::ShowDialog(), DialogEndLine::ShowDialog(), DialogLineIntersectAxis::ShowDialog(), DialogRotation::ShowDialog(), VPiecePath::StartSegment(), VToolCubicBezier::ThirdPointName(), VAbstractMirror::updateArc(), VToolRotation::updateArc(), VToolMove::updateArc(), VAbstractMirror::updateCurve(), VToolRotation::updateCurve(), VToolMove::updateCurve(), VAbstractMirror::updateCurveWithSegments(), VToolRotation::updateCurveWithSegments(), VToolMove::updateCurveWithSegments(), VAbstractMirror::updateItem(), VToolRotation::updateItem(), VToolMove::updateItem(), QT_WARNING_POP::UpdateNodeArc(), QT_WARNING_POP::UpdateNodeElArc(), QT_WARNING_POP::UpdateNodePoint(), QT_WARNING_POP::UpdateNodeSpline(), QT_WARNING_POP::UpdateNodeSplinePath(), VAbstractMirror::updatePoint(), VToolRotation::updatePoint(), VToolMove::updatePoint(), QT_WARNING_POP::updateUnionAnchors(), VToolLinePoint::VToolLinePoint(), VToolSpline::VToolSpline(), and VToolSplinePath::VToolSplinePath().

◆ GetFakeGObject()

◆ GetGObject()

const QSharedPointer< VGObject > VContainer::GetGObject ( quint32  id) const

GetGObject returns a point by id.

Parameters
idid of point
Returns
point

Definition at line 150 of file vcontainer.cpp.

References d, and GetObject().

Referenced by VDrawTool::addDependence(), VToolBasePoint::AddToFile(), VDrawTool::AddToFile(), VToolPointOfContact::ArcCenterPointName(), VToolPointFromArcAndTangent::ArcName(), VToolTriangle::AxisP1Name(), VToolTriangle::AxisP2Name(), VToolTrueDarts::BaseLineP1Name(), VToolTrueDarts::BaseLineP2Name(), VToolLinePoint::BasePointName(), VToolArc::CenterPointName(), VToolArcWithLength::CenterPointName(), VToolEllipticalArc::CenterPointName(), PatternPieceDialog::ChosenObject(), IntersectCircleTangentTool::CircleCenterPointName(), VDrawTool::ContextMenu(), InsertNodesDialog::correctCurveDirection(), VToolRotation::Create(), VToolMirrorByLine::Create(), VToolMirrorByAxis::Create(), VToolMove::Create(), VAbstractMirror::createDestination(), anonymous_namespace{vabstracttool.cpp}::CreateNodeSpline(), anonymous_namespace{vabstracttool.cpp}::CreateNodeSplinePath(), VisToolMove::createOriginObjects(), VisToolMove::createRotatedObjects(), VToolCut::CurveName(), VToolCurveIntersectAxis::CurveName(), VToolTrueDarts::DartP1Name(), VToolTrueDarts::DartP2Name(), VToolTrueDarts::DartP3Name(), VAbstractNode::decrementReferens(), VToolPointOfIntersectionArcs::FirstArcName(), IntersectCirclesTool::FirstCircleCenterPointName(), VToolPointOfIntersectionCurves::FirstCurveName(), VToolLineIntersectAxis::FirstLinePoint(), VToolMirrorByLine::firstLinePointName(), VToolHeight::FirstLinePointName(), PointIntersectXYTool::firstPointName(), VToolBisector::FirstPointName(), VToolPointOfContact::FirstPointName(), VToolTriangle::FirstPointName(), VToolLine::FirstPointName(), DialogTool::getNodeInfo(), VToolOptionsPropertyBrowser::getObjectList(), GroupsWidget::getObjName(), VToolMirrorByAxis::getOriginPointName(), VToolMove::getOriginPointName(), VToolRotation::getOriginPointName(), VNodePoint::hoverEnterEvent(), VAbstractNode::incrementReferens(), PatternPieceDialog::initAnchorPoint(), PatternPieceTool::initializeNode(), VAbstractOperation::InitOperatedObjects(), InsertNodesDialog::insertCurveNodes(), GroupsWidget::itemDoubleClicked(), VToolLineIntersect::Line1P1Name(), VToolLineIntersect::Line1P2Name(), VToolLineIntersect::Line2P1Name(), VToolLineIntersect::Line2P2Name(), PatternPieceDialog::newAnchorPoint(), VPattern::ParseNodeSpline(), VPattern::ParseNodeSplinePath(), DoubleLinePointTool::point1Name(), DoubleLinePointTool::point2Name(), VisToolRotation::RefreshGeometry(), VisOperation::refreshMirroredObjects(), VToolTrueDarts::RemoveReferens(), IntersectCirclesTool::RemoveReferens(), IntersectCircleTangentTool::RemoveReferens(), PointIntersectXYTool::RemoveReferens(), VToolCut::RemoveReferens(), DoubleLinePointTool::RemoveReferens(), VToolAlongLine::RemoveReferens(), VToolBisector::RemoveReferens(), VToolLinePoint::RemoveReferens(), VToolNormal::RemoveReferens(), VToolShoulderPoint::RemoveReferens(), VToolLineIntersect::RemoveReferens(), VToolPointFromArcAndTangent::RemoveReferens(), VToolPointOfContact::RemoveReferens(), VToolPointOfIntersectionArcs::RemoveReferens(), VToolPointOfIntersectionCurves::RemoveReferens(), VToolTriangle::RemoveReferens(), VToolLine::RemoveReferens(), VToolPointOfIntersectionArcs::SecondArcName(), IntersectCirclesTool::SecondCircleCenterPointName(), VToolPointOfIntersectionCurves::SecondCurveName(), VToolLineIntersectAxis::SecondLinePoint(), VToolMirrorByLine::secondLinePointName(), VToolHeight::SecondLinePointName(), PointIntersectXYTool::secondPointName(), VToolAlongLine::SecondPointName(), VToolNormal::SecondPointName(), VToolShoulderPoint::SecondPointName(), VToolPointOfContact::SecondPointName(), VToolTriangle::SecondPointName(), VToolLine::SecondPointName(), InsertNodesDialog::SelectedObject(), VToolLinePoint::SetAngle(), VToolArc::setArc(), VToolPointFromArcAndTangent::SetArcId(), VToolPointOfContact::setArcRadius(), VToolTriangle::SetAxisP1Id(), VToolTriangle::SetAxisP2Id(), VToolLinePoint::SetBasePointId(), VToolArc::setCenter(), VToolArcWithLength::setCenter(), VToolEllipticalArc::setCenter(), VToolPointOfContact::setCenter(), IntersectCircleTangentTool::SetCircleCenterId(), IntersectCircleTangentTool::SetCircleRadius(), IntersectCirclesTool::setCirclesCrossPoint(), IntersectCircleTangentTool::setCirclesCrossPoint(), VToolPointFromArcAndTangent::setCirclesCrossPoint(), VToolPointOfIntersectionArcs::setCirclesCrossPoint(), VToolCut::setCurveCutId(), VToolCurveIntersectAxis::setCurveId(), VToolPointOfIntersectionArcs::SetFirstArcId(), IntersectCirclesTool::SetFirstCircleCenterId(), IntersectCirclesTool::SetFirstCircleRadius(), VToolPointOfIntersectionCurves::SetFirstCurveId(), DoubleLinePointTool::setFirstPointId(), VToolBisector::SetFirstPointId(), VToolLineIntersectAxis::SetFirstPointId(), VToolPointOfContact::SetFirstPointId(), VToolTriangle::SetFirstPointId(), VToolCut::SetFormula(), VToolCurveIntersectAxis::SetFormulaAngle(), VToolEndLine::SetFormulaAngle(), VToolLineIntersectAxis::SetFormulaAngle(), VToolArc::SetFormulaF1(), VToolArcWithLength::SetFormulaF1(), VToolEllipticalArc::SetFormulaF1(), VToolArc::SetFormulaF2(), VToolEllipticalArc::SetFormulaF2(), VToolArcWithLength::SetFormulaLength(), VToolLinePoint::SetFormulaLength(), VToolArc::SetFormulaRadius(), VToolArcWithLength::SetFormulaRadius(), VToolEllipticalArc::SetFormulaRadius1(), VToolEllipticalArc::SetFormulaRadius2(), VToolEllipticalArc::SetFormulaRotationAngle(), VToolPointOfIntersectionCurves::SetHCrossPoint(), DoubleLinePointTool::setLineColor(), VToolLinePoint::setLineColor(), VDrawTool::setLineType(), VDrawTool::setLineWeight(), VToolLineIntersect::SetP1Line1(), VToolLineIntersect::SetP1Line2(), VToolHeight::SetP1LineId(), VToolShoulderPoint::SetP2Line(), VToolLineIntersect::SetP2Line1(), VToolLineIntersect::SetP2Line2(), VToolHeight::SetP2LineId(), VAbstractPoint::SetPointName(), VToolShoulderPoint::setPShoulder(), VToolPointOfIntersectionArcs::SetSecondArcId(), IntersectCirclesTool::SetSecondCircleCenterId(), IntersectCirclesTool::SetSecondCircleRadius(), VToolPointOfIntersectionCurves::SetSecondCurveId(), DoubleLinePointTool::setSecondPointId(), VToolAlongLine::SetSecondPointId(), VToolLineIntersectAxis::SetSecondPointId(), VToolNormal::SetSecondPointId(), VToolPointOfContact::SetSecondPointId(), VToolTriangle::SetSecondPointId(), VToolCubicBezier::setSpline(), VToolSpline::setSpline(), VToolCubicBezierPath::setSplinePath(), VToolSplinePath::setSplinePath(), IntersectCircleTangentTool::SetTangentPointId(), VToolPointFromArcAndTangent::SetTangentPointId(), VToolBisector::SetThirdPointId(), VToolPointOfIntersectionCurves::SetVCrossPoint(), VToolShoulderPoint::ShoulderPointName(), IntersectCircleTangentTool::TangentPointName(), VToolPointFromArcAndTangent::TangentPointName(), and VToolBisector::ThirdPointName().

◆ getId()

quint32 VContainer::getId ( )
static

◆ getNextId()

◆ GetObject()

template<typename key , typename val >
const val VContainer::GetObject ( const QHash< key, val > &  obj,
key  id 
) const
private

GetObject return object from container.

Parameters
objcontainer
idid of object
Returns
Object

Definition at line 172 of file vcontainer.cpp.

Referenced by GetGObject().

◆ GetPatternUnit()

◆ GetPiece()

VPiece VContainer::GetPiece ( quint32  id) const

Definition at line 185 of file vcontainer.cpp.

References d.

Referenced by AnchorPointTool::AddToFile(), VToolInternalPath::AddToFile(), PatternPieceTool::AddToFile(), UnionTool::AddToFile(), UnionDialog::CheckObject(), UnionDialog::checkPiece(), UnionDialog::chosenPiece(), PatternPieceTool::contextMenuEvent(), QT_WARNING_POP::createUnion(), PatternPieceTool::EnableToolMove(), DialogTool::FillComboBoxPiecesList(), PatternPieceTool::insertNodes(), PatternPieceTool::itemChange(), PatternPieceTool::keyReleaseEvent(), PieceTableWidgetItem::operator<(), PatternPieceTool::paint(), PatternPieceTool::PatternPieceTool(), PatternPieceTool::pieceLockedChanged(), PatternPieceTool::RefreshDataInFile(), PatternPieceTool::RefreshGeometry(), PatternPieceTool::renamePiece(), PatternPieceTool::ResetChildren(), PatternPieceTool::SaveDialogChange(), PatternPieceTool::SaveMoveGrainline(), PatternPieceTool::SaveMovePattern(), PatternPieceTool::saveMovePiece(), PatternPieceTool::savePieceRotation(), PatternPieceTool::SaveResizeGrainline(), PatternPieceTool::SaveResizePattern(), PatternPieceTool::saveResizePiece(), PatternPieceTool::SaveRotateGrainline(), PatternPieceTool::SaveRotationPattern(), AnchorPointDialog::SetPieceId(), DialogInternalPath::SetPieceId(), PatternPieceTool::toggleFlipping(), PatternPieceTool::toggleGrainline(), PatternPieceTool::togglePatternLabel(), PatternPieceTool::togglePieceLabel(), PatternPieceTool::toggleSeamAllowance(), PatternPieceTool::toggleSeamLine(), QT_WARNING_POP::unitePieces(), PatternPieceTool::UpdateExcludeState(), PatternPieceTool::UpdateGrainline(), PatternPieceTool::UpdatePatternLabel(), and PatternPieceTool::UpdatePieceLabel().

◆ GetPiecePath()

◆ GetTrVars()

const VTranslateVars * VContainer::GetTrVars ( ) const

Definition at line 605 of file vcontainer.cpp.

References d.

Referenced by VMeasurements::ReadMeasurements().

◆ GetVariable()

template<typename T >
QSharedPointer< T > VContainer::GetVariable ( QString  name) const

◆ height()

◆ IsUnique()

◆ lineAnglesData()

const QMap< QString, QSharedPointer< VLineAngle > > VContainer::lineAnglesData ( ) const

Definition at line 567 of file vcontainer.cpp.

References LineAngle.

Referenced by DialogVariables::fillLineAngles(), and EditFormulaDialog::lineAngles().

◆ lineLengthsData()

const QMap< QString, QSharedPointer< VLengthLine > > VContainer::lineLengthsData ( ) const

Definition at line 549 of file vcontainer.cpp.

References LineLength.

Referenced by DialogVariables::fillLineLengths(), and EditFormulaDialog::lineLengths().

◆ operator=()

VContainer & VContainer::operator= ( const VContainer data)

operator = copy constructor

Parameters
datacontainer
Returns
copy container

Definition at line 117 of file vcontainer.cpp.

References d.

◆ qHash()

template<class T >
uint VContainer::qHash ( const QSharedPointer< T > &  p)
private

Definition at line 362 of file vcontainer.h.

◆ removeCustomVariable()

void VContainer::removeCustomVariable ( const QString &  name)

removeCustomVariable remove increment by name from increment table

Parameters
namename of existing increment

Definition at line 530 of file vcontainer.cpp.

References d.

◆ RemovePiece()

void VContainer::RemovePiece ( quint32  id)

Definition at line 487 of file vcontainer.cpp.

References d.

Referenced by QT_WARNING_POP::createUnion().

◆ RemoveVariable()

void VContainer::RemoveVariable ( const QString &  name)

Definition at line 481 of file vcontainer.cpp.

References d.

Referenced by VToolAlongLine::Create(), PatternPieceTool::Create(), and VPattern::setCurrentData().

◆ rheight()

qreal * VContainer::rheight ( )
static

◆ rsize()

qreal * VContainer::rsize ( )
static

◆ SetHeight()

void VContainer::SetHeight ( qreal  height)
static

SetGrowth set value of growth.

Parameters
heightvalue of height

Definition at line 664 of file vcontainer.cpp.

References _height, and height().

Referenced by MainWindow::LoadMeasurements(), MainWindow::SetDefaultHeight(), MainWindowsNoGUI::SetSizeHeightForIndividualM(), and MainWindow::UpdateMeasurements().

◆ SetSize()

void VContainer::SetSize ( qreal  size)
static

SetSize set value of size.

Parameters
sizevalue of size

Definition at line 654 of file vcontainer.cpp.

References _size, and size().

Referenced by MainWindow::LoadMeasurements(), MainWindow::SetDefaultSize(), MainWindowsNoGUI::SetSizeHeightForIndividualM(), and MainWindow::UpdateMeasurements().

◆ size()

◆ Swap()

void VContainer::Swap ( VContainer data)

Definition at line 100 of file vcontainer.cpp.

◆ UpdateGObject() [1/2]

template<class T >
void VContainer::UpdateGObject ( quint32  id,
const QSharedPointer< T > &  obj 
)

Definition at line 382 of file vcontainer.h.

References SCASSERT, uniqueNames, and UpdateObject().

◆ UpdateGObject() [2/2]

template<class T >
void VContainer::UpdateGObject ( quint32  id,
T *  obj 
)

UpdateGObject update GObject by id.

Parameters
idid of existing GObject
objobject

Definition at line 374 of file vcontainer.h.

References SCASSERT.

Referenced by PointIntersectXYTool::Create(), VToolCurveIntersectAxis::Create(), VToolLineIntersectAxis::Create(), VToolEndLine::Create(), VToolHeight::Create(), VToolAlongLine::Create(), VToolPointOfIntersectionArcs::Create(), VToolCutSpline::Create(), VToolCutArc::Create(), VToolCutSplinePath::Create(), VToolPointFromArcAndTangent::Create(), VToolTriangle::Create(), IntersectCircleTangentTool::Create(), IntersectCirclesTool::Create(), VToolPointOfIntersectionCurves::Create(), VToolArc::Create(), VToolArcWithLength::Create(), VToolEllipticalArc::Create(), VToolLineIntersect::Create(), VToolNormal::Create(), VToolBisector::Create(), VToolShoulderPoint::Create(), VToolPointOfContact::Create(), VToolCubicBezier::Create(), VToolCubicBezierPath::Create(), VToolSpline::Create(), VToolSplinePath::Create(), VToolBasePoint::Create(), VToolTrueDarts::Create(), AnchorPointTool::Create(), VPattern::ParseNodeArc(), VPattern::ParseNodeEllipticalArc(), VPattern::ParseNodePoint(), VPattern::ParseNodeSpline(), VPattern::ParseNodeSplinePath(), VAbstractMirror::updateItem(), VToolRotation::updateItem(), VToolMove::updateItem(), QT_WARNING_POP::UpdateNodeArc(), QT_WARNING_POP::UpdateNodeElArc(), QT_WARNING_POP::UpdateNodePoint(), QT_WARNING_POP::UpdateNodeSpline(), QT_WARNING_POP::UpdateNodeSplinePath(), VAbstractMirror::updatePoint(), VToolRotation::updatePoint(), VToolMove::updatePoint(), and QT_WARNING_POP::updateUnionAnchors().

◆ UpdateId()

void VContainer::UpdateId ( quint32  newId)
static

UpdateId update id. If new id bigger when current save new like current.

Parameters
newIdid

Definition at line 269 of file vcontainer.cpp.

References _id.

Referenced by VToolLine::Create(), AnchorPointTool::Create(), VAbstractPattern::parseGroups(), UpdateObject(), UpdatePiece(), and UpdatePiecePath().

◆ UpdateObject()

template<typename T >
void VContainer::UpdateObject ( const quint32 &  id,
const QSharedPointer< T > &  point 
)
private

UpdateObject update object in container.

Parameters
idid of existing object
pointobject

Definition at line 396 of file vcontainer.h.

References d, NULL_ID, SCASSERT, and UpdateId().

Referenced by UpdateGObject().

◆ UpdatePiece()

◆ UpdatePiecePath()

void VContainer::UpdatePiecePath ( quint32  id,
const VPiecePath path 
)

◆ variablesData()

const QMap< QString, QSharedPointer< VIncrement > > VContainer::variablesData ( ) const

Member Data Documentation

◆ _height

qreal VContainer::_height = 176
staticprivate

Definition at line 234 of file vcontainer.h.

Referenced by height(), rheight(), and SetHeight().

◆ _id

QT_WARNING_PUSH QT_WARNING_POP quint32 VContainer::_id = null_id
staticprivate

_id current id. New object will have value +1. For empty class equal 0.

Definition at line 232 of file vcontainer.h.

Referenced by Clear(), ClearForFullParse(), getId(), getNextId(), and UpdateId().

◆ _size

qreal VContainer::_size = 50
staticprivate

Definition at line 233 of file vcontainer.h.

Referenced by rsize(), SetSize(), and size().

◆ d

◆ uniqueNames

QSet< QString > VContainer::uniqueNames = QSet<QString>()
staticprivate

The documentation for this class was generated from the following files: