Refactoring. Prepare folder structure for new hierarchy.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-02-23 11:37:19 +02:00
parent a287913500
commit 1710e3cdb7
18 changed files with 87 additions and 184 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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);
private:
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;
/**

View File

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

View File

@ -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
{
@ -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)
*/
/** @brief m_qsLetter Detail letter (should be no more than 3 characters) */
QString m_qsLetter;
/**
* @brief m_conMCP List of material, cut, placement tuples
*/
/** @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;
};
#endif // VPATTERNPIECEDATA_H

View File

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

View File

@ -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++")

View File

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

View File

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

View File

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

View File

@ -30,7 +30,7 @@
#define VGRAINLINEITEM_H
#include "vpieceitem.h"
#include "../vpatterndb/vgrainlinedata.h"
#include "../vpatterndb/floatItemData/vgrainlinedata.h"
class VGrainlineItem : public VPieceItem
{