Documentation for VDrawTool class.

--HG--
branch : develop
This commit is contained in:
dismine 2014-01-24 17:56:41 +02:00
parent ecb6f66ce1
commit e5f58b7a10
24 changed files with 92 additions and 92 deletions

View File

@ -347,7 +347,7 @@ public slots:
*/ */
void AboutQt(); void AboutQt();
/** /**
* @brief ShowToolTip show tools tooltip. * @brief ShowTool highlight tool.Tip show tools tooltip.
* @param toolTip tooltip text. * @param toolTip tooltip text.
*/ */
void ShowToolTip(const QString &toolTip); void ShowToolTip(const QString &toolTip);

View File

@ -35,18 +35,18 @@
#include <QGraphicsSceneContextMenuEvent> #include <QGraphicsSceneContextMenuEvent>
/** /**
* @brief The VDrawTool class * @brief The VDrawTool abstract class for all draw tool.
*/ */
class VDrawTool : public VAbstractTool class VDrawTool : public VAbstractTool
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* @brief VDrawTool * @brief VDrawTool 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.
*/ */
VDrawTool(VDomDocument *doc, VContainer *data, qint64 id); VDrawTool(VDomDocument *doc, VContainer *data, qint64 id);
virtual ~VDrawTool() {} virtual ~VDrawTool() {}
@ -55,68 +55,68 @@ public:
*/ */
virtual void setDialog() {} virtual void setDialog() {}
/** /**
* @brief ignoreContextMenu * @brief ignoreContextMenu set ignore contect menu tool.
* @param enable * @param enable true - ignore.
*/ */
void ignoreContextMenu(bool enable) {ignoreContextMenuEvent = enable;} void ignoreContextMenu(bool enable) {ignoreContextMenuEvent = enable;}
public slots: public slots:
/** /**
* @brief ShowTool * @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);
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName name new active pattern peace.
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);
/** /**
* @brief ChangedNameDraw * @brief ChangedNameDraw save new name active pattern peace.
* @param oldName * @param oldName old name.
* @param newName * @param newName new name.
*/ */
void ChangedNameDraw(const QString &oldName, const QString &newName); void ChangedNameDraw(const QString &oldName, const QString &newName);
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result keep result working dialog.
*/ */
virtual void FullUpdateFromGui(int result)=0; virtual void FullUpdateFromGui(int result)=0;
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor scene scale factor.
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);
protected: protected:
/** /**
* @brief ignoreContextMenuEvent * @brief ignoreContextMenuEvent ignore or not context menu events.
*/ */
bool ignoreContextMenuEvent; bool ignoreContextMenuEvent;
/** /**
* @brief ignoreFullUpdate * @brief ignoreFullUpdate ignore or not full updates.
*/ */
bool ignoreFullUpdate; bool ignoreFullUpdate;
/** /**
* @brief nameActivDraw * @brief nameActivDraw name of tool's pattern peace.
*/ */
QString nameActivDraw; QString nameActivDraw;
/** /**
* @brief factor * @brief factor scene scale factor.
*/ */
static qreal factor; static qreal factor;
/** /**
* @brief AddToCalculation * @brief AddToCalculation add tool to calculation tag in pattern file.
* @param domElement * @param domElement tag in xml tree.
*/ */
void AddToCalculation(const QDomElement &domElement); void AddToCalculation(const QDomElement &domElement);
template <typename Dialog, typename Tool> template <typename Dialog, typename Tool>
/** /**
* @brief ContextMenu * @brief ContextMenu show context menu for tool.
* @param dialog * @param dialog dialog option.
* @param tool * @param tool tool.
* @param event * @param event context menu event.
* @param showRemove * @param showRemove true - tool have option delete.
*/ */
void ContextMenu(QSharedPointer<Dialog> &dialog, Tool *tool, QGraphicsSceneContextMenuEvent *event, void ContextMenu(QSharedPointer<Dialog> &dialog, Tool *tool, QGraphicsSceneContextMenuEvent *event,
bool showRemove = true) bool showRemove = true)
@ -168,11 +168,11 @@ protected:
} }
template <typename Item> template <typename Item>
/** /**
* @brief ShowItem * @brief ShowItem highlight tool.
* @param item * @param item 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.
*/ */
void ShowItem(Item *item, qint64 id, Qt::GlobalColor color, bool enable) void ShowItem(Item *item, qint64 id, Qt::GlobalColor color, bool enable)
{ {

View File

@ -97,12 +97,12 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -94,24 +94,24 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);
/** /**
* @brief ShowTool * @brief ShowTool highlight tool.
* @param id object id in container * @param id object id in container
* @param color * @param color
* @param enable * @param enable
*/ */
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -110,12 +110,12 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -60,7 +60,7 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
@ -70,7 +70,7 @@ public slots:
*/ */
void ArcChoosed(qint64 id); void ArcChoosed(qint64 id);
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);

View File

@ -95,7 +95,7 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
@ -105,7 +105,7 @@ public slots:
*/ */
void SplineChoosed(qint64 id); void SplineChoosed(qint64 id);
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);

View File

@ -85,7 +85,7 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
@ -95,7 +95,7 @@ public slots:
*/ */
void SplineChoosed(qint64 id); void SplineChoosed(qint64 id);
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);

View File

@ -97,7 +97,7 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);

View File

@ -104,7 +104,7 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);

View File

@ -89,24 +89,24 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/** /**
* @brief ShowTool * @brief ShowTool highlight tool.
* @param id object id in container * @param id object id in container
* @param color * @param color
* @param enable * @param enable
*/ */
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -97,12 +97,12 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -54,12 +54,12 @@ public:
QGraphicsItem * parent = 0); QGraphicsItem * parent = 0);
public slots: public slots:
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -111,12 +111,12 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -59,24 +59,24 @@ public slots:
*/ */
void NameChangePosition(const QPointF &pos); void NameChangePosition(const QPointF &pos);
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result) = 0; virtual void FullUpdateFromGui(int result) = 0;
/** /**
* @brief ShowTool * @brief ShowTool highlight tool.
* @param id object id in container * @param id object id in container
* @param color * @param color
* @param enable * @param enable
*/ */
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -107,12 +107,12 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -93,7 +93,7 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);

View File

@ -109,12 +109,12 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -63,17 +63,17 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -114,7 +114,7 @@ public slots:
*/ */
virtual void FullUpdateFromFile (); virtual void FullUpdateFromFile ();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui ( int result ); virtual void FullUpdateFromGui ( int result );
@ -127,19 +127,19 @@ public slots:
void ControlPointChangePosition (const qint32 &indexSpline, const SplinePoint::Position &position, void ControlPointChangePosition (const qint32 &indexSpline, const SplinePoint::Position &position,
const QPointF &pos); const QPointF &pos);
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
virtual void ChangedActivDraw ( const QString &newName ); virtual void ChangedActivDraw ( const QString &newName );
/** /**
* @brief ShowTool * @brief ShowTool highlight tool.
* @param id object id in container * @param id object id in container
* @param color * @param color
* @param enable * @param enable
*/ */
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -106,7 +106,7 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);
@ -119,19 +119,19 @@ public slots:
void ControlPointChangePosition(const qint32 &indexSpline, const SplinePoint::Position &position, void ControlPointChangePosition(const qint32 &indexSpline, const SplinePoint::Position &position,
const QPointF &pos); const QPointF &pos);
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
virtual void ChangedActivDraw(const QString &newName); virtual void ChangedActivDraw(const QString &newName);
/** /**
* @brief ShowTool * @brief ShowTool highlight tool.
* @param id object id in container * @param id object id in container
* @param color * @param color
* @param enable * @param enable
*/ */
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor
*/ */
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);

View File

@ -107,7 +107,7 @@ public slots:
*/ */
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
/** /**
* @brief FullUpdateFromGui * @brief FullUpdateFromGui refresh tool data from change options.
* @param result * @param result
*/ */
virtual void FullUpdateFromGui(int result); virtual void FullUpdateFromGui(int result);

View File

@ -79,8 +79,8 @@ public slots:
*/ */
void ChoosedItem(qint64 id, const Scene::Scenes &type); void ChoosedItem(qint64 id, const Scene::Scenes &type);
/** /**
* @brief SetFactor * @brief SetFactor set current scale factor of scene.
* @param factor * @param factor scene scale factor.
*/ */
void SetFactor(qreal factor); void SetFactor(qreal factor);
protected: protected:

View File

@ -228,14 +228,14 @@ public:
qint64 SPointActiveDraw(); qint64 SPointActiveDraw();
signals: signals:
/** /**
* @brief ChangedActivDraw * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName * @param newName
*/ */
void ChangedActivDraw(const QString &newName); void ChangedActivDraw(const QString &newName);
/** /**
* @brief ChangedNameDraw * @brief ChangedNameDraw save new name active pattern peace.
* @param oldName * @param oldName old name.
* @param newName * @param newName new name.
*/ */
void ChangedNameDraw(const QString &oldName, const QString &newName); void ChangedNameDraw(const QString &oldName, const QString &newName);
/** /**
@ -247,7 +247,7 @@ signals:
*/ */
void haveChange(); void haveChange();
/** /**
* @brief ShowTool * @brief ShowTool highlight tool.
* @param id * @param id
* @param color * @param color
* @param enable * @param enable