Documentation for VToolDetail class.

--HG--
branch : develop
This commit is contained in:
dismine 2014-01-24 16:25:45 +02:00
parent b6311ed773
commit 9d49560e0d
26 changed files with 183 additions and 217 deletions

View File

@ -51,7 +51,7 @@ public:
VDrawTool(VDomDocument *doc, VContainer *data, qint64 id);
virtual ~VDrawTool() {}
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog() {}
/**

View File

@ -48,20 +48,20 @@ public:
* @param firstPointId
* @param secondPointId
* @param typeLine
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -77,11 +77,11 @@ public:
* @param secondPointId
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula,
const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my,
@ -114,7 +114,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**
@ -122,7 +122,7 @@ protected:
*/
virtual void RefreshDataInFile();
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
private:

View File

@ -46,19 +46,19 @@ public:
* @param doc dom document container
* @param data container with variables
* @param id object id in container
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -71,11 +71,11 @@ public:
* @param radius
* @param f1
* @param f2
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const qint64 &center, const QString &radius, const QString &f1,
const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
@ -122,7 +122,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**
@ -145,7 +145,7 @@ protected:
*/
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value );

View File

@ -48,7 +48,7 @@ public:
* @param firstPointId
* @param secondPointId
* @param thirdPointId
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
@ -66,13 +66,13 @@ public:
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const QPointF &thirdPoint,
const qreal& length);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -89,11 +89,11 @@ public:
* @param pointName
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
@ -127,7 +127,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**
@ -135,7 +135,7 @@ protected:
*/
virtual void RefreshDataInFile();
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
private:

View File

@ -41,7 +41,7 @@ public:
const qint64 &arcId, const qint64 &arc1id, const qint64 &arc2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
static void Create(QSharedPointer<DialogCutArc> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
@ -82,7 +82,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -47,20 +47,20 @@ public:
* @param id object id in container
* @param formula
* @param splineId
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolCutSpline(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &formula,
const qint64 &splineId, const qint64 &spl1id, const qint64 &spl2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -74,11 +74,11 @@ public:
* @param splineId
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &pointName,
const QString &formula, const qint64 &splineId, const qreal &mx, const qreal &my,
@ -117,7 +117,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -44,13 +44,13 @@ public:
const qint64 &splinePathId, const qint64 &splPath1id, const qint64 &splPath2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -64,11 +64,11 @@ public:
* @param splineId
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &pointName, const QString &formula,
const qint64 &splinePathId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
@ -107,7 +107,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -48,20 +48,20 @@ public:
* @param formula
* @param angle
* @param basePointId
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &basePointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -77,11 +77,11 @@ public:
* @param basePointId
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &pointName, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx,
@ -109,7 +109,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -48,20 +48,20 @@ public:
* @param basePointId
* @param p1LineId
* @param p2LineId
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -77,11 +77,11 @@ public:
* @param p2LineId
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &pointName, const QString &typeLine,
const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
@ -116,7 +116,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -47,19 +47,19 @@ public:
* @param id object id in container
* @param firstPoint
* @param secondPoint
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -70,11 +70,11 @@ public:
* @param _id
* @param firstPoint
* @param secondPoint
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
@ -117,7 +117,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**
@ -135,7 +135,7 @@ protected:
*/
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value );

View File

@ -48,20 +48,20 @@ public:
* @param p2Line1
* @param p1Line2
* @param p2Line2
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1,
const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -77,11 +77,11 @@ public:
* @param pointName
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id, const qint64 &p1Line2Id,
const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my,
@ -114,7 +114,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**
@ -122,7 +122,7 @@ protected:
*/
virtual void RefreshDataInFile();
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
private:

View File

@ -89,7 +89,7 @@ protected:
*/
virtual void RefreshGeometry();
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens() {doc->DecrementReferens(basePointId);}
private:

View File

@ -49,7 +49,7 @@ public:
* @param angle
* @param firstPointId
* @param secondPointId
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
@ -57,13 +57,13 @@ public:
const qint64 &secondPointId, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -80,11 +80,11 @@ public:
* @param angle
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const QString &typeLine, const QString &pointName,
@ -128,7 +128,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**
@ -136,7 +136,7 @@ protected:
*/
virtual void RefreshDataInFile();
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
private:

View File

@ -47,7 +47,7 @@ public:
* @param center
* @param firstPointId
* @param secondPointId
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
@ -55,7 +55,7 @@ public:
const qint64 &firstPointId, const qint64 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
@ -71,7 +71,7 @@ public:
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -87,11 +87,11 @@ public:
* @param pointName
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &radius, const qint64 &center,
const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName,
@ -124,7 +124,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**
@ -132,7 +132,7 @@ protected:
*/
virtual void RefreshDataInFile();
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
private:

View File

@ -46,20 +46,20 @@ public:
* @param id object id in container
* @param firstPointId
* @param secondPointId
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &firstPointId, const qint64 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -73,11 +73,11 @@ public:
* @param secondPointId
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId,
const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
@ -100,7 +100,7 @@ public slots:
virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event);
protected:
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
/**
@ -109,7 +109,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -48,7 +48,7 @@ public:
* @param p1Line
* @param p2Line
* @param pShoulder
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
@ -56,7 +56,7 @@ public:
const qint64 &pShoulder, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
@ -72,7 +72,7 @@ public:
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -89,11 +89,11 @@ public:
* @param pointName
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &formula, const qint64 &p1Line, const qint64 &p2Line,
const qint64 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx,
@ -126,7 +126,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**
@ -134,7 +134,7 @@ protected:
*/
virtual void RefreshDataInFile();
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
private:

View File

@ -44,13 +44,13 @@ public:
* @param doc dom document container
* @param data container with variables
* @param id object id in container
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0 );
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
@ -90,7 +90,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -47,19 +47,19 @@ public:
* @param doc dom document container
* @param data container with variables
* @param id object id in container
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0 );
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -75,11 +75,11 @@ public:
* @param angle1
* @param angle2
* @param kCurve
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve,
@ -150,7 +150,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile ();
/**
@ -173,7 +173,7 @@ protected:
*/
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value );

View File

@ -46,19 +46,19 @@ public:
* @param doc dom document container
* @param data container with variables
* @param id object id in container
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -68,11 +68,11 @@ public:
* @brief Create
* @param _id
* @param path
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, VSplinePath *path, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
@ -142,7 +142,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**
@ -165,7 +165,7 @@ protected:
*/
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value );

View File

@ -48,20 +48,20 @@ public:
* @param axisP2Id
* @param firstPointId
* @param secondPointId
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id,
const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
/**
* @brief Create
* @param dialog
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
*/
@ -77,11 +77,11 @@ public:
* @param secondPointId
* @param mx
* @param my
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id, const qint64 &axisP2Id,
const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my,
@ -114,7 +114,7 @@ public slots:
virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event);
protected:
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
/**
@ -123,7 +123,7 @@ protected:
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -45,7 +45,7 @@ public:
* @param data container with variables
* @param id object id in container
* @param id object id in containerArc
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc,
@ -58,7 +58,7 @@ public:
* @param id object id in container
* @param id object id in containerArc
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, const Document::Documents &parse,
const Tool::Sources &typeCreation, const qint64 &idTool = 0, QObject *parent = 0);
@ -78,7 +78,7 @@ public slots:
virtual void FullUpdateFromFile();
protected:
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -45,7 +45,7 @@ public:
* @param data container with variables
* @param id object id in container
* @param id object id in containerPoint
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint,
@ -58,7 +58,7 @@ public:
* @param id object id in container
* @param id object id in containerPoint
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint,
const Document::Documents &parse, const Tool::Sources &typeCreation, const qint64 &idTool = 0,
@ -96,7 +96,7 @@ protected:
*/
QGraphicsLineItem *lineName;
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -45,7 +45,7 @@ public:
* @param data container with variables
* @param id object id in container
* @param id object id in containerSpline
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
@ -58,7 +58,7 @@ public:
* @param id object id in container
* @param id object id in containerSpline
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
* @return
*/
static VNodeSpline *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
@ -80,7 +80,7 @@ public slots:
virtual void FullUpdateFromFile ();
protected:
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile ();
/**

View File

@ -45,7 +45,7 @@ public:
* @param data container with variables
* @param id object id in container
* @param id object id in containerSpline
* @param typeCreation
* @param typeCreation way we create this tool.
* @param parent parent object
*/
VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
@ -58,7 +58,7 @@ public:
* @param id object id in container
* @param id object id in containerSpline
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
const Document::Documents &parse, const Tool::Sources &typeCreation, const qint64 &idTool = 0,
@ -79,7 +79,7 @@ public slots:
virtual void FullUpdateFromFile();
protected:
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**

View File

@ -34,31 +34,38 @@
#include "../dialogs/dialogdetail.h"
/**
* @brief The VToolDetail class
* @brief The VToolDetail class for working with detail.
*/
class VToolDetail: public VAbstractTool, public QGraphicsPathItem
{
Q_OBJECT
public:
/**
* @brief VToolDetail
* @brief VToolDetail constructor.
* @param doc dom document container
* @param data container with variables
* @param id object id in container
* @param typeCreation
* @param scene
* @param typeCreation way we create this tool.
* @param scene pointer to scene.
* @param parent parent object
*/
VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id,
const Tool::Sources &typeCreation, VMainGraphicsScene *scene,
QGraphicsItem * parent = 0);
/**
* @brief setDialog
* @brief setDialog set dialog when user want change tool option.
*/
virtual void setDialog();
template<typename T>
/**
* @brief CreateNode create new node for detail.
* @param data container.
* @param id id parent object.
* @return id for new object.
*/
static qint64 CreateNode(VContainer *data, const qint64 &id)
{
//We can't use exist object. Need create new.
T *node = new T(*data->GeometricObject<const T *>(id));
Q_ASSERT(node != 0);
node->setMode(Draw::Modeling);
@ -66,84 +73,39 @@ public:
}
/**
* @brief Create
* @param dialog
* @param scene
* @param doc dom document container
* @param data container with variables
* @brief Create help create tool from GUI.
* @param dialog dialog.
* @param scene pointer to scene.
* @param doc dom document container.
* @param data container with variables.
*/
static void Create(QSharedPointer<DialogDetail> &dialog, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data);
/**
* @brief Create
* @param _id
* @param newDetail
* @param scene
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @brief Create help create tool.
* @param _id tool id, 0 if tool doesn't exist yet.
* @param newDetail detail what we want show.
* @param scene pointer to scene.
* @param doc dom document container.
* @param data container with variables.
* @param parse pares file mode.
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 &_id, const VDetail &newDetail, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation);
template <typename T>
/**
* @brief AddTool
* @param tool
* @param id object id in container
* @param typeTool
*/
void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool)
{
tool->setParentItem(this);
connect(tool, &T::ChoosedTool, sceneDetails, &VMainGraphicsScene::ChoosedItem);
VNodeDetail node(id, typeTool, Draw::Modeling, NodeDetail::Modeling);
VDetail det = VAbstractTool::data.GetDetail(this->id);
det.append(node);
VAbstractTool::data.UpdateDetail(this->id, det);
QDomElement domElement = doc->elementById(QString().setNum(this->id));
if (domElement.isElement())
{
AddNode(domElement, node);
}
}
/**
* @brief TagName
*/
const Tool::Sources &typeCreation);
static const QString TagName;
/**
* @brief TagNode
*/
static const QString TagNode;
/**
* @brief AttrSupplement
*/
static const QString AttrSupplement;
/**
* @brief AttrClosed
*/
static const QString AttrClosed;
/**
* @brief AttrWidth
*/
static const QString AttrWidth;
/**
* @brief AttrIdObject
*/
static const QString AttrIdObject;
/**
* @brief AttrNodeType
*/
static const QString AttrNodeType;
/**
* @brief NodeTypeContour
*/
static const QString NodeTypeContour;
/**
* @brief NodeTypeModeling
*/
static const QString NodeTypeModeling;
/**
* @brief Remove full delete detail.
*/
void Remove();
public slots:
/**
@ -151,13 +113,13 @@ public slots:
*/
virtual void FullUpdateFromFile ();
/**
* @brief FullUpdateFromGui
* @param result
* @brief FullUpdateFromGui refresh tool data from change options.
* @param result keep result working dialog.
*/
virtual void FullUpdateFromGui(int result);
protected:
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile ();
/**
@ -165,52 +127,56 @@ protected:
*/
virtual void RefreshDataInFile();
/**
* @brief itemChange
* @param change
* @param value
* @return
* @brief itemChange handle detail change.
* @param change change
* @param value value
* @return new value.
*/
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value );
/**
* @brief mouseReleaseEvent
* @param event
* @brief mouseReleaseEvent handle mouse release events.
* @param event mouse release event.
*/
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event );
/**
* @brief contextMenuEvent
* @param event
* @brief contextMenuEvent handle context menu events.
* @param event context menu event.
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
* @brief RemoveReferens
* @brief RemoveReferens decrement value of reference.
*/
virtual void RemoveReferens();
/**
* @brief keyReleaseEvent handle key release events.
* @param event key release event.
*/
virtual void keyReleaseEvent(QKeyEvent * event);
private:
Q_DISABLE_COPY(VToolDetail)
/**
* @brief dialogDetail
* @brief dialogDetail dialog.
*/
QSharedPointer<DialogDetail> dialogDetail;
/**
* @brief sceneDetails
* @brief sceneDetails pointer to the scene.
*/
VMainGraphicsScene *sceneDetails;
/**
* @brief RefreshGeometry
* @brief RefreshGeometry refresh item on scene.
*/
void RefreshGeometry ();
/**
* @brief AddNode
* @param domElement
* @param node
* @brief AddNode add node to the file.
* @param domElement tag in xml tree.
* @param node node of detail.
*/
void AddNode(QDomElement &domElement, const VNodeDetail &node);
template <typename Tool>
/**
* @brief InitTool
* @param scene
* @param node
* @brief InitTool initial node item on scene
* @param scene pointer to scene.
* @param node node of detail.
*/
void InitTool(VMainGraphicsScene *scene, const VNodeDetail &node);
};

View File

@ -52,11 +52,11 @@ public:
* @brief Create
* @param _id
* @param newDetail
* @param scene
* @param scene pointer to scene.
* @param doc dom document container
* @param data container with variables
* @param parse
* @param typeCreation
* @param typeCreation way we create this tool.
*/
static void Create(const qint64 _id, const VDetail &d1, const VDetail &d2, const qint64 &d1id, const qint64 &d2id,
const ptrdiff_t &indexD1, const ptrdiff_t &indexD2, VMainGraphicsScene *scene,
@ -92,7 +92,7 @@ public slots:
virtual void FullUpdateFromFile (){}
protected:
/**
* @brief AddToFile
* @brief AddToFile add tag with informations about tool into file.
*/
virtual void AddToFile();
/**