Rename VToolPoint.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-06-20 09:23:04 +03:00
parent a99c3ce54a
commit 0097d67865
51 changed files with 230 additions and 149 deletions

View File

@ -32,9 +32,9 @@
#include "../../libs/vgeometry/vsplinepath.h" #include "../../libs/vgeometry/vsplinepath.h"
#include "../../libs/vgeometry/vpointf.h" #include "../../libs/vgeometry/vpointf.h"
#include "../../libs/vtools/tools/vabstracttool.h" #include "../../libs/vtools/tools/vabstracttool.h"
#include "../../libs/vtools/tools/drawTools/vtoolcutspline.h" #include "../../libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.h"
#include "../../libs/vtools/tools/drawTools/vtoolcutsplinepath.h" #include "../../libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.h"
#include "../../libs/vtools/tools/drawTools/vtoolcutarc.h" #include "../../libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.h"
#include "../xml/vpattern.h" #include "../xml/vpattern.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -178,7 +178,7 @@ void MainWindow::AddPP(const QString &PPName, const QString &path)
sceneDraw->addItem(spoint); sceneDraw->addItem(spoint);
ui->view->itemClicked(spoint); ui->view->itemClicked(spoint);
connect(spoint, &VToolPoint::ChoosedTool, sceneDraw, &VMainGraphicsScene::ChoosedItem); connect(spoint, &VToolSinglePoint::ChoosedTool, sceneDraw, &VMainGraphicsScene::ChoosedItem);
connect(sceneDraw, &VMainGraphicsScene::DisableItem, spoint, &VToolBasePoint::Disable); connect(sceneDraw, &VMainGraphicsScene::DisableItem, spoint, &VToolBasePoint::Disable);
connect(sceneDraw, &VMainGraphicsScene::NewFactor, spoint, &VToolBasePoint::SetFactor); connect(sceneDraw, &VMainGraphicsScene::NewFactor, spoint, &VToolBasePoint::SetFactor);
connect(sceneDraw, &VMainGraphicsScene::EnableToolMove, spoint, &VToolBasePoint::EnableToolMove); connect(sceneDraw, &VMainGraphicsScene::EnableToolMove, spoint, &VToolBasePoint::EnableToolMove);

View File

@ -293,7 +293,7 @@ quint32 VPattern::SPointActiveDraw()
const QDomElement domElement = domNode.toElement(); const QDomElement domElement = domNode.toElement();
if (domElement.isNull() == false) if (domElement.isNull() == false)
{ {
if (domElement.tagName() == VToolPoint::TagName && if (domElement.tagName() == VToolSinglePoint::TagName &&
domElement.attribute(AttrType, "") == VToolBasePoint::ToolType) domElement.attribute(AttrType, "") == VToolBasePoint::ToolType)
{ {
return GetParametrId(domElement); return GetParametrId(domElement);

View File

@ -34,7 +34,7 @@
VToolCut::VToolCut(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula, VToolCut::VToolCut(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula,
const quint32 &curveCutId, const quint32 &curve1id, const quint32 &curve2id, const QString &color, const quint32 &curveCutId, const quint32 &curve1id, const quint32 &curve2id, const QString &color,
QGraphicsItem *parent) QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), formula(formula), firstCurve(nullptr), secondCurve(nullptr), :VToolSinglePoint(doc, data, id, parent), formula(formula), firstCurve(nullptr), secondCurve(nullptr),
curveCutId(curveCutId), curve1id(curve1id), curve2id(curve2id), detailsMode(false) curveCutId(curveCutId), curve1id(curve1id), curve2id(curve2id), detailsMode(false)
{ {
Q_ASSERT_X(curveCutId > 0, Q_FUNC_INFO, "curveCutId <= 0"); Q_ASSERT_X(curveCutId > 0, Q_FUNC_INFO, "curveCutId <= 0");
@ -72,7 +72,7 @@ void VToolCut::HoverPath(quint32 id, SimpleCurvePoint curvePosition, PathDirecti
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolCut::Disable(bool disable, const QString &namePP) void VToolCut::Disable(bool disable, const QString &namePP)
{ {
VToolPoint::Disable(disable, namePP); VToolSinglePoint::Disable(disable, namePP);
firstCurve->ChangedActivDraw(enabled); firstCurve->ChangedActivDraw(enabled);
secondCurve->ChangedActivDraw(enabled); secondCurve->ChangedActivDraw(enabled);
} }
@ -143,7 +143,7 @@ void VToolCut::RefreshGeometry()
{ {
RefreshCurve(firstCurve, curve1id, SimpleCurvePoint::ForthPoint); RefreshCurve(firstCurve, curve1id, SimpleCurvePoint::ForthPoint);
RefreshCurve(secondCurve, curve2id, SimpleCurvePoint::FirstPoint); RefreshCurve(secondCurve, curve2id, SimpleCurvePoint::FirstPoint);
VToolPoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject<VPointF>(id)); VToolSinglePoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject<VPointF>(id));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -172,7 +172,7 @@ void VToolCut::FullUpdateCurveFromFile(const QString &attrCurve)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolCut::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolCut::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
doc->SetAttribute(tag, AttrColor, lineColor); doc->SetAttribute(tag, AttrColor, lineColor);
} }

View File

@ -29,13 +29,13 @@
#ifndef VTOOLCUT_H #ifndef VTOOLCUT_H
#define VTOOLCUT_H #define VTOOLCUT_H
#include "../vtoolpoint.h" #include "../vtoolsinglepoint.h"
#include "../vwidgets/vsimplecurve.h" #include "../vwidgets/vsimplecurve.h"
#include "../../../toolcurve/vabstractspline.h" #include "../../../toolcurve/vabstractspline.h"
class VFormula; class VFormula;
class VToolCut : public VToolPoint class VToolCut : public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -165,7 +165,7 @@ VToolCutArc* VToolCutArc::Create(const quint32 _id, const QString &pointName, QS
{ {
VToolCutArc *point = new VToolCutArc(doc, data, id, formula, arcId, arc1id, arc2id, color, typeCreation); VToolCutArc *point = new VToolCutArc(doc, data, id, formula, arcId, arc1id, arc2id, color, typeCreation);
scene->addItem(point); scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); connect(point, &VToolSinglePoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCutArc::SetFactor); connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCutArc::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCutArc::Disable); connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCutArc::Disable);
connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolCutArc::EnableToolMove); connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolCutArc::EnableToolMove);

View File

@ -173,7 +173,7 @@ VToolCutSpline* VToolCutSpline::Create(const quint32 _id, const QString &pointNa
VToolCutSpline *point = new VToolCutSpline(doc, data, id, formula, splineId, spl1id, spl2id, color, VToolCutSpline *point = new VToolCutSpline(doc, data, id, formula, splineId, spl1id, spl2id, color,
typeCreation); typeCreation);
scene->addItem(point); scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); connect(point, &VToolSinglePoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCutSpline::SetFactor); connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCutSpline::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCutSpline::Disable); connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCutSpline::Disable);
connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolCutSpline::EnableToolMove); connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolCutSpline::EnableToolMove);

View File

@ -217,7 +217,7 @@ VToolCutSplinePath* VToolCutSplinePath::Create(const quint32 _id, const QString
VToolCutSplinePath *point = new VToolCutSplinePath(doc, data, id, formula, splinePathId, splPath1id, VToolCutSplinePath *point = new VToolCutSplinePath(doc, data, id, formula, splinePathId, splPath1id,
splPath2id, color, typeCreation); splPath2id, color, typeCreation);
scene->addItem(point); scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); connect(point, &VToolSinglePoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCutSplinePath::SetFactor); connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCutSplinePath::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCutSplinePath::Disable); connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCutSplinePath::Disable);
connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolCutSplinePath::EnableToolMove); connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolCutSplinePath::EnableToolMove);

View File

@ -201,7 +201,7 @@ VToolBisector* VToolBisector::Create(const quint32 _id, QString &formula, const
VToolBisector *point = new VToolBisector(doc, data, id, typeLine, lineColor, formula, firstPointId, VToolBisector *point = new VToolBisector(doc, data, id, typeLine, lineColor, formula, firstPointId,
secondPointId, thirdPointId, typeCreation); secondPointId, thirdPointId, typeCreation);
scene->addItem(point); scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); connect(point, &VToolSinglePoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolBisector::SetFactor); connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolBisector::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolBisector::Disable); connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolBisector::Disable);
connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolBisector::EnableToolMove); connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolBisector::EnableToolMove);

View File

@ -129,7 +129,7 @@ VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(const quint32 _id, cons
VToolCurveIntersectAxis *point = new VToolCurveIntersectAxis(doc, data, id, typeLine, lineColor, formulaAngle, VToolCurveIntersectAxis *point = new VToolCurveIntersectAxis(doc, data, id, typeLine, lineColor, formulaAngle,
basePointId, curveId, typeCreation); basePointId, curveId, typeCreation);
scene->addItem(point); scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); connect(point, &VToolSinglePoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCurveIntersectAxis::SetFactor); connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCurveIntersectAxis::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCurveIntersectAxis::Disable); connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCurveIntersectAxis::Disable);
connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolCurveIntersectAxis::EnableToolMove); connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolCurveIntersectAxis::EnableToolMove);

View File

@ -166,7 +166,7 @@ VToolEndLine* VToolEndLine::Create(const quint32 _id, const QString &pointName,
VToolEndLine *point = new VToolEndLine(doc, data, id, typeLine, lineColor, formulaLength, formulaAngle, VToolEndLine *point = new VToolEndLine(doc, data, id, typeLine, lineColor, formulaLength, formulaAngle,
basePointId, typeCreation); basePointId, typeCreation);
scene->addItem(point); scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); connect(point, &VToolSinglePoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolEndLine::SetFactor); connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolEndLine::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolEndLine::Disable); connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolEndLine::Disable);
connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolEndLine::EnableToolMove); connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolEndLine::EnableToolMove);

View File

@ -158,7 +158,7 @@ VToolHeight* VToolHeight::Create(const quint32 _id, const QString &pointName, co
VToolHeight *point = new VToolHeight(doc, data, id, typeLine, lineColor, basePointId, p1LineId, p2LineId, VToolHeight *point = new VToolHeight(doc, data, id, typeLine, lineColor, basePointId, p1LineId, p2LineId,
typeCreation); typeCreation);
scene->addItem(point); scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); connect(point, &VToolSinglePoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolHeight::SetFactor); connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolHeight::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolHeight::Disable); connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolHeight::Disable);
connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolHeight::EnableToolMove); connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolHeight::EnableToolMove);

View File

@ -140,7 +140,7 @@ VToolLineIntersectAxis *VToolLineIntersectAxis::Create(const quint32 _id, const
basePointId, firstPointId, secondPointId, basePointId, firstPointId, secondPointId,
typeCreation); typeCreation);
scene->addItem(point); scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); connect(point, &VToolSinglePoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolLineIntersectAxis::SetFactor); connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolLineIntersectAxis::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolLineIntersectAxis::Disable); connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolLineIntersectAxis::Disable);
connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolLineIntersectAxis::EnableToolMove); connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolLineIntersectAxis::EnableToolMove);

View File

@ -45,7 +45,7 @@
VToolLinePoint::VToolLinePoint(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, VToolLinePoint::VToolLinePoint(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
const QString &lineColor, const QString &formula, const quint32 &basePointId, const QString &lineColor, const QString &formula, const quint32 &basePointId,
const qreal &angle, QGraphicsItem *parent) const qreal &angle, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), formulaLength(formula), angle(angle), basePointId(basePointId), :VToolSinglePoint(doc, data, id, parent), formulaLength(formula), angle(angle), basePointId(basePointId),
mainLine(nullptr) mainLine(nullptr)
{ {
this->typeLine = typeLine; this->typeLine = typeLine;
@ -74,7 +74,7 @@ void VToolLinePoint::RefreshGeometry()
mainLine->setPen(QPen(CorrectColor(QColor(lineColor)), mainLine->setPen(QPen(CorrectColor(QColor(lineColor)),
qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor,
LineStyleToPenStyle(typeLine))); LineStyleToPenStyle(typeLine)));
VToolPoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject<VPointF>(id)); VToolSinglePoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject<VPointF>(id));
QPointF point = VDrawTool::data.GeometricObject<VPointF>(id)->toQPointF(); QPointF point = VDrawTool::data.GeometricObject<VPointF>(id)->toQPointF();
QPointF basePoint = VDrawTool::data.GeometricObject<VPointF>(basePointId)->toQPointF(); QPointF basePoint = VDrawTool::data.GeometricObject<VPointF>(basePointId)->toQPointF();
mainLine->setLine(QLineF(basePoint - point, QPointF())); mainLine->setLine(QLineF(basePoint - point, QPointF()));
@ -92,7 +92,7 @@ void VToolLinePoint::RemoveReferens()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolLinePoint::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolLinePoint::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
doc->SetAttribute(tag, AttrTypeLine, typeLine); doc->SetAttribute(tag, AttrTypeLine, typeLine);
doc->SetAttribute(tag, AttrLineColor, lineColor); doc->SetAttribute(tag, AttrLineColor, lineColor);
@ -112,7 +112,7 @@ void VToolLinePoint::SetFactor(qreal factor)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolLinePoint::Disable(bool disable, const QString &namePP) void VToolLinePoint::Disable(bool disable, const QString &namePP)
{ {
VToolPoint::Disable(disable, namePP); VToolSinglePoint::Disable(disable, namePP);
mainLine->setPen(QPen(CorrectColor(lineColor), mainLine->setPen(QPen(CorrectColor(lineColor),
qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor,
LineStyleToPenStyle(typeLine))); LineStyleToPenStyle(typeLine)));

View File

@ -29,13 +29,13 @@
#ifndef VTOOLLINEPOINT_H #ifndef VTOOLLINEPOINT_H
#define VTOOLLINEPOINT_H #define VTOOLLINEPOINT_H
#include "../vtoolpoint.h" #include "../vtoolsinglepoint.h"
#include "../vpatterndb/vformula.h" #include "../vpatterndb/vformula.h"
/** /**
* @brief The VToolLinePoint class parent for all tools what create point with line. * @brief The VToolLinePoint class parent for all tools what create point with line.
*/ */
class VToolLinePoint : public VToolPoint class VToolLinePoint : public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -49,7 +49,7 @@ const QString VToolBasePoint::ToolType = QStringLiteral("single");
*/ */
VToolBasePoint::VToolBasePoint (VAbstractPattern *doc, VContainer *data, quint32 id, const Source &typeCreation, VToolBasePoint::VToolBasePoint (VAbstractPattern *doc, VContainer *data, quint32 id, const Source &typeCreation,
const QString &namePP, const QString &mPath, QGraphicsItem * parent ) const QString &namePP, const QString &mPath, QGraphicsItem * parent )
:VToolPoint(doc, data, id, parent), namePP(namePP), mPath(mPath) :VToolSinglePoint(doc, data, id, parent), namePP(namePP), mPath(mPath)
{ {
baseColor = Qt::red; baseColor = Qt::red;
this->setPen(QPen(baseColor, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor)); this->setPen(QPen(baseColor, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor));
@ -202,7 +202,7 @@ void VToolBasePoint::SaveDialog(QDomElement &domElement)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolBasePoint::hoverEnterEvent(QGraphicsSceneHoverEvent *event) void VToolBasePoint::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{ {
VToolPoint::hoverEnterEvent(event); VToolSinglePoint::hoverEnterEvent(event);
if (flags() & QGraphicsItem::ItemIsMovable) if (flags() & QGraphicsItem::ItemIsMovable)
{ {
@ -213,7 +213,7 @@ void VToolBasePoint::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolBasePoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VToolBasePoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{ {
VToolPoint::hoverLeaveEvent(event); VToolSinglePoint::hoverLeaveEvent(event);
if (flags() & QGraphicsItem::ItemIsMovable) if (flags() & QGraphicsItem::ItemIsMovable)
{ {
@ -232,7 +232,7 @@ void VToolBasePoint::mousePressEvent(QGraphicsSceneMouseEvent *event)
SetOverrideCursor(cursorArrowCloseHand, 1, 1); SetOverrideCursor(cursorArrowCloseHand, 1, 1);
} }
} }
VToolPoint::mousePressEvent(event); VToolSinglePoint::mousePressEvent(event);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -246,7 +246,7 @@ void VToolBasePoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
RestoreOverrideCursor(cursorArrowCloseHand); RestoreOverrideCursor(cursorArrowCloseHand);
} }
} }
VToolPoint::mouseReleaseEvent(event); VToolSinglePoint::mouseReleaseEvent(event);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -263,7 +263,7 @@ void VToolBasePoint::SetColorLabel(const Qt::GlobalColor &color)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolBasePoint::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolBasePoint::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
QSharedPointer<VPointF> point = qSharedPointerDynamicCast<VPointF>(obj); QSharedPointer<VPointF> point = qSharedPointerDynamicCast<VPointF>(obj);
SCASSERT(point.isNull() == false); SCASSERT(point.isNull() == false);
@ -329,5 +329,5 @@ void VToolBasePoint::SetFactor(qreal factor)
void VToolBasePoint::EnableToolMove(bool move) void VToolBasePoint::EnableToolMove(bool move)
{ {
this->setFlag(QGraphicsItem::ItemIsMovable, move); this->setFlag(QGraphicsItem::ItemIsMovable, move);
VToolPoint::EnableToolMove(move); VToolSinglePoint::EnableToolMove(move);
} }

View File

@ -29,13 +29,13 @@
#ifndef VTOOLBASEPOINT_H #ifndef VTOOLBASEPOINT_H
#define VTOOLBASEPOINT_H #define VTOOLBASEPOINT_H
#include "vtoolpoint.h" #include "vtoolsinglepoint.h"
/** /**
* @brief The VToolBasePoint class tool for creation pattern base point. Obly base point can move. All object * @brief The VToolBasePoint class tool for creation pattern base point. Obly base point can move. All object
* pattern peace depend on base point. * pattern peace depend on base point.
*/ */
class VToolBasePoint : public VToolPoint class VToolBasePoint : public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -50,7 +50,7 @@ VToolLineIntersect::VToolLineIntersect(VAbstractPattern *doc, VContainer *data,
const quint32 &p1Line1, const quint32 &p2Line1, const quint32 &p1Line2, const quint32 &p1Line1, const quint32 &p2Line1, const quint32 &p1Line2,
const quint32 &p2Line2, const Source &typeCreation, const quint32 &p2Line2, const Source &typeCreation,
QGraphicsItem *parent) QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2), :VToolSinglePoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2),
p2Line2(p2Line2) p2Line2(p2Line2)
{ {
ToolCreation(typeCreation); ToolCreation(typeCreation);
@ -232,7 +232,7 @@ void VToolLineIntersect::SaveDialog(QDomElement &domElement)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersect::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolLineIntersect::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrType, ToolType);
doc->SetAttribute(tag, AttrP1Line1, p1Line1); doc->SetAttribute(tag, AttrP1Line1, p1Line1);

View File

@ -29,12 +29,12 @@
#ifndef VTOOLLINEINTERSECT_H #ifndef VTOOLLINEINTERSECT_H
#define VTOOLLINEINTERSECT_H #define VTOOLLINEINTERSECT_H
#include "vtoolpoint.h" #include "vtoolsinglepoint.h"
/** /**
* @brief The VToolLineIntersect class help find point intersection lines. * @brief The VToolLineIntersect class help find point intersection lines.
*/ */
class VToolLineIntersect:public VToolPoint class VToolLineIntersect:public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -39,7 +39,7 @@ VToolPointFromArcAndTangent::VToolPointFromArcAndTangent(VAbstractPattern *doc,
quint32 arcId, quint32 tangentPointId, quint32 arcId, quint32 tangentPointId,
CrossCirclesPoint crossPoint, const Source &typeCreation, CrossCirclesPoint crossPoint, const Source &typeCreation,
QGraphicsItem *parent) QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), arcId(arcId), tangentPointId(tangentPointId), crossPoint(crossPoint) :VToolSinglePoint(doc, data, id, parent), arcId(arcId), tangentPointId(tangentPointId), crossPoint(crossPoint)
{ {
ToolCreation(typeCreation); ToolCreation(typeCreation);
} }
@ -287,7 +287,7 @@ void VToolPointFromArcAndTangent::SaveDialog(QDomElement &domElement)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPointFromArcAndTangent::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolPointFromArcAndTangent::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrType, ToolType);
doc->SetAttribute(tag, AttrArc, arcId); doc->SetAttribute(tag, AttrArc, arcId);

View File

@ -29,9 +29,9 @@
#ifndef VTOOLPOINTFROMARCANDTANGENT_H #ifndef VTOOLPOINTFROMARCANDTANGENT_H
#define VTOOLPOINTFROMARCANDTANGENT_H #define VTOOLPOINTFROMARCANDTANGENT_H
#include "vtoolpoint.h" #include "vtoolsinglepoint.h"
class VToolPointFromArcAndTangent : public VToolPoint class VToolPointFromArcAndTangent : public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -41,7 +41,7 @@ VToolPointFromCircleAndTangent::VToolPointFromCircleAndTangent(VAbstractPattern
quint32 circleCenterId, const QString &circleRadius, quint32 circleCenterId, const QString &circleRadius,
quint32 tangentPointId, CrossCirclesPoint crossPoint, quint32 tangentPointId, CrossCirclesPoint crossPoint,
const Source &typeCreation, QGraphicsItem *parent) const Source &typeCreation, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), circleCenterId(circleCenterId), tangentPointId(tangentPointId), :VToolSinglePoint(doc, data, id, parent), circleCenterId(circleCenterId), tangentPointId(tangentPointId),
circleRadius(circleRadius), crossPoint(crossPoint) circleRadius(circleRadius), crossPoint(crossPoint)
{ {
ToolCreation(typeCreation); ToolCreation(typeCreation);
@ -272,7 +272,7 @@ void VToolPointFromCircleAndTangent::SaveDialog(QDomElement &domElement)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPointFromCircleAndTangent::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolPointFromCircleAndTangent::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrType, ToolType);
doc->SetAttribute(tag, AttrCCenter, circleCenterId); doc->SetAttribute(tag, AttrCCenter, circleCenterId);

View File

@ -29,11 +29,11 @@
#ifndef VTOOLPOINTFROMCIRCLEANDTANGENT_H #ifndef VTOOLPOINTFROMCIRCLEANDTANGENT_H
#define VTOOLPOINTFROMCIRCLEANDTANGENT_H #define VTOOLPOINTFROMCIRCLEANDTANGENT_H
#include "vtoolpoint.h" #include "vtoolsinglepoint.h"
class VFormula; class VFormula;
class VToolPointFromCircleAndTangent : public VToolPoint class VToolPointFromCircleAndTangent : public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -54,7 +54,7 @@ VToolPointOfContact::VToolPointOfContact(VAbstractPattern *doc, VContainer *data
const QString &radius, const quint32 &center, const QString &radius, const quint32 &center,
const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &firstPointId, const quint32 &secondPointId,
const Source &typeCreation, QGraphicsItem *parent) const Source &typeCreation, QGraphicsItem *parent)
: VToolPoint(doc, data, id, parent), arcRadius(radius), center(center), firstPointId(firstPointId), : VToolSinglePoint(doc, data, id, parent), arcRadius(radius), center(center), firstPointId(firstPointId),
secondPointId(secondPointId) secondPointId(secondPointId)
{ {
ToolCreation(typeCreation); ToolCreation(typeCreation);
@ -285,7 +285,7 @@ void VToolPointOfContact::SaveDialog(QDomElement &domElement)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPointOfContact::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolPointOfContact::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrType, ToolType);
doc->SetAttribute(tag, AttrRadius, arcRadius); doc->SetAttribute(tag, AttrRadius, arcRadius);

View File

@ -29,14 +29,14 @@
#ifndef VTOOLPOINTOFCONTACT_H #ifndef VTOOLPOINTOFCONTACT_H
#define VTOOLPOINTOFCONTACT_H #define VTOOLPOINTOFCONTACT_H
#include "vtoolpoint.h" #include "vtoolsinglepoint.h"
class VFormula; class VFormula;
/** /**
* @brief The VToolPointOfContact class tool for creation point intersection line and arc. * @brief The VToolPointOfContact class tool for creation point intersection line and arc.
*/ */
class VToolPointOfContact : public VToolPoint class VToolPointOfContact : public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -47,7 +47,7 @@ const QString VToolPointOfIntersection::ToolType = QStringLiteral("pointOfInters
VToolPointOfIntersection::VToolPointOfIntersection(VAbstractPattern *doc, VContainer *data, const quint32 &id, VToolPointOfIntersection::VToolPointOfIntersection(VAbstractPattern *doc, VContainer *data, const quint32 &id,
const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &firstPointId, const quint32 &secondPointId,
const Source &typeCreation, QGraphicsItem *parent) const Source &typeCreation, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId) :VToolSinglePoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId)
{ {
ToolCreation(typeCreation); ToolCreation(typeCreation);
} }
@ -191,7 +191,7 @@ void VToolPointOfIntersection::SaveDialog(QDomElement &domElement)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPointOfIntersection::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolPointOfIntersection::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrType, ToolType);
doc->SetAttribute(tag, AttrFirstPoint, firstPointId); doc->SetAttribute(tag, AttrFirstPoint, firstPointId);

View File

@ -29,12 +29,12 @@
#ifndef VTOOLPOINTOFINTERSECTION_H #ifndef VTOOLPOINTOFINTERSECTION_H
#define VTOOLPOINTOFINTERSECTION_H #define VTOOLPOINTOFINTERSECTION_H
#include "vtoolpoint.h" #include "vtoolsinglepoint.h"
/** /**
* @brief The VToolPointOfIntersection class tool for creation point intersection two lines. * @brief The VToolPointOfIntersection class tool for creation point intersection two lines.
*/ */
class VToolPointOfIntersection : public VToolPoint class VToolPointOfIntersection : public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -39,7 +39,7 @@ VToolPointOfIntersectionArcs::VToolPointOfIntersectionArcs(VAbstractPattern *doc
const quint32 &firstArcId, const quint32 &secondArcId, const quint32 &firstArcId, const quint32 &secondArcId,
CrossCirclesPoint pType, const Source &typeCreation, CrossCirclesPoint pType, const Source &typeCreation,
QGraphicsItem *parent) QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), firstArcId(firstArcId), secondArcId(secondArcId), crossPoint(pType) :VToolSinglePoint(doc, data, id, parent), firstArcId(firstArcId), secondArcId(secondArcId), crossPoint(pType)
{ {
ToolCreation(typeCreation); ToolCreation(typeCreation);
} }
@ -292,7 +292,7 @@ void VToolPointOfIntersectionArcs::SaveDialog(QDomElement &domElement)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPointOfIntersectionArcs::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolPointOfIntersectionArcs::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrType, ToolType);
doc->SetAttribute(tag, AttrFirstArc, firstArcId); doc->SetAttribute(tag, AttrFirstArc, firstArcId);

View File

@ -29,11 +29,11 @@
#ifndef VTOOLPOINTOFINTERSECTIONARCS_H #ifndef VTOOLPOINTOFINTERSECTIONARCS_H
#define VTOOLPOINTOFINTERSECTIONARCS_H #define VTOOLPOINTOFINTERSECTIONARCS_H
#include "vtoolpoint.h" #include "vtoolsinglepoint.h"
class VArc; class VArc;
class VToolPointOfIntersectionArcs : public VToolPoint class VToolPointOfIntersectionArcs : public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT

View File

@ -44,7 +44,7 @@ VToolPointOfIntersectionCircles::VToolPointOfIntersectionCircles(VAbstractPatter
const QString &secondCircleRadius, const QString &secondCircleRadius,
CrossCirclesPoint crossPoint, CrossCirclesPoint crossPoint,
const Source &typeCreation, QGraphicsItem *parent) const Source &typeCreation, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), firstCircleCenterId(firstCircleCenterId), :VToolSinglePoint(doc, data, id, parent), firstCircleCenterId(firstCircleCenterId),
secondCircleCenterId(secondCircleCenterId), firstCircleRadius(firstCircleRadius), secondCircleCenterId(secondCircleCenterId), firstCircleRadius(firstCircleRadius),
secondCircleRadius(secondCircleRadius), crossPoint(crossPoint) secondCircleRadius(secondCircleRadius), crossPoint(crossPoint)
{ {
@ -308,7 +308,7 @@ void VToolPointOfIntersectionCircles::SaveDialog(QDomElement &domElement)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPointOfIntersectionCircles::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolPointOfIntersectionCircles::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrType, ToolType);
doc->SetAttribute(tag, AttrC1Center, firstCircleCenterId); doc->SetAttribute(tag, AttrC1Center, firstCircleCenterId);

View File

@ -29,11 +29,11 @@
#ifndef VTOOLPOINTOFINTERSECTIONCIRCLES_H #ifndef VTOOLPOINTOFINTERSECTIONCIRCLES_H
#define VTOOLPOINTOFINTERSECTIONCIRCLES_H #define VTOOLPOINTOFINTERSECTIONCIRCLES_H
#include "vtoolpoint.h" #include "vtoolsinglepoint.h"
class VFormula; class VFormula;
class VToolPointOfIntersectionCircles : public VToolPoint class VToolPointOfIntersectionCircles : public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -1,6 +1,6 @@
/************************************************************************ /************************************************************************
** **
** @file vtoolpoint.cpp ** @file vtoolsinglepoint.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date November 15, 2013 ** @date November 15, 2013
** **
@ -26,7 +26,7 @@
** **
*************************************************************************/ *************************************************************************/
#include "vtoolpoint.h" #include "vtoolsinglepoint.h"
#include "../vmisc/logging.h" #include "../vmisc/logging.h"
#include "../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
#include "../vwidgets/vgraphicssimpletextitem.h" #include "../vwidgets/vgraphicssimpletextitem.h"
@ -34,29 +34,29 @@
#include <QKeyEvent> #include <QKeyEvent>
Q_LOGGING_CATEGORY(vToolPoint, "v.toolPoint") Q_LOGGING_CATEGORY(vToolSinglePoint, "v.toolSinglePoint")
const QString VToolPoint::TagName = QStringLiteral("point"); const QString VToolSinglePoint::TagName = QStringLiteral("point");
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief VToolPoint constructor. * @brief VToolSinglePoint constructor.
* @param doc dom document container. * @param doc dom document container.
* @param data container with variables. * @param data container with variables.
* @param id object id in container. * @param id object id in container.
* @param parent parent object. * @param parent parent object.
*/ */
VToolPoint::VToolPoint(VAbstractPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent) VToolSinglePoint::VToolSinglePoint(VAbstractPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent)
:VDrawTool(doc, data, id), QGraphicsEllipseItem(parent), radius(DefPointRadius), namePoint(nullptr), :VAbstractPoint(doc, data, id), QGraphicsEllipseItem(parent), radius(DefPointRadius), namePoint(nullptr),
lineName(nullptr) lineName(nullptr)
{ {
radius = ToPixel(DefPointRadius/*mm*/, Unit::Mm); radius = ToPixel(DefPointRadius/*mm*/, Unit::Mm);
namePoint = new VGraphicsSimpleTextItem(this); namePoint = new VGraphicsSimpleTextItem(this);
connect(namePoint, &VGraphicsSimpleTextItem::ShowContextMenu, this, &VToolPoint::contextMenuEvent); connect(namePoint, &VGraphicsSimpleTextItem::ShowContextMenu, this, &VToolSinglePoint::contextMenuEvent);
connect(namePoint, &VGraphicsSimpleTextItem::DeleteTool, this, &VToolPoint::DeleteFromLabel); connect(namePoint, &VGraphicsSimpleTextItem::DeleteTool, this, &VToolSinglePoint::DeleteFromLabel);
connect(namePoint, &VGraphicsSimpleTextItem::PointChoosed, this, &VToolPoint::PointChoosed); connect(namePoint, &VGraphicsSimpleTextItem::PointChoosed, this, &VToolSinglePoint::PointChoosed);
lineName = new QGraphicsLineItem(this); lineName = new QGraphicsLineItem(this);
connect(namePoint, &VGraphicsSimpleTextItem::NameChangePosition, this, &VToolPoint::NameChangePosition); connect(namePoint, &VGraphicsSimpleTextItem::NameChangePosition, this, &VToolSinglePoint::NameChangePosition);
this->setBrush(QBrush(Qt::NoBrush)); this->setBrush(QBrush(Qt::NoBrush));
this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setFlag(QGraphicsItem::ItemIsSelectable, true);
this->setFlag(QGraphicsItem::ItemIsFocusable, true); this->setFlag(QGraphicsItem::ItemIsFocusable, true);
@ -65,11 +65,11 @@ VToolPoint::VToolPoint(VAbstractPattern *doc, VContainer *data, quint32 id, QGra
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VToolPoint::~VToolPoint() VToolSinglePoint::~VToolSinglePoint()
{} {}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPoint::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void VToolSinglePoint::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
/* From question on StackOverflow /* From question on StackOverflow
* https://stackoverflow.com/questions/10985028/how-to-remove-border-around-qgraphicsitem-when-selected * https://stackoverflow.com/questions/10985028/how-to-remove-border-around-qgraphicsitem-when-selected
@ -82,7 +82,7 @@ void VToolPoint::paint(QPainter *painter, const QStyleOptionGraphicsItem *option
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QString VToolPoint::name() const QString VToolSinglePoint::name() const
{ {
try try
{ {
@ -90,14 +90,14 @@ QString VToolPoint::name() const
} }
catch (const VExceptionBadId &e) catch (const VExceptionBadId &e)
{ {
qCDebug(vToolPoint, "Error! Couldn't get point name. %s %s", e.ErrorMessage().toUtf8().constData(), qCDebug(vToolSinglePoint, "Error! Couldn't get point name. %s %s", e.ErrorMessage().toUtf8().constData(),
e.DetailedInformation().toUtf8().constData()); e.DetailedInformation().toUtf8().constData());
return QString("");// Return empty string for property browser return QString("");// Return empty string for property browser
} }
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPoint::setName(const QString &name) void VToolSinglePoint::setName(const QString &name)
{ {
// Don't know if need check name here. // Don't know if need check name here.
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id); QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
@ -106,9 +106,9 @@ void VToolPoint::setName(const QString &name)
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QString VToolPoint::getTagName() const QString VToolSinglePoint::getTagName() const
{ {
return VToolPoint::TagName; return VToolSinglePoint::TagName;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -116,7 +116,7 @@ QString VToolPoint::getTagName() const
* @brief NameChangePosition handle change posion point label. * @brief NameChangePosition handle change posion point label.
* @param pos new position. * @param pos new position.
*/ */
void VToolPoint::NameChangePosition(const QPointF &pos) void VToolSinglePoint::NameChangePosition(const QPointF &pos)
{ {
VPointF *point = new VPointF(*VAbstractTool::data.GeometricObject<VPointF>(id)); VPointF *point = new VPointF(*VAbstractTool::data.GeometricObject<VPointF>(id));
QPointF p = pos - this->pos(); QPointF p = pos - this->pos();
@ -133,7 +133,7 @@ void VToolPoint::NameChangePosition(const QPointF &pos)
* @param mx label bias x axis. * @param mx label bias x axis.
* @param my label bias y axis. * @param my label bias y axis.
*/ */
void VToolPoint::UpdateNamePosition(qreal mx, qreal my) void VToolSinglePoint::UpdateNamePosition(qreal mx, qreal my)
{ {
MoveLabel *moveLabel = new MoveLabel(doc, mx, my, id, this->scene()); MoveLabel *moveLabel = new MoveLabel(doc, mx, my, id, this->scene());
connect(moveLabel, &MoveLabel::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree); connect(moveLabel, &MoveLabel::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree);
@ -146,7 +146,7 @@ void VToolPoint::UpdateNamePosition(qreal mx, qreal my)
* @param id object id in container. * @param id object id in container.
* @param enable enable or disable highlight. * @param enable enable or disable highlight.
*/ */
void VToolPoint::ShowTool(quint32 id, bool enable) void VToolSinglePoint::ShowTool(quint32 id, bool enable)
{ {
ShowItem(this, id, enable); ShowItem(this, id, enable);
} }
@ -156,14 +156,14 @@ void VToolPoint::ShowTool(quint32 id, bool enable)
* @brief SetFactor set current scale factor of scene. * @brief SetFactor set current scale factor of scene.
* @param factor scene scale factor. * @param factor scene scale factor.
*/ */
void VToolPoint::SetFactor(qreal factor) void VToolSinglePoint::SetFactor(qreal factor)
{ {
VDrawTool::SetFactor(factor); VDrawTool::SetFactor(factor);
RefreshPointGeometry(*VAbstractTool::data.GeometricObject<VPointF>(id)); RefreshPointGeometry(*VAbstractTool::data.GeometricObject<VPointF>(id));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPoint::Disable(bool disable, const QString &namePP) void VToolSinglePoint::Disable(bool disable, const QString &namePP)
{ {
enabled = !CorrectDisable(disable, namePP); enabled = !CorrectDisable(disable, namePP);
this->setEnabled(enabled); this->setEnabled(enabled);
@ -171,19 +171,19 @@ void VToolPoint::Disable(bool disable, const QString &namePP)
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPoint::DeleteFromLabel() void VToolSinglePoint::DeleteFromLabel()
{ {
DeleteTool(); //Leave this method immediately after call!!! DeleteTool(); //Leave this method immediately after call!!!
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPoint::EnableToolMove(bool move) void VToolSinglePoint::EnableToolMove(bool move)
{ {
namePoint->setFlag(QGraphicsItem::ItemIsMovable, move); namePoint->setFlag(QGraphicsItem::ItemIsMovable, move);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPoint::PointChoosed() void VToolSinglePoint::PointChoosed()
{ {
emit ChoosedTool(id, SceneObject::Point); emit ChoosedTool(id, SceneObject::Point);
} }
@ -192,7 +192,7 @@ void VToolPoint::PointChoosed()
/** /**
* @brief FullUpdateFromFile update tool data form file. * @brief FullUpdateFromFile update tool data form file.
*/ */
void VToolPoint::FullUpdateFromFile() void VToolSinglePoint::FullUpdateFromFile()
{ {
ReadAttributes(); ReadAttributes();
RefreshPointGeometry(*VAbstractTool::data.GeometricObject<VPointF>(id)); RefreshPointGeometry(*VAbstractTool::data.GeometricObject<VPointF>(id));
@ -204,7 +204,7 @@ void VToolPoint::FullUpdateFromFile()
* @brief mouseReleaseEvent handle mouse release events. * @brief mouseReleaseEvent handle mouse release events.
* @param event mouse release event. * @param event mouse release event.
*/ */
void VToolPoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void VToolSinglePoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{ {
if (event->button() == Qt::LeftButton) if (event->button() == Qt::LeftButton)
{ {
@ -218,7 +218,7 @@ void VToolPoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
* @brief hoverEnterEvent handle hover enter events. * @brief hoverEnterEvent handle hover enter events.
* @param event hover enter event. * @param event hover enter event.
*/ */
void VToolPoint::hoverEnterEvent(QGraphicsSceneHoverEvent *event) void VToolSinglePoint::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{ {
Q_UNUSED(event); Q_UNUSED(event);
this->setPen(QPen(CorrectColor(baseColor), this->setPen(QPen(CorrectColor(baseColor),
@ -231,7 +231,7 @@ void VToolPoint::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
* @brief hoverLeaveEvent handle hover leave events. * @brief hoverLeaveEvent handle hover leave events.
* @param event hover leave event. * @param event hover leave event.
*/ */
void VToolPoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VToolSinglePoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{ {
Q_UNUSED(event); Q_UNUSED(event);
this->setPen(QPen(CorrectColor(baseColor), this->setPen(QPen(CorrectColor(baseColor),
@ -244,7 +244,7 @@ void VToolPoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
* @brief RefreshPointGeometry refresh point on scene. * @brief RefreshPointGeometry refresh point on scene.
* @param point point. * @param point point.
*/ */
void VToolPoint::RefreshPointGeometry(const VPointF &point) void VToolSinglePoint::RefreshPointGeometry(const VPointF &point)
{ {
this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, false); this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, false);
this->setPen(QPen(CorrectColor(baseColor), this->setPen(QPen(CorrectColor(baseColor),
@ -269,7 +269,7 @@ void VToolPoint::RefreshPointGeometry(const VPointF &point)
/** /**
* @brief RefreshLine refresh line to label on scene. * @brief RefreshLine refresh line to label on scene.
*/ */
void VToolPoint::RefreshLine() void VToolSinglePoint::RefreshLine()
{ {
QRectF nRec = namePoint->sceneBoundingRect(); QRectF nRec = namePoint->sceneBoundingRect();
nRec.translate(- scenePos()); nRec.translate(- scenePos());
@ -305,7 +305,7 @@ void VToolPoint::RefreshLine()
* @param value value. * @param value value.
* @return value. * @return value.
*/ */
QVariant VToolPoint::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) QVariant VToolSinglePoint::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value)
{ {
if (change == QGraphicsItem::ItemSelectedChange) if (change == QGraphicsItem::ItemSelectedChange)
{ {
@ -328,7 +328,7 @@ QVariant VToolPoint::itemChange(QGraphicsItem::GraphicsItemChange change, const
* @brief keyReleaseEvent handle key release events. * @brief keyReleaseEvent handle key release events.
* @param event key release event. * @param event key release event.
*/ */
void VToolPoint::keyReleaseEvent(QKeyEvent *event) void VToolSinglePoint::keyReleaseEvent(QKeyEvent *event)
{ {
switch (event->key()) switch (event->key())
{ {
@ -342,13 +342,13 @@ void VToolPoint::keyReleaseEvent(QKeyEvent *event)
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) void VToolSinglePoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{ {
Q_UNUSED(event) Q_UNUSED(event)
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPoint::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolSinglePoint::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VDrawTool::SaveOptions(tag, obj); VDrawTool::SaveOptions(tag, obj);
@ -361,7 +361,7 @@ void VToolPoint::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolPoint::setEnabled(bool enabled) void VToolSinglePoint::setEnabled(bool enabled)
{ {
QGraphicsEllipseItem::setEnabled(enabled); QGraphicsEllipseItem::setEnabled(enabled);
if (enabled) if (enabled)

View File

@ -1,6 +1,6 @@
/************************************************************************ /************************************************************************
** **
** @file vtoolpoint.h ** @file vtoolsinglepoint.h
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date November 15, 2013 ** @date November 15, 2013
** **
@ -26,24 +26,24 @@
** **
*************************************************************************/ *************************************************************************/
#ifndef VTOOLPOINT_H #ifndef VTOOLSINGLEPOINT_H
#define VTOOLPOINT_H #define VTOOLSINGLEPOINT_H
#include "../../vdrawtool.h" #include "../vabstractpoint.h"
#include <QGraphicsEllipseItem> #include <QGraphicsEllipseItem>
class VPointF; class VPointF;
class VGraphicsSimpleTextItem; class VGraphicsSimpleTextItem;
/** /**
* @brief The VToolPoint class parent for all tools what create points. * @brief The VToolSinglePoint class parent for all tools what create points.
*/ */
class VToolPoint: public VDrawTool, public QGraphicsEllipseItem class VToolSinglePoint: public VAbstractPoint, public QGraphicsEllipseItem
{ {
Q_OBJECT Q_OBJECT
public: public:
VToolPoint(VAbstractPattern *doc, VContainer *data, quint32 id, QGraphicsItem * parent = nullptr); VToolSinglePoint(VAbstractPattern *doc, VContainer *data, quint32 id, QGraphicsItem * parent = nullptr);
virtual ~VToolPoint(); virtual ~VToolSinglePoint();
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0); virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0);
QString name() const; QString name() const;
void setName(const QString &name); void setName(const QString &name);
@ -106,7 +106,7 @@ protected:
} }
} }
private: private:
Q_DISABLE_COPY(VToolPoint) Q_DISABLE_COPY(VToolSinglePoint)
}; };
#endif // VTOOLPOINT_H #endif // VTOOLSINGLEPOINT_H

View File

@ -50,7 +50,7 @@ const QString VToolTriangle::ToolType = QStringLiteral("triangle");
VToolTriangle::VToolTriangle(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &axisP1Id, VToolTriangle::VToolTriangle(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &axisP1Id,
const quint32 &axisP2Id, const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &axisP2Id, const quint32 &firstPointId, const quint32 &secondPointId,
const Source &typeCreation, QGraphicsItem *parent) const Source &typeCreation, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId), :VToolSinglePoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId),
secondPointId(secondPointId) secondPointId(secondPointId)
{ {
ToolCreation(typeCreation); ToolCreation(typeCreation);
@ -249,7 +249,7 @@ void VToolTriangle::SaveDialog(QDomElement &domElement)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolTriangle::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) void VToolTriangle::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
{ {
VToolPoint::SaveOptions(tag, obj); VToolSinglePoint::SaveOptions(tag, obj);
doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrType, ToolType);
doc->SetAttribute(tag, AttrAxisP1, axisP1Id); doc->SetAttribute(tag, AttrAxisP1, axisP1Id);

View File

@ -29,13 +29,13 @@
#ifndef VTOOLTRIANGLE_H #ifndef VTOOLTRIANGLE_H
#define VTOOLTRIANGLE_H #define VTOOLTRIANGLE_H
#include "vtoolpoint.h" #include "vtoolsinglepoint.h"
/** /**
* @brief The VToolTriangle class for tool that find point intersection two foots right triangle * @brief The VToolTriangle class for tool that find point intersection two foots right triangle
* (triangle with 90 degree). * (triangle with 90 degree).
*/ */
class VToolTriangle : public VToolPoint class VToolTriangle : public VToolSinglePoint
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -0,0 +1,38 @@
/************************************************************************
**
** @file vabstractpoint.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 19 6, 2015
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2015 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** 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 "vabstractpoint.h"
//---------------------------------------------------------------------------------------------------------------------
VAbstractPoint::VAbstractPoint(VAbstractPattern *doc, VContainer *data, quint32 id)
:VDrawTool(doc, data, id)
{}
//---------------------------------------------------------------------------------------------------------------------
VAbstractPoint::~VAbstractPoint()
{}

View File

@ -0,0 +1,41 @@
/************************************************************************
**
** @file vabstractpoint.h
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 19 6, 2015
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2015 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** 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/>.
**
*************************************************************************/
#ifndef VABSTRACTPOINT_H
#define VABSTRACTPOINT_H
#include "../vdrawtool.h"
class VAbstractPoint: public VDrawTool
{
public:
VAbstractPoint(VAbstractPattern *doc, VContainer *data, quint32 id);
virtual ~VAbstractPoint();
};
#endif // VABSTRACTPOINT_H

View File

@ -13,7 +13,7 @@ HEADERS += \
$$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.h \ $$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.h \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.h \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.h \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.h \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.h \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpoint.h \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.h \
$$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.h \ $$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.h \
$$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollinepoint.h \ $$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollinepoint.h \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.h \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.h \
@ -43,7 +43,8 @@ HEADERS += \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.h \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.h \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.h \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.h \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.h \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.h \
$$PWD/drawTools/toolcurve/vtoolarcwithlength.h $$PWD/drawTools/toolcurve/vtoolarcwithlength.h \
$$PWD/drawTools/toolpoint/vabstractpoint.h
SOURCES += \ SOURCES += \
$$PWD/vtooldetail.cpp \ $$PWD/vtooldetail.cpp \
@ -56,7 +57,7 @@ SOURCES += \
$$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp \ $$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.cpp \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.cpp \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpoint.cpp \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp \
$$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp \ $$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp \
$$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollinepoint.cpp \ $$PWD/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollinepoint.cpp \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp \
@ -84,4 +85,5 @@ SOURCES += \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.cpp \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.cpp \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.cpp \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.cpp \
$$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.cpp \ $$PWD/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.cpp \
$$PWD/drawTools/toolcurve/vtoolarcwithlength.cpp $$PWD/drawTools/toolcurve/vtoolarcwithlength.cpp \
$$PWD/drawTools/toolpoint/vabstractpoint.cpp

View File

@ -28,7 +28,7 @@
#include "movesplinepath.h" #include "movesplinepath.h"
#include <QDomElement> #include <QDomElement>
#include "../tools/drawTools/vtoolsplinepath.h" #include "../tools/drawTools/toolcurve/vtoolsplinepath.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
MoveSplinePath::MoveSplinePath(VAbstractPattern *doc, const VSplinePath &oldSplPath, const VSplinePath &newSplPath, MoveSplinePath::MoveSplinePath(VAbstractPattern *doc, const VSplinePath &oldSplPath, const VSplinePath &newSplPath,

View File

@ -27,9 +27,9 @@
*************************************************************************/ *************************************************************************/
#include "vistoolbisector.h" #include "vistoolbisector.h"
#include "../../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
#include "../../vpatterndb/vcontainer.h" #include "../vpatterndb/vcontainer.h"
#include "../tools/drawTools/vtoolbisector.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolBisector::VisToolBisector(const VContainer *data, QGraphicsItem *parent) VisToolBisector::VisToolBisector(const VContainer *data, QGraphicsItem *parent)

View File

@ -27,9 +27,9 @@
*************************************************************************/ *************************************************************************/
#include "vistoolcurveintersectaxis.h" #include "vistoolcurveintersectaxis.h"
#include "../../vpatterndb/vcontainer.h" #include "../vpatterndb/vcontainer.h"
#include "../../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
#include "../tools/drawTools/vtoolcurveintersectaxis.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolCurveIntersectAxis::VisToolCurveIntersectAxis(const VContainer *data, QGraphicsItem *parent) VisToolCurveIntersectAxis::VisToolCurveIntersectAxis(const VContainer *data, QGraphicsItem *parent)

View File

@ -27,8 +27,8 @@
*************************************************************************/ *************************************************************************/
#include "vistoolheight.h" #include "vistoolheight.h"
#include "../../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
#include "../tools/drawTools/vtoolheight.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolheight.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolHeight::VisToolHeight(const VContainer *data, QGraphicsItem *parent) VisToolHeight::VisToolHeight(const VContainer *data, QGraphicsItem *parent)

View File

@ -27,9 +27,9 @@
*************************************************************************/ *************************************************************************/
#include "vistoollineintersectaxis.h" #include "vistoollineintersectaxis.h"
#include "../../vpatterndb/vcontainer.h" #include "../vpatterndb/vcontainer.h"
#include "../../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
#include "../tools/drawTools/vtoollineintersectaxis.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolLineIntersectAxis::VisToolLineIntersectAxis(const VContainer *data, QGraphicsItem *parent) VisToolLineIntersectAxis::VisToolLineIntersectAxis(const VContainer *data, QGraphicsItem *parent)

View File

@ -27,8 +27,8 @@
*************************************************************************/ *************************************************************************/
#include "vistoolnormal.h" #include "vistoolnormal.h"
#include "../../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
#include "../tools/drawTools/vtoolnormal.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolNormal::VisToolNormal(const VContainer *data, QGraphicsItem *parent) VisToolNormal::VisToolNormal(const VContainer *data, QGraphicsItem *parent)

View File

@ -27,10 +27,10 @@
*************************************************************************/ *************************************************************************/
#include "vistoolpointfromarcandtangent.h" #include "vistoolpointfromarcandtangent.h"
#include "../../vpatterndb/vcontainer.h" #include "../vpatterndb/vcontainer.h"
#include "../tools/drawTools/vtoolpointfromarcandtangent.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.h"
#include "../../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
#include "../../vgeometry/varc.h" #include "../vgeometry/varc.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolPointFromArcAndTangent::VisToolPointFromArcAndTangent(const VContainer *data, QGraphicsItem *parent) VisToolPointFromArcAndTangent::VisToolPointFromArcAndTangent(const VContainer *data, QGraphicsItem *parent)

View File

@ -27,9 +27,9 @@
*************************************************************************/ *************************************************************************/
#include "vistoolpointfromcircleandtangent.h" #include "vistoolpointfromcircleandtangent.h"
#include "../../vpatterndb/vcontainer.h" #include "../vpatterndb/vcontainer.h"
#include "../tools/drawTools/vtoolpointfromcircleandtangent.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.h"
#include "../../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolPointFromCircleAndTangent::VisToolPointFromCircleAndTangent(const VContainer *data, QGraphicsItem *parent) VisToolPointFromCircleAndTangent::VisToolPointFromCircleAndTangent(const VContainer *data, QGraphicsItem *parent)

View File

@ -27,8 +27,8 @@
*************************************************************************/ *************************************************************************/
#include "vistoolpointofcontact.h" #include "vistoolpointofcontact.h"
#include "../../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
#include "../tools/drawTools/vtoolpointofcontact.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolPointOfContact::VisToolPointOfContact(const VContainer *data, QGraphicsItem *parent) VisToolPointOfContact::VisToolPointOfContact(const VContainer *data, QGraphicsItem *parent)

View File

@ -27,9 +27,9 @@
*************************************************************************/ *************************************************************************/
#include "vistoolpointofintersectionarcs.h" #include "vistoolpointofintersectionarcs.h"
#include "../../vgeometry/varc.h" #include "../vgeometry/varc.h"
#include "../../vpatterndb/vcontainer.h" #include "../vpatterndb/vcontainer.h"
#include "../tools/drawTools/vtoolpointofintersectionarcs.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolPointOfIntersectionArcs::VisToolPointOfIntersectionArcs(const VContainer *data, QGraphicsItem *parent) VisToolPointOfIntersectionArcs::VisToolPointOfIntersectionArcs(const VContainer *data, QGraphicsItem *parent)

View File

@ -27,9 +27,9 @@
*************************************************************************/ *************************************************************************/
#include "vistoolpointofintersectioncircles.h" #include "vistoolpointofintersectioncircles.h"
#include "../../vpatterndb/vcontainer.h" #include "../vpatterndb/vcontainer.h"
#include "../tools/drawTools/vtoolpointofintersectioncircles.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.h"
#include "../../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolPointOfIntersectionCircles::VisToolPointOfIntersectionCircles(const VContainer *data, QGraphicsItem *parent) VisToolPointOfIntersectionCircles::VisToolPointOfIntersectionCircles(const VContainer *data, QGraphicsItem *parent)

View File

@ -27,8 +27,8 @@
*************************************************************************/ *************************************************************************/
#include "vistoolshoulderpoint.h" #include "vistoolshoulderpoint.h"
#include "../tools/drawTools/vtoolshoulderpoint.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.h"
#include "../../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VisToolShoulderPoint::VisToolShoulderPoint(const VContainer *data, QGraphicsItem *parent) VisToolShoulderPoint::VisToolShoulderPoint(const VContainer *data, QGraphicsItem *parent)

View File

@ -29,7 +29,7 @@
#include "vistooltriangle.h" #include "vistooltriangle.h"
#include "../../vgeometry/vpointf.h" #include "../../vgeometry/vpointf.h"
#include "../../vpatterndb/vcontainer.h" #include "../../vpatterndb/vcontainer.h"
#include "../tools/drawTools/vtooltriangle.h" #include "../tools/drawTools/toolpoint/toolsinglepoint/vtooltriangle.h"
#include <QtCore/qmath.h> #include <QtCore/qmath.h>
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------