From 50e55ad7c8ef0e5cb48631c74d0a63e48c3c210e Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 27 Jan 2014 11:54:33 +0200 Subject: [PATCH] Documentation for VToolSpline class. --HG-- branch : develop --- src/tools/drawTools/vtoolsinglepoint.h | 2 +- src/tools/drawTools/vtoolspline.h | 98 ++++++++++++++------------ 2 files changed, 52 insertions(+), 48 deletions(-) diff --git a/src/tools/drawTools/vtoolsinglepoint.h b/src/tools/drawTools/vtoolsinglepoint.h index a5027f757..bb0fb187e 100644 --- a/src/tools/drawTools/vtoolsinglepoint.h +++ b/src/tools/drawTools/vtoolsinglepoint.h @@ -33,7 +33,7 @@ #include "../../dialogs/dialogsinglepoint.h" /** - * @brief The VToolSinglePoint class class tool for creation pattern base point. Obly base point can move. All object + * @brief The VToolSinglePoint class tool for creation pattern base point. Obly base point can move. All object * pattern peace depend on base point. */ class VToolSinglePoint : public VToolPoint diff --git a/src/tools/drawTools/vtoolspline.h b/src/tools/drawTools/vtoolspline.h index 06e627069..fbb918ba8 100644 --- a/src/tools/drawTools/vtoolspline.h +++ b/src/tools/drawTools/vtoolspline.h @@ -36,19 +36,19 @@ #include "../../geometry/vsplinepath.h" /** - * @brief The VToolSpline class + * @brief The VToolSpline class tool for creation spline. I mean bezier curve. */ class VToolSpline:public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: /** - * @brief VToolSpline - * @param doc dom document container - * @param data container with variables - * @param id object id in container + * @brief VToolSpline constructor. + * @param doc dom document container. + * @param data container with variables. + * @param id object id in container. * @param typeCreation way we create this tool. - * @param parent parent object + * @param parent parent object. */ VToolSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); @@ -57,27 +57,27 @@ public: */ virtual void setDialog(); /** - * @brief Create help create tool - * @param dialog + * @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 + * @param doc dom document container. + * @param data container with variables. */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); /** - * @brief Create help create tool + * @brief Create help create tool. * @param _id tool id, 0 if tool doesn't exist yet. - * @param p1 - * @param p4 - * @param kAsm1 - * @param kAsm2 - * @param angle1 - * @param angle2 - * @param kCurve + * @param p1 id first spline point. + * @param p4 id last spline point. + * @param kAsm1 coefficient of length first control line. + * @param kAsm2 coefficient of length second control line. + * @param angle1 angle from first point to first control point. + * @param angle2 angle from second point to second control point. + * @param kCurve coefficient of curvature spline. * @param scene pointer to scene. - * @param doc dom document container - * @param data container with variables + * @param doc dom document container. + * @param data container with variables. * @param parse parser file mode. * @param typeCreation way we create this tool. */ @@ -85,27 +85,21 @@ public: const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); - /** - * @brief TagName - */ static const QString TagName; - /** - * @brief ToolType - */ static const QString ToolType; signals: /** - * @brief RefreshLine - * @param indexSpline - * @param position - * @param controlPoint - * @param splinePoint + * @brief RefreshLine refresh control line. + * @param indexSpline position spline in spline list. + * @param position position point in spline. + * @param controlPoint new position control point. + * @param splinePoint new position spline point. */ void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint ); /** - * @brief setEnabledPoint - * @param enable + * @brief setEnabledPoint disable control points. + * @param enable enable or diasable points. */ void setEnabledPoint ( bool enable ); public slots: @@ -115,14 +109,14 @@ public slots: virtual void FullUpdateFromFile (); /** * @brief FullUpdateFromGui refresh tool data from change options. - * @param result + * @param result result working dialog. */ virtual void FullUpdateFromGui ( int result ); /** - * @brief ControlPointChangePosition - * @param indexSpline - * @param position - * @param pos + * @brief ControlPointChangePosition handle change position control point. + * @param indexSpline position spline in spline list. + * @param position position point in spline. + * @param pos new position. */ void ControlPointChangePosition (const qint32 &indexSpline, const SplinePoint::Position &position, const QPointF &pos); @@ -132,10 +126,10 @@ public slots: */ virtual void ChangedActivDraw ( const QString &newName ); /** - * @brief ShowTool highlight tool. + * @brief ShowTool highlight tool. * @param id object id in container - * @param color - * @param enable + * @param color highlight color. + * @param enable enable or disable highlight. */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); /** @@ -146,7 +140,7 @@ public slots: protected: /** * @brief contextMenuEvent handle context menu events. - * @param event + * @param event context menu event. */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); /** @@ -159,32 +153,42 @@ protected: virtual void RefreshDataInFile(); /** * @brief mouseReleaseEvent handle mouse release events. - * @param event + * @param event context menu event. */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); /** * @brief hoverMoveEvent handle hover move events. - * @param event + * @param event hover move event. */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); /** * @brief hoverLeaveEvent handle hover leave events. - * @param event + * @param event hover leave event. */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); /** * @brief RemoveReferens decrement value of reference. */ virtual void RemoveReferens(); + /** + * @brief itemChange hadle item change. + * @param change change. + * @param value value. + * @return value. + */ virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); + /** + * @brief keyReleaseEvent handle key release events. + * @param event key release event. + */ virtual void keyReleaseEvent(QKeyEvent * event); private: /** - * @brief dialogSpline + * @brief dialogSpline dialog. */ QSharedPointer dialogSpline; /** - * @brief controlPoints + * @brief controlPoints list pointers of control points. */ QVector controlPoints; /**