From 45c8f5f57fc4c97ef6f3310f6ac7d4d57db644bb Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 24 Jan 2014 21:55:08 +0200 Subject: [PATCH] Documentation for VToolHeight class. --HG-- branch : develop --- src/tools/drawTools/vtoolheight.cpp | 1 + src/tools/drawTools/vtoolheight.h | 63 +++++++++++++++-------------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/src/tools/drawTools/vtoolheight.cpp b/src/tools/drawTools/vtoolheight.cpp index 2d096ffa3..7e0b59afa 100644 --- a/src/tools/drawTools/vtoolheight.cpp +++ b/src/tools/drawTools/vtoolheight.cpp @@ -115,6 +115,7 @@ void VToolHeight::Create(const qint64 _id, const QString &pointName, const QStri } } +//TODO Which way is better? See VAbstractTool::ClosestPoint. QPointF VToolHeight::FindPoint(const QLineF &line, const QPointF &point) { qreal a = 0, b = 0, c = 0; diff --git a/src/tools/drawTools/vtoolheight.h b/src/tools/drawTools/vtoolheight.h index 5352094be..60c7f643f 100644 --- a/src/tools/drawTools/vtoolheight.h +++ b/src/tools/drawTools/vtoolheight.h @@ -33,23 +33,23 @@ #include "../../dialogs/dialogheight.h" /** - * @brief The VToolHeight class + * @brief The VToolHeight class tool for creation point of height. Help find point of projection onto line. */ class VToolHeight: public VToolLinePoint { Q_OBJECT public: /** - * @brief VToolHeight - * @param doc dom document container - * @param data container with variables - * @param id object id in container + * @brief VToolHeight constructor. + * @param doc dom document container. + * @param data container with variables. + * @param id object id in container. * @param typeLine line type. - * @param basePointId - * @param p1LineId - * @param p2LineId + * @param basePointId id base point of projection. + * @param p1LineId id first point of line. + * @param p2LineId id second point of line. * @param typeCreation way we create this tool. - * @param parent parent object + * @param parent parent object. */ VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, @@ -59,11 +59,11 @@ 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); @@ -72,14 +72,14 @@ public: * @param _id tool id, 0 if tool doesn't exist yet. * @param pointName point name. * @param typeLine line type. - * @param basePointId - * @param p1LineId - * @param p2LineId + * @param basePointId id base point of projection. + * @param p1LineId id first point of line. + * @param p2LineId id second point of line. * @param mx label bias x axis. * @param my label bias y axis. * @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. */ @@ -88,15 +88,12 @@ public: const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); /** - * @brief FindPoint - * @param line - * @param point - * @return + * @brief FindPoint find projection base point onto line. + * @param line line + * @param point base point. + * @return point onto line. */ static QPointF FindPoint(const QLineF &line, const QPointF &point); - /** - * @brief ToolType - */ static const QString ToolType; public slots: /** @@ -104,15 +101,19 @@ public slots: */ virtual void FullUpdateFromFile(); /** - * @brief FullUpdateFromGui refresh tool data from change options. - * @param result + * @brief FullUpdateFromGui refresh tool data from change options. + * @param result result working dialog. */ virtual void FullUpdateFromGui(int result); + /** + * @brief ShowContextMenu show context menu. + * @param event context menu event. + */ virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event); protected: /** * @brief contextMenuEvent handle context menu events. - * @param event + * @param event context menu event. */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); /** @@ -125,15 +126,15 @@ protected: virtual void RefreshDataInFile(); private: /** - * @brief dialogHeight + * @brief dialogHeight dialog. */ QSharedPointer dialogHeight; /** - * @brief p1LineId + * @brief p1LineId id first point of line. */ qint64 p1LineId; /** - * @brief p2LineId + * @brief p2LineId id second point of line. */ qint64 p2LineId; };