Documentation for VToolCutSpline class.

--HG--
branch : develop
This commit is contained in:
dismine 2014-01-24 20:04:45 +02:00
parent df644f52c9
commit 0da4bbf850
2 changed files with 44 additions and 28 deletions

View File

@ -50,7 +50,7 @@ public:
* @param arc1id id first cutting arc. * @param arc1id id first cutting arc.
* @param arc2id id second cutting arc. * @param arc2id id second cutting arc.
* @param typeCreation way we create this tool. * @param typeCreation way we create this tool.
* @param parent parent object * @param parent parent object.
*/ */
VToolCutArc(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &formula, VToolCutArc(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &formula,
const qint64 &arcId, const qint64 &arc1id, const qint64 &arc2id, const qint64 &arcId, const qint64 &arc1id, const qint64 &arc2id,

View File

@ -41,14 +41,14 @@ class VToolCutSpline : public VToolPoint
Q_OBJECT Q_OBJECT
public: public:
/** /**
* @brief VToolCutSpline * @brief VToolCutSpline constructor.
* @param doc * @param doc dom document container.
* @param data container with variables * @param data container with variables.
* @param id object id in container * @param id object id in container.
* @param formula * @param formula string with formula length first spline.
* @param splineId * @param splineId id spline in data container.
* @param typeCreation way we create this tool. * @param typeCreation way we create this tool.
* @param parent parent object * @param parent parent object.
*/ */
VToolCutSpline(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &formula, VToolCutSpline(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &formula,
const qint64 &splineId, const qint64 &spl1id, const qint64 &spl2id, const qint64 &splineId, const qint64 &spl1id, const qint64 &spl2id,
@ -58,25 +58,25 @@ public:
*/ */
virtual void setDialog(); virtual void setDialog();
/** /**
* @brief Create help create tool * @brief Create help create tool from GUI.
* @param dialog * @param dialog dialog.
* @param scene pointer to scene. * @param scene pointer to scene.
* @param doc dom document container * @param doc dom document container.
* @param data container with variables * @param data container with variables.
*/ */
static void Create(QSharedPointer<DialogCutSpline> &dialog, VMainGraphicsScene *scene, VDomDocument *doc, static void Create(QSharedPointer<DialogCutSpline> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data); VContainer *data);
/** /**
* @brief Create help create tool * @brief Create help create tool.
* @param _id tool id, 0 if tool doesn't exist yet. * @param _id tool id, 0 if tool doesn't exist yet.
* @param pointName point name. * @param pointName point name.
* @param formula * @param formula string with formula length first spline.
* @param splineId * @param splineId id spline in data container.
* @param mx label bias x axis. * @param mx label bias x axis.
* @param my label bias y axis. * @param my label bias y axis.
* @param scene pointer to scene. * @param scene pointer to scene.
* @param doc dom document container * @param doc dom document container.
* @param data container with variables * @param data container with variables.
* @param parse parser file mode. * @param parse parser file mode.
* @param typeCreation way we create this tool. * @param typeCreation way we create this tool.
*/ */
@ -84,9 +84,6 @@ public:
const QString &formula, const qint64 &splineId, const qreal &mx, const qreal &my, const QString &formula, const qint64 &splineId, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation); const Document::Documents &parse, const Tool::Sources &typeCreation);
/**
* @brief ToolType
*/
static const QString ToolType; static const QString ToolType;
static const QString AttrSpline; static const QString AttrSpline;
public slots: public slots:
@ -100,8 +97,8 @@ public slots:
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/** /**
* @brief SplineChoosed * @brief SplineChoosed send signal about selection from spline.
* @param id object id in container * @param id object id in container.
*/ */
void SplineChoosed(qint64 id); void SplineChoosed(qint64 id);
/** /**
@ -109,11 +106,15 @@ public slots:
* @param newName new name active pattern peace. * @param newName new name active pattern peace.
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);
/**
* @brief ShowContextMenu show context menu.
* @param event context menu event.
*/
virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event); virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event);
protected: protected:
/** /**
* @brief contextMenuEvent handle context menu events. * @brief contextMenuEvent handle context menu events.
* @param event * @param event context menu event.
*/ */
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/** /**
@ -128,31 +129,46 @@ protected:
* @brief RefreshGeometry refresh item on scene. * @brief RefreshGeometry refresh item on scene.
*/ */
void RefreshGeometry(); void RefreshGeometry();
/**
* @brief RemoveReferens decrement referens value for used objects.
*/
virtual void RemoveReferens(); virtual void RemoveReferens();
private: private:
Q_DISABLE_COPY(VToolCutSpline) Q_DISABLE_COPY(VToolCutSpline)
/** /**
* @brief formula keep formula of length * @brief formula keep formula of length.
*/ */
QString formula; QString formula;
/** /**
* @brief splineId keep id of spline * @brief splineId keep id of spline.
*/ */
qint64 splineId; qint64 splineId;
/** /**
* @brief DialogCutSpline pointer to the tool's dialog * @brief DialogCutSpline pointer to the tool's dialog.
*/ */
QSharedPointer<DialogCutSpline> dialogCutSpline; QSharedPointer<DialogCutSpline> dialogCutSpline;
/** /**
* @brief firstSpline * @brief firstSpline first spline after cutting.
*/ */
VSimpleSpline *firstSpline; VSimpleSpline *firstSpline;
/** /**
* @brief secondSpline * @brief secondSpline second spline after cutting.
*/ */
VSimpleSpline *secondSpline; VSimpleSpline *secondSpline;
/**
* @brief spl1id id first spline after cutting.
*/
const qint64 spl1id; const qint64 spl1id;
/**
* @brief spl2id id second spline after cutting.
*/
const qint64 spl2id; const qint64 spl2id;
/**
* @brief RefreshSpline refresh spline on scene.
* @param spline spline.
* @param splid spline id.
* @param tr spline type.
*/
void RefreshSpline(VSimpleSpline *spline, qint64 splid, SimpleSpline::Translation tr); void RefreshSpline(VSimpleSpline *spline, qint64 splid, SimpleSpline::Translation tr);
}; };