Small changes in VPuzzleLayout class

This commit is contained in:
Ronan Le Tiec 2020-04-18 11:31:55 +02:00
parent 2cb5b8e6aa
commit 213814f09f
2 changed files with 19 additions and 19 deletions

View File

@ -31,16 +31,16 @@
VPuzzleLayout::VPuzzleLayout() : VPuzzleLayout::VPuzzleLayout() :
m_unplacedPiecesLayer(new VPuzzleLayer()), m_unplacedPiecesLayer(new VPuzzleLayer()),
m_layers(QList<VPuzzleLayer *>()), m_layers(QList<VPuzzleLayer *>()),
m_layoutUnit(Unit::Cm), m_unit(Unit::Cm),
m_layoutSize(QSizeF()), m_size(QSizeF()),
m_layoutMargins(QMarginsF()), m_margins(QMarginsF()),
m_followGrainLine(FollowGrainline::No), m_followGrainLine(FollowGrainline::No),
m_piecesGap(0), m_piecesGap(0),
m_warningSuperpositionOfPieces(false), m_warningSuperpositionOfPieces(false),
m_warningPiecesOutOfBound(false), m_warningPiecesOutOfBound(false),
m_stickyEdges(false) m_stickyEdges(false)
{ {
m_piecesGap = 0;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -79,53 +79,53 @@ QList<VPuzzleLayer *> VPuzzleLayout::GetLayers()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VPuzzleLayout::SetUnit(Unit unit) void VPuzzleLayout::SetUnit(Unit unit)
{ {
m_layoutUnit = unit; m_unit = unit;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Unit VPuzzleLayout::getUnit() Unit VPuzzleLayout::getUnit()
{ {
return m_layoutUnit; return m_unit;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VPuzzleLayout::SetLayoutSize(qreal width, qreal height) void VPuzzleLayout::SetLayoutSize(qreal width, qreal height)
{ {
m_layoutSize.setWidth(width); m_size.setWidth(width);
m_layoutSize.setHeight(height); m_size.setHeight(height);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VPuzzleLayout::SetLayoutSize(QSizeF size) void VPuzzleLayout::SetLayoutSize(QSizeF size)
{ {
m_layoutSize = size; m_size = size;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QSizeF VPuzzleLayout::GetLayoutSize() QSizeF VPuzzleLayout::GetLayoutSize()
{ {
return m_layoutSize; return m_size;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VPuzzleLayout::SetLayoutMargins(qreal left, qreal top, qreal right, qreal bottom) void VPuzzleLayout::SetLayoutMargins(qreal left, qreal top, qreal right, qreal bottom)
{ {
m_layoutMargins.setLeft(left); m_margins.setLeft(left);
m_layoutMargins.setTop(top); m_margins.setTop(top);
m_layoutMargins.setRight(right); m_margins.setRight(right);
m_layoutMargins.setRight(bottom); m_margins.setRight(bottom);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VPuzzleLayout::SetLayoutMargins(QMarginsF margins) void VPuzzleLayout::SetLayoutMargins(QMarginsF margins)
{ {
m_layoutMargins = margins; m_margins = margins;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QMarginsF VPuzzleLayout::GetLayoutMargins() QMarginsF VPuzzleLayout::GetLayoutMargins()
{ {
return m_layoutMargins; return m_margins;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -82,11 +82,11 @@ private:
QList<VPuzzleLayer *> m_layers; QList<VPuzzleLayer *> m_layers;
// format // format
Unit m_layoutUnit; Unit m_unit;
QSizeF m_layoutSize; QSizeF m_size;
// margins // margins
QMarginsF m_layoutMargins; QMarginsF m_margins;
// control // control
FollowGrainline m_followGrainLine; FollowGrainline m_followGrainLine;