New piece attribute "united".

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-11-23 18:40:27 +02:00
parent 826411d595
commit 965e588a9d
7 changed files with 25 additions and 2 deletions

View File

@ -624,6 +624,7 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document
detail.SetForbidFlipping(GetParametrBool(domElement, VToolSeamAllowance::AttrForbidFlipping,
QString().setNum(qApp->ValentinaSettings()->GetForbidWorkpieceFlipping())));
detail.SetInLayout(GetParametrBool(domElement, AttrInLayout, trueStr));
detail.SetUnited(GetParametrBool(domElement, VToolSeamAllowance::AttrUnited, falseStr));
const QStringList tags = QStringList() << VToolSeamAllowance::TagNodes
<< TagData

View File

@ -420,6 +420,7 @@
<xs:attribute name="forbidFlipping" type="xs:boolean"></xs:attribute>
<xs:attribute name="width" type="xs:double"></xs:attribute>
<xs:attribute name="seamAllowance" type="xs:boolean"></xs:attribute>
<xs:attribute name="united" type="xs:boolean"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>

View File

@ -219,6 +219,18 @@ void VPiece::SetInLayout(bool inLayout)
d->m_inLayout = inLayout;
}
//---------------------------------------------------------------------------------------------------------------------
bool VPiece::IsUnited() const
{
return d->m_united;
}
//---------------------------------------------------------------------------------------------------------------------
void VPiece::SetUnited(bool united)
{
d->m_united = united;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief Missing find missing nodes in detail. When we deleted object in detail and return this detail need

View File

@ -72,6 +72,9 @@ public:
bool IsInLayout() const;
void SetInLayout(bool inLayout);
bool IsUnited() const;
void SetUnited(bool united);
QVector<VPieceNode> Missing(const VPiece &det) const;
int indexOfNode(const quint32 &id) const;

View File

@ -46,7 +46,8 @@ public:
: m_path(),
m_mx(0),
m_my(0),
m_inLayout(true)
m_inLayout(true),
m_united(false)
{}
VPieceData(const VPieceData &detail)
@ -54,7 +55,8 @@ public:
m_path(detail.m_path),
m_mx(detail.m_mx),
m_my(detail.m_my),
m_inLayout(detail.m_inLayout)
m_inLayout(detail.m_inLayout),
m_united(detail.m_united)
{}
~VPieceData();
@ -66,6 +68,7 @@ public:
qreal m_my;
bool m_inLayout;
bool m_united;
private:
VPieceData &operator=(const VPieceData &) Q_DECL_EQ_DELETE;

View File

@ -67,6 +67,7 @@ const QString VToolSeamAllowance::AttrSeamAllowance = QStringLiteral("seamAllow
const QString VToolSeamAllowance::AttrWidth = QStringLiteral("width");
const QString VToolSeamAllowance::AttrSABefore = QStringLiteral("before");
const QString VToolSeamAllowance::AttrSAAfter = QStringLiteral("after");
const QString VToolSeamAllowance::AttrUnited = QStringLiteral("united");
const QString VToolSeamAllowance::NodeArc = QStringLiteral("NodeArc");
const QString VToolSeamAllowance::NodePoint = QStringLiteral("NodePoint");
@ -278,6 +279,7 @@ void VToolSeamAllowance::AddAttributes(VAbstractPattern *doc, QDomElement &domEl
doc->SetAttribute(domElement, AttrForbidFlipping, piece.IsForbidFlipping());
doc->SetAttribute(domElement, AttrSeamAllowance, piece.IsSeamAllowance());
doc->SetAttribute(domElement, AttrWidth, piece.GetSAWidth());
doc->SetAttribute(domElement, AttrUnited, piece.IsUnited());
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -64,6 +64,7 @@ public:
static const QString AttrWidth;
static const QString AttrSABefore;
static const QString AttrSAAfter;
static const QString AttrUnited;
static const QString NodeArc;
static const QString NodePoint;