Documentation for VToolTriangle class.

--HG--
branch : develop
This commit is contained in:
dismine 2014-01-27 12:36:42 +02:00
parent f91dc82dea
commit 84fce7ec86

View File

@ -33,23 +33,23 @@
#include "../../dialogs/dialogtriangle.h" #include "../../dialogs/dialogtriangle.h"
/** /**
* @brief The VToolTriangle class * @brief The VToolTriangle class tool for what find point intersection two foots right triangle.
*/ */
class VToolTriangle : public VToolPoint class VToolTriangle : public VToolPoint
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* @brief VToolTriangle * @brief VToolTriangle constructor.
* @param doc dom document container * @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 axisP1Id * @param axisP1Id id first axis point.
* @param axisP2Id * @param axisP2Id id second axis point.
* @param firstPointId * @param firstPointId id first triangle point, what lies on the hypotenuse.
* @param secondPointId * @param secondPointId id second triangle point, what lies on the hypotenuse.
* @param typeCreation way we create this tool. * @param typeCreation way we create this tool.
* @param parent parent object * @param parent parent object.
*/ */
VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id,
const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId,
@ -59,27 +59,27 @@ 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<DialogTriangle> &dialog, VMainGraphicsScene *scene, VDomDocument *doc, static void Create(QSharedPointer<DialogTriangle> &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 axisP1Id * @param axisP1Id id first axis point.
* @param axisP2Id * @param axisP2Id id second axis point.
* @param firstPointId * @param firstPointId id first triangle point, what lies on the hypotenuse.
* @param secondPointId * @param secondPointId id second triangle point, what lies on the hypotenuse.
* @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.
*/ */
@ -88,18 +88,15 @@ public:
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 FindPoint * @brief FindPoint find point intersection two foots right triangle.
* @param axisP1 * @param axisP1 first axis point.
* @param axisP2 * @param axisP2 second axis point.
* @param firstPoint * @param firstPoint first triangle point, what lies on the hypotenuse.
* @param secondPoint * @param secondPoint second triangle point, what lies on the hypotenuse.
* @return * @return point intersection two foots right triangle.
*/ */
static QPointF FindPoint(const QPointF &axisP1, const QPointF &axisP2, const QPointF &firstPoint, static QPointF FindPoint(const QPointF &axisP1, const QPointF &axisP2, const QPointF &firstPoint,
const QPointF &secondPoint); const QPointF &secondPoint);
/**
* @brief ToolType
*/
static const QString ToolType; static const QString ToolType;
public slots: public slots:
/** /**
@ -107,10 +104,14 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui refresh tool data from change options. * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result result working dialog.
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/**
* @brief ShowContextMenu show context menu.
* @param event context menu event.
*/
virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event); virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event);
protected: protected:
/** /**
@ -119,7 +120,7 @@ protected:
virtual void RemoveReferens(); virtual void RemoveReferens();
/** /**
* @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 );
/** /**
@ -133,23 +134,23 @@ protected:
private: private:
Q_DISABLE_COPY(VToolTriangle) Q_DISABLE_COPY(VToolTriangle)
/** /**
* @brief axisP1Id * @brief axisP1Id id first axis point.
*/ */
qint64 axisP1Id; qint64 axisP1Id;
/** /**
* @brief axisP2Id * @brief axisP2Id id second axis point.
*/ */
qint64 axisP2Id; qint64 axisP2Id;
/** /**
* @brief firstPointId * @brief firstPointId id first triangle point, what lies on the hypotenuse.
*/ */
qint64 firstPointId; qint64 firstPointId;
/** /**
* @brief secondPointId * @brief secondPointId id second triangle point, what lies on the hypotenuse.
*/ */
qint64 secondPointId; qint64 secondPointId;
/** /**
* @brief dialogTriangle * @brief dialogTriangle dialog.
*/ */
QSharedPointer<DialogTriangle> dialogTriangle; QSharedPointer<DialogTriangle> dialogTriangle;
}; };