#include <vpiecepath.h>
Public Member Functions | |
VPiecePath () | |
VPiecePath (PiecePathType type) | |
VPiecePath (const VPiecePath &path) | |
~VPiecePath () | |
VPiecePath & | operator= (const VPiecePath &path) |
void | Swap (VPiecePath &path) Q_DECL_NOTHROW |
void | Append (const VPieceNode &node) |
void | Clear () |
qint32 | CountNodes () const |
VPieceNode & | operator[] (int indx) |
const VPieceNode & | at (int indx) const |
QVector< VPieceNode > | GetNodes () 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< VPointF > | PathNodePoints (const VContainer *data, bool showExcluded=true) const |
QVector< VSAPoint > | SeamAllowancePoints (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< VPieceNode > | ListNodePoint () 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< VSAPoint > | CurveSeamAllowanceSegment (const VContainer *data, const QVector< VPieceNode > &nodes, const QSharedPointer< VAbstractCurve > &curve, int i, bool reverse, qreal width) |
Private Attributes | |
QSharedDataPointer< VPiecePathData > | d |
Definition at line 69 of file vpiecepath.h.
VPiecePath::VPiecePath | ( | ) |
Definition at line 167 of file vpiecepath.cpp.
|
explicit |
Definition at line 172 of file vpiecepath.cpp.
VPiecePath::VPiecePath | ( | const VPiecePath & | path | ) |
Definition at line 177 of file vpiecepath.cpp.
VPiecePath::~VPiecePath | ( | ) |
Definition at line 193 of file vpiecepath.cpp.
void VPiecePath::Append | ( | const VPieceNode & | node | ) |
Definition at line 197 of file vpiecepath.cpp.
References d.
Referenced by QT_WARNING_POP::AddNodeToNewPath(), VNodeDetail::Convert(), DialogInternalPath::CreatePath(), QT_WARNING_POP::createUnionPaths(), PatternPieceTool::insertNodes(), VAbstractPattern::ParsePathNodes(), VAbstractPattern::ParsePieceNodes(), and RemoveEdge().
const VPieceNode & VPiecePath::at | ( | int | indx | ) | const |
Definition at line 221 of file vpiecepath.cpp.
References d.
Referenced by VAbstractTool::AddNodes(), QT_WARNING_POP::createCSAUnion(), QT_WARNING_POP::createUnionInternalPaths(), QT_WARNING_POP::createUnionPaths(), QT_WARNING_POP::CreateUnitedNodes(), VToolInternalPath::DecrementNodes(), PatternPieceTool::EnableToolMove(), VToolInternalPath::IncrementNodes(), PatternPieceTool::initializeNodes(), DialogInternalPath::initializeNodesList(), MissingNodes(), DialogInternalPath::nodeChanged(), PatternPieceDialog::nodeChanged(), DialogInternalPath::notchChanged(), PatternPieceDialog::notchChanged(), VAbstractPattern::ParsePathNodes(), VAbstractPattern::ParsePieceNodes(), PathNodePoints(), PathPoints(), PatternPieceTool::pieceLockedChanged(), VAbstractTool::PrepareNodes(), RemoveEdge(), PatternPieceDialog::SetPiece(), DialogInternalPath::SetPiecePath(), PatternPieceTool::UpdateExcludeState(), and QT_WARNING_POP::UpdateUnitedNodes().
void VPiecePath::Clear | ( | ) |
Definition at line 203 of file vpiecepath.cpp.
References d.
Referenced by QT_WARNING_POP::createCSAUnion(), QT_WARNING_POP::createUnionInternalPaths(), QT_WARNING_POP::createUnionPaths(), and RemoveEdge().
bool VPiecePath::Contains | ( | quint32 | id | ) | const |
Definition at line 539 of file vpiecepath.cpp.
References d.
Referenced by UnionDialog::CheckObject().
qint32 VPiecePath::CountNodes | ( | ) | const |
Definition at line 209 of file vpiecepath.cpp.
References d.
Referenced by VAbstractTool::AddNodes(), UnionDialog::checkPiece(), DialogInternalPath::ChosenObject(), PatternPieceDialog::ChosenObject(), VNodeDetail::Convert(), QT_WARNING_POP::createCSAUnion(), QT_WARNING_POP::createUnionInternalPaths(), QT_WARNING_POP::createUnionPaths(), QT_WARNING_POP::CreateUnitedNodes(), VToolInternalPath::DecrementNodes(), QT_WARNING_POP::FindIndexJ(), VToolInternalPath::IncrementNodes(), DialogInternalPath::initializeNodesList(), MissingNodes(), PathNodePoints(), PathPoints(), VAbstractTool::PrepareNodes(), PatternPieceVisual::RefreshGeometry(), VisToolInternalPath::RefreshGeometry(), RemoveEdge(), DialogInternalPath::SetPiecePath(), and QT_WARNING_POP::UpdateUnitedNodes().
|
static |
Definition at line 905 of file vpiecepath.cpp.
References EndSegment(), VSAPoint::GetAngleType(), VSAPoint::GetSAAfter(), VSAPoint::GetSABefore(), VAbstractCurve::PathLength(), VSAPoint::SetAngleType(), VSAPoint::SetSAAfter(), VSAPoint::SetSABefore(), and StartSegment().
Referenced by VPiece::getNodeSAPoints(), VPiece::SeamAllowancePoints(), and SeamAllowancePoints().
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.
p1 | id first point. |
p2 | id second point. |
Definition at line 604 of file vpiecepath.cpp.
References anonymous_namespace{vpiecepath.cpp}::IndexOfNode(), ListNodePoint(), and OnEdge().
Referenced by UnionDialog::chosenPiece().
|
static |
Definition at line 442 of file vpiecepath.cpp.
References anonymous_namespace{vpiecepath.cpp}::CurveEndPoint(), FindInLoopNotExcludedDown(), and VContainer::GeometricObject().
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().
|
static |
Definition at line 854 of file vpiecepath.cpp.
Referenced by VPiece::createNotchLines(), and EndSegment().
|
static |
Definition at line 818 of file vpiecepath.cpp.
Referenced by VPiece::createNotchLines(), and StartSegment().
QString VPiecePath::GetName | ( | ) | const |
Definition at line 251 of file vpiecepath.cpp.
References d.
Referenced by VToolInternalPath::AddAttributes(), PatternPieceDialog::getPathName(), and DialogInternalPath::SetPiecePath().
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().
Qt::PenStyle VPiecePath::GetPenType | ( | ) | const |
Definition at line 263 of file vpiecepath.cpp.
References d.
Referenced by VToolInternalPath::AddAttributes(), anonymous_namespace{vlayoutpiece.cpp}::ConvertInternalPaths(), PatternPieceTool::InitInternalPaths(), VToolInternalPath::RefreshGeometry(), VisToolInternalPath::RefreshGeometry(), and DialogInternalPath::SetPiecePath().
PiecePathType VPiecePath::GetType | ( | ) | const |
Definition at line 239 of file vpiecepath.cpp.
References d.
Referenced by VToolInternalPath::AddAttributes(), VToolInternalPath::AddToFile(), anonymous_namespace{vlayoutpiece.cpp}::ConvertInternalPaths(), VToolInternalPath::Create(), VToolInternalPath::RefreshGeometry(), and DialogInternalPath::SetPiecePath().
|
static |
Definition at line 804 of file vpiecepath.cpp.
int VPiecePath::indexOfNode | ( | quint32 | id | ) | const |
Definition at line 507 of file vpiecepath.cpp.
References d.
Referenced by QT_WARNING_POP::CreateUnitedNodes(), QT_WARNING_POP::FindIndexJ(), VPiece::GetUnitedPath(), VPiece::isNotchVisible(), MissingNodes(), DialogInternalPath::nodeChanged(), PatternPieceDialog::nodeChanged(), DialogInternalPath::notchChanged(), PatternPieceDialog::notchChanged(), RemoveEdge(), and QT_WARNING_POP::UpdateUnitedNodes().
bool VPiecePath::IsCutPath | ( | ) | const |
Definition at line 275 of file vpiecepath.cpp.
References d.
Referenced by VToolInternalPath::AddAttributes(), anonymous_namespace{vlayoutpiece.cpp}::ConvertInternalPaths(), PatternPieceTool::InitInternalPaths(), and DialogInternalPath::SetPiecePath().
QVector< VPieceNode > VPiecePath::ListNodePoint | ( | ) | const |
listNodePoint return list nodes only with points.
Definition at line 633 of file vpiecepath.cpp.
Referenced by UnionDialog::checkPiece(), Edge(), NodeOnEdge(), OnEdge(), and RemoveEdge().
QVector< quint32 > VPiecePath::MissingNodes | ( | const VPiecePath & | path | ) | const |
Definition at line 473 of file vpiecepath.cpp.
References at(), CountNodes(), d, VPieceNode::GetId(), and indexOfNode().
Referenced by SavePiecePathOptions::redo(), and SavePiecePathOptions::undo().
QPointF VPiecePath::NodeNextPoint | ( | const VContainer * | data, |
int | i | ||
) | const |
Definition at line 752 of file vpiecepath.cpp.
References d, EndSegment(), VContainer::GeometricObject(), VPieceNode::GetId(), VPieceNode::GetReverse(), VPieceNode::GetTypeTool(), NodeArc, NodeElArc, NodePoint, NodeSpline, NodeSplinePath, and StartSegment().
Referenced by VNodeDetail::Convert().
void VPiecePath::NodeOnEdge | ( | quint32 | index, |
VPieceNode & | p1, | ||
VPieceNode & | p2 | ||
) | const |
NodeOnEdge return nodes located on edge with index.
index | index of edge. |
p1 | first node. |
p2 | second 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().
QPointF VPiecePath::NodePreviousPoint | ( | const VContainer * | data, |
int | i | ||
) | const |
Definition at line 701 of file vpiecepath.cpp.
References d, EndSegment(), VContainer::GeometricObject(), VPieceNode::GetId(), VPieceNode::GetReverse(), VPieceNode::GetTypeTool(), NodeArc, NodeElArc, NodePoint, NodeSpline, NodeSplinePath, and StartSegment().
Referenced by VNodeDetail::Convert().
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.
p1 | id first point. |
p2 | id second point. |
Definition at line 559 of file vpiecepath.cpp.
References anonymous_namespace{vpiecepath.cpp}::IndexOfNode(), and ListNodePoint().
Referenced by UnionDialog::chosenPiece(), and Edge().
VPiecePath & VPiecePath::operator= | ( | const VPiecePath & | path | ) |
Definition at line 182 of file vpiecepath.cpp.
References d.
VPieceNode & VPiecePath::operator[] | ( | int | indx | ) |
Definition at line 215 of file vpiecepath.cpp.
References d.
QPainterPath VPiecePath::PainterPath | ( | const VContainer * | data | ) | const |
Definition at line 396 of file vpiecepath.cpp.
References PathPoints().
Referenced by VToolInternalPath::RefreshGeometry(), and VisToolInternalPath::RefreshGeometry().
QVector< VPointF > VPiecePath::PathNodePoints | ( | const VContainer * | data, |
bool | showExcluded = true |
||
) | const |
Definition at line 328 of file vpiecepath.cpp.
References at(), CountNodes(), VContainer::GeometricObject(), VPieceNode::GetId(), VPieceNode::GetTypeTool(), VPieceNode::isExcluded(), NodeArc, NodeElArc, NodePoint, NodeSpline, and NodeSplinePath.
Referenced by VPiece::MainPathNodePoints(), and VisToolInternalPath::RefreshGeometry().
QVector< QPointF > VPiecePath::PathPoints | ( | const VContainer * | data | ) | const |
Definition at line 287 of file vpiecepath.cpp.
References at(), CountNodes(), EndSegment(), VContainer::GeometricObject(), VPieceNode::GetId(), VPieceNode::GetTypeTool(), VPieceNode::isExcluded(), NodeArc, NodeElArc, NodePoint, NodeSpline, NodeSplinePath, and StartSegment().
Referenced by VNodeDetail::Convert(), anonymous_namespace{vlayoutpiece.cpp}::ConvertInternalPaths(), PatternPieceDialog::CreatePiece(), QT_WARNING_POP::createUnion(), VPiece::MainPathPoints(), PainterPath(), and VisToolInternalPath::RefreshGeometry().
|
static |
Definition at line 890 of file vpiecepath.cpp.
References VContainer::GeometricObject(), VPieceNode::GetAngleType(), VPieceNode::GetId(), VContainer::GetPatternUnit(), VPieceNode::GetSAAfter(), VPieceNode::GetSABefore(), and SCASSERT.
Referenced by VPiece::getNodeSAPoints(), VPiece::SeamAllowancePoints(), and SeamAllowancePoints().
VPiecePath VPiecePath::RemoveEdge | ( | quint32 | index | ) | const |
RemoveEdge return path without edge with index.
index | idex of edge. |
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().
QVector< VSAPoint > VPiecePath::SeamAllowancePoints | ( | const VContainer * | data, |
qreal | width, | ||
bool | reverse | ||
) | const |
Definition at line 357 of file vpiecepath.cpp.
References CurveSeamAllowanceSegment(), d, VContainer::GeometricObject(), VPieceNode::GetId(), VPieceNode::GetReverse(), VGObject::GetReversePoints(), VPieceNode::GetTypeTool(), NodeArc, NodeElArc, NodePoint, NodeSpline, NodeSplinePath, PreparePointEkv(), and SCASSERT.
Referenced by VPiece::SeamAllowancePoints().
void VPiecePath::SetCutPath | ( | bool | cut | ) |
Definition at line 281 of file vpiecepath.cpp.
References d.
Referenced by DialogInternalPath::CreatePath(), and VPattern::ParsePathElement().
void VPiecePath::SetName | ( | const QString & | name | ) |
Definition at line 257 of file vpiecepath.cpp.
References d.
Referenced by DialogInternalPath::CreatePath(), and VPattern::ParsePathElement().
void VPiecePath::SetNodes | ( | const QVector< VPieceNode > & | nodes | ) |
Definition at line 233 of file vpiecepath.cpp.
References d.
Referenced by PatternPieceDialog::CreatePiece(), and VPattern::parsePieceNodes().
void VPiecePath::SetPenType | ( | const Qt::PenStyle & | type | ) |
Definition at line 269 of file vpiecepath.cpp.
References d.
Referenced by DialogInternalPath::CreatePath(), and VPattern::ParsePathElement().
void VPiecePath::SetType | ( | PiecePathType | type | ) |
Definition at line 245 of file vpiecepath.cpp.
References d.
Referenced by DialogInternalPath::CreatePath(), and VPattern::ParsePathElement().
|
static |
Definition at line 411 of file vpiecepath.cpp.
References anonymous_namespace{vpiecepath.cpp}::CurveStartPoint(), FindInLoopNotExcludedUp(), and VContainer::GeometricObject().
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().
void VPiecePath::Swap | ( | VPiecePath & | path | ) |
Definition at line 163 of file vpiecepath.cpp.
|
private |
Definition at line 146 of file vpiecepath.h.
Referenced by Append(), at(), Clear(), Contains(), CountNodes(), EndSegment(), GetName(), GetNodes(), GetPenType(), GetType(), indexOfNode(), IsCutPath(), ListNodePoint(), MissingNodes(), NodeNextPoint(), NodePreviousPoint(), operator=(), operator[](), SeamAllowancePoints(), SetCutPath(), SetName(), SetNodes(), SetPenType(), SetType(), and StartSegment().