2016-11-03 16:59:53 +01:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file
|
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
|
|
|
** @date 3 11, 2016
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
2017-10-05 11:20:01 +02:00
|
|
|
** This source code is part of the Valentina project, a pattern making
|
2016-11-03 16:59:53 +01:00
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
|
|
|
** Copyright (C) 2016 Valentina project
|
2020-01-31 07:00:05 +01:00
|
|
|
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
2016-11-03 16:59:53 +01:00
|
|
|
**
|
|
|
|
** Valentina is free software: you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation, either version 3 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
|
|
|
** Valentina is distributed in the hope that it will be useful,
|
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
#include "vpiecenode.h"
|
|
|
|
#include "vpiecenode_p.h"
|
2017-01-21 14:24:40 +01:00
|
|
|
#include "vcontainer.h"
|
|
|
|
#include "calculator.h"
|
2019-04-17 12:02:22 +02:00
|
|
|
#include "vformula.h"
|
2020-10-15 17:05:21 +02:00
|
|
|
#include "../vmisc/vabstractvalapplication.h"
|
2016-11-03 16:59:53 +01:00
|
|
|
|
2017-01-11 14:01:49 +01:00
|
|
|
#include <QDataStream>
|
2017-01-21 14:24:40 +01:00
|
|
|
#include <QtNumeric>
|
2017-01-11 14:01:49 +01:00
|
|
|
|
2019-07-01 12:25:03 +02:00
|
|
|
const quint32 VPieceNodeData::streamHeader = 0x2198CBC8; // CRC-32Q string "VPieceNodeData"
|
|
|
|
const quint16 VPieceNodeData::classVersion = 1;
|
|
|
|
|
2016-11-03 16:59:53 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VPieceNode::VPieceNode()
|
|
|
|
: d(new VPieceNodeData)
|
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VPieceNode::VPieceNode(quint32 id, Tool typeTool, bool reverse)
|
|
|
|
: d(new VPieceNodeData(id, typeTool, reverse))
|
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VPieceNode::VPieceNode(const VPieceNode &node)
|
|
|
|
: d (node.d)
|
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VPieceNode &VPieceNode::operator=(const VPieceNode &node)
|
|
|
|
{
|
|
|
|
if ( &node == this )
|
|
|
|
{
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
d = node.d;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2019-12-30 12:00:57 +01:00
|
|
|
#ifdef Q_COMPILER_RVALUE_REFS
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2019-12-30 16:13:18 +01:00
|
|
|
VPieceNode::VPieceNode(const VPieceNode &&node) Q_DECL_NOTHROW
|
|
|
|
: d (node.d)
|
|
|
|
{}
|
2019-12-30 12:00:57 +01:00
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2019-12-30 16:13:18 +01:00
|
|
|
VPieceNode &VPieceNode::operator=(VPieceNode &&node) Q_DECL_NOTHROW
|
2019-12-30 12:00:57 +01:00
|
|
|
{
|
|
|
|
std::swap(d, node.d);
|
2019-12-30 16:13:18 +01:00
|
|
|
return *this;
|
2019-12-30 12:00:57 +01:00
|
|
|
}
|
2019-12-30 16:13:18 +01:00
|
|
|
#endif
|
2019-12-30 12:00:57 +01:00
|
|
|
|
2016-11-03 16:59:53 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VPieceNode::~VPieceNode()
|
|
|
|
{}
|
|
|
|
|
2017-03-28 11:08:33 +02:00
|
|
|
// Friend functions
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QDataStream &operator<<(QDataStream &out, const VPieceNode &p)
|
|
|
|
{
|
2019-07-01 10:02:09 +02:00
|
|
|
out << *p.d;
|
2017-03-28 11:08:33 +02:00
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QDataStream &operator>>(QDataStream &in, VPieceNode &p)
|
|
|
|
{
|
|
|
|
in >> *p.d;
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
|
2016-11-03 16:59:53 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
quint32 VPieceNode::GetId() const
|
|
|
|
{
|
2016-11-04 15:28:10 +01:00
|
|
|
return d->m_id;
|
2016-11-03 16:59:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetId(quint32 id)
|
|
|
|
{
|
2016-11-04 15:28:10 +01:00
|
|
|
d->m_id = id;
|
2016-11-03 16:59:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
Tool VPieceNode::GetTypeTool() const
|
|
|
|
{
|
2016-11-04 15:28:10 +01:00
|
|
|
return d->m_typeTool;
|
2016-11-03 16:59:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetTypeTool(Tool value)
|
|
|
|
{
|
2016-11-04 15:28:10 +01:00
|
|
|
d->m_typeTool = value;
|
2016-11-03 16:59:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
bool VPieceNode::GetReverse() const
|
|
|
|
{
|
2016-11-04 15:28:10 +01:00
|
|
|
return d->m_reverse;
|
2016-11-03 16:59:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetReverse(bool reverse)
|
|
|
|
{
|
2016-11-04 15:28:10 +01:00
|
|
|
if (d->m_typeTool != Tool::NodePoint)
|
2016-11-04 15:25:01 +01:00
|
|
|
{
|
2016-11-04 15:28:10 +01:00
|
|
|
d->m_reverse = reverse;
|
2016-11-04 15:25:01 +01:00
|
|
|
}
|
2016-11-03 16:59:53 +01:00
|
|
|
}
|
2016-11-04 16:34:15 +01:00
|
|
|
|
2016-11-12 11:41:04 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2017-01-21 14:24:40 +01:00
|
|
|
qreal VPieceNode::GetSABefore(const VContainer *data) const
|
2016-11-12 11:41:04 +01:00
|
|
|
{
|
2017-03-30 10:09:12 +02:00
|
|
|
if (d->m_formulaWidthBefore == currentSeamAllowance)
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2019-04-17 12:02:22 +02:00
|
|
|
VFormula formula(d->m_formulaWidthBefore, data);
|
2019-04-17 15:08:48 +02:00
|
|
|
formula.setCheckZero(false);
|
2019-04-17 12:02:22 +02:00
|
|
|
formula.Eval();
|
|
|
|
|
|
|
|
if (formula.error())
|
|
|
|
{
|
|
|
|
QString nodeName;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
nodeName = data->GetGObject(d->m_id)->name();
|
|
|
|
}
|
|
|
|
catch (const VExceptionBadId &)
|
|
|
|
{}
|
|
|
|
|
|
|
|
const QString errorMsg = QObject::tr("Cannot calculate seam allowance before for point '%1'. Reason: %2.")
|
|
|
|
.arg(nodeName, formula.Reason());
|
2021-02-06 14:52:21 +01:00
|
|
|
VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) :
|
|
|
|
qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
2019-04-17 12:02:22 +02:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
return formula.getDoubleValue();
|
2016-11-12 11:41:04 +01:00
|
|
|
}
|
|
|
|
|
2016-11-17 13:08:23 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2017-01-21 14:24:40 +01:00
|
|
|
qreal VPieceNode::GetSABefore(const VContainer *data, Unit unit) const
|
2016-11-17 13:08:23 +01:00
|
|
|
{
|
2017-03-30 10:09:12 +02:00
|
|
|
if (d->m_formulaWidthBefore == currentSeamAllowance)
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2019-04-17 12:02:22 +02:00
|
|
|
VFormula formula(d->m_formulaWidthBefore, data);
|
2019-04-17 15:08:48 +02:00
|
|
|
formula.setCheckZero(false);
|
2019-04-17 12:02:22 +02:00
|
|
|
formula.Eval();
|
|
|
|
|
|
|
|
if (formula.error())
|
|
|
|
{
|
|
|
|
QString nodeName;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
nodeName = data->GetGObject(d->m_id)->name();
|
|
|
|
}
|
|
|
|
catch (const VExceptionBadId &)
|
|
|
|
{}
|
|
|
|
|
|
|
|
const QString errorMsg = QObject::tr("Cannot calculate seam allowance before for point '%1'. Reason: %2.")
|
|
|
|
.arg(nodeName, formula.Reason());
|
2021-02-06 14:52:21 +01:00
|
|
|
VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) :
|
|
|
|
qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
2019-04-17 12:02:22 +02:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
qreal value = formula.getDoubleValue();
|
2016-11-17 13:08:23 +01:00
|
|
|
if (value >= 0)
|
|
|
|
{
|
|
|
|
value = ToPixel(value, unit);
|
|
|
|
}
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2016-11-12 11:41:04 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2017-01-21 14:24:40 +01:00
|
|
|
QString VPieceNode::GetFormulaSABefore() const
|
|
|
|
{
|
|
|
|
return d->m_formulaWidthBefore;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetFormulaSABefore(const QString &formula)
|
2016-11-12 11:41:04 +01:00
|
|
|
{
|
|
|
|
if (d->m_typeTool == Tool::NodePoint)
|
|
|
|
{
|
2017-01-21 14:24:40 +01:00
|
|
|
d->m_formulaWidthBefore = formula;
|
2016-11-12 11:41:04 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2017-01-21 14:24:40 +01:00
|
|
|
qreal VPieceNode::GetSAAfter(const VContainer *data) const
|
2016-11-12 11:41:04 +01:00
|
|
|
{
|
2017-03-30 10:09:12 +02:00
|
|
|
if (d->m_formulaWidthAfter == currentSeamAllowance)
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2019-04-17 12:02:22 +02:00
|
|
|
VFormula formula(d->m_formulaWidthAfter, data);
|
2019-04-17 15:08:48 +02:00
|
|
|
formula.setCheckZero(false);
|
2019-04-17 12:02:22 +02:00
|
|
|
formula.Eval();
|
|
|
|
|
|
|
|
if (formula.error())
|
|
|
|
{
|
|
|
|
QString nodeName;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
nodeName = data->GetGObject(d->m_id)->name();
|
|
|
|
}
|
|
|
|
catch (const VExceptionBadId &)
|
|
|
|
{}
|
|
|
|
|
|
|
|
const QString errorMsg = QObject::tr("Cannot calculate seam allowance after for point '%1'. Reason: %2.")
|
|
|
|
.arg(nodeName, formula.Reason());
|
2021-02-06 14:52:21 +01:00
|
|
|
VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) :
|
|
|
|
qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
2019-04-17 12:02:22 +02:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return formula.getDoubleValue();
|
2016-11-12 11:41:04 +01:00
|
|
|
}
|
|
|
|
|
2016-11-17 13:08:23 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2017-01-21 14:24:40 +01:00
|
|
|
qreal VPieceNode::GetSAAfter(const VContainer *data, Unit unit) const
|
2016-11-17 13:08:23 +01:00
|
|
|
{
|
2017-03-30 10:09:12 +02:00
|
|
|
if (d->m_formulaWidthAfter == currentSeamAllowance)
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2019-04-17 12:02:22 +02:00
|
|
|
VFormula formula(d->m_formulaWidthAfter, data);
|
2019-04-17 15:08:48 +02:00
|
|
|
formula.setCheckZero(false);
|
2019-04-17 12:02:22 +02:00
|
|
|
formula.Eval();
|
|
|
|
|
|
|
|
if (formula.error())
|
|
|
|
{
|
|
|
|
QString nodeName;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
nodeName = data->GetGObject(d->m_id)->name();
|
|
|
|
}
|
|
|
|
catch (const VExceptionBadId &)
|
|
|
|
{}
|
|
|
|
|
|
|
|
const QString errorMsg = QObject::tr("Cannot calculate seam allowance after for point '%1'. Reason: ")
|
|
|
|
.arg(nodeName, formula.Reason());
|
2021-02-06 14:52:21 +01:00
|
|
|
VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) :
|
|
|
|
qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
2019-04-17 12:02:22 +02:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
qreal value = formula.getDoubleValue();
|
|
|
|
|
2016-11-17 13:08:23 +01:00
|
|
|
if (value >= 0)
|
|
|
|
{
|
|
|
|
value = ToPixel(value, unit);
|
|
|
|
}
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2016-11-12 11:41:04 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2017-01-21 14:24:40 +01:00
|
|
|
QString VPieceNode::GetFormulaSAAfter() const
|
|
|
|
{
|
|
|
|
return d->m_formulaWidthAfter;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetFormulaSAAfter(const QString &formula)
|
2016-11-12 11:41:04 +01:00
|
|
|
{
|
|
|
|
if (d->m_typeTool == Tool::NodePoint)
|
|
|
|
{
|
2017-01-21 14:24:40 +01:00
|
|
|
d->m_formulaWidthAfter = formula;
|
2016-11-12 11:41:04 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-17 12:02:22 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QString VPieceNode::GetFormulaPassmarkLength() const
|
|
|
|
{
|
|
|
|
return d->m_formulaPassmarkLength;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetFormulaPassmarkLength(const QString &formula)
|
|
|
|
{
|
|
|
|
if (d->m_typeTool == Tool::NodePoint)
|
|
|
|
{
|
|
|
|
d->m_formulaPassmarkLength = formula;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
qreal VPieceNode::GetPassmarkLength(const VContainer *data, Unit unit) const
|
|
|
|
{
|
|
|
|
if (d->m_manualPassmarkLength)
|
|
|
|
{
|
|
|
|
VFormula formula(d->m_formulaPassmarkLength, data);
|
|
|
|
formula.setCheckZero(false);
|
|
|
|
formula.setCheckLessThanZero(false);
|
|
|
|
formula.Eval();
|
|
|
|
|
|
|
|
if (formula.error())
|
|
|
|
{
|
|
|
|
QString nodeName;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
nodeName = data->GetGObject(d->m_id)->name();
|
|
|
|
}
|
|
|
|
catch (const VExceptionBadId &)
|
|
|
|
{}
|
|
|
|
|
|
|
|
const QString errorMsg = QObject::tr("Cannot calculate passmark length for point '%1'. Reason: %2.")
|
|
|
|
.arg(nodeName, formula.Reason());
|
2021-02-06 14:52:21 +01:00
|
|
|
VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) :
|
|
|
|
qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
2019-04-17 12:02:22 +02:00
|
|
|
return VSAPoint::maxPassmarkLength;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ToPixel(formula.getDoubleValue(), unit);
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2016-11-19 12:44:12 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
PieceNodeAngle VPieceNode::GetAngleType() const
|
|
|
|
{
|
|
|
|
return d->m_angleType;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetAngleType(PieceNodeAngle type)
|
|
|
|
{
|
2016-11-19 17:52:47 +01:00
|
|
|
if (d->m_typeTool == Tool::NodePoint)
|
|
|
|
{
|
|
|
|
d->m_angleType = type;
|
|
|
|
}
|
2016-11-19 12:44:12 +01:00
|
|
|
}
|
|
|
|
|
2016-11-04 16:34:15 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2017-03-24 12:08:16 +01:00
|
|
|
bool VPieceNode::IsPassmark() const
|
2016-11-04 16:34:15 +01:00
|
|
|
{
|
2017-03-24 12:08:16 +01:00
|
|
|
return d->m_isPassmark;
|
2016-11-04 16:34:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2017-03-24 12:08:16 +01:00
|
|
|
void VPieceNode::SetPassmark(bool passmark)
|
2016-11-04 16:34:15 +01:00
|
|
|
{
|
2017-03-24 12:08:16 +01:00
|
|
|
if (GetTypeTool() == Tool::NodePoint)
|
|
|
|
{
|
|
|
|
d->m_isPassmark = passmark;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-05 12:22:33 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
bool VPieceNode::IsMainPathNode() const
|
|
|
|
{
|
|
|
|
return d->m_isMainPathNode;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetMainPathNode(bool value)
|
|
|
|
{
|
|
|
|
d->m_isMainPathNode = value;
|
|
|
|
}
|
|
|
|
|
2017-03-24 12:08:16 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
PassmarkLineType VPieceNode::GetPassmarkLineType() const
|
|
|
|
{
|
|
|
|
return d->m_passmarkLineType;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetPassmarkLineType(PassmarkLineType lineType)
|
|
|
|
{
|
|
|
|
d->m_passmarkLineType = lineType;
|
|
|
|
}
|
2016-11-04 16:34:15 +01:00
|
|
|
|
2017-03-24 12:08:16 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
PassmarkAngleType VPieceNode::GetPassmarkAngleType() const
|
|
|
|
{
|
|
|
|
return d->m_passmarkAngleType;
|
|
|
|
}
|
2016-11-04 16:34:15 +01:00
|
|
|
|
2017-03-24 12:08:16 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetPassmarkAngleType(PassmarkAngleType angleType)
|
|
|
|
{
|
|
|
|
d->m_passmarkAngleType = angleType;
|
2016-11-04 16:34:15 +01:00
|
|
|
}
|
2017-03-21 16:18:48 +01:00
|
|
|
|
2017-04-26 10:22:42 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
bool VPieceNode::IsShowSecondPassmark() const
|
|
|
|
{
|
|
|
|
return d->m_isShowSecondPassmark;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetShowSecondPassmark(bool value)
|
|
|
|
{
|
|
|
|
d->m_isShowSecondPassmark = value;
|
|
|
|
}
|
|
|
|
|
2018-03-05 11:05:59 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
bool VPieceNode::IsCheckUniqueness() const
|
|
|
|
{
|
|
|
|
return d->m_checkUniqueness;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetCheckUniqueness(bool value)
|
|
|
|
{
|
|
|
|
d->m_checkUniqueness = (d->m_typeTool == Tool::NodePoint ? value : true);
|
|
|
|
}
|
|
|
|
|
2019-04-17 12:02:22 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
bool VPieceNode::IsManualPassmarkLength() const
|
|
|
|
{
|
|
|
|
return d->m_manualPassmarkLength;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetManualPassmarkLength(bool value)
|
|
|
|
{
|
|
|
|
d->m_manualPassmarkLength = value;
|
|
|
|
}
|
|
|
|
|
2017-03-21 16:18:48 +01:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
bool VPieceNode::IsExcluded() const
|
|
|
|
{
|
|
|
|
return d->m_excluded;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPieceNode::SetExcluded(bool exclude)
|
|
|
|
{
|
|
|
|
d->m_excluded = exclude;
|
|
|
|
}
|