55 #include <qiterator.h>
58 #include <QDomNodeList>
59 #include <QMapIterator>
61 #include <QSharedPointer>
62 #include <QStaticStringData>
63 #include <QStringData>
64 #include <QStringDataPtr>
68 #include "../../../../dialogs/tools/dialogtool.h"
69 #include "../../../../dialogs/tools/dialogmirrorbyline.h"
70 #include "../../../../visualization/line/operation/vistoolmirrorbyline.h"
71 #include "../../../../visualization/visualization.h"
72 #include "../vgeometry/vpointf.h"
73 #include "../vpatterndb/vtranslatevars.h"
74 #include "../vmisc/vabstractapplication.h"
75 #include "../vmisc/vcommonsettings.h"
76 #include "../vmisc/diagnostic.h"
77 #include "../vmisc/logging.h"
78 #include "../vpatterndb/vcontainer.h"
79 #include "../vpatterndb/vformula.h"
80 #include "../ifc/ifcdef.h"
81 #include "../ifc/exception/vexception.h"
82 #include "../vwidgets/vabstractsimple.h"
83 #include "../vwidgets/vmaingraphicsscene.h"
84 #include "../../../vabstracttool.h"
85 #include "../../../vdatatool.h"
86 #include "../../vdrawtool.h"
100 dialogTool->setSuffix(
suffix);
110 const quint32 firstLinePointId = dialogTool->getFirstLinePointId();
111 const quint32 secondLinePointId = dialogTool->getSecondLinePointId();
112 const QString
suffix = dialogTool->getSuffix();
117 if (operation !=
nullptr)
129 const Source &typeCreation)
132 const QPointF fPoint =
static_cast<QPointF
>(firstPoint);
135 const QPointF sPoint =
static_cast<QPointF
>(secondPoint);
146 source, dest, typeCreation);
147 scene->addItem(tool);
152 for (
int i = 0; i <
source.size(); ++i)
213 ShowToolVisualization<VisToolMirrorByLine>(show);
219 if (not
vis.isNull())
269 ContextMenu<DialogMirrorByLine>(event,
id);
281 const QString toolTipStr = QString(
"<tr> <td><b>%1:</b> %2</td> </tr>"
282 "<tr> <td><b>%3:</b> %4</td> </tr>")
283 .arg(tr(
"First line point"))
285 .arg(tr(
"Second line point"))
292 quint32 secondLinePointId,
const QString &suffix,
294 const Source &typeCreation, QGraphicsItem *parent)
296 , m_firstLinePointId(firstLinePointId)
297 , m_secondLinePointId(secondLinePointId)
static void createDestination(Source typeCreation, quint32 &id, QVector< DestinationItem > &dest, const QVector< SourceItem > &source, const QPointF &fPoint, const QPointF &sPoint, const QString &suffix, VAbstractPattern *doc, VContainer *data, const Document &parse)
QVector< SourceItem > source
static void initOperationToolConnections(VMainGraphicsScene *scene, T *tool)
void SaveSourceDestination(QDomElement &tag)
void InitOperatedObjects()
QVector< DestinationItem > destination
virtual void IncrementReferens(quint32 id) const =0
static void AddTool(quint32 id, VDataTool *tool)
AddTool add tool to list tools.
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
static const QSharedPointer< VGObject > GetFakeGObject(quint32 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 setObjects(QVector< quint32 > objects)
QVector< quint32 > sourceToObjects(const QVector< SourceItem > &source)