56 #include <QSharedPointer>
57 #include <QStaticStringData>
58 #include <QStringData>
59 #include <QStringDataPtr>
62 #include "../../../../../dialogs/tools/dialogendline.h"
63 #include "../../../../../dialogs/tools/dialogtool.h"
64 #include "../../../../../visualization/visualization.h"
65 #include "../../../../../visualization/line/vistoolendline.h"
66 #include "../ifc/exception/vexception.h"
67 #include "../ifc/ifcdef.h"
68 #include "../vgeometry/vpointf.h"
69 #include "../vmisc/vabstractapplication.h"
70 #include "../vmisc/vcommonsettings.h"
71 #include "../vpatterndb/vcontainer.h"
72 #include "../vpatterndb/vtranslatevars.h"
73 #include "../vwidgets/vmaingraphicsscene.h"
74 #include "../../../../vabstracttool.h"
75 #include "../../../vdrawtool.h"
98 const QString &lineType,
const QString &lineWeight,
99 const QString &lineColor,
const QString &formulaLength,
const QString &formulaAngle,
100 const quint32 &basePointId,
const Source &typeCreation, QGraphicsItem *parent)
101 :
VToolLinePoint(doc, data, id, lineType, lineWeight, lineColor, formulaLength, basePointId, 0, parent)
102 , formulaAngle(formulaAngle)
124 dialogTool->SetPointName(p->name());
142 const QString pointName = dialogTool->getPointName();
143 const QString
lineColor = dialogTool->getLineColor();
144 const QString lineType = dialogTool->getLineType();
145 const QString lineWeight = dialogTool->getLineWeight();
148 const quint32
basePointId = dialogTool->GetBasePointId();
152 if (point !=
nullptr)
181 const QString &lineType,
const QString &lineWeight,
182 const QString &lineColor, QString &formulaLength, QString &formulaAngle,
183 quint32 basePointId, qreal mx, qreal my,
bool showPointName,
186 const Source &typeCreation)
189 QLineF line = QLineF(
static_cast<QPointF
>(*basePoint), QPointF(basePoint->x()+100, basePoint->y()));
217 scene->addItem(point);
235 ContextMenu<DialogEndLine>(event,
id);
287 if (not
vis.isNull())
314 if (value.
error() ==
false)
326 ShowToolVisualization<VisToolEndLine>(show);
The DialogEndLine class dialog for ToolEndLine. Help create point and edit option.
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 void InitToolConnections(VMainGraphicsScene *scene, T *tool)
The VContainer class container of all variables.
void AddLine(const quint32 &firstPointId, const quint32 &secondPointId)
AddLine add line to container.
const QSharedPointer< VGObject > GetGObject(quint32 id) const
GetGObject returns a point by id.
const QSharedPointer< T > GeometricObject(const quint32 &id) const
quint32 AddGObject(VGObject *obj)
AddGObject add new GObject to container.
void UpdateGObject(quint32 id, T *obj)
UpdateGObject update GObject by id.
static QString GetParametrString(const QDomElement &domElement, const QString &name, const QString &defValue=QString())
Returns the string value of the given attribute. RENAME: see above.
static quint32 GetParametrUInt(const QDomElement &domElement, const QString &name, const QString &defValue)
Returns the long long value of the given attribute. RENAME: GetParameterLongLong?
void SetAttribute(QDomElement &domElement, const QString &name, const T &value) const
SetAttribute set attribute in pattern file. Replace "," by ".".
The VMainGraphicsScene class main scene.
The VPointF class keep data of point.
void setShowPointName(bool show)
void setLineWeight(const QString &value)
void setObject1Id(const quint32 &value)
void setLineStyle(const Qt::PenStyle &value)
const QString degreeSymbol
const QString AttrBasePoint
const QString AttrLineType
const QString LineTypeSolidLine
const QString AttrLineWeight
const QString AttrLineColor
Qt::PenStyle lineTypeToPenStyle(const QString &lineType)
LineStyle return pen style for current line style.