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();
/**
* @brief ShowToolTip show tools tooltip.
* @brief ShowTool highlight tool.Tip show tools tooltip.
* @param toolTip tooltip text.
*/
void ShowToolTip(const QString &toolTip);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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