From ccb5f38537f9951ba2ef1e64210d111d95102e16 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 24 Jan 2014 14:54:29 +0200 Subject: [PATCH] Documentation for VAbstractTool class. --HG-- branch : develop --- src/tools/drawTools/vdrawtool.h | 10 +- src/tools/drawTools/vtoolalongline.h | 12 +- src/tools/drawTools/vtoolarc.h | 14 +- src/tools/drawTools/vtoolbisector.h | 12 +- src/tools/drawTools/vtoolcutarc.h | 4 +- src/tools/drawTools/vtoolcutspline.h | 14 +- src/tools/drawTools/vtoolcutsplinepath.h | 8 +- src/tools/drawTools/vtoolendline.h | 12 +- src/tools/drawTools/vtoolheight.h | 12 +- src/tools/drawTools/vtoolline.h | 14 +- src/tools/drawTools/vtoollineintersect.h | 12 +- src/tools/drawTools/vtoollinepoint.h | 6 +- src/tools/drawTools/vtoolnormal.h | 12 +- src/tools/drawTools/vtoolpoint.h | 8 +- src/tools/drawTools/vtoolpointofcontact.h | 12 +- .../drawTools/vtoolpointofintersection.h | 12 +- src/tools/drawTools/vtoolshoulderpoint.h | 12 +- src/tools/drawTools/vtoolsinglepoint.h | 8 +- src/tools/drawTools/vtoolspline.h | 14 +- src/tools/drawTools/vtoolsplinepath.h | 14 +- src/tools/drawTools/vtooltriangle.h | 12 +- src/tools/nodeDetails/vabstractnode.h | 8 +- src/tools/nodeDetails/vnodearc.h | 16 +- src/tools/nodeDetails/vnodepoint.h | 16 +- src/tools/nodeDetails/vnodespline.h | 16 +- src/tools/nodeDetails/vnodesplinepath.h | 16 +- src/tools/vabstracttool.cpp | 6 +- src/tools/vabstracttool.h | 219 +++++------------- src/tools/vdatatool.h | 4 +- src/tools/vtooldetail.h | 14 +- src/tools/vtooluniondetails.h | 6 +- src/xml/vdomdocument.h | 10 +- 32 files changed, 235 insertions(+), 330 deletions(-) diff --git a/src/tools/drawTools/vdrawtool.h b/src/tools/drawTools/vdrawtool.h index 78edf29e5..b2a0780a7 100644 --- a/src/tools/drawTools/vdrawtool.h +++ b/src/tools/drawTools/vdrawtool.h @@ -44,9 +44,9 @@ public: /** * @brief VDrawTool * @param doc dom document container - * @param data - * @param id - * @param parent + * @param data container with variables + * @param id object id in container + * @param parent parent object */ VDrawTool(VDomDocument *doc, VContainer *data, qint64 id); virtual ~VDrawTool() {} @@ -62,7 +62,7 @@ public: public slots: /** * @brief ShowTool - * @param id + * @param id object id in container * @param color * @param enable */ @@ -170,7 +170,7 @@ protected: /** * @brief ShowItem * @param item - * @param id + * @param id object id in container * @param color * @param enable */ diff --git a/src/tools/drawTools/vtoolalongline.h b/src/tools/drawTools/vtoolalongline.h index 171fa4e99..0bb47008d 100644 --- a/src/tools/drawTools/vtoolalongline.h +++ b/src/tools/drawTools/vtoolalongline.h @@ -42,14 +42,14 @@ public: /** * @brief VToolAlongLine * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param formula * @param firstPointId * @param secondPointId * @param typeLine * @param typeCreation - * @param parent + * @param parent parent object */ VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, @@ -63,7 +63,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -79,7 +79,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -93,7 +93,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/drawTools/vtoolarc.h b/src/tools/drawTools/vtoolarc.h index 24f56ecab..f33f2a6d9 100644 --- a/src/tools/drawTools/vtoolarc.h +++ b/src/tools/drawTools/vtoolarc.h @@ -44,10 +44,10 @@ public: /** * @brief VToolArc * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeCreation - * @param parent + * @param parent parent object */ VToolArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); @@ -60,7 +60,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -73,7 +73,7 @@ public: * @param f2 * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -90,7 +90,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** @@ -105,7 +105,7 @@ public slots: virtual void ChangedActivDraw(const QString &newName); /** * @brief ShowTool - * @param id + * @param id object id in container * @param color * @param enable */ diff --git a/src/tools/drawTools/vtoolbisector.h b/src/tools/drawTools/vtoolbisector.h index 3e9ea92c5..433833b01 100644 --- a/src/tools/drawTools/vtoolbisector.h +++ b/src/tools/drawTools/vtoolbisector.h @@ -41,15 +41,15 @@ public: /** * @brief VToolBisector * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeLine * @param formula * @param firstPointId * @param secondPointId * @param thirdPointId * @param typeCreation - * @param parent + * @param parent parent object */ VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, @@ -74,7 +74,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -91,7 +91,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -106,7 +106,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/drawTools/vtoolcutarc.h b/src/tools/drawTools/vtoolcutarc.h index d4b90cc16..9534d61a9 100644 --- a/src/tools/drawTools/vtoolcutarc.h +++ b/src/tools/drawTools/vtoolcutarc.h @@ -56,7 +56,7 @@ public: static const QString AttrArc; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** @@ -66,7 +66,7 @@ public slots: virtual void FullUpdateFromGui(int result); /** * @brief ArcChoosed - * @param id + * @param id object id in container */ void ArcChoosed(qint64 id); /** diff --git a/src/tools/drawTools/vtoolcutspline.h b/src/tools/drawTools/vtoolcutspline.h index 428d91461..4ad4ada67 100644 --- a/src/tools/drawTools/vtoolcutspline.h +++ b/src/tools/drawTools/vtoolcutspline.h @@ -43,12 +43,12 @@ public: /** * @brief VToolCutSpline * @param doc - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param formula * @param splineId * @param typeCreation - * @param parent + * @param parent parent object */ VToolCutSpline(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &formula, const qint64 &splineId, const qint64 &spl1id, const qint64 &spl2id, @@ -62,7 +62,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -76,7 +76,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -91,7 +91,7 @@ public: static const QString AttrSpline; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** @@ -101,7 +101,7 @@ public slots: virtual void FullUpdateFromGui(int result); /** * @brief SplineChoosed - * @param id + * @param id object id in container */ void SplineChoosed(qint64 id); /** diff --git a/src/tools/drawTools/vtoolcutsplinepath.h b/src/tools/drawTools/vtoolcutsplinepath.h index afb32a115..22d81d97a 100644 --- a/src/tools/drawTools/vtoolcutsplinepath.h +++ b/src/tools/drawTools/vtoolcutsplinepath.h @@ -52,7 +52,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -66,7 +66,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -81,7 +81,7 @@ public: static const QString AttrSplinePath; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** @@ -91,7 +91,7 @@ public slots: virtual void FullUpdateFromGui(int result); /** * @brief SplineChoosed - * @param id + * @param id object id in container */ void SplineChoosed(qint64 id); /** diff --git a/src/tools/drawTools/vtoolendline.h b/src/tools/drawTools/vtoolendline.h index eca302231..a95a1a27f 100644 --- a/src/tools/drawTools/vtoolendline.h +++ b/src/tools/drawTools/vtoolendline.h @@ -42,14 +42,14 @@ public: /** * @brief VToolEndLine * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeLine * @param formula * @param angle * @param basePointId * @param typeCreation - * @param parent + * @param parent parent object */ VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, @@ -63,7 +63,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -79,7 +79,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -93,7 +93,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/drawTools/vtoolheight.h b/src/tools/drawTools/vtoolheight.h index b6bf93ad8..45555989d 100644 --- a/src/tools/drawTools/vtoolheight.h +++ b/src/tools/drawTools/vtoolheight.h @@ -42,14 +42,14 @@ public: /** * @brief VToolHeight * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeLine * @param basePointId * @param p1LineId * @param p2LineId * @param typeCreation - * @param parent + * @param parent parent object */ VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, @@ -63,7 +63,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -79,7 +79,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -100,7 +100,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/drawTools/vtoolline.h b/src/tools/drawTools/vtoolline.h index 700a15a44..4ad3f9894 100644 --- a/src/tools/drawTools/vtoolline.h +++ b/src/tools/drawTools/vtoolline.h @@ -43,12 +43,12 @@ public: /** * @brief VToolLine * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param firstPoint * @param secondPoint * @param typeCreation - * @param parent + * @param parent parent object */ VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); @@ -61,7 +61,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -72,7 +72,7 @@ public: * @param secondPoint * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -85,7 +85,7 @@ public: static const QString TagName; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** @@ -100,7 +100,7 @@ public slots: virtual void FullUpdateFromGui(int result); /** * @brief ShowTool - * @param id + * @param id object id in container * @param color * @param enable */ diff --git a/src/tools/drawTools/vtoollineintersect.h b/src/tools/drawTools/vtoollineintersect.h index 2bef1c257..07a4fbaff 100644 --- a/src/tools/drawTools/vtoollineintersect.h +++ b/src/tools/drawTools/vtoollineintersect.h @@ -42,14 +42,14 @@ public: /** * @brief VToolLineIntersect * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param p1Line1 * @param p2Line1 * @param p1Line2 * @param p2Line2 * @param typeCreation - * @param parent + * @param parent parent object */ VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2, @@ -63,7 +63,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -79,7 +79,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -93,7 +93,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/drawTools/vtoollinepoint.h b/src/tools/drawTools/vtoollinepoint.h index 0cfcfb093..29b3a035c 100644 --- a/src/tools/drawTools/vtoollinepoint.h +++ b/src/tools/drawTools/vtoollinepoint.h @@ -41,13 +41,13 @@ public: /** * @brief VToolLinePoint * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeLine * @param formula * @param basePointId * @param angle - * @param parent + * @param parent parent object */ VToolLinePoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &basePointId, const qreal &angle, diff --git a/src/tools/drawTools/vtoolnormal.h b/src/tools/drawTools/vtoolnormal.h index b9d45655c..533e52411 100644 --- a/src/tools/drawTools/vtoolnormal.h +++ b/src/tools/drawTools/vtoolnormal.h @@ -42,15 +42,15 @@ public: /** * @brief VToolNormal * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeLine * @param formula * @param angle * @param firstPointId * @param secondPointId * @param typeCreation - * @param parent + * @param parent parent object */ VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, @@ -65,7 +65,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -82,7 +82,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -107,7 +107,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/drawTools/vtoolpoint.h b/src/tools/drawTools/vtoolpoint.h index 73d60d995..cfdda24fd 100644 --- a/src/tools/drawTools/vtoolpoint.h +++ b/src/tools/drawTools/vtoolpoint.h @@ -42,9 +42,9 @@ public: /** * @brief VToolPoint * @param doc dom document container - * @param data - * @param id - * @param parent + * @param data container with variables + * @param id object id in container + * @param parent parent object */ VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0); virtual ~VToolPoint(){} @@ -70,7 +70,7 @@ public slots: virtual void FullUpdateFromGui(int result) = 0; /** * @brief ShowTool - * @param id + * @param id object id in container * @param color * @param enable */ diff --git a/src/tools/drawTools/vtoolpointofcontact.h b/src/tools/drawTools/vtoolpointofcontact.h index c853830cc..dc2470d0c 100644 --- a/src/tools/drawTools/vtoolpointofcontact.h +++ b/src/tools/drawTools/vtoolpointofcontact.h @@ -41,14 +41,14 @@ public: /** * @brief VToolPointOfContact * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param radius * @param center * @param firstPointId * @param secondPointId * @param typeCreation - * @param parent + * @param parent parent object */ VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, @@ -73,7 +73,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -89,7 +89,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -103,7 +103,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/drawTools/vtoolpointofintersection.h b/src/tools/drawTools/vtoolpointofintersection.h index ec2057b0f..6c5de70ab 100644 --- a/src/tools/drawTools/vtoolpointofintersection.h +++ b/src/tools/drawTools/vtoolpointofintersection.h @@ -42,12 +42,12 @@ public: /** * @brief VToolPointOfIntersection * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param firstPointId * @param secondPointId * @param typeCreation - * @param parent + * @param parent parent object */ VToolPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &firstPointId, const qint64 &secondPointId, @@ -61,7 +61,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -75,7 +75,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -89,7 +89,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/drawTools/vtoolshoulderpoint.h b/src/tools/drawTools/vtoolshoulderpoint.h index b3356a41b..b16653e37 100644 --- a/src/tools/drawTools/vtoolshoulderpoint.h +++ b/src/tools/drawTools/vtoolshoulderpoint.h @@ -41,15 +41,15 @@ public: /** * @brief VToolShoulderPoint * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeLine * @param formula * @param p1Line * @param p2Line * @param pShoulder * @param typeCreation - * @param parent + * @param parent parent object */ VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, @@ -74,7 +74,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -91,7 +91,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -105,7 +105,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/drawTools/vtoolsinglepoint.h b/src/tools/drawTools/vtoolsinglepoint.h index 6ba3a0163..a4d5713c2 100644 --- a/src/tools/drawTools/vtoolsinglepoint.h +++ b/src/tools/drawTools/vtoolsinglepoint.h @@ -42,10 +42,10 @@ public: /** * @brief VToolSinglePoint * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeCreation - * @param parent + * @param parent parent object */ VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); @@ -59,7 +59,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/drawTools/vtoolspline.h b/src/tools/drawTools/vtoolspline.h index 5fdbabc68..a985cd237 100644 --- a/src/tools/drawTools/vtoolspline.h +++ b/src/tools/drawTools/vtoolspline.h @@ -45,10 +45,10 @@ public: /** * @brief VToolSpline * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeCreation - * @param parent + * @param parent parent object */ VToolSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); @@ -61,7 +61,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -77,7 +77,7 @@ public: * @param kCurve * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -110,7 +110,7 @@ signals: void setEnabledPoint ( bool enable ); public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile (); /** @@ -133,7 +133,7 @@ public slots: virtual void ChangedActivDraw ( const QString &newName ); /** * @brief ShowTool - * @param id + * @param id object id in container * @param color * @param enable */ diff --git a/src/tools/drawTools/vtoolsplinepath.h b/src/tools/drawTools/vtoolsplinepath.h index 053a5a32e..4ada0d908 100644 --- a/src/tools/drawTools/vtoolsplinepath.h +++ b/src/tools/drawTools/vtoolsplinepath.h @@ -44,10 +44,10 @@ public: /** * @brief VToolSplinePath * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeCreation - * @param parent + * @param parent parent object */ VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); @@ -60,7 +60,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -70,7 +70,7 @@ public: * @param path * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -102,7 +102,7 @@ signals: void setEnabledPoint(bool enable); public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** @@ -125,7 +125,7 @@ public slots: virtual void ChangedActivDraw(const QString &newName); /** * @brief ShowTool - * @param id + * @param id object id in container * @param color * @param enable */ diff --git a/src/tools/drawTools/vtooltriangle.h b/src/tools/drawTools/vtooltriangle.h index 27767370f..b2ff4b154 100644 --- a/src/tools/drawTools/vtooltriangle.h +++ b/src/tools/drawTools/vtooltriangle.h @@ -42,14 +42,14 @@ public: /** * @brief VToolTriangle * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param axisP1Id * @param axisP2Id * @param firstPointId * @param secondPointId * @param typeCreation - * @param parent + * @param parent parent object */ VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, @@ -63,7 +63,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -79,7 +79,7 @@ public: * @param my * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -103,7 +103,7 @@ public: static const QString ToolType; public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/nodeDetails/vabstractnode.h b/src/tools/nodeDetails/vabstractnode.h index 8d1de516d..89c0e6409 100644 --- a/src/tools/nodeDetails/vabstractnode.h +++ b/src/tools/nodeDetails/vabstractnode.h @@ -41,10 +41,10 @@ public: /** * @brief VAbstractNode * @param doc dom document container - * @param data - * @param id - * @param idNode - * @param parent + * @param data container with variables + * @param id object id in container + * @param id object id in containerNode + * @param parent parent object */ VAbstractNode(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &idNode, const qint64 &idTool, QObject *parent = 0); diff --git a/src/tools/nodeDetails/vnodearc.h b/src/tools/nodeDetails/vnodearc.h index 787025a96..0f51ae6f1 100644 --- a/src/tools/nodeDetails/vnodearc.h +++ b/src/tools/nodeDetails/vnodearc.h @@ -42,11 +42,11 @@ public: /** * @brief VNodeArc * @param doc dom document container - * @param data - * @param id - * @param idArc + * @param data container with variables + * @param id object id in container + * @param id object id in containerArc * @param typeCreation - * @param parent + * @param parent parent object */ VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, const Tool::Sources &typeCreation, const qint64 &idTool = 0, QObject *qoParent = 0, @@ -54,9 +54,9 @@ public: /** * @brief Create * @param doc dom document container - * @param data - * @param id - * @param idArc + * @param data container with variables + * @param id object id in container + * @param id object id in containerArc * @param parse * @param typeCreation */ @@ -73,7 +73,7 @@ public: virtual void DeleteNode(); public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); protected: diff --git a/src/tools/nodeDetails/vnodepoint.h b/src/tools/nodeDetails/vnodepoint.h index ac40a57e1..b393c6dab 100644 --- a/src/tools/nodeDetails/vnodepoint.h +++ b/src/tools/nodeDetails/vnodepoint.h @@ -42,11 +42,11 @@ public: /** * @brief VNodePoint * @param doc dom document container - * @param data - * @param id - * @param idPoint + * @param data container with variables + * @param id object id in container + * @param id object id in containerPoint * @param typeCreation - * @param parent + * @param parent parent object */ VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, const Tool::Sources &typeCreation, const qint64 &idTool = 0, QObject *qoParent = 0, @@ -54,9 +54,9 @@ public: /** * @brief Create * @param doc dom document container - * @param data - * @param id - * @param idPoint + * @param data container with variables + * @param id object id in container + * @param id object id in containerPoint * @param parse * @param typeCreation */ @@ -74,7 +74,7 @@ public: virtual void DeleteNode(); public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); /** diff --git a/src/tools/nodeDetails/vnodespline.h b/src/tools/nodeDetails/vnodespline.h index eb62f8dcd..d7fdae7de 100644 --- a/src/tools/nodeDetails/vnodespline.h +++ b/src/tools/nodeDetails/vnodespline.h @@ -42,11 +42,11 @@ public: /** * @brief VNodeSpline * @param doc dom document container - * @param data - * @param id - * @param idSpline + * @param data container with variables + * @param id object id in container + * @param id object id in containerSpline * @param typeCreation - * @param parent + * @param parent parent object */ VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, const Tool::Sources &typeCreation, const qint64 &idTool = 0, QObject *qoParent = 0, @@ -54,9 +54,9 @@ public: /** * @brief Create * @param doc dom document container - * @param data - * @param id - * @param idSpline + * @param data container with variables + * @param id object id in container + * @param id object id in containerSpline * @param parse * @param typeCreation * @return @@ -75,7 +75,7 @@ public: virtual void DeleteNode(); public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile (); protected: diff --git a/src/tools/nodeDetails/vnodesplinepath.h b/src/tools/nodeDetails/vnodesplinepath.h index 854b7185b..48615000a 100644 --- a/src/tools/nodeDetails/vnodesplinepath.h +++ b/src/tools/nodeDetails/vnodesplinepath.h @@ -42,11 +42,11 @@ public: /** * @brief VNodeSplinePath * @param doc dom document container - * @param data - * @param id - * @param idSpline + * @param data container with variables + * @param id object id in container + * @param id object id in containerSpline * @param typeCreation - * @param parent + * @param parent parent object */ VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, const Tool::Sources &typeCreation, const qint64 &idTool = 0, QObject *qoParent = 0, @@ -54,9 +54,9 @@ public: /** * @brief Create * @param doc dom document container - * @param data - * @param id - * @param idSpline + * @param data container with variables + * @param id object id in container + * @param id object id in containerSpline * @param parse * @param typeCreation */ @@ -74,7 +74,7 @@ public: virtual void DeleteNode(); public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile(); protected: diff --git a/src/tools/vabstracttool.cpp b/src/tools/vabstracttool.cpp index 1c342b46c..3b4d41b43 100644 --- a/src/tools/vabstracttool.cpp +++ b/src/tools/vabstracttool.cpp @@ -170,9 +170,13 @@ qint32 VAbstractTool::LineIntersectCircle(const QPointF ¢er, qreal radius, c QPointF VAbstractTool::ClosestPoint(const QLineF &line, const QPointF &p) { QLineF lineP2pointFrom = QLineF(line.p2(), p); - qreal angle = 180-line.angleTo(lineP2pointFrom)-90; + //right triangle always have one angle with 90 degree + //Now we want find angle between projection and line from p. + qreal angle = 180-(line.angleTo(lineP2pointFrom)-90); + //Swap first and last points line. Need for rotation. QLineF pointFromlineP2 = QLineF(p, line.p2()); pointFromlineP2.setAngle(pointFromlineP2.angle()+angle); + //After rotation we will have two intersect lines. Left just find intersect point. QPointF point; QLineF::IntersectType type = pointFromlineP2.intersect(line, &point); if ( type == QLineF::BoundedIntersection ) diff --git a/src/tools/vabstracttool.h b/src/tools/vabstracttool.h index 2db87e517..5d150fbdf 100644 --- a/src/tools/vabstracttool.h +++ b/src/tools/vabstracttool.h @@ -33,45 +33,50 @@ #include "../xml/vdomdocument.h" /** - * @brief The VAbstractTool class + * @brief The VAbstractTool abstract class for all tools. */ class VAbstractTool: public VDataTool { Q_OBJECT public: /** - * @brief VAbstractTool - * @param doc dom document container - * @param data - * @param id - * @param parent + * @brief VAbstractTool container. + * @param doc dom document container. + * @param data container with data. + * @param id object id in container. + * @param parent parent object. */ VAbstractTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); virtual ~VAbstractTool() {} + /** + * @brief NewSceneRect calculate scene rect what contains all items and doesn't less that size of scene view. + * @param sc scene. + * @param view view. + */ static void NewSceneRect(QGraphicsScene *sc, QGraphicsView *view); /** - * @brief LineIntersectRect - * @param rec - * @param line - * @return + * @brief LineIntersectRect find point intersection line and rect. + * @param rec rect. + * @param line line. + * @return point intersection. */ static QPointF LineIntersectRect(QRectF rec, QLineF line); /** - * @brief LineIntersectCircle - * @param center - * @param radius - * @param line - * @param p1 - * @param p2 - * @return + * @brief LineIntersectCircle find point intersection line and circle. + * @param center arc center. + * @param radius arc radius. + * @param line line + * @param p1 first intersection point. + * @param p2 second intersection point. + * @return 0 - intersection doesn't exist, 1 - one intersection point, 2 - two intersection points. */ static qint32 LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2); /** - * @brief ClosestPoint - * @param line - * @param p - * @return + * @brief ClosestPoint find point projection of point onto line. + * @param line line. + * @param p point. + * @return point on line or extended line if origin size too small. */ static QPointF ClosestPoint(const QLineF &line, const QPointF &p); /** @@ -84,187 +89,79 @@ public: */ static QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k); /** - * @brief getId - * @return + * @brief getId return object id. + * @return id. */ inline qint64 getId() const {return id;} /** - * @brief LineCoefficients - * @param line - * @param a - * @param b - * @param c + * @brief LineCoefficients coefficient for equation of segment. Segment equestion ax+by+c=0. + * @param line line + * @param a a value + * @param b b value + * @param c c value */ static void LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c); - /** - * @brief AttrId - */ static const QString AttrId; - /** - * @brief AttrType - */ static const QString AttrType; - /** - * @brief AttrMx - */ static const QString AttrMx; - /** - * @brief AttrMy - */ static const QString AttrMy; - /** - * @brief AttrName - */ static const QString AttrName; - /** - * @brief AttrX - */ static const QString AttrX; - /** - * @brief AttrY - */ static const QString AttrY; - /** - * @brief AttrTypeLine - */ static const QString AttrTypeLine; - /** - * @brief AttrLength - */ static const QString AttrLength; - /** - * @brief AttrBasePoint - */ static const QString AttrBasePoint; - /** - * @brief AttrFirstPoint - */ static const QString AttrFirstPoint; - /** - * @brief AttrSecondPoint - */ static const QString AttrSecondPoint; - /** - * @brief AttrThirdPoint - */ static const QString AttrThirdPoint; - /** - * @brief AttrCenter - */ static const QString AttrCenter; - /** - * @brief AttrRadius - */ static const QString AttrRadius; - /** - * @brief AttrAngle - */ static const QString AttrAngle; - /** - * @brief AttrAngle1 - */ static const QString AttrAngle1; - /** - * @brief AttrAngle2 - */ static const QString AttrAngle2; - /** - * @brief AttrP1Line - */ static const QString AttrP1Line; - /** - * @brief AttrP2Line - */ static const QString AttrP2Line; - /** - * @brief AttrP1Line1 - */ static const QString AttrP1Line1; - /** - * @brief AttrP2Line1 - */ static const QString AttrP2Line1; - /** - * @brief AttrP1Line2 - */ static const QString AttrP1Line2; - /** - * @brief AttrP2Line2 - */ static const QString AttrP2Line2; - /** - * @brief AttrPShoulder - */ static const QString AttrPShoulder; - /** - * @brief AttrPoint1 - */ static const QString AttrPoint1; - /** - * @brief AttrPoint4 - */ static const QString AttrPoint4; - /** - * @brief AttrKAsm1 - */ static const QString AttrKAsm1; - /** - * @brief AttrKAsm2 - */ static const QString AttrKAsm2; - /** - * @brief AttrKCurve - */ static const QString AttrKCurve; - /** - * @brief AttrPathPoint - */ static const QString AttrPathPoint; - /** - * @brief AttrPSpline - */ static const QString AttrPSpline; - /** - * @brief AttrAxisP1 - */ static const QString AttrAxisP1; - /** - * @brief AttrAxisP2 - */ static const QString AttrAxisP2; - /** - * @brief TypeLineNone - */ static const QString TypeLineNone; - /** - * @brief TypeLineLine - */ static const QString TypeLineLine; /** - * @brief AddRecord - * @param id - * @param toolType + * @brief AddRecord add record about tool in history. + * @param id object id in container + * @param toolType tool type * @param doc dom document container */ static void AddRecord(const qint64 id, const Tool::Tools &toolType, VDomDocument *doc); public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile()=0; signals: /** - * @brief toolhaveChange + * @brief toolhaveChange emit if tool create change that need save. */ void toolhaveChange(); /** - * @brief ChoosedTool - * @param id - * @param type + * @brief ChoosedTool emit if object was clicked. + * @param id object id in container. + * @param type type of scene object. */ void ChoosedTool(qint64 id, Scene::Scenes type); /** - * @brief FullUpdateTree + * @brief FullUpdateTree emit if need reparse pattern file. */ void FullUpdateTree(); protected: @@ -273,19 +170,19 @@ protected: */ VDomDocument *doc; /** - * @brief id + * @brief id object id. */ const qint64 id; /** - * @brief baseColor + * @brief baseColor base color for tool. */ Qt::GlobalColor baseColor; /** - * @brief currentColor + * @brief currentColor current tool color. */ Qt::GlobalColor currentColor; /** - * @brief AddToFile + * @brief AddToFile add tag with informations about tool into file. */ virtual void AddToFile()=0; /** @@ -293,26 +190,30 @@ protected: */ virtual void RefreshDataInFile()=0; /** - * @brief getData - * @return + * @brief getData return data container. + * @return container. */ inline const VContainer *getData() const {return &data;} /** - * @brief RemoveReferens + * @brief RemoveReferens decrement value of reference. */ virtual void RemoveReferens(){} /** - * @brief RemoveAllChild - * @param domElement + * @brief RemoveAllChild remove all child from file. + * @param domElement tag in xml tree. + */ + void RemoveAllChild(QDomElement &domElement); + /** + * @brief DeleteTool full delete object form scene and file. + * @param tool tool */ - void RemoveAllChild(QDomElement &domElement); virtual void DeleteTool(QGraphicsItem *tool); template /** - * @brief AddAttribute - * @param domElement - * @param name - * @param value + * @brief SetAttribute set attribute in pattern file. Replace "," by ".". + * @param domElement element in xml tree. + * @param name name of attribute. + * @param value value of attribute. */ void SetAttribute(QDomElement &domElement, const QString &name, const T &value) { diff --git a/src/tools/vdatatool.h b/src/tools/vdatatool.h index ed58e14db..4c6c6ed70 100644 --- a/src/tools/vdatatool.h +++ b/src/tools/vdatatool.h @@ -41,8 +41,8 @@ class VDataTool : public QObject public: /** * @brief VDataTool - * @param data - * @param parent + * @param data container with variables + * @param parent parent object */ VDataTool(VContainer *data, QObject *parent = 0); virtual ~VDataTool(){} diff --git a/src/tools/vtooldetail.h b/src/tools/vtooldetail.h index 927b80c7d..abc1843ce 100644 --- a/src/tools/vtooldetail.h +++ b/src/tools/vtooldetail.h @@ -43,11 +43,11 @@ public: /** * @brief VToolDetail * @param doc dom document container - * @param data - * @param id + * @param data container with variables + * @param id object id in container * @param typeCreation * @param scene - * @param parent + * @param parent parent object */ VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, const Tool::Sources &typeCreation, VMainGraphicsScene *scene, @@ -70,7 +70,7 @@ public: * @param dialog * @param scene * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -80,7 +80,7 @@ public: * @param newDetail * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -91,7 +91,7 @@ public: /** * @brief AddTool * @param tool - * @param id + * @param id object id in container * @param typeTool */ void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool) @@ -147,7 +147,7 @@ public: void Remove(); public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile (); /** diff --git a/src/tools/vtooluniondetails.h b/src/tools/vtooluniondetails.h index 4d5b8af37..b89c64d6f 100644 --- a/src/tools/vtooluniondetails.h +++ b/src/tools/vtooluniondetails.h @@ -44,7 +44,7 @@ public: * @brief Create * @param dialog * @param doc dom document container - * @param data + * @param data container with variables */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -54,7 +54,7 @@ public: * @param newDetail * @param scene * @param doc dom document container - * @param data + * @param data container with variables * @param parse * @param typeCreation */ @@ -87,7 +87,7 @@ public: const qreal angle); public slots: /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ virtual void FullUpdateFromFile (){} protected: diff --git a/src/xml/vdomdocument.h b/src/xml/vdomdocument.h index fefcbccec..c2ff3e1ad 100644 --- a/src/xml/vdomdocument.h +++ b/src/xml/vdomdocument.h @@ -62,7 +62,7 @@ class VDomDocument : public QObject, public QDomDocument public: /** * @brief VDomDocument - * @param data + * @param data container with variables * @param comboBoxDraws * @param mode */ @@ -70,7 +70,7 @@ public: /** * @brief VDomDocument * @param name - * @param data + * @param data container with variables * @param comboBoxDraws * @param mode */ @@ -79,7 +79,7 @@ public: /** * @brief VDomDocument * @param doc dom document containertype - * @param data + * @param data container with variables * @param comboBoxDraws * @param mode */ @@ -186,7 +186,7 @@ public: /** * @brief UpdateToolData * @param id - * @param data + * @param data container with variables */ void UpdateToolData(const qint64 &id, VContainer *data); /** @@ -239,7 +239,7 @@ signals: */ void ChangedNameDraw(const QString &oldName, const QString &newName); /** - * @brief FullUpdateFromFile + * @brief FullUpdateFromFile update tool data form file. */ void FullUpdateFromFile(); /**