Documentation for VToolSplinePath class.
--HG-- branch : develop
This commit is contained in:
parent
50e55ad7c8
commit
f91dc82dea
|
@ -35,19 +35,19 @@
|
||||||
#include "../../widgets/vcontrolpointspline.h"
|
#include "../../widgets/vcontrolpointspline.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The VToolSplinePath class
|
* @brief The VToolSplinePath class tool for creation spline path.
|
||||||
*/
|
*/
|
||||||
class VToolSplinePath:public VDrawTool, public QGraphicsPathItem
|
class VToolSplinePath:public VDrawTool, public QGraphicsPathItem
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief VToolSplinePath
|
* @brief VToolSplinePath 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 typeCreation way we create this tool.
|
* @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,
|
VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
|
@ -56,48 +56,42 @@ 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<DialogSplinePath> &dialog, VMainGraphicsScene *scene,
|
static void Create(QSharedPointer<DialogSplinePath> &dialog, VMainGraphicsScene *scene,
|
||||||
VDomDocument *doc, VContainer *data);
|
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 _id tool id, 0 if tool doesn't exist yet.
|
||||||
* @param path
|
* @param path spline path.
|
||||||
* @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, VSplinePath *path, VMainGraphicsScene *scene,
|
static void Create(const qint64 _id, VSplinePath *path, VMainGraphicsScene *scene,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
const Tool::Sources &typeCreation);
|
const Tool::Sources &typeCreation);
|
||||||
/**
|
|
||||||
* @brief TagName
|
|
||||||
*/
|
|
||||||
static const QString TagName;
|
static const QString TagName;
|
||||||
/**
|
|
||||||
* @brief ToolType
|
|
||||||
*/
|
|
||||||
static const QString ToolType;
|
static const QString ToolType;
|
||||||
signals:
|
signals:
|
||||||
/**
|
/**
|
||||||
* @brief RefreshLine
|
* @brief RefreshLine refresh control line.
|
||||||
* @param indexSpline
|
* @param indexSpline position spline in spline list.
|
||||||
* @param pos
|
* @param position position point in spline.
|
||||||
* @param controlPoint
|
* @param controlPoint new position control point.
|
||||||
* @param splinePoint
|
* @param splinePoint new position spline point.
|
||||||
*/
|
*/
|
||||||
void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos,
|
void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos,
|
||||||
const QPointF &controlPoint, const QPointF &splinePoint);
|
const QPointF &controlPoint, const QPointF &splinePoint);
|
||||||
/**
|
/**
|
||||||
* @brief setEnabledPoint
|
* @brief setEnabledPoint disable control points.
|
||||||
* @param enable
|
* @param enable enable or diasable points.
|
||||||
*/
|
*/
|
||||||
void setEnabledPoint(bool enable);
|
void setEnabledPoint(bool enable);
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -107,14 +101,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 ControlPointChangePosition
|
* @brief ControlPointChangePosition handle change position control point.
|
||||||
* @param indexSpline
|
* @param indexSpline position spline in spline list.
|
||||||
* @param position
|
* @param position position point in spline.
|
||||||
* @param pos
|
* @param pos new position.
|
||||||
*/
|
*/
|
||||||
void ControlPointChangePosition(const qint32 &indexSpline, const SplinePoint::Position &position,
|
void ControlPointChangePosition(const qint32 &indexSpline, const SplinePoint::Position &position,
|
||||||
const QPointF &pos);
|
const QPointF &pos);
|
||||||
|
@ -126,8 +120,8 @@ public slots:
|
||||||
/**
|
/**
|
||||||
* @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);
|
||||||
/**
|
/**
|
||||||
|
@ -138,7 +132,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 );
|
||||||
/**
|
/**
|
||||||
|
@ -151,32 +145,42 @@ protected:
|
||||||
virtual void RefreshDataInFile();
|
virtual void RefreshDataInFile();
|
||||||
/**
|
/**
|
||||||
* @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 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 release events.
|
||||||
|
* @param event key release event.
|
||||||
|
*/
|
||||||
virtual void keyReleaseEvent(QKeyEvent * event);
|
virtual void keyReleaseEvent(QKeyEvent * event);
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief dialogSplinePath
|
* @brief dialogSplinePath dialog.
|
||||||
*/
|
*/
|
||||||
QSharedPointer<DialogSplinePath> dialogSplinePath;
|
QSharedPointer<DialogSplinePath> dialogSplinePath;
|
||||||
/**
|
/**
|
||||||
* @brief controlPoints
|
* @brief controlPoints list pointers of control points.
|
||||||
*/
|
*/
|
||||||
QVector<VControlPointSpline *> controlPoints;
|
QVector<VControlPointSpline *> controlPoints;
|
||||||
/**
|
/**
|
||||||
|
@ -184,22 +188,22 @@ private:
|
||||||
*/
|
*/
|
||||||
void RefreshGeometry();
|
void RefreshGeometry();
|
||||||
/**
|
/**
|
||||||
* @brief AddPathPoint
|
* @brief AddPathPoint write path point to pattern file.
|
||||||
* @param domElement
|
* @param domElement dom element.
|
||||||
* @param splPoint
|
* @param splPoint spline path point.
|
||||||
*/
|
*/
|
||||||
void AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint);
|
void AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint);
|
||||||
/**
|
/**
|
||||||
* @brief UpdatePathPoint
|
* @brief UpdatePathPoint update spline path in pattern file.
|
||||||
* @param node
|
* @param node tag in file.
|
||||||
* @param path
|
* @param path spline path.
|
||||||
*/
|
*/
|
||||||
void UpdatePathPoint(QDomNode& node, VSplinePath &path);
|
void UpdatePathPoint(QDomNode& node, VSplinePath &path);
|
||||||
/**
|
/**
|
||||||
* @brief CorectControlPoints
|
* @brief CorectControlPoints update position points control points in file.
|
||||||
* @param spl
|
* @param spl spline what was changed.
|
||||||
* @param splPath
|
* @param splPath spline path.
|
||||||
* @param indexSpline
|
* @param indexSpline index spline in spline path.
|
||||||
*/
|
*/
|
||||||
void CorectControlPoints(const VSpline &spl, VSplinePath &splPath, const qint32 &indexSpline);
|
void CorectControlPoints(const VSpline &spl, VSplinePath &splPath, const qint32 &indexSpline);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user