Seamly2D
Code documentation
VInteractiveTool Class Referenceabstract

#include <vinteractivetool.h>

Inheritance diagram for VInteractiveTool:
Collaboration diagram for VInteractiveTool:

Public Slots

void FullUpdateFromGuiOk (int result)
 FullUpdateFromGuiOk refresh tool data after change in options. More...
 
void FullUpdateFromGuiApply ()
 FullUpdateFromGuiApply refresh tool data after change in options but do not delete dialog. More...
 
- Public Slots inherited from VAbstractTool
virtual void FullUpdateFromFile ()=0
 FullUpdateFromFile update tool data form file. More...
 
virtual void AllowHover (bool enabled)=0
 
virtual void AllowSelecting (bool enabled)=0
 
virtual void ToolSelectionType (const SelectionType &type)
 

Public Member Functions

 VInteractiveTool (VAbstractPattern *doc, VContainer *data, quint32 id, QObject *parent=nullptr)
 
virtual ~VInteractiveTool () Q_DECL_EQ_DEFAULT
 
void DialogLinkDestroy ()
 
- Public Member Functions inherited from VAbstractTool
 VAbstractTool (VAbstractPattern *doc, VContainer *data, quint32 id, QObject *parent=nullptr)
 VAbstractTool container. More...
 
virtual ~VAbstractTool () Q_DECL_OVERRIDE
 
quint32 getId () const
 getId return object id. More...
 
const VContainergetData () const
 getData return pointer to data container. More...
 
QMap< QString, quint32 > PointsList () const
 
virtual QString getTagName () const =0
 
virtual void ShowVisualization (bool show)=0
 
virtual void setPointNamePosition (quint32 id, const QPointF &pos)
 
virtual void setPointNameVisiblity (quint32 id, bool visible)
 
- Public Member Functions inherited from VDataTool
 VDataTool (VContainer *data, QObject *parent=nullptr)
 VDataTool constructor. More...
 
virtual ~VDataTool () Q_DECL_EQ_DEFAULT
 
VContainer getData () const
 getData return data container. More...
 
void setData (const VContainer *value)
 setData set data container. More...
 
virtual quint32 referens () const
 referens return count of referens. More...
 
virtual void incrementReferens ()
 incrementReferens increment referens. More...
 
virtual void decrementReferens ()
 decrementReferens decrement referens. More...
 
virtual void GroupVisibility (quint32 object, bool visible)=0
 

Protected Member Functions

virtual void setDialog ()
 setDialog set dialog when user want change tool option. More...
 
virtual void SaveDialogChange ()=0
 
- Protected Member Functions inherited from VAbstractTool
virtual void AddToFile ()=0
 AddToFile add tag with Information about tool into file. More...
 
virtual void RefreshDataInFile ()
 RefreshDataInFile refresh attributes in file. If attributes don't exist create them. More...
 
virtual void RemoveReferens ()
 RemoveReferens decrement value of reference. More...
 
virtual void deleteTool (bool ask=true)
 deleteTool full delete object form scene and file. More...
 
template<typename T >
void AddVisualization ()
 
virtual void SetVisualization ()=0
 
virtual void ToolCreation (const Source &typeCreation)
 

Protected Attributes

QSharedPointer< DialogToolm_dialog
 m_dialog tool's dialog options. More...
 
- Protected Attributes inherited from VAbstractTool
VAbstractPatterndoc
 doc dom document container More...
 
const quint32 m_id
 id object id. More...
 
QPointer< Visualizationvis
 
SelectionType selectionType
 
- Protected Attributes inherited from VDataTool
VContainer data
 data container with data More...
 
quint32 _referens
 _referens keep count tools what use this tool. If value more than 1 you can't delete tool. More...
 

Additional Inherited Members

- Signals inherited from VAbstractTool
void toolHasChanges ()
 toolHasChanges emit if tool create change that need save. More...
 
void chosenTool (quint32 id, SceneObject type)
 chosenTool emit if object was clicked. More...
 
void LiteUpdateTree (const Document &parse)
 FullUpdateTree emit if need reparse pattern file. More...
 
void ToolTip (const QString &toolTip)
 
- Static Public Member Functions inherited from VAbstractTool
static qreal CheckFormula (const quint32 &toolId, QString &formula, VContainer *data)
 CheckFormula check formula. More...
 
static const QStringList Colors ()
 
static QMap< QString, QString > ColorsList ()
 
static QMap< QString, QString > supportColorsList ()
 
static QMap< QString, QString > backgroundColorsList ()
 
static QPixmap createColorIcon (const int w, const int h, const QString &color)
 
static const QStringList fills ()
 
static void AddRecord (const quint32 id, const Tool &toolType, VAbstractPattern *doc)
 AddRecord add record about tool in history. More...
 
static void AddNodes (VAbstractPattern *doc, QDomElement &domElement, const VPiecePath &path)
 
static void AddNodes (VAbstractPattern *doc, QDomElement &domElement, const VPiece &piece)
 
template<typename T >
static quint32 CreateNode (VContainer *data, quint32 id)
 CreateNode create new node for detail. More...
 
- Static Public Attributes inherited from VAbstractTool
static bool m_suppressContextMenu = false
 
static const QString AttrInUse = QStringLiteral("inUse")
 
- Static Protected Member Functions inherited from VAbstractTool
static int ConfirmDeletion ()
 
static QDomElement AddSANode (VAbstractPattern *doc, const QString &tagName, const VPieceNode &node)
 
static void AddNode (VAbstractPattern *doc, QDomElement &domElement, const VPieceNode &node)
 
static QVector< VPieceNodePrepareNodes (const VPiecePath &path, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data)
 
static quint32 PrepareNode (const VPieceNode &node, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data)
 

Detailed Description

Definition at line 60 of file vinteractivetool.h.

Constructor & Destructor Documentation

◆ VInteractiveTool()

VInteractiveTool::VInteractiveTool ( VAbstractPattern doc,
VContainer data,
quint32  id,
QObject *  parent = nullptr 
)

Definition at line 55 of file vinteractivetool.cpp.

◆ ~VInteractiveTool()

virtual VInteractiveTool::~VInteractiveTool ( )
virtual

Member Function Documentation

◆ DialogLinkDestroy()

void VInteractiveTool::DialogLinkDestroy ( )

Definition at line 62 of file vinteractivetool.cpp.

References m_dialog.

◆ FullUpdateFromGuiApply

void VInteractiveTool::FullUpdateFromGuiApply ( )
slot

FullUpdateFromGuiApply refresh tool data after change in options but do not delete dialog.

Definition at line 85 of file vinteractivetool.cpp.

References SaveDialogChange().

Referenced by VDrawTool::ContextMenu(), and PatternPieceTool::editPieceProperties().

◆ FullUpdateFromGuiOk

void VInteractiveTool::FullUpdateFromGuiOk ( int  result)
slot

FullUpdateFromGuiOk refresh tool data after change in options.

Parameters
resultkeep result working dialog.

Definition at line 72 of file vinteractivetool.cpp.

References m_dialog, and SaveDialogChange().

Referenced by VDrawTool::ContextMenu(), and PatternPieceTool::editPieceProperties().

◆ SaveDialogChange()

virtual void VInteractiveTool::SaveDialogChange ( )
protectedpure virtual

◆ setDialog()

Member Data Documentation

◆ m_dialog

QSharedPointer<DialogTool> VInteractiveTool::m_dialog
protected

m_dialog tool's dialog options.

Definition at line 76 of file vinteractivetool.h.

Referenced by VDrawTool::ContextMenu(), VToolMirrorByAxis::Create(), VToolMirrorByLine::Create(), VToolMove::Create(), VToolRotation::Create(), VToolArc::Create(), VToolArcWithLength::Create(), VToolCubicBezierPath::Create(), VToolEllipticalArc::Create(), VToolSplinePath::Create(), VToolTrueDarts::Create(), IntersectCirclesTool::Create(), IntersectCircleTangentTool::Create(), PointIntersectXYTool::Create(), VToolCutArc::Create(), VToolCutSpline::Create(), VToolCutSplinePath::Create(), VToolAlongLine::Create(), VToolBisector::Create(), VToolCurveIntersectAxis::Create(), VToolEndLine::Create(), VToolHeight::Create(), VToolLineIntersectAxis::Create(), VToolNormal::Create(), VToolShoulderPoint::Create(), VToolLineIntersect::Create(), VToolPointFromArcAndTangent::Create(), VToolPointOfContact::Create(), VToolPointOfIntersectionArcs::Create(), VToolPointOfIntersectionCurves::Create(), VToolTriangle::Create(), VToolLine::Create(), PatternPieceTool::Create(), DialogLinkDestroy(), PatternPieceTool::editPieceProperties(), FullUpdateFromGuiOk(), VToolMirrorByAxis::SaveDialog(), VToolMirrorByLine::SaveDialog(), VToolMove::SaveDialog(), VToolRotation::SaveDialog(), VToolArc::SaveDialog(), VToolArcWithLength::SaveDialog(), VToolCubicBezier::SaveDialog(), VToolCubicBezierPath::SaveDialog(), VToolEllipticalArc::SaveDialog(), VToolSpline::SaveDialog(), VToolSplinePath::SaveDialog(), VToolTrueDarts::SaveDialog(), IntersectCirclesTool::SaveDialog(), IntersectCircleTangentTool::SaveDialog(), PointIntersectXYTool::SaveDialog(), VToolCutArc::SaveDialog(), VToolCutSpline::SaveDialog(), VToolCutSplinePath::SaveDialog(), VToolAlongLine::SaveDialog(), VToolBisector::SaveDialog(), VToolCurveIntersectAxis::SaveDialog(), VToolEndLine::SaveDialog(), VToolHeight::SaveDialog(), VToolLineIntersectAxis::SaveDialog(), VToolNormal::SaveDialog(), VToolShoulderPoint::SaveDialog(), VToolBasePoint::SaveDialog(), VToolLineIntersect::SaveDialog(), VToolPointFromArcAndTangent::SaveDialog(), VToolPointOfContact::SaveDialog(), VToolPointOfIntersectionArcs::SaveDialog(), VToolPointOfIntersectionCurves::SaveDialog(), VToolTriangle::SaveDialog(), VToolLine::SaveDialog(), PatternPieceTool::SaveDialogChange(), PatternPieceTool::SetDialog(), VToolMirrorByAxis::setDialog(), VToolMirrorByLine::setDialog(), VToolMove::setDialog(), VToolRotation::setDialog(), VToolArc::setDialog(), VToolArcWithLength::setDialog(), VToolCubicBezier::setDialog(), VToolCubicBezierPath::setDialog(), VToolEllipticalArc::setDialog(), VToolSpline::setDialog(), VToolSplinePath::setDialog(), VToolTrueDarts::setDialog(), IntersectCirclesTool::setDialog(), IntersectCircleTangentTool::setDialog(), PointIntersectXYTool::setDialog(), VToolCutArc::setDialog(), VToolCutSpline::setDialog(), VToolCutSplinePath::setDialog(), VToolAlongLine::setDialog(), VToolBisector::setDialog(), VToolCurveIntersectAxis::setDialog(), VToolEndLine::setDialog(), VToolHeight::setDialog(), VToolLineIntersectAxis::setDialog(), VToolNormal::setDialog(), VToolShoulderPoint::setDialog(), VToolBasePoint::setDialog(), VToolLineIntersect::setDialog(), VToolPointFromArcAndTangent::setDialog(), VToolPointOfContact::setDialog(), VToolPointOfIntersectionArcs::setDialog(), VToolPointOfIntersectionCurves::setDialog(), VToolTriangle::setDialog(), and VToolLine::setDialog().


The documentation for this class was generated from the following files: