Refactoring. Rename class VPatternPieceData to VPieceLabelData.
--HG-- branch : feature
This commit is contained in:
parent
e7651c7194
commit
37efefe1ec
|
@ -37,7 +37,7 @@
|
||||||
#include "dialogs/dialoglayoutprogress.h"
|
#include "dialogs/dialoglayoutprogress.h"
|
||||||
#include "dialogs/dialogsavelayout.h"
|
#include "dialogs/dialogsavelayout.h"
|
||||||
#include "../vlayout/vposter.h"
|
#include "../vlayout/vposter.h"
|
||||||
#include "../vpatterndb/vpatternpiecedata.h"
|
#include "../vpatterndb/vpiecelabeldata.h"
|
||||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||||
#include "../vtools/tools/vabstracttool.h"
|
#include "../vtools/tools/vabstracttool.h"
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
#include "../core/vapplication.h"
|
#include "../core/vapplication.h"
|
||||||
#include "../vpatterndb/vpiecenode.h"
|
#include "../vpatterndb/vpiecenode.h"
|
||||||
#include "../vpatterndb/calculator.h"
|
#include "../vpatterndb/calculator.h"
|
||||||
#include "../vpatterndb/vpatternpiecedata.h"
|
#include "../vpatterndb/vpiecelabeldata.h"
|
||||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||||
#include "../vpatterndb/vpiecepath.h"
|
#include "../vpatterndb/vpiecepath.h"
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||||
#include "../vpatterndb/vpatternpiecedata.h"
|
#include "../vpatterndb/vpiecelabeldata.h"
|
||||||
#include "../vmisc/vmath.h"
|
#include "../vmisc/vmath.h"
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "../vpatterndb/calculator.h"
|
#include "../vpatterndb/calculator.h"
|
||||||
|
@ -106,7 +106,7 @@ VLayoutPiece VLayoutPiece::Create(const VPiece &piece, const VContainer *pattern
|
||||||
det.SetInternalPaths(ConvertInternalPaths(piece, pattern));
|
det.SetInternalPaths(ConvertInternalPaths(piece, pattern));
|
||||||
|
|
||||||
det.SetName(piece.GetName());
|
det.SetName(piece.GetName());
|
||||||
const VPatternPieceData& data = piece.GetPatternPieceData();
|
const VPieceLabelData& data = piece.GetPatternPieceData();
|
||||||
if (data.IsVisible() == true)
|
if (data.IsVisible() == true)
|
||||||
{
|
{
|
||||||
det.SetDetail(piece.GetName(), data, qApp->font());
|
det.SetDetail(piece.GetName(), data, qApp->font());
|
||||||
|
@ -175,7 +175,7 @@ QVector<QPointF> VLayoutPiece::GetLayoutAllowancePoints() const
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VLayoutPiece::SetDetail(const QString& qsName, const VPatternPieceData& data, const QFont &font)
|
void VLayoutPiece::SetDetail(const QString& qsName, const VPieceLabelData& data, const QFont &font)
|
||||||
{
|
{
|
||||||
d->detailData = data;
|
d->detailData = data;
|
||||||
qreal dAng = qDegreesToRadians(data.GetRotation());
|
qreal dAng = qDegreesToRadians(data.GetRotation());
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
#include "../ifc/xml/vabstractpattern.h"
|
#include "../ifc/xml/vabstractpattern.h"
|
||||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||||
#include "../vpatterndb/vpatternpiecedata.h"
|
#include "../vpatterndb/vpiecelabeldata.h"
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "vabstractpiece.h"
|
#include "vabstractpiece.h"
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public:
|
||||||
QVector<VLayoutPiecePath> GetInternalPaths() const;
|
QVector<VLayoutPiecePath> GetInternalPaths() const;
|
||||||
void SetInternalPaths(const QVector<VLayoutPiecePath> &internalPaths);
|
void SetInternalPaths(const QVector<VLayoutPiecePath> &internalPaths);
|
||||||
|
|
||||||
void SetDetail(const QString &qsName, const VPatternPieceData& data, const QFont& font);
|
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 VPatternInfoGeometry& geom, const QFont& font,
|
||||||
qreal dSize, qreal dHeight);
|
qreal dSize, qreal dHeight);
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QTransform>
|
#include <QTransform>
|
||||||
|
|
||||||
#include "../vpatterndb/vpatternpiecedata.h"
|
#include "../vpatterndb/vpiecelabeldata.h"
|
||||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||||
#include "../vmisc/diagnostic.h"
|
#include "../vmisc/diagnostic.h"
|
||||||
|
@ -116,7 +116,7 @@ public:
|
||||||
/** @brief grainlineInfo line */
|
/** @brief grainlineInfo line */
|
||||||
QVector<QPointF> grainlinePoints;
|
QVector<QPointF> grainlinePoints;
|
||||||
/** @brief detailData detail data */
|
/** @brief detailData detail data */
|
||||||
VPatternPieceData detailData;
|
VPieceLabelData detailData;
|
||||||
/** @brief patternGeom pattern geometry */
|
/** @brief patternGeom pattern geometry */
|
||||||
VPatternInfoGeometry patternGeom;
|
VPatternInfoGeometry patternGeom;
|
||||||
/** @brief grainlineGeom grainline geometry */
|
/** @brief grainlineGeom grainline geometry */
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "../ifc/xml/vabstractpattern.h"
|
#include "../ifc/xml/vabstractpattern.h"
|
||||||
#include "../vpatterndb/vpatternpiecedata.h"
|
#include "../vpatterndb/vpiecelabeldata.h"
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "../vmisc/vmath.h"
|
#include "../vmisc/vmath.h"
|
||||||
#include "vtextmanager.h"
|
#include "vtextmanager.h"
|
||||||
|
@ -238,7 +238,7 @@ void VTextManager::FitFontSize(qreal fW, qreal fH)
|
||||||
* @param qsName detail name
|
* @param qsName detail name
|
||||||
* @param data reference to the detail data
|
* @param data reference to the detail data
|
||||||
*/
|
*/
|
||||||
void VTextManager::Update(const QString& qsName, const VPatternPieceData& data)
|
void VTextManager::Update(const QString& qsName, const VPieceLabelData& data)
|
||||||
{
|
{
|
||||||
ClearSourceLines();
|
ClearSourceLines();
|
||||||
TextLine tl;
|
TextLine tl;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
class VPatternPieceData;
|
class VPieceLabelData;
|
||||||
class VAbstractPattern;
|
class VAbstractPattern;
|
||||||
|
|
||||||
#define MIN_FONT_SIZE 5
|
#define MIN_FONT_SIZE 5
|
||||||
|
@ -85,7 +85,7 @@ public:
|
||||||
int GetSourceLinesCount() const;
|
int GetSourceLinesCount() const;
|
||||||
const TextLine& GetSourceLine(int i) const;
|
const TextLine& GetSourceLine(int i) const;
|
||||||
|
|
||||||
void Update(const QString& qsName, const VPatternPieceData& data);
|
void Update(const QString& qsName, const VPieceLabelData& data);
|
||||||
void Update(const VAbstractPattern* pDoc, qreal dSize, qreal dHeight);
|
void Update(const VAbstractPattern* pDoc, qreal dSize, qreal dHeight);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -17,14 +17,14 @@ SOURCES += \
|
||||||
$$PWD/variables/vmeasurement.cpp \
|
$$PWD/variables/vmeasurement.cpp \
|
||||||
$$PWD/variables/vvariable.cpp \
|
$$PWD/variables/vvariable.cpp \
|
||||||
$$PWD/vformula.cpp \
|
$$PWD/vformula.cpp \
|
||||||
$$PWD/vpatternpiecedata.cpp \
|
|
||||||
$$PWD/vpatterninfogeometry.cpp \
|
$$PWD/vpatterninfogeometry.cpp \
|
||||||
$$PWD/vgrainlinegeometry.cpp \
|
$$PWD/vgrainlinegeometry.cpp \
|
||||||
$$PWD/variables/vcurveclength.cpp \
|
$$PWD/variables/vcurveclength.cpp \
|
||||||
$$PWD/variables/vellipticalarcradius.cpp \
|
$$PWD/variables/vellipticalarcradius.cpp \
|
||||||
$$PWD/vpiece.cpp \
|
$$PWD/vpiece.cpp \
|
||||||
$$PWD/vpiecenode.cpp \
|
$$PWD/vpiecenode.cpp \
|
||||||
$$PWD/vpiecepath.cpp
|
$$PWD/vpiecepath.cpp \
|
||||||
|
$$PWD/vpiecelabeldata.cpp
|
||||||
|
|
||||||
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
||||||
|
|
||||||
|
@ -55,7 +55,6 @@ HEADERS += \
|
||||||
$$PWD/variables/vvariable.h \
|
$$PWD/variables/vvariable.h \
|
||||||
$$PWD/variables/vvariable_p.h \
|
$$PWD/variables/vvariable_p.h \
|
||||||
$$PWD/vformula.h \
|
$$PWD/vformula.h \
|
||||||
$$PWD/vpatternpiecedata.h \
|
|
||||||
$$PWD/vpatterninfogeometry.h \
|
$$PWD/vpatterninfogeometry.h \
|
||||||
$$PWD/vgrainlinegeometry.h \
|
$$PWD/vgrainlinegeometry.h \
|
||||||
$$PWD/variables/vcurveclength.h \
|
$$PWD/variables/vcurveclength.h \
|
||||||
|
@ -65,4 +64,5 @@ HEADERS += \
|
||||||
$$PWD/vpiecenode.h \
|
$$PWD/vpiecenode.h \
|
||||||
$$PWD/vpiecenode_p.h \
|
$$PWD/vpiecenode_p.h \
|
||||||
$$PWD/vpiecepath.h \
|
$$PWD/vpiecepath.h \
|
||||||
$$PWD/vpiecepath_p.h
|
$$PWD/vpiecepath_p.h \
|
||||||
|
$$PWD/vpiecelabeldata.h
|
||||||
|
|
|
@ -413,7 +413,7 @@ QVector<quint32> VPiece::MissingPins(const VPiece &det) const
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPiece::SetPatternPieceData(const VPatternPieceData &data)
|
void VPiece::SetPatternPieceData(const VPieceLabelData &data)
|
||||||
{
|
{
|
||||||
d->m_ppData = data;
|
d->m_ppData = data;
|
||||||
}
|
}
|
||||||
|
@ -423,7 +423,7 @@ void VPiece::SetPatternPieceData(const VPatternPieceData &data)
|
||||||
* @brief Returns full access to the pattern piece data object
|
* @brief Returns full access to the pattern piece data object
|
||||||
* @return pattern piece data object
|
* @return pattern piece data object
|
||||||
*/
|
*/
|
||||||
VPatternPieceData &VPiece::GetPatternPieceData()
|
VPieceLabelData &VPiece::GetPatternPieceData()
|
||||||
{
|
{
|
||||||
return d->m_ppData;
|
return d->m_ppData;
|
||||||
}
|
}
|
||||||
|
@ -433,7 +433,7 @@ VPatternPieceData &VPiece::GetPatternPieceData()
|
||||||
* @brief Returns the read only reference to the pattern piece data object
|
* @brief Returns the read only reference to the pattern piece data object
|
||||||
* @return pattern piece data object
|
* @return pattern piece data object
|
||||||
*/
|
*/
|
||||||
const VPatternPieceData &VPiece::GetPatternPieceData() const
|
const VPieceLabelData &VPiece::GetPatternPieceData() const
|
||||||
{
|
{
|
||||||
return d->m_ppData;
|
return d->m_ppData;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ template <class T> class QVector;
|
||||||
template <class T>class QSharedPointer;
|
template <class T>class QSharedPointer;
|
||||||
class VPiecePath;
|
class VPiecePath;
|
||||||
class VPatternInfoGeometry;
|
class VPatternInfoGeometry;
|
||||||
class VPatternPieceData;
|
class VPieceLabelData;
|
||||||
class VGrainlineGeometry;
|
class VGrainlineGeometry;
|
||||||
class VContainer;
|
class VContainer;
|
||||||
class QPainterPath;
|
class QPainterPath;
|
||||||
|
@ -97,9 +97,9 @@ public:
|
||||||
QVector<quint32> MissingInternalPaths(const VPiece &det) const;
|
QVector<quint32> MissingInternalPaths(const VPiece &det) const;
|
||||||
QVector<quint32> MissingPins(const VPiece &det) const;
|
QVector<quint32> MissingPins(const VPiece &det) const;
|
||||||
|
|
||||||
void SetPatternPieceData(const VPatternPieceData &data);
|
void SetPatternPieceData(const VPieceLabelData &data);
|
||||||
VPatternPieceData& GetPatternPieceData();
|
VPieceLabelData& GetPatternPieceData();
|
||||||
const VPatternPieceData& GetPatternPieceData() const;
|
const VPieceLabelData& GetPatternPieceData() const;
|
||||||
|
|
||||||
void SetPatternInfo(const VPatternInfoGeometry &info);
|
void SetPatternInfo(const VPatternInfoGeometry &info);
|
||||||
VPatternInfoGeometry& GetPatternInfo();
|
VPatternInfoGeometry& GetPatternInfo();
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "../vmisc/def.h"
|
#include "../vmisc/def.h"
|
||||||
#include "vpiecenode.h"
|
#include "vpiecenode.h"
|
||||||
#include "vpiecepath.h"
|
#include "vpiecepath.h"
|
||||||
#include "vpatternpiecedata.h"
|
#include "vpiecelabeldata.h"
|
||||||
#include "vpatterninfogeometry.h"
|
#include "vpatterninfogeometry.h"
|
||||||
#include "vgrainlinegeometry.h"
|
#include "vgrainlinegeometry.h"
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ public:
|
||||||
QVector<quint32> m_pins;
|
QVector<quint32> m_pins;
|
||||||
|
|
||||||
/** @brief Pattern piece data */
|
/** @brief Pattern piece data */
|
||||||
VPatternPieceData m_ppData;
|
VPieceLabelData m_ppData;
|
||||||
|
|
||||||
/** @brief Pattern info coordinates */
|
/** @brief Pattern info coordinates */
|
||||||
VPatternInfoGeometry m_piPatternInfo;
|
VPatternInfoGeometry m_piPatternInfo;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
**
|
**
|
||||||
** @file vpatternpiecedata.cpp
|
** @file vpiecelabeldata.cpp
|
||||||
** @author Bojan Kverh
|
** @author Bojan Kverh
|
||||||
** @date June 16, 2016
|
** @date June 16, 2016
|
||||||
**
|
**
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
**
|
**
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "vpatternpiecedata.h"
|
#include "vpiecelabeldata.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
MaterialCutPlacement::MaterialCutPlacement()
|
MaterialCutPlacement::MaterialCutPlacement()
|
||||||
|
@ -34,19 +34,19 @@ MaterialCutPlacement::MaterialCutPlacement()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VPatternPieceData::VPatternPieceData()
|
VPieceLabelData::VPieceLabelData()
|
||||||
:m_qsLetter(), m_conMCP(), m_ptPos(0, 0), m_dLabelWidth(0), m_dLabelHeight(0),
|
:m_qsLetter(), m_conMCP(), m_ptPos(0, 0), m_dLabelWidth(0), m_dLabelHeight(0),
|
||||||
m_iFontSize(0), m_dRotation(0), m_bVisible(true)
|
m_iFontSize(0), m_dRotation(0), m_bVisible(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::Append(const MaterialCutPlacement& rMCP)
|
void VPieceLabelData::Append(const MaterialCutPlacement& rMCP)
|
||||||
{
|
{
|
||||||
m_conMCP.append(rMCP);
|
m_conMCP.append(rMCP);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::Insert(int i, const MaterialCutPlacement& rMCP)
|
void VPieceLabelData::Insert(int i, const MaterialCutPlacement& rMCP)
|
||||||
{
|
{
|
||||||
Q_ASSERT(i >= 0);
|
Q_ASSERT(i >= 0);
|
||||||
Q_ASSERT(i <= GetMCPCount());
|
Q_ASSERT(i <= GetMCPCount());
|
||||||
|
@ -54,7 +54,7 @@ void VPatternPieceData::Insert(int i, const MaterialCutPlacement& rMCP)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::Set(int i, const MaterialCutPlacement& rMCP)
|
void VPieceLabelData::Set(int i, const MaterialCutPlacement& rMCP)
|
||||||
{
|
{
|
||||||
Q_ASSERT(i >= 0);
|
Q_ASSERT(i >= 0);
|
||||||
Q_ASSERT(i < GetMCPCount());
|
Q_ASSERT(i < GetMCPCount());
|
||||||
|
@ -62,13 +62,13 @@ void VPatternPieceData::Set(int i, const MaterialCutPlacement& rMCP)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
int VPatternPieceData::GetMCPCount() const
|
int VPieceLabelData::GetMCPCount() const
|
||||||
{
|
{
|
||||||
return m_conMCP.count();
|
return m_conMCP.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
const MaterialCutPlacement& VPatternPieceData::GetMCP(int i) const
|
const MaterialCutPlacement& VPieceLabelData::GetMCP(int i) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(i >= 0);
|
Q_ASSERT(i >= 0);
|
||||||
Q_ASSERT(i < GetMCPCount());
|
Q_ASSERT(i < GetMCPCount());
|
||||||
|
@ -76,7 +76,7 @@ const MaterialCutPlacement& VPatternPieceData::GetMCP(int i) const
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::RemoveMCP(int i)
|
void VPieceLabelData::RemoveMCP(int i)
|
||||||
{
|
{
|
||||||
Q_ASSERT(i >= 0);
|
Q_ASSERT(i >= 0);
|
||||||
Q_ASSERT(i < GetMCPCount());
|
Q_ASSERT(i < GetMCPCount());
|
||||||
|
@ -84,92 +84,92 @@ void VPatternPieceData::RemoveMCP(int i)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::Clear()
|
void VPieceLabelData::Clear()
|
||||||
{
|
{
|
||||||
m_qsLetter.clear();
|
m_qsLetter.clear();
|
||||||
m_conMCP.clear();
|
m_conMCP.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
const QString& VPatternPieceData::GetLetter() const
|
const QString& VPieceLabelData::GetLetter() const
|
||||||
{
|
{
|
||||||
return m_qsLetter;
|
return m_qsLetter;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::SetLetter(QString qsLetter)
|
void VPieceLabelData::SetLetter(QString qsLetter)
|
||||||
{
|
{
|
||||||
m_qsLetter = qsLetter.left(3);
|
m_qsLetter = qsLetter.left(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QPointF VPatternPieceData::GetPos() const
|
QPointF VPieceLabelData::GetPos() const
|
||||||
{
|
{
|
||||||
return m_ptPos;
|
return m_ptPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::SetPos(const QPointF& ptPos)
|
void VPieceLabelData::SetPos(const QPointF& ptPos)
|
||||||
{
|
{
|
||||||
m_ptPos = ptPos;
|
m_ptPos = ptPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
qreal VPatternPieceData::GetLabelWidth() const
|
qreal VPieceLabelData::GetLabelWidth() const
|
||||||
{
|
{
|
||||||
return m_dLabelWidth;
|
return m_dLabelWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::SetLabelWidth(qreal dLabelW)
|
void VPieceLabelData::SetLabelWidth(qreal dLabelW)
|
||||||
{
|
{
|
||||||
m_dLabelWidth = dLabelW;
|
m_dLabelWidth = dLabelW;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
qreal VPatternPieceData::GetLabelHeight() const
|
qreal VPieceLabelData::GetLabelHeight() const
|
||||||
{
|
{
|
||||||
return m_dLabelHeight;
|
return m_dLabelHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::SetLabelHeight(qreal dLabelH)
|
void VPieceLabelData::SetLabelHeight(qreal dLabelH)
|
||||||
{
|
{
|
||||||
m_dLabelHeight = dLabelH;
|
m_dLabelHeight = dLabelH;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
int VPatternPieceData::GetFontSize() const
|
int VPieceLabelData::GetFontSize() const
|
||||||
{
|
{
|
||||||
return m_iFontSize;
|
return m_iFontSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::SetFontSize(int iSize)
|
void VPieceLabelData::SetFontSize(int iSize)
|
||||||
{
|
{
|
||||||
m_iFontSize = iSize;
|
m_iFontSize = iSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
qreal VPatternPieceData::GetRotation() const
|
qreal VPieceLabelData::GetRotation() const
|
||||||
{
|
{
|
||||||
return m_dRotation;
|
return m_dRotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::SetRotation(qreal dRot)
|
void VPieceLabelData::SetRotation(qreal dRot)
|
||||||
{
|
{
|
||||||
m_dRotation = dRot;
|
m_dRotation = dRot;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
bool VPatternPieceData::IsVisible() const
|
bool VPieceLabelData::IsVisible() const
|
||||||
{
|
{
|
||||||
return m_bVisible;
|
return m_bVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPatternPieceData::SetVisible(bool bVal)
|
void VPieceLabelData::SetVisible(bool bVal)
|
||||||
{
|
{
|
||||||
m_bVisible = bVal;
|
m_bVisible = bVal;
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
**
|
**
|
||||||
** @file vpatternpiecedata.h
|
** @file vpiecelabeldata.h
|
||||||
** @author Bojan Kverh
|
** @author Bojan Kverh
|
||||||
** @date June 16, 2016
|
** @date June 16, 2016
|
||||||
**
|
**
|
||||||
|
@ -67,13 +67,13 @@ struct MaterialCutPlacement
|
||||||
typedef QList<MaterialCutPlacement> MCPContainer;
|
typedef QList<MaterialCutPlacement> MCPContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The VPatternPieceData class holds some information about a single
|
* @brief The VPieceLabelData class holds some information about a single
|
||||||
* piece like letter, name, material type, cut number and placement.
|
* piece like letter, name, material type, cut number and placement.
|
||||||
*/
|
*/
|
||||||
class VPatternPieceData
|
class VPieceLabelData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VPatternPieceData();
|
VPieceLabelData();
|
||||||
|
|
||||||
// methods, which operate on MaterialCutPlacement container
|
// methods, which operate on MaterialCutPlacement container
|
||||||
void Append(const MaterialCutPlacement& rMCP);
|
void Append(const MaterialCutPlacement& rMCP);
|
|
@ -32,7 +32,7 @@
|
||||||
#include "dialogtool.h"
|
#include "dialogtool.h"
|
||||||
#include "../vpatterndb/vpiece.h"
|
#include "../vpatterndb/vpiece.h"
|
||||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||||
#include "../vpatterndb/vpatternpiecedata.h"
|
#include "../vpatterndb/vpiecelabeldata.h"
|
||||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
|
@ -136,7 +136,7 @@ private:
|
||||||
// temporary container for Material/Cut/Placement 3-tuples
|
// temporary container for Material/Cut/Placement 3-tuples
|
||||||
MCPContainer m_conMCP;
|
MCPContainer m_conMCP;
|
||||||
|
|
||||||
VPatternPieceData m_oldData;
|
VPieceLabelData m_oldData;
|
||||||
VPatternInfoGeometry m_oldGeom;
|
VPatternInfoGeometry m_oldGeom;
|
||||||
VGrainlineGeometry m_oldGrainline;
|
VGrainlineGeometry m_oldGrainline;
|
||||||
int m_iRotBaseHeight;
|
int m_iRotBaseHeight;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "../vpatterndb/vpiecepath.h"
|
#include "../vpatterndb/vpiecepath.h"
|
||||||
#include "../vpatterndb/calculator.h"
|
#include "../vpatterndb/calculator.h"
|
||||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||||
#include "../vpatterndb/vpatternpiecedata.h"
|
#include "../vpatterndb/vpiecelabeldata.h"
|
||||||
#include "nodeDetails/vnodearc.h"
|
#include "nodeDetails/vnodearc.h"
|
||||||
#include "nodeDetails/vnodeellipticalarc.h"
|
#include "nodeDetails/vnodeellipticalarc.h"
|
||||||
#include "nodeDetails/vnodepoint.h"
|
#include "nodeDetails/vnodepoint.h"
|
||||||
|
@ -242,7 +242,7 @@ void VToolSeamAllowance::AddPins(VAbstractPattern *doc, QDomElement &domElement,
|
||||||
void VToolSeamAllowance::AddPatternPieceData(VAbstractPattern *doc, QDomElement &domElement, const VPiece &piece)
|
void VToolSeamAllowance::AddPatternPieceData(VAbstractPattern *doc, QDomElement &domElement, const VPiece &piece)
|
||||||
{
|
{
|
||||||
QDomElement domData = doc->createElement(VAbstractPattern::TagData);
|
QDomElement domData = doc->createElement(VAbstractPattern::TagData);
|
||||||
const VPatternPieceData& data = piece.GetPatternPieceData();
|
const VPieceLabelData& data = piece.GetPatternPieceData();
|
||||||
doc->SetAttribute(domData, VAbstractPattern::AttrLetter, data.GetLetter());
|
doc->SetAttribute(domData, VAbstractPattern::AttrLetter, data.GetLetter());
|
||||||
doc->SetAttribute(domData, VAbstractPattern::AttrVisible, data.IsVisible() == true? trueStr : falseStr);
|
doc->SetAttribute(domData, VAbstractPattern::AttrVisible, data.IsVisible() == true? trueStr : falseStr);
|
||||||
doc->SetAttribute(domData, AttrMx, data.GetPos().x());
|
doc->SetAttribute(domData, AttrMx, data.GetPos().x());
|
||||||
|
@ -417,7 +417,7 @@ void VToolSeamAllowance::Highlight(quint32 id)
|
||||||
void VToolSeamAllowance::UpdateLabel()
|
void VToolSeamAllowance::UpdateLabel()
|
||||||
{
|
{
|
||||||
const VPiece detail = VAbstractTool::data.GetPiece(id);
|
const VPiece detail = VAbstractTool::data.GetPiece(id);
|
||||||
const VPatternPieceData& data = detail.GetPatternPieceData();
|
const VPieceLabelData& data = detail.GetPatternPieceData();
|
||||||
|
|
||||||
if (data.IsVisible() == true)
|
if (data.IsVisible() == true)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#include "../vmisc/def.h"
|
#include "../vmisc/def.h"
|
||||||
#include "../vpatterndb/vpiecenode.h"
|
#include "../vpatterndb/vpiecenode.h"
|
||||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||||
#include "../vpatterndb/vpatternpiecedata.h"
|
#include "../vpatterndb/vpiecelabeldata.h"
|
||||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||||
#include "../tools/vtoolseamallowance.h"
|
#include "../tools/vtoolseamallowance.h"
|
||||||
#include "vundocommand.h"
|
#include "vundocommand.h"
|
||||||
|
|
|
@ -359,7 +359,7 @@ bool VTextGraphicsItem::IsContained(QRectF rectBB, qreal dRot, qreal &dX, qreal
|
||||||
* @param qsName name of detail
|
* @param qsName name of detail
|
||||||
* @param data reference to VPatternPieceData
|
* @param data reference to VPatternPieceData
|
||||||
*/
|
*/
|
||||||
void VTextGraphicsItem::UpdateData(const QString &qsName, const VPatternPieceData &data)
|
void VTextGraphicsItem::UpdateData(const QString &qsName, const VPieceLabelData &data)
|
||||||
{
|
{
|
||||||
m_tm.Update(qsName, data);
|
m_tm.Update(qsName, data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
void Clear();
|
void Clear();
|
||||||
void SetSize(qreal fW, qreal fH);
|
void SetSize(qreal fW, qreal fH);
|
||||||
bool IsContained(QRectF rectBB, qreal dRot, qreal& dX, qreal& dY) const;
|
bool IsContained(QRectF rectBB, qreal dRot, qreal& dX, qreal& dY) const;
|
||||||
void UpdateData(const QString& qsName, const VPatternPieceData& data);
|
void UpdateData(const QString& qsName, const VPieceLabelData& data);
|
||||||
void UpdateData(const VAbstractPattern* pDoc, qreal dSize, qreal dHeight);
|
void UpdateData(const VAbstractPattern* pDoc, qreal dSize, qreal dHeight);
|
||||||
int GetTextLines() const;
|
int GetTextLines() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user