Tool::Enum changed on Tool::Sources
--HG-- branch : feature
This commit is contained in:
parent
14c8fdeee7
commit
41ae42af4b
|
@ -58,8 +58,12 @@ enum Tool {ArrowTool,
|
||||||
NodeSplinePath
|
NodeSplinePath
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(Tools, Tool)
|
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::Tools )
|
||||||
|
Q_DECLARE_OPERATORS_FOR_FLAGS( Tool::Sources )
|
||||||
|
|
||||||
namespace Draw {
|
namespace Draw {
|
||||||
enum Draw { Calculation, Modeling };
|
enum Draw { Calculation, Modeling };
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
VToolAlongLine::VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
|
VToolAlongLine::VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
|
||||||
const qint64 &firstPointId, const qint64 &secondPointId,
|
const qint64 &firstPointId, const qint64 &secondPointId,
|
||||||
const QString &typeLine, Tool::Enum typeCreation,
|
const QString &typeLine, Tool::Sources typeCreation,
|
||||||
QGraphicsItem *parent):
|
QGraphicsItem *parent):
|
||||||
VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId),
|
VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId),
|
||||||
dialogAlongLine(QSharedPointer<DialogAlongLine>()){
|
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,
|
void VToolAlongLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
||||||
const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId,
|
const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId,
|
||||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
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 firstPoint = data->GetPoint(firstPointId);
|
||||||
VPointF secondPoint = data->GetPoint(secondPointId);
|
VPointF secondPoint = data->GetPoint(secondPointId);
|
||||||
QLineF line = QLineF(firstPoint.toQPointF(), secondPoint.toQPointF());
|
QLineF line = QLineF(firstPoint.toQPointF(), secondPoint.toQPointF());
|
||||||
|
|
|
@ -31,14 +31,14 @@ class VToolAlongLine : public VToolLinePoint
|
||||||
public:
|
public:
|
||||||
VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
|
VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
|
||||||
const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine,
|
const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine,
|
||||||
Tool::Enum typeCreation, QGraphicsItem * parent = 0);
|
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static void Create(QSharedPointer<DialogAlongLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
static void Create(QSharedPointer<DialogAlongLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||||
VContainer *data);
|
VContainer *data);
|
||||||
static void Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
static void Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
||||||
const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId,
|
const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId,
|
||||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include "container/calculator.h"
|
#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),
|
QGraphicsItem *parent):VDrawTool(doc, data, id), QGraphicsPathItem(parent),
|
||||||
dialogArc(QSharedPointer<DialogArc>()){
|
dialogArc(QSharedPointer<DialogArc>()){
|
||||||
VArc arc = data->GetArc(id);
|
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 ¢er, const QString &radius, const QString &f1,
|
void VToolArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1,
|
||||||
const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc,
|
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;
|
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;
|
||||||
|
|
||||||
Calculator cal(data);
|
Calculator cal(data);
|
||||||
|
|
|
@ -33,14 +33,14 @@ class VToolArc :public VDrawTool, public QGraphicsPathItem
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Enum typeCreation,
|
VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static void Create(QSharedPointer<DialogArc> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
static void Create(QSharedPointer<DialogArc> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||||
VContainer *data);
|
VContainer *data);
|
||||||
static void Create(const qint64 _id, const qint64 ¢er, const QString &radius,
|
static void Create(const qint64 _id, const qint64 ¢er, const QString &radius,
|
||||||
const QString &f1, const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
VToolBisector::VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VToolBisector::VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula, const qint64 &firstPointId,
|
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):
|
QGraphicsItem *parent):
|
||||||
VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0),
|
VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0),
|
||||||
thirdPointId(0), dialogBisector(QSharedPointer<DialogBisector>()){
|
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 qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
|
||||||
const QString &pointName, const qreal &mx, const qreal &my,
|
const QString &pointName, const qreal &mx, const qreal &my,
|
||||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
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 firstPoint = data->GetPoint(firstPointId);
|
||||||
VPointF secondPoint = data->GetPoint(secondPointId);
|
VPointF secondPoint = data->GetPoint(secondPointId);
|
||||||
VPointF thirdPoint = data->GetPoint(thirdPointId);
|
VPointF thirdPoint = data->GetPoint(thirdPointId);
|
||||||
|
|
|
@ -31,7 +31,7 @@ class VToolBisector : public VToolLinePoint
|
||||||
public:
|
public:
|
||||||
VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula, const qint64 &firstPointId,
|
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);
|
QGraphicsItem * parent = 0);
|
||||||
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
|
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
|
||||||
const QPointF &thirdPoint, const qreal& length);
|
const QPointF &thirdPoint, const qreal& length);
|
||||||
|
@ -42,7 +42,7 @@ public:
|
||||||
const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
|
const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
|
||||||
const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
|
const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation);
|
Tool::Sources typeCreation);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
VToolEndLine::VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
|
VToolEndLine::VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
|
||||||
const QString &formula, const qreal &angle, const qint64 &basePointId,
|
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),
|
VToolLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent),
|
||||||
dialogEndLine(QSharedPointer<DialogEndLine>()){
|
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,
|
void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
||||||
const QString &formula, const qreal &angle, const qint64 &basePointId,
|
const QString &formula, const qreal &angle, const qint64 &basePointId,
|
||||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
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);
|
VPointF basePoint = data->GetPoint(basePointId);
|
||||||
QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y()));
|
QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y()));
|
||||||
|
|
|
@ -32,7 +32,7 @@ class VToolEndLine : public VToolLinePoint
|
||||||
public:
|
public:
|
||||||
VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula, const qreal &angle,
|
const QString &typeLine, const QString &formula, const qreal &angle,
|
||||||
const qint64 &basePointId, Tool::Enum typeCreation,
|
const qint64 &basePointId, Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static void Create(QSharedPointer<DialogEndLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
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,
|
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,
|
const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my,
|
||||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
||||||
const Document::Documents &parse, Tool::Enum typeCreation);
|
const Document::Documents &parse, Tool::Sources typeCreation);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
VToolLine::VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint,
|
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),
|
QGraphicsLineItem(parent), firstPoint(firstPoint), secondPoint(secondPoint),
|
||||||
dialogLine(QSharedPointer<DialogLine>()){
|
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,
|
void VToolLine::Create(const qint64 &id, const qint64 &firstPoint, const qint64 &secondPoint,
|
||||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation){
|
Tool::Sources typeCreation){
|
||||||
Q_CHECK_PTR(scene);
|
Q_CHECK_PTR(scene);
|
||||||
Q_CHECK_PTR(doc);
|
Q_CHECK_PTR(doc);
|
||||||
Q_CHECK_PTR(data);
|
Q_CHECK_PTR(data);
|
||||||
|
|
|
@ -31,13 +31,13 @@ class VToolLine: public VDrawTool, public QGraphicsLineItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
|
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();
|
virtual void setDialog();
|
||||||
static void Create(QSharedPointer<DialogLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
static void Create(QSharedPointer<DialogLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||||
VContainer *data);
|
VContainer *data);
|
||||||
static void Create(const qint64 &id, const qint64 &firstPoint, const qint64 &secondPoint,
|
static void Create(const qint64 &id, const qint64 &firstPoint, const qint64 &secondPoint,
|
||||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
||||||
const Document::Documents &parse, Tool::Enum typeCreation);
|
const Document::Documents &parse, Tool::Sources typeCreation);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void ChangedActivDraw(const QString newName);
|
virtual void ChangedActivDraw(const QString newName);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
VToolLineIntersect::VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VToolLineIntersect::VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2,
|
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),
|
VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2),
|
||||||
p2Line2(p2Line2), dialogLineIntersect(QSharedPointer<DialogLineIntersect>()){
|
p2Line2(p2Line2), dialogLineIntersect(QSharedPointer<DialogLineIntersect>()){
|
||||||
if(typeCreation == Tool::FromGui){
|
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,
|
void VToolLineIntersect::Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id,
|
||||||
const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName,
|
const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName,
|
||||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
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 p1Line1 = data->GetPoint(p1Line1Id);
|
||||||
VPointF p2Line1 = data->GetPoint(p2Line1Id);
|
VPointF p2Line1 = data->GetPoint(p2Line1Id);
|
||||||
VPointF p1Line2 = data->GetPoint(p1Line2Id);
|
VPointF p1Line2 = data->GetPoint(p1Line2Id);
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
const qint64 &id,
|
const qint64 &id,
|
||||||
const qint64 &p1Line1,
|
const qint64 &p1Line1,
|
||||||
const qint64 &p2Line1, const qint64 &p1Line2,
|
const qint64 &p2Line1, const qint64 &p1Line2,
|
||||||
const qint64 &p2Line2, Tool::Enum typeCreation,
|
const qint64 &p2Line2, Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static void Create(QSharedPointer<DialogLineIntersect> &dialog, VMainGraphicsScene *scene,
|
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,
|
static void Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id,
|
||||||
const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName,
|
const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName,
|
||||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
VToolNormal::VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VToolNormal::VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine,
|
const QString &typeLine,
|
||||||
const QString &formula, const qreal &angle, const qint64 &firstPointId,
|
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),
|
VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent),
|
||||||
secondPointId(secondPointId), dialogNormal(QSharedPointer<DialogNormal>()){
|
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,
|
void VToolNormal::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, VMainGraphicsScene *scene,
|
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 firstPoint = data->GetPoint(firstPointId);
|
||||||
VPointF secondPoint = data->GetPoint(secondPointId);
|
VPointF secondPoint = data->GetPoint(secondPointId);
|
||||||
Calculator cal(data);
|
Calculator cal(data);
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula,
|
const QString &typeLine, const QString &formula,
|
||||||
const qreal &angle, const qint64 &firstPointId,
|
const qreal &angle, const qint64 &firstPointId,
|
||||||
const qint64 &secondPointId, Tool::Enum typeCreation,
|
const qint64 &secondPointId, Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static void Create(QSharedPointer<DialogNormal> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
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,
|
static void 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, VMainGraphicsScene *scene,
|
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,
|
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
|
||||||
const qreal &length, const qreal &angle = 0);
|
const qreal &length, const qreal &angle = 0);
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
VToolPointOfContact::VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VToolPointOfContact::VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &radius, const qint64 ¢er,
|
const QString &radius, const qint64 ¢er,
|
||||||
const qint64 &firstPointId, const qint64 &secondPointId,
|
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),
|
: VToolPoint(doc, data, id, parent), radius(radius), center(center), firstPointId(firstPointId),
|
||||||
secondPointId(secondPointId), dialogPointOfContact(QSharedPointer<DialogPointOfContact>()){
|
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 qint64 &firstPointId, const qint64 &secondPointId,
|
||||||
const QString &pointName, const qreal &mx, const qreal &my,
|
const QString &pointName, const qreal &mx, const qreal &my,
|
||||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
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 centerP = data->GetPoint(center);
|
||||||
VPointF firstP = data->GetPoint(firstPointId);
|
VPointF firstP = data->GetPoint(firstPointId);
|
||||||
VPointF secondP = data->GetPoint(secondPointId);
|
VPointF secondP = data->GetPoint(secondPointId);
|
||||||
|
|
|
@ -30,7 +30,7 @@ class VToolPointOfContact : public VToolPoint
|
||||||
public:
|
public:
|
||||||
VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &radius, const qint64 ¢er, const qint64 &firstPointId,
|
const QString &radius, const qint64 ¢er, const qint64 &firstPointId,
|
||||||
const qint64 &secondPointId, Tool::Enum typeCreation, QGraphicsItem * parent = 0);
|
const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static QPointF FindPoint(const qreal &radius, const QPointF ¢er, const QPointF &firstPoint,
|
static QPointF FindPoint(const qreal &radius, const QPointF ¢er, const QPointF &firstPoint,
|
||||||
const QPointF &secondPoint);
|
const QPointF &secondPoint);
|
||||||
|
@ -39,7 +39,7 @@ public:
|
||||||
static void Create(const qint64 _id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId,
|
static void Create(const qint64 _id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId,
|
||||||
const qint64 &secondPointId, const QString &pointName,
|
const qint64 &secondPointId, const QString &pointName,
|
||||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
VToolShoulderPoint::VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VToolShoulderPoint::VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula, const qint64 &p1Line,
|
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):
|
QGraphicsItem * parent):
|
||||||
VToolLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), pShoulder(pShoulder),
|
VToolLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), pShoulder(pShoulder),
|
||||||
dialogShoulderPoint(QSharedPointer<DialogShoulderPoint>()){
|
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 qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine,
|
||||||
const QString &pointName, const qreal &mx, const qreal &my,
|
const QString &pointName, const qreal &mx, const qreal &my,
|
||||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
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 firstPoint = data->GetPoint(p1Line);
|
||||||
VPointF secondPoint = data->GetPoint(p2Line);
|
VPointF secondPoint = data->GetPoint(p2Line);
|
||||||
VPointF shoulderPoint = data->GetPoint(pShoulder);
|
VPointF shoulderPoint = data->GetPoint(pShoulder);
|
||||||
|
|
|
@ -30,7 +30,7 @@ class VToolShoulderPoint : public VToolLinePoint
|
||||||
public:
|
public:
|
||||||
VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula, const qint64 &p1Line,
|
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);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder,
|
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,
|
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 qint64 &pShoulder, const QString &typeLine, const QString &pointName,
|
||||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "container/vpointf.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),
|
QGraphicsItem * parent ):VToolPoint(doc, data, id, parent),
|
||||||
dialogSinglePoint(QSharedPointer<DialogSinglePoint>()){
|
dialogSinglePoint(QSharedPointer<DialogSinglePoint>()){
|
||||||
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
||||||
|
|
|
@ -32,7 +32,7 @@ class VToolSinglePoint : public VToolPoint
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id,
|
VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
Tool::Enum typeCreation, QGraphicsItem * parent = 0 );
|
Tool::Sources typeCreation, QGraphicsItem * parent = 0 );
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
VToolSpline::VToolSpline(VDomDocument *doc, VContainer *data, qint64 id,
|
VToolSpline::VToolSpline(VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
Tool::Enum typeCreation,
|
Tool::Sources typeCreation,
|
||||||
QGraphicsItem *parent):VDrawTool(doc, data, id), QGraphicsPathItem(parent),
|
QGraphicsItem *parent):VDrawTool(doc, data, id), QGraphicsPathItem(parent),
|
||||||
dialogSpline(QSharedPointer<DialogSpline>()), controlPoints(QVector<VControlPointSpline *>()){
|
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,
|
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,
|
const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve,
|
||||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
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);
|
VSpline spline = VSpline(data->DataPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve);
|
||||||
qint64 id = _id;
|
qint64 id = _id;
|
||||||
if(typeCreation == Tool::FromGui){
|
if(typeCreation == Tool::FromGui){
|
||||||
|
|
|
@ -35,14 +35,14 @@ class VToolSpline:public VDrawTool, public QGraphicsPathItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VToolSpline (VDomDocument *doc, VContainer *data, qint64 id,
|
VToolSpline (VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
Tool::Enum typeCreation, QGraphicsItem * parent = 0 );
|
Tool::Sources typeCreation, QGraphicsItem * parent = 0 );
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static void Create(QSharedPointer<DialogSpline> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
static void Create(QSharedPointer<DialogSpline> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||||
VContainer *data);
|
VContainer *data);
|
||||||
static void Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
|
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,
|
const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve,
|
||||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation);
|
Tool::Sources typeCreation);
|
||||||
signals:
|
signals:
|
||||||
void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position,
|
void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position,
|
||||||
const QPointF &controlPoint, const QPointF &splinePoint );
|
const QPointF &controlPoint, const QPointF &splinePoint );
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
|
VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
Tool::Enum typeCreation,
|
Tool::Sources typeCreation,
|
||||||
QGraphicsItem *parent):VDrawTool(doc, data, id),
|
QGraphicsItem *parent):VDrawTool(doc, data, id),
|
||||||
QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer<DialogSplinePath>()),
|
QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer<DialogSplinePath>()),
|
||||||
controlPoints(QVector<VControlPointSpline *>()){
|
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,
|
void VToolSplinePath::Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation){
|
Tool::Sources typeCreation){
|
||||||
qint64 id = _id;
|
qint64 id = _id;
|
||||||
if(typeCreation == Tool::FromGui){
|
if(typeCreation == Tool::FromGui){
|
||||||
id = data->AddSplinePath(path);
|
id = data->AddSplinePath(path);
|
||||||
|
|
|
@ -34,13 +34,13 @@ class VToolSplinePath:public VDrawTool, public QGraphicsPathItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
|
VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
Tool::Enum typeCreation,
|
Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static void Create(QSharedPointer<DialogSplinePath> &dialog, VMainGraphicsScene *scene,
|
static void Create(QSharedPointer<DialogSplinePath> &dialog, VMainGraphicsScene *scene,
|
||||||
VDomDocument *doc, VContainer *data);
|
VDomDocument *doc, VContainer *data);
|
||||||
static void Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene,
|
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:
|
signals:
|
||||||
void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos,
|
void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos,
|
||||||
const QPointF &controlPoint, const QPointF &splinePoint);
|
const QPointF &controlPoint, const QPointF &splinePoint);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
VModelingAlongLine::VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id,
|
VModelingAlongLine::VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
const QString &formula, const qint64 &firstPointId,
|
const QString &formula, const qint64 &firstPointId,
|
||||||
const qint64 &secondPointId, const QString &typeLine,
|
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),
|
VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent),
|
||||||
secondPointId(secondPointId), dialogAlongLine(QSharedPointer<DialogAlongLine>()){
|
secondPointId(secondPointId), dialogAlongLine(QSharedPointer<DialogAlongLine>()){
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ VModelingAlongLine *VModelingAlongLine::Create(const qint64 _id, const QString &
|
||||||
const qint64 &firstPointId, const qint64 &secondPointId,
|
const qint64 &firstPointId, const qint64 &secondPointId,
|
||||||
const qreal &mx, const qreal &my, VDomDocument *doc,
|
const qreal &mx, const qreal &my, VDomDocument *doc,
|
||||||
VContainer *data, const Document::Documents &parse,
|
VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation){
|
Tool::Sources typeCreation){
|
||||||
VModelingAlongLine *point = 0;
|
VModelingAlongLine *point = 0;
|
||||||
VPointF firstPoint = data->GetModelingPoint(firstPointId);
|
VPointF firstPoint = data->GetModelingPoint(firstPointId);
|
||||||
VPointF secondPoint = data->GetModelingPoint(secondPointId);
|
VPointF secondPoint = data->GetModelingPoint(secondPointId);
|
||||||
|
|
|
@ -31,7 +31,7 @@ class VModelingAlongLine : public VModelingLinePoint
|
||||||
public:
|
public:
|
||||||
VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
|
VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula,
|
||||||
const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine,
|
const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine,
|
||||||
Tool::Enum typeCreation, QGraphicsItem * parent = 0);
|
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static VModelingAlongLine* Create(QSharedPointer<DialogAlongLine> &dialog, VDomDocument *doc,
|
static VModelingAlongLine* Create(QSharedPointer<DialogAlongLine> &dialog, VDomDocument *doc,
|
||||||
VContainer *data);
|
VContainer *data);
|
||||||
|
@ -39,7 +39,7 @@ public:
|
||||||
const QString &formula, const qint64 &firstPointId,
|
const QString &formula, const qint64 &firstPointId,
|
||||||
const qint64 &secondPointId, const qreal &mx, const qreal &my,
|
const qint64 &secondPointId, const qreal &mx, const qreal &my,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation);
|
Tool::Sources typeCreation);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include "container/calculator.h"
|
#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),
|
QGraphicsItem *parent):VModelingTool(doc, data, id), QGraphicsPathItem(parent),
|
||||||
dialogArc(QSharedPointer<DialogArc>()){
|
dialogArc(QSharedPointer<DialogArc>()){
|
||||||
VArc arc = data->GetModelingArc(id);
|
VArc arc = data->GetModelingArc(id);
|
||||||
|
@ -61,7 +61,7 @@ VModelingArc* VModelingArc::Create(QSharedPointer<DialogArc> &dialog, VDomDocume
|
||||||
|
|
||||||
VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius,
|
VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius,
|
||||||
const QString &f1, const QString &f2, VDomDocument *doc,
|
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;
|
VModelingArc *toolArc = 0;
|
||||||
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;
|
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;
|
||||||
|
|
||||||
|
|
|
@ -33,13 +33,13 @@ class VModelingArc :public VModelingTool, public QGraphicsPathItem
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Enum typeCreation,
|
VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static VModelingArc* Create(QSharedPointer<DialogArc> &dialog, VDomDocument *doc, VContainer *data);
|
static VModelingArc* Create(QSharedPointer<DialogArc> &dialog, VDomDocument *doc, VContainer *data);
|
||||||
static VModelingArc* Create(const qint64 _id, const qint64 ¢er, const QString &radius,
|
static VModelingArc* Create(const qint64 _id, const qint64 ¢er, const QString &radius,
|
||||||
const QString &f1, const QString &f2, VDomDocument *doc, VContainer *data,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
VModelingBisector::VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VModelingBisector::VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula, const qint64 &firstPointId,
|
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):
|
QGraphicsItem *parent):
|
||||||
VModelingLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0),
|
VModelingLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0),
|
||||||
thirdPointId(0), dialogBisector(QSharedPointer<DialogBisector>()){
|
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 qint64 &thirdPointId, const QString &typeLine,
|
||||||
const QString &pointName, const qreal &mx, const qreal &my,
|
const QString &pointName, const qreal &mx, const qreal &my,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation){
|
Tool::Sources typeCreation){
|
||||||
VModelingBisector *point = 0;
|
VModelingBisector *point = 0;
|
||||||
VPointF firstPoint = data->GetModelingPoint(firstPointId);
|
VPointF firstPoint = data->GetModelingPoint(firstPointId);
|
||||||
VPointF secondPoint = data->GetModelingPoint(secondPointId);
|
VPointF secondPoint = data->GetModelingPoint(secondPointId);
|
||||||
|
|
|
@ -32,7 +32,7 @@ class VModelingBisector : public VModelingLinePoint
|
||||||
public:
|
public:
|
||||||
VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula, const qint64 &firstPointId,
|
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);
|
QGraphicsItem * parent = 0);
|
||||||
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
|
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
|
||||||
const QPointF &thirdPoint, const qreal& length);
|
const QPointF &thirdPoint, const qreal& length);
|
||||||
|
@ -43,7 +43,7 @@ public:
|
||||||
const qint64 &secondPointId, const qint64 &thirdPointId,
|
const qint64 &secondPointId, const qint64 &thirdPointId,
|
||||||
const QString &typeLine, const QString &pointName, const qreal &mx,
|
const QString &typeLine, const QString &pointName, const qreal &mx,
|
||||||
const qreal &my, VDomDocument *doc, VContainer *data,
|
const qreal &my, VDomDocument *doc, VContainer *data,
|
||||||
const Document::Documents &parse, Tool::Enum typeCreation);
|
const Document::Documents &parse, Tool::Sources typeCreation);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
VModelingEndLine::VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
|
VModelingEndLine::VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
|
||||||
const QString &formula, const qreal &angle, const qint64 &basePointId,
|
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),
|
VModelingLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent),
|
||||||
dialogEndLine(QSharedPointer<DialogEndLine>()){
|
dialogEndLine(QSharedPointer<DialogEndLine>()){
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ VModelingEndLine *VModelingEndLine::Create(const qint64 _id, const QString &poin
|
||||||
const QString &typeLine, const QString &formula,
|
const QString &typeLine, const QString &formula,
|
||||||
const qreal &angle, const qint64 &basePointId, const qreal &mx,
|
const qreal &angle, const qint64 &basePointId, const qreal &mx,
|
||||||
const qreal &my, VDomDocument *doc, VContainer *data,
|
const qreal &my, VDomDocument *doc, VContainer *data,
|
||||||
const Document::Documents &parse, Tool::Enum typeCreation){
|
const Document::Documents &parse, Tool::Sources typeCreation){
|
||||||
VModelingEndLine *point = 0;
|
VModelingEndLine *point = 0;
|
||||||
VPointF basePoint = data->GetModelingPoint(basePointId);
|
VPointF basePoint = data->GetModelingPoint(basePointId);
|
||||||
QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y()));
|
QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y()));
|
||||||
|
|
|
@ -32,7 +32,7 @@ class VModelingEndLine : public VModelingLinePoint
|
||||||
public:
|
public:
|
||||||
VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula, const qreal &angle,
|
const QString &typeLine, const QString &formula, const qreal &angle,
|
||||||
const qint64 &basePointId, Tool::Enum typeCreation,
|
const qint64 &basePointId, Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static VModelingEndLine* Create(QSharedPointer<DialogEndLine> &dialog, VDomDocument *doc,
|
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,
|
static VModelingEndLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
||||||
const QString &formula, const qreal &angle, const qint64 &basePointId,
|
const QString &formula, const qreal &angle, const qint64 &basePointId,
|
||||||
const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
VModelingLine::VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
|
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),
|
VModelingTool(doc, data, id), QGraphicsLineItem(parent), firstPoint(firstPoint),
|
||||||
secondPoint(secondPoint), dialogLine(QSharedPointer<DialogLine>()){
|
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,
|
VModelingLine *VModelingLine::Create(const qint64 &id, const qint64 &firstPoint, const qint64 &secondPoint,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation){
|
Tool::Sources typeCreation){
|
||||||
VModelingLine *line = 0;
|
VModelingLine *line = 0;
|
||||||
Q_CHECK_PTR(doc);
|
Q_CHECK_PTR(doc);
|
||||||
Q_CHECK_PTR(data);
|
Q_CHECK_PTR(data);
|
||||||
|
|
|
@ -31,12 +31,12 @@ class VModelingLine: public VModelingTool, public QGraphicsLineItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,
|
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();
|
virtual void setDialog();
|
||||||
static VModelingLine* Create(QSharedPointer<DialogLine> &dialog, VDomDocument *doc, VContainer *data);
|
static VModelingLine* Create(QSharedPointer<DialogLine> &dialog, VDomDocument *doc, VContainer *data);
|
||||||
static VModelingLine* Create(const qint64 &id, const qint64 &firstPoint, const qint64 &secondPoint,
|
static VModelingLine* Create(const qint64 &id, const qint64 &firstPoint, const qint64 &secondPoint,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation);
|
Tool::Sources typeCreation);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
VModelingLineIntersect::VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VModelingLineIntersect::VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2,
|
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),
|
VModelingPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2),
|
||||||
p2Line2(p2Line2), dialogLineIntersect(QSharedPointer<DialogLineIntersect>()){
|
p2Line2(p2Line2), dialogLineIntersect(QSharedPointer<DialogLineIntersect>()){
|
||||||
if(typeCreation == Tool::FromGui){
|
if(typeCreation == Tool::FromGui){
|
||||||
|
@ -60,7 +60,7 @@ VModelingLineIntersect *VModelingLineIntersect::Create(const qint64 _id, const q
|
||||||
const qint64 &p2Line2Id, const QString &pointName,
|
const qint64 &p2Line2Id, const QString &pointName,
|
||||||
const qreal &mx, const qreal &my, VDomDocument *doc,
|
const qreal &mx, const qreal &my, VDomDocument *doc,
|
||||||
VContainer *data, const Document::Documents &parse,
|
VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation){
|
Tool::Sources typeCreation){
|
||||||
VModelingLineIntersect *point = 0;
|
VModelingLineIntersect *point = 0;
|
||||||
VPointF p1Line1 = data->GetModelingPoint(p1Line1Id);
|
VPointF p1Line1 = data->GetModelingPoint(p1Line1Id);
|
||||||
VPointF p2Line1 = data->GetModelingPoint(p2Line1Id);
|
VPointF p2Line1 = data->GetModelingPoint(p2Line1Id);
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
const qint64 &id,
|
const qint64 &id,
|
||||||
const qint64 &p1Line1,
|
const qint64 &p1Line1,
|
||||||
const qint64 &p2Line1, const qint64 &p1Line2,
|
const qint64 &p2Line1, const qint64 &p1Line2,
|
||||||
const qint64 &p2Line2, Tool::Enum typeCreation,
|
const qint64 &p2Line2, Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static VModelingLineIntersect* Create(QSharedPointer<DialogLineIntersect> &dialog,
|
static VModelingLineIntersect* Create(QSharedPointer<DialogLineIntersect> &dialog,
|
||||||
|
@ -42,7 +42,7 @@ public:
|
||||||
const qint64 &p1Line2Id, const qint64 &p2Line2Id,
|
const qint64 &p1Line2Id, const qint64 &p2Line2Id,
|
||||||
const QString &pointName, const qreal &mx, const qreal &my,
|
const QString &pointName, const qreal &mx, const qreal &my,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation);
|
Tool::Sources typeCreation);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
VModelingNormal::VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VModelingNormal::VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine,
|
const QString &typeLine,
|
||||||
const QString &formula, const qreal &angle, const qint64 &firstPointId,
|
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),
|
VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent),
|
||||||
secondPointId(secondPointId), dialogNormal(QSharedPointer<DialogNormal>()){
|
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 QString typeLine, const QString pointName,
|
||||||
const qreal angle, const qreal &mx, const qreal &my,
|
const qreal angle, const qreal &mx, const qreal &my,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation){
|
Tool::Sources typeCreation){
|
||||||
VModelingNormal *point = 0;
|
VModelingNormal *point = 0;
|
||||||
VPointF firstPoint = data->GetModelingPoint(firstPointId);
|
VPointF firstPoint = data->GetModelingPoint(firstPointId);
|
||||||
VPointF secondPoint = data->GetModelingPoint(secondPointId);
|
VPointF secondPoint = data->GetModelingPoint(secondPointId);
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula,
|
const QString &typeLine, const QString &formula,
|
||||||
const qreal &angle, const qint64 &firstPointId,
|
const qreal &angle, const qint64 &firstPointId,
|
||||||
const qint64 &secondPointId, Tool::Enum typeCreation,
|
const qint64 &secondPointId, Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static VModelingNormal* Create(QSharedPointer<DialogNormal> &dialog, VDomDocument *doc, VContainer *data);
|
static VModelingNormal* Create(QSharedPointer<DialogNormal> &dialog, VDomDocument *doc, VContainer *data);
|
||||||
|
@ -41,7 +41,7 @@ public:
|
||||||
const qint64 &secondPointId, const QString typeLine,
|
const qint64 &secondPointId, const QString typeLine,
|
||||||
const QString pointName, const qreal angle, const qreal &mx,
|
const QString pointName, const qreal angle, const qreal &mx,
|
||||||
const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
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,
|
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
|
||||||
const qreal &length, const qreal &angle = 0);
|
const qreal &length, const qreal &angle = 0);
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
VModelingPointOfContact::VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VModelingPointOfContact::VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &radius, const qint64 ¢er,
|
const QString &radius, const qint64 ¢er,
|
||||||
const qint64 &firstPointId, const qint64 &secondPointId,
|
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),
|
: VModelingPoint(doc, data, id, parent), radius(radius), center(center), firstPointId(firstPointId),
|
||||||
secondPointId(secondPointId), dialogPointOfContact(QSharedPointer<DialogPointOfContact>()){
|
secondPointId(secondPointId), dialogPointOfContact(QSharedPointer<DialogPointOfContact>()){
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ VModelingPointOfContact *VModelingPointOfContact::Create(const qint64 _id, const
|
||||||
const QString &pointName, const qreal &mx,
|
const QString &pointName, const qreal &mx,
|
||||||
const qreal &my, VDomDocument *doc,
|
const qreal &my, VDomDocument *doc,
|
||||||
VContainer *data, const Document::Documents &parse,
|
VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation){
|
Tool::Sources typeCreation){
|
||||||
VModelingPointOfContact *point = 0;
|
VModelingPointOfContact *point = 0;
|
||||||
VPointF centerP = data->GetModelingPoint(center);
|
VPointF centerP = data->GetModelingPoint(center);
|
||||||
VPointF firstP = data->GetModelingPoint(firstPointId);
|
VPointF firstP = data->GetModelingPoint(firstPointId);
|
||||||
|
|
|
@ -31,7 +31,7 @@ class VModelingPointOfContact : public VModelingPoint
|
||||||
public:
|
public:
|
||||||
VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &radius, const qint64 ¢er, const qint64 &firstPointId,
|
const QString &radius, const qint64 ¢er, const qint64 &firstPointId,
|
||||||
const qint64 &secondPointId, Tool::Enum typeCreation, QGraphicsItem * parent = 0);
|
const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static QPointF FindPoint(const qreal &radius, const QPointF ¢er, const QPointF &firstPoint,
|
static QPointF FindPoint(const qreal &radius, const QPointF ¢er, const QPointF &firstPoint,
|
||||||
const QPointF &secondPoint);
|
const QPointF &secondPoint);
|
||||||
|
@ -41,7 +41,7 @@ public:
|
||||||
const qint64 &firstPointId, const qint64 &secondPointId,
|
const qint64 &firstPointId, const qint64 &secondPointId,
|
||||||
const QString &pointName, const qreal &mx, const qreal &my,
|
const QString &pointName, const qreal &mx, const qreal &my,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation);
|
Tool::Sources typeCreation);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
VModelingShoulderPoint::VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VModelingShoulderPoint::VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula, const qint64 &p1Line,
|
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):
|
QGraphicsItem * parent):
|
||||||
VModelingLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line),
|
VModelingLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line),
|
||||||
pShoulder(pShoulder), dialogShoulderPoint(QSharedPointer<DialogShoulderPoint>()){
|
pShoulder(pShoulder), dialogShoulderPoint(QSharedPointer<DialogShoulderPoint>()){
|
||||||
|
@ -87,7 +87,7 @@ VModelingShoulderPoint *VModelingShoulderPoint::Create(const qint64 _id, const Q
|
||||||
const qint64 &pShoulder, const QString &typeLine,
|
const qint64 &pShoulder, const QString &typeLine,
|
||||||
const QString &pointName, const qreal &mx,
|
const QString &pointName, const qreal &mx,
|
||||||
const qreal &my, VDomDocument *doc, VContainer *data,
|
const qreal &my, VDomDocument *doc, VContainer *data,
|
||||||
const Document::Documents &parse, Tool::Enum typeCreation){
|
const Document::Documents &parse, Tool::Sources typeCreation){
|
||||||
VModelingShoulderPoint *point = 0;
|
VModelingShoulderPoint *point = 0;
|
||||||
VPointF firstPoint = data->GetModelingPoint(p1Line);
|
VPointF firstPoint = data->GetModelingPoint(p1Line);
|
||||||
VPointF secondPoint = data->GetModelingPoint(p2Line);
|
VPointF secondPoint = data->GetModelingPoint(p2Line);
|
||||||
|
|
|
@ -31,7 +31,7 @@ class VModelingShoulderPoint : public VModelingLinePoint
|
||||||
public:
|
public:
|
||||||
VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
|
VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
|
||||||
const QString &typeLine, const QString &formula, const qint64 &p1Line,
|
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);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder,
|
static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder,
|
||||||
|
@ -42,7 +42,7 @@ public:
|
||||||
const qint64 &p2Line, const qint64 &pShoulder,
|
const qint64 &p2Line, const qint64 &pShoulder,
|
||||||
const QString &typeLine, const QString &pointName,
|
const QString &typeLine, const QString &pointName,
|
||||||
const qreal &mx, const qreal &my, VDomDocument *doc,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
virtual void FullUpdateFromGui(int result);
|
virtual void FullUpdateFromGui(int result);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "container/vpointf.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),
|
QGraphicsItem * parent ):VModelingPoint(doc, data, id, parent),
|
||||||
dialogSinglePoint(QSharedPointer<DialogSinglePoint>()){
|
dialogSinglePoint(QSharedPointer<DialogSinglePoint>()){
|
||||||
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
||||||
|
|
|
@ -11,7 +11,7 @@ class VModelingSinglePoint : public VModelingPoint
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VModelingSinglePoint (VDomDocument *doc, VContainer *data, qint64 id,
|
VModelingSinglePoint (VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
Tool::Enum typeCreation, QGraphicsItem * parent = 0 );
|
Tool::Sources typeCreation, QGraphicsItem * parent = 0 );
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id,
|
VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
Tool::Enum typeCreation,
|
Tool::Sources typeCreation,
|
||||||
QGraphicsItem *parent):VModelingTool(doc, data, id), QGraphicsPathItem(parent),
|
QGraphicsItem *parent):VModelingTool(doc, data, id), QGraphicsPathItem(parent),
|
||||||
dialogSpline(QSharedPointer<DialogSpline>()), controlPoints(QVector<VControlPointSpline *>()){
|
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,
|
VModelingSpline *VModelingSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4,
|
||||||
const qreal &kAsm1, const qreal kAsm2, const qreal &angle1,
|
const qreal &kAsm1, const qreal kAsm2, const qreal &angle1,
|
||||||
const qreal &angle2, const qreal &kCurve, VDomDocument *doc,
|
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;
|
VModelingSpline *spl = 0;
|
||||||
VSpline spline = VSpline(data->DataModelingPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve);
|
VSpline spline = VSpline(data->DataModelingPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve);
|
||||||
qint64 id = _id;
|
qint64 id = _id;
|
||||||
|
|
|
@ -35,14 +35,14 @@ class VModelingSpline:public VModelingTool, public QGraphicsPathItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id,
|
VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
Tool::Enum typeCreation, QGraphicsItem * parent = 0 );
|
Tool::Sources typeCreation, QGraphicsItem * parent = 0 );
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static VModelingSpline* Create(QSharedPointer<DialogSpline> &dialog, VDomDocument *doc,
|
static VModelingSpline* Create(QSharedPointer<DialogSpline> &dialog, VDomDocument *doc,
|
||||||
VContainer *data);
|
VContainer *data);
|
||||||
static VModelingSpline* Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
|
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 kAsm2, const qreal &angle1, const qreal &angle2,
|
||||||
const qreal &kCurve, VDomDocument *doc, VContainer *data,
|
const qreal &kCurve, VDomDocument *doc, VContainer *data,
|
||||||
const Document::Documents &parse, Tool::Enum typeCreation);
|
const Document::Documents &parse, Tool::Sources typeCreation);
|
||||||
signals:
|
signals:
|
||||||
void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position,
|
void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position,
|
||||||
const QPointF &controlPoint, const QPointF &splinePoint );
|
const QPointF &controlPoint, const QPointF &splinePoint );
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
|
VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
Tool::Enum typeCreation,
|
Tool::Sources typeCreation,
|
||||||
QGraphicsItem *parent):VModelingTool(doc, data, id),
|
QGraphicsItem *parent):VModelingTool(doc, data, id),
|
||||||
QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer<DialogSplinePath>()),
|
QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer<DialogSplinePath>()),
|
||||||
controlPoints(QVector<VControlPointSpline *>()){
|
controlPoints(QVector<VControlPointSpline *>()){
|
||||||
|
@ -75,7 +75,7 @@ VModelingSplinePath *VModelingSplinePath::Create(QSharedPointer<DialogSplinePath
|
||||||
|
|
||||||
VModelingSplinePath * VModelingSplinePath::Create(const qint64 _id, const VSplinePath &path,
|
VModelingSplinePath * VModelingSplinePath::Create(const qint64 _id, const VSplinePath &path,
|
||||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation){
|
Tool::Sources typeCreation){
|
||||||
VModelingSplinePath *spl = 0;
|
VModelingSplinePath *spl = 0;
|
||||||
qint64 id = _id;
|
qint64 id = _id;
|
||||||
if(typeCreation == Tool::FromGui){
|
if(typeCreation == Tool::FromGui){
|
||||||
|
|
|
@ -34,13 +34,13 @@ class VModelingSplinePath:public VModelingTool, public QGraphicsPathItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
|
VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
Tool::Enum typeCreation,
|
Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent = 0);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static VModelingSplinePath* Create(QSharedPointer<DialogSplinePath> &dialog,
|
static VModelingSplinePath* Create(QSharedPointer<DialogSplinePath> &dialog,
|
||||||
VDomDocument *doc, VContainer *data);
|
VDomDocument *doc, VContainer *data);
|
||||||
static VModelingSplinePath* Create(const qint64 _id, const VSplinePath &path, VDomDocument *doc,
|
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:
|
signals:
|
||||||
void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos,
|
void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos,
|
||||||
const QPointF &controlPoint, const QPointF &splinePoint);
|
const QPointF &controlPoint, const QPointF &splinePoint);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "vnodearc.h"
|
#include "vnodearc.h"
|
||||||
|
|
||||||
VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject,
|
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){
|
VAbstractNode(doc, data, id, idArc, typeobject), QGraphicsPathItem(parent){
|
||||||
RefreshGeometry();
|
RefreshGeometry();
|
||||||
this->setPen(QPen(baseColor, widthHairLine));
|
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,
|
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;
|
VNodeArc *arc = 0;
|
||||||
if(parse == Document::FullParse){
|
if(parse == Document::FullParse){
|
||||||
arc = new VNodeArc(doc, data, id, idArc, typeobject, typeCreation);
|
arc = new VNodeArc(doc, data, id, idArc, typeobject, typeCreation);
|
||||||
|
|
|
@ -30,9 +30,9 @@ class VNodeArc :public VAbstractNode, public QGraphicsPathItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject,
|
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,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "vnodepoint.h"
|
#include "vnodepoint.h"
|
||||||
|
|
||||||
VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint,
|
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),
|
:VAbstractNode(doc, data, id, idPoint, typeobject), QGraphicsEllipseItem(parent),
|
||||||
radius(toPixel(1.5)), namePoint(0), lineName(0){
|
radius(toPixel(1.5)), namePoint(0), lineName(0){
|
||||||
namePoint = new VGraphicsSimpleTextItem(this);
|
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,
|
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;
|
VNodePoint *point = 0;
|
||||||
if(parse == Document::FullParse){
|
if(parse == Document::FullParse){
|
||||||
point = new VNodePoint(doc, data, id, idPoint, typeobject, typeCreation);
|
point = new VNodePoint(doc, data, id, idPoint, typeobject, typeCreation);
|
||||||
|
|
|
@ -30,9 +30,9 @@ class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject,
|
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,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
void NameChangePosition(const QPointF pos);
|
void NameChangePosition(const QPointF pos);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "vnodespline.h"
|
#include "vnodespline.h"
|
||||||
|
|
||||||
VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
|
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){
|
VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent){
|
||||||
RefreshGeometry();
|
RefreshGeometry();
|
||||||
this->setPen(QPen(baseColor, widthHairLine));
|
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,
|
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;
|
VNodeSpline *spl = 0;
|
||||||
if(parse == Document::FullParse){
|
if(parse == Document::FullParse){
|
||||||
spl = new VNodeSpline(doc, data, id, idSpline, typeobject, typeCreation);
|
spl = new VNodeSpline(doc, data, id, idSpline, typeobject, typeCreation);
|
||||||
|
|
|
@ -30,9 +30,9 @@ class VNodeSpline:public VAbstractNode, public QGraphicsPathItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject,
|
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,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile ();
|
virtual void FullUpdateFromFile ();
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "vnodesplinepath.h"
|
#include "vnodesplinepath.h"
|
||||||
|
|
||||||
VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
|
VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
|
||||||
Draw::Draws typeobject, Tool::Enum typeCreation,
|
Draw::Draws typeobject, Tool::Sources typeCreation,
|
||||||
QGraphicsItem * parent) :
|
QGraphicsItem * parent) :
|
||||||
VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent){
|
VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent){
|
||||||
RefreshGeometry();
|
RefreshGeometry();
|
||||||
|
@ -37,7 +37,7 @@ VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
|
|
||||||
VNodeSplinePath *VNodeSplinePath::Create(VDomDocument *doc, VContainer *data, qint64 id,
|
VNodeSplinePath *VNodeSplinePath::Create(VDomDocument *doc, VContainer *data, qint64 id,
|
||||||
qint64 idSpline, Draw::Draws typeobject, const Document::Documents &parse,
|
qint64 idSpline, Draw::Draws typeobject, const Document::Documents &parse,
|
||||||
Tool::Enum typeCreation){
|
Tool::Sources typeCreation){
|
||||||
VNodeSplinePath *splPath = 0;
|
VNodeSplinePath *splPath = 0;
|
||||||
if(parse == Document::FullParse){
|
if(parse == Document::FullParse){
|
||||||
splPath = new VNodeSplinePath(doc, data, id, idSpline, typeobject, typeCreation);
|
splPath = new VNodeSplinePath(doc, data, id, idSpline, typeobject, typeCreation);
|
||||||
|
|
|
@ -30,9 +30,9 @@ class VNodeSplinePath : public VAbstractNode, public QGraphicsPathItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
|
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,
|
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:
|
public slots:
|
||||||
virtual void FullUpdateFromFile();
|
virtual void FullUpdateFromFile();
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -26,14 +26,6 @@
|
||||||
#include "vdatatool.h"
|
#include "vdatatool.h"
|
||||||
#include "container/vcontainer.h"
|
#include "container/vcontainer.h"
|
||||||
|
|
||||||
namespace Tool{
|
|
||||||
enum Enum
|
|
||||||
{
|
|
||||||
FromGui,
|
|
||||||
FromFile
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
class VAbstractTool:public VDataTool{
|
class VAbstractTool:public VDataTool{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "modelingTools/modelingtools.h"
|
#include "modelingTools/modelingtools.h"
|
||||||
|
|
||||||
VToolDetail::VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, VDetail &oldDetail,
|
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)
|
VMainGraphicsScene *scene, QGraphicsItem *parent)
|
||||||
:VAbstractTool(doc, data, id), QGraphicsPathItem(parent),
|
:VAbstractTool(doc, data, id), QGraphicsPathItem(parent),
|
||||||
dialogDetail(QSharedPointer<DialogDetail>()), sceneDetails(scene){
|
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,
|
void VToolDetail::Create(const qint64 _id, VDetail &newDetail, VDetail &oldDetail,
|
||||||
VMainGraphicsScene *scene, VDomDocument *doc,
|
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;
|
qint64 id = _id;
|
||||||
if(typeCreation == Tool::FromGui){
|
if(typeCreation == Tool::FromGui){
|
||||||
id = data->AddDetail(newDetail);
|
id = data->AddDetail(newDetail);
|
||||||
|
|
|
@ -31,14 +31,14 @@ class VToolDetail: public VAbstractTool, public QGraphicsPathItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, VDetail &oldDetail,
|
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);
|
QGraphicsItem * parent = 0);
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static void Create(QSharedPointer<DialogDetail> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
static void Create(QSharedPointer<DialogDetail> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||||
VContainer *data);
|
VContainer *data);
|
||||||
static void Create(const qint64 _id, VDetail &newDetail, VDetail &oldDetail,
|
static void Create(const qint64 _id, VDetail &newDetail, VDetail &oldDetail,
|
||||||
VMainGraphicsScene *scene,
|
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>
|
template <typename T>
|
||||||
void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool){
|
void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool){
|
||||||
tool->setParentItem(this);
|
tool->setParentItem(this);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user