Refactoring. Rename class VPatternInfoGeometry to VPatternLabelData.
--HG-- branch : feature
This commit is contained in:
parent
37efefe1ec
commit
4e3ee3eefd
|
@ -38,7 +38,7 @@
|
|||
#include "dialogs/dialogsavelayout.h"
|
||||
#include "../vlayout/vposter.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||
#include "../vtools/tools/vabstracttool.h"
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#include "../vpatterndb/vpiecenode.h"
|
||||
#include "../vpatterndb/calculator.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||
#include "../vpatterndb/vpiecepath.h"
|
||||
#include "../vpatterndb/vnodedetail.h"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include <Qt>
|
||||
#include <QtDebug>
|
||||
|
||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vmisc/vmath.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
|
@ -111,7 +111,7 @@ VLayoutPiece VLayoutPiece::Create(const VPiece &piece, const VContainer *pattern
|
|||
{
|
||||
det.SetDetail(piece.GetName(), data, qApp->font());
|
||||
}
|
||||
const VPatternInfoGeometry& geom = piece.GetPatternInfo();
|
||||
const VPatternLabelData& geom = piece.GetPatternInfo();
|
||||
if (geom.IsVisible() == true)
|
||||
{
|
||||
VAbstractPattern* pDoc = qApp->getCurrentDocument();
|
||||
|
@ -201,7 +201,7 @@ void VLayoutPiece::SetDetail(const QString& qsName, const VPieceLabelData& data,
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VLayoutPiece::SetPatternInfo(const VAbstractPattern* pDoc, const VPatternInfoGeometry& geom, const QFont &font,
|
||||
void VLayoutPiece::SetPatternInfo(const VAbstractPattern* pDoc, const VPatternLabelData& geom, const QFont &font,
|
||||
qreal dSize, qreal dHeight)
|
||||
{
|
||||
d->patternGeom = geom;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include <QtGlobal>
|
||||
|
||||
#include "../ifc/xml/vabstractpattern.h"
|
||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vcontainer.h"
|
||||
#include "vabstractpiece.h"
|
||||
|
@ -75,7 +75,7 @@ public:
|
|||
|
||||
void SetDetail(const QString &qsName, const VPieceLabelData& data, const QFont& font);
|
||||
|
||||
void SetPatternInfo(const VAbstractPattern* pDoc, const VPatternInfoGeometry& geom, const QFont& font,
|
||||
void SetPatternInfo(const VAbstractPattern* pDoc, const VPatternLabelData& geom, const QFont& font,
|
||||
qreal dSize, qreal dHeight);
|
||||
|
||||
void SetGrainline(const VGrainlineGeometry& geom, const VContainer& rPattern);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <QTransform>
|
||||
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||
#include "../vmisc/diagnostic.h"
|
||||
#include "vlayoutpiecepath.h"
|
||||
|
@ -118,7 +118,7 @@ public:
|
|||
/** @brief detailData detail data */
|
||||
VPieceLabelData detailData;
|
||||
/** @brief patternGeom pattern geometry */
|
||||
VPatternInfoGeometry patternGeom;
|
||||
VPatternLabelData patternGeom;
|
||||
/** @brief grainlineGeom grainline geometry */
|
||||
VGrainlineGeometry grainlineGeom;
|
||||
/** @brief m_tmDetail text manager for laying out detail info */
|
||||
|
|
|
@ -17,14 +17,14 @@ SOURCES += \
|
|||
$$PWD/variables/vmeasurement.cpp \
|
||||
$$PWD/variables/vvariable.cpp \
|
||||
$$PWD/vformula.cpp \
|
||||
$$PWD/vpatterninfogeometry.cpp \
|
||||
$$PWD/vgrainlinegeometry.cpp \
|
||||
$$PWD/variables/vcurveclength.cpp \
|
||||
$$PWD/variables/vellipticalarcradius.cpp \
|
||||
$$PWD/vpiece.cpp \
|
||||
$$PWD/vpiecenode.cpp \
|
||||
$$PWD/vpiecepath.cpp \
|
||||
$$PWD/vpiecelabeldata.cpp
|
||||
$$PWD/vpiecelabeldata.cpp \
|
||||
$$PWD/vpatternlabeldata.cpp
|
||||
|
||||
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
||||
|
||||
|
@ -55,7 +55,6 @@ HEADERS += \
|
|||
$$PWD/variables/vvariable.h \
|
||||
$$PWD/variables/vvariable_p.h \
|
||||
$$PWD/vformula.h \
|
||||
$$PWD/vpatterninfogeometry.h \
|
||||
$$PWD/vgrainlinegeometry.h \
|
||||
$$PWD/variables/vcurveclength.h \
|
||||
$$PWD/variables/vellipticalarcradius.h \
|
||||
|
@ -65,4 +64,5 @@ HEADERS += \
|
|||
$$PWD/vpiecenode_p.h \
|
||||
$$PWD/vpiecepath.h \
|
||||
$$PWD/vpiecepath_p.h \
|
||||
$$PWD/vpiecelabeldata.h
|
||||
$$PWD/vpiecelabeldata.h \
|
||||
$$PWD/vpatternlabeldata.h
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vpatterninfogeometry.cpp
|
||||
** @file vpatternlabeldata.cpp
|
||||
** @author Bojan Kverh
|
||||
** @date June 16, 2016
|
||||
**
|
||||
|
@ -26,82 +26,82 @@
|
|||
**
|
||||
*************************************************************************/
|
||||
|
||||
#include "vpatterninfogeometry.h"
|
||||
#include "vpatternlabeldata.h"
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPatternInfoGeometry::VPatternInfoGeometry()
|
||||
VPatternLabelData::VPatternLabelData()
|
||||
:m_ptPos(0, 0), m_dLabelWidth(0), m_dLabelHeight(0), m_iFontSize(0),
|
||||
m_dRotation(0), m_bVisible(true)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QPointF VPatternInfoGeometry::GetPos() const
|
||||
QPointF VPatternLabelData::GetPos() const
|
||||
{
|
||||
return m_ptPos;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPatternInfoGeometry::SetPos(const QPointF& ptPos)
|
||||
void VPatternLabelData::SetPos(const QPointF& ptPos)
|
||||
{
|
||||
m_ptPos = ptPos;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
qreal VPatternInfoGeometry::GetLabelWidth() const
|
||||
qreal VPatternLabelData::GetLabelWidth() const
|
||||
{
|
||||
return m_dLabelWidth;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPatternInfoGeometry::SetLabelWidth(qreal dLabelW)
|
||||
void VPatternLabelData::SetLabelWidth(qreal dLabelW)
|
||||
{
|
||||
m_dLabelWidth = dLabelW;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
qreal VPatternInfoGeometry::GetLabelHeight() const
|
||||
qreal VPatternLabelData::GetLabelHeight() const
|
||||
{
|
||||
return m_dLabelHeight;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPatternInfoGeometry::SetLabelHeight(qreal dLabelH)
|
||||
void VPatternLabelData::SetLabelHeight(qreal dLabelH)
|
||||
{
|
||||
m_dLabelHeight = dLabelH;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
int VPatternInfoGeometry::GetFontSize() const
|
||||
int VPatternLabelData::GetFontSize() const
|
||||
{
|
||||
return m_iFontSize;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPatternInfoGeometry::SetFontSize(int iSize)
|
||||
void VPatternLabelData::SetFontSize(int iSize)
|
||||
{
|
||||
m_iFontSize = iSize;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
qreal VPatternInfoGeometry::GetRotation() const
|
||||
qreal VPatternLabelData::GetRotation() const
|
||||
{
|
||||
return m_dRotation;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPatternInfoGeometry::SetRotation(qreal dRot)
|
||||
void VPatternLabelData::SetRotation(qreal dRot)
|
||||
{
|
||||
m_dRotation = dRot;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
bool VPatternInfoGeometry::IsVisible() const
|
||||
bool VPatternLabelData::IsVisible() const
|
||||
{
|
||||
return m_bVisible;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPatternInfoGeometry::SetVisible(bool bVal)
|
||||
void VPatternLabelData::SetVisible(bool bVal)
|
||||
{
|
||||
m_bVisible = bVal;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vpatterninfogeometry.h
|
||||
** @file vpatternlabeldata.h
|
||||
** @author Bojan Kverh
|
||||
** @date June 16, 2016
|
||||
**
|
||||
|
@ -33,12 +33,12 @@
|
|||
#include <QtGlobal>
|
||||
|
||||
/**
|
||||
* @brief The VPatternInfoGeometry class holds the information about pattern info label geometry
|
||||
* @brief The VPatternLabelData class holds the information about pattern info label geometry
|
||||
*/
|
||||
class VPatternInfoGeometry
|
||||
class VPatternLabelData
|
||||
{
|
||||
public:
|
||||
VPatternInfoGeometry();
|
||||
VPatternLabelData();
|
||||
|
||||
// methods, which set up label parameters
|
||||
QPointF GetPos() const;
|
|
@ -439,7 +439,7 @@ const VPieceLabelData &VPiece::GetPatternPieceData() const
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPiece::SetPatternInfo(const VPatternInfoGeometry &info)
|
||||
void VPiece::SetPatternInfo(const VPatternLabelData &info)
|
||||
{
|
||||
d->m_piPatternInfo = info;
|
||||
}
|
||||
|
@ -449,7 +449,7 @@ void VPiece::SetPatternInfo(const VPatternInfoGeometry &info)
|
|||
* @brief Returns full access to the pattern info geometry object
|
||||
* @return pattern info geometry object
|
||||
*/
|
||||
VPatternInfoGeometry &VPiece::GetPatternInfo()
|
||||
VPatternLabelData &VPiece::GetPatternInfo()
|
||||
{
|
||||
return d->m_piPatternInfo;
|
||||
}
|
||||
|
@ -459,7 +459,7 @@ VPatternInfoGeometry &VPiece::GetPatternInfo()
|
|||
* @brief Returns the read only reference to the pattern info geometry object
|
||||
* @return pattern info geometry object
|
||||
*/
|
||||
const VPatternInfoGeometry &VPiece::GetPatternInfo() const
|
||||
const VPatternLabelData &VPiece::GetPatternInfo() const
|
||||
{
|
||||
return d->m_piPatternInfo;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ class VPieceNode;
|
|||
template <class T> class QVector;
|
||||
template <class T>class QSharedPointer;
|
||||
class VPiecePath;
|
||||
class VPatternInfoGeometry;
|
||||
class VPatternLabelData;
|
||||
class VPieceLabelData;
|
||||
class VGrainlineGeometry;
|
||||
class VContainer;
|
||||
|
@ -101,9 +101,9 @@ public:
|
|||
VPieceLabelData& GetPatternPieceData();
|
||||
const VPieceLabelData& GetPatternPieceData() const;
|
||||
|
||||
void SetPatternInfo(const VPatternInfoGeometry &info);
|
||||
VPatternInfoGeometry& GetPatternInfo();
|
||||
const VPatternInfoGeometry& GetPatternInfo() const;
|
||||
void SetPatternInfo(const VPatternLabelData &info);
|
||||
VPatternLabelData& GetPatternInfo();
|
||||
const VPatternLabelData& GetPatternInfo() const;
|
||||
|
||||
VGrainlineGeometry& GetGrainlineGeometry();
|
||||
const VGrainlineGeometry& GetGrainlineGeometry() const;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "vpiecenode.h"
|
||||
#include "vpiecepath.h"
|
||||
#include "vpiecelabeldata.h"
|
||||
#include "vpatterninfogeometry.h"
|
||||
#include "vpatternlabeldata.h"
|
||||
#include "vgrainlinegeometry.h"
|
||||
|
||||
QT_WARNING_PUSH
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
VPieceLabelData m_ppData;
|
||||
|
||||
/** @brief Pattern info coordinates */
|
||||
VPatternInfoGeometry m_piPatternInfo;
|
||||
VPatternLabelData m_piPatternInfo;
|
||||
|
||||
/** @brief m_glGrainline grainline geometry object*/
|
||||
VGrainlineGeometry m_glGrainline;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include "dialogtool.h"
|
||||
#include "../vpatterndb/vpiece.h"
|
||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||
|
||||
|
@ -137,7 +137,7 @@ private:
|
|||
MCPContainer m_conMCP;
|
||||
|
||||
VPieceLabelData m_oldData;
|
||||
VPatternInfoGeometry m_oldGeom;
|
||||
VPatternLabelData m_oldGeom;
|
||||
VGrainlineGeometry m_oldGrainline;
|
||||
int m_iRotBaseHeight;
|
||||
int m_iLenBaseHeight;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "../vpatterndb/vpiecenode.h"
|
||||
#include "../vpatterndb/vpiecepath.h"
|
||||
#include "../vpatterndb/calculator.h"
|
||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "nodeDetails/vnodearc.h"
|
||||
#include "nodeDetails/vnodeellipticalarc.h"
|
||||
|
@ -272,7 +272,7 @@ void VToolSeamAllowance::AddPatternPieceData(VAbstractPattern *doc, QDomElement
|
|||
void VToolSeamAllowance::AddPatternInfo(VAbstractPattern *doc, QDomElement &domElement, const VPiece &piece)
|
||||
{
|
||||
QDomElement domData = doc->createElement(VAbstractPattern::TagPatternInfo);
|
||||
const VPatternInfoGeometry& geom = piece.GetPatternInfo();
|
||||
const VPatternLabelData& geom = piece.GetPatternInfo();
|
||||
doc->SetAttribute(domData, VAbstractPattern::AttrVisible, geom.IsVisible() == true ? trueStr : falseStr);
|
||||
doc->SetAttribute(domData, AttrMx, geom.GetPos().x());
|
||||
doc->SetAttribute(domData, AttrMy, geom.GetPos().y());
|
||||
|
@ -460,7 +460,7 @@ void VToolSeamAllowance::UpdateLabel()
|
|||
void VToolSeamAllowance::UpdatePatternInfo()
|
||||
{
|
||||
const VPiece detail = VAbstractTool::data.GetPiece(id);
|
||||
const VPatternInfoGeometry& geom = detail.GetPatternInfo();
|
||||
const VPatternLabelData& geom = detail.GetPatternInfo();
|
||||
|
||||
if (geom.IsVisible() == true)
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "../vmisc/logging.h"
|
||||
#include "../vmisc/def.h"
|
||||
#include "../vpatterndb/vpiecenode.h"
|
||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||
#include "../tools/vtoolseamallowance.h"
|
||||
|
|
Loading…
Reference in New Issue
Block a user