Documentation for VToolSplinePath class.
--HG-- branch : develop
This commit is contained in:
parent
50e55ad7c8
commit
f91dc82dea
|
@ -35,19 +35,19 @@
|
|||
#include "../../widgets/vcontrolpointspline.h"
|
||||
|
||||
/**
|
||||
* @brief The VToolSplinePath class
|
||||
* @brief The VToolSplinePath class tool for creation spline path.
|
||||
*/
|
||||
class VToolSplinePath:public VDrawTool, public QGraphicsPathItem
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* @brief VToolSplinePath
|
||||
* @param doc dom document container
|
||||
* @param data container with variables
|
||||
* @param id object id in container
|
||||
* @brief VToolSplinePath 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.
|
||||
*/
|
||||
VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
|
||||
QGraphicsItem * parent = 0);
|
||||
|
@ -56,48 +56,42 @@ 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<DialogSplinePath> &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 path
|
||||
* @param path spline path.
|
||||
* @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.
|
||||
*/
|
||||
static void Create(const qint64 _id, VSplinePath *path, 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 pos
|
||||
* @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 pos,
|
||||
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:
|
||||
|
@ -107,14 +101,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);
|
||||
|
@ -126,8 +120,8 @@ public slots:
|
|||
/**
|
||||
* @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);
|
||||
/**
|
||||
|
@ -138,7 +132,7 @@ public slots:
|
|||
protected:
|
||||
/**
|
||||
* @brief contextMenuEvent handle context menu events.
|
||||
* @param event
|
||||
* @param event context menu event.
|
||||
*/
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
/**
|
||||
|
@ -151,32 +145,42 @@ protected:
|
|||
virtual void RefreshDataInFile();
|
||||
/**
|
||||
* @brief mouseReleaseEvent handle mouse release events.
|
||||
* @param event
|
||||
* @param event mouse release 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 handle 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 dialogSplinePath
|
||||
* @brief dialogSplinePath dialog.
|
||||
*/
|
||||
QSharedPointer<DialogSplinePath> dialogSplinePath;
|
||||
/**
|
||||
* @brief controlPoints
|
||||
* @brief controlPoints list pointers of control points.
|
||||
*/
|
||||
QVector<VControlPointSpline *> controlPoints;
|
||||
/**
|
||||
|
@ -184,22 +188,22 @@ private:
|
|||
*/
|
||||
void RefreshGeometry();
|
||||
/**
|
||||
* @brief AddPathPoint
|
||||
* @param domElement
|
||||
* @param splPoint
|
||||
* @brief AddPathPoint write path point to pattern file.
|
||||
* @param domElement dom element.
|
||||
* @param splPoint spline path point.
|
||||
*/
|
||||
void AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint);
|
||||
/**
|
||||
* @brief UpdatePathPoint
|
||||
* @param node
|
||||
* @param path
|
||||
* @brief UpdatePathPoint update spline path in pattern file.
|
||||
* @param node tag in file.
|
||||
* @param path spline path.
|
||||
*/
|
||||
void UpdatePathPoint(QDomNode& node, VSplinePath &path);
|
||||
/**
|
||||
* @brief CorectControlPoints
|
||||
* @param spl
|
||||
* @param splPath
|
||||
* @param indexSpline
|
||||
* @brief CorectControlPoints update position points control points in file.
|
||||
* @param spl spline what was changed.
|
||||
* @param splPath spline path.
|
||||
* @param indexSpline index spline in spline path.
|
||||
*/
|
||||
void CorectControlPoints(const VSpline &spl, VSplinePath &splPath, const qint32 &indexSpline);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user