Documentation for VToolCutSplinePath class.

--HG--
branch : develop
This commit is contained in:
dismine 2014-01-24 20:13:18 +02:00
parent 0da4bbf850
commit 5dd98fd02b

View File

@ -34,12 +34,25 @@
#include "../../widgets/vsimplespline.h"
/**
* @brief The VToolCutSplinePath class
* @brief The VToolCutSplinePath class for tool CutSplinePath. This tool find point on splinePath and cut splinePath on
* two.
*/
class VToolCutSplinePath : public VToolPoint
{
Q_OBJECT
public:
/**
* @brief VToolCutSplinePath constructor.
* @param doc dom document container.
* @param data container with variables.
* @param id object id in container.
* @param formula string with formula length first splinePath.
* @param splinePathId id splinePath (we cut this splinePath) in data container.
* @param splPath1id id first splinePath after cutting.
* @param splPath2id id second splinePath after cutting.
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
VToolCutSplinePath(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &formula,
const qint64 &splinePathId, const qint64 &splPath1id, const qint64 &splPath2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
@ -48,25 +61,25 @@ public:
*/
virtual void setDialog();
/**
* @brief Create help create tool
* @param dialog
* @brief Create help create tool form 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<DialogCutSplinePath> &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 pointName point name.
* @param formula
* @param splineId
* @param formula string with formula length first splinePath.
* @param splineId id splinePath in data container.
* @param mx label bias x axis.
* @param my label bias y axis.
* @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.
*/
@ -74,9 +87,6 @@ public:
const qint64 &splinePathId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation);
/**
* @brief ToolType
*/
static const QString ToolType;
static const QString AttrSplinePath;
public slots:
@ -86,12 +96,12 @@ 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 SplineChoosed
* @param id object id in container
* @brief SplineChoosed send signal about selection splinePath.
* @param id object id in container.
*/
void SplineChoosed(qint64 id);
/**
@ -99,11 +109,15 @@ public slots:
* @param newName new name active pattern peace.
*/
virtual void ChangedActivDraw(const QString &newName);
/**
* @brief ShowContextMenu show context menu.
* @param event context menu event.
*/
virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event);
protected:
/**
* @brief contextMenuEvent handle context menu events.
* @param event
* @param event context menu event.
*/
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
/**
@ -118,6 +132,9 @@ protected:
* @brief RefreshGeometry refresh item on scene.
*/
void RefreshGeometry();
/**
* @brief RemoveReferens decrement referens value for used objects.
*/
virtual void RemoveReferens();
private:
Q_DISABLE_COPY(VToolCutSplinePath)
@ -126,23 +143,35 @@ private:
*/
QString formula;
/**
* @brief splineId keep id of spline
* @brief splineId keep id of spline.
*/
qint64 splinePathId;
/**
* @brief DialogCutSpline pointer to the tool's dialog
* @brief DialogCutSpline pointer to the tool's dialog.
*/
QSharedPointer<DialogCutSplinePath> dialogCutSplinePath;
/**
* @brief firstSpline
* @brief firstSpline first splinePath after cutting.
*/
VSimpleSpline *firstSpline;
/**
* @brief secondSpline
* @brief secondSpline second splinePath after cutting.
*/
VSimpleSpline *secondSpline;
/**
* @brief splPath1id id first splinePath after cutting.
*/
const qint64 splPath1id;
/**
* @brief splPath2id id second splinePath after cutting.
*/
const qint64 splPath2id;
/**
* @brief RefreshSpline refresh splinePath on scene.
* @param spline splinePath.
* @param splPathid splinePath id.
* @param tr splineType type.
*/
void RefreshSpline(VSimpleSpline *spline, qint64 splPathid, SimpleSpline::Translation tr);
};