53 #include "../../dialogs/tools/piece/dialoginternalpath.h"
54 #include "../vpatterndb/vpiecepath.h"
55 #include "../vpatterndb/vpiecenode.h"
56 #include "../../undocommands/savepieceoptions.h"
57 #include "../vmisc/vcommonsettings.h"
58 #include "../pattern_piece_tool.h"
68 const quint32 pieceId = dialogTool->GetPieceId();
69 qApp->getUndoStack()->beginMacro(
"add path");
79 const Source &typeCreation,
const QString &blockName,
const quint32 &idTool)
108 pathTool->setParent(tool);
117 pathTool->setParentItem(saTool);
123 scene->addItem(pathTool);
144 QPen toolPen = pen();
148 QGraphicsPathItem::paint(painter, option, widget);
167 if (domElement.isElement())
190 if (domElement.isElement())
251 VPiece newPiece = oldPiece;
266 qApp->getUndoStack()->push(saveCommand);
295 qApp->getUndoStack()->endMacro();
306 const Source &typeCreation,
const QString &blockName,
const quint32 &idTool,
307 QObject *qoParent, QGraphicsItem *parent)
308 :
VAbstractNode(doc, data, id, 0, blockName, idTool, qoParent),
309 QGraphicsPathItem(parent),
324 p.setFillRule(Qt::OddEvenFill);
327 QPen pen = this->pen();
The VAbstractNode class parent class for all detail node.
static const QString AttrIdTool
quint32 idTool
idTool id tool.
void AddToModeling(const QDomElement &domElement)
AddToModeling add tag to modeling tag current pattern peace.
void SetParentType(const ParentType &value)
virtual void LiteParseTree(const Document &parse)=0
virtual void UpdateToolData(const quint32 &id, VContainer *data)=0
virtual void IncrementReferens(quint32 id) const =0
static void AddTool(quint32 id, VDataTool *tool)
AddTool add tool to list tools.
static VDataTool * getTool(quint32 id)
getTool return tool from tool list.
static const QString TagPath
virtual void DecrementReferens(quint32 id) const =0
The VContainer class container of all variables.
void UpdatePiece(quint32 id, const VPiece &piece)
void UpdatePiecePath(quint32 id, const VPiecePath &path)
VPiecePath GetPiecePath(quint32 id) const
quint32 AddPiecePath(const VPiecePath &path)
VPiece GetPiece(quint32 id) const
QDomElement elementById(quint32 id, const QString &tagName=QString())
static void SetParametrUsage(QDomElement &domElement, const QString &name, const NodeUsage &value)
void SetAttribute(QDomElement &domElement, const QString &name, const T &value) const
SetAttribute set attribute in pattern file. Replace "," by ".".
static const QString AttrId
The VMainGraphicsScene class main scene.
PiecePathType GetType() const
qint32 CountNodes() const
Qt::PenStyle GetPenType() const
const VPieceNode & at(int indx) const
QPainterPath PainterPath(const VContainer *data) const
QVector< CustomSARecord > GetCustomSARecords() const
QVector< quint32 > GetInternalPaths() const
void NeedLiteParsing(const Document &parse)
double ToPixel(double val, const Unit &unit)
qreal sceneScale(QGraphicsScene *scene)
qreal scaleWidth(qreal width, qreal scale)
const QString AttrLineType
QString PenStyleToLineType(Qt::PenStyle penStyle)
VPiecePath GetPiecePath(int piece, VAbstractPattern *doc, quint32 id)
The CustomSA struct contains record about custom seam allowanse (SA).