54 #include <QDomElement>
56 #include <QSharedPointer>
57 #include <QStaticStringData>
58 #include <QStringData>
59 #include <QStringDataPtr>
63 #include "../../../dialogs/tools/dialogtool.h"
64 #include "../../../dialogs/tools/dialogcubicbezierpath.h"
65 #include "../../../visualization/visualization.h"
66 #include "../../../visualization/path/vistoolcubicbezierpath.h"
67 #include "../ifc/exception/vexception.h"
68 #include "../ifc/xml/vdomdocument.h"
69 #include "../ifc/ifcdef.h"
70 #include "../vgeometry/vabstractcubicbezierpath.h"
71 #include "../vgeometry/vabstractcurve.h"
72 #include "../vgeometry/vcubicbezierpath.h"
73 #include "../vgeometry/vgobject.h"
74 #include "../vgeometry/vpointf.h"
75 #include "../vmisc/vabstractapplication.h"
76 #include "../vpatterndb/vcontainer.h"
77 #include "../vwidgets/vmaingraphicsscene.h"
78 #include "../../vabstracttool.h"
79 #include "../vdrawtool.h"
86 const Source &typeCreation, QGraphicsItem *parent)
91 this->setFlag(QGraphicsItem::ItemIsFocusable,
true);
100 auto dialogTool = qobject_cast<DialogCubicBezierPath*>(
m_dialog);
105 dialogTool->setPenStyle(
splPath->GetPenStyle());
106 dialogTool->setLineWeight(
splPath->getLineWeight());
117 const QString color = dialogTool->getLineColor();
118 const QString penStyle = dialogTool->getPenStyle();
119 const QString lineWeight = dialogTool->getLineWeight();
120 for (qint32 i = 0; i < path->CountPoints(); ++i)
125 path->SetPenStyle(penStyle);
139 const Source &typeCreation)
198 ShowToolVisualization<VisToolCubicBezierPath>(show);
208 ContextMenu<DialogCubicBezierPath>(event);
221 for (qint32 i = 0; i <
splPath->CountSubSpl(); ++i)
231 const auto dialogTool = qobject_cast<DialogCubicBezierPath*>(
m_dialog);
254 if (not
vis.isNull())
256 auto visual = qobject_cast<VisToolCubicBezierPath *>(
vis);
260 visual->setPath(*
splPath.data());
263 visual->RefreshGeometry();
282 domElement.appendChild(pathPoint);
void setLineWeight(const QString &value)
setLineWeight set weight of the lines
void setLineColor(const QString &value)
void setLineColor(const QString &color)
quint32 GetDuplicate() const
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.
virtual void DecrementReferens(quint32 id) const =0
virtual void SaveOptions(QDomElement &tag, QSharedPointer< VGObject > &obj) Q_DECL_OVERRIDE
static void InitSplinePathToolConnections(VMainGraphicsScene *scene, T *tool)
The VContainer class container of all variables.
const QSharedPointer< VGObject > GetGObject(quint32 id) const
GetGObject returns a point by id.
const QSharedPointer< T > GeometricObject(const quint32 &id) const
void AddCurveWithSegments(const QSharedPointer< VAbstractCubicBezierPath > &curve, const quint32 &id, quint32 parentId=null_id)
quint32 AddGObject(VGObject *obj)
AddGObject add new GObject to container.
void UpdateGObject(quint32 id, T *obj)
UpdateGObject update GObject by id.
virtual qint32 CountPoints() const Q_DECL_OVERRIDE
const VPointF & at(int indx) const
void SetAttribute(QDomElement &domElement, const QString &name, const T &value) const
SetAttribute set attribute in pattern file. Replace "," by ".".
static void RemoveAllChildren(QDomElement &domElement)
RemoveAllChildren remove all children from file.
quint32 id() const
id return id object.
The VMainGraphicsScene class main scene.
The VPointF class keep data of point.
const QString AttrDuplicate
const QString AttrLineWeight
const QString AttrPSpline
const QString AttrPenStyle
const QString AttrPathPoint
Qt::PenStyle lineTypeToPenStyle(const QString &lineType)
LineStyle return pen style for current line style.