diff --git a/src/libs/vpatterndb/floatItemData/vgrainlinedata.cpp b/src/libs/vpatterndb/floatItemData/vgrainlinedata.cpp index 2fcdd3310..4650cae7e 100644 --- a/src/libs/vpatterndb/floatItemData/vgrainlinedata.cpp +++ b/src/libs/vpatterndb/floatItemData/vgrainlinedata.cpp @@ -29,13 +29,16 @@ #include #include "vgrainlinedata.h" +#include "../ifc/ifcdef.h" //--------------------------------------------------------------------------------------------------------------------- VGrainlineData::VGrainlineData() : VAbstractFloatItemData(), m_qsLength(), m_dRotation(), - m_eArrowType(atBoth) + m_eArrowType(atBoth), + m_topPin(NULL_ID), + m_bottomPin(NULL_ID) {} //--------------------------------------------------------------------------------------------------------------------- @@ -77,3 +80,27 @@ void VGrainlineData::SetArrowType(ArrowType eAT) { m_eArrowType = eAT; } + +//--------------------------------------------------------------------------------------------------------------------- +quint32 VGrainlineData::TopPin() const +{ + return m_topPin; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VGrainlineData::SetTopPin(const quint32 &topPin) +{ + m_topPin = topPin; +} + +//--------------------------------------------------------------------------------------------------------------------- +quint32 VGrainlineData::BottomPin() const +{ + return m_bottomPin; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VGrainlineData::SetBottomPin(const quint32 &bottomPin) +{ + m_bottomPin = bottomPin; +} diff --git a/src/libs/vpatterndb/floatItemData/vgrainlinedata.h b/src/libs/vpatterndb/floatItemData/vgrainlinedata.h index 1d79b146d..01218c1c5 100644 --- a/src/libs/vpatterndb/floatItemData/vgrainlinedata.h +++ b/src/libs/vpatterndb/floatItemData/vgrainlinedata.h @@ -62,6 +62,12 @@ public: ArrowType GetArrowType() const; void SetArrowType(ArrowType eAT); + quint32 TopPin() const; + void SetTopPin(const quint32 &topPin); + + quint32 BottomPin() const; + void SetBottomPin(const quint32 &bottomPin); + private: /** @brief m_dLength formula to calculate the length of grainline */ QString m_qsLength; @@ -69,6 +75,10 @@ private: QString m_dRotation; /** @brief m_eArrowType type of arrow on the grainline */ ArrowType m_eArrowType; + /** @brief m_topPin top pin id */ + quint32 m_topPin; + /** @brief m_bottomPin bottom pin id */ + quint32 m_bottomPin; }; #endif // VGRAINLINEGEOMETRY_H diff --git a/src/libs/vpatterndb/floatItemData/vpatternlabeldata.cpp b/src/libs/vpatterndb/floatItemData/vpatternlabeldata.cpp index ee987a639..f82009563 100644 --- a/src/libs/vpatterndb/floatItemData/vpatternlabeldata.cpp +++ b/src/libs/vpatterndb/floatItemData/vpatternlabeldata.cpp @@ -27,6 +27,7 @@ *************************************************************************/ #include "vpatternlabeldata.h" +#include "../ifc/ifcdef.h" //--------------------------------------------------------------------------------------------------------------------- VPatternLabelData::VPatternLabelData() @@ -34,7 +35,9 @@ VPatternLabelData::VPatternLabelData() m_dLabelWidth(0), m_dLabelHeight(0), m_iFontSize(0), - m_dRotation(0) + m_dRotation(0), + m_topLeftPin(NULL_ID), + m_bottomRightPin(NULL_ID) {} //--------------------------------------------------------------------------------------------------------------------- @@ -88,3 +91,27 @@ void VPatternLabelData::SetRotation(qreal dRot) { m_dRotation = dRot; } + +//--------------------------------------------------------------------------------------------------------------------- +quint32 VPatternLabelData::TopLeftPin() const +{ + return m_topLeftPin; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPatternLabelData::SetTopLeftPin(const quint32 &topLeftPin) +{ + m_topLeftPin = topLeftPin; +} + +//--------------------------------------------------------------------------------------------------------------------- +quint32 VPatternLabelData::BottomRightPin() const +{ + return m_bottomRightPin; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPatternLabelData::SetBottomRightPin(const quint32 &bottomRightPin) +{ + m_bottomRightPin = bottomRightPin; +} diff --git a/src/libs/vpatterndb/floatItemData/vpatternlabeldata.h b/src/libs/vpatterndb/floatItemData/vpatternlabeldata.h index 0a05dd7b8..97a79f260 100644 --- a/src/libs/vpatterndb/floatItemData/vpatternlabeldata.h +++ b/src/libs/vpatterndb/floatItemData/vpatternlabeldata.h @@ -55,16 +55,25 @@ public: qreal GetRotation() const; void SetRotation(qreal dRot); + quint32 TopLeftPin() const; + void SetTopLeftPin(const quint32 &topLeftPin); + + quint32 BottomRightPin() const; + void SetBottomRightPin(const quint32 &bottomRightPin); + protected: /** @brief m_dLabelWidth label width */ - qreal m_dLabelWidth; + qreal m_dLabelWidth; /** @brief m_dLabelHeight label height */ - qreal m_dLabelHeight; + qreal m_dLabelHeight; /** @brief m_iFontSize label text base font size */ - int m_iFontSize; + int m_iFontSize; /** @brief m_dRotation label rotation */ - qreal m_dRotation; - + qreal m_dRotation; + /** @brief m_topLeftPin top left corner pin id */ + quint32 m_topLeftPin; + /** @brief m_bottomRightPin bottom right corner pin id */ + quint32 m_bottomRightPin; }; #endif // VPATTERNINFOGEOMETRY_H