The VAbstractNode class parent class for all detail node. More...
#include <vabstractnode.h>
Public Member Functions | |
VAbstractNode (VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode, const QString &blockName=QString(), const quint32 &idTool=0, QObject *parent=nullptr) | |
VAbstractNode constructor. More... | |
virtual | ~VAbstractNode () Q_DECL_EQ_DEFAULT |
virtual void | ShowVisualization (bool show) Q_DECL_OVERRIDE |
virtual void | incrementReferens () Q_DECL_OVERRIDE |
incrementReferens increment referens. More... | |
virtual void | decrementReferens () Q_DECL_OVERRIDE |
decrementReferens decrement reference for all parent objects. More... | |
ParentType | GetParentType () const |
void | SetParentType (const ParentType &value) |
virtual void | GroupVisibility (quint32 object, bool visible) Q_DECL_OVERRIDE |
bool | IsExluded () const |
void | SetExluded (bool exluded) |
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 VContainer * | getData () const |
getData return pointer to data container. More... | |
QMap< QString, quint32 > | PointsList () const |
virtual QString | getTagName () const =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... | |
Static Public Attributes | |
static const QString | AttrIdTool = QStringLiteral("idTool") |
Static Public Attributes inherited from VAbstractTool | |
static bool | m_suppressContextMenu = false |
static const QString | AttrInUse = QStringLiteral("inUse") |
Protected Member Functions | |
void | AddToModeling (const QDomElement &domElement) |
AddToModeling add tag to modeling tag current pattern peace. More... | |
virtual void | ToolCreation (const Source &typeCreation) Q_DECL_OVERRIDE |
virtual void | SetVisualization () Q_DECL_OVERRIDE |
virtual void | ShowNode ()=0 |
virtual void | HideNode ()=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 () |
Protected Attributes | |
ParentType | parentType |
quint32 | idNode |
idNodenode id. More... | |
quint32 | idTool |
idTool id tool. More... | |
QString | m_blockName |
bool | m_exluded |
Protected Attributes inherited from VAbstractTool | |
VAbstractPattern * | doc |
doc dom document container More... | |
const quint32 | m_id |
id object id. More... | |
QPointer< Visualization > | vis |
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 | |
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) |
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 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< VPieceNode > | PrepareNodes (const VPiecePath &path, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) |
static quint32 | PrepareNode (const VPieceNode &node, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) |
The VAbstractNode class parent class for all detail node.
Definition at line 70 of file vabstractnode.h.
VAbstractNode::VAbstractNode | ( | VAbstractPattern * | doc, |
VContainer * | data, | ||
const quint32 & | id, | ||
const quint32 & | idNode, | ||
const QString & | blockName = QString() , |
||
const quint32 & | idTool = 0 , |
||
QObject * | parent = nullptr |
||
) |
VAbstractNode constructor.
doc | dom document container. |
data | container with variables. |
id | object id in container. |
idNode | object id in containerNode. |
idTool | id tool. |
parent | parent object. |
Definition at line 82 of file vabstractnode.cpp.
References VDataTool::_referens, and Item.
|
virtual |
|
protected |
AddToModeling add tag to modeling tag current pattern peace.
domElement | tag. |
Definition at line 200 of file vabstractnode.cpp.
References VAbstractTool::doc, m_blockName, and qApp.
Referenced by AnchorPointTool::AddToFile(), VNodeArc::AddToFile(), VNodeEllipticalArc::AddToFile(), VNodePoint::AddToFile(), VNodeSpline::AddToFile(), VNodeSplinePath::AddToFile(), and VToolInternalPath::AddToFile().
|
virtual |
decrementReferens decrement reference for all parent objects.
Reimplemented from VDataTool.
Reimplemented in VToolInternalPath.
Definition at line 128 of file vabstractnode.cpp.
References VDataTool::_referens, VAbstractTool::AttrInUse, VDataTool::data, VDataTool::decrementReferens(), VAbstractPattern::DecrementReferens(), VAbstractTool::doc, VDomDocument::elementById(), VContainer::GetGObject(), VAbstractTool::getTagName(), HideNode(), idNode, idTool, VAbstractTool::m_id, NotInUse, NULL_ID, and VDomDocument::SetParametrUsage().
ParentType VAbstractNode::GetParentType | ( | ) | const |
Definition at line 152 of file vabstractnode.cpp.
References parentType.
|
virtual |
Implements VDataTool.
Definition at line 164 of file vabstractnode.cpp.
|
protectedpure virtual |
Implemented in VToolInternalPath, VNodeSplinePath, VNodeSpline, VNodePoint, VNodeEllipticalArc, VNodeArc, and AnchorPointTool.
Referenced by decrementReferens().
|
virtual |
incrementReferens increment referens.
Reimplemented from VDataTool.
Reimplemented in VToolInternalPath.
Definition at line 101 of file vabstractnode.cpp.
References VDataTool::_referens, VAbstractTool::AttrInUse, VDataTool::data, VAbstractTool::doc, VDomDocument::elementById(), VContainer::GetGObject(), VAbstractTool::getTagName(), idNode, idTool, VDataTool::incrementReferens(), VAbstractPattern::IncrementReferens(), InUse, VAbstractTool::m_id, NULL_ID, VDomDocument::SetParametrUsage(), and ShowNode().
bool VAbstractNode::IsExluded | ( | ) | const |
Definition at line 171 of file vabstractnode.cpp.
References m_exluded.
void VAbstractNode::SetExluded | ( | bool | exluded | ) |
Definition at line 177 of file vabstractnode.cpp.
References m_exluded.
Referenced by PatternPieceTool::initializeNode(), and PatternPieceTool::UpdateExcludeState().
void VAbstractNode::SetParentType | ( | const ParentType & | value | ) |
Definition at line 158 of file vabstractnode.cpp.
References parentType.
Referenced by VToolInternalPath::Create(), VNodePoint::Create(), and PatternPieceTool::initializeNode().
|
inlineprotectedvirtual |
Implements VAbstractTool.
Definition at line 105 of file vabstractnode.h.
|
protectedpure virtual |
Implemented in VToolInternalPath, VNodeSplinePath, VNodeSpline, VNodePoint, VNodeEllipticalArc, VNodeArc, and AnchorPointTool.
Referenced by incrementReferens().
|
virtual |
Implements VAbstractTool.
Definition at line 95 of file vabstractnode.cpp.
|
protectedvirtual |
Reimplemented from VAbstractTool.
Reimplemented in VToolInternalPath.
Definition at line 183 of file vabstractnode.cpp.
References VAbstractTool::AddToFile(), FromGui, FromTool, and VAbstractTool::RefreshDataInFile().
Referenced by AnchorPointTool::AnchorPointTool(), VNodeArc::VNodeArc(), VNodeEllipticalArc::VNodeEllipticalArc(), VNodePoint::VNodePoint(), VNodeSpline::VNodeSpline(), and VNodeSplinePath::VNodeSplinePath().
|
static |
Definition at line 77 of file vabstractnode.h.
Referenced by AnchorPointTool::AddToFile(), VNodeArc::AddToFile(), VNodeEllipticalArc::AddToFile(), VNodePoint::AddToFile(), VNodeSpline::AddToFile(), VNodeSplinePath::AddToFile(), VToolInternalPath::AddToFile(), VPattern::ParseAnchorPoint(), VPattern::ParseNodeArc(), VPattern::ParseNodeEllipticalArc(), VPattern::ParseNodePoint(), VPattern::ParsePathElement(), and VPattern::SplinesCommonAttributes().
|
protected |
idNodenode id.
Definition at line 94 of file vabstractnode.h.
Referenced by AnchorPointTool::AddToFile(), VNodeArc::AddToFile(), VNodeEllipticalArc::AddToFile(), VNodePoint::AddToFile(), VNodeSpline::AddToFile(), VNodeSplinePath::AddToFile(), decrementReferens(), and incrementReferens().
|
protected |
idTool id tool.
Definition at line 97 of file vabstractnode.h.
Referenced by AnchorPointTool::AddToFile(), VNodeArc::AddToFile(), VNodeEllipticalArc::AddToFile(), VNodePoint::AddToFile(), VNodeSpline::AddToFile(), VNodeSplinePath::AddToFile(), VToolInternalPath::AddToFile(), VToolInternalPath::Create(), AnchorPointTool::Create(), VNodeArc::Create(), VNodeEllipticalArc::Create(), VNodeSpline::Create(), VNodeSplinePath::Create(), VNodePoint::Create(), decrementReferens(), VToolInternalPath::decrementReferens(), incrementReferens(), and VToolInternalPath::incrementReferens().
|
protected |
Definition at line 99 of file vabstractnode.h.
Referenced by AddToModeling().
|
protected |
Definition at line 101 of file vabstractnode.h.
Referenced by IsExluded(), SetExluded(), and VNodePoint::ShowNode().
|
protected |
Definition at line 91 of file vabstractnode.h.
Referenced by GetParentType(), SetParentType(), VNodePoint::ShowNode(), and VToolInternalPath::ShowNode().