Documentation for VToolPoint class.

--HG--
branch : develop
This commit is contained in:
dismine 2014-01-26 17:26:01 +02:00
parent b293aa6c76
commit 27353c7354

View File

@ -33,26 +33,26 @@
#include "../../widgets/vgraphicssimpletextitem.h" #include "../../widgets/vgraphicssimpletextitem.h"
/** /**
* @brief The VToolPoint class * @brief The VToolPoint class parent for all tools what create points.
*/ */
class VToolPoint: public VDrawTool, public QGraphicsEllipseItem class VToolPoint: public VDrawTool, public QGraphicsEllipseItem
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* @brief VToolPoint * @brief VToolPoint 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 parent parent object * @param parent parent object.
*/ */
VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0); VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0);
virtual ~VToolPoint(){} virtual ~VToolPoint(){}
static const QString TagName; static const QString TagName;
public slots: public slots:
/** /**
* @brief NameChangePosition * @brief NameChangePosition handle change posion point label.
* @param pos * @param pos new position.
*/ */
void NameChangePosition(const QPointF &pos); void NameChangePosition(const QPointF &pos);
/** /**
@ -62,14 +62,14 @@ public slots:
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);
/** /**
* @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) = 0; virtual void FullUpdateFromGui(int result) = 0;
/** /**
* @brief ShowTool highlight tool. * @brief ShowTool highlight tool.
* @param id object id in container * @param id object id in container.
* @param color * @param color highlight color.
* @param enable * @param enable enable or disable highlight.
*/ */
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
/** /**
@ -78,63 +78,63 @@ public slots:
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);
/** /**
* @brief ShowContextMenu * @brief ShowContextMenu show context menu.
* @param event * @param event context menu event.
*/ */
virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event); virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event);
protected: protected:
/** /**
* @brief radius * @brief radius radius circle.
*/ */
qreal radius; qreal radius;
/** /**
* @brief namePoint * @brief namePoint point label.
*/ */
VGraphicsSimpleTextItem *namePoint; VGraphicsSimpleTextItem *namePoint;
/** /**
* @brief lineName * @brief lineName line what we see if label moved too away from point.
*/ */
QGraphicsLineItem *lineName; QGraphicsLineItem *lineName;
/** /**
* @brief UpdateNamePosition * @brief UpdateNamePosition save new position label to the pattern file.
* @param mx label bias x axis. * @param mx label bias x axis.
* @param my label bias y axis. * @param my label bias y axis.
*/ */
virtual void UpdateNamePosition(qreal mx, qreal my); virtual void UpdateNamePosition(qreal mx, qreal my);
/** /**
* @brief mouseReleaseEvent handle mouse release events. * @brief mouseReleaseEvent handle mouse release events.
* @param event * @param event mouse release event.
*/ */
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event );
/** /**
* @brief hoverMoveEvent handle hover move events. * @brief hoverMoveEvent handle hover move events.
* @param event * @param event hover move event.
*/ */
virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event );
/** /**
* @brief hoverLeaveEvent handle hover leave events. * @brief hoverLeaveEvent handle hover leave events.
* @param event * @param event hover leave event.
*/ */
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
/** /**
* @brief RefreshPointGeometry * @brief RefreshPointGeometry refresh point on scene.
* @param point * @param point point.
*/ */
virtual void RefreshPointGeometry(const VPointF &point); virtual void RefreshPointGeometry(const VPointF &point);
/** /**
* @brief RefreshLine * @brief RefreshLine refresh line to label on scene.
*/ */
void RefreshLine(); void RefreshLine();
/** /**
* @brief itemChange * @brief itemChange hadle item change.
* @param change * @param change change.
* @param value * @param value value.
* @return * @return value.
*/ */
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value );
/** /**
* @brief keyReleaseEvent * @brief keyReleaseEvent handle key release events.
* @param event * @param event key release event.
*/ */
virtual void keyReleaseEvent(QKeyEvent * event); virtual void keyReleaseEvent(QKeyEvent * event);
private: private: