Documentation for VAbstractTool class.

--HG--
branch : develop
This commit is contained in:
dismine 2014-01-24 14:54:29 +02:00
parent 3ab1509bb9
commit ccb5f38537
32 changed files with 235 additions and 330 deletions

View File

@ -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
*/

View File

@ -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<DialogAlongLine> &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();
/**

View File

@ -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<DialogArc> &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
*/

View File

@ -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<DialogBisector> &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();
/**

View File

@ -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);
/**

View File

@ -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<DialogCutSpline> &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);
/**

View File

@ -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<DialogCutSplinePath> &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);
/**

View File

@ -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<DialogEndLine> &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();
/**

View File

@ -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<DialogHeight> &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();
/**

View File

@ -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<DialogLine> &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
*/

View File

@ -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<DialogLineIntersect> &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();
/**

View File

@ -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,

View File

@ -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<DialogNormal> &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();
/**

View File

@ -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
*/

View File

@ -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 &center,
@ -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<DialogPointOfContact> &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();
/**

View File

@ -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<DialogPointOfIntersection> &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();
/**

View File

@ -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<DialogShoulderPoint> &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();
/**

View File

@ -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();
/**

View File

@ -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<DialogSpline> &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
*/

View File

@ -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<DialogSplinePath> &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
*/

View File

@ -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<DialogTriangle> &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();
/**

View File

@ -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);

View File

@ -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:

View File

@ -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();
/**

View File

@ -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:

View File

@ -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:

View File

@ -170,9 +170,13 @@ qint32 VAbstractTool::LineIntersectCircle(const QPointF &center, 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 )

View File

@ -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 &center, 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 <typename T>
/**
* @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)
{

View File

@ -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(){}

View File

@ -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<DialogDetail> &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 ();
/**

View File

@ -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<DialogUnionDetails> &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:

View File

@ -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();
/**