Little optimization.

--HG--
branch : develop
This commit is contained in:
dismine 2013-11-06 23:11:12 +02:00
parent 6ae5a00146
commit 40c58022e7
91 changed files with 223 additions and 214 deletions

View File

@ -613,7 +613,7 @@ qreal VContainer::FindVar(const QString &name, bool *ok)const
return 0;
}
void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId, Draw::Draws mode)
void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId, const Draw::Draws &mode)
{
QString nameLine = GetNameLine(firstPointId, secondPointId, mode);
VPointF first;
@ -671,7 +671,7 @@ qint64 VContainer::AddObject(QHash<key, val> &obj, const val& value)
return id;
}
QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const
QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, const Draw::Draws &mode) const
{
VPointF first;
VPointF second;
@ -688,7 +688,7 @@ QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPo
return QString("Line_%1_%2").arg(first.name(), second.name());
}
QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const
QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint, const Draw::Draws &mode) const
{
VPointF first;
VPointF second;
@ -705,7 +705,7 @@ QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &sec
return QString("AngleLine_%1_%2").arg(first.name(), second.name());
}
QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const
QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, const Draw::Draws &mode) const
{
VPointF first;
VPointF second;
@ -722,7 +722,7 @@ QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &second
return QString("Spl_%1_%2").arg(first.name(), second.name());
}
QString VContainer::GetNameSplinePath(const VSplinePath &path, Draw::Draws mode) const
QString VContainer::GetNameSplinePath(const VSplinePath &path, const Draw::Draws &mode) const
{
if (path.Count() == 0)
{
@ -750,7 +750,7 @@ QString VContainer::GetNameSplinePath(const VSplinePath &path, Draw::Draws mode)
return name;
}
QString VContainer::GetNameArc(const qint64 &center, const qint64 &id, Draw::Draws mode) const
QString VContainer::GetNameArc(const qint64 &center, const qint64 &id, const Draw::Draws &mode) const
{
VPointF centerPoint;
if (mode == Draw::Calculation)

View File

@ -77,7 +77,7 @@ public:
void AddLengthArc(const QString &name, const qreal &value);
void AddLineAngle(const QString &name, const qreal &value);
void AddLine(const qint64 &firstPointId, const qint64 &secondPointId,
Draw::Draws mode = Draw::Calculation);
const Draw::Draws &mode = Draw::Calculation);
qint64 AddSpline(const VSpline& spl);
qint64 AddModelingSpline(const VSpline& spl);
qint64 AddSplinePath(const VSplinePath& splPath);
@ -85,14 +85,15 @@ public:
qint64 AddArc(const VArc& arc);
qint64 AddModelingArc(const VArc& arc);
QString GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint,
Draw::Draws mode = Draw::Calculation) const;
const Draw::Draws &mode = Draw::Calculation) const;
QString GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint,
Draw::Draws mode = Draw::Calculation) const;
const Draw::Draws &mode = Draw::Calculation) const;
QString GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint,
Draw::Draws mode = Draw::Calculation) const;
const Draw::Draws &mode = Draw::Calculation) const;
QString GetNameSplinePath(const VSplinePath &path,
Draw::Draws mode = Draw::Calculation) const;
QString GetNameArc(const qint64 &center, const qint64 &id, Draw::Draws mode = Draw::Calculation) const;
const Draw::Draws &mode = Draw::Calculation) const;
QString GetNameArc(const qint64 &center, const qint64 &id,
const Draw::Draws &mode = Draw::Calculation) const;
void UpdatePoint(qint64 id, const VPointF& point);
void UpdateModelingPoint(qint64 id, const VPointF& point);
void UpdateDetail(qint64 id, const VDetail& detail);

View File

@ -100,8 +100,8 @@ void DialogDetail::DialogAccepted()
emit DialogClosed(QDialog::Accepted);
}
void DialogDetail::NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode,
qreal mx, qreal my)
void DialogDetail::NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::Draws &mode,
const NodeDetail::NodeDetails &typeNode, qreal mx, qreal my)
{
QString name;
switch (typeTool)

View File

@ -45,8 +45,8 @@ private:
VDetail details;
bool supplement;
bool closed;
void NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode,
qreal mx = 0, qreal my = 0);
void NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::Draws &mode,
const NodeDetail::NodeDetails &typeNode, qreal mx = 0, qreal my = 0);
};
#endif // DIALOGDETAIL_H

View File

@ -39,7 +39,7 @@ DialogSinglePoint::DialogSinglePoint(const VContainer *data, QWidget *parent)
connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogSinglePoint::NamePointChanged);
}
void DialogSinglePoint::mousePress(QPointF scenePos)
void DialogSinglePoint::mousePress(const QPointF &scenePos)
{
if (isInitialized == false)
{
@ -61,7 +61,7 @@ void DialogSinglePoint::DialogAccepted()
emit DialogClosed(QDialog::Accepted);
}
void DialogSinglePoint::setData(const QString name, const QPointF point)
void DialogSinglePoint::setData(const QString &name, const QPointF &point)
{
this->name = name;
this->point = point;

View File

@ -34,12 +34,12 @@ class DialogSinglePoint : public DialogTool
Q_OBJECT
public:
DialogSinglePoint(const VContainer *data, QWidget *parent = 0);
void setData(const QString name, const QPointF point);
void setData(const QString &name, const QPointF &point);
inline QString getName()const {return name;}
inline QPointF getPoint()const {return point;}
~DialogSinglePoint();
public slots:
void mousePress(QPointF scenePos);
void mousePress(const QPointF &scenePos);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogSinglePoint)

View File

@ -639,7 +639,7 @@ void MainWindow::currentDrawChanged( int index )
}
}
void MainWindow::mouseMove(QPointF scenePos)
void MainWindow::mouseMove(const QPointF &scenePos)
{
QString string = QString("%1, %2")
.arg(static_cast<qint32>(toMM(scenePos.x())))

View File

@ -45,7 +45,7 @@ public:
~MainWindow();
void OpenPattern(const QString &fileName);
public slots:
void mouseMove(QPointF scenePos);
void mouseMove(const QPointF &scenePos);
void ActionAroowTool();
void ActionDraw(bool checked);
void ActionDetails(bool checked);

View File

@ -32,7 +32,7 @@ VDrawTool::VDrawTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *pa
connect(this->doc, &VDomDocument::ShowTool, this, &VDrawTool::ShowTool);
}
void VDrawTool::AddRecord(const qint64 id, Tool::Tools toolType, VDomDocument *doc)
void VDrawTool::AddRecord(const qint64 id, const Tool::Tools &toolType, VDomDocument *doc)
{
qint64 cursor = doc->getCursor();
QVector<VToolRecord> *history = doc->getHistory();
@ -63,7 +63,7 @@ void VDrawTool::ShowTool(qint64 id, Qt::GlobalColor color, bool enable)
Q_UNUSED(enable);
}
void VDrawTool::ChangedActivDraw(const QString newName)
void VDrawTool::ChangedActivDraw(const QString &newName)
{
if (nameActivDraw == newName)
{
@ -75,7 +75,7 @@ void VDrawTool::ChangedActivDraw(const QString newName)
}
}
void VDrawTool::ChangedNameDraw(const QString oldName, const QString newName)
void VDrawTool::ChangedNameDraw(const QString &oldName, const QString &newName)
{
if (nameActivDraw == oldName)
{

View File

@ -31,12 +31,12 @@ public:
VDrawTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0);
virtual ~VDrawTool() {}
virtual void setDialog() {}
static void AddRecord(const qint64 id, Tool::Tools toolType, VDomDocument *doc);
static void AddRecord(const qint64 id, const Tool::Tools &toolType, VDomDocument *doc);
void ignoreContextMenu(bool enable) {ignoreContextMenuEvent = enable;}
public slots:
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
virtual void ChangedActivDraw(const QString newName);
void ChangedNameDraw(const QString oldName, const QString newName);
virtual void ChangedActivDraw(const QString &newName);
void ChangedNameDraw(const QString &oldName, const QString &newName);
virtual void FullUpdateFromGui(int result)=0;
virtual void SetFactor(qreal factor);
protected:

View File

@ -26,7 +26,7 @@ const QString VToolAlongLine::ToolType = QStringLiteral("alongLine");
VToolAlongLine::VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
const qint64 &firstPointId, const qint64 &secondPointId,
const QString &typeLine, Tool::Sources typeCreation,
const QString &typeLine, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId),
dialogAlongLine(QSharedPointer<DialogAlongLine>())
@ -131,7 +131,7 @@ void VToolAlongLine::Create(QSharedPointer<DialogAlongLine> &dialog, VMainGraphi
void VToolAlongLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine,
const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation)
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VPointF firstPoint = data->GetPoint(firstPointId);
VPointF secondPoint = data->GetPoint(secondPointId);

View File

@ -31,14 +31,14 @@ class VToolAlongLine : public VToolLinePoint
public:
VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogAlongLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data);
static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula,
const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -25,7 +25,7 @@
const QString VToolArc::TagName = QStringLiteral("arc");
const QString VToolArc::ToolType = QStringLiteral("simple");
VToolArc::VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VToolArc::VToolArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VDrawTool(doc, data, id), QGraphicsPathItem(parent), dialogArc(QSharedPointer<DialogArc>())
{
@ -66,7 +66,7 @@ void VToolArc::Create(QSharedPointer<DialogArc> &dialog, VMainGraphicsScene *sce
void VToolArc::Create(const qint64 _id, const qint64 &center, const QString &radius, const QString &f1,
const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;
@ -142,7 +142,7 @@ void VToolArc::FullUpdateFromGui(int result)
dialogArc.clear();
}
void VToolArc::ChangedActivDraw(const QString newName)
void VToolArc::ChangedActivDraw(const QString &newName)
{
bool selectable = false;
if (nameActivDraw == newName)

View File

@ -31,20 +31,20 @@ class VToolArc :public VDrawTool, public QGraphicsPathItem
{
Q_OBJECT
public:
VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VToolArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogArc> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data);
static void Create(const qint64 _id, const qint64 &center, const QString &radius, const QString &f1,
const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);
virtual void ChangedActivDraw(const QString newName);
virtual void ChangedActivDraw(const QString &newName);
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
virtual void SetFactor(qreal factor);
protected:

View File

@ -26,7 +26,7 @@ const QString VToolBisector::ToolType = QStringLiteral("bisector");
VToolBisector::VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const qint64 &thirdPointId, Tool::Sources typeCreation,
const qint64 &secondPointId, const qint64 &thirdPointId, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0),
thirdPointId(0), dialogBisector(QSharedPointer<DialogBisector>())
@ -88,7 +88,7 @@ void VToolBisector::Create(const qint64 _id, const QString &formula, const qint6
const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
const QString &pointName, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VPointF firstPoint = data->GetPoint(firstPointId);
VPointF secondPoint = data->GetPoint(secondPointId);

View File

@ -30,7 +30,7 @@ class VToolBisector : public VToolLinePoint
public:
VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId,
const qint64 &thirdPointId, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const qint64 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const QPointF &thirdPoint,
const qreal& length);
virtual void setDialog();
@ -40,7 +40,7 @@ public:
const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation);
const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -27,7 +27,7 @@ const QString VToolEndLine::ToolType = QStringLiteral("endLine");
VToolEndLine::VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &basePointId,
Tool::Sources typeCreation, QGraphicsItem *parent)
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VToolLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent),
dialogEndLine(QSharedPointer<DialogEndLine>())
{
@ -64,7 +64,7 @@ void VToolEndLine::Create(QSharedPointer<DialogEndLine> &dialog, VMainGraphicsSc
void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &basePointId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation)
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VPointF basePoint = data->GetPoint(basePointId);
QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y()));

View File

@ -31,14 +31,14 @@ class VToolEndLine : public VToolLinePoint
public:
VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &basePointId,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogEndLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data);
static void Create(const qint64 _id, const QString &pointName, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx,
const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -25,7 +25,7 @@ const QString VToolHeight::ToolType = QStringLiteral("height");
VToolHeight::VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
Tool::Sources typeCreation, QGraphicsItem * parent)
const Tool::Sources &typeCreation, QGraphicsItem * parent)
:VToolLinePoint(doc, data, id, typeLine, QString(), basePointId, 0, parent),
dialogHeight(QSharedPointer<DialogHeight>()), p1LineId(p1LineId), p2LineId(p2LineId)
{
@ -63,7 +63,7 @@ void VToolHeight::Create(QSharedPointer<DialogHeight> &dialog, VMainGraphicsScen
void VToolHeight::Create(const qint64 _id, const QString &pointName, const QString &typeLine,
const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation)
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VPointF basePoint = data->GetPoint(basePointId);
VPointF p1Line = data->GetPoint(p1LineId);

View File

@ -31,14 +31,14 @@ class VToolHeight: public VToolLinePoint
public:
VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogHeight> &dialog, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data);
static void Create(const qint64 _id, const QString &pointName, const QString &typeLine,
const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation);
static QPointF FindPoint(const QLineF &line, const QPointF &point);
static const QString ToolType;
public slots:

View File

@ -24,7 +24,7 @@
const QString VToolLine::TagName = QStringLiteral("line");
VToolLine::VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint,
Tool::Sources typeCreation, QGraphicsItem *parent)
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VDrawTool(doc, data, id), QGraphicsLineItem(parent), firstPoint(firstPoint), secondPoint(secondPoint),
dialogLine(QSharedPointer<DialogLine>())
{
@ -60,7 +60,7 @@ void VToolLine::Create(QSharedPointer<DialogLine> &dialog, VMainGraphicsScene *s
void VToolLine::Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
Q_ASSERT(scene != 0);
Q_ASSERT(doc != 0);
@ -126,7 +126,7 @@ void VToolLine::SetFactor(qreal factor)
RefreshGeometry();
}
void VToolLine::ChangedActivDraw(const QString newName)
void VToolLine::ChangedActivDraw(const QString &newName)
{
bool selectable = false;
if (nameActivDraw == newName)

View File

@ -31,17 +31,17 @@ class VToolLine: public VDrawTool, public QGraphicsLineItem
Q_OBJECT
public:
VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
qint64 secondPoint, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data);
static void Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
public slots:
virtual void FullUpdateFromFile();
virtual void ChangedActivDraw(const QString newName);
virtual void ChangedActivDraw(const QString &newName);
virtual void FullUpdateFromGui(int result);
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
virtual void SetFactor(qreal factor);

View File

@ -25,7 +25,7 @@ const QString VToolLineIntersect::ToolType = QStringLiteral("lineIntersect");
VToolLineIntersect::VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2,
const qint64 &p2Line2, Tool::Sources typeCreation,
const qint64 &p2Line2, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2),
p2Line2(p2Line2), dialogLineIntersect(QSharedPointer<DialogLineIntersect>())
@ -64,7 +64,7 @@ void VToolLineIntersect::Create(const qint64 _id, const qint64 &p1Line1Id, const
const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VPointF p1Line1 = data->GetPoint(p1Line1Id);
VPointF p2Line1 = data->GetPoint(p2Line1Id);

View File

@ -31,14 +31,14 @@ class VToolLineIntersect:public VToolPoint
public:
VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1,
const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogLineIntersect> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data);
static void Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id, const qint64 &p1Line2Id,
const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -44,7 +44,7 @@ VToolLinePoint::VToolLinePoint(VDomDocument *doc, VContainer *data, const qint64
}
}
void VToolLinePoint::ChangedActivDraw(const QString newName)
void VToolLinePoint::ChangedActivDraw(const QString &newName)
{
if (nameActivDraw == newName)
{

View File

@ -32,7 +32,7 @@ public:
const QString &formula, const qint64 &basePointId, const qreal &angle,
QGraphicsItem * parent = 0);
public slots:
virtual void ChangedActivDraw(const QString newName);
virtual void ChangedActivDraw(const QString &newName);
virtual void SetFactor(qreal factor);
protected:
QString typeLine;

View File

@ -26,7 +26,7 @@ const QString VToolNormal::ToolType = QStringLiteral("normal");
VToolNormal::VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &firstPointId,
const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent)
const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent),
secondPointId(secondPointId), dialogNormal(QSharedPointer<DialogNormal>())
{
@ -67,7 +67,7 @@ void VToolNormal::Create(const qint64 _id, const QString &formula, const qint64
const qint64 &secondPointId, const QString typeLine, const QString pointName,
const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VPointF firstPoint = data->GetPoint(firstPointId);
VPointF secondPoint = data->GetPoint(secondPointId);

View File

@ -31,7 +31,7 @@ class VToolNormal : public VToolLinePoint
public:
VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &firstPointId,
const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogNormal> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data);
@ -39,7 +39,7 @@ public:
const qint64 &secondPointId, const QString typeLine, const QString pointName,
const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation);
const Tool::Sources &typeCreation);
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const qreal &length,
const qreal &angle = 0);
static const QString ToolType;

View File

@ -58,7 +58,7 @@ void VToolPoint::UpdateNamePosition(qreal mx, qreal my)
}
}
void VToolPoint::ChangedActivDraw(const QString newName)
void VToolPoint::ChangedActivDraw(const QString &newName)
{
bool selectable = false;
if (nameActivDraw == newName)

View File

@ -34,7 +34,7 @@ public:
static const QString TagName;
public slots:
void NameChangePosition(const QPointF pos);
virtual void ChangedActivDraw(const QString newName);
virtual void ChangedActivDraw(const QString &newName);
virtual void FullUpdateFromGui(int result) = 0;
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
virtual void SetFactor(qreal factor);

View File

@ -27,7 +27,7 @@ const QString VToolPointOfContact::ToolType = QStringLiteral("pointOfContact");
VToolPointOfContact::VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem *parent)
const Tool::Sources &typeCreation, QGraphicsItem *parent)
: VToolPoint(doc, data, id, parent), radius(radius), center(center), firstPointId(firstPointId),
secondPointId(secondPointId), dialogPointOfContact(QSharedPointer<DialogPointOfContact>())
{
@ -90,7 +90,7 @@ void VToolPointOfContact::Create(const qint64 _id, const QString &radius, const
const qint64 &firstPointId, const qint64 &secondPointId,
const QString &pointName, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VPointF centerP = data->GetPoint(center);
VPointF firstP = data->GetPoint(firstPointId);

View File

@ -31,7 +31,7 @@ public:
VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static QPointF FindPoint(const qreal &radius, const QPointF &center, const QPointF &firstPoint,
const QPointF &secondPoint);
@ -40,7 +40,7 @@ public:
static void Create(const qint64 _id, const QString &radius, const qint64 &center,
const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -25,7 +25,7 @@ const QString VToolPointOfIntersection::ToolType = QStringLiteral("pointOfInters
VToolPointOfIntersection::VToolPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem *parent)
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId),
dialogPointOfIntersection(QSharedPointer<DialogPointOfIntersection>())
{
@ -57,7 +57,7 @@ void VToolPointOfIntersection::Create(QSharedPointer<DialogPointOfIntersection>
void VToolPointOfIntersection::Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId,
const qint64 &secondPointId, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VPointF firstPoint = data->GetPoint(firstPointId);
VPointF secondPoint = data->GetPoint(secondPointId);

View File

@ -31,14 +31,14 @@ class VToolPointOfIntersection : public VToolPoint
public:
VToolPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogPointOfIntersection> &dialog, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data);
static void Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId,
const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation);
const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -26,7 +26,7 @@ const QString VToolShoulderPoint::ToolType = QStringLiteral("shoulder");
VToolShoulderPoint::VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &p1Line,
const qint64 &p2Line, const qint64 &pShoulder, Tool::Sources typeCreation,
const qint64 &p2Line, const qint64 &pShoulder, const Tool::Sources &typeCreation,
QGraphicsItem * parent)
:VToolLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), pShoulder(pShoulder),
dialogShoulderPoint(QSharedPointer<DialogShoulderPoint>())
@ -92,7 +92,7 @@ void VToolShoulderPoint::Create(const qint64 _id, const QString &formula, const
const qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine,
const QString &pointName, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VPointF firstPoint = data->GetPoint(p1Line);
VPointF secondPoint = data->GetPoint(p2Line);

View File

@ -30,7 +30,7 @@ class VToolShoulderPoint : public VToolLinePoint
public:
VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qint64 &p1Line, const qint64 &p2Line,
const qint64 &pShoulder, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const qint64 &pShoulder, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder,
const qreal &length);
@ -39,7 +39,7 @@ public:
static void Create(const qint64 _id, const QString &formula, const qint64 &p1Line, const qint64 &p2Line,
const qint64 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx,
const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -23,7 +23,7 @@
const QString VToolSinglePoint::ToolType = QStringLiteral("single");
VToolSinglePoint::VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VToolSinglePoint::VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent )
:VToolPoint(doc, data, id, parent), dialogSinglePoint(QSharedPointer<DialogSinglePoint>())
{
@ -127,7 +127,7 @@ void VToolSinglePoint::FullUpdateFromGui(int result)
dialogSinglePoint.clear();
}
void VToolSinglePoint::ChangedActivDraw(const QString newName)
void VToolSinglePoint::ChangedActivDraw(const QString &newName)
{
if (nameActivDraw == newName)
{

View File

@ -29,14 +29,14 @@ class VToolSinglePoint : public VToolPoint
{
Q_OBJECT
public:
VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0 );
virtual void setDialog();
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);
virtual void ChangedActivDraw(const QString newName);
virtual void ChangedActivDraw(const QString &newName);
virtual void SetFactor(qreal factor);
signals:
void FullUpdateTree();

View File

@ -25,7 +25,7 @@
const QString VToolSpline::TagName = QStringLiteral("spline");
const QString VToolSpline::ToolType = QStringLiteral("simple");
VToolSpline::VToolSpline(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VToolSpline::VToolSpline(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VDrawTool(doc, data, id), QGraphicsPathItem(parent), dialogSpline(QSharedPointer<DialogSpline>()),
controlPoints(QVector<VControlPointSpline *>())
@ -93,7 +93,7 @@ void VToolSpline::Create(QSharedPointer<DialogSpline> &dialog, VMainGraphicsScen
void VToolSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VSpline spline = VSpline(data->DataPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve);
qint64 id = _id;
@ -271,7 +271,7 @@ void VToolSpline::RefreshGeometry()
}
void VToolSpline::ChangedActivDraw(const QString newName)
void VToolSpline::ChangedActivDraw(const QString &newName)
{
bool selectable = false;
if (nameActivDraw == newName)

View File

@ -32,7 +32,7 @@ class VToolSpline:public VDrawTool, public QGraphicsPathItem
{
Q_OBJECT
public:
VToolSpline (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VToolSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0 );
virtual void setDialog();
static void Create(QSharedPointer<DialogSpline> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
@ -40,7 +40,7 @@ public:
static void Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
signals:
@ -52,7 +52,7 @@ public slots:
virtual void FullUpdateFromGui ( int result );
void ControlPointChangePosition ( const qint32 &indexSpline, SplinePoint::Position position,
const QPointF pos);
virtual void ChangedActivDraw ( const QString newName );
virtual void ChangedActivDraw ( const QString &newName );
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
virtual void SetFactor(qreal factor);
protected:

View File

@ -24,7 +24,7 @@
const QString VToolSplinePath::TagName = QStringLiteral("spline");
const QString VToolSplinePath::ToolType = QStringLiteral("path");
VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VDrawTool(doc, data, id), QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer<DialogSplinePath>()),
controlPoints(QVector<VControlPointSpline *>())
@ -84,7 +84,7 @@ void VToolSplinePath::Create(QSharedPointer<DialogSplinePath> &dialog, VMainGrap
void VToolSplinePath::Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
qint64 id = _id;
if (typeCreation == Tool::FromGui)
@ -211,7 +211,7 @@ void VToolSplinePath::UpdatePathPoint(QDomNode& node, VSplinePath &path)
}
}
void VToolSplinePath::ChangedActivDraw(const QString newName)
void VToolSplinePath::ChangedActivDraw(const QString &newName)
{
bool selectable = false;
if (nameActivDraw == newName)

View File

@ -31,14 +31,14 @@ class VToolSplinePath:public VDrawTool, public QGraphicsPathItem
{
Q_OBJECT
public:
VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogSplinePath> &dialog, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data);
static void Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation);
const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
signals:
@ -50,7 +50,7 @@ public slots:
virtual void FullUpdateFromGui(int result);
void ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position,
const QPointF pos);
virtual void ChangedActivDraw(const QString newName);
virtual void ChangedActivDraw(const QString &newName);
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
virtual void SetFactor(qreal factor);
protected:

View File

@ -25,7 +25,7 @@ const QString VToolTriangle::ToolType = QStringLiteral("triangle");
VToolTriangle::VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId,
const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent)
const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId),
secondPointId(secondPointId), dialogTriangle(QSharedPointer<DialogTriangle>())
{
@ -62,7 +62,7 @@ void VToolTriangle::Create(QSharedPointer<DialogTriangle> &dialog, VMainGraphics
void VToolTriangle::Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id,
const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation)
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VPointF axisP1 = data->GetPoint(axisP1Id);
VPointF axisP2 = data->GetPoint(axisP2Id);

View File

@ -31,14 +31,14 @@ class VToolTriangle : public VToolPoint
public:
VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id,
const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogTriangle> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data);
static void Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id, const qint64 &axisP2Id,
const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static QPointF FindPoint(const QPointF axisP1, const QPointF axisP2, const QPointF firstPoint,
const QPointF secondPoint);
static const QString ToolType;

View File

@ -27,7 +27,7 @@ const QString VModelingAlongLine::ToolType = QStringLiteral("alongLine");
VModelingAlongLine::VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id,
const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const QString &typeLine,
Tool::Sources typeCreation, QGraphicsItem *parent)
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId),
dialogAlongLine(QSharedPointer<DialogAlongLine>())
{
@ -126,7 +126,7 @@ VModelingAlongLine *VModelingAlongLine::Create(const qint64 _id, const QString &
const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const qreal &mx, const qreal &my,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VModelingAlongLine *point = 0;
VPointF firstPoint = data->GetModelingPoint(firstPointId);

View File

@ -32,13 +32,13 @@ public:
VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id,
const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const QString &typeLine,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingAlongLine* Create(QSharedPointer<DialogAlongLine> &dialog, VDomDocument *doc, VContainer *data);
static VModelingAlongLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine,
const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId,
const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -25,7 +25,7 @@
const QString VModelingArc::TagName = QStringLiteral("arc");
const QString VModelingArc::ToolType = QStringLiteral("simple");
VModelingArc::VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VModelingArc::VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VModelingTool(doc, data, id), QGraphicsPathItem(parent), dialogArc(QSharedPointer<DialogArc>())
{
@ -61,7 +61,7 @@ VModelingArc* VModelingArc::Create(QSharedPointer<DialogArc> &dialog, VDomDocume
VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 &center, const QString &radius,
const QString &f1, const QString &f2, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation)
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VModelingArc *toolArc = 0;
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;

View File

@ -31,13 +31,13 @@ class VModelingArc :public VModelingTool, public QGraphicsPathItem
{
Q_OBJECT
public:
VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingArc* Create(QSharedPointer<DialogArc> &dialog, VDomDocument *doc, VContainer *data);
static VModelingArc* Create(const qint64 _id, const qint64 &center, const QString &radius, const QString &f1,
const QString &f2, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
public slots:

View File

@ -27,7 +27,7 @@ const QString VModelingBisector::ToolType = QStringLiteral("bisector");
VModelingBisector::VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const qint64 &thirdPointId, Tool::Sources typeCreation,
const qint64 &secondPointId, const qint64 &thirdPointId, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VModelingLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0),
thirdPointId(0), dialogBisector(QSharedPointer<DialogBisector>())
@ -71,7 +71,7 @@ VModelingBisector *VModelingBisector::Create(const qint64 _id, const QString &fo
const qint64 &thirdPointId, const QString &typeLine,
const QString &pointName, const qreal &mx, const qreal &my,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VModelingBisector *point = 0;
VPointF firstPoint = data->GetModelingPoint(firstPointId);

View File

@ -32,14 +32,14 @@ public:
VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula,
const qint64 &firstPointId, const qint64 &secondPointId,
const qint64 &thirdPointId, Tool::Sources typeCreation,
const qint64 &thirdPointId, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingBisector* Create(QSharedPointer<DialogBisector> &dialog, VDomDocument *doc, VContainer *data);
static VModelingBisector* Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -26,7 +26,7 @@ const QString VModelingEndLine::ToolType = QStringLiteral("endLine");
VModelingEndLine::VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qreal &angle,
const qint64 &basePointId, Tool::Sources typeCreation, QGraphicsItem *parent)
const qint64 &basePointId, const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VModelingLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent),
dialogEndLine(QSharedPointer<DialogEndLine>())
{
@ -62,7 +62,7 @@ VModelingEndLine *VModelingEndLine::Create(const qint64 _id, const QString &poin
const QString &typeLine, const QString &formula,
const qreal &angle, const qint64 &basePointId, const qreal &mx,
const qreal &my, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VModelingEndLine *point = 0;
VPointF basePoint = data->GetModelingPoint(basePointId);

View File

@ -31,14 +31,14 @@ class VModelingEndLine : public VModelingLinePoint
public:
VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qreal &angle,
const qint64 &basePointId, Tool::Sources typeCreation,
const qint64 &basePointId, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingEndLine* Create(QSharedPointer<DialogEndLine> &dialog, VDomDocument *doc, VContainer *data);
static VModelingEndLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &basePointId,
const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -26,7 +26,7 @@ const QString VModelingHeight::ToolType = QStringLiteral("height");
VModelingHeight::VModelingHeight(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId,
const qint64 &p2LineId, Tool::Sources typeCreation,
const qint64 &p2LineId, const Tool::Sources &typeCreation,
QGraphicsItem * parent)
:VModelingLinePoint(doc, data, id, typeLine, QString(), basePointId, 0, parent),
dialogHeight(QSharedPointer<DialogHeight>()), p1LineId(p1LineId), p2LineId(p2LineId)
@ -65,7 +65,7 @@ VModelingHeight *VModelingHeight::Create(const qint64 _id, const QString &pointN
const qint64 &basePointId, const qint64 &p1LineId,
const qint64 &p2LineId, const qreal &mx, const qreal &my,
VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VModelingHeight *point = 0;
VPointF basePoint = data->GetModelingPoint(basePointId);

View File

@ -31,14 +31,14 @@ class VModelingHeight : public VModelingLinePoint
public:
VModelingHeight(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId,
const qint64 &p2LineId, Tool::Sources typeCreation,
const qint64 &p2LineId, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingHeight* Create(QSharedPointer<DialogHeight> &dialog, VDomDocument *doc, VContainer *data);
static VModelingHeight* Create(const qint64 _id, const QString &pointName, const QString &typeLine,
const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -24,7 +24,7 @@
const QString VModelingLine::TagName = QStringLiteral("line");
VModelingLine::VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
qint64 secondPoint, Tool::Sources typeCreation, QGraphicsItem *parent):
qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem *parent):
VModelingTool(doc, data, id), QGraphicsLineItem(parent), firstPoint(firstPoint),
secondPoint(secondPoint), dialogLine(QSharedPointer<DialogLine>())
{
@ -58,7 +58,7 @@ VModelingLine *VModelingLine::Create(QSharedPointer<DialogLine> &dialog, VDomDoc
VModelingLine *VModelingLine::Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VModelingLine *line = 0;
Q_ASSERT(doc != 0);

View File

@ -31,12 +31,12 @@ class VModelingLine: public VModelingTool, public QGraphicsLineItem
Q_OBJECT
public:
VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
qint64 secondPoint, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingLine* Create(QSharedPointer<DialogLine> &dialog, VDomDocument *doc, VContainer *data);
static VModelingLine* Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation);
const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
public slots:

View File

@ -25,7 +25,7 @@ const QString VModelingLineIntersect::ToolType = QStringLiteral("lineIntersect")
VModelingLineIntersect::VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2,
const qint64 &p2Line2, Tool::Sources typeCreation, QGraphicsItem *parent)
const qint64 &p2Line2, const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VModelingPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2),
p2Line2(p2Line2), dialogLineIntersect(QSharedPointer<DialogLineIntersect>())
{
@ -64,7 +64,7 @@ VModelingLineIntersect *VModelingLineIntersect::Create(const qint64 _id, const q
const qint64 &p2Line2Id, const QString &pointName,
const qreal &mx, const qreal &my, VDomDocument *doc,
VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VModelingLineIntersect *point = 0;
VPointF p1Line1 = data->GetModelingPoint(p1Line1Id);

View File

@ -32,14 +32,14 @@ public:
VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &p1Line1, const qint64 &p2Line1,
const qint64 &p1Line2, const qint64 &p2Line2,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingLineIntersect* Create(QSharedPointer<DialogLineIntersect> &dialog, VDomDocument *doc,
VContainer *data);
static VModelingLineIntersect* Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id,
const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName,
const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -27,7 +27,7 @@ const QString VModelingNormal::ToolType = QStringLiteral("normal");
VModelingNormal::VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &firstPointId,
const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent)
const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent),
secondPointId(secondPointId), dialogNormal(QSharedPointer<DialogNormal>())
{
@ -62,9 +62,10 @@ VModelingNormal* VModelingNormal::Create(QSharedPointer<DialogNormal> &dialog, V
}
VModelingNormal *VModelingNormal::Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const QString typeLine, const QString pointName,
const qint64 &secondPointId, const QString &typeLine, const QString &pointName,
const qreal angle, const qreal &mx, const qreal &my, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation)
VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation)
{
VModelingNormal *point = 0;
VPointF firstPoint = data->GetModelingPoint(firstPointId);

View File

@ -32,13 +32,14 @@ public:
VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qreal &angle,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingNormal* Create(QSharedPointer<DialogNormal> &dialog, VDomDocument *doc, VContainer *data);
static VModelingNormal* Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const QString typeLine, const QString pointName,
const qint64 &secondPointId, const QString &typeLine, const QString &pointName,
const qreal angle, const qreal &mx, const qreal &my, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -28,7 +28,7 @@ const QString VModelingPointOfContact::ToolType = QStringLiteral("pointOfContact
VModelingPointOfContact::VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem *parent)
const Tool::Sources &typeCreation, QGraphicsItem *parent)
: VModelingPoint(doc, data, id, parent), radius(radius), center(center), firstPointId(firstPointId),
secondPointId(secondPointId), dialogPointOfContact(QSharedPointer<DialogPointOfContact>())
{
@ -67,7 +67,7 @@ VModelingPointOfContact *VModelingPointOfContact::Create(const qint64 _id, const
const QString &pointName, const qreal &mx,
const qreal &my, VDomDocument *doc,
VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VModelingPointOfContact *point = 0;
VPointF centerP = data->GetModelingPoint(center);

View File

@ -32,7 +32,7 @@ public:
VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingPointOfContact* Create(QSharedPointer<DialogPointOfContact> &dialog, VDomDocument *doc,
VContainer *data);
@ -40,7 +40,7 @@ public:
const qint64 &firstPointId, const qint64 &secondPointId,
const QString &pointName, const qreal &mx, const qreal &my,
VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -25,7 +25,7 @@ const QString VModelingPointOfIntersection::ToolType = QStringLiteral("pointOfIn
VModelingPointOfIntersection::VModelingPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem *parent)
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VModelingPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId),
dialogPointOfIntersection(QSharedPointer<DialogPointOfIntersection>())
{
@ -59,7 +59,7 @@ VModelingPointOfIntersection *VModelingPointOfIntersection::Create(const qint64
const qint64 &secondPointId, const qreal &mx,
const qreal &my, VDomDocument *doc,
VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VModelingPointOfIntersection *tool = 0;
VPointF firstPoint = data->GetPoint(firstPointId);

View File

@ -31,7 +31,7 @@ class VModelingPointOfIntersection : public VModelingPoint
public:
VModelingPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingPointOfIntersection* Create(QSharedPointer<DialogPointOfIntersection> &dialog, VDomDocument *doc,
VContainer *data);
@ -39,7 +39,7 @@ public:
const qint64 &firstPointId, const qint64 &secondPointId,
const qreal &mx, const qreal &my, VDomDocument *doc,
VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation);
const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -27,7 +27,7 @@ const QString VModelingShoulderPoint::ToolType = QStringLiteral("shoulder");
VModelingShoulderPoint::VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &p1Line,
const qint64 &p2Line, const qint64 &pShoulder, Tool::Sources typeCreation,
const qint64 &p2Line, const qint64 &pShoulder, const Tool::Sources &typeCreation,
QGraphicsItem * parent)
:VModelingLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line),
pShoulder(pShoulder), dialogShoulderPoint(QSharedPointer<DialogShoulderPoint>())

View File

@ -31,7 +31,7 @@ class VModelingShoulderPoint : public VModelingLinePoint
public:
VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qint64 &p1Line, const qint64 &p2Line,
const qint64 &pShoulder, Tool::Sources typeCreation,
const qint64 &pShoulder, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingShoulderPoint* Create(QSharedPointer<DialogShoulderPoint> &dialog, VDomDocument *doc,

View File

@ -25,7 +25,7 @@
const QString VModelingSpline::TagName = QStringLiteral("spline");
const QString VModelingSpline::ToolType = QStringLiteral("simple");
VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VModelingTool(doc, data, id), QGraphicsPathItem(parent),
dialogSpline(QSharedPointer<DialogSpline>()), controlPoints(QVector<VControlPointSpline *>())
@ -91,7 +91,7 @@ VModelingSpline *VModelingSpline::Create(QSharedPointer<DialogSpline> &dialog, V
VModelingSpline *VModelingSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4,
const qreal &kAsm1, const qreal kAsm2, const qreal &angle1,
const qreal &angle2, const qreal &kCurve, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation)
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VModelingSpline *spl = 0;
VSpline spline = VSpline(data->DataModelingPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve);

View File

@ -32,14 +32,14 @@ class VModelingSpline:public VModelingTool, public QGraphicsPathItem
{
Q_OBJECT
public:
VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0 );
virtual void setDialog();
static VModelingSpline* Create(QSharedPointer<DialogSpline> &dialog, VDomDocument *doc, VContainer *data);
static VModelingSpline* Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation);
const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
signals:

View File

@ -24,7 +24,7 @@
const QString VModelingSplinePath::TagName = QStringLiteral("spline");
const QString VModelingSplinePath::ToolType = QStringLiteral("path");
VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VModelingTool(doc, data, id), QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer<DialogSplinePath>()),
controlPoints(QVector<VControlPointSpline *>())
@ -84,7 +84,7 @@ VModelingSplinePath *VModelingSplinePath::Create(QSharedPointer<DialogSplinePath
VModelingSplinePath * VModelingSplinePath::Create(const qint64 _id, const VSplinePath &path, VDomDocument *doc,
VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VModelingSplinePath *spl = 0;
qint64 id = _id;

View File

@ -31,12 +31,12 @@ class VModelingSplinePath:public VModelingTool, public QGraphicsPathItem
{
Q_OBJECT
public:
VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingSplinePath* Create(QSharedPointer<DialogSplinePath> &dialog, VDomDocument *doc, VContainer *data);
static VModelingSplinePath* Create(const qint64 _id, const VSplinePath &path, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
signals:

View File

@ -26,7 +26,7 @@ const QString VModelingTriangle::ToolType = QStringLiteral("triangle");
VModelingTriangle::VModelingTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id,
const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem *parent)
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VModelingPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId),
secondPointId(secondPointId), dialogTriangle(QSharedPointer<DialogTriangle>())
{
@ -63,7 +63,7 @@ VModelingTriangle *VModelingTriangle::Create(const qint64 _id, const QString &po
const qint64 &axisP2Id, const qint64 &firstPointId,
const qint64 &secondPointId, const qreal &mx, const qreal &my,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VModelingTriangle *tool = 0;
VPointF axisP1 = data->GetPoint(axisP1Id);

View File

@ -32,13 +32,13 @@ class VModelingTriangle : public VModelingPoint
public:
VModelingTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id,
const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingTriangle* Create(QSharedPointer<DialogTriangle> &dialog, VDomDocument *doc, VContainer *data);
static VModelingTriangle* Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id,
const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId,
const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
public slots:
virtual void FullUpdateFromFile();

View File

@ -25,7 +25,7 @@ const QString VNodeArc::TagName = QStringLiteral("arc");
const QString VNodeArc::ToolType = QStringLiteral("modeling");
VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject,
Tool::Sources typeCreation, QGraphicsItem * parent)
const Tool::Sources &typeCreation, QGraphicsItem * parent)
:VAbstractNode(doc, data, id, idArc, typeobject), QGraphicsPathItem(parent)
{
RefreshGeometry();
@ -40,7 +40,7 @@ VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc,
}
void VNodeArc::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
if (parse == Document::FullParse)
{

View File

@ -30,9 +30,9 @@ class VNodeArc :public VAbstractNode, public QGraphicsPathItem
Q_OBJECT
public:
VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc,
Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation);
Draw::Draws typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
public slots:

View File

@ -25,7 +25,7 @@ const QString VNodePoint::TagName = QStringLiteral("point");
const QString VNodePoint::ToolType = QStringLiteral("modeling");
VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject,
Tool::Sources typeCreation, QGraphicsItem *parent)
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VAbstractNode(doc, data, id, idPoint, typeobject), QGraphicsEllipseItem(parent), radius(toPixel(1.5)),
namePoint(0), lineName(0)
{
@ -45,7 +45,7 @@ VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 id
}
void VNodePoint::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject,
const Document::Documents &parse, Tool::Sources typeCreation)
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
if (parse == Document::FullParse)
{

View File

@ -30,9 +30,9 @@ class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem
Q_OBJECT
public:
VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject,
Tool::Sources typeCreation, QGraphicsItem * parent = 0 );
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 );
static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
public slots:

View File

@ -25,7 +25,7 @@ const QString VNodeSpline::TagName = QStringLiteral("spline");
const QString VNodeSpline::ToolType = QStringLiteral("modelingSpline");
VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject,
Tool::Sources typeCreation, QGraphicsItem * parent)
const Tool::Sources &typeCreation, QGraphicsItem * parent)
:VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent)
{
RefreshGeometry();
@ -41,7 +41,7 @@ VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64
VNodeSpline *VNodeSpline::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
Draw::Draws typeobject, const Document::Documents &parse,
Tool::Sources typeCreation)
const Tool::Sources &typeCreation)
{
VNodeSpline *spl = 0;
if (parse == Document::FullParse)

View File

@ -30,9 +30,9 @@ class VNodeSpline:public VAbstractNode, public QGraphicsPathItem
Q_OBJECT
public:
VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
static VNodeSpline *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
public slots:

View File

@ -25,7 +25,7 @@ const QString VNodeSplinePath::TagName = QStringLiteral("spline");
const QString VNodeSplinePath::ToolType = QStringLiteral("modelingPath");
VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
Draw::Draws typeobject, Tool::Sources typeCreation, QGraphicsItem * parent)
Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent)
:VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent)
{
RefreshGeometry();
@ -40,7 +40,7 @@ VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
}
void VNodeSplinePath::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation)
Draw::Draws typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
if (parse == Document::FullParse)
{

View File

@ -30,9 +30,9 @@ class VNodeSplinePath : public VAbstractNode, public QGraphicsPathItem
Q_OBJECT
public:
VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
Draw::Draws typeobject, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject,
const Document::Documents &parse, Tool::Sources typeCreation);
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
static const QString ToolType;
public slots:

View File

@ -95,7 +95,8 @@ QPointF VAbstractTool::LineIntersectRect(QRectF rec, QLineF line)
return point;
}
qint32 VAbstractTool::LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, QPointF &p2)
qint32 VAbstractTool::LineIntersectCircle(const QPointF &center, qreal radius, const QLineF &line, QPointF &p1,
QPointF &p2)
{
const qreal eps = 1e-8;
//коефіцієнти для рівняння відрізку
@ -130,7 +131,7 @@ qint32 VAbstractTool::LineIntersectCircle(QPointF center, qreal radius, QLineF l
return flag;
}
QPointF VAbstractTool::ClosestPoint(QLineF line, QPointF p)
QPointF VAbstractTool::ClosestPoint(const QLineF &line, const QPointF &p)
{
QLineF lineP2pointFrom = QLineF(line.p2(), p);
qreal angle = 180-line.angleTo(lineP2pointFrom)-90;
@ -146,14 +147,14 @@ QPointF VAbstractTool::ClosestPoint(QLineF line, QPointF p)
{
if ( type == QLineF::NoIntersection || type == QLineF::UnboundedIntersection )
{
Q_ASSERT_X(type != QLineF::BoundedIntersection, Q_FUNC_INFO, "Немає точки перетину.");
Q_ASSERT_X(type != QLineF::BoundedIntersection, Q_FUNC_INFO, "Don't have point of intersection.");
return point;
}
}
return point;
}
QPointF VAbstractTool::addVector(QPointF p, QPointF p1, QPointF p2, qreal k)
QPointF VAbstractTool::addVector(const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k)
{
return QPointF (p.x() + (p2.x() - p1.x()) * k, p.y() + (p2.y() - p1.y()) * k);
}
@ -172,7 +173,8 @@ void VAbstractTool::RemoveAllChild(QDomElement &domElement)
void VAbstractTool::LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c)
{
//коефіцієнти для рівняння відрізку
*a = line.p2().y() - line.p1().y();
*b = line.p1().x() - line.p2().x();
*c = - *a * line.p1().x() - *b * line.p1().y();
QPointF p1 = line.p1();
*a = line.p2().y() - p1.y();
*b = p1.x() - line.p2().x();
*c = - *a * p1.x() - *b * p1.y();
}

View File

@ -32,9 +32,10 @@ public:
VAbstractTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0);
virtual ~VAbstractTool() {}
static QPointF LineIntersectRect(QRectF rec, QLineF line);
static qint32 LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, QPointF &p2);
static QPointF ClosestPoint(QLineF line, QPointF p);
static QPointF addVector (QPointF p, QPointF p1, QPointF p2, qreal k);
static qint32 LineIntersectCircle(const QPointF &center, qreal radius, const QLineF &line, QPointF &p1,
QPointF &p2);
static QPointF ClosestPoint(const QLineF &line, const QPointF &p);
static QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k);
inline qint64 getId() const {return id;}
static void LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c);
static const QString AttrId;

View File

@ -34,7 +34,7 @@ const QString VToolDetail::AttrNodeType = QStringLiteral("nodeType");
const QString VToolDetail::NodeTypeContour = QStringLiteral("Contour");
const QString VToolDetail::NodeTypeModeling = QStringLiteral("Modeling");
VToolDetail::VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, Tool::Sources typeCreation,
VToolDetail::VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, const Tool::Sources &typeCreation,
VMainGraphicsScene *scene, QGraphicsItem *parent)
:VAbstractTool(doc, data, id), QGraphicsPathItem(parent), dialogDetail(QSharedPointer<DialogDetail>()),
sceneDetails(scene)
@ -208,7 +208,7 @@ void VToolDetail::Create(QSharedPointer<DialogDetail> &dialog, VMainGraphicsScen
}
void VToolDetail::Create(const qint64 _id, VDetail &newDetail, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation)
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
qint64 id = _id;
if (typeCreation == Tool::FromGui)

View File

@ -31,14 +31,14 @@ class VToolDetail: public VAbstractTool, public QGraphicsPathItem
Q_OBJECT
public:
VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id,
Tool::Sources typeCreation, VMainGraphicsScene *scene,
const Tool::Sources &typeCreation, VMainGraphicsScene *scene,
QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogDetail> &dialog, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data);
static void Create(const qint64 _id, VDetail &newDetail, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation);
const Tool::Sources &typeCreation);
template <typename T>
void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool)
{

View File

@ -69,7 +69,7 @@ QVariant VControlPointSpline::itemChange(QGraphicsItem::GraphicsItemChange chang
return QGraphicsItem::itemChange(change, value);
}
qint32 VControlPointSpline::LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1,
qint32 VControlPointSpline::LineIntersectCircle(const QPointF &center, qreal radius, const QLineF &line, QPointF &p1,
QPointF &p2) const
{
const qreal eps = 1e-8;
@ -107,7 +107,7 @@ qint32 VControlPointSpline::LineIntersectCircle(QPointF center, qreal radius, QL
return flag;
}
QPointF VControlPointSpline::ClosestPoint(QLineF line, QPointF p) const
QPointF VControlPointSpline::ClosestPoint(const QLineF &line, const QPointF &p) const
{
QLineF lineP2pointFrom = QLineF(line.p2(), p);
qreal angle = 180-line.angleTo(lineP2pointFrom)-90;
@ -130,7 +130,7 @@ QPointF VControlPointSpline::ClosestPoint(QLineF line, QPointF p) const
return point;
}
QPointF VControlPointSpline::addVector(QPointF p, QPointF p1, QPointF p2, qreal k) const
QPointF VControlPointSpline::addVector(const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) const
{
return QPointF (p.x() + (p2.x() - p1.x()) * k, p.y() + (p2.y() - p1.y()) * k);
}

View File

@ -50,9 +50,10 @@ private:
Q_DISABLE_COPY(VControlPointSpline)
qint32 indexSpline;
SplinePoint::Position position;
qint32 LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, QPointF &p2) const;
QPointF ClosestPoint(QLineF line, QPointF p) const;
QPointF addVector (QPointF p, QPointF p1, QPointF p2, qreal k) const;
qint32 LineIntersectCircle(const QPointF &center, qreal radius, const QLineF &line, QPointF &p1,
QPointF &p2) const;
QPointF ClosestPoint(const QLineF &line, const QPointF &p) const;
QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) const;
};

View File

@ -39,7 +39,7 @@ void VMainGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
QGraphicsScene::mousePressEvent(event);
}
void VMainGraphicsScene::ChoosedItem(qint64 id, Scene::Scenes type)
void VMainGraphicsScene::ChoosedItem(qint64 id, const Scene::Scenes &type)
{
emit ChoosedObject(id, type);
}

View File

@ -35,7 +35,7 @@ public:
inline qint32 getVerScrollBar() const {return verScrollBar;}
inline void setVerScrollBar(const qint32 &value) {verScrollBar = value;}
public slots:
void ChoosedItem(qint64 id, Scene::Scenes type);
void ChoosedItem(qint64 id, const Scene::Scenes &type);
inline void RemoveTool(QGraphicsItem *tool) {this->removeItem(tool);}
void SetFactor(qreal factor);
protected:

View File

@ -50,7 +50,7 @@ void VMainGraphicsView::wheelEvent(QWheelEvent *event)
void VMainGraphicsView::scalingTime(qreal x)
{
Q_UNUSED(x);
qreal factor = 1.0 + qreal(_numScheduledScalings) / 300.0;
qreal factor = 1.0 + static_cast<qreal>(_numScheduledScalings) / 300.0;
if (QApplication::keyboardModifiers() == Qt::ControlModifier)
{// If you press CTRL this code will execute
scale(factor, factor);

View File

@ -72,7 +72,7 @@ QDomElement VDomDocument::elementById(const QString& id)
return QDomElement();
}
bool VDomDocument::find(QDomElement node, const QString& id)
bool VDomDocument::find(const QDomElement &node, const QString& id)
{
if (node.hasAttribute("id"))
{
@ -175,7 +175,7 @@ bool VDomDocument::appendDraw(const QString& name)
return false;
}
void VDomDocument::ChangeActivDraw(const QString& name, Document::Documents parse)
void VDomDocument::ChangeActivDraw(const QString& name, const Document::Documents &parse)
{
Q_ASSERT_X(name.isEmpty() == false, "ChangeActivDraw", "name draw is empty");
if (CheckNameDraw(name) == true)
@ -306,7 +306,8 @@ bool VDomDocument::GetActivNodeElement(const QString& name, QDomElement &element
}
}
void VDomDocument::Parse(Document::Documents parse, VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail)
void VDomDocument::Parse(const Document::Documents &parse, VMainGraphicsScene *sceneDraw,
VMainGraphicsScene *sceneDetail)
{
Q_ASSERT(sceneDraw != 0);
Q_ASSERT(sceneDetail != 0);
@ -450,7 +451,7 @@ void VDomDocument::TestUniqueId() const
CollectId(this->documentElement(), vector);
}
void VDomDocument::CollectId(QDomElement node, QVector<qint64> &vector) const
void VDomDocument::CollectId(const QDomElement &node, QVector<qint64> &vector) const
{
if (node.hasAttribute("id"))
{
@ -503,7 +504,7 @@ void VDomDocument::ParseDrawElement(VMainGraphicsScene *sceneDraw, VMainGraphics
}
void VDomDocument::ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail,
const QDomNode& node, const Document::Documents &parse, Draw::Draws mode)
const QDomNode& node, const Document::Documents &parse, const Draw::Draws &mode)
{
Q_ASSERT(sceneDraw != 0);
Q_ASSERT(sceneDetail != 0);
@ -702,7 +703,7 @@ void VDomDocument::ParseDetails(VMainGraphicsScene *sceneDetail, const QDomEleme
}
void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElement& domElement,
const Document::Documents &parse, const QString& type, Draw::Draws mode)
const Document::Documents &parse, const QString& type, const Draw::Draws &mode)
{
Q_ASSERT(scene != 0);
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");
@ -1097,7 +1098,7 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen
}
void VDomDocument::ParseLineElement(VMainGraphicsScene *scene, const QDomElement &domElement,
const Document::Documents &parse, Draw::Draws mode)
const Document::Documents &parse, const Draw::Draws &mode)
{
Q_ASSERT(scene != 0);
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");
@ -1126,7 +1127,7 @@ void VDomDocument::ParseLineElement(VMainGraphicsScene *scene, const QDomElement
}
void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &domElement,
const Document::Documents &parse, const QString &type, Draw::Draws mode)
const Document::Documents &parse, const QString &type, const Draw::Draws &mode)
{
Q_ASSERT(scene != 0);
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");
@ -1278,7 +1279,7 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme
}
void VDomDocument::ParseArcElement(VMainGraphicsScene *scene, const QDomElement &domElement,
const Document::Documents &parse, const QString &type, Draw::Draws mode)
const Document::Documents &parse, const QString &type, const Draw::Draws &mode)
{
Q_ASSERT(scene != 0);
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");

View File

@ -50,7 +50,7 @@ public:
~VDomDocument(){}
QDomElement elementById(const QString& id);
void CreateEmptyFile();
void ChangeActivDraw(const QString& name, Document::Documents parse = Document::FullParse);
void ChangeActivDraw(const QString& name, const Document::Documents &parse = Document::FullParse);
inline QString GetNameActivDraw() const {return nameActivDraw;}
bool GetActivDrawElement(QDomElement &element);
bool GetActivCalculationElement(QDomElement &element);
@ -58,7 +58,8 @@ public:
bool GetActivDetailsElement(QDomElement &element);
bool appendDraw(const QString& name);
bool SetNameDraw(const QString& name);
void Parse(Document::Documents parse, VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail);
void Parse(const Document::Documents &parse, VMainGraphicsScene *sceneDraw,
VMainGraphicsScene *sceneDetail);
inline QHash<qint64, VDataTool*>* getTools() {return &tools;}
inline QVector<VToolRecord> *getHistory() {return &history;}
inline qint64 getCursor() const {return cursor;}
@ -70,7 +71,7 @@ public:
void DecrementReferens(qint64 id) const;
void TestUniqueId() const;
signals:
void ChangedActivDraw(const QString newName);
void ChangedActivDraw(const QString &newName);
void ChangedNameDraw(const QString oldName, const QString newName);
void FullUpdateFromFile();
void haveChange();
@ -90,32 +91,32 @@ private:
qint64 cursor;
QComboBox *comboBoxDraws;
Draw::Draws *mode;
bool find(QDomElement node, const QString& id);
bool find(const QDomElement &node, const QString& id);
bool CheckNameDraw(const QString& name) const;
void SetActivDraw(const QString& name);
bool GetActivNodeElement(const QString& name, QDomElement& element);
void ParseDrawElement(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail,
const QDomNode& node, const Document::Documents &parse);
void ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail,
const QDomNode& node, const Document::Documents &parse, Draw::Draws mode);
const QDomNode& node, const Document::Documents &parse, const Draw::Draws &mode);
void ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDomElement &domElement,
const Document::Documents &parse);
void ParseDetails(VMainGraphicsScene *sceneDetail, const QDomElement &domElement,
const Document::Documents &parse);
void ParsePointElement(VMainGraphicsScene *scene, const QDomElement& domElement,
const Document::Documents &parse, const QString &type, Draw::Draws mode);
const Document::Documents &parse, const QString &type, const Draw::Draws &mode);
void ParseLineElement(VMainGraphicsScene *scene, const QDomElement& domElement,
const Document::Documents &parse, Draw::Draws mode);
const Document::Documents &parse, const Draw::Draws &mode);
void ParseSplineElement(VMainGraphicsScene *scene, const QDomElement& domElement,
const Document::Documents &parse, const QString& type, Draw::Draws mode);
const Document::Documents &parse, const QString& type, const Draw::Draws &mode);
void ParseArcElement(VMainGraphicsScene *scene, const QDomElement& domElement,
const Document::Documents &parse, const QString& type, Draw::Draws mode);
const Document::Documents &parse, const QString& type, const Draw::Draws &mode);
void ParseIncrementsElement(const QDomNode& node);
qint64 GetParametrId(const QDomElement& domElement) const;
qint64 GetParametrLongLong(const QDomElement& domElement, const QString &name) const;
QString GetParametrString(const QDomElement& domElement, const QString &name) const;
qreal GetParametrDouble(const QDomElement& domElement, const QString &name) const;
void CollectId(QDomElement node, QVector<qint64> &vector)const;
void CollectId(const QDomElement &node, QVector<qint64> &vector)const;
};
#ifdef Q_CC_GNU