Refactoring. Prepare folder structure for new hierarchy.
--HG-- branch : feature
This commit is contained in:
parent
a287913500
commit
1710e3cdb7
|
@ -37,9 +37,9 @@
|
|||
#include "dialogs/dialoglayoutprogress.h"
|
||||
#include "dialogs/dialogsavelayout.h"
|
||||
#include "../vlayout/vposter.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vgrainlinedata.h"
|
||||
#include "../vpatterndb/floatItemData/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vgrainlinedata.h"
|
||||
#include "../vtools/tools/vabstracttool.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
|
|
|
@ -51,9 +51,9 @@
|
|||
#include "../core/vapplication.h"
|
||||
#include "../vpatterndb/vpiecenode.h"
|
||||
#include "../vpatterndb/calculator.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vgrainlinedata.h"
|
||||
#include "../vpatterndb/floatItemData/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vgrainlinedata.h"
|
||||
#include "../vpatterndb/vpiecepath.h"
|
||||
#include "../vpatterndb/vnodedetail.h"
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
#include <Qt>
|
||||
#include <QtDebug>
|
||||
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpiecelabeldata.h"
|
||||
#include "../vmisc/vmath.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
#include "../vpatterndb/calculator.h"
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
#include <QtGlobal>
|
||||
|
||||
#include "../ifc/xml/vabstractpattern.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vcontainer.h"
|
||||
#include "vabstractpiece.h"
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
#include <QVector>
|
||||
#include <QTransform>
|
||||
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vgrainlinedata.h"
|
||||
#include "../vpatterndb/floatItemData/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vgrainlinedata.h"
|
||||
#include "../vmisc/diagnostic.h"
|
||||
#include "vlayoutpiecepath.h"
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <QDebug>
|
||||
|
||||
#include "../ifc/xml/vabstractpattern.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpiecelabeldata.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
#include "../vmisc/vmath.h"
|
||||
#include "vtextmanager.h"
|
||||
|
|
|
@ -30,8 +30,16 @@
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPatternLabelData::VPatternLabelData()
|
||||
:m_ptPos(0, 0), m_dLabelWidth(0), m_dLabelHeight(0), m_iFontSize(0),
|
||||
m_dRotation(0), m_bVisible(true)
|
||||
: m_ptPos(),
|
||||
m_dLabelWidth(0),
|
||||
m_dLabelHeight(0),
|
||||
m_iFontSize(0),
|
||||
m_dRotation(0),
|
||||
m_bVisible(true)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPatternLabelData::~VPatternLabelData()
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -105,5 +113,3 @@ void VPatternLabelData::SetVisible(bool bVal)
|
|||
{
|
||||
m_bVisible = bVal;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
|
@ -39,22 +39,28 @@ class VPatternLabelData
|
|||
{
|
||||
public:
|
||||
VPatternLabelData();
|
||||
virtual ~VPatternLabelData();
|
||||
|
||||
// methods, which set up label parameters
|
||||
QPointF GetPos() const;
|
||||
void SetPos(const QPointF& ptPos);
|
||||
qreal GetLabelWidth() const;
|
||||
void SetLabelWidth(qreal dLabelW);
|
||||
qreal GetLabelHeight() const;
|
||||
void SetLabelHeight(qreal dLabelH);
|
||||
int GetFontSize() const;
|
||||
void SetFontSize(int iSize);
|
||||
qreal GetRotation() const;
|
||||
void SetRotation(qreal dRot);
|
||||
bool IsVisible() const;
|
||||
void SetVisible(bool bVal);
|
||||
QPointF GetPos() const;
|
||||
void SetPos(const QPointF& ptPos);
|
||||
|
||||
private:
|
||||
qreal GetLabelWidth() const;
|
||||
void SetLabelWidth(qreal dLabelW);
|
||||
|
||||
qreal GetLabelHeight() const;
|
||||
void SetLabelHeight(qreal dLabelH);
|
||||
|
||||
int GetFontSize() const;
|
||||
void SetFontSize(int iSize);
|
||||
|
||||
qreal GetRotation() const;
|
||||
void SetRotation(qreal dRot);
|
||||
|
||||
bool IsVisible() const;
|
||||
void SetVisible(bool bVal);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief m_ptPos position of label's top left corner
|
||||
*/
|
||||
|
@ -72,7 +78,7 @@ private:
|
|||
*/
|
||||
int m_iFontSize;
|
||||
/**
|
||||
* @brief m_dRotation Label rotation
|
||||
* @brief m_dRotation label rotation
|
||||
*/
|
||||
qreal m_dRotation;
|
||||
/**
|
|
@ -28,15 +28,25 @@
|
|||
|
||||
#include "vpiecelabeldata.h"
|
||||
|
||||
#include <QList>
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
MaterialCutPlacement::MaterialCutPlacement()
|
||||
:m_eMaterial(MaterialType::mtFabric), m_qsMaterialUserDef(), m_iCutNumber(0), m_ePlacement(PlacementType::ptNone)
|
||||
: m_eMaterial(MaterialType::mtFabric),
|
||||
m_qsMaterialUserDef(),
|
||||
m_iCutNumber(0),
|
||||
m_ePlacement(PlacementType::ptNone)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
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)
|
||||
: VPatternLabelData(),
|
||||
m_qsLetter(),
|
||||
m_conMCP()
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPieceLabelData::~VPieceLabelData()
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -101,78 +111,3 @@ void VPieceLabelData::SetLetter(QString qsLetter)
|
|||
{
|
||||
m_qsLetter = qsLetter.left(3);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QPointF VPieceLabelData::GetPos() const
|
||||
{
|
||||
return m_ptPos;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPieceLabelData::SetPos(const QPointF& ptPos)
|
||||
{
|
||||
m_ptPos = ptPos;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
qreal VPieceLabelData::GetLabelWidth() const
|
||||
{
|
||||
return m_dLabelWidth;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPieceLabelData::SetLabelWidth(qreal dLabelW)
|
||||
{
|
||||
m_dLabelWidth = dLabelW;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
qreal VPieceLabelData::GetLabelHeight() const
|
||||
{
|
||||
return m_dLabelHeight;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPieceLabelData::SetLabelHeight(qreal dLabelH)
|
||||
{
|
||||
m_dLabelHeight = dLabelH;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
int VPieceLabelData::GetFontSize() const
|
||||
{
|
||||
return m_iFontSize;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPieceLabelData::SetFontSize(int iSize)
|
||||
{
|
||||
m_iFontSize = iSize;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
qreal VPieceLabelData::GetRotation() const
|
||||
{
|
||||
return m_dRotation;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPieceLabelData::SetRotation(qreal dRot)
|
||||
{
|
||||
m_dRotation = dRot;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
bool VPieceLabelData::IsVisible() const
|
||||
{
|
||||
return m_bVisible;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPieceLabelData::SetVisible(bool bVal)
|
||||
{
|
||||
m_bVisible = bVal;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
@ -30,11 +30,9 @@
|
|||
#define VPATTERNPIECEDATA_H
|
||||
|
||||
#include <QList>
|
||||
#include <QPointF>
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "vpatternlabeldata.h"
|
||||
|
||||
enum class MaterialType : char
|
||||
{
|
||||
|
@ -56,10 +54,10 @@ enum class PlacementType : char
|
|||
*/
|
||||
struct MaterialCutPlacement
|
||||
{
|
||||
MaterialType m_eMaterial;
|
||||
QString m_qsMaterialUserDef;
|
||||
int m_iCutNumber;
|
||||
PlacementType m_ePlacement;
|
||||
MaterialType m_eMaterial;
|
||||
QString m_qsMaterialUserDef;
|
||||
int m_iCutNumber;
|
||||
PlacementType m_ePlacement;
|
||||
|
||||
MaterialCutPlacement();
|
||||
};
|
||||
|
@ -70,10 +68,11 @@ typedef QList<MaterialCutPlacement> MCPContainer;
|
|||
* @brief The VPieceLabelData class holds some information about a single
|
||||
* piece like letter, name, material type, cut number and placement.
|
||||
*/
|
||||
class VPieceLabelData
|
||||
class VPieceLabelData : public VPatternLabelData
|
||||
{
|
||||
public:
|
||||
VPieceLabelData();
|
||||
virtual ~VPieceLabelData();
|
||||
|
||||
// methods, which operate on MaterialCutPlacement container
|
||||
void Append(const MaterialCutPlacement& rMCP);
|
||||
|
@ -88,54 +87,11 @@ public:
|
|||
const QString& GetLetter() const;
|
||||
void SetLetter(QString qsLetter);
|
||||
|
||||
// methods, which set up label parameters
|
||||
QPointF GetPos() const;
|
||||
void SetPos(const QPointF& ptPos);
|
||||
qreal GetLabelWidth() const;
|
||||
void SetLabelWidth(qreal dLabelW);
|
||||
qreal GetLabelHeight() const;
|
||||
void SetLabelHeight(qreal dLabelH);
|
||||
int GetFontSize() const;
|
||||
void SetFontSize(int iSize);
|
||||
qreal GetRotation() const;
|
||||
void SetRotation(qreal dRot);
|
||||
bool IsVisible() const;
|
||||
void SetVisible(bool bVal);
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief m_qsLetter Detail letter (should be no more than 3 characters)
|
||||
*/
|
||||
QString m_qsLetter;
|
||||
/**
|
||||
* @brief m_conMCP List of material, cut, placement tuples
|
||||
*/
|
||||
MCPContainer m_conMCP;
|
||||
/**
|
||||
* @brief m_ptPos position of label's top left corner
|
||||
*/
|
||||
QPointF m_ptPos;
|
||||
/**
|
||||
* @brief m_dLabelWidth label width
|
||||
*/
|
||||
qreal m_dLabelWidth;
|
||||
/**
|
||||
* @brief m_dLabelHeight label height
|
||||
*/
|
||||
qreal m_dLabelHeight;
|
||||
/**
|
||||
* @brief m_iFontSize label font size
|
||||
*/
|
||||
int m_iFontSize;
|
||||
/**
|
||||
* @brief m_dRotation label rotation
|
||||
*/
|
||||
qreal m_dRotation;
|
||||
/**
|
||||
* @brief m_bVisible visibility flag
|
||||
*/
|
||||
bool m_bVisible;
|
||||
|
||||
/** @brief m_qsLetter Detail letter (should be no more than 3 characters) */
|
||||
QString m_qsLetter;
|
||||
/** @brief m_conMCP List of material, cut, placement tuples */
|
||||
MCPContainer m_conMCP;
|
||||
};
|
||||
|
||||
#endif // VPATTERNPIECEDATA_H
|
|
@ -22,9 +22,9 @@ SOURCES += \
|
|||
$$PWD/vpiece.cpp \
|
||||
$$PWD/vpiecenode.cpp \
|
||||
$$PWD/vpiecepath.cpp \
|
||||
$$PWD/vpiecelabeldata.cpp \
|
||||
$$PWD/vpatternlabeldata.cpp \
|
||||
$$PWD/vgrainlinedata.cpp
|
||||
$$PWD/floatItemData/vpiecelabeldata.cpp \
|
||||
$$PWD/floatItemData/vpatternlabeldata.cpp \
|
||||
$$PWD/floatItemData/vgrainlinedata.cpp
|
||||
|
||||
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
||||
|
||||
|
@ -63,6 +63,6 @@ HEADERS += \
|
|||
$$PWD/vpiecenode_p.h \
|
||||
$$PWD/vpiecepath.h \
|
||||
$$PWD/vpiecepath_p.h \
|
||||
$$PWD/vpiecelabeldata.h \
|
||||
$$PWD/vpatternlabeldata.h \
|
||||
$$PWD/vgrainlinedata.h
|
||||
$$PWD/floatItemData/vpiecelabeldata.h \
|
||||
$$PWD/floatItemData/vpatternlabeldata.h \
|
||||
$$PWD/floatItemData/vgrainlinedata.h
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
#include "../vmisc/def.h"
|
||||
#include "vpiecenode.h"
|
||||
#include "vpiecepath.h"
|
||||
#include "vpiecelabeldata.h"
|
||||
#include "vpatternlabeldata.h"
|
||||
#include "vgrainlinedata.h"
|
||||
#include "floatItemData/vpiecelabeldata.h"
|
||||
#include "floatItemData/vpatternlabeldata.h"
|
||||
#include "floatItemData/vgrainlinedata.h"
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
|
||||
#include "dialogtool.h"
|
||||
#include "../vpatterndb/vpiece.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vgrainlinedata.h"
|
||||
#include "../vpatterndb/floatItemData/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vgrainlinedata.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
#include "../vpatterndb/vpiecenode.h"
|
||||
#include "../vpatterndb/vpiecepath.h"
|
||||
#include "../vpatterndb/calculator.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpiecelabeldata.h"
|
||||
#include "nodeDetails/vnodearc.h"
|
||||
#include "nodeDetails/vnodeellipticalarc.h"
|
||||
#include "nodeDetails/vnodepoint.h"
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
#include "../vmisc/logging.h"
|
||||
#include "../vmisc/def.h"
|
||||
#include "../vpatterndb/vpiecenode.h"
|
||||
#include "../vpatterndb/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/vgrainlinedata.h"
|
||||
#include "../vpatterndb/floatItemData/vpatternlabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vpiecelabeldata.h"
|
||||
#include "../vpatterndb/floatItemData/vgrainlinedata.h"
|
||||
#include "../tools/vtoolseamallowance.h"
|
||||
#include "vundocommand.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#define VGRAINLINEITEM_H
|
||||
|
||||
#include "vpieceitem.h"
|
||||
#include "../vpatterndb/vgrainlinedata.h"
|
||||
#include "../vpatterndb/floatItemData/vgrainlinedata.h"
|
||||
|
||||
class VGrainlineItem : public VPieceItem
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user