Refactoring.
--HG-- branch : develop
This commit is contained in:
parent
605b299f15
commit
9a898a7c99
|
@ -57,17 +57,6 @@ VToolAlongLine::VToolAlongLine(VPattern *doc, VContainer *data, quint32 id, cons
|
|||
ToolCreation(typeCreation);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolAlongLine::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief SetFactor set current scale factor of scene.
|
||||
|
|
|
@ -57,7 +57,6 @@ public:
|
|||
void SetSecondPointId(const quint32 &value);
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void SetFactor(qreal factor);
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -212,27 +212,6 @@ VToolBisector* VToolBisector::Create(const quint32 _id, QString &formula, const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolBisector::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
|
||||
if (vis != nullptr)
|
||||
{
|
||||
VisToolBisector *visual = qobject_cast<VisToolBisector *>(vis);
|
||||
visual->setPoint1Id(firstPointId);
|
||||
visual->setPoint2Id(basePointId);
|
||||
visual->setPoint3Id(thirdPointId);
|
||||
visual->setLength(qApp->FormulaToUser(formulaLength));
|
||||
visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
||||
visual->RefreshGeometry();
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief SetFactor set current scale factor of scene.
|
||||
|
|
|
@ -64,7 +64,6 @@ public:
|
|||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void SetFactor(qreal factor);
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -218,23 +218,6 @@ void VToolCurveIntersectAxis::ShowVisualization(bool show)
|
|||
ShowToolVisualization<VisToolCurveIntersectAxis>(show);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolCurveIntersectAxis::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
|
||||
if (vis != nullptr)
|
||||
{
|
||||
VisToolCurveIntersectAxis *visual = qobject_cast<VisToolCurveIntersectAxis *>(vis);
|
||||
visual->setPoint1Id(curveId);
|
||||
visual->setAxisPointId(basePointId);
|
||||
visual->SetAngle(qApp->FormulaToUser(formulaAngle));
|
||||
visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
||||
visual->RefreshGeometry();
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolCurveIntersectAxis::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||
{
|
||||
|
|
|
@ -62,8 +62,6 @@ public:
|
|||
void setCurveId(const quint32 &value);
|
||||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
virtual void SaveDialog(QDomElement &domElement);
|
||||
|
|
|
@ -81,6 +81,17 @@ void VToolCut::DetailsMode(bool mode)
|
|||
detailsMode = mode;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolCut::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
// cppcheck-suppress unusedFunction
|
||||
quint32 VToolCut::getCurveCutId() const
|
||||
|
|
|
@ -55,6 +55,7 @@ public slots:
|
|||
void HoverPath(quint32 id, SimpleCurvePoint curvePosition, PathDirection direction);
|
||||
virtual void Disable(bool disable, const QString &namePP);
|
||||
void DetailsMode(bool mode);
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
/** @brief formula keep formula of length */
|
||||
QString formula;
|
||||
|
|
|
@ -183,17 +183,6 @@ void VToolCutArc::ShowVisualization(bool show)
|
|||
ShowToolVisualization<VisToolCutArc>(show);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolCutArc::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief CurveChoosed send signal about selection from cutted arc.
|
||||
|
|
|
@ -52,7 +52,6 @@ public:
|
|||
enum { Type = UserType + static_cast<int>(Tool::CutArc)};
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void CurveChoosed(quint32 id);
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -192,17 +192,6 @@ void VToolCutSpline::ShowVisualization(bool show)
|
|||
ShowToolVisualization<VisToolCutSpline>(show);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolCutSpline::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief CurveChoosed send signal about selection from spline.
|
||||
|
|
|
@ -54,7 +54,6 @@ public:
|
|||
enum { Type = UserType + static_cast<int>(Tool::CutSpline)};
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void CurveChoosed(quint32 id);
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -236,17 +236,6 @@ void VToolCutSplinePath::ShowVisualization(bool show)
|
|||
ShowToolVisualization<VisToolCutSplinePath>(show);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolCutSplinePath::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief CurveChoosed send signal about selection splinePath.
|
||||
|
|
|
@ -55,7 +55,6 @@ public:
|
|||
enum { Type = UserType + static_cast<int>(Tool::CutSplinePath)};
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void CurveChoosed(quint32 id);
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -174,17 +174,6 @@ VToolEndLine* VToolEndLine::Create(const quint32 _id, const QString &pointName,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolEndLine::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief contextMenuEvent handle context menu events.
|
||||
|
|
|
@ -57,8 +57,6 @@ public:
|
|||
VFormula GetFormulaAngle() const;
|
||||
void SetFormulaAngle(const VFormula &value);
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
virtual void SaveDialog(QDomElement &domElement);
|
||||
|
|
|
@ -182,17 +182,6 @@ QPointF VToolHeight::FindPoint(const QLineF &line, const QPointF &point)
|
|||
return VGObject::ClosestPoint(line, point);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolHeight::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief contextMenuEvent handle context menu events.
|
||||
|
|
|
@ -60,8 +60,6 @@ public:
|
|||
void SetP2LineId(const quint32 &value);
|
||||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
virtual void SaveDialog(QDomElement &domElement);
|
||||
|
|
|
@ -180,17 +180,6 @@ VToolLineIntersect* VToolLineIntersect::Create(const quint32 _id, const quint32
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolLineIntersect::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshPointGeometry(*VAbstractTool::data.GeometricObject<VPointF>(id));
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief SetFactor set current scale factor of scene.
|
||||
|
|
|
@ -65,7 +65,6 @@ public:
|
|||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void SetFactor(qreal factor);
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -230,14 +230,6 @@ void VToolLineIntersectAxis::ShowVisualization(bool show)
|
|||
ShowToolVisualization<VisToolLineIntersectAxis>(show);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolLineIntersectAxis::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolLineIntersectAxis::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||
{
|
||||
|
|
|
@ -66,8 +66,6 @@ public:
|
|||
void SetSecondPointId(const quint32 &value);
|
||||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
virtual void SaveDialog(QDomElement &domElement);
|
||||
|
|
|
@ -116,6 +116,17 @@ void VToolLinePoint::Disable(bool disable, const QString &namePP)
|
|||
mainLine->setEnabled(enabled);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolLinePoint::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
qreal VToolLinePoint::GetAngle() const
|
||||
{
|
||||
|
|
|
@ -57,6 +57,7 @@ public:
|
|||
public slots:
|
||||
virtual void SetFactor(qreal factor);
|
||||
virtual void Disable(bool disable, const QString &namePP);
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
/** @brief formula string with length formula. */
|
||||
QString formulaLength;
|
||||
|
|
|
@ -190,17 +190,6 @@ QPointF VToolNormal::FindPoint(const QPointF &firstPoint, const QPointF &secondP
|
|||
return normal.p2();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolNormal::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief SetFactor set current scale factor of scene.
|
||||
|
|
|
@ -59,7 +59,6 @@ public:
|
|||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void SetFactor(qreal factor);
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -188,6 +188,17 @@ void VToolPoint::PointChoosed()
|
|||
emit ChoosedTool(id, SceneObject::Point);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolPoint::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshPointGeometry(*VAbstractTool::data.GeometricObject<VPointF>(id));
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief mouseReleaseEvent handle mouse release events.
|
||||
|
|
|
@ -59,6 +59,7 @@ public slots:
|
|||
void DeleteFromLabel();
|
||||
virtual void EnableToolMove(bool move);
|
||||
void PointChoosed();
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
/** @brief radius radius circle. */
|
||||
qreal radius;
|
||||
|
|
|
@ -233,17 +233,6 @@ VToolPointOfContact* VToolPointOfContact::Create(const quint32 _id, QString &rad
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolPointOfContact::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshPointGeometry(*VAbstractTool::data.GeometricObject<VPointF>(id));
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief SetFactor set current scale factor of scene.
|
||||
|
|
|
@ -70,7 +70,6 @@ public:
|
|||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void SetFactor(qreal factor);
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -152,17 +152,6 @@ VToolPointOfIntersection *VToolPointOfIntersection::Create(const quint32 _id, co
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolPointOfIntersection::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
VToolPoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject<VPointF>(id));
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief RemoveReferens decrement value of reference.
|
||||
|
|
|
@ -59,8 +59,6 @@ public:
|
|||
void SetSecondPointId(const quint32 &value);
|
||||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
virtual void RemoveReferens();
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -209,14 +209,6 @@ void VToolPointOfIntersectionArcs::ShowVisualization(bool show)
|
|||
ShowToolVisualization<VisToolPointOfIntersectionArcs>(show);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolPointOfIntersectionArcs::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
VToolPoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject<VPointF>(id));
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolPointOfIntersectionArcs::RemoveReferens()
|
||||
{
|
||||
|
|
|
@ -65,8 +65,6 @@ public:
|
|||
void SetCrossArcsPoint(CrossArcsPoint &value);
|
||||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
virtual void RemoveReferens();
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -216,17 +216,6 @@ VToolShoulderPoint* VToolShoulderPoint::Create(const quint32 _id, QString &formu
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolShoulderPoint::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
RefreshGeometry();
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief SetFactor set current scale factor of scene.
|
||||
|
|
|
@ -63,7 +63,6 @@ public:
|
|||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void SetFactor(qreal factor);
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
|
@ -207,17 +207,6 @@ QPointF VToolTriangle::FindPoint(const QPointF &axisP1, const QPointF &axisP2, c
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
*/
|
||||
void VToolTriangle::FullUpdateFromFile()
|
||||
{
|
||||
ReadAttributes();
|
||||
VToolPoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject<VPointF>(id));
|
||||
SetVisualization();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief RemoveReferens decrement value of reference.
|
||||
|
|
|
@ -67,8 +67,6 @@ public:
|
|||
void SetSecondPointId(const quint32 &value);
|
||||
|
||||
virtual void ShowVisualization(bool show);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
virtual void RemoveReferens();
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
|
|
Loading…
Reference in New Issue
Block a user