Seamly2D
Code documentation
VPiecePath Class Reference

#include <vpiecepath.h>

Collaboration diagram for VPiecePath:

Public Member Functions

 VPiecePath ()
 
 VPiecePath (PiecePathType type)
 
 VPiecePath (const VPiecePath &path)
 
 ~VPiecePath ()
 
VPiecePathoperator= (const VPiecePath &path)
 
void Swap (VPiecePath &path) Q_DECL_NOTHROW
 
void Append (const VPieceNode &node)
 
void Clear ()
 
qint32 CountNodes () const
 
VPieceNodeoperator[] (int indx)
 
const VPieceNodeat (int indx) const
 
QVector< VPieceNodeGetNodes () const
 
void SetNodes (const QVector< VPieceNode > &nodes)
 
PiecePathType GetType () const
 
void SetType (PiecePathType type)
 
QString GetName () const
 
void SetName (const QString &name)
 
Qt::PenStyle GetPenType () const
 
void SetPenType (const Qt::PenStyle &type)
 
bool IsCutPath () const
 
void SetCutPath (bool cut)
 
QVector< QPointF > PathPoints (const VContainer *data) const
 
QVector< VPointFPathNodePoints (const VContainer *data, bool showExcluded=true) const
 
QVector< VSAPointSeamAllowancePoints (const VContainer *data, qreal width, bool reverse) const
 
QPainterPath PainterPath (const VContainer *data) const
 
QVector< quint32 > MissingNodes (const VPiecePath &path) const
 
int indexOfNode (quint32 id) const
 
void NodeOnEdge (quint32 index, VPieceNode &p1, VPieceNode &p2) const
 NodeOnEdge return nodes located on edge with index. More...
 
bool Contains (quint32 id) const
 
bool OnEdge (quint32 p1, quint32 p2) const
 OnEdge checks if two poins located on the edge. Edge is line between two points. If between two points located arcs or splines ignore this. More...
 
int Edge (quint32 p1, quint32 p2) const
 Edge return edge index in detail. Edge is line between two points. If between two points located arcs or splines ignore this. More...
 
QVector< VPieceNodeListNodePoint () const
 listNodePoint return list nodes only with points. More...
 
VPiecePath RemoveEdge (quint32 index) const
 RemoveEdge return path without edge with index. More...
 
VSAPoint StartSegment (const VContainer *data, int i, bool reverse) const
 
VSAPoint EndSegment (const VContainer *data, int i, bool reverse) const
 
QPointF NodePreviousPoint (const VContainer *data, int i) const
 
QPointF NodeNextPoint (const VContainer *data, int i) const
 

Static Public Member Functions

static int indexOfNode (const QVector< VPieceNode > &nodes, quint32 id)
 
static int FindInLoopNotExcludedUp (int start, const QVector< VPieceNode > &nodes)
 
static int FindInLoopNotExcludedDown (int start, const QVector< VPieceNode > &nodes)
 
static VSAPoint StartSegment (const VContainer *data, const QVector< VPieceNode > &nodes, int i, bool reverse)
 
static VSAPoint EndSegment (const VContainer *data, const QVector< VPieceNode > &nodes, int i, bool reverse)
 
static VSAPoint PreparePointEkv (const VPieceNode &node, const VContainer *data)
 
static QVector< VSAPointCurveSeamAllowanceSegment (const VContainer *data, const QVector< VPieceNode > &nodes, const QSharedPointer< VAbstractCurve > &curve, int i, bool reverse, qreal width)
 

Private Attributes

QSharedDataPointer< VPiecePathDatad
 

Detailed Description

Definition at line 69 of file vpiecepath.h.

Constructor & Destructor Documentation

◆ VPiecePath() [1/3]

VPiecePath::VPiecePath ( )

Definition at line 167 of file vpiecepath.cpp.

◆ VPiecePath() [2/3]

VPiecePath::VPiecePath ( PiecePathType  type)
explicit

Definition at line 172 of file vpiecepath.cpp.

◆ VPiecePath() [3/3]

VPiecePath::VPiecePath ( const VPiecePath path)

Definition at line 177 of file vpiecepath.cpp.

◆ ~VPiecePath()

VPiecePath::~VPiecePath ( )

Definition at line 193 of file vpiecepath.cpp.

Member Function Documentation

◆ Append()

◆ at()

◆ Clear()

void VPiecePath::Clear ( )

◆ Contains()

bool VPiecePath::Contains ( quint32  id) const

Definition at line 539 of file vpiecepath.cpp.

References d.

Referenced by UnionDialog::CheckObject().

◆ CountNodes()

◆ CurveSeamAllowanceSegment()

QVector< VSAPoint > VPiecePath::CurveSeamAllowanceSegment ( const VContainer data,
const QVector< VPieceNode > &  nodes,
const QSharedPointer< VAbstractCurve > &  curve,
int  i,
bool  reverse,
qreal  width 
)
static

◆ Edge()

int VPiecePath::Edge ( quint32  p1,
quint32  p2 
) const

Edge return edge index in detail. Edge is line between two points. If between two points located arcs or splines ignore this.

Parameters
p1id first point.
p2id second point.
Returns
edge index or -1 if points don't located on edge

Definition at line 604 of file vpiecepath.cpp.

References anonymous_namespace{vpiecepath.cpp}::IndexOfNode(), ListNodePoint(), and OnEdge().

Referenced by UnionDialog::chosenPiece().

◆ EndSegment() [1/2]

VSAPoint VPiecePath::EndSegment ( const VContainer data,
const QVector< VPieceNode > &  nodes,
int  i,
bool  reverse 
)
static

◆ EndSegment() [2/2]

VSAPoint VPiecePath::EndSegment ( const VContainer data,
int  i,
bool  reverse 
) const

Definition at line 695 of file vpiecepath.cpp.

References d.

Referenced by CurveSeamAllowanceSegment(), NodeNextPoint(), NodePreviousPoint(), and PathPoints().

◆ FindInLoopNotExcludedDown()

int VPiecePath::FindInLoopNotExcludedDown ( int  start,
const QVector< VPieceNode > &  nodes 
)
static

Definition at line 854 of file vpiecepath.cpp.

Referenced by VPiece::createNotchLines(), and EndSegment().

◆ FindInLoopNotExcludedUp()

int VPiecePath::FindInLoopNotExcludedUp ( int  start,
const QVector< VPieceNode > &  nodes 
)
static

Definition at line 818 of file vpiecepath.cpp.

Referenced by VPiece::createNotchLines(), and StartSegment().

◆ GetName()

QString VPiecePath::GetName ( ) const

◆ GetNodes()

QVector< VPieceNode > VPiecePath::GetNodes ( ) const

Definition at line 227 of file vpiecepath.cpp.

References d.

Referenced by VNodeDetail::Convert(), VPiece::GetUnitedPath(), DeletePiece::redo(), and AddPiece::undo().

◆ GetPenType()

◆ GetType()

◆ indexOfNode() [1/2]

int VPiecePath::indexOfNode ( const QVector< VPieceNode > &  nodes,
quint32  id 
)
static

Definition at line 804 of file vpiecepath.cpp.

◆ indexOfNode() [2/2]

◆ IsCutPath()

◆ ListNodePoint()

QVector< VPieceNode > VPiecePath::ListNodePoint ( ) const

listNodePoint return list nodes only with points.

Returns
list points node.

Definition at line 633 of file vpiecepath.cpp.

References d, and NodePoint.

Referenced by UnionDialog::checkPiece(), Edge(), NodeOnEdge(), OnEdge(), and RemoveEdge().

◆ MissingNodes()

QVector< quint32 > VPiecePath::MissingNodes ( const VPiecePath path) const

◆ NodeNextPoint()

QPointF VPiecePath::NodeNextPoint ( const VContainer data,
int  i 
) const

◆ NodeOnEdge()

void VPiecePath::NodeOnEdge ( quint32  index,
VPieceNode p1,
VPieceNode p2 
) const

NodeOnEdge return nodes located on edge with index.

Parameters
indexindex of edge.
p1first node.
p2second node.

Definition at line 519 of file vpiecepath.cpp.

References ListNodePoint().

Referenced by QT_WARNING_POP::FindIndexJ(), QT_WARNING_POP::PointsOnEdge(), RemoveEdge(), and QT_WARNING_POP::UnionInitParameters().

◆ NodePreviousPoint()

QPointF VPiecePath::NodePreviousPoint ( const VContainer data,
int  i 
) const

◆ OnEdge()

bool VPiecePath::OnEdge ( quint32  p1,
quint32  p2 
) const

OnEdge checks if two poins located on the edge. Edge is line between two points. If between two points located arcs or splines ignore this.

Parameters
p1id first point.
p2id second point.
Returns
true - on edge, false - no.

Definition at line 559 of file vpiecepath.cpp.

References anonymous_namespace{vpiecepath.cpp}::IndexOfNode(), and ListNodePoint().

Referenced by UnionDialog::chosenPiece(), and Edge().

◆ operator=()

VPiecePath & VPiecePath::operator= ( const VPiecePath path)

Definition at line 182 of file vpiecepath.cpp.

References d.

◆ operator[]()

VPieceNode & VPiecePath::operator[] ( int  indx)

Definition at line 215 of file vpiecepath.cpp.

References d.

◆ PainterPath()

QPainterPath VPiecePath::PainterPath ( const VContainer data) const

◆ PathNodePoints()

◆ PathPoints()

◆ PreparePointEkv()

◆ RemoveEdge()

VPiecePath VPiecePath::RemoveEdge ( quint32  index) const

RemoveEdge return path without edge with index.

Parameters
indexidex of edge.
Returns
path without edge with index.

Definition at line 652 of file vpiecepath.cpp.

References Append(), at(), Clear(), CountNodes(), VPieceNode::GetId(), indexOfNode(), ListNodePoint(), and NodeOnEdge().

Referenced by QT_WARNING_POP::CreateUnitedNodes(), QT_WARNING_POP::FindIndexJ(), and QT_WARNING_POP::UpdateUnitedNodes().

◆ SeamAllowancePoints()

◆ SetCutPath()

void VPiecePath::SetCutPath ( bool  cut)

Definition at line 281 of file vpiecepath.cpp.

References d.

Referenced by DialogInternalPath::CreatePath(), and VPattern::ParsePathElement().

◆ SetName()

void VPiecePath::SetName ( const QString &  name)

Definition at line 257 of file vpiecepath.cpp.

References d.

Referenced by DialogInternalPath::CreatePath(), and VPattern::ParsePathElement().

◆ SetNodes()

void VPiecePath::SetNodes ( const QVector< VPieceNode > &  nodes)

Definition at line 233 of file vpiecepath.cpp.

References d.

Referenced by PatternPieceDialog::CreatePiece(), and VPattern::parsePieceNodes().

◆ SetPenType()

void VPiecePath::SetPenType ( const Qt::PenStyle &  type)

Definition at line 269 of file vpiecepath.cpp.

References d.

Referenced by DialogInternalPath::CreatePath(), and VPattern::ParsePathElement().

◆ SetType()

void VPiecePath::SetType ( PiecePathType  type)

Definition at line 245 of file vpiecepath.cpp.

References d.

Referenced by DialogInternalPath::CreatePath(), and VPattern::ParsePathElement().

◆ StartSegment() [1/2]

VSAPoint VPiecePath::StartSegment ( const VContainer data,
const QVector< VPieceNode > &  nodes,
int  i,
bool  reverse 
)
static

◆ StartSegment() [2/2]

VSAPoint VPiecePath::StartSegment ( const VContainer data,
int  i,
bool  reverse 
) const

Definition at line 689 of file vpiecepath.cpp.

References d.

Referenced by CurveSeamAllowanceSegment(), NodeNextPoint(), NodePreviousPoint(), and PathPoints().

◆ Swap()

void VPiecePath::Swap ( VPiecePath path)

Definition at line 163 of file vpiecepath.cpp.

Member Data Documentation

◆ d


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