#include <vabstractpiece.h>
Public Member Functions | |
VAbstractPiece () | |
VAbstractPiece (const VAbstractPiece &piece) | |
virtual | ~VAbstractPiece () |
VAbstractPiece & | operator= (const VAbstractPiece &piece) |
void | Swap (VAbstractPiece &piece) Q_DECL_NOTHROW |
QString | GetName () const |
void | SetName (const QString &value) |
QString | getColor () const |
void | setColor (const QString &value) |
QString | getFill () const |
void | setFill (const QString &value) |
bool | getLock () const |
void | setLock (bool value) |
bool | IsForbidFlipping () const |
void | SetForbidFlipping (bool value) |
bool | IsSeamAllowance () const |
void | SetSeamAllowance (bool value) |
bool | IsSeamAllowanceBuiltIn () const |
void | SetSeamAllowanceBuiltIn (bool value) |
bool | isHideSeamLine () const |
void | setHideSeamLine (bool value) |
qreal | GetSAWidth () const |
void | SetSAWidth (qreal value) |
qreal | GetMx () const |
void | SetMx (qreal value) |
qreal | GetMy () const |
void | SetMy (qreal value) |
Static Public Member Functions | |
static QVector< QPointF > | Equidistant (const QVector< VSAPoint > &points, qreal width) |
static qreal | sumTrapezoids (const QVector< QPointF > &points) |
static bool | isClockwise (const QVector< QPointF > &points) |
static QVector< QPointF > | CheckLoops (const QVector< QPointF > &points) |
CheckLoops seek and delete loops in equidistant. More... | |
static QVector< QPointF > | EkvPoint (const VSAPoint &p1Line1, const VSAPoint &p2Line1, const VSAPoint &p1Line2, const VSAPoint &p2Line2, qreal width) |
EkvPoint return seam allowance points in place of intersection of two edges. Last points of two edges should be equal. More... | |
static QLineF | createParallelLine (const VSAPoint &p1, const VSAPoint &p2, qreal width) |
static QLineF | createParallelLine (const QPointF &p1, const QPointF &p2, qreal width) |
template<class T > | |
static QVector< T > | CorrectEquidistantPoints (const QVector< T > &points, bool removeFirstAndLast=true) |
CorrectEquidistantPoints clear equivalent points and remove point on line from equdistant. More... | |
Static Protected Member Functions | |
template<class T > | |
static QVector< T > | RemoveDublicates (const QVector< T > &points, bool removeFirstAndLast=true) |
static qreal | MaxLocalSA (const VSAPoint &p, qreal width) |
static bool | IsEkvPointOnLine (const QPointF &iPoint, const QPointF &prevPoint, const QPointF &nextPoint) |
static bool | IsEkvPointOnLine (const VSAPoint &iPoint, const VSAPoint &prevPoint, const VSAPoint &nextPoint) |
Static Private Member Functions | |
static bool | CheckIntersection (const QVector< QPointF > &points, int i, int iNext, int j, int jNext, const QPointF &crossPoint) |
static bool | ParallelCrossPoint (const QLineF &line1, const QLineF &line2, QPointF &point) |
static bool | Crossing (const QVector< QPointF > &sub1, const QVector< QPointF > &sub2) |
static QVector< QPointF > | SubPath (const QVector< QPointF > &path, int startIndex, int endIndex) |
static Q_DECL_CONSTEXPR qreal | PointPosition (const QPointF &p, const QLineF &line) |
static QVector< QPointF > | AngleByLength (const QPointF &p2, const QPointF &sp1, const QPointF &sp2, const QPointF &sp3, qreal width) |
static QVector< QPointF > | AngleByIntersection (const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &sp1, const QPointF &sp2, const QPointF &sp3, qreal width) |
static QVector< QPointF > | AngleByFirstSymmetry (const QPointF &p1, const QPointF &p2, const QPointF &sp1, const QPointF &sp2, const QPointF &sp3, qreal width) |
static QVector< QPointF > | AngleBySecondSymmetry (const QPointF &p2, const QPointF &p3, const QPointF &sp1, const QPointF &sp2, const QPointF &sp3, qreal width) |
static QVector< QPointF > | AngleByFirstRightAngle (const QPointF &p1, const QPointF &p2, const QPointF &sp1, const QPointF &sp2, const QPointF &sp3, qreal width) |
static QVector< QPointF > | AngleBySecondRightAngle (const QPointF &p2, const QPointF &p3, const QPointF &sp1, const QPointF &sp2, const QPointF &sp3, qreal width) |
static QPointF | SingleParallelPoint (const QPointF &p1, const QPointF &p2, qreal angle, qreal width) |
static QLineF | BisectorLine (const QPointF &p1, const QPointF &p2, const QPointF &p3) |
static qreal | AngleBetweenBisectors (const QLineF &b1, const QLineF &b2) |
Private Attributes | |
QSharedDataPointer< VAbstractPieceData > | d |
Definition at line 164 of file vabstractpiece.h.
VAbstractPiece::VAbstractPiece | ( | ) |
Definition at line 73 of file vabstractpiece.cpp.
VAbstractPiece::VAbstractPiece | ( | const VAbstractPiece & | piece | ) |
Definition at line 78 of file vabstractpiece.cpp.
|
virtual |
Definition at line 94 of file vabstractpiece.cpp.
|
staticprivate |
Definition at line 909 of file vabstractpiece.cpp.
References VFuzzyComparePossibleNulls().
Referenced by EkvPoint().
|
staticprivate |
Definition at line 772 of file vabstractpiece.cpp.
References AngleByLength(), and maxL.
Referenced by EkvPoint().
|
staticprivate |
Definition at line 690 of file vabstractpiece.cpp.
References AngleByLength(), VPointF::FlipPF(), and maxL.
Referenced by EkvPoint().
|
staticprivate |
Definition at line 649 of file vabstractpiece.cpp.
References AngleByLength(), and maxL.
Referenced by EkvPoint().
|
staticprivate |
Definition at line 610 of file vabstractpiece.cpp.
References maxL.
Referenced by AngleByFirstRightAngle(), AngleByFirstSymmetry(), AngleByIntersection(), AngleBySecondRightAngle(), AngleBySecondSymmetry(), and EkvPoint().
|
staticprivate |
Definition at line 810 of file vabstractpiece.cpp.
References AngleByLength(), and maxL.
Referenced by EkvPoint().
|
staticprivate |
Definition at line 731 of file vabstractpiece.cpp.
References AngleByLength(), VPointF::FlipPF(), and maxL.
Referenced by EkvPoint().
|
staticprivate |
Definition at line 885 of file vabstractpiece.cpp.
Referenced by EkvPoint().
|
staticprivate |
Definition at line 936 of file vabstractpiece.cpp.
References CheckLoops(), CorrectEquidistantPoints(), Crossing(), SubPath(), and sumTrapezoids().
Referenced by CheckLoops().
CheckLoops seek and delete loops in equidistant.
points | vector of points of equidistant. |
Definition at line 315 of file vabstractpiece.cpp.
References CheckIntersection(), VGObject::IsPointOnLineviaPDP(), and ParallelCrossPoint().
Referenced by CheckIntersection(), Equidistant(), and VPiece::MainPathPoints().
|
static |
CorrectEquidistantPoints clear equivalent points and remove point on line from equdistant.
points | list of points equdistant. |
Definition at line 271 of file vabstractpiece.h.
References IsEkvPointOnLine(), and RemoveDublicates().
Referenced by CheckIntersection(), Equidistant(), and VPiece::MainPathPoints().
|
static |
Definition at line 868 of file vabstractpiece.cpp.
References SingleParallelPoint().
|
static |
Definition at line 848 of file vabstractpiece.cpp.
References VSAPoint::GetSAAfter(), VSAPoint::GetSABefore(), and SingleParallelPoint().
Referenced by VPiece::createCastleNotch(), VPiece::createSeamAllowanceNotch(), VPiece::createSlitNotch(), VPiece::createTNotch(), VPiece::createUNotch(), VPiece::createVExternalNotch(), VPiece::createVInternalNotch(), EkvPoint(), and IsEkvPointOnLine().
|
staticprivate |
Definition at line 992 of file vabstractpiece.cpp.
Referenced by CheckIntersection().
|
static |
EkvPoint return seam allowance points in place of intersection of two edges. Last points of two edges should be equal.
width | global seam allowance width. |
Definition at line 481 of file vabstractpiece.cpp.
References AngleBetweenBisectors(), AngleByFirstRightAngle(), AngleByFirstSymmetry(), AngleByIntersection(), AngleByLength(), AngleBySecondRightAngle(), AngleBySecondSymmetry(), BisectorLine(), ByFirstEdgeRightAngle, ByFirstEdgeSymmetry, ByLength, ByPointsIntersection, BySecondEdgeRightAngle, BySecondEdgeSymmetry, createParallelLine(), VSAPoint::GetAngleType(), MaxLocalSA(), PointPosition(), and VFuzzyComparePossibleNulls().
Referenced by Equidistant(), and VPiece::getSeamNotchSAPoint().
|
static |
Definition at line 207 of file vabstractpiece.cpp.
References CheckLoops(), CorrectEquidistantPoints(), and EkvPoint().
Referenced by VPiece::SeamAllowancePoints(), and VLayoutPiece::SetLayoutAllowancePoints().
QString VAbstractPiece::getColor | ( | ) | const |
Definition at line 111 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceTool::AddAttributes(), PiecesWidget::fillTable(), PatternPieceTool::paint(), PatternPieceDialog::SetPiece(), and PiecesWidget::togglePiece().
QString VAbstractPiece::getFill | ( | ) | const |
Definition at line 123 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceTool::AddAttributes(), PatternPieceTool::paint(), and PatternPieceDialog::SetPiece().
bool VAbstractPiece::getLock | ( | ) | const |
Definition at line 135 of file vabstractpiece.cpp.
References d.
qreal VAbstractPiece::GetMx | ( | ) | const |
Definition at line 1081 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceTool::AddAttributes(), VLayoutPiece::Create(), QT_WARNING_POP::createUnion(), PatternPieceTool::RefreshGeometry(), and PatternPieceDialog::SetPiece().
qreal VAbstractPiece::GetMy | ( | ) | const |
Definition at line 1093 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceTool::AddAttributes(), VLayoutPiece::Create(), QT_WARNING_POP::createUnion(), PatternPieceTool::RefreshGeometry(), and PatternPieceDialog::SetPiece().
QString VAbstractPiece::GetName | ( | ) | const |
Definition at line 98 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceTool::AddAttributes(), VLayoutPiece::Create(), VDxfEngine::ExportToAAMA(), DialogTool::FillComboBoxPiecesList(), PiecesWidget::fillTable(), PatternPieceTool::renamePiece(), EditLabelTemplateDialog::SetPiece(), PatternPieceDialog::SetPiece(), AnchorPointDialog::SetPieceId(), DialogInternalPath::SetPieceId(), PiecesWidget::togglePiece(), PatternPieceTool::UpdatePatternLabel(), and PatternPieceTool::UpdatePieceLabel().
qreal VAbstractPiece::GetSAWidth | ( | ) | const |
Definition at line 195 of file vabstractpiece.cpp.
References d.
Referenced by VLayoutPiece::Create(), PatternPieceTool::Create(), QT_WARNING_POP::createUnion(), VPiece::getNodeSAPoints(), VPiece::getSeamNotchSAPoint(), VPiece::SeamAllowancePoints(), PatternPieceDialog::SetPiece(), and VPiece::setSeamAllowanceWidthFormula().
|
static |
Definition at line 297 of file vabstractpiece.cpp.
References sumTrapezoids().
Referenced by PatternPieceDialog::ChosenObject(), and PatternPieceDialog::isMainPathClockwise().
|
staticprotected |
Definition at line 1061 of file vabstractpiece.cpp.
References VGObject::IsPointOnLineviaPDP().
Referenced by CorrectEquidistantPoints(), and VPiece::getSeamNotchSAPoint().
|
staticprotected |
Definition at line 1067 of file vabstractpiece.cpp.
References VGObject::accuracyPointOnLine, createParallelLine(), VSAPoint::GetSAAfter(), VSAPoint::GetSABefore(), and VGObject::IsPointOnLineviaPDP().
bool VAbstractPiece::IsForbidFlipping | ( | ) | const |
Definition at line 147 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceTool::AddAttributes(), VLayoutPaper::arrangePiece(), VPosition::CheckCombineEdges(), PatternPieceTool::contextMenuEvent(), VLayoutPiece::Create(), PatternPieceTool::keyReleaseEvent(), and PatternPieceDialog::SetPiece().
bool VAbstractPiece::isHideSeamLine | ( | ) | const |
Definition at line 183 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceTool::AddAttributes(), PatternPieceTool::contextMenuEvent(), VLayoutPiece::Create(), VLayoutPiece::createMainPath(), VPiece::createNotch(), VDxfEngine::ExportAAMADraw(), PatternPieceTool::keyReleaseEvent(), PatternPieceTool::RefreshGeometry(), and PatternPieceDialog::SetPiece().
bool VAbstractPiece::IsSeamAllowance | ( | ) | const |
Definition at line 159 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceTool::AddAttributes(), PatternPieceTool::contextMenuEvent(), VLayoutPiece::Create(), VLayoutPiece::createAllowancePath(), VLayoutPiece::createMainItem(), VLayoutPiece::createMainPath(), VDxfEngine::ExportAAMANotch(), VDxfEngine::ExportAAMAOutline(), VPiece::getNotchesPath(), VPiece::GetUnitedPath(), VPiece::isNotchVisible(), VLayoutPiece::isNull(), PatternPieceTool::keyReleaseEvent(), PatternPieceTool::paint(), VLayoutPiece::pieceBoundingRect(), VLayoutPiece::piecePath(), PatternPieceTool::RefreshGeometry(), VPiece::SeamAllowancePath(), VPiece::SeamAllowancePoints(), VLayoutPiece::SetLayoutAllowancePoints(), VLayoutPiece::setNotches(), and PatternPieceDialog::SetPiece().
bool VAbstractPiece::IsSeamAllowanceBuiltIn | ( | ) | const |
Definition at line 171 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceTool::AddAttributes(), VLayoutPiece::Create(), VLayoutPiece::createAllowancePath(), VLayoutPiece::createMainItem(), VLayoutPiece::createMainPath(), VPiece::createNotch(), VDxfEngine::ExportAAMAOutline(), VPiece::GetUnitedPath(), VPiece::isNotchVisible(), VLayoutPiece::isNull(), PatternPieceTool::paint(), VLayoutPiece::pieceBoundingRect(), VLayoutPiece::piecePath(), PatternPieceTool::RefreshGeometry(), VPiece::SeamAllowancePath(), VPiece::SeamAllowancePoints(), VLayoutPiece::SetLayoutAllowancePoints(), PatternPieceDialog::SetPiece(), and VLayoutPiece::setSeamAllowancePoints().
|
staticprotected |
Definition at line 457 of file vabstractpiece.cpp.
References VSAPoint::GetSAAfter(), and VSAPoint::GetSABefore().
Referenced by EkvPoint(), and VPiece::getSeamNotchSAPoint().
VAbstractPiece & VAbstractPiece::operator= | ( | const VAbstractPiece & | piece | ) |
Definition at line 83 of file vabstractpiece.cpp.
References d.
Referenced by VLayoutPiece::operator=(), and VPiece::operator=().
|
staticprivate |
Definition at line 967 of file vabstractpiece.cpp.
Referenced by CheckLoops().
|
staticprivate |
Definition at line 450 of file vabstractpiece.cpp.
Referenced by EkvPoint().
|
staticprotected |
Definition at line 326 of file vabstractpiece.h.
References VGObject::accuracyPointOnLine.
Referenced by CorrectEquidistantPoints(), VLayoutPiece::SetCountourPoints(), and VLayoutPiece::setSeamAllowancePoints().
void VAbstractPiece::setColor | ( | const QString & | value | ) |
Definition at line 117 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceDialog::CreatePiece(), SetPieceColor::doCmd(), and VPattern::parsePieceElement().
void VAbstractPiece::setFill | ( | const QString & | value | ) |
Definition at line 129 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceDialog::CreatePiece(), and VPattern::parsePieceElement().
void VAbstractPiece::SetForbidFlipping | ( | bool | value | ) |
Definition at line 153 of file vabstractpiece.cpp.
References d.
Referenced by VLayoutPiece::Create(), PatternPieceDialog::CreatePiece(), VPattern::parsePieceElement(), and PatternPieceTool::toggleFlipping().
void VAbstractPiece::setHideSeamLine | ( | bool | value | ) |
Definition at line 189 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceDialog::CreatePiece(), VPattern::parsePieceElement(), VLayoutPiece::SetCountourPoints(), and PatternPieceTool::toggleSeamLine().
void VAbstractPiece::setLock | ( | bool | value | ) |
Definition at line 141 of file vabstractpiece.cpp.
References d.
void VAbstractPiece::SetMx | ( | qreal | value | ) |
Definition at line 1087 of file vabstractpiece.cpp.
References d.
Referenced by VLayoutPiece::Create(), PatternPieceDialog::CreatePiece(), QT_WARNING_POP::createUnion(), PatternPieceTool::itemChange(), and VPattern::parsePieceElement().
void VAbstractPiece::SetMy | ( | qreal | value | ) |
Definition at line 1099 of file vabstractpiece.cpp.
References d.
Referenced by VLayoutPiece::Create(), PatternPieceDialog::CreatePiece(), QT_WARNING_POP::createUnion(), PatternPieceTool::itemChange(), and VPattern::parsePieceElement().
void VAbstractPiece::SetName | ( | const QString & | value | ) |
Definition at line 104 of file vabstractpiece.cpp.
References d.
Referenced by VLayoutPiece::Create(), PatternPieceDialog::CreatePiece(), QT_WARNING_POP::createUnion(), VPattern::parsePieceElement(), and PatternPieceTool::renamePiece().
void VAbstractPiece::SetSAWidth | ( | qreal | value | ) |
Definition at line 201 of file vabstractpiece.cpp.
References d.
Referenced by VLayoutPiece::Create(), and VPiece::setSeamAllowanceWidthFormula().
void VAbstractPiece::SetSeamAllowance | ( | bool | value | ) |
Definition at line 165 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceDialog::CreatePiece(), QT_WARNING_POP::createUnion(), VPattern::parsePieceElement(), VLayoutPiece::setSeamAllowancePoints(), and PatternPieceTool::toggleSeamAllowance().
void VAbstractPiece::SetSeamAllowanceBuiltIn | ( | bool | value | ) |
Definition at line 177 of file vabstractpiece.cpp.
References d.
Referenced by PatternPieceDialog::CreatePiece(), VPattern::parsePieceElement(), and VLayoutPiece::setSeamAllowancePoints().
|
staticprivate |
Definition at line 876 of file vabstractpiece.cpp.
Referenced by createParallelLine().
|
staticprivate |
Definition at line 1035 of file vabstractpiece.cpp.
Referenced by CheckIntersection().
|
static |
Definition at line 256 of file vabstractpiece.cpp.
Referenced by CheckIntersection(), isClockwise(), and VLayoutPiece::Square().
void VAbstractPiece::Swap | ( | VAbstractPiece & | piece | ) |
Definition at line 69 of file vabstractpiece.cpp.
Referenced by VLayoutPiece::Swap(), and VPiece::Swap().
|
private |
Definition at line 231 of file vabstractpiece.h.
Referenced by getColor(), getFill(), getLock(), GetMx(), GetMy(), GetName(), GetSAWidth(), IsForbidFlipping(), isHideSeamLine(), IsSeamAllowance(), IsSeamAllowanceBuiltIn(), operator=(), setColor(), setFill(), SetForbidFlipping(), setHideSeamLine(), setLock(), SetMx(), SetMy(), SetName(), SetSAWidth(), SetSeamAllowance(), and SetSeamAllowanceBuiltIn().