Added pin point ids.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-02-23 13:36:56 +02:00
parent 3cfefbe698
commit c5c3c73429
4 changed files with 80 additions and 7 deletions

View File

@ -29,13 +29,16 @@
#include <QPointF>
#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;
}

View File

@ -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

View File

@ -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;
}

View File

@ -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