The UnionTool class tool union details. More...
#include <union_tool.h>
Public Slots | |
virtual void | FullUpdateFromFile () Q_DECL_OVERRIDE |
FullUpdateFromFile update tool data form file. More... | |
virtual void | AllowHover (bool) Q_DECL_OVERRIDE |
virtual void | AllowSelecting (bool) Q_DECL_OVERRIDE |
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 QString | getTagName () const Q_DECL_OVERRIDE |
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 referens. More... | |
virtual void | GroupVisibility (quint32 object, bool visible) Q_DECL_OVERRIDE |
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 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 Member Functions | |
static UnionTool * | Create (QSharedPointer< DialogTool > dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) |
Create help create tool from GUI. More... | |
static UnionTool * | Create (const quint32 _id, const UnionToolInitData &initData) |
Create help create tool. More... | |
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 | ToolType = QStringLiteral("union") |
static const QString | TagUnionPiece = QStringLiteral("unionPiece") |
static const QString | TagNode = QStringLiteral("node") |
static const QString | TagChildren = QStringLiteral("children") |
static const QString | TagChild = QStringLiteral("child") |
static const QString | AttrIndexD1 = QStringLiteral("indexD1") |
static const QString | AttrIndexD2 = QStringLiteral("indexD2") |
static const QString | AttrIdObject = QStringLiteral("idObject") |
static const QString | AttrNodeType = QStringLiteral("nodeType") |
static const QString | NodeTypeContour = QStringLiteral("Contour") |
static const QString | NodeTypeModeling = QStringLiteral("Modeling") |
Static Public Attributes inherited from VAbstractTool | |
static bool | m_suppressContextMenu = false |
static const QString | AttrInUse = QStringLiteral("inUse") |
Protected Member Functions | |
virtual void | AddToFile () Q_DECL_OVERRIDE |
AddToFile add tag with Information about tool into file. More... | |
virtual void | SetVisualization () Q_DECL_OVERRIDE |
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 | ToolCreation (const Source &typeCreation) |
Private Member Functions | |
UnionTool (quint32 id, const UnionToolInitData &initData, QObject *parent=nullptr) | |
piece2_Index index edge in second detail. More... | |
void | addPiece (QDomElement &domElement, const VPiece &d) const |
addPiece add piece to xml file. More... | |
void | AddToModeling (const QDomElement &domElement) |
AddToModeling add tool to xml tree. More... | |
QVector< quint32 > | GetReferenceObjects () const |
QVector< quint32 > | ReferenceObjects (const QDomElement &root, const QString &tag, const QString &attribute) const |
Private Attributes | |
quint32 | piece1_Id |
quint32 | piece2_Id |
d1 first detail id. More... | |
quint32 | piece1_Index |
d2 second detail id. More... | |
quint32 | piece2_Index |
piece1_Index index edge in first detail. 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 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) |
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... | |
The UnionTool class tool union details.
Definition at line 104 of file union_tool.h.
|
private |
piece2_Index index edge in second detail.
UnionTool costructor.
id | object id in container. |
initData | global init data. |
parent | parent object. |
Definition at line 1425 of file union_tool.cpp.
References VDataTool::_referens, VAbstractTool::ToolCreation(), and UnionToolInitData::typeCreation.
Referenced by Create().
|
private |
addPiece add piece to xml file.
domElement | tag in xml tree. |
piece | piece. |
Definition at line 1589 of file union_tool.cpp.
References PatternPieceTool::addAnchors(), PatternPieceTool::AddCSARecords(), PatternPieceTool::AddInternalPaths(), VAbstractTool::AddNodes(), VAbstractTool::doc, VPiece::getAnchors(), VPiece::GetCustomSARecords(), VPiece::GetInternalPaths(), and TagUnionPiece.
Referenced by AddToFile().
|
protectedvirtual |
AddToFile add tag with Information about tool into file.
Implements VAbstractTool.
Definition at line 1568 of file union_tool.cpp.
References addPiece(), AddToModeling(), VDomDocument::AttrId, AttrIndexD1, AttrIndexD2, AttrType, VDataTool::data, VAbstractTool::doc, VContainer::GetPiece(), getTagName(), VAbstractTool::m_id, piece1_Id, piece1_Index, piece2_Id, piece2_Index, VDomDocument::SetAttribute(), and ToolType.
|
private |
AddToModeling add tool to xml tree.
domElement | tag in xml tree. |
Definition at line 1608 of file union_tool.cpp.
References VAbstractTool::doc, QT_WARNING_POP::getBlockName(), VAbstractPattern::getDraftBlockElement(), piece1_Id, piece2_Id, SCASSERT, and VAbstractPattern::TagModeling.
Referenced by AddToFile().
|
inlinevirtualslot |
Definition at line 135 of file union_tool.h.
|
inlinevirtualslot |
Definition at line 136 of file union_tool.h.
|
static |
Create help create tool.
_id | tool id, 0 if tool doesn't exist yet. |
initData | contains all init data. |
Definition at line 1534 of file union_tool.cpp.
References VAbstractTool::AddRecord(), VAbstractPattern::AddTool(), VAbstractPattern::AddToolOnRemove(), UnionToolInitData::data, UnionToolInitData::doc, FromGui, FullParse, VContainer::getNextId(), UnionToolInitData::parse, UnionToolInitData::typeCreation, Union, UnionTool(), QT_WARNING_POP::unitePieces(), and VAbstractPattern::UpdateToolData().
|
static |
Create help create tool from GUI.
dialog | dialog. |
doc | dom document container. |
data | container with variables. |
Definition at line 1503 of file union_tool.cpp.
References VDataTool::data, VAbstractTool::doc, FromGui, FullParse, UnionToolInitData::piece1_Id, qApp, and SCASSERT.
Referenced by VPattern::ParseToolsElement().
|
virtual |
decrementReferens decrement referens.
Reimplemented from VDataTool.
Definition at line 1470 of file union_tool.cpp.
References VDataTool::_referens, VAbstractTool::AttrInUse, VDataTool::decrementReferens(), VAbstractPattern::DecrementReferens(), VAbstractTool::doc, VDomDocument::elementById(), GetReferenceObjects(), getTagName(), VAbstractTool::m_id, NotInUse, and VDomDocument::SetParametrUsage().
|
inlinevirtualslot |
FullUpdateFromFile update tool data form file.
Definition at line 134 of file union_tool.h.
|
private |
Definition at line 1626 of file union_tool.cpp.
References AttrIdObject, VAbstractPattern::AttrPath, VAbstractTool::doc, VDomDocument::elementById(), getTagName(), VAbstractTool::m_id, ReferenceObjects(), PatternPieceTool::TagAnchors, PatternPieceTool::TagCSA, PatternPieceTool::TagIPaths, TagNode, VAbstractPattern::TagNodes, PatternPieceTool::TagRecord, and TagUnionPiece.
Referenced by decrementReferens(), and incrementReferens().
|
virtual |
Implements VAbstractTool.
Definition at line 1438 of file union_tool.cpp.
References VAbstractPattern::TagTools.
Referenced by AddToFile(), decrementReferens(), GetReferenceObjects(), and incrementReferens().
|
virtual |
Implements VDataTool.
Definition at line 1490 of file union_tool.cpp.
|
virtual |
incrementReferens increment referens.
Reimplemented from VDataTool.
Definition at line 1450 of file union_tool.cpp.
References VDataTool::_referens, VAbstractTool::AttrInUse, VAbstractTool::doc, VDomDocument::elementById(), GetReferenceObjects(), getTagName(), VDataTool::incrementReferens(), VAbstractPattern::IncrementReferens(), InUse, VAbstractTool::m_id, and VDomDocument::SetParametrUsage().
|
private |
Definition at line 1686 of file union_tool.cpp.
References VAbstractTool::doc, VDomDocument::GetParametrUInt(), NULL_ID, and NULL_ID_STR.
Referenced by GetReferenceObjects().
|
inlineprotectedvirtual |
Implements VAbstractTool.
Definition at line 140 of file union_tool.h.
|
virtual |
Implements VAbstractTool.
Definition at line 1444 of file union_tool.cpp.
|
static |
Definition at line 119 of file union_tool.h.
Referenced by GetReferenceObjects().
|
static |
Definition at line 117 of file union_tool.h.
Referenced by AddToFile(), and VPattern::ParseToolsElement().
|
static |
Definition at line 118 of file union_tool.h.
Referenced by AddToFile(), and VPattern::ParseToolsElement().
|
static |
Definition at line 120 of file union_tool.h.
|
static |
Definition at line 121 of file union_tool.h.
|
static |
Definition at line 122 of file union_tool.h.
|
private |
Definition at line 145 of file union_tool.h.
Referenced by AddToFile(), and AddToModeling().
|
private |
|
private |
d1 first detail id.
Definition at line 146 of file union_tool.h.
Referenced by AddToFile(), and AddToModeling().
|
private |
piece1_Index index edge in first detail.
Definition at line 148 of file union_tool.h.
Referenced by AddToFile().
|
static |
Definition at line 116 of file union_tool.h.
Referenced by QT_WARNING_POP::GetChildren(), and QT_WARNING_POP::SaveChildren().
|
static |
Definition at line 115 of file union_tool.h.
Referenced by QT_WARNING_POP::GetChildren(), and QT_WARNING_POP::GetTagChildren().
|
static |
Definition at line 114 of file union_tool.h.
Referenced by GetReferenceObjects().
|
static |
Definition at line 113 of file union_tool.h.
Referenced by addPiece(), QT_WARNING_POP::GetPiece2Anchors(), QT_WARNING_POP::GetPiece2CSAPaths(), QT_WARNING_POP::GetPiece2InternalPaths(), QT_WARNING_POP::GetPiecePath(), and GetReferenceObjects().
|
static |
Definition at line 112 of file union_tool.h.
Referenced by AddToFile(), and VPattern::ParseToolsElement().