diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 47c2e94ff..99329026a 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -37,7 +37,7 @@ #include "dialogs/dialoglayoutprogress.h" #include "dialogs/dialogsavelayout.h" #include "../vlayout/vposter.h" -#include "../vpatterndb/vpatternpiecedata.h" +#include "../vpatterndb/vpiecelabeldata.h" #include "../vpatterndb/vpatterninfogeometry.h" #include "../vpatterndb/vgrainlinegeometry.h" #include "../vtools/tools/vabstracttool.h" diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 5f451a0a3..4a616bb8e 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -51,7 +51,7 @@ #include "../core/vapplication.h" #include "../vpatterndb/vpiecenode.h" #include "../vpatterndb/calculator.h" -#include "../vpatterndb/vpatternpiecedata.h" +#include "../vpatterndb/vpiecelabeldata.h" #include "../vpatterndb/vpatterninfogeometry.h" #include "../vpatterndb/vgrainlinegeometry.h" #include "../vpatterndb/vpiecepath.h" diff --git a/src/libs/vlayout/vlayoutpiece.cpp b/src/libs/vlayout/vlayoutpiece.cpp index 4d9eeadd0..2bbbcff7e 100644 --- a/src/libs/vlayout/vlayoutpiece.cpp +++ b/src/libs/vlayout/vlayoutpiece.cpp @@ -44,7 +44,7 @@ #include #include "../vpatterndb/vpatterninfogeometry.h" -#include "../vpatterndb/vpatternpiecedata.h" +#include "../vpatterndb/vpiecelabeldata.h" #include "../vmisc/vmath.h" #include "../vmisc/vabstractapplication.h" #include "../vpatterndb/calculator.h" @@ -106,7 +106,7 @@ VLayoutPiece VLayoutPiece::Create(const VPiece &piece, const VContainer *pattern det.SetInternalPaths(ConvertInternalPaths(piece, pattern)); det.SetName(piece.GetName()); - const VPatternPieceData& data = piece.GetPatternPieceData(); + const VPieceLabelData& data = piece.GetPatternPieceData(); if (data.IsVisible() == true) { det.SetDetail(piece.GetName(), data, qApp->font()); @@ -175,7 +175,7 @@ QVector 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; qreal dAng = qDegreesToRadians(data.GetRotation()); diff --git a/src/libs/vlayout/vlayoutpiece.h b/src/libs/vlayout/vlayoutpiece.h index 3ef6cf9ec..b1569fd5f 100644 --- a/src/libs/vlayout/vlayoutpiece.h +++ b/src/libs/vlayout/vlayoutpiece.h @@ -43,7 +43,7 @@ #include "../ifc/xml/vabstractpattern.h" #include "../vpatterndb/vpatterninfogeometry.h" -#include "../vpatterndb/vpatternpiecedata.h" +#include "../vpatterndb/vpiecelabeldata.h" #include "../vpatterndb/vcontainer.h" #include "vabstractpiece.h" @@ -73,7 +73,7 @@ public: QVector GetInternalPaths() const; void SetInternalPaths(const QVector &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, qreal dSize, qreal dHeight); diff --git a/src/libs/vlayout/vlayoutpiece_p.h b/src/libs/vlayout/vlayoutpiece_p.h index bd3f504be..b6ac71a2c 100644 --- a/src/libs/vlayout/vlayoutpiece_p.h +++ b/src/libs/vlayout/vlayoutpiece_p.h @@ -34,7 +34,7 @@ #include #include -#include "../vpatterndb/vpatternpiecedata.h" +#include "../vpatterndb/vpiecelabeldata.h" #include "../vpatterndb/vpatterninfogeometry.h" #include "../vpatterndb/vgrainlinegeometry.h" #include "../vmisc/diagnostic.h" @@ -116,7 +116,7 @@ public: /** @brief grainlineInfo line */ QVector grainlinePoints; /** @brief detailData detail data */ - VPatternPieceData detailData; + VPieceLabelData detailData; /** @brief patternGeom pattern geometry */ VPatternInfoGeometry patternGeom; /** @brief grainlineGeom grainline geometry */ diff --git a/src/libs/vlayout/vtextmanager.cpp b/src/libs/vlayout/vtextmanager.cpp index 8012dd040..e245a331d 100644 --- a/src/libs/vlayout/vtextmanager.cpp +++ b/src/libs/vlayout/vtextmanager.cpp @@ -35,7 +35,7 @@ #include #include "../ifc/xml/vabstractpattern.h" -#include "../vpatterndb/vpatternpiecedata.h" +#include "../vpatterndb/vpiecelabeldata.h" #include "../vmisc/vabstractapplication.h" #include "../vmisc/vmath.h" #include "vtextmanager.h" @@ -238,7 +238,7 @@ void VTextManager::FitFontSize(qreal fW, qreal fH) * @param qsName detail name * @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(); TextLine tl; diff --git a/src/libs/vlayout/vtextmanager.h b/src/libs/vlayout/vtextmanager.h index 4a9591b93..bb631f381 100644 --- a/src/libs/vlayout/vtextmanager.h +++ b/src/libs/vlayout/vtextmanager.h @@ -38,7 +38,7 @@ #include #include -class VPatternPieceData; +class VPieceLabelData; class VAbstractPattern; #define MIN_FONT_SIZE 5 @@ -85,7 +85,7 @@ public: int GetSourceLinesCount() 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); private: diff --git a/src/libs/vpatterndb/vpatterndb.pri b/src/libs/vpatterndb/vpatterndb.pri index 5a94d2ff8..f539c7859 100644 --- a/src/libs/vpatterndb/vpatterndb.pri +++ b/src/libs/vpatterndb/vpatterndb.pri @@ -17,14 +17,14 @@ SOURCES += \ $$PWD/variables/vmeasurement.cpp \ $$PWD/variables/vvariable.cpp \ $$PWD/vformula.cpp \ - $$PWD/vpatternpiecedata.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/vpiecepath.cpp \ + $$PWD/vpiecelabeldata.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/vpatternpiecedata.h \ $$PWD/vpatterninfogeometry.h \ $$PWD/vgrainlinegeometry.h \ $$PWD/variables/vcurveclength.h \ @@ -65,4 +64,5 @@ HEADERS += \ $$PWD/vpiecenode.h \ $$PWD/vpiecenode_p.h \ $$PWD/vpiecepath.h \ - $$PWD/vpiecepath_p.h + $$PWD/vpiecepath_p.h \ + $$PWD/vpiecelabeldata.h diff --git a/src/libs/vpatterndb/vpiece.cpp b/src/libs/vpatterndb/vpiece.cpp index 4ec17f076..3092f4610 100644 --- a/src/libs/vpatterndb/vpiece.cpp +++ b/src/libs/vpatterndb/vpiece.cpp @@ -413,7 +413,7 @@ QVector VPiece::MissingPins(const VPiece &det) const } //--------------------------------------------------------------------------------------------------------------------- -void VPiece::SetPatternPieceData(const VPatternPieceData &data) +void VPiece::SetPatternPieceData(const VPieceLabelData &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 * @return pattern piece data object */ -VPatternPieceData &VPiece::GetPatternPieceData() +VPieceLabelData &VPiece::GetPatternPieceData() { return d->m_ppData; } @@ -433,7 +433,7 @@ VPatternPieceData &VPiece::GetPatternPieceData() * @brief Returns the read only reference to the pattern piece data object * @return pattern piece data object */ -const VPatternPieceData &VPiece::GetPatternPieceData() const +const VPieceLabelData &VPiece::GetPatternPieceData() const { return d->m_ppData; } diff --git a/src/libs/vpatterndb/vpiece.h b/src/libs/vpatterndb/vpiece.h index a5a2f594e..b6edf28ad 100644 --- a/src/libs/vpatterndb/vpiece.h +++ b/src/libs/vpatterndb/vpiece.h @@ -40,7 +40,7 @@ template class QVector; template class QSharedPointer; class VPiecePath; class VPatternInfoGeometry; -class VPatternPieceData; +class VPieceLabelData; class VGrainlineGeometry; class VContainer; class QPainterPath; @@ -97,9 +97,9 @@ public: QVector MissingInternalPaths(const VPiece &det) const; QVector MissingPins(const VPiece &det) const; - void SetPatternPieceData(const VPatternPieceData &data); - VPatternPieceData& GetPatternPieceData(); - const VPatternPieceData& GetPatternPieceData() const; + void SetPatternPieceData(const VPieceLabelData &data); + VPieceLabelData& GetPatternPieceData(); + const VPieceLabelData& GetPatternPieceData() const; void SetPatternInfo(const VPatternInfoGeometry &info); VPatternInfoGeometry& GetPatternInfo(); diff --git a/src/libs/vpatterndb/vpiece_p.h b/src/libs/vpatterndb/vpiece_p.h index cc28158eb..3da1a7239 100644 --- a/src/libs/vpatterndb/vpiece_p.h +++ b/src/libs/vpatterndb/vpiece_p.h @@ -36,7 +36,7 @@ #include "../vmisc/def.h" #include "vpiecenode.h" #include "vpiecepath.h" -#include "vpatternpiecedata.h" +#include "vpiecelabeldata.h" #include "vpatterninfogeometry.h" #include "vgrainlinegeometry.h" @@ -93,7 +93,7 @@ public: QVector m_pins; /** @brief Pattern piece data */ - VPatternPieceData m_ppData; + VPieceLabelData m_ppData; /** @brief Pattern info coordinates */ VPatternInfoGeometry m_piPatternInfo; diff --git a/src/libs/vpatterndb/vpatternpiecedata.cpp b/src/libs/vpatterndb/vpiecelabeldata.cpp similarity index 81% rename from src/libs/vpatterndb/vpatternpiecedata.cpp rename to src/libs/vpatterndb/vpiecelabeldata.cpp index 830ef21e9..4adf35eb0 100644 --- a/src/libs/vpatterndb/vpatternpiecedata.cpp +++ b/src/libs/vpatterndb/vpiecelabeldata.cpp @@ -1,6 +1,6 @@ /************************************************************************ ** - ** @file vpatternpiecedata.cpp + ** @file vpiecelabeldata.cpp ** @author Bojan Kverh ** @date June 16, 2016 ** @@ -26,7 +26,7 @@ ** *************************************************************************/ -#include "vpatternpiecedata.h" +#include "vpiecelabeldata.h" //--------------------------------------------------------------------------------------------------------------------- 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_iFontSize(0), m_dRotation(0), m_bVisible(true) {} //--------------------------------------------------------------------------------------------------------------------- -void VPatternPieceData::Append(const MaterialCutPlacement& rMCP) +void VPieceLabelData::Append(const MaterialCutPlacement& 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 <= 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 < 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(); } //--------------------------------------------------------------------------------------------------------------------- -const MaterialCutPlacement& VPatternPieceData::GetMCP(int i) const +const MaterialCutPlacement& VPieceLabelData::GetMCP(int i) const { Q_ASSERT(i >= 0); 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 < GetMCPCount()); @@ -84,92 +84,92 @@ void VPatternPieceData::RemoveMCP(int i) } //--------------------------------------------------------------------------------------------------------------------- -void VPatternPieceData::Clear() +void VPieceLabelData::Clear() { m_qsLetter.clear(); m_conMCP.clear(); } //--------------------------------------------------------------------------------------------------------------------- -const QString& VPatternPieceData::GetLetter() const +const QString& VPieceLabelData::GetLetter() const { return m_qsLetter; } //--------------------------------------------------------------------------------------------------------------------- -void VPatternPieceData::SetLetter(QString qsLetter) +void VPieceLabelData::SetLetter(QString qsLetter) { m_qsLetter = qsLetter.left(3); } //--------------------------------------------------------------------------------------------------------------------- -QPointF VPatternPieceData::GetPos() const +QPointF VPieceLabelData::GetPos() const { return m_ptPos; } //--------------------------------------------------------------------------------------------------------------------- -void VPatternPieceData::SetPos(const QPointF& ptPos) +void VPieceLabelData::SetPos(const QPointF& ptPos) { m_ptPos = ptPos; } //--------------------------------------------------------------------------------------------------------------------- -qreal VPatternPieceData::GetLabelWidth() const +qreal VPieceLabelData::GetLabelWidth() const { return m_dLabelWidth; } //--------------------------------------------------------------------------------------------------------------------- -void VPatternPieceData::SetLabelWidth(qreal dLabelW) +void VPieceLabelData::SetLabelWidth(qreal dLabelW) { m_dLabelWidth = dLabelW; } //--------------------------------------------------------------------------------------------------------------------- -qreal VPatternPieceData::GetLabelHeight() const +qreal VPieceLabelData::GetLabelHeight() const { return m_dLabelHeight; } //--------------------------------------------------------------------------------------------------------------------- -void VPatternPieceData::SetLabelHeight(qreal dLabelH) +void VPieceLabelData::SetLabelHeight(qreal dLabelH) { m_dLabelHeight = dLabelH; } //--------------------------------------------------------------------------------------------------------------------- -int VPatternPieceData::GetFontSize() const +int VPieceLabelData::GetFontSize() const { return m_iFontSize; } //--------------------------------------------------------------------------------------------------------------------- -void VPatternPieceData::SetFontSize(int iSize) +void VPieceLabelData::SetFontSize(int iSize) { m_iFontSize = iSize; } //--------------------------------------------------------------------------------------------------------------------- -qreal VPatternPieceData::GetRotation() const +qreal VPieceLabelData::GetRotation() const { return m_dRotation; } //--------------------------------------------------------------------------------------------------------------------- -void VPatternPieceData::SetRotation(qreal dRot) +void VPieceLabelData::SetRotation(qreal dRot) { m_dRotation = dRot; } //--------------------------------------------------------------------------------------------------------------------- -bool VPatternPieceData::IsVisible() const +bool VPieceLabelData::IsVisible() const { return m_bVisible; } //--------------------------------------------------------------------------------------------------------------------- -void VPatternPieceData::SetVisible(bool bVal) +void VPieceLabelData::SetVisible(bool bVal) { m_bVisible = bVal; } diff --git a/src/libs/vpatterndb/vpatternpiecedata.h b/src/libs/vpatterndb/vpiecelabeldata.h similarity index 96% rename from src/libs/vpatterndb/vpatternpiecedata.h rename to src/libs/vpatterndb/vpiecelabeldata.h index 08706f8a2..52103e3d6 100644 --- a/src/libs/vpatterndb/vpatternpiecedata.h +++ b/src/libs/vpatterndb/vpiecelabeldata.h @@ -1,6 +1,6 @@ /************************************************************************ ** - ** @file vpatternpiecedata.h + ** @file vpiecelabeldata.h ** @author Bojan Kverh ** @date June 16, 2016 ** @@ -67,13 +67,13 @@ struct MaterialCutPlacement typedef QList 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. */ -class VPatternPieceData +class VPieceLabelData { public: - VPatternPieceData(); + VPieceLabelData(); // methods, which operate on MaterialCutPlacement container void Append(const MaterialCutPlacement& rMCP); diff --git a/src/libs/vtools/dialogs/tools/dialogseamallowance.h b/src/libs/vtools/dialogs/tools/dialogseamallowance.h index 227c1ef9a..7329e8386 100644 --- a/src/libs/vtools/dialogs/tools/dialogseamallowance.h +++ b/src/libs/vtools/dialogs/tools/dialogseamallowance.h @@ -32,7 +32,7 @@ #include "dialogtool.h" #include "../vpatterndb/vpiece.h" #include "../vpatterndb/vpatterninfogeometry.h" -#include "../vpatterndb/vpatternpiecedata.h" +#include "../vpatterndb/vpiecelabeldata.h" #include "../vpatterndb/vgrainlinegeometry.h" namespace Ui @@ -136,7 +136,7 @@ private: // temporary container for Material/Cut/Placement 3-tuples MCPContainer m_conMCP; - VPatternPieceData m_oldData; + VPieceLabelData m_oldData; VPatternInfoGeometry m_oldGeom; VGrainlineGeometry m_oldGrainline; int m_iRotBaseHeight; diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp index 3fc70d482..79f650046 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.cpp +++ b/src/libs/vtools/tools/vtoolseamallowance.cpp @@ -32,7 +32,7 @@ #include "../vpatterndb/vpiecepath.h" #include "../vpatterndb/calculator.h" #include "../vpatterndb/vpatterninfogeometry.h" -#include "../vpatterndb/vpatternpiecedata.h" +#include "../vpatterndb/vpiecelabeldata.h" #include "nodeDetails/vnodearc.h" #include "nodeDetails/vnodeellipticalarc.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) { 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::AttrVisible, data.IsVisible() == true? trueStr : falseStr); doc->SetAttribute(domData, AttrMx, data.GetPos().x()); @@ -417,7 +417,7 @@ void VToolSeamAllowance::Highlight(quint32 id) void VToolSeamAllowance::UpdateLabel() { const VPiece detail = VAbstractTool::data.GetPiece(id); - const VPatternPieceData& data = detail.GetPatternPieceData(); + const VPieceLabelData& data = detail.GetPatternPieceData(); if (data.IsVisible() == true) { diff --git a/src/libs/vtools/undocommands/savepieceoptions.cpp b/src/libs/vtools/undocommands/savepieceoptions.cpp index bb52d0de6..3d44ddc9a 100644 --- a/src/libs/vtools/undocommands/savepieceoptions.cpp +++ b/src/libs/vtools/undocommands/savepieceoptions.cpp @@ -39,7 +39,7 @@ #include "../vmisc/def.h" #include "../vpatterndb/vpiecenode.h" #include "../vpatterndb/vpatterninfogeometry.h" -#include "../vpatterndb/vpatternpiecedata.h" +#include "../vpatterndb/vpiecelabeldata.h" #include "../vpatterndb/vgrainlinegeometry.h" #include "../tools/vtoolseamallowance.h" #include "vundocommand.h" diff --git a/src/libs/vwidgets/vtextgraphicsitem.cpp b/src/libs/vwidgets/vtextgraphicsitem.cpp index 7a12002f1..842bcdeaa 100644 --- a/src/libs/vwidgets/vtextgraphicsitem.cpp +++ b/src/libs/vwidgets/vtextgraphicsitem.cpp @@ -359,7 +359,7 @@ bool VTextGraphicsItem::IsContained(QRectF rectBB, qreal dRot, qreal &dX, qreal * @param qsName name of detail * @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); } diff --git a/src/libs/vwidgets/vtextgraphicsitem.h b/src/libs/vwidgets/vtextgraphicsitem.h index 7d5d77ed9..7c5d99bad 100644 --- a/src/libs/vwidgets/vtextgraphicsitem.h +++ b/src/libs/vwidgets/vtextgraphicsitem.h @@ -64,7 +64,7 @@ public: void Clear(); void SetSize(qreal fW, qreal fH); 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); int GetTextLines() const;