Tool::Enum changed on Tool::Sources

--HG--
branch : feature
This commit is contained in:
dismine 2013-09-29 13:58:45 +03:00
parent 14c8fdeee7
commit 41ae42af4b
60 changed files with 116 additions and 120 deletions

View File

@ -58,8 +58,12 @@ enum Tool {ArrowTool,
NodeSplinePath
};
Q_DECLARE_FLAGS(Tools, Tool)
enum Source { FromGui, FromFile };
Q_DECLARE_FLAGS(Sources, Source)
}
Q_DECLARE_OPERATORS_FOR_FLAGS( Tool::Tools )
Q_DECLARE_OPERATORS_FOR_FLAGS( Tool::Sources )
namespace Draw {
enum Draw { Calculation, Modeling };

View File

@ -27,7 +27,7 @@
VToolAlongLine::VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
const qint64 &firstPointId, const qint64 &secondPointId,
const QString &typeLine, Tool::Enum typeCreation,
const QString &typeLine, Tool::Sources typeCreation,
QGraphicsItem *parent):
VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId),
dialogAlongLine(QSharedPointer<DialogAlongLine>()){
@ -117,7 +117,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::Enum typeCreation){
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){
VPointF firstPoint = data->GetPoint(firstPointId);
VPointF secondPoint = data->GetPoint(secondPointId);
QLineF line = QLineF(firstPoint.toQPointF(), secondPoint.toQPointF());

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::Enum typeCreation, QGraphicsItem * parent = 0);
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::Enum typeCreation);
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -23,7 +23,7 @@
#include <QMenu>
#include "container/calculator.h"
VToolArc::VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Enum typeCreation,
VToolArc::VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
QGraphicsItem *parent):VDrawTool(doc, data, id), QGraphicsPathItem(parent),
dialogArc(QSharedPointer<DialogArc>()){
VArc arc = data->GetArc(id);
@ -62,7 +62,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::Enum typeCreation){
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;
Calculator cal(data);

View File

@ -33,14 +33,14 @@ class VToolArc :public VDrawTool, public QGraphicsPathItem
{
Q_OBJECT
public:
VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Enum typeCreation,
VToolArc(VDomDocument *doc, VContainer *data, qint64 id, 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::Enum typeCreation);
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -24,7 +24,7 @@
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::Enum typeCreation,
const qint64 &secondPointId, const qint64 &thirdPointId, Tool::Sources typeCreation,
QGraphicsItem *parent):
VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0),
thirdPointId(0), dialogBisector(QSharedPointer<DialogBisector>()){
@ -78,7 +78,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::Enum typeCreation){
const Document::Documents &parse, Tool::Sources typeCreation){
VPointF firstPoint = data->GetPoint(firstPointId);
VPointF secondPoint = data->GetPoint(secondPointId);
VPointF thirdPoint = data->GetPoint(thirdPointId);

View File

@ -31,7 +31,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::Enum typeCreation,
const qint64 &secondPointId, const qint64 &thirdPointId, Tool::Sources typeCreation,
QGraphicsItem * parent = 0);
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
const QPointF &thirdPoint, const qreal& length);
@ -42,7 +42,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::Enum typeCreation);
Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -26,7 +26,7 @@
VToolEndLine::VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &basePointId,
Tool::Enum typeCreation, QGraphicsItem *parent):
Tool::Sources typeCreation, QGraphicsItem *parent):
VToolLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent),
dialogEndLine(QSharedPointer<DialogEndLine>()){
@ -61,7 +61,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::Enum typeCreation){
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){
VPointF basePoint = data->GetPoint(basePointId);
QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y()));

View File

@ -32,7 +32,7 @@ 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::Enum typeCreation,
const qint64 &basePointId, Tool::Sources typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogEndLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
@ -40,7 +40,7 @@ public:
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::Enum typeCreation);
const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -24,7 +24,7 @@
#include <QDebug>
VToolLine::VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint,
Tool::Enum typeCreation, QGraphicsItem *parent):VDrawTool(doc, data, id),
Tool::Sources typeCreation, QGraphicsItem *parent):VDrawTool(doc, data, id),
QGraphicsLineItem(parent), firstPoint(firstPoint), secondPoint(secondPoint),
dialogLine(QSharedPointer<DialogLine>()){
//Лінія
@ -54,7 +54,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::Enum typeCreation){
Tool::Sources typeCreation){
Q_CHECK_PTR(scene);
Q_CHECK_PTR(doc);
Q_CHECK_PTR(data);

View File

@ -31,13 +31,13 @@ class VToolLine: public VDrawTool, public QGraphicsLineItem
Q_OBJECT
public:
VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
qint64 secondPoint, Tool::Enum typeCreation, QGraphicsItem * parent = 0);
qint64 secondPoint, 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::Enum typeCreation);
const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void ChangedActivDraw(const QString newName);

View File

@ -24,7 +24,7 @@
VToolLineIntersect::VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2,
const qint64 &p2Line2, Tool::Enum typeCreation, QGraphicsItem *parent):
const qint64 &p2Line2, Tool::Sources typeCreation, QGraphicsItem *parent):
VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2),
p2Line2(p2Line2), dialogLineIntersect(QSharedPointer<DialogLineIntersect>()){
if(typeCreation == Tool::FromGui){
@ -58,7 +58,7 @@ void VToolLineIntersect::Create(QSharedPointer<DialogLineIntersect> &dialog, VMa
void VToolLineIntersect::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::Enum typeCreation){
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){
VPointF p1Line1 = data->GetPoint(p1Line1Id);
VPointF p2Line1 = data->GetPoint(p2Line1Id);
VPointF p1Line2 = data->GetPoint(p1Line2Id);

View File

@ -33,7 +33,7 @@ public:
const qint64 &id,
const qint64 &p1Line1,
const qint64 &p2Line1, const qint64 &p1Line2,
const qint64 &p2Line2, Tool::Enum typeCreation,
const qint64 &p2Line2, Tool::Sources typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogLineIntersect> &dialog, VMainGraphicsScene *scene,
@ -41,7 +41,7 @@ public:
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::Enum typeCreation);
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -25,7 +25,7 @@
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::Enum typeCreation, QGraphicsItem *parent):
const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent):
VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent),
secondPointId(secondPointId), dialogNormal(QSharedPointer<DialogNormal>()){
@ -63,7 +63,7 @@ void VToolNormal::Create(QSharedPointer<DialogNormal> &dialog, VMainGraphicsScen
void VToolNormal::Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
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::Enum typeCreation){
VDomDocument *doc, VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){
VPointF firstPoint = data->GetPoint(firstPointId);
VPointF secondPoint = data->GetPoint(secondPointId);
Calculator cal(data);

View File

@ -33,7 +33,7 @@ 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::Enum typeCreation,
const qint64 &secondPointId, Tool::Sources typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogNormal> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
@ -41,7 +41,7 @@ public:
static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
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::Enum typeCreation);
VDomDocument *doc, VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
const qreal &length, const qreal &angle = 0);
public slots:

View File

@ -24,7 +24,7 @@
VToolPointOfContact::VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Enum typeCreation, QGraphicsItem *parent)
Tool::Sources typeCreation, QGraphicsItem *parent)
: VToolPoint(doc, data, id, parent), radius(radius), center(center), firstPointId(firstPointId),
secondPointId(secondPointId), dialogPointOfContact(QSharedPointer<DialogPointOfContact>()){
@ -82,7 +82,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::Enum typeCreation){
const Document::Documents &parse, Tool::Sources typeCreation){
VPointF centerP = data->GetPoint(center);
VPointF firstP = data->GetPoint(firstPointId);
VPointF secondP = data->GetPoint(secondPointId);

View File

@ -30,7 +30,7 @@ class VToolPointOfContact : public VToolPoint
public:
VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center, const qint64 &firstPointId,
const qint64 &secondPointId, Tool::Enum typeCreation, QGraphicsItem * parent = 0);
const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static QPointF FindPoint(const qreal &radius, const QPointF &center, const QPointF &firstPoint,
const QPointF &secondPoint);
@ -39,7 +39,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::Enum typeCreation);
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -25,7 +25,7 @@
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::Enum typeCreation,
const qint64 &p2Line, const qint64 &pShoulder, Tool::Sources typeCreation,
QGraphicsItem * parent):
VToolLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), pShoulder(pShoulder),
dialogShoulderPoint(QSharedPointer<DialogShoulderPoint>()){
@ -86,7 +86,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::Enum typeCreation){
const Document::Documents &parse, Tool::Sources typeCreation){
VPointF firstPoint = data->GetPoint(p1Line);
VPointF secondPoint = data->GetPoint(p2Line);
VPointF shoulderPoint = data->GetPoint(pShoulder);

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::Enum typeCreation,
const qint64 &p2Line, const qint64 &pShoulder, Tool::Sources typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder,
@ -40,7 +40,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::Enum typeCreation);
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -30,7 +30,7 @@
#include "options.h"
#include "container/vpointf.h"
VToolSinglePoint::VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Enum typeCreation,
VToolSinglePoint::VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
QGraphicsItem * parent ):VToolPoint(doc, data, id, parent),
dialogSinglePoint(QSharedPointer<DialogSinglePoint>()){
this->setFlag(QGraphicsItem::ItemIsMovable, true);

View File

@ -32,7 +32,7 @@ class VToolSinglePoint : public VToolPoint
Q_OBJECT
public:
VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id,
Tool::Enum typeCreation, QGraphicsItem * parent = 0 );
Tool::Sources typeCreation, QGraphicsItem * parent = 0 );
virtual void setDialog();
public slots:
virtual void FullUpdateFromFile();

View File

@ -26,7 +26,7 @@
VToolSpline::VToolSpline(VDomDocument *doc, VContainer *data, qint64 id,
Tool::Enum typeCreation,
Tool::Sources typeCreation,
QGraphicsItem *parent):VDrawTool(doc, data, id), QGraphicsPathItem(parent),
dialogSpline(QSharedPointer<DialogSpline>()), controlPoints(QVector<VControlPointSpline *>()){
@ -90,7 +90,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::Enum typeCreation){
Tool::Sources typeCreation){
VSpline spline = VSpline(data->DataPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve);
qint64 id = _id;
if(typeCreation == Tool::FromGui){

View File

@ -35,14 +35,14 @@ class VToolSpline:public VDrawTool, public QGraphicsPathItem
Q_OBJECT
public:
VToolSpline (VDomDocument *doc, VContainer *data, qint64 id,
Tool::Enum typeCreation, QGraphicsItem * parent = 0 );
Tool::Sources typeCreation, QGraphicsItem * parent = 0 );
virtual void setDialog();
static void Create(QSharedPointer<DialogSpline> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data);
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::Enum typeCreation);
Tool::Sources typeCreation);
signals:
void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position,
const QPointF &controlPoint, const QPointF &splinePoint );

View File

@ -23,7 +23,7 @@
#include <QMenu>
VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
Tool::Enum typeCreation,
Tool::Sources typeCreation,
QGraphicsItem *parent):VDrawTool(doc, data, id),
QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer<DialogSplinePath>()),
controlPoints(QVector<VControlPointSpline *>()){
@ -75,7 +75,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::Enum typeCreation){
Tool::Sources typeCreation){
qint64 id = _id;
if(typeCreation == Tool::FromGui){
id = data->AddSplinePath(path);

View File

@ -34,13 +34,13 @@ class VToolSplinePath:public VDrawTool, public QGraphicsPathItem
Q_OBJECT
public:
VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
Tool::Enum typeCreation,
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::Enum typeCreation);
VDomDocument *doc, VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
signals:
void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos,
const QPointF &controlPoint, const QPointF &splinePoint);

View File

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

View File

@ -31,7 +31,7 @@ class VModelingAlongLine : public VModelingLinePoint
public:
VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine,
Tool::Enum typeCreation, QGraphicsItem * parent = 0);
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingAlongLine* Create(QSharedPointer<DialogAlongLine> &dialog, VDomDocument *doc,
VContainer *data);
@ -39,7 +39,7 @@ public:
const QString &formula, const qint64 &firstPointId,
const qint64 &secondPointId, const qreal &mx, const qreal &my,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Enum typeCreation);
Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -23,7 +23,7 @@
#include <QMenu>
#include "container/calculator.h"
VModelingArc::VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Enum typeCreation,
VModelingArc::VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
QGraphicsItem *parent):VModelingTool(doc, data, id), QGraphicsPathItem(parent),
dialogArc(QSharedPointer<DialogArc>()){
VArc arc = data->GetModelingArc(id);
@ -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::Enum typeCreation){
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){
VModelingArc *toolArc = 0;
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;

View File

@ -33,13 +33,13 @@ class VModelingArc :public VModelingTool, public QGraphicsPathItem
{
Q_OBJECT
public:
VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Enum typeCreation,
VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, 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::Enum typeCreation);
const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -24,7 +24,7 @@
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::Enum typeCreation,
const qint64 &secondPointId, const qint64 &thirdPointId, Tool::Sources typeCreation,
QGraphicsItem *parent):
VModelingLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0),
thirdPointId(0), dialogBisector(QSharedPointer<DialogBisector>()){
@ -79,7 +79,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::Enum typeCreation){
Tool::Sources typeCreation){
VModelingBisector *point = 0;
VPointF firstPoint = data->GetModelingPoint(firstPointId);
VPointF secondPoint = data->GetModelingPoint(secondPointId);

View File

@ -32,7 +32,7 @@ class VModelingBisector : public VModelingLinePoint
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::Enum typeCreation,
const qint64 &secondPointId, const qint64 &thirdPointId, Tool::Sources typeCreation,
QGraphicsItem * parent = 0);
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
const QPointF &thirdPoint, const qreal& length);
@ -43,7 +43,7 @@ public:
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::Enum typeCreation);
const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -26,7 +26,7 @@
VModelingEndLine::VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &basePointId,
Tool::Enum typeCreation, QGraphicsItem *parent):
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::Enum typeCreation){
const Document::Documents &parse, Tool::Sources typeCreation){
VModelingEndLine *point = 0;
VPointF basePoint = data->GetModelingPoint(basePointId);
QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y()));

View File

@ -32,7 +32,7 @@ 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::Enum typeCreation,
const qint64 &basePointId, Tool::Sources typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingEndLine* Create(QSharedPointer<DialogEndLine> &dialog, VDomDocument *doc,
@ -40,7 +40,7 @@ public:
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::Enum typeCreation);
const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -24,7 +24,7 @@
#include <QDebug>
VModelingLine::VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
qint64 secondPoint, Tool::Enum typeCreation, QGraphicsItem *parent):
qint64 secondPoint, Tool::Sources typeCreation, QGraphicsItem *parent):
VModelingTool(doc, data, id), QGraphicsLineItem(parent), firstPoint(firstPoint),
secondPoint(secondPoint), dialogLine(QSharedPointer<DialogLine>()){
//Лінія
@ -54,7 +54,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::Enum typeCreation){
Tool::Sources typeCreation){
VModelingLine *line = 0;
Q_CHECK_PTR(doc);
Q_CHECK_PTR(data);

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::Enum typeCreation, QGraphicsItem * parent = 0);
qint64 secondPoint, 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::Enum typeCreation);
Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -24,7 +24,7 @@
VModelingLineIntersect::VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2,
const qint64 &p2Line2, Tool::Enum typeCreation, QGraphicsItem *parent):
const qint64 &p2Line2, Tool::Sources typeCreation, QGraphicsItem *parent):
VModelingPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2),
p2Line2(p2Line2), dialogLineIntersect(QSharedPointer<DialogLineIntersect>()){
if(typeCreation == Tool::FromGui){
@ -60,7 +60,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::Enum typeCreation){
Tool::Sources typeCreation){
VModelingLineIntersect *point = 0;
VPointF p1Line1 = data->GetModelingPoint(p1Line1Id);
VPointF p2Line1 = data->GetModelingPoint(p2Line1Id);

View File

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

View File

@ -25,7 +25,7 @@
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::Enum typeCreation, QGraphicsItem *parent):
const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent):
VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent),
secondPointId(secondPointId), dialogNormal(QSharedPointer<DialogNormal>()){
@ -65,7 +65,7 @@ VModelingNormal *VModelingNormal::Create(const qint64 _id, const QString &formul
const QString typeLine, const QString pointName,
const qreal angle, const qreal &mx, const qreal &my,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Enum typeCreation){
Tool::Sources typeCreation){
VModelingNormal *point = 0;
VPointF firstPoint = data->GetModelingPoint(firstPointId);
VPointF secondPoint = data->GetModelingPoint(secondPointId);

View File

@ -33,7 +33,7 @@ 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::Enum typeCreation,
const qint64 &secondPointId, Tool::Sources typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static VModelingNormal* Create(QSharedPointer<DialogNormal> &dialog, VDomDocument *doc, VContainer *data);
@ -41,7 +41,7 @@ public:
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::Enum typeCreation);
Tool::Sources typeCreation);
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
const qreal &length, const qreal &angle = 0);
public slots:

View File

@ -24,7 +24,7 @@
VModelingPointOfContact::VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center,
const qint64 &firstPointId, const qint64 &secondPointId,
Tool::Enum typeCreation, QGraphicsItem *parent)
Tool::Sources typeCreation, QGraphicsItem *parent)
: VModelingPoint(doc, data, id, parent), radius(radius), center(center), firstPointId(firstPointId),
secondPointId(secondPointId), dialogPointOfContact(QSharedPointer<DialogPointOfContact>()){
@ -84,7 +84,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::Enum typeCreation){
Tool::Sources typeCreation){
VModelingPointOfContact *point = 0;
VPointF centerP = data->GetModelingPoint(center);
VPointF firstP = data->GetModelingPoint(firstPointId);

View File

@ -31,7 +31,7 @@ class VModelingPointOfContact : public VModelingPoint
public:
VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center, const qint64 &firstPointId,
const qint64 &secondPointId, Tool::Enum typeCreation, QGraphicsItem * parent = 0);
const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static QPointF FindPoint(const qreal &radius, const QPointF &center, const QPointF &firstPoint,
const QPointF &secondPoint);
@ -41,7 +41,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::Enum typeCreation);
Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -25,7 +25,7 @@
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::Enum typeCreation,
const qint64 &p2Line, const qint64 &pShoulder, Tool::Sources typeCreation,
QGraphicsItem * parent):
VModelingLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line),
pShoulder(pShoulder), dialogShoulderPoint(QSharedPointer<DialogShoulderPoint>()){
@ -87,7 +87,7 @@ VModelingShoulderPoint *VModelingShoulderPoint::Create(const qint64 _id, const Q
const qint64 &pShoulder, const QString &typeLine,
const QString &pointName, const qreal &mx,
const qreal &my, VDomDocument *doc, VContainer *data,
const Document::Documents &parse, Tool::Enum typeCreation){
const Document::Documents &parse, Tool::Sources typeCreation){
VModelingShoulderPoint *point = 0;
VPointF firstPoint = data->GetModelingPoint(p1Line);
VPointF secondPoint = data->GetModelingPoint(p2Line);

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::Enum typeCreation,
const qint64 &p2Line, const qint64 &pShoulder, Tool::Sources typeCreation,
QGraphicsItem * parent = 0);
virtual void setDialog();
static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder,
@ -42,7 +42,7 @@ public:
const qint64 &p2Line, const qint64 &pShoulder,
const QString &typeLine, const QString &pointName,
const qreal &mx, const qreal &my, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -9,7 +9,7 @@
#include "options.h"
#include "container/vpointf.h"
VModelingSinglePoint::VModelingSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Enum typeCreation,
VModelingSinglePoint::VModelingSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
QGraphicsItem * parent ):VModelingPoint(doc, data, id, parent),
dialogSinglePoint(QSharedPointer<DialogSinglePoint>()){
this->setFlag(QGraphicsItem::ItemIsMovable, true);

View File

@ -11,7 +11,7 @@ class VModelingSinglePoint : public VModelingPoint
Q_OBJECT
public:
VModelingSinglePoint (VDomDocument *doc, VContainer *data, qint64 id,
Tool::Enum typeCreation, QGraphicsItem * parent = 0 );
Tool::Sources typeCreation, QGraphicsItem * parent = 0 );
virtual void setDialog();
public slots:
virtual void FullUpdateFromFile();

View File

@ -26,7 +26,7 @@
VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id,
Tool::Enum typeCreation,
Tool::Sources typeCreation,
QGraphicsItem *parent):VModelingTool(doc, data, id), QGraphicsPathItem(parent),
dialogSpline(QSharedPointer<DialogSpline>()), controlPoints(QVector<VControlPointSpline *>()){
@ -90,7 +90,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::Enum typeCreation){
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){
VModelingSpline *spl = 0;
VSpline spline = VSpline(data->DataModelingPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve);
qint64 id = _id;

View File

@ -35,14 +35,14 @@ class VModelingSpline:public VModelingTool, public QGraphicsPathItem
Q_OBJECT
public:
VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id,
Tool::Enum typeCreation, QGraphicsItem * parent = 0 );
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::Enum typeCreation);
const Document::Documents &parse, Tool::Sources typeCreation);
signals:
void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position,
const QPointF &controlPoint, const QPointF &splinePoint );

View File

@ -23,7 +23,7 @@
#include <QMenu>
VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
Tool::Enum typeCreation,
Tool::Sources typeCreation,
QGraphicsItem *parent):VModelingTool(doc, data, id),
QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer<DialogSplinePath>()),
controlPoints(QVector<VControlPointSpline *>()){
@ -75,7 +75,7 @@ VModelingSplinePath *VModelingSplinePath::Create(QSharedPointer<DialogSplinePath
VModelingSplinePath * VModelingSplinePath::Create(const qint64 _id, const VSplinePath &path,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Enum typeCreation){
Tool::Sources typeCreation){
VModelingSplinePath *spl = 0;
qint64 id = _id;
if(typeCreation == Tool::FromGui){

View File

@ -34,13 +34,13 @@ class VModelingSplinePath:public VModelingTool, public QGraphicsPathItem
Q_OBJECT
public:
VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
Tool::Enum typeCreation,
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::Enum typeCreation);
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
signals:
void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos,
const QPointF &controlPoint, const QPointF &splinePoint);

View File

@ -22,7 +22,7 @@
#include "vnodearc.h"
VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject,
Tool::Enum typeCreation, QGraphicsItem * parent) :
Tool::Sources typeCreation, QGraphicsItem * parent) :
VAbstractNode(doc, data, id, idArc, typeobject), QGraphicsPathItem(parent){
RefreshGeometry();
this->setPen(QPen(baseColor, widthHairLine));
@ -35,7 +35,7 @@ VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc,
}
VNodeArc *VNodeArc::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc,
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation){
Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation){
VNodeArc *arc = 0;
if(parse == Document::FullParse){
arc = new VNodeArc(doc, data, id, idArc, typeobject, typeCreation);

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::Enum typeCreation, QGraphicsItem * parent = 0);
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
static VNodeArc *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc,
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation);
Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
protected:

View File

@ -22,7 +22,7 @@
#include "vnodepoint.h"
VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint,
Draw::Draws typeobject, Tool::Enum typeCreation, QGraphicsItem *parent)
Draw::Draws typeobject, Tool::Sources typeCreation, QGraphicsItem *parent)
:VAbstractNode(doc, data, id, idPoint, typeobject), QGraphicsEllipseItem(parent),
radius(toPixel(1.5)), namePoint(0), lineName(0){
namePoint = new VGraphicsSimpleTextItem(this);
@ -40,7 +40,7 @@ VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 id
}
VNodePoint *VNodePoint::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint,
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation){
Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation){
VNodePoint *point = 0;
if(parse == Document::FullParse){
point = new VNodePoint(doc, data, id, idPoint, typeobject, typeCreation);

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::Enum typeCreation, QGraphicsItem * parent = 0 );
Tool::Sources typeCreation, QGraphicsItem * parent = 0 );
static VNodePoint *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint,
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation);
Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
void NameChangePosition(const QPointF pos);

View File

@ -22,7 +22,7 @@
#include "vnodespline.h"
VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
Draw::Draws typeobject, Tool::Enum typeCreation, QGraphicsItem * parent) :
Draw::Draws typeobject, Tool::Sources typeCreation, QGraphicsItem * parent) :
VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent){
RefreshGeometry();
this->setPen(QPen(baseColor, widthHairLine));
@ -35,7 +35,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::Enum typeCreation){
Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation){
VNodeSpline *spl = 0;
if(parse == Document::FullParse){
spl = new VNodeSpline(doc, data, id, idSpline, typeobject, typeCreation);

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::Enum typeCreation, QGraphicsItem * parent = 0);
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::Enum typeCreation);
Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile ();
protected:

View File

@ -22,7 +22,7 @@
#include "vnodesplinepath.h"
VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
Draw::Draws typeobject, Tool::Enum typeCreation,
Draw::Draws typeobject, Tool::Sources typeCreation,
QGraphicsItem * parent) :
VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent){
RefreshGeometry();
@ -37,7 +37,7 @@ VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
VNodeSplinePath *VNodeSplinePath::Create(VDomDocument *doc, VContainer *data, qint64 id,
qint64 idSpline, Draw::Draws typeobject, const Document::Documents &parse,
Tool::Enum typeCreation){
Tool::Sources typeCreation){
VNodeSplinePath *splPath = 0;
if(parse == Document::FullParse){
splPath = new VNodeSplinePath(doc, data, id, idSpline, typeobject, typeCreation);

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::Enum typeCreation, QGraphicsItem * parent = 0);
Draw::Draws typeobject, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
static VNodeSplinePath *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation);
Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
protected:

View File

@ -26,14 +26,6 @@
#include "vdatatool.h"
#include "container/vcontainer.h"
namespace Tool{
enum Enum
{
FromGui,
FromFile
};
}
class VAbstractTool:public VDataTool{
Q_OBJECT
public:

View File

@ -26,7 +26,7 @@
#include "modelingTools/modelingtools.h"
VToolDetail::VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, VDetail &oldDetail,
Tool::Enum typeCreation, const Document::Documents &parse,
Tool::Sources typeCreation, const Document::Documents &parse,
VMainGraphicsScene *scene, QGraphicsItem *parent)
:VAbstractTool(doc, data, id), QGraphicsPathItem(parent),
dialogDetail(QSharedPointer<DialogDetail>()), sceneDetails(scene){
@ -241,7 +241,7 @@ void VToolDetail::Create(QSharedPointer<DialogDetail> &dialog, VMainGraphicsScen
void VToolDetail::Create(const qint64 _id, VDetail &newDetail, VDetail &oldDetail,
VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation){
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){
qint64 id = _id;
if(typeCreation == Tool::FromGui){
id = data->AddDetail(newDetail);

View File

@ -31,14 +31,14 @@ class VToolDetail: public VAbstractTool, public QGraphicsPathItem
Q_OBJECT
public:
VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, VDetail &oldDetail,
Tool::Enum typeCreation, const Document::Documents &parse, VMainGraphicsScene *scene,
Tool::Sources typeCreation, const Document::Documents &parse, 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, VDetail &oldDetail,
VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
VDomDocument *doc, VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
template <typename T>
void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool){
tool->setParentItem(this);