Seamly2D
Code documentation
VAbstractOperation Class Reference

#include <vabstractoperation.h>

Inheritance diagram for VAbstractOperation:
Collaboration diagram for VAbstractOperation:

Public Slots

virtual void FullUpdateFromFile () Q_DECL_OVERRIDE
 
virtual void AllowHover (bool enabled) Q_DECL_OVERRIDE
 
virtual void AllowSelecting (bool enabled) Q_DECL_OVERRIDE
 
virtual void EnableToolMove (bool move) Q_DECL_OVERRIDE
 
void AllowPointHover (bool enabled)
 
void AllowPointSelecting (bool enabled)
 
void AllowPointLabelHover (bool enabled)
 
void AllowPointLabelSelecting (bool enabled)
 
void AllowSplineHover (bool enabled)
 
void AllowSplineSelecting (bool enabled)
 
void AllowSplinePathHover (bool enabled)
 
void AllowSplinePathSelecting (bool enabled)
 
void AllowArcHover (bool enabled)
 
void AllowArcSelecting (bool enabled)
 
void AllowElArcHover (bool enabled)
 
void AllowElArcSelecting (bool enabled)
 
virtual void ToolSelectionType (const SelectionType &type) Q_DECL_OVERRIDE
 
virtual void Disable (bool disable, const QString &draftBlockName) Q_DECL_OVERRIDE
 
void ObjectSelected (bool selected, quint32 objId)
 
void deletePoint ()
 
void pointNamePositionChanged (const QPointF &pos, quint32 labelId)
 
virtual void updatePointNameVisibility (quint32 id, bool visible) Q_DECL_OVERRIDE
 
- Public Slots inherited from VDrawTool
virtual void ShowTool (quint32 id, bool enable)
 ShowTool highlight tool. More...
 
virtual void activeBlockChanged (const QString &newName)
 activeBlockChanged disable or enable context menu after change active draft block. More...
 
void blockNameChanged (const QString &oldName, const QString &newName)
 blockNameChanged save new name active draft block. More...
 
virtual void EnableToolMove (bool move)
 
virtual void Disable (bool disable, const QString &draftBlockName)=0
 
virtual void piecesMode (bool mode)
 
- Public Slots inherited from VInteractiveTool
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

virtual ~VAbstractOperation () Q_DECL_EQ_DEFAULT
 
virtual QString getTagName () const Q_DECL_OVERRIDE
 
QString Suffix () const
 
void setSuffix (const QString &suffix)
 
virtual void GroupVisibility (quint32 object, bool visible) Q_DECL_OVERRIDE
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE
 
virtual bool isPointNameVisible (quint32 id) const Q_DECL_OVERRIDE
 
virtual void setPointNameVisiblity (quint32 id, bool visible) Q_DECL_OVERRIDE
 
virtual void setPointNamePosition (quint32 id, const QPointF &pos) Q_DECL_OVERRIDE
 
- Public Member Functions inherited from VDrawTool
 VDrawTool (VAbstractPattern *doc, VContainer *data, quint32 id, QObject *parent=nullptr)
 VDrawTool constructor. More...
 
virtual ~VDrawTool () Q_DECL_EQ_DEFAULT
 
QString getLineType () const
 
virtual void setLineType (const QString &value)
 
QString getLineWeight () const
 
virtual void setLineWeight (const QString &value)
 
- Public Member Functions inherited from VInteractiveTool
 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 void ShowVisualization (bool show)=0
 
- 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...
 

Static Public Member Functions

static void ExtractData (const QDomElement &domElement, QVector< SourceItem > &source, QVector< DestinationItem > &destination)
 
- 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

static const QString TagItem = QStringLiteral("item")
 
static const QString TagSource = QStringLiteral("source")
 
static const QString TagDestination = QStringLiteral("destination")
 
- Static Public Attributes inherited from VAbstractTool
static bool m_suppressContextMenu = false
 
static const QString AttrInUse = QStringLiteral("inUse")
 

Protected Member Functions

 VAbstractOperation (VAbstractPattern *doc, VContainer *data, quint32 id, const QString &suffix, const QVector< SourceItem > &source, const QVector< DestinationItem > &destination, QGraphicsItem *parent=nullptr)
 
virtual void AddToFile () Q_DECL_OVERRIDE
 AddToFile add tag with Information about tool into file. More...
 
virtual void ReadToolAttributes (const QDomElement &domElement) Q_DECL_OVERRIDE
 
virtual void SaveOptions (QDomElement &tag, QSharedPointer< VGObject > &obj) Q_DECL_OVERRIDE
 
void updatePointNamePosition (quint32 id, const QPointF &pos)
 
void SaveSourceDestination (QDomElement &tag)
 
template<typename T >
void ShowToolVisualization (bool show)
 
void InitCurve (quint32 id, VContainer *data, GOType curveType, SceneObject sceneType)
 
void InitOperatedObjects ()
 
QString complexPointToolTip (quint32 itemId) const
 
QString complexCurveToolTip (quint32 itemId) const
 
- Protected Member Functions inherited from VDrawTool
void AddToCalculation (const QDomElement &domElement)
 typeLine line weight. More...
 
void addDependence (QList< quint32 > &list, quint32 objectId) const
 
virtual void SaveDialog (QDomElement &domElement)=0
 SaveDialog save options into file after change in dialog. More...
 
virtual void SaveDialogChange () Q_DECL_FINAL
 
void SaveOption (QSharedPointer< VGObject > &obj)
 
virtual QString makeToolTip () const
 
bool CorrectDisable (bool disable, const QString &draftBlockName) const
 
void ReadAttributes ()
 
virtual void updatePointNameVisibility (quint32 id, bool visible)
 
template<typename Dialog >
void ContextMenu (QGraphicsSceneContextMenuEvent *event, quint32 itemId=NULL_ID, const RemoveOption &showRemove=RemoveOption::Enable, const Referens &ref=Referens::Follow)
 ContextMenu show context menu for tool. More...
 
template<typename Item >
void ShowItem (Item *item, quint32 id, bool enable)
 ShowItem highlight tool. More...
 
template<typename T >
QString ObjectName (quint32 id) const
 ObjectName get object (point, curve, arc) name. More...
 
- Protected Member Functions inherited from VInteractiveTool
virtual void setDialog ()
 setDialog set dialog when user want change tool option. More...
 
- Protected Member Functions inherited from VAbstractTool
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)
 

Static Protected Member Functions

template<typename T >
static void initOperationToolConnections (VMainGraphicsScene *scene, T *tool)
 
- Static Protected Member Functions inherited from VDrawTool
template<typename T >
static void InitDrawToolConnections (VMainGraphicsScene *scene, T *tool)
 
- 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)
 

Protected Attributes

QString suffix
 
QVector< SourceItemsource
 
QVector< DestinationItemdestination
 
QMap< quint32, VAbstractSimple * > operatedObjects
 
- Protected Attributes inherited from VDrawTool
QString activeBlockName
 
QString m_lineType
 activeBlockName name of tool's pattern peace. More...
 
QString m_lineWeight
 typeLine line type. More...
 
- Protected Attributes inherited from VInteractiveTool
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...
 

Private Member Functions

void AllowCurveHover (bool enabled, GOType type)
 
void AllowCurveSelecting (bool enabled, GOType type)
 

Additional Inherited Members

- Signals inherited from VDrawTool
void ChangedToolSelection (bool selected, quint32 object, quint32 tool)
 
- 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)
 
- Protected Types inherited from VDrawTool
enum class  RemoveOption : bool { Disable = false , Enable = true }
 
enum class  Referens : bool { Follow = true , Ignore = false }
 
- Protected Slots inherited from VDrawTool
virtual void showContextMenu (QGraphicsSceneContextMenuEvent *event, quint32 id=NULL_ID)=0
 

Detailed Description

Definition at line 93 of file vabstractoperation.h.

Constructor & Destructor Documentation

◆ ~VAbstractOperation()

virtual VAbstractOperation::~VAbstractOperation ( )
virtual

◆ VAbstractOperation()

VAbstractOperation::VAbstractOperation ( VAbstractPattern doc,
VContainer data,
quint32  id,
const QString &  suffix,
const QVector< SourceItem > &  source,
const QVector< DestinationItem > &  destination,
QGraphicsItem *  parent = nullptr 
)
protected

Definition at line 548 of file vabstractoperation.cpp.

Member Function Documentation

◆ AddToFile()

void VAbstractOperation::AddToFile ( )
protectedvirtual

AddToFile add tag with Information about tool into file.

Reimplemented from VDrawTool.

Definition at line 561 of file vabstractoperation.cpp.

References VDrawTool::AddToCalculation(), VAbstractTool::doc, VContainer::GetFakeGObject(), getTagName(), VAbstractTool::m_id, and SaveOptions().

◆ AllowArcHover

void VAbstractOperation::AllowArcHover ( bool  enabled)
slot

Definition at line 462 of file vabstractoperation.cpp.

References AllowCurveHover(), and Arc.

◆ AllowArcSelecting

void VAbstractOperation::AllowArcSelecting ( bool  enabled)
slot

Definition at line 468 of file vabstractoperation.cpp.

References AllowCurveSelecting(), and Arc.

◆ AllowCurveHover()

void VAbstractOperation::AllowCurveHover ( bool  enabled,
GOType  type 
)
private

◆ AllowCurveSelecting()

void VAbstractOperation::AllowCurveSelecting ( bool  enabled,
GOType  type 
)
private

◆ AllowElArcHover

void VAbstractOperation::AllowElArcHover ( bool  enabled)
slot

Definition at line 474 of file vabstractoperation.cpp.

References AllowCurveHover(), and EllipticalArc.

◆ AllowElArcSelecting

void VAbstractOperation::AllowElArcSelecting ( bool  enabled)
slot

Definition at line 480 of file vabstractoperation.cpp.

References AllowCurveSelecting(), and EllipticalArc.

◆ AllowHover

void VAbstractOperation::AllowHover ( bool  enabled)
virtualslot

Definition at line 310 of file vabstractoperation.cpp.

References operatedObjects, Point, and SCASSERT.

◆ AllowPointHover

void VAbstractOperation::AllowPointHover ( bool  enabled)
slot

Definition at line 370 of file vabstractoperation.cpp.

References operatedObjects, Point, and SCASSERT.

◆ AllowPointLabelHover

void VAbstractOperation::AllowPointLabelHover ( bool  enabled)
slot

◆ AllowPointLabelSelecting

void VAbstractOperation::AllowPointLabelSelecting ( bool  enabled)
slot

◆ AllowPointSelecting

void VAbstractOperation::AllowPointSelecting ( bool  enabled)
slot

Definition at line 386 of file vabstractoperation.cpp.

References operatedObjects, Point, and SCASSERT.

◆ AllowSelecting

void VAbstractOperation::AllowSelecting ( bool  enabled)
virtualslot

Definition at line 332 of file vabstractoperation.cpp.

References operatedObjects, Point, and SCASSERT.

◆ AllowSplineHover

void VAbstractOperation::AllowSplineHover ( bool  enabled)
slot

Definition at line 434 of file vabstractoperation.cpp.

References AllowCurveHover(), CubicBezier, and Spline.

◆ AllowSplinePathHover

void VAbstractOperation::AllowSplinePathHover ( bool  enabled)
slot

Definition at line 448 of file vabstractoperation.cpp.

References AllowCurveHover(), CubicBezierPath, and SplinePath.

◆ AllowSplinePathSelecting

void VAbstractOperation::AllowSplinePathSelecting ( bool  enabled)
slot

Definition at line 455 of file vabstractoperation.cpp.

References AllowCurveSelecting(), CubicBezierPath, and SplinePath.

◆ AllowSplineSelecting

void VAbstractOperation::AllowSplineSelecting ( bool  enabled)
slot

Definition at line 441 of file vabstractoperation.cpp.

References AllowCurveSelecting(), CubicBezier, and Spline.

◆ complexCurveToolTip()

QString VAbstractOperation::complexCurveToolTip ( quint32  itemId) const
protected

◆ complexPointToolTip()

QString VAbstractOperation::complexPointToolTip ( quint32  itemId) const
protected

◆ deletePoint

void VAbstractOperation::deletePoint ( )
slot

Definition at line 534 of file vabstractoperation.cpp.

References VAbstractTool::deleteTool().

Referenced by InitCurve(), and InitOperatedObjects().

◆ Disable

void VAbstractOperation::Disable ( bool  disable,
const QString &  draftBlockName 
)
virtualslot

◆ EnableToolMove

void VAbstractOperation::EnableToolMove ( bool  move)
virtualslot

◆ ExtractData()

◆ FullUpdateFromFile

◆ getTagName()

QString VAbstractOperation::getTagName ( ) const
virtual

Implements VAbstractTool.

Definition at line 77 of file vabstractoperation.cpp.

References VAbstractPattern::TagOperation.

Referenced by AddToFile().

◆ GroupVisibility()

void VAbstractOperation::GroupVisibility ( quint32  object,
bool  visible 
)
virtual

Implements VDataTool.

Definition at line 98 of file vabstractoperation.cpp.

References VAbstractSimple::GetType(), operatedObjects, Point, and SCASSERT.

◆ InitCurve()

◆ InitOperatedObjects()

◆ initOperationToolConnections()

◆ isPointNameVisible()

bool VAbstractOperation::isPointNameVisible ( quint32  id) const
virtual

◆ ObjectSelected

void VAbstractOperation::ObjectSelected ( bool  selected,
quint32  objId 
)
slot

◆ paint()

void VAbstractOperation::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
virtual

Definition at line 119 of file vabstractoperation.cpp.

◆ pointNamePositionChanged

void VAbstractOperation::pointNamePositionChanged ( const QPointF &  pos,
quint32  labelId 
)
slot

◆ ReadToolAttributes()

void VAbstractOperation::ReadToolAttributes ( const QDomElement &  domElement)
protectedvirtual

◆ SaveOptions()

void VAbstractOperation::SaveOptions ( QDomElement &  tag,
QSharedPointer< VGObject > &  obj 
)
protectedvirtual

◆ SaveSourceDestination()

◆ setPointNamePosition()

void VAbstractOperation::setPointNamePosition ( quint32  id,
const QPointF &  pos 
)
virtual

◆ setPointNameVisiblity()

void VAbstractOperation::setPointNameVisiblity ( quint32  id,
bool  visible 
)
virtual

◆ setSuffix()

void VAbstractOperation::setSuffix ( const QString &  suffix)

◆ ShowToolVisualization()

template<typename T >
void VAbstractOperation::ShowToolVisualization ( bool  show)
protected

Definition at line 198 of file vabstractoperation.h.

References VAbstractTool::SetVisualization(), and VAbstractTool::vis.

◆ Suffix()

◆ ToolSelectionType

void VAbstractOperation::ToolSelectionType ( const SelectionType type)
virtualslot

◆ updatePointNamePosition()

void VAbstractOperation::updatePointNamePosition ( quint32  id,
const QPointF &  pos 
)
protected

◆ updatePointNameVisibility

void VAbstractOperation::updatePointNameVisibility ( quint32  id,
bool  visible 
)
virtualslot

Member Data Documentation

◆ destination

◆ operatedObjects

◆ source

◆ suffix

QString VAbstractOperation::suffix
protected

Definition at line 157 of file vabstractoperation.h.

Referenced by VToolMirrorByAxis::Create(), VToolMirrorByLine::Create(), VToolMove::Create(), VToolRotation::Create(), VAbstractMirror::createArc(), VToolRotation::createArc(), VToolMove::createArc(), VAbstractMirror::createCurve(), VToolRotation::createCurve(), VToolMove::createCurve(), VAbstractMirror::createCurveWithSegments(), VToolRotation::createCurveWithSegments(), VToolMove::createCurveWithSegments(), VAbstractMirror::createDestination(), VAbstractMirror::createItem(), VToolRotation::createItem(), VToolMove::createItem(), VAbstractMirror::createPoint(), VToolRotation::createPoint(), VToolMove::createPoint(), VToolMirrorByAxis::ReadToolAttributes(), VToolMirrorByLine::ReadToolAttributes(), ReadToolAttributes(), VToolMove::ReadToolAttributes(), VToolRotation::ReadToolAttributes(), VToolMirrorByAxis::SaveOptions(), VToolMirrorByLine::SaveOptions(), SaveOptions(), VToolMove::SaveOptions(), VToolRotation::SaveOptions(), VToolMirrorByAxis::setDialog(), VToolMirrorByLine::setDialog(), VToolMove::setDialog(), VToolRotation::setDialog(), setSuffix(), Suffix(), VAbstractMirror::updateArc(), VToolRotation::updateArc(), VToolMove::updateArc(), VAbstractMirror::updateCurve(), VToolRotation::updateCurve(), VToolMove::updateCurve(), VAbstractMirror::updateCurveWithSegments(), VToolRotation::updateCurveWithSegments(), VToolMove::updateCurveWithSegments(), VAbstractMirror::updateItem(), VToolRotation::updateItem(), VToolMove::updateItem(), VAbstractMirror::updatePoint(), VToolRotation::updatePoint(), and VToolMove::updatePoint().

◆ TagDestination

const QString VAbstractOperation::TagDestination = QStringLiteral("destination")
static

◆ TagItem

const QString VAbstractOperation::TagItem = QStringLiteral("item")
static

Definition at line 103 of file vabstractoperation.h.

Referenced by SaveSourceDestination().

◆ TagSource

const QString VAbstractOperation::TagSource = QStringLiteral("source")
static

Definition at line 104 of file vabstractoperation.h.

Referenced by ExtractData(), and SaveSourceDestination().


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