#include <vtoolinternalpath.h>
Public Types | |
enum | { Type = UserType + static_cast<int>(Tool::InternalPath) } |
Public Slots | |
virtual void | FullUpdateFromFile () Q_DECL_OVERRIDE |
virtual void | AllowHover (bool enabled) Q_DECL_OVERRIDE |
virtual void | AllowSelecting (bool enabled) 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 int | type () const Q_DECL_OVERRIDE |
virtual QString | getTagName () const Q_DECL_OVERRIDE |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) 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... | |
Public Member Functions inherited from 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. More... | |
virtual | ~VAbstractNode () Q_DECL_EQ_DEFAULT |
virtual void | ShowVisualization (bool show) Q_DECL_OVERRIDE |
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 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 VToolInternalPath * | Create (QSharedPointer< DialogTool > dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) |
static VToolInternalPath * | Create (quint32 _id, const VPiecePath &path, quint32 pieceId, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation, const QString &blockName=QString(), const quint32 &idTool=0) |
static void | AddAttributes (VAbstractPattern *doc, QDomElement &domElement, quint32 id, const VPiecePath &path) |
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... | |
Protected Member Functions | |
virtual void | AddToFile () Q_DECL_OVERRIDE |
AddToFile add tag with Information about tool into file. More... | |
virtual void | ShowNode () Q_DECL_OVERRIDE |
virtual void | HideNode () Q_DECL_OVERRIDE |
virtual void | ToolCreation (const Source &typeCreation) Q_DECL_OVERRIDE |
Protected Member Functions inherited from VAbstractNode | |
void | AddToModeling (const QDomElement &domElement) |
AddToModeling add tag to modeling tag current pattern peace. 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 () |
Private Member Functions | |
VToolInternalPath (VAbstractPattern *doc, VContainer *data, quint32 id, quint32 pieceId, const Source &typeCreation, const QString &blockName=QString(), const quint32 &idTool=0, QObject *qoParent=nullptr, QGraphicsItem *parent=nullptr) | |
void | RefreshGeometry () |
void | IncrementNodes (const VPiecePath &path) const |
void | DecrementNodes (const VPiecePath &path) const |
Private Attributes | |
quint32 | m_pieceId |
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 Attributes inherited from VAbstractNode | |
static const QString | AttrIdTool = QStringLiteral("idTool") |
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< 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 VAbstractNode | |
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... | |
Definition at line 61 of file vtoolinternalpath.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 73 of file vtoolinternalpath.h.
|
private |
Definition at line 305 of file vtoolinternalpath.cpp.
References VDataTool::data, QT_WARNING_POP::GetPiecePath(), IncrementNodes(), RefreshGeometry(), and ToolCreation().
Referenced by Create().
|
static |
Definition at line 198 of file vtoolinternalpath.cpp.
References AttrCut, VDomDocument::AttrId, AttrLineType, AttrName, AttrType, VAbstractTool::doc, VPiecePath::GetName(), VPiecePath::GetPenType(), VPiecePath::GetType(), InternalPath, VPiecePath::IsCutPath(), PenStyleToLineType(), and VDomDocument::SetAttribute().
Referenced by AddToFile(), SavePiecePathOptions::redo(), and SavePiecePathOptions::undo().
|
protectedvirtual |
AddToFile add tag with Information about tool into file.
Implements VAbstractTool.
Definition at line 232 of file vtoolinternalpath.cpp.
References AddAttributes(), VAbstractTool::AddNodes(), VAbstractNode::AddToModeling(), VAbstractNode::AttrIdTool, CustomSeamAllowance, VDataTool::data, VAbstractTool::doc, VPiece::GetCustomSARecords(), VPiece::GetInternalPaths(), VContainer::GetPiece(), VContainer::GetPiecePath(), getTagName(), VPiecePath::GetType(), VAbstractNode::idTool, InternalPath, VAbstractPattern::LiteParseTree(), VAbstractTool::m_id, m_pieceId, VUndoCommand::NeedLiteParsing(), NULL_ID, CustomSARecord::path, qApp, SavePieceOptions, VDomDocument::SetAttribute(), and VContainer::UpdatePiece().
Referenced by ToolCreation().
|
virtualslot |
Definition at line 218 of file vtoolinternalpath.cpp.
|
virtualslot |
Definition at line 225 of file vtoolinternalpath.cpp.
|
static |
Definition at line 61 of file vtoolinternalpath.cpp.
References VDataTool::data, VAbstractTool::doc, FromGui, FullParse, VAbstractTool::PrepareNodes(), qApp, and SCASSERT.
Referenced by MainWindow::ClosedDialogInternalPath(), QT_WARNING_POP::createCSAUnion(), QT_WARNING_POP::createUnionInternalPaths(), and VPattern::ParsePathElement().
|
static |
Definition at line 77 of file vtoolinternalpath.cpp.
References VContainer::AddPiecePath(), VAbstractTool::AddRecord(), VAbstractPattern::AddTool(), VDataTool::data, VAbstractTool::doc, FromGui, FullParse, VAbstractPattern::getTool(), VPiecePath::GetType(), VAbstractNode::idTool, InternalPath, Item, NULL_ID, SCASSERT, Scene, VAbstractNode::SetParentType(), VContainer::UpdatePiecePath(), VAbstractPattern::UpdateToolData(), and VToolInternalPath().
|
private |
Definition at line 343 of file vtoolinternalpath.cpp.
References VPiecePath::at(), VPiecePath::CountNodes(), VDataTool::data, VAbstractPattern::DecrementReferens(), VAbstractTool::doc, and VPieceNode::GetId().
Referenced by decrementReferens().
|
virtual |
decrementReferens decrement reference for all parent objects.
Reimplemented from VAbstractNode.
Definition at line 175 of file vtoolinternalpath.cpp.
References VDataTool::_referens, VAbstractTool::AttrInUse, VDataTool::data, DecrementNodes(), VDataTool::decrementReferens(), VAbstractPattern::DecrementReferens(), VAbstractTool::doc, VDomDocument::elementById(), QT_WARNING_POP::GetPiecePath(), getTagName(), HideNode(), VAbstractNode::idTool, VAbstractTool::m_id, NotInUse, NULL_ID, and VDomDocument::SetParametrUsage().
|
virtualslot |
Definition at line 212 of file vtoolinternalpath.cpp.
References RefreshGeometry().
|
virtual |
Implements VAbstractTool.
Definition at line 134 of file vtoolinternalpath.cpp.
References VAbstractPattern::TagPath.
Referenced by AddToFile(), decrementReferens(), and incrementReferens().
|
protectedvirtual |
Implements VAbstractNode.
Definition at line 282 of file vtoolinternalpath.cpp.
Referenced by decrementReferens().
|
private |
Definition at line 334 of file vtoolinternalpath.cpp.
References VPiecePath::at(), VPiecePath::CountNodes(), VDataTool::data, VAbstractTool::doc, VPieceNode::GetId(), and VAbstractPattern::IncrementReferens().
Referenced by incrementReferens(), and VToolInternalPath().
|
virtual |
incrementReferens increment referens.
Reimplemented from VAbstractNode.
Definition at line 152 of file vtoolinternalpath.cpp.
References VDataTool::_referens, VAbstractTool::AttrInUse, VDataTool::data, VAbstractTool::doc, VDomDocument::elementById(), QT_WARNING_POP::GetPiecePath(), getTagName(), VAbstractNode::idTool, IncrementNodes(), VDataTool::incrementReferens(), VAbstractPattern::IncrementReferens(), InUse, VAbstractTool::m_id, NULL_ID, VDomDocument::SetParametrUsage(), and ShowNode().
|
virtual |
Definition at line 140 of file vtoolinternalpath.cpp.
References Mm, qApp, scaleWidth(), sceneScale(), and ToPixel().
|
private |
Definition at line 318 of file vtoolinternalpath.cpp.
References VDataTool::data, VAbstractTool::getData(), VPiecePath::GetPenType(), VContainer::GetPiecePath(), VPiecePath::GetType(), InternalPath, VAbstractTool::m_id, and VPiecePath::PainterPath().
Referenced by FullUpdateFromFile(), and VToolInternalPath().
|
protectedvirtual |
Implements VAbstractNode.
Definition at line 273 of file vtoolinternalpath.cpp.
References VAbstractNode::parentType, and Scene.
Referenced by incrementReferens().
|
protectedvirtual |
Reimplemented from VAbstractNode.
Definition at line 288 of file vtoolinternalpath.cpp.
References AddToFile(), FromGui, FromTool, qApp, and VAbstractTool::RefreshDataInFile().
Referenced by VToolInternalPath().
|
inlinevirtual |
Definition at line 72 of file vtoolinternalpath.h.
References Type.
|
private |
Definition at line 95 of file vtoolinternalpath.h.
Referenced by AddToFile().