Code style.
This commit is contained in:
parent
c0e45c85fe
commit
4c73ab529a
|
@ -503,7 +503,7 @@ auto VPPiece::IsValid() const -> bool
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
quint16 VPPiece::CopyNumber() const
|
||||
auto VPPiece::CopyNumber() const -> quint16
|
||||
{
|
||||
return m_copyNumber;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,10 @@
|
|||
#include "../vlayout/vlayoutpiece.h"
|
||||
#include "../layout/layoutdef.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
#include "../vmisc/defglobal.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
|
||||
class VPLayout;
|
||||
class VPSheet;
|
||||
|
||||
|
@ -44,12 +48,11 @@ class VPPiece : public VLayoutPiece
|
|||
public:
|
||||
VPPiece() = default;
|
||||
explicit VPPiece(const VLayoutPiece &layoutPiece);
|
||||
virtual ~VPPiece() = default;
|
||||
~VPPiece() override = default;
|
||||
|
||||
void Update(const VPPiecePtr &piece);
|
||||
|
||||
virtual auto GetUniqueID() const -> QString override;
|
||||
|
||||
auto GetUniqueID() const -> QString override;
|
||||
|
||||
void ClearTransformations();
|
||||
|
||||
|
@ -126,7 +129,7 @@ public:
|
|||
void SetCopyNumber(quint16 newCopyNumber);
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(VPPiece)
|
||||
Q_DISABLE_COPY_MOVE(VPPiece) // NOLINT
|
||||
|
||||
VPLayoutWeakPtr m_layout{};
|
||||
|
||||
|
@ -200,6 +203,6 @@ inline void VPPiece::SetHasSuperpositionWithPieces(bool newHasSuperpositionWithP
|
|||
m_hasSuperpositionWithPieces = newHasSuperpositionWithPieces;
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(VPPiecePtr)
|
||||
Q_DECLARE_METATYPE(VPPiecePtr) // NOLINT
|
||||
|
||||
#endif // VPPIECE_H
|
||||
|
|
|
@ -140,7 +140,7 @@ void VPSheetSceneData::PrepareForExport()
|
|||
VPSheetPtr sheet = layout->GetSheet(m_sheetUuid);
|
||||
m_slectedPiecesTmp = sheet->GetSelectedPieces();
|
||||
|
||||
for (const auto& piece : m_slectedPiecesTmp)
|
||||
for (const auto& piece : qAsConst(m_slectedPiecesTmp))
|
||||
{
|
||||
if (not piece.isNull())
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ void VPSheetSceneData::CleanAfterExport()
|
|||
layout->LayoutSettings().SetShowGrid(m_showGridTmp);
|
||||
layout->LayoutSettings().SetShowTiles(m_showTilesTmp);
|
||||
|
||||
for (const auto& piece : m_slectedPiecesTmp)
|
||||
for (const auto& piece : qAsConst(m_slectedPiecesTmp))
|
||||
{
|
||||
if (not piece.isNull())
|
||||
{
|
||||
|
@ -319,9 +319,10 @@ void VPSheetSceneData::ConnectPiece(VPGraphicsPiece *piece)
|
|||
|
||||
// VPSheet
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPSheet::VPSheet(const VPLayoutPtr &layout) :
|
||||
m_layout(layout),
|
||||
m_sceneData(new VPSheetSceneData(layout, Uuid()))
|
||||
VPSheet::VPSheet(const VPLayoutPtr &layout, QObject *parent)
|
||||
: QObject(parent),
|
||||
m_layout(layout),
|
||||
m_sceneData(new VPSheetSceneData(layout, Uuid()))
|
||||
{
|
||||
SCASSERT(not layout.isNull())
|
||||
|
||||
|
@ -574,7 +575,7 @@ void VPSheet::ValidatePiecesOutOfBound() const
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VPSheet::GetSheetRect() const -> QRectF
|
||||
{
|
||||
return QRectF(QPoint(0, 0), m_size);
|
||||
return {QPoint(0, 0), m_size};
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -587,7 +588,7 @@ auto VPSheet::GetMarginsRect() const -> QRectF
|
|||
return rect;
|
||||
}
|
||||
|
||||
return QRectF(0, 0, m_size.width(), m_size.height());
|
||||
return {0, 0, m_size.width(), m_size.height()};
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -37,6 +37,10 @@
|
|||
#include "def.h"
|
||||
#include "layoutdef.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
#include "../vmisc/defglobal.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
|
||||
class VPLayout;
|
||||
class VPPiece;
|
||||
class VMainGraphicsScene;
|
||||
|
@ -53,7 +57,7 @@ public:
|
|||
explicit VPSheetSceneData(const VPLayoutPtr &layout, const QUuid &sheetUuid);
|
||||
~VPSheetSceneData();
|
||||
|
||||
VMainGraphicsScene *Scene() const;
|
||||
auto Scene() const -> VMainGraphicsScene *;
|
||||
|
||||
/**
|
||||
* @brief RefreshLayout Refreshes the rectangles for the layout border and the margin
|
||||
|
@ -90,7 +94,7 @@ public:
|
|||
void RefreshSheetSize();
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(VPSheetSceneData)
|
||||
Q_DISABLE_COPY_MOVE(VPSheetSceneData) // NOLINT
|
||||
|
||||
VPLayoutWeakPtr m_layout{};
|
||||
|
||||
|
@ -130,11 +134,11 @@ private:
|
|||
|
||||
class VPSheet : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
explicit VPSheet(const VPLayoutPtr &layout);
|
||||
explicit VPSheet(const VPLayoutPtr &layout, QObject *parent = nullptr);
|
||||
|
||||
virtual ~VPSheet() = default;
|
||||
~VPSheet() override = default;
|
||||
|
||||
/**
|
||||
* @brief GetLayout Returns the Layout of the sheet
|
||||
|
@ -162,7 +166,7 @@ public:
|
|||
|
||||
auto Uuid() const -> const QUuid &;
|
||||
|
||||
bool IsVisible() const;
|
||||
auto IsVisible() const -> bool;
|
||||
void SetVisible(bool visible);
|
||||
|
||||
auto GrainlineOrientation() const -> GrainlineType;
|
||||
|
@ -268,7 +272,7 @@ public:
|
|||
auto IgnoreMargins() const -> bool;
|
||||
void SetIgnoreMargins(bool newIgnoreMargins);
|
||||
|
||||
VPSheetSceneData *SceneData() const;
|
||||
auto SceneData() const -> VPSheetSceneData *;
|
||||
|
||||
void ClearSelection() const;
|
||||
|
||||
|
@ -278,7 +282,7 @@ public slots:
|
|||
void CheckPiecePositionValidity(const VPPiecePtr &piece) const;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(VPSheet)
|
||||
Q_DISABLE_COPY_MOVE(VPSheet) // NOLINT
|
||||
|
||||
VPLayoutWeakPtr m_layout{};
|
||||
|
||||
|
@ -312,6 +316,6 @@ private:
|
|||
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(VPSheetPtr)
|
||||
Q_DECLARE_METATYPE(VPSheetPtr) // NOLINT
|
||||
|
||||
#endif // VPSHEET_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user