Refactoring.
This commit is contained in:
parent
5e3c23c460
commit
894e2dffac
|
@ -491,10 +491,10 @@ auto VPPiece::StickyPosition(qreal &dx, qreal &dy) const -> bool
|
|||
auto VPPiece::PathsSuperposition(const QVector<QPointF> &path1, const QVector<QPointF> &path2) -> bool
|
||||
{
|
||||
const QRectF path1Rect = VLayoutPiece::BoundingRect(path1);
|
||||
const QPainterPath path1Path = VAbstractPiece::PainterPath(path1);
|
||||
const QPainterPath path1Path = VGObject::PainterPath(path1);
|
||||
|
||||
const QRectF path2Rect = VLayoutPiece::BoundingRect(path2);
|
||||
const QPainterPath path2Path = VAbstractPiece::PainterPath(path2);
|
||||
const QPainterPath path2Path = VGObject::PainterPath(path2);
|
||||
|
||||
if (path1Rect.intersects(path2Rect) || path2Rect.contains(path1Rect) || path1Rect.contains(path2Rect))
|
||||
{
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <QtDebug>
|
||||
#include <QGuiApplication>
|
||||
#include <QScreen>
|
||||
#include <QFileInfo>
|
||||
|
||||
#include "../vmisc/compatibility.h"
|
||||
#include "../vwidgets/global.h"
|
||||
|
|
|
@ -584,6 +584,7 @@ void MainWindowsNoGUI::ExportDetailsAsFlatLayout(const QVector<VLayoutPiece> &li
|
|||
QScopedPointer<QGraphicsScene> scene(new QGraphicsScene());
|
||||
|
||||
QList<QGraphicsItem *> list;
|
||||
list.reserve(listDetails.count());
|
||||
for (auto piece : listDetails)
|
||||
{
|
||||
QGraphicsItem *item = piece.GetItem(m_dialogSaveLayout->IsTextAsPaths());
|
||||
|
@ -607,7 +608,7 @@ void MainWindowsNoGUI::ExportDetailsAsFlatLayout(const QVector<VLayoutPiece> &li
|
|||
list.append(item);
|
||||
}
|
||||
|
||||
for (auto item : list)
|
||||
for (auto *item : list)
|
||||
{
|
||||
scene->addItem(item);
|
||||
}
|
||||
|
@ -621,7 +622,7 @@ void MainWindowsNoGUI::ExportDetailsAsFlatLayout(const QVector<VLayoutPiece> &li
|
|||
QTransform matrix;
|
||||
matrix = matrix.translate(-mx, -my);
|
||||
|
||||
for (auto item : list)
|
||||
for (auto *item : list)
|
||||
{
|
||||
item->setTransform(matrix);
|
||||
}
|
||||
|
@ -770,6 +771,7 @@ void MainWindowsNoGUI::ExportDetailsAsApparelLayout(QVector<VLayoutPiece> listDe
|
|||
QScopedPointer<QGraphicsScene> scene(new QGraphicsScene());
|
||||
|
||||
QList<QGraphicsItem *> list;
|
||||
list.reserve(listDetails.count());
|
||||
for (int i=0; i < listDetails.count(); ++i)
|
||||
{
|
||||
VLayoutPiece piece = listDetails.at(i);
|
||||
|
@ -799,7 +801,7 @@ void MainWindowsNoGUI::ExportDetailsAsApparelLayout(QVector<VLayoutPiece> listDe
|
|||
list.append(item);
|
||||
}
|
||||
|
||||
for (auto item : list)
|
||||
for (auto *item : list)
|
||||
{
|
||||
scene->addItem(item);
|
||||
}
|
||||
|
@ -812,7 +814,7 @@ void MainWindowsNoGUI::ExportDetailsAsApparelLayout(QVector<VLayoutPiece> listDe
|
|||
QTransform matrix;
|
||||
matrix = matrix.translate(-mx, -my);
|
||||
|
||||
for (auto item : list)
|
||||
for (auto *item : list)
|
||||
{
|
||||
item->setTransform(matrix);
|
||||
}
|
||||
|
@ -862,7 +864,7 @@ void MainWindowsNoGUI::PrintPreviewTiled()
|
|||
else
|
||||
{
|
||||
VValentinaSettings *settings = VAbstractValApplication::VApp()->ValentinaSettings();
|
||||
m_layoutSettings->SetTiledMargins(QMarginsF(settings->GetTiledPDFMargins(Unit::Mm)));
|
||||
m_layoutSettings->SetTiledMargins(settings->GetTiledPDFMargins(Unit::Mm));
|
||||
m_layoutSettings->SetTiledPDFOrientation(settings->GetTiledPDFOrientation());
|
||||
m_layoutSettings->SetTiledPDFPaperSize(QSizeF(settings->GetTiledPDFPaperWidth(Unit::Mm),
|
||||
settings->GetTiledPDFPaperHeight(Unit::Mm)));
|
||||
|
@ -896,7 +898,7 @@ void MainWindowsNoGUI::PrintTiled()
|
|||
else
|
||||
{
|
||||
VValentinaSettings *settings = VAbstractValApplication::VApp()->ValentinaSettings();
|
||||
m_layoutSettings->SetTiledMargins(QMarginsF(settings->GetTiledPDFMargins(Unit::Mm)));
|
||||
m_layoutSettings->SetTiledMargins(settings->GetTiledPDFMargins(Unit::Mm));
|
||||
m_layoutSettings->SetTiledPDFOrientation(settings->GetTiledPDFOrientation());
|
||||
m_layoutSettings->SetTiledPDFPaperSize(QSizeF(settings->GetTiledPDFPaperWidth(Unit::Mm),
|
||||
settings->GetTiledPDFPaperHeight(Unit::Mm)));
|
||||
|
@ -912,12 +914,12 @@ QVector<VLayoutPiece> MainWindowsNoGUI::PrepareDetailsForLayout(const QVector<De
|
|||
{
|
||||
if (details.isEmpty())
|
||||
{
|
||||
return QVector<VLayoutPiece>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::function<VLayoutPiece (const DetailForLayout &data)> PrepareDetail = [](const DetailForLayout &data)
|
||||
std::function<VLayoutPiece(const DetailForLayout &data)> PrepareDetail = [](const DetailForLayout &data)
|
||||
{
|
||||
VAbstractTool *tool = qobject_cast<VAbstractTool*>(VAbstractPattern::getTool(data.id));
|
||||
auto *tool = qobject_cast<VAbstractTool *>(VAbstractPattern::getTool(data.id));
|
||||
SCASSERT(tool != nullptr)
|
||||
return VLayoutPiece::Create(data.piece, data.id, tool->getData());
|
||||
};
|
||||
|
@ -1054,8 +1056,8 @@ QList<QGraphicsScene *> MainWindowsNoGUI::CreateScenes(const QList<QGraphicsItem
|
|||
scene->addItem(shadows.at(i));
|
||||
scene->addItem(papers.at(i));
|
||||
|
||||
const QList<QGraphicsItem *> paperDetails = details.at(i);
|
||||
for (auto &detail : paperDetails)
|
||||
const QList<QGraphicsItem *> &paperDetails = details.at(i);
|
||||
for (const auto &detail : paperDetails)
|
||||
{
|
||||
scene->addItem(detail);
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
bool m_bAllowOpti; ///< Flag indication optimizeability
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(QmuParserCallbackData)
|
||||
Q_DISABLE_ASSIGN_MOVE(QmuParserCallbackData) // NOLINT
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "vdxfengine.h"
|
||||
|
||||
#include <QLineF>
|
||||
#include <QByteArray>
|
||||
#include <QColor>
|
||||
#include <QDateTime>
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
QString formulaLength;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VAbstractArcData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VAbstractArcData) // NOLINT
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include "vgeometrydef.h"
|
||||
#include "vgobject.h"
|
||||
#include "../vmisc/typedef.h"
|
||||
|
||||
using DirectionArrow = QPair<QLineF, QLineF>;
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
qreal approximationScale;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VAbstractCurveData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VAbstractCurveData) // NOLINT
|
||||
};
|
||||
|
||||
VAbstractCurveData::~VAbstractCurveData()
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
QString formulaRadius;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VArcData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VArcData) // NOLINT
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
VPointF p4;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VCubicBezierData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VCubicBezierData) // NOLINT
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
QVector<VPointF> path;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VCubicBezierPathData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VCubicBezierPathData) // NOLINT
|
||||
};
|
||||
|
||||
VCubicBezierPathData::~VCubicBezierPathData()
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
#define VELLIPTICALARC_P
|
||||
|
||||
#include <QSharedData>
|
||||
#include <QTransform>
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||
#include "../vmisc/diagnostic.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||
#include "../vmisc/defglobal.h"
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
|
@ -36,7 +38,7 @@ public:
|
|||
QTransform m_transform;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VEllipticalArcData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VEllipticalArcData) // NOLINT
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <QPolygonF>
|
||||
#include <QTransform>
|
||||
|
||||
#include "../ifc/ifcdef.h"
|
||||
#include "../vmisc/def.h"
|
||||
|
||||
enum class GOType : qint8
|
||||
{
|
||||
|
@ -71,25 +71,25 @@ struct VLayoutPassmark
|
|||
QLineF baseLine{};
|
||||
bool isBuiltIn{false};
|
||||
|
||||
friend QDataStream& operator<<(QDataStream& dataStream, const VLayoutPassmark& data);
|
||||
friend QDataStream& operator>>(QDataStream& dataStream, VLayoutPassmark& data);
|
||||
friend auto operator<<(QDataStream& dataStream, const VLayoutPassmark& data) -> QDataStream&;
|
||||
friend auto operator>>(QDataStream& dataStream, VLayoutPassmark& data) -> QDataStream&;
|
||||
private:
|
||||
static const quint32 streamHeader;
|
||||
static const quint16 classVersion;
|
||||
};
|
||||
Q_DECLARE_METATYPE(VLayoutPassmark)
|
||||
Q_DECLARE_METATYPE(VLayoutPassmark) // NOLINT
|
||||
|
||||
constexpr qreal accuracyPointOnLine = MmToPixel(0.1555);
|
||||
|
||||
Q_REQUIRED_RESULT static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2,
|
||||
qreal accuracy = accuracyPointOnLine);
|
||||
static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2, qreal accuracy)
|
||||
Q_REQUIRED_RESULT static inline auto VFuzzyComparePoints(const QPointF &p1, const QPointF &p2,
|
||||
qreal accuracy = accuracyPointOnLine) -> bool;
|
||||
static inline auto VFuzzyComparePoints(const QPointF &p1, const QPointF &p2, qreal accuracy) -> bool
|
||||
{
|
||||
return QLineF(p1, p2).length() <= accuracy;
|
||||
}
|
||||
|
||||
Q_REQUIRED_RESULT static inline bool VFuzzyOnAxis(qreal v1, qreal v2, qreal accuracy = accuracyPointOnLine);
|
||||
static inline bool VFuzzyOnAxis(qreal v1, qreal v2, qreal accuracy)
|
||||
Q_REQUIRED_RESULT static inline auto VFuzzyOnAxis(qreal v1, qreal v2, qreal accuracy = accuracyPointOnLine) -> bool;
|
||||
static inline auto VFuzzyOnAxis(qreal v1, qreal v2, qreal accuracy) -> bool
|
||||
{
|
||||
return qAbs(v1 - v2) <= accuracy;
|
||||
}
|
||||
|
|
|
@ -37,9 +37,7 @@
|
|||
#include <QTransform>
|
||||
|
||||
#include "../vmisc/def.h"
|
||||
#include "../vmisc/vmath.h"
|
||||
#include "../vmisc/compatibility.h"
|
||||
#include "../ifc/ifcdef.h"
|
||||
#include "vgobject_p.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
|
||||
|
@ -51,7 +49,7 @@ namespace
|
|||
* This is actually the same as the area of the triangle defined by the three points, multiplied by 2.
|
||||
* @return 2 * triangleArea(a,b,c)
|
||||
*/
|
||||
double PerpDotProduct(const QPointF &p1, const QPointF &p2, const QPointF &t)
|
||||
auto PerpDotProduct(const QPointF &p1, const QPointF &p2, const QPointF &t) -> double
|
||||
{
|
||||
return (p1.x() - t.x()) * (p2.y() - t.y()) - (p1.y() - t.y()) * (p2.x() - t.x());
|
||||
}
|
||||
|
@ -66,7 +64,7 @@ double PerpDotProduct(const QPointF &p1, const QPointF &p2, const QPointF &t)
|
|||
* line e1=(p1, p2), e.g. the minimal area calucalted with PerpDotProduc() if point still not on the line. This distance
|
||||
* is controled by variable accuracyPointOnLine
|
||||
*/
|
||||
double GetEpsilon(const QPointF &t, QPointF p1, QPointF p2, qreal accuracy)
|
||||
auto GetEpsilon(const QPointF &t, QPointF p1, QPointF p2, qreal accuracy) -> double
|
||||
{
|
||||
QLineF edge1(p1, p2);
|
||||
QLineF edge2(p1, t);
|
||||
|
@ -83,7 +81,7 @@ double GetEpsilon(const QPointF &t, QPointF p1, QPointF p2, qreal accuracy)
|
|||
|
||||
return qAbs(PerpDotProduct(p1, p2, line.p2()));
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
|
@ -109,7 +107,7 @@ VGObject::VGObject(const GOType &type, const quint32 &idObject, const Draw &mode
|
|||
* @brief VGObject copy constructor.
|
||||
* @param obj object.
|
||||
*/
|
||||
VGObject::VGObject(const VGObject &obj)
|
||||
VGObject::VGObject(const VGObject &obj) // NOLINT(modernize-use-equals-default)
|
||||
:d (obj.d)
|
||||
{}
|
||||
|
||||
|
@ -119,7 +117,7 @@ VGObject::VGObject(const VGObject &obj)
|
|||
* @param obj object
|
||||
* @return object
|
||||
*/
|
||||
VGObject &VGObject::operator=(const VGObject &obj)
|
||||
auto VGObject::operator=(const VGObject &obj) -> VGObject &
|
||||
{
|
||||
if ( &obj == this )
|
||||
{
|
||||
|
@ -136,7 +134,7 @@ VGObject::VGObject(VGObject &&obj) Q_DECL_NOTHROW
|
|||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VGObject &VGObject::operator=(VGObject &&obj) Q_DECL_NOTHROW
|
||||
auto VGObject::operator=(VGObject &&obj) Q_DECL_NOTHROW -> VGObject &
|
||||
{
|
||||
std::swap(d, obj.d);
|
||||
return *this;
|
||||
|
@ -144,7 +142,7 @@ VGObject &VGObject::operator=(VGObject &&obj) Q_DECL_NOTHROW
|
|||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VGObject::~VGObject()
|
||||
VGObject::~VGObject() // NOLINT(modernize-use-equals-default)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -152,7 +150,7 @@ VGObject::~VGObject()
|
|||
* @brief getIdObject return parent id.
|
||||
* @return parent id or 0 if object don't have parent.
|
||||
*/
|
||||
quint32 VGObject::getIdObject() const
|
||||
auto VGObject::getIdObject() const -> quint32
|
||||
{
|
||||
return d->idObject;
|
||||
}
|
||||
|
@ -172,7 +170,7 @@ void VGObject::setIdObject(const quint32 &value)
|
|||
* @brief name return name graphical object.
|
||||
* @return name
|
||||
*/
|
||||
QString VGObject::name() const
|
||||
auto VGObject::name() const -> QString
|
||||
{
|
||||
return d->_name;
|
||||
}
|
||||
|
@ -192,7 +190,7 @@ void VGObject::setName(const QString &name)
|
|||
* @brief getMode return mode creation.
|
||||
* @return mode.
|
||||
*/
|
||||
Draw VGObject::getMode() const
|
||||
auto VGObject::getMode() const -> Draw
|
||||
{
|
||||
return d->mode;
|
||||
}
|
||||
|
@ -212,7 +210,7 @@ void VGObject::setMode(const Draw &value)
|
|||
* @brief getType return object type.
|
||||
* @return type.
|
||||
*/
|
||||
GOType VGObject::getType() const
|
||||
auto VGObject::getType() const -> GOType
|
||||
{
|
||||
return d->type;
|
||||
}
|
||||
|
@ -229,7 +227,7 @@ void VGObject::setType(const GOType &type)
|
|||
* @brief id return id object.
|
||||
* @return id
|
||||
*/
|
||||
quint32 VGObject::id() const
|
||||
auto VGObject::id() const -> quint32
|
||||
{
|
||||
return d->_id;
|
||||
}
|
||||
|
@ -251,7 +249,7 @@ void VGObject::SetAlias(const QString &alias)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VGObject::GetAlias() const
|
||||
auto VGObject::GetAlias() const -> QString
|
||||
{
|
||||
return d->m_alias;
|
||||
}
|
||||
|
@ -263,21 +261,21 @@ void VGObject::SetAliasSuffix(const QString &aliasSuffix)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VGObject::GetAliasSuffix() const
|
||||
auto VGObject::GetAliasSuffix() const -> QString
|
||||
{
|
||||
return d->m_aliasSuffix;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VGObject::ObjectName() const
|
||||
auto VGObject::ObjectName() const -> QString
|
||||
{
|
||||
const QString alias = VAbstractApplication::VApp()->TrVars()->VarToUser(d->m_alias);
|
||||
const QString name = VAbstractApplication::VApp()->TrVars()->VarToUser(d->_name);
|
||||
return not d->m_alias.isEmpty() ? QString("%1 (%2)").arg(alias, name) : name;
|
||||
return not d->m_alias.isEmpty() ? QStringLiteral("%1 (%2)").arg(alias, name) : name;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
quint32 VGObject::getIdTool() const
|
||||
auto VGObject::getIdTool() const -> quint32
|
||||
{
|
||||
if (d->mode == Draw::Calculation)
|
||||
{
|
||||
|
@ -285,19 +283,14 @@ quint32 VGObject::getIdTool() const
|
|||
{
|
||||
return d->idObject;
|
||||
}
|
||||
else
|
||||
{
|
||||
return d->_id;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return d->_id;
|
||||
}
|
||||
|
||||
return d->_id;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QJsonObject VGObject::ToJson() const
|
||||
auto VGObject::ToJson() const -> QJsonObject
|
||||
{
|
||||
QJsonObject object
|
||||
{
|
||||
|
@ -309,7 +302,7 @@ QJsonObject VGObject::ToJson() const
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QLineF VGObject::BuildLine(const QPointF &p1, const qreal &length, const qreal &angle)
|
||||
auto VGObject::BuildLine(const QPointF &p1, const qreal &length, const qreal &angle) -> QLineF
|
||||
{
|
||||
QLineF line = QLineF();
|
||||
line.setP1(p1);
|
||||
|
@ -319,14 +312,15 @@ QLineF VGObject::BuildLine(const QPointF &p1, const qreal &length, const qreal &
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QPointF VGObject::BuildRay(const QPointF &firstPoint, const qreal &angle, const QRectF &scRect)
|
||||
auto VGObject::BuildRay(const QPointF &firstPoint, const qreal &angle, const QRectF &scRect) -> QPointF
|
||||
{
|
||||
QRectF rect = scRect;
|
||||
if (rect.isValid() == false)
|
||||
if (not rect.isValid())
|
||||
{
|
||||
rect = QRectF(0, 0, 1200, 700);
|
||||
}
|
||||
if (rect.contains(firstPoint) == false)
|
||||
|
||||
if (not rect.contains(firstPoint))
|
||||
{
|
||||
// If point outside of scene rect create one around point and unite two rects.
|
||||
QRectF rectangle(firstPoint.x()-rect.width()/2, firstPoint.y()-rect.height()/2, rect.width(), rect.height());
|
||||
|
@ -339,22 +333,21 @@ QPointF VGObject::BuildRay(const QPointF &firstPoint, const qreal &angle, const
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QLineF VGObject::BuildAxis(const QPointF &p, const qreal &angle, const QRectF &scRect)
|
||||
auto VGObject::BuildAxis(const QPointF &p, const qreal &angle, const QRectF &scRect) -> QLineF
|
||||
{
|
||||
const QPointF endP1 = BuildRay(p, angle+180, scRect);
|
||||
const QPointF endP2 = BuildRay(p, angle, scRect);
|
||||
return QLineF(endP1, endP2);
|
||||
return {endP1, endP2};
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QLineF VGObject::BuildAxis(const QPointF &p1, const QPointF &p2, const QRectF &scRect)
|
||||
auto VGObject::BuildAxis(const QPointF &p1, const QPointF &p2, const QRectF &scRect) -> QLineF
|
||||
{
|
||||
QLineF line(p1, p2);
|
||||
return BuildAxis(p1, line.angle(), scRect);
|
||||
return BuildAxis(p1, QLineF(p1, p2).angle(), scRect);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
int VGObject::ContactPoints(const QPointF &p, const QPointF ¢er, qreal radius, QPointF &p1, QPointF &p2)
|
||||
auto VGObject::ContactPoints(const QPointF &p, const QPointF ¢er, qreal radius, QPointF &p1, QPointF &p2) -> int
|
||||
{
|
||||
const int flag = PointInCircle(p, center, radius);
|
||||
|
||||
|
@ -381,7 +374,7 @@ int VGObject::ContactPoints(const QPointF &p, const QPointF ¢er, qreal radiu
|
|||
* @param line line.
|
||||
* @return point intersection.
|
||||
*/
|
||||
QPointF VGObject::LineIntersectRect(const QRectF &rec, const QLineF &line)
|
||||
auto VGObject::LineIntersectRect(const QRectF &rec, const QLineF &line) -> QPointF
|
||||
{
|
||||
qreal x1, y1, x2, y2;
|
||||
rec.getCoords(&x1, &y1, &x2, &y2);
|
||||
|
@ -417,7 +410,7 @@ QPointF VGObject::LineIntersectRect(const QRectF &rec, const QLineF &line)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
int VGObject::IntersectionCircles(const QPointF &c1, double r1, const QPointF &c2, double r2, QPointF &p1, QPointF &p2)
|
||||
auto VGObject::IntersectionCircles(const QPointF &c1, double r1, const QPointF &c2, double r2, QPointF &p1, QPointF &p2) -> int
|
||||
{
|
||||
if (VFuzzyComparePossibleNulls(c1.x(), c2.x()) && VFuzzyComparePossibleNulls(c1.y(), c2.y())
|
||||
&& VFuzzyComparePossibleNulls(r1, r2))
|
||||
|
@ -435,25 +428,24 @@ int VGObject::IntersectionCircles(const QPointF &c1, double r1, const QPointF &c
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
else if (VFuzzyComparePossibleNulls(c*c, r1*r1*(a*a+b*b)))
|
||||
|
||||
if (VFuzzyComparePossibleNulls(c*c, r1*r1*(a*a+b*b)))
|
||||
{
|
||||
p1 = QPointF(x0 + c1.x(), y0 + c1.y());
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
const double d = r1*r1 - c*c/(a*a+b*b);
|
||||
const double mult = sqrt (d / (a*a+b*b));
|
||||
|
||||
const double ax = x0 + b * mult;
|
||||
const double bx = x0 - b * mult;
|
||||
const double ay = y0 - a * mult;
|
||||
const double by = y0 + a * mult;
|
||||
const double d = r1*r1 - c*c/(a*a+b*b);
|
||||
const double mult = sqrt (d / (a*a+b*b));
|
||||
|
||||
p1 = QPointF(ax + c1.x(), ay + c1.y());
|
||||
p2 = QPointF(bx + c1.x(), by + c1.y());
|
||||
return 2;
|
||||
}
|
||||
const double ax = x0 + b * mult;
|
||||
const double bx = x0 - b * mult;
|
||||
const double ay = y0 - a * mult;
|
||||
const double by = y0 + a * mult;
|
||||
|
||||
p1 = QPointF(ax + c1.x(), ay + c1.y());
|
||||
p2 = QPointF(bx + c1.x(), by + c1.y());
|
||||
return 2;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -466,7 +458,8 @@ int VGObject::IntersectionCircles(const QPointF &c1, double r1, const QPointF &c
|
|||
* @param p2 second intersection point.
|
||||
* @return 0 - intersection doesn't exist, 1 - one intersection point, 2 - two intersection points.
|
||||
*/
|
||||
qint32 VGObject::LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2)
|
||||
auto VGObject::LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1,
|
||||
QPointF &p2) -> qint32
|
||||
{
|
||||
// Fix for issue #485. https://bitbucket.org/dismine/valentina/issues/485/error-when-drawing-a-curved-path
|
||||
if (qFuzzyIsNull(line.length()))
|
||||
|
@ -512,7 +505,7 @@ qint32 VGObject::LineIntersectCircle(const QPointF ¢er, qreal radius, const
|
|||
* @param line line.
|
||||
* @return point on line or extended line if origin size too small.
|
||||
*/
|
||||
QPointF VGObject::ClosestPoint(const QLineF &line, const QPointF &point)
|
||||
auto VGObject::ClosestPoint(const QLineF &line, const QPointF &point) -> QPointF
|
||||
{
|
||||
qreal a = 0, b = 0, c = 0;
|
||||
LineCoefficients(line, &a, &b, &c);
|
||||
|
@ -526,16 +519,14 @@ QPointF VGObject::ClosestPoint(const QLineF &line, const QPointF &point)
|
|||
{
|
||||
return p;
|
||||
}
|
||||
else
|
||||
{
|
||||
return point;
|
||||
}
|
||||
|
||||
return point;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QPointF VGObject::addVector(const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k)
|
||||
auto VGObject::addVector(const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) -> QPointF
|
||||
{
|
||||
return QPointF (p.x() + (p2.x() - p1.x()) * k, p.y() + (p2.y() - p1.y()) * k);
|
||||
return {p.x() + (p2.x() - p1.x()) * k, p.y() + (p2.y() - p1.y()) * k};
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -617,7 +608,7 @@ auto VGObject::IsPointOnLineSegment(const QPointF &t, const QPointF &p1, const Q
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
bool VGObject::IsLineSegmentOnLineSegment(const QLineF &seg1, const QLineF &seg2, qreal accuracy)
|
||||
auto VGObject::IsLineSegmentOnLineSegment(const QLineF &seg1, const QLineF &seg2, qreal accuracy) -> bool
|
||||
{
|
||||
const bool onLine = IsPointOnLineviaPDP(seg1.p1(), seg2.p1(), seg2.p2(), accuracy) &&
|
||||
IsPointOnLineviaPDP(seg1.p2(), seg2.p1(), seg2.p2(), accuracy);
|
||||
|
@ -628,23 +619,19 @@ bool VGObject::IsLineSegmentOnLineSegment(const QLineF &seg1, const QLineF &seg2
|
|||
IsPointOnLineSegment(seg2.p1(), seg1.p1(), seg1.p2(), accuracy) ||
|
||||
IsPointOnLineSegment(seg2.p2(), seg1.p1(), seg1.p2(), accuracy);
|
||||
}
|
||||
else
|
||||
{
|
||||
return onLine;
|
||||
}
|
||||
|
||||
return onLine;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QPointF VGObject::CorrectDistortion(const QPointF &t, const QPointF &p1, const QPointF &p2)
|
||||
auto VGObject::CorrectDistortion(const QPointF &t, const QPointF &p1, const QPointF &p2) -> QPointF
|
||||
{
|
||||
if (not VFuzzyComparePoints(p1, p2))
|
||||
{
|
||||
return VGObject::ClosestPoint(QLineF(p1, p2), t);
|
||||
}
|
||||
else
|
||||
{
|
||||
return t;
|
||||
}
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -654,7 +641,7 @@ QPointF VGObject::CorrectDistortion(const QPointF &t, const QPointF &p1, const Q
|
|||
* The pdp is zero only if the t lies on the line e1 = vector from p1 to p2.
|
||||
* @return true if point is on line
|
||||
*/
|
||||
bool VGObject::IsPointOnLineviaPDP(const QPointF &t, const QPointF &p1, const QPointF &p2, qreal accuracy)
|
||||
auto VGObject::IsPointOnLineviaPDP(const QPointF &t, const QPointF &p1, const QPointF &p2, qreal accuracy) -> bool
|
||||
{
|
||||
const double p = qAbs(PerpDotProduct(p1, p2, t));
|
||||
const double e = GetEpsilon(t, p1, p2, accuracy);
|
||||
|
@ -664,17 +651,19 @@ bool VGObject::IsPointOnLineviaPDP(const QPointF &t, const QPointF &p1, const QP
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
int VGObject::PointInCircle(const QPointF &p, const QPointF ¢er, qreal radius)
|
||||
auto VGObject::PointInCircle(const QPointF &p, const QPointF ¢er, qreal radius) -> int
|
||||
{
|
||||
const double d = QLineF (p, center).length();
|
||||
if (VFuzzyComparePossibleNulls(radius, d))
|
||||
{
|
||||
return 1; // on circle
|
||||
}
|
||||
|
||||
if (radius > d)
|
||||
{
|
||||
return 0; // outside circle
|
||||
}
|
||||
|
||||
return 2; // inside circle
|
||||
}
|
||||
|
||||
|
@ -686,7 +675,7 @@ int VGObject::PointInCircle(const QPointF &p, const QPointF ¢er, qreal radiu
|
|||
* @return length length of contour.
|
||||
*/
|
||||
// cppcheck-suppress unusedFunction
|
||||
int VGObject::GetLengthContour(const QVector<QPointF> &contour, const QVector<QPointF> &newPoints)
|
||||
auto VGObject::GetLengthContour(const QVector<QPointF> &contour, const QVector<QPointF> &newPoints) -> int
|
||||
{
|
||||
qreal length = 0;
|
||||
QVector<QPointF> points;
|
||||
|
@ -700,7 +689,7 @@ int VGObject::GetLengthContour(const QVector<QPointF> &contour, const QVector<QP
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QTransform VGObject::FlippingMatrix(const QLineF &axis)
|
||||
auto VGObject::FlippingMatrix(const QLineF &axis) -> QTransform
|
||||
{
|
||||
QTransform matrix;
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#ifndef VGOBJECT_H
|
||||
#define VGOBJECT_H
|
||||
|
||||
#include <QPainterPath>
|
||||
#include <QSharedDataPointer>
|
||||
#include <QString>
|
||||
#include <QTypeInfo>
|
||||
|
@ -61,71 +62,95 @@ public:
|
|||
|
||||
virtual ~VGObject();
|
||||
|
||||
VGObject& operator= (const VGObject &obj);
|
||||
auto operator= (const VGObject &obj) -> VGObject&;
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
VGObject(VGObject &&obj) Q_DECL_NOTHROW;
|
||||
VGObject &operator=(VGObject &&obj) Q_DECL_NOTHROW;
|
||||
auto operator=(VGObject &&obj) Q_DECL_NOTHROW -> VGObject &;
|
||||
#endif
|
||||
|
||||
quint32 getIdObject() const;
|
||||
void setIdObject(const quint32 &value);
|
||||
auto getIdObject() const -> quint32;
|
||||
void setIdObject(const quint32 &value);
|
||||
|
||||
virtual QString name() const;
|
||||
void setName(const QString &name);
|
||||
virtual auto name() const -> QString;
|
||||
void setName(const QString &name);
|
||||
|
||||
Draw getMode() const;
|
||||
void setMode(const Draw &value);
|
||||
auto getMode() const -> Draw;
|
||||
void setMode(const Draw &value);
|
||||
|
||||
GOType getType() const;
|
||||
void setType(const GOType &type);
|
||||
auto getType() const -> GOType;
|
||||
void setType(const GOType &type);
|
||||
|
||||
quint32 id() const;
|
||||
virtual void setId(const quint32 &id);
|
||||
auto id() const -> quint32;
|
||||
virtual void setId(const quint32 &id);
|
||||
|
||||
virtual void SetAlias(const QString &alias);
|
||||
QString GetAlias() const;
|
||||
virtual void SetAlias(const QString &alias);
|
||||
auto GetAlias() const -> QString;
|
||||
|
||||
virtual void SetAliasSuffix(const QString &aliasSuffix);
|
||||
QString GetAliasSuffix() const;
|
||||
virtual void SetAliasSuffix(const QString &aliasSuffix);
|
||||
auto GetAliasSuffix() const -> QString;
|
||||
|
||||
QString ObjectName() const;
|
||||
auto ObjectName() const -> QString;
|
||||
|
||||
quint32 getIdTool() const;
|
||||
auto getIdTool() const -> quint32;
|
||||
|
||||
virtual QJsonObject ToJson() const;
|
||||
virtual auto ToJson() const -> QJsonObject;
|
||||
|
||||
static QLineF BuildLine(const QPointF &p1, const qreal& length, const qreal &angle);
|
||||
static QPointF BuildRay(const QPointF &firstPoint, const qreal &angle, const QRectF &scRect);
|
||||
static QLineF BuildAxis(const QPointF &p, const qreal &angle, const QRectF &scRect);
|
||||
static QLineF BuildAxis(const QPointF &p1, const QPointF &p2, const QRectF &scRect);
|
||||
static auto BuildLine(const QPointF &p1, const qreal& length, const qreal &angle) -> QLineF;
|
||||
static auto BuildRay(const QPointF &firstPoint, const qreal &angle, const QRectF &scRect) -> QPointF;
|
||||
static auto BuildAxis(const QPointF &p, const qreal &angle, const QRectF &scRect) -> QLineF;
|
||||
static auto BuildAxis(const QPointF &p1, const QPointF &p2, const QRectF &scRect) -> QLineF;
|
||||
|
||||
static auto ContactPoints (const QPointF &p, const QPointF ¢er, qreal radius, QPointF &p1, QPointF &p2) -> int;
|
||||
static auto LineIntersectRect(const QRectF &rec, const QLineF &line) -> QPointF;
|
||||
static auto IntersectionCircles(const QPointF &c1, double r1, const QPointF &c2, double r2, QPointF &p1,
|
||||
QPointF &p2) -> int;
|
||||
static auto LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1,
|
||||
QPointF &p2) -> qint32;
|
||||
static auto ClosestPoint(const QLineF &line, const QPointF &point) -> QPointF;
|
||||
static auto addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) -> QPointF;
|
||||
static void LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c);
|
||||
static auto IsPointOnLineSegment (const QPointF &t, const QPointF &p1, const QPointF &p2,
|
||||
qreal accuracy = accuracyPointOnLine) -> bool;
|
||||
static auto IsLineSegmentOnLineSegment (const QLineF &seg1, const QLineF &seg2,
|
||||
qreal accuracy = accuracyPointOnLine) -> bool;
|
||||
static auto CorrectDistortion(const QPointF &t, const QPointF &p1, const QPointF &p2) -> QPointF;
|
||||
static auto IsPointOnLineviaPDP(const QPointF &t, const QPointF &p1, const QPointF &p2,
|
||||
qreal accuracy = accuracyPointOnLine) -> bool;
|
||||
static auto GetLengthContour(const QVector<QPointF> &contour, const QVector<QPointF> &newPoints) -> int;
|
||||
|
||||
template <class T>
|
||||
static auto PainterPath(const QVector<T> &points) -> QPainterPath;
|
||||
|
||||
static int ContactPoints (const QPointF &p, const QPointF ¢er, qreal radius, QPointF &p1, QPointF &p2);
|
||||
static QPointF LineIntersectRect(const QRectF &rec, const QLineF &line);
|
||||
static int IntersectionCircles(const QPointF &c1, double r1, const QPointF &c2, double r2, QPointF &p1,
|
||||
QPointF &p2);
|
||||
static qint32 LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1,
|
||||
QPointF &p2);
|
||||
static QPointF ClosestPoint(const QLineF &line, const QPointF &point);
|
||||
static QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k);
|
||||
static void LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c);
|
||||
static bool IsPointOnLineSegment (const QPointF &t, const QPointF &p1, const QPointF &p2,
|
||||
qreal accuracy = accuracyPointOnLine);
|
||||
static bool IsLineSegmentOnLineSegment (const QLineF &seg1, const QLineF &seg2,
|
||||
qreal accuracy = accuracyPointOnLine);
|
||||
static QPointF CorrectDistortion(const QPointF &t, const QPointF &p1, const QPointF &p2);
|
||||
static bool IsPointOnLineviaPDP(const QPointF &t, const QPointF &p1, const QPointF &p2,
|
||||
qreal accuracy = accuracyPointOnLine);
|
||||
static int GetLengthContour(const QVector<QPointF> &contour, const QVector<QPointF> &newPoints);
|
||||
protected:
|
||||
static QTransform FlippingMatrix(const QLineF &axis);
|
||||
static auto FlippingMatrix(const QLineF &axis) -> QTransform;
|
||||
private:
|
||||
QSharedDataPointer<VGObjectData> d;
|
||||
|
||||
static int PointInCircle (const QPointF &p, const QPointF ¢er, qreal radius);
|
||||
static auto PointInCircle (const QPointF &p, const QPointF ¢er, qreal radius) -> int;
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
Q_DECLARE_TYPEINFO(VGObject, Q_MOVABLE_TYPE); // NOLINT
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <class T>
|
||||
inline auto VGObject::PainterPath(const QVector<T> &points) -> QPainterPath
|
||||
{
|
||||
QPainterPath path;
|
||||
path.setFillRule(Qt::WindingFill);
|
||||
|
||||
if (not points.isEmpty())
|
||||
{
|
||||
path.moveTo(points.at(0));
|
||||
for (qint32 i = 1; i < points.count(); ++i)
|
||||
{
|
||||
path.lineTo(points.at(i));
|
||||
}
|
||||
path.lineTo(points.at(0));
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
#endif // VGOBJECT_H
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include "../vmisc/diagnostic.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||
|
||||
#include "../vmisc/typedef.h"
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
@ -42,53 +44,38 @@ QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
|||
class VGObjectData final : public QSharedData
|
||||
{
|
||||
public:
|
||||
VGObjectData()
|
||||
{}
|
||||
|
||||
VGObjectData() = default;
|
||||
VGObjectData(const GOType &type, const quint32 &idObject, const Draw &mode)
|
||||
:type(type),
|
||||
idObject(idObject),
|
||||
mode(mode)
|
||||
{}
|
||||
|
||||
VGObjectData(const VGObjectData &obj)
|
||||
:QSharedData(obj),
|
||||
_id(obj._id),
|
||||
type(obj.type),
|
||||
idObject(obj.idObject),
|
||||
_name(obj._name),
|
||||
mode(obj.mode),
|
||||
m_alias(obj.m_alias),
|
||||
m_aliasSuffix(obj.m_aliasSuffix)
|
||||
{}
|
||||
|
||||
virtual ~VGObjectData();
|
||||
VGObjectData(const VGObjectData &obj) = default;
|
||||
virtual ~VGObjectData() = default;
|
||||
|
||||
/** @brief _id id in container. Ned for arcs, spline and spline paths. */
|
||||
quint32 _id{NULL_ID};
|
||||
quint32 _id{NULL_ID}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
/** @brief type type of graphical object */
|
||||
GOType type{GOType::Unknown};
|
||||
GOType type{GOType::Unknown}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
/** @brief idObject id of parent object. */
|
||||
quint32 idObject{NULL_ID};
|
||||
quint32 idObject{NULL_ID}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
/** @brief _name object name */
|
||||
QString _name{};
|
||||
QString _name{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
/** @brief mode object created in calculation or drawing mode */
|
||||
Draw mode{Draw::Calculation};
|
||||
Draw mode{Draw::Calculation}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
QString m_alias{};
|
||||
QString m_aliasSuffix{};
|
||||
QString m_alias{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
QString m_aliasSuffix{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VGObjectData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VGObjectData) // NOLINT
|
||||
};
|
||||
|
||||
VGObjectData::~VGObjectData()
|
||||
{}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
#endif // VGOBJECT_P_H
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
qreal isVisible{1};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VPlaceLabelItemData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VPlaceLabelItemData) // NOLINT
|
||||
};
|
||||
|
||||
VPlaceLabelItemData::~VPlaceLabelItemData()
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "../vmisc/diagnostic.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||
#include <QPointF>
|
||||
#include "../vmisc/defglobal.h"
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
|
@ -81,7 +82,7 @@ public:
|
|||
bool m_showLabel;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VPointFData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VPointFData) // NOLINT
|
||||
};
|
||||
|
||||
VPointFData::~VPointFData()
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
qreal kCurve;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VSplineData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VSplineData) // NOLINT
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
QVector<VSplinePoint> path{};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VSplinePathData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VSplinePathData) // NOLINT
|
||||
};
|
||||
|
||||
VSplinePathData::~VSplinePathData()
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
qreal kAsm2;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VFSplinePointData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VFSplinePointData) // NOLINT
|
||||
};
|
||||
|
||||
VFSplinePointData::~VFSplinePointData()
|
||||
|
@ -164,7 +164,7 @@ public:
|
|||
QString length2F;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VSplinePointData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VSplinePointData) // NOLINT
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "../vgeometry/vgobject.h"
|
||||
#include "vsapoint.h"
|
||||
#include "vrawsapoint.h"
|
||||
#include "../vmisc/testpath.h"
|
||||
|
||||
class VAbstractPieceData;
|
||||
class QPainterPath;
|
||||
|
@ -130,9 +129,6 @@ public:
|
|||
static auto GrainlinePoints(const VGrainlineData &geom, const VContainer *pattern,
|
||||
const QRectF &boundingRect, qreal &dAng) -> QVector<QPointF>;
|
||||
|
||||
template <class T>
|
||||
static auto PainterPath(const QVector<T> &points) -> QPainterPath;
|
||||
|
||||
friend auto operator<< (QDataStream& dataStream, const VAbstractPiece& piece) -> QDataStream&;
|
||||
friend auto operator>> (QDataStream& dataStream, VAbstractPiece& piece) -> QDataStream&;
|
||||
|
||||
|
@ -552,26 +548,6 @@ inline auto VAbstractPiece::IsInsidePolygon(const QVector<T> &path, const QVecto
|
|||
{ return allowancePolygon.containsPoint(point, Qt::WindingFill); });
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <class T>
|
||||
inline auto VAbstractPiece::PainterPath(const QVector<T> &points) -> QPainterPath
|
||||
{
|
||||
QPainterPath path;
|
||||
path.setFillRule(Qt::WindingFill);
|
||||
|
||||
if (not points.isEmpty())
|
||||
{
|
||||
path.moveTo(points.at(0));
|
||||
for (qint32 i = 1; i < points.count(); ++i)
|
||||
{
|
||||
path.lineTo(points.at(i));
|
||||
}
|
||||
path.lineTo(points.at(0));
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief CheckLoops seek and delete loops in equidistant.
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
QString exceptionReason{};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VBestSquareData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VBestSquareData) // NOLINT
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
vsizetype m_emptySheetEdgesCount{0};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VContourData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VContourData) // NOLINT
|
||||
};
|
||||
|
||||
// cppcheck-suppress unknownMacro
|
||||
|
|
|
@ -306,7 +306,8 @@ vsizetype VLayoutGenerator::PapersCount() const
|
|||
QList<QGraphicsItem *> VLayoutGenerator::GetPapersItems() const
|
||||
{
|
||||
QList<QGraphicsItem *> list;
|
||||
for (auto &paper : papers)
|
||||
list.reserve(papers.count());
|
||||
for (const auto &paper : papers)
|
||||
{
|
||||
list.append(paper.GetPaperItem(autoCropLength, autoCropWidth, IsTestAsPaths()));
|
||||
}
|
||||
|
@ -317,7 +318,8 @@ QList<QGraphicsItem *> VLayoutGenerator::GetPapersItems() const
|
|||
QList<QGraphicsItem *> VLayoutGenerator::GetGlobalContours() const
|
||||
{
|
||||
QList<QGraphicsItem *> list;
|
||||
for (auto &paper : papers)
|
||||
list.reserve(papers.count());
|
||||
for (const auto &paper : papers)
|
||||
{
|
||||
list.append(paper.GetGlobalContour());
|
||||
}
|
||||
|
@ -328,7 +330,8 @@ QList<QGraphicsItem *> VLayoutGenerator::GetGlobalContours() const
|
|||
QList<QList<QGraphicsItem *> > VLayoutGenerator::GetAllDetailsItems() const
|
||||
{
|
||||
QList<QList<QGraphicsItem *> > list;
|
||||
for (auto &paper : papers)
|
||||
list.reserve(papers.count());
|
||||
for (const auto &paper : papers)
|
||||
{
|
||||
list.append(paper.GetItemDetails(IsTestAsPaths()));
|
||||
}
|
||||
|
@ -339,7 +342,8 @@ QList<QList<QGraphicsItem *> > VLayoutGenerator::GetAllDetailsItems() const
|
|||
QVector<QVector<VLayoutPiece> > VLayoutGenerator::GetAllDetails() const
|
||||
{
|
||||
QVector<QVector<VLayoutPiece> > list;
|
||||
for (auto &paper : papers)
|
||||
list.reserve(papers.count());
|
||||
for (const auto &paper : papers)
|
||||
{
|
||||
list.append(paper.GetDetails());
|
||||
}
|
||||
|
|
|
@ -305,7 +305,7 @@ bool VLayoutPaper::SaveResult(const VBestSquare &bestResult, const VLayoutPiece
|
|||
VCachedPositions positionChache;
|
||||
QVector<QPointF> layoutPoints = workDetail.GetMappedLayoutAllowancePoints();
|
||||
positionChache.boundingRect = VLayoutPiece::BoundingRect(layoutPoints);
|
||||
positionChache.layoutAllowancePath = VAbstractPiece::PainterPath(layoutPoints);
|
||||
positionChache.layoutAllowancePath = VGObject::PainterPath(layoutPoints);
|
||||
d->positionsCache.append(positionChache);
|
||||
|
||||
#ifdef LAYOUT_DEBUG
|
||||
|
@ -422,6 +422,7 @@ QGraphicsPathItem *VLayoutPaper::GetGlobalContour() const
|
|||
QList<QGraphicsItem *> VLayoutPaper::GetItemDetails(bool textAsPaths) const
|
||||
{
|
||||
QList<QGraphicsItem *> list;
|
||||
list.reserve(d->details.count());
|
||||
for (auto &detail : d->details)
|
||||
{
|
||||
list.append(detail.GetItem(textAsPaths));
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
bool originPaperOrientation{true};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VLayoutPaperData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VLayoutPaperData) // NOLINT
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -1377,7 +1377,7 @@ auto VLayoutPiece::ContourPath() const -> QPainterPath
|
|||
// contour
|
||||
if (not IsHideMainPath() || not IsSeamAllowance() || IsSeamAllowanceBuiltIn())
|
||||
{
|
||||
path = PainterPath(GetContourPoints());
|
||||
path = VGObject::PainterPath(GetContourPoints());
|
||||
}
|
||||
|
||||
// seam allowance
|
||||
|
@ -1425,7 +1425,7 @@ auto VLayoutPiece::ContourPath() const -> QPainterPath
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VLayoutPiece::MappedLayoutAllowancePath() const -> QPainterPath
|
||||
{
|
||||
return PainterPath(GetMappedLayoutAllowancePoints());
|
||||
return VGObject::PainterPath(GetMappedLayoutAllowancePoints());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -50,8 +50,7 @@ QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
|||
class VLayoutPiecePathData : public QSharedData
|
||||
{
|
||||
public:
|
||||
VLayoutPiecePathData()
|
||||
{}
|
||||
VLayoutPiecePathData(){} // NOLINT(modernize-use-equals-default)
|
||||
|
||||
explicit VLayoutPiecePathData(const QVector<VLayoutPoint> &points)
|
||||
: m_points(points)
|
||||
|
@ -72,7 +71,7 @@ public:
|
|||
bool m_cut{false};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VLayoutPiecePathData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VLayoutPiecePathData) // NOLINT
|
||||
|
||||
static constexpr quint32 streamHeader = 0xA53F0225; // CRC-32Q string "VLayoutPiecePathData"
|
||||
static constexpr quint16 classVersion = 2;
|
||||
|
|
|
@ -463,13 +463,13 @@ auto VPosition::Crossing(const VLayoutPiece &detail) const -> VPosition::Crossin
|
|||
|
||||
const QVector<QPointF> layoutPoints = detail.GetMappedLayoutAllowancePoints();
|
||||
const QRectF layoutBoundingRect = VLayoutPiece::BoundingRect(layoutPoints);
|
||||
const QPainterPath layoutAllowancePath = VAbstractPiece::PainterPath(layoutPoints);
|
||||
const QPainterPath layoutAllowancePath = VGObject::PainterPath(layoutPoints);
|
||||
|
||||
QVector<QPointF> contourPoints;
|
||||
CastTo(detail.IsSeamAllowance() && not detail.IsSeamAllowanceBuiltIn() ?
|
||||
detail.GetMappedSeamAllowancePoints() : detail.GetMappedContourPoints(), contourPoints);
|
||||
const QRectF detailBoundingRect = VLayoutPiece::BoundingRect(contourPoints);
|
||||
const QPainterPath contourPath = VAbstractPiece::PainterPath(contourPoints);
|
||||
const QPainterPath contourPath = VGObject::PainterPath(contourPoints);
|
||||
|
||||
for(const auto &position : m_data.positionsCache)
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
bool m_bVisible;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VAbstractFloatItemDataPrivate)
|
||||
Q_DISABLE_ASSIGN_MOVE(VAbstractFloatItemDataPrivate) // NOLINT
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -46,42 +46,30 @@ QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
|||
class VGrainlineDataPrivate : public QSharedData
|
||||
{
|
||||
public:
|
||||
VGrainlineDataPrivate()
|
||||
: m_qsLength(),
|
||||
m_dRotation(),
|
||||
m_eArrowType(GrainlineArrowDirection::atBoth),
|
||||
m_centerPin(NULL_ID),
|
||||
m_topPin(NULL_ID),
|
||||
m_bottomPin(NULL_ID)
|
||||
{}
|
||||
|
||||
VGrainlineDataPrivate(const VGrainlineDataPrivate &data)
|
||||
: QSharedData(data),
|
||||
m_qsLength(data.m_qsLength),
|
||||
m_dRotation(data.m_dRotation),
|
||||
m_eArrowType(data.m_eArrowType),
|
||||
m_centerPin(data.m_centerPin),
|
||||
m_topPin(data.m_topPin),
|
||||
m_bottomPin(data.m_bottomPin)
|
||||
{}
|
||||
|
||||
VGrainlineDataPrivate() {} // NOLINT(modernize-use-equals-default)
|
||||
VGrainlineDataPrivate(const VGrainlineDataPrivate &data) = default;
|
||||
~VGrainlineDataPrivate() = default;
|
||||
|
||||
/** @brief m_dLength formula to calculate the length of grainline */
|
||||
QString m_qsLength;
|
||||
QString m_qsLength{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
/** @brief m_dRotation formula to calculate the rotation of grainline in [degrees] */
|
||||
QString m_dRotation;
|
||||
QString m_dRotation{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
/** @brief m_eArrowType type of arrow on the grainline */
|
||||
GrainlineArrowDirection m_eArrowType;
|
||||
GrainlineArrowDirection m_eArrowType{GrainlineArrowDirection::twoWaysUpDown}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
/** @brief m_centerPin center pin id */
|
||||
quint32 m_centerPin;
|
||||
quint32 m_centerPin{NULL_ID}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
/** @brief m_topPin top pin id */
|
||||
quint32 m_topPin;
|
||||
quint32 m_topPin{NULL_ID}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
/** @brief m_bottomPin bottom pin id */
|
||||
quint32 m_bottomPin;
|
||||
quint32 m_bottomPin{NULL_ID}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VGrainlineDataPrivate)
|
||||
Q_DISABLE_ASSIGN_MOVE(VGrainlineDataPrivate) // NOLINT
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
quint32 m_bottomRightPin;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VPatternLabelDataPrivate)
|
||||
Q_DISABLE_ASSIGN_MOVE(VPatternLabelDataPrivate) // NOLINT
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -43,7 +43,7 @@ QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
|||
class VPieceLabelDataPrivate : public QSharedData
|
||||
{
|
||||
public:
|
||||
VPieceLabelDataPrivate() = default;
|
||||
VPieceLabelDataPrivate(){} // NOLINT(modernize-use-equals-default)
|
||||
VPieceLabelDataPrivate(const VPieceLabelDataPrivate &data) = default;
|
||||
~VPieceLabelDataPrivate() = default;
|
||||
|
||||
|
|
|
@ -29,7 +29,13 @@
|
|||
#include "testpassmark.h"
|
||||
#include "vpassmark.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QTemporaryFile>
|
||||
|
||||
#include "../vmisc/testpath.h"
|
||||
|
||||
#if !defined(V_NO_ASSERT)
|
||||
namespace
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
quint32 arcId;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VArcRadiusData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VArcRadiusData) // NOLINT
|
||||
};
|
||||
|
||||
VArcRadiusData::~VArcRadiusData()
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
quint32 parentId{NULL_ID};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VCurveVariableData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VCurveVariableData) // NOLINT
|
||||
};
|
||||
|
||||
VCurveVariableData::~VCurveVariableData()
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
bool specialUnits{false};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VIncrementData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VIncrementData) // NOLINT
|
||||
};
|
||||
|
||||
VIncrementData::~VIncrementData()
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
QString alias{};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VInternalVariableData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VInternalVariableData) // NOLINT
|
||||
};
|
||||
|
||||
VInternalVariableData::~VInternalVariableData()
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
quint32 p2Id;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VLineAngleData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VLineAngleData) // NOLINT
|
||||
};
|
||||
|
||||
VLineAngleData::~VLineAngleData()
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
Unit patternUnit;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VLengthLineData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VLengthLineData) // NOLINT
|
||||
};
|
||||
|
||||
VLengthLineData::~VLengthLineData()
|
||||
|
|
|
@ -126,7 +126,7 @@ public:
|
|||
MeasurementType varType{MeasurementType::Measurement};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VMeasurementData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VMeasurementData) // NOLINT
|
||||
};
|
||||
|
||||
VMeasurementData::~VMeasurementData()
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
QString description;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VVariableData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VVariableData) // NOLINT
|
||||
};
|
||||
|
||||
VVariableData::~VVariableData()
|
||||
|
|
|
@ -120,7 +120,7 @@ public:
|
|||
QString nspace;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VContainerData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VContainerData) // NOLINT
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
QString reason{tr("Formula is empty")};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VFormulaData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VFormulaData) // NOLINT
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
bool reverse;
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VNodeDetailData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VNodeDetailData) // NOLINT
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
#include "../vgeometry/vabstractcurve.h"
|
||||
#include "../vgeometry/varc.h"
|
||||
#include "../vlayout/vrawsapoint.h"
|
||||
#include "../vpatterndb/testpassmark.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
const qreal VPassmark::passmarkRadiusFactor = 0.45;
|
||||
|
||||
|
|
|
@ -1297,7 +1297,7 @@ void VPiece::TestInternalPathCuttingPathIntersection(const VContainer *data) con
|
|||
SCASSERT(data != nullptr)
|
||||
|
||||
const QVector<QPointF> cuttingPoints = CuttingPathPoints(data);
|
||||
const QPainterPath contourPath = VAbstractPiece::PainterPath(cuttingPoints);
|
||||
const QPainterPath contourPath = VGObject::PainterPath(cuttingPoints);
|
||||
|
||||
// Internal path for cutting must not intersect cutting contour and be inside of it.
|
||||
const QVector<quint32> pathsId = GetInternalPaths();
|
||||
|
@ -1317,7 +1317,7 @@ void VPiece::TestInternalPathCuttingPathIntersection(const VContainer *data) con
|
|||
continue;
|
||||
}
|
||||
|
||||
const QPainterPath internalPath = VAbstractPiece::PainterPath(points);
|
||||
const QPainterPath internalPath = VGObject::PainterPath(points);
|
||||
|
||||
if (internalPath.intersects(contourPath))
|
||||
{
|
||||
|
@ -1371,7 +1371,7 @@ void VPiece::TestInternalPathsIntersections(const VContainer *data) const
|
|||
continue;
|
||||
}
|
||||
|
||||
const QPainterPath painterPath1 = VAbstractPiece::PainterPath(pointsPath1);
|
||||
const QPainterPath painterPath1 = VGObject::PainterPath(pointsPath1);
|
||||
|
||||
for (int i=0; i < pathsId.size(); ++i)
|
||||
{
|
||||
|
@ -1395,7 +1395,7 @@ void VPiece::TestInternalPathsIntersections(const VContainer *data) const
|
|||
continue;
|
||||
}
|
||||
|
||||
const QPainterPath painterPath2 = VAbstractPiece::PainterPath(pointsPath2);
|
||||
const QPainterPath painterPath2 = VGObject::PainterPath(pointsPath2);
|
||||
|
||||
pairs.insert(qMakePair(k, i));
|
||||
pairs.insert(qMakePair(i, k));
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
bool m_turnPoint{true};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VPieceNodeData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VPieceNodeData) // NOLINT
|
||||
|
||||
static constexpr quint32 streamHeader = 0x2198CBC8; // CRC-32Q string "VPieceNodeData"
|
||||
static constexpr quint16 classVersion = 2;
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
bool m_lastToCuttingContour{false};
|
||||
|
||||
private:
|
||||
Q_DISABLE_ASSIGN(VPiecePathData)
|
||||
Q_DISABLE_ASSIGN_MOVE(VPiecePathData) // NOLINT
|
||||
};
|
||||
|
||||
VPiecePathData::~VPiecePathData()
|
||||
|
|
|
@ -65,7 +65,7 @@ template <class T> class QSharedPointer;
|
|||
const QString VToolFlippingByAxis::ToolType = QStringLiteral("flippingByAxis");
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolFlippingByAxis::setDialog()
|
||||
void VToolFlippingByAxis::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogFlippingByAxis> dialogTool = qobject_cast<DialogFlippingByAxis *>(m_dialog);
|
||||
|
|
|
@ -50,7 +50,7 @@ class VToolFlippingByAxis : public VAbstractFlipping
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolFlippingByAxis() = default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolFlippingByAxis* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
static VToolFlippingByAxis* Create(VToolFlippingByAxisInitData initData);
|
||||
|
|
|
@ -65,7 +65,7 @@ template <class T> class QSharedPointer;
|
|||
const QString VToolFlippingByLine::ToolType = QStringLiteral("flippingByLine");
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolFlippingByLine::setDialog()
|
||||
void VToolFlippingByLine::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogFlippingByLine> dialogTool = qobject_cast<DialogFlippingByLine *>(m_dialog);
|
||||
|
|
|
@ -51,7 +51,7 @@ class VToolFlippingByLine : public VAbstractFlipping
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolFlippingByLine() = default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolFlippingByLine* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
static VToolFlippingByLine* Create(VToolFlippingByLineInitData initData);
|
||||
|
|
|
@ -117,7 +117,7 @@ QT_WARNING_POP
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolMove::setDialog()
|
||||
void VToolMove::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogMove> dialogTool = qobject_cast<DialogMove *>(m_dialog);
|
||||
|
|
|
@ -66,7 +66,7 @@ class VToolMove : public VAbstractOperation
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolMove() = default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolMove* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data);
|
||||
static VToolMove* Create(VToolMoveInitData &initData);
|
||||
|
|
|
@ -88,7 +88,7 @@ VToolRotation::VToolRotation(const VToolRotationInitData &initData, QGraphicsIte
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolRotation::setDialog()
|
||||
void VToolRotation::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogRotation> dialogTool = qobject_cast<DialogRotation *>(m_dialog);
|
||||
|
|
|
@ -62,7 +62,7 @@ class VToolRotation : public VAbstractOperation
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolRotation() = default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolRotation* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data);
|
||||
static VToolRotation* Create(VToolRotationInitData &initData);
|
||||
|
|
|
@ -74,7 +74,7 @@ VToolArc::VToolArc(const VToolArcInitData &initData, QGraphicsItem *parent)
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolArc::setDialog()
|
||||
void VToolArc::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogArc> dialogTool = qobject_cast<DialogArc *>(m_dialog);
|
||||
|
|
|
@ -66,7 +66,7 @@ class VToolArc :public VToolAbstractArc
|
|||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolArc* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data);
|
||||
static VToolArc* Create(VToolArcInitData &initData);
|
||||
|
|
|
@ -67,7 +67,7 @@ VToolArcWithLength::VToolArcWithLength(const VToolArcWithLengthInitData &initDat
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolArcWithLength::setDialog()
|
||||
void VToolArcWithLength::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogArcWithLength> dialogTool = qobject_cast<DialogArcWithLength *>(m_dialog);
|
||||
|
|
|
@ -63,7 +63,7 @@ class VToolArcWithLength : public VToolAbstractArc
|
|||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolArcWithLength* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
static VToolArcWithLength* Create(VToolArcWithLengthInitData &initData);
|
||||
|
|
|
@ -64,7 +64,7 @@ VToolCubicBezier::VToolCubicBezier(const VToolCubicBezierInitData &initData, QGr
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolCubicBezier::setDialog()
|
||||
void VToolCubicBezier::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
auto dialogTool = qobject_cast<DialogCubicBezier*>(m_dialog);
|
||||
|
|
|
@ -63,7 +63,7 @@ class VToolCubicBezier : public VAbstractSpline
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolCubicBezier() = default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolCubicBezier *Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
static VToolCubicBezier *Create(VToolCubicBezierInitData initData);
|
||||
|
|
|
@ -67,7 +67,7 @@ VToolCubicBezierPath::VToolCubicBezierPath(const VToolCubicBezierPathInitData &i
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolCubicBezierPath::setDialog()
|
||||
void VToolCubicBezierPath::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
auto dialogTool = qobject_cast<DialogCubicBezierPath*>(m_dialog);
|
||||
|
|
|
@ -63,7 +63,7 @@ class VToolCubicBezierPath:public VAbstractSpline
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolCubicBezierPath() = default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolCubicBezierPath *Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
static VToolCubicBezierPath *Create(VToolCubicBezierPathInitData initData);
|
||||
|
|
|
@ -75,7 +75,7 @@ VToolEllipticalArc::VToolEllipticalArc(const VToolEllipticalArcInitData &initDat
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolEllipticalArc::setDialog()
|
||||
void VToolEllipticalArc::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogEllipticalArc> dialogTool = qobject_cast<DialogEllipticalArc *>(m_dialog);
|
||||
|
|
|
@ -70,7 +70,7 @@ class VToolEllipticalArc : public VToolAbstractArc
|
|||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolEllipticalArc* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
static VToolEllipticalArc* Create(VToolEllipticalArcInitData &initData);
|
||||
|
|
|
@ -124,7 +124,7 @@ VToolSpline::VToolSpline(const VToolSplineInitData &initData, QGraphicsItem *par
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolSpline::setDialog()
|
||||
void VToolSpline::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogSpline> dialogTool = qobject_cast<DialogSpline *>(m_dialog);
|
||||
|
|
|
@ -75,7 +75,7 @@ class VToolSpline:public VAbstractSpline
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolSpline() =default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolSpline *Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data);
|
||||
static VToolSpline *Create(VToolSplineInitData &initData, VSpline *spline);
|
||||
|
|
|
@ -159,7 +159,7 @@ VToolSplinePath::VToolSplinePath(const VToolSplinePathInitData &initData, QGraph
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolSplinePath::setDialog()
|
||||
void VToolSplinePath::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogSplinePath> dialogTool = qobject_cast<DialogSplinePath *>(m_dialog);
|
||||
|
|
|
@ -74,7 +74,7 @@ class VToolSplinePath:public VAbstractSpline
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolSplinePath() =default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolSplinePath *Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
static VToolSplinePath *Create(VToolSplinePathInitData &initData, VSplinePath *path);
|
||||
|
|
|
@ -89,7 +89,7 @@ void VToolTrueDarts::FindPoint(const QPointF &baseLineP1, const QPointF &baseLin
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolTrueDarts::setDialog()
|
||||
void VToolTrueDarts::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogTrueDarts> dialogTool = qobject_cast<DialogTrueDarts *>(m_dialog);
|
||||
|
|
|
@ -88,7 +88,7 @@ class VToolTrueDarts : public VToolDoublePoint
|
|||
public:
|
||||
static void FindPoint(const QPointF &baseLineP1, const QPointF &baseLineP2, const QPointF &dartP1,
|
||||
const QPointF &dartP2, const QPointF &dartP3, QPointF &p1, QPointF &p2);
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolTrueDarts* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data);
|
||||
static VToolTrueDarts* Create(VToolTrueDartsInitData initData);
|
||||
|
|
|
@ -70,7 +70,7 @@ VToolCutArc::VToolCutArc(const VToolCutInitData &initData, QGraphicsItem * paren
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolCutArc::setDialog()
|
||||
void VToolCutArc::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogCutArc> dialogTool = qobject_cast<DialogCutArc *>(m_dialog);
|
||||
|
|
|
@ -50,7 +50,7 @@ class VToolCutArc : public VToolCut
|
|||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolCutArc* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data);
|
||||
static VToolCutArc* Create(VToolCutInitData &initData);
|
||||
|
|
|
@ -73,7 +73,7 @@ VToolCutSpline::VToolCutSpline(const VToolCutInitData &initData, QGraphicsItem *
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolCutSpline::setDialog()
|
||||
void VToolCutSpline::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
QPointer<DialogCutSpline> dialogTool = qobject_cast<DialogCutSpline *>(m_dialog);
|
||||
|
|
|
@ -51,7 +51,7 @@ class VToolCutSpline : public VToolCut
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
~VToolCutSpline() override =default;
|
||||
void setDialog() override;
|
||||
void SetDialog() override;
|
||||
static auto Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data) -> VToolCutSpline *;
|
||||
static auto Create(VToolCutInitData &initData) -> VToolCutSpline *;
|
||||
|
|
|
@ -76,7 +76,7 @@ VToolCutSplinePath::VToolCutSplinePath(const VToolCutInitData &initData, QGraphi
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolCutSplinePath::setDialog()
|
||||
void VToolCutSplinePath::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogCutSplinePath> dialogTool = qobject_cast<DialogCutSplinePath *>(m_dialog);
|
||||
|
|
|
@ -52,7 +52,7 @@ class VToolCutSplinePath : public VToolCut
|
|||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolCutSplinePath *Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
static VToolCutSplinePath *Create(VToolCutInitData &initData);
|
||||
|
|
|
@ -200,7 +200,7 @@ void VToolAlongLine::ShowContextMenu(QGraphicsSceneContextMenuEvent *event, quin
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolAlongLine::setDialog()
|
||||
void VToolAlongLine::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogAlongLine> dialogTool = qobject_cast<DialogAlongLine *>(m_dialog);
|
||||
|
|
|
@ -61,7 +61,7 @@ class VToolAlongLine : public VToolLinePoint
|
|||
public:
|
||||
~VToolAlongLine() override = default;
|
||||
|
||||
void setDialog() override;
|
||||
void SetDialog() override;
|
||||
static auto Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data) -> VToolAlongLine*;
|
||||
static auto Create(VToolAlongLineInitData &initData) -> VToolAlongLine*;
|
||||
|
|
|
@ -106,7 +106,7 @@ QPointF VToolBisector::FindPoint(const QPointF &firstPoint, const QPointF &secon
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolBisector::setDialog()
|
||||
void VToolBisector::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogBisector> dialogTool = qobject_cast<DialogBisector *>(m_dialog);
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
static qreal BisectorAngle(const QPointF &firstPoint, const QPointF &secondPoint, const QPointF &thirdPoint);
|
||||
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const QPointF &thirdPoint,
|
||||
const qreal& length);
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolBisector* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data);
|
||||
static VToolBisector* Create(VToolBisectorInitData &initData);
|
||||
|
|
|
@ -82,7 +82,7 @@ VToolCurveIntersectAxis::VToolCurveIntersectAxis(const VToolCurveIntersectAxisIn
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolCurveIntersectAxis::setDialog()
|
||||
void VToolCurveIntersectAxis::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
m_dialog->setModal(true);
|
||||
|
|
|
@ -61,7 +61,7 @@ class VToolCurveIntersectAxis : public VToolLinePoint
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolCurveIntersectAxis() = default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
|
||||
static VToolCurveIntersectAxis *Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
|
|
|
@ -71,7 +71,7 @@ VToolEndLine::VToolEndLine(const VToolEndLineInitData &initData, QGraphicsItem *
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolEndLine::setDialog()
|
||||
void VToolEndLine::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
m_dialog->setModal(true);
|
||||
|
|
|
@ -66,7 +66,7 @@ class VToolEndLine : public VToolLinePoint
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolEndLine() = default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolEndLine *Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data);
|
||||
static VToolEndLine *Create(VToolEndLineInitData &initData);
|
||||
|
|
|
@ -68,7 +68,7 @@ VToolHeight::VToolHeight(const VToolHeightInitData &initData, QGraphicsItem * pa
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolHeight::setDialog()
|
||||
void VToolHeight::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogHeight> dialogTool = qobject_cast<DialogHeight *>(m_dialog);
|
||||
|
|
|
@ -66,7 +66,7 @@ class VToolHeight: public VToolLinePoint
|
|||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolHeight *Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data);
|
||||
static VToolHeight *Create(VToolHeightInitData initData);
|
||||
|
|
|
@ -66,7 +66,7 @@ VToolLineIntersectAxis::VToolLineIntersectAxis(const VToolLineIntersectAxisInitD
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolLineIntersectAxis::setDialog()
|
||||
void VToolLineIntersectAxis::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
m_dialog->setModal(true);
|
||||
|
|
|
@ -67,7 +67,7 @@ class VToolLineIntersectAxis : public VToolLinePoint
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolLineIntersectAxis() = default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
|
||||
static VToolLineIntersectAxis *Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
|
|
|
@ -72,7 +72,7 @@ VToolNormal::VToolNormal(const VToolNormalInitData &initData, QGraphicsItem *par
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolNormal::setDialog()
|
||||
void VToolNormal::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogNormal> dialogTool = qobject_cast<DialogNormal *>(m_dialog);
|
||||
|
|
|
@ -67,7 +67,7 @@ class VToolNormal : public VToolLinePoint
|
|||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolNormal* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene, VAbstractPattern *doc,
|
||||
VContainer *data);
|
||||
static VToolNormal* Create(VToolNormalInitData initData);
|
||||
|
|
|
@ -74,7 +74,7 @@ VToolShoulderPoint::VToolShoulderPoint(const VToolShoulderPointInitData &initDat
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolShoulderPoint::setDialog()
|
||||
void VToolShoulderPoint::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogShoulderPoint> dialogTool = qobject_cast<DialogShoulderPoint *>(m_dialog);
|
||||
|
|
|
@ -68,7 +68,7 @@ class VToolShoulderPoint : public VToolLinePoint
|
|||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder,
|
||||
const qreal &length);
|
||||
static VToolShoulderPoint* Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
|
|
|
@ -87,7 +87,7 @@ VToolBasePoint::VToolBasePoint (const VToolBasePointInitData &initData, QGraphic
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolBasePoint::setDialog()
|
||||
void VToolBasePoint::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogSinglePoint> dialogTool = qobject_cast<DialogSinglePoint *>(m_dialog);
|
||||
|
|
|
@ -68,7 +68,7 @@ class VToolBasePoint : public VToolSinglePoint
|
|||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual ~VToolBasePoint() =default;
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolBasePoint *Create(VToolBasePointInitData initData);
|
||||
static const QString ToolType;
|
||||
virtual int type() const override {return Type;}
|
||||
|
|
|
@ -74,7 +74,7 @@ VToolLineIntersect::VToolLineIntersect(const VToolLineIntersectInitData &initDat
|
|||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
void VToolLineIntersect::setDialog()
|
||||
void VToolLineIntersect::SetDialog()
|
||||
{
|
||||
SCASSERT(not m_dialog.isNull())
|
||||
const QPointer<DialogLineIntersect> dialogTool = qobject_cast<DialogLineIntersect *>(m_dialog);
|
||||
|
|
|
@ -66,7 +66,7 @@ class VToolLineIntersect:public VToolSinglePoint
|
|||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
virtual void setDialog() override;
|
||||
virtual void SetDialog() override;
|
||||
static VToolLineIntersect *Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
|
||||
VAbstractPattern *doc, VContainer *data);
|
||||
static VToolLineIntersect *Create(VToolLineIntersectInitData initData);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user