Documentation for VToolLine class.
--HG-- branch : develop
This commit is contained in:
parent
42cb8b6477
commit
04799d8976
|
@ -34,21 +34,21 @@
|
||||||
#include "../../dialogs/dialogline.h"
|
#include "../../dialogs/dialogline.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The VToolLine class
|
* @brief The VToolLine class tool for creation line.
|
||||||
*/
|
*/
|
||||||
class VToolLine: public VDrawTool, public QGraphicsLineItem
|
class VToolLine: public VDrawTool, public QGraphicsLineItem
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief VToolLine
|
* @brief VToolLine 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 firstPoint
|
* @param firstPoint id first line point.
|
||||||
* @param secondPoint
|
* @param secondPoint id second line point.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
* @param parent parent object
|
* @param parent parent object.
|
||||||
*/
|
*/
|
||||||
VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
|
VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
|
||||||
qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
|
qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
|
||||||
|
@ -57,31 +57,28 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
/**
|
/**
|
||||||
* @brief Create help create tool
|
* @brief Create help create tool form 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<DialogLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
static void Create(QSharedPointer<DialogLine> &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 firstPoint
|
* @param firstPoint id first line point.
|
||||||
* @param secondPoint
|
* @param secondPoint id second line point.
|
||||||
* @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.
|
||||||
*/
|
*/
|
||||||
static void Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint,
|
static void Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint,
|
||||||
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 TagName
|
|
||||||
*/
|
|
||||||
static const QString TagName;
|
static const QString TagName;
|
||||||
public slots:
|
public slots:
|
||||||
/**
|
/**
|
||||||
|
@ -95,14 +92,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);
|
virtual void FullUpdateFromGui(int result);
|
||||||
/**
|
/**
|
||||||
* @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);
|
||||||
/**
|
/**
|
||||||
|
@ -113,7 +110,7 @@ public slots:
|
||||||
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 );
|
||||||
/**
|
/**
|
||||||
|
@ -126,35 +123,45 @@ protected:
|
||||||
virtual void RefreshDataInFile();
|
virtual void RefreshDataInFile();
|
||||||
/**
|
/**
|
||||||
* @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 RemoveReferens decrement value of reference.
|
* @brief RemoveReferens decrement value of reference.
|
||||||
*/
|
*/
|
||||||
virtual void RemoveReferens();
|
virtual void RemoveReferens();
|
||||||
|
/**
|
||||||
|
* @brief itemChange handle item change.
|
||||||
|
* @param change change.
|
||||||
|
* @param value value.
|
||||||
|
* @return value.
|
||||||
|
*/
|
||||||
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value );
|
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value );
|
||||||
|
/**
|
||||||
|
* @brief keyReleaseEvent handle key realse events.
|
||||||
|
* @param event key realse event.
|
||||||
|
*/
|
||||||
virtual void keyReleaseEvent(QKeyEvent * event);
|
virtual void keyReleaseEvent(QKeyEvent * event);
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief firstPoint
|
* @brief firstPoint id first line point.
|
||||||
*/
|
*/
|
||||||
qint64 firstPoint;
|
qint64 firstPoint;
|
||||||
/**
|
/**
|
||||||
* @brief secondPoint
|
* @brief secondPoint id second line point.
|
||||||
*/
|
*/
|
||||||
qint64 secondPoint;
|
qint64 secondPoint;
|
||||||
/**
|
/**
|
||||||
* @brief dialogLine
|
* @brief dialogLine dialog.
|
||||||
*/
|
*/
|
||||||
QSharedPointer<DialogLine> dialogLine;
|
QSharedPointer<DialogLine> dialogLine;
|
||||||
/**
|
/**
|
||||||
* @brief RefreshGeometry refresh item on scene.
|
* @brief RefreshGeometry refresh item on scene.
|
||||||
*/
|
*/
|
||||||
void RefreshGeometry();
|
void RefreshGeometry();
|
||||||
};
|
};
|
||||||
|
|
|
@ -48,9 +48,6 @@ public:
|
||||||
*/
|
*/
|
||||||
VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0);
|
VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0);
|
||||||
virtual ~VToolPoint(){}
|
virtual ~VToolPoint(){}
|
||||||
/**
|
|
||||||
* @brief TagName
|
|
||||||
*/
|
|
||||||
static const QString TagName;
|
static const QString TagName;
|
||||||
public slots:
|
public slots:
|
||||||
/**
|
/**
|
||||||
|
@ -80,6 +77,10 @@ public slots:
|
||||||
* @param factor scene scale factor.
|
* @param factor scene scale factor.
|
||||||
*/
|
*/
|
||||||
virtual void SetFactor(qreal factor);
|
virtual void SetFactor(qreal factor);
|
||||||
|
/**
|
||||||
|
* @brief ShowContextMenu
|
||||||
|
* @param event
|
||||||
|
*/
|
||||||
virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event);
|
virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event);
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
|
@ -124,7 +125,17 @@ protected:
|
||||||
* @brief RefreshLine
|
* @brief RefreshLine
|
||||||
*/
|
*/
|
||||||
void RefreshLine();
|
void RefreshLine();
|
||||||
|
/**
|
||||||
|
* @brief itemChange
|
||||||
|
* @param change
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value );
|
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value );
|
||||||
|
/**
|
||||||
|
* @brief keyReleaseEvent
|
||||||
|
* @param event
|
||||||
|
*/
|
||||||
virtual void keyReleaseEvent(QKeyEvent * event);
|
virtual void keyReleaseEvent(QKeyEvent * event);
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(VToolPoint)
|
Q_DISABLE_COPY(VToolPoint)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user