35 #include "../ifc/exception/vexception.h"
36 #include "../ifc/ifcdef.h"
37 #include "../vgeometry/vgobject.h"
38 #include "../vgeometry/vpointf.h"
39 #include "../vmisc/vabstractapplication.h"
40 #include "../vpatterndb/vcontainer.h"
41 #include "../vwidgets/vmaingraphicsscene.h"
42 #include "../../vdrawtool.h"
43 #include "../../../vabstracttool.h"
44 #include "../../../../dialogs/tools/dialogtool.h"
45 #include "../../../../dialogs/tools/point_intersectxy_dialog.h"
46 #include "../../../../visualization/visualization.h"
47 #include "../../../../visualization/line/point_intersectxy_visual.h"
50 #include <QSharedPointer>
51 #include <QStaticStringData>
52 #include <QStringData>
53 #include <QStringDataPtr>
75 const QString &lineType,
const QString &lineWeight,
76 const QString &lineColor,
77 const quint32 &firstPointId,
const quint32 &secondPointId,
78 const Source &typeCreation, QGraphicsItem *parent)
79 :
DoubleLinePointTool(doc, data, id, lineType, lineWeight, lineColor, firstPointId, secondPointId, parent)
94 dialogTool->setPointName(point->name());
117 const QString pointName = dialogTool->getPointName();
118 const quint32
firstPointId = dialogTool->getFirstPointId();
119 const quint32
secondPointId = dialogTool->getSecondPointId();
120 const QString lineType = dialogTool->getLineType();
121 const QString lineWeight = dialogTool->getLineWeight();
122 const QString
lineColor = dialogTool->getLineColor();
125 if (point !=
nullptr)
152 const QString &lineType,
const QString &lineWeight,
153 const QString &lineColor,
154 const quint32 &firstPointId,
const quint32 &secondPointId,
155 qreal mx, qreal my,
bool showPointName,
158 const Source &typeCreation)
163 QPointF point(firstPoint->x(), secondPoint->y());
190 scene->addItem(point);
235 ContextMenu<PointIntersectXYDialog>(event,
id);
284 if (not
vis.isNull())
300 ShowToolVisualization<PointIntersectXYVisual>(show);
The PointIntersectXYDialog class dialog for ToolPointOfIntersection. Help create point and edit optio...
virtual void RefreshGeometry() Q_DECL_OVERRIDE
void setPoint2Id(const quint32 &value)
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
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 AttrLineType
const QString AttrSecondPoint
const QString AttrFirstPoint
const QString AttrLineWeight
const QString LineTypeDashLine
const QString AttrLineColor
Qt::PenStyle lineTypeToPenStyle(const QString &lineType)
LineStyle return pen style for current line style.