Used QFlags for enums.
--HG-- branch : feature
This commit is contained in:
parent
1488823b34
commit
b541610f51
|
@ -165,7 +165,7 @@ void VContainer::UpdateId(qint64 newId){
|
|||
}
|
||||
}
|
||||
|
||||
void VContainer::IncrementReferens(qint64 id, Scene::Type obj, Draw::Mode mode){
|
||||
void VContainer::IncrementReferens(qint64 id, Scene::Scenes obj, Draw::Draws mode){
|
||||
switch( obj ){
|
||||
case(Scene::Line):
|
||||
break;
|
||||
|
@ -240,12 +240,12 @@ QPainterPath VContainer::ContourPath(qint64 idDetail) const{
|
|||
QVector<QPointF> points;
|
||||
for(qint32 i = 0; i< detail.CountNode(); ++i){
|
||||
switch(detail[i].getTypeTool()){
|
||||
case(Tools::NodePoint):{
|
||||
case(Tool::NodePoint):{
|
||||
VPointF point = GetModelingPoint(detail[i].getId());
|
||||
points.append(point.toQPointF());
|
||||
}
|
||||
break;
|
||||
case(Tools::NodeArc):{
|
||||
case(Tool::NodeArc):{
|
||||
VArc arc = GetModelingArc(detail[i].getId());
|
||||
qreal len1 = GetLengthContour(points, arc.GetPoints());
|
||||
qreal lenReverse = GetLengthContour(points, GetReversePoint(arc.GetPoints()));
|
||||
|
@ -256,7 +256,7 @@ QPainterPath VContainer::ContourPath(qint64 idDetail) const{
|
|||
}
|
||||
}
|
||||
break;
|
||||
case(Tools::NodeSpline):{
|
||||
case(Tool::NodeSpline):{
|
||||
VSpline spline = GetModelingSpline(detail[i].getId());
|
||||
qreal len1 = GetLengthContour(points, spline.GetPoints());
|
||||
qreal lenReverse = GetLengthContour(points, GetReversePoint(spline.GetPoints()));
|
||||
|
@ -267,7 +267,7 @@ QPainterPath VContainer::ContourPath(qint64 idDetail) const{
|
|||
}
|
||||
}
|
||||
break;
|
||||
case(Tools::NodeSplinePath):{
|
||||
case(Tool::NodeSplinePath):{
|
||||
VSplinePath splinePath = GetModelingSplinePath(detail[i].getId());
|
||||
qreal len1 = GetLengthContour(points, splinePath.GetPathPoints());
|
||||
qreal lenReverse = GetLengthContour(points, GetReversePoint(splinePath.GetPathPoints()));
|
||||
|
@ -701,7 +701,7 @@ const QMap<qint64, VDetail> *VContainer::DataDetails() const{
|
|||
return &details;
|
||||
}
|
||||
|
||||
void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId, Draw::Mode mode){
|
||||
void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId, Draw::Draws mode){
|
||||
QString nameLine = GetNameLine(firstPointId, secondPointId, mode);
|
||||
VPointF first;
|
||||
VPointF second;
|
||||
|
@ -760,7 +760,7 @@ qint64 VContainer::AddModelingArc(const VArc &arc){
|
|||
return AddObject(modelingArcs, arc);
|
||||
}
|
||||
|
||||
QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Mode mode) const{
|
||||
QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const{
|
||||
VPointF first;
|
||||
VPointF second;
|
||||
if(mode == Draw::Calculation){
|
||||
|
@ -774,7 +774,7 @@ QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPo
|
|||
}
|
||||
|
||||
QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint,
|
||||
Draw::Mode mode) const{
|
||||
Draw::Draws mode) const{
|
||||
VPointF first;
|
||||
VPointF second;
|
||||
if(mode == Draw::Calculation){
|
||||
|
@ -788,7 +788,7 @@ QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &sec
|
|||
}
|
||||
|
||||
QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint,
|
||||
Draw::Mode mode) const{
|
||||
Draw::Draws mode) const{
|
||||
VPointF first;
|
||||
VPointF second;
|
||||
if(mode == Draw::Calculation){
|
||||
|
@ -801,7 +801,7 @@ QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &second
|
|||
return QString("Spl_%1_%2").arg(first.name(), second.name());
|
||||
}
|
||||
|
||||
QString VContainer::GetNameSplinePath(const VSplinePath &path, Draw::Mode mode) const{
|
||||
QString VContainer::GetNameSplinePath(const VSplinePath &path, Draw::Draws mode) const{
|
||||
if(path.Count() == 0){
|
||||
return QString();
|
||||
}
|
||||
|
@ -823,7 +823,7 @@ QString VContainer::GetNameSplinePath(const VSplinePath &path, Draw::Mode mode)
|
|||
return name;
|
||||
}
|
||||
|
||||
QString VContainer::GetNameArc(const qint64 ¢er, const qint64 &id, Draw::Mode mode) const{
|
||||
QString VContainer::GetNameArc(const qint64 ¢er, const qint64 &id, Draw::Draws mode) const{
|
||||
VPointF centerPoint;
|
||||
if(mode == Draw::Calculation){
|
||||
centerPoint = GetPoint(center);
|
||||
|
@ -838,7 +838,7 @@ void VContainer::AddLengthLine(const QString &name, const qreal &value){
|
|||
lengthLines[name] = value;
|
||||
}
|
||||
|
||||
void VContainer::AddLengthSpline(const qint64 &firstPointId, const qint64 &secondPointId, Draw::Mode mode){
|
||||
void VContainer::AddLengthSpline(const qint64 &firstPointId, const qint64 &secondPointId, Draw::Draws mode){
|
||||
QString nameLine = GetNameSpline(firstPointId, secondPointId, mode);
|
||||
VPointF first;
|
||||
VPointF second;
|
||||
|
|
|
@ -75,13 +75,13 @@ public:
|
|||
void AddIncrementTableRow(const QString& name, const VIncrementTableRow &cell);
|
||||
void AddLengthLine(const QString &name, const qreal &value);
|
||||
void AddLengthSpline(const qint64 &firstPointId, const qint64 &secondPointId,
|
||||
Draw::Mode mode = Draw::Calculation);
|
||||
Draw::Draws mode = Draw::Calculation);
|
||||
void AddLengthSpline(const QString &name, const qreal &value);
|
||||
void AddLengthArc(const qint64 ¢er, const qint64 &id);
|
||||
void AddLengthArc(const QString &name, const qreal &value);
|
||||
void AddLineAngle(const QString &name, const qreal &value);
|
||||
void AddLine(const qint64 &firstPointId, const qint64 &secondPointId,
|
||||
Draw::Mode mode = Draw::Calculation);
|
||||
Draw::Draws mode = Draw::Calculation);
|
||||
qint64 AddSpline(const VSpline& spl);
|
||||
qint64 AddModelingSpline(const VSpline& spl);
|
||||
qint64 AddSplinePath(const VSplinePath& splPath);
|
||||
|
@ -89,15 +89,15 @@ public:
|
|||
qint64 AddArc(const VArc& arc);
|
||||
qint64 AddModelingArc(const VArc& arc);
|
||||
QString GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint,
|
||||
Draw::Mode mode = Draw::Calculation) const;
|
||||
Draw::Draws mode = Draw::Calculation) const;
|
||||
QString GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint,
|
||||
Draw::Mode mode = Draw::Calculation) const;
|
||||
Draw::Draws mode = Draw::Calculation) const;
|
||||
QString GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint,
|
||||
Draw::Mode mode = Draw::Calculation) const;
|
||||
Draw::Draws mode = Draw::Calculation) const;
|
||||
QString GetNameSplinePath(const VSplinePath &path,
|
||||
Draw::Mode mode = Draw::Calculation) const;
|
||||
Draw::Draws mode = Draw::Calculation) const;
|
||||
QString GetNameArc(const qint64 ¢er, const qint64 &id,
|
||||
Draw::Mode mode = Draw::Calculation) const;
|
||||
Draw::Draws mode = Draw::Calculation) const;
|
||||
void UpdatePoint(qint64 id, const VPointF& point);
|
||||
void UpdateModelingPoint(qint64 id, const VPointF& point);
|
||||
void UpdateDetail(qint64 id, const VDetail& detail);
|
||||
|
@ -143,7 +143,7 @@ public:
|
|||
const QMap<qint64, VSplinePath> *DataModelingSplinePaths() const;
|
||||
const QMap<qint64, VDetail> *DataDetails() const;
|
||||
static void UpdateId(qint64 newId);
|
||||
void IncrementReferens(qint64 id, Scene::Type obj, Draw::Mode mode = Draw::Calculation);
|
||||
void IncrementReferens(qint64 id, Scene::Scenes obj, Draw::Draws mode = Draw::Calculation);
|
||||
QPainterPath ContourPath(qint64 idDetail) const;
|
||||
QPainterPath Equidistant(QVector<QPointF> points, const Detail::Equidistant &eqv,
|
||||
const qreal &width)const;
|
||||
|
|
|
@ -29,7 +29,7 @@ VPointF::VPointF ( const VPointF & point ):_name(point.name()), _mx(point.mx()),
|
|||
_x(point.x()), _y(point.y()), _referens(0), mode(point.getMode()), idObject(point.getIdObject()){
|
||||
}
|
||||
|
||||
VPointF::VPointF (qreal x, qreal y , QString name, qreal mx, qreal my, Draw::Mode mode, qint64 idObject):_name(name), _mx(mx),
|
||||
VPointF::VPointF (qreal x, qreal y , QString name, qreal mx, qreal my, Draw::Draws mode, qint64 idObject):_name(name), _mx(mx),
|
||||
_my(my), _x(x), _y(y), _referens(0), mode(mode), idObject(idObject){
|
||||
}
|
||||
|
||||
|
@ -94,12 +94,12 @@ void VPointF::decrementReferens(){
|
|||
}
|
||||
}
|
||||
|
||||
Draw::Mode VPointF::getMode() const
|
||||
Draw::Draws VPointF::getMode() const
|
||||
{
|
||||
return mode;
|
||||
}
|
||||
|
||||
void VPointF::setMode(const Draw::Mode &value)
|
||||
void VPointF::setMode(const Draw::Draws &value)
|
||||
{
|
||||
mode = value;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class VPointF
|
|||
public:
|
||||
VPointF();
|
||||
VPointF (const VPointF &point );
|
||||
VPointF ( qreal x, qreal y, QString name, qreal mx, qreal my, Draw::Mode mode = Draw::Calculation,
|
||||
VPointF ( qreal x, qreal y, QString name, qreal mx, qreal my, Draw::Draws mode = Draw::Calculation,
|
||||
qint64 idObject = 0);
|
||||
~VPointF();
|
||||
QString name() const;
|
||||
|
@ -48,8 +48,8 @@ public:
|
|||
qint32 referens() const;
|
||||
void incrementReferens();
|
||||
void decrementReferens();
|
||||
Draw::Mode getMode() const;
|
||||
void setMode(const Draw::Mode &value);
|
||||
Draw::Draws getMode() const;
|
||||
void setMode(const Draw::Draws &value);
|
||||
|
||||
qint64 getIdObject() const;
|
||||
void setIdObject(const qint64 &value);
|
||||
|
@ -61,7 +61,7 @@ private:
|
|||
qreal _x;
|
||||
qreal _y;
|
||||
qint32 _referens;
|
||||
Draw::Mode mode;
|
||||
Draw::Draws mode;
|
||||
qint64 idObject;
|
||||
};
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "dialogalongline.h"
|
||||
#include "ui_dialogalongline.h"
|
||||
|
||||
DialogAlongLine::DialogAlongLine(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogAlongLine::DialogAlongLine(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(new Ui::DialogAlongLine), number(0), pointName(QString()),
|
||||
typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0){
|
||||
ui->setupUi(this);
|
||||
|
@ -64,7 +64,7 @@ DialogAlongLine::~DialogAlongLine()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void DialogAlongLine::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogAlongLine::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -35,7 +35,7 @@ class DialogAlongLine : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogAlongLine(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
explicit DialogAlongLine(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
~DialogAlongLine();
|
||||
QString getPointName() const;
|
||||
|
@ -49,7 +49,7 @@ public:
|
|||
qint64 getSecondPointId() const;
|
||||
void setSecondPointId(const qint64 &value, const qint64 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
private:
|
||||
Q_DISABLE_COPY(DialogAlongLine)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "ui_dialogarc.h"
|
||||
#include "../container/calculator.h"
|
||||
|
||||
DialogArc::DialogArc(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogArc::DialogArc(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(new Ui::DialogArc), flagRadius(false), flagF1(false), flagF2(false),
|
||||
timerRadius(0), timerF1(0), timerF2(0), center(0), radius(QString()), f1(QString()), f2(QString()){
|
||||
ui->setupUi(this);
|
||||
|
@ -114,7 +114,7 @@ DialogArc::~DialogArc(){
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void DialogArc::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogArc::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -33,7 +33,7 @@ class DialogArc : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogArc(const VContainer *data, Draw::Mode mode = Draw::Calculation, QWidget *parent = 0);
|
||||
explicit DialogArc(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0);
|
||||
~DialogArc();
|
||||
qint64 GetCenter() const;
|
||||
void SetCenter(const qint64 &value);
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
void SetF2(const QString &value);
|
||||
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
virtual void ValChenged(int row);
|
||||
void PutRadius();
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "dialogbisector.h"
|
||||
#include "ui_dialogbisector.h"
|
||||
|
||||
DialogBisector::DialogBisector(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogBisector::DialogBisector(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(new Ui::DialogBisector), number(0), pointName(QString()),
|
||||
typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0), thirdPointId(0){
|
||||
ui->setupUi(this);
|
||||
|
@ -64,7 +64,7 @@ DialogBisector::~DialogBisector(){
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void DialogBisector::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogBisector::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -39,7 +39,7 @@ class DialogBisector : public DialogTool
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogBisector(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
explicit DialogBisector(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
~DialogBisector();
|
||||
QString getPointName() const;
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
qint64 getThirdPointId() const;
|
||||
void setThirdPointId(const qint64 &value, const qint64 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
private:
|
||||
Q_DISABLE_COPY(DialogBisector)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "dialogdetail.h"
|
||||
#include <QDebug>
|
||||
|
||||
DialogDetail::DialogDetail(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogDetail::DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(), details(VDetail()){
|
||||
ui.setupUi(this);
|
||||
bOk = ui.buttonBox->button(QDialogButtonBox::Ok);
|
||||
|
@ -32,7 +32,7 @@ DialogDetail::DialogDetail(const VContainer *data, Draw::Mode mode, QWidget *par
|
|||
connect(bCansel, &QPushButton::clicked, this, &DialogDetail::DialogRejected);
|
||||
}
|
||||
|
||||
void DialogDetail::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogDetail::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
@ -47,16 +47,16 @@ void DialogDetail::ChoosedObject(qint64 id, Scene::Type type){
|
|||
if(type != Scene::Line && type != Scene::Detail){
|
||||
switch(type){
|
||||
case(Scene::Arc):
|
||||
NewItem(id, Tools::NodeArc, mode, NodeDetail::Contour);
|
||||
NewItem(id, Tool::NodeArc, mode, NodeDetail::Contour);
|
||||
break;
|
||||
case(Scene::Point):
|
||||
NewItem(id, Tools::NodePoint, mode, NodeDetail::Contour);
|
||||
NewItem(id, Tool::NodePoint, mode, NodeDetail::Contour);
|
||||
break;
|
||||
case(Scene::Spline):
|
||||
NewItem(id, Tools::NodeSpline, mode, NodeDetail::Contour);
|
||||
NewItem(id, Tool::NodeSpline, mode, NodeDetail::Contour);
|
||||
break;
|
||||
case(Scene::SplinePath):
|
||||
NewItem(id, Tools::NodeSplinePath, mode, NodeDetail::Contour);
|
||||
NewItem(id, Tool::NodeSplinePath, mode, NodeDetail::Contour);
|
||||
break;
|
||||
default:
|
||||
qWarning()<<"Get wrong scene object. Ignore.";
|
||||
|
@ -76,10 +76,10 @@ void DialogDetail::DialogAccepted(){
|
|||
emit DialogClosed(QDialog::Accepted);
|
||||
}
|
||||
|
||||
void DialogDetail::NewItem(qint64 id, Tools::Enum typeTool, Draw::Mode mode, NodeDetail::Type typeNode){
|
||||
void DialogDetail::NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode){
|
||||
QString name;
|
||||
switch(typeTool){
|
||||
case(Tools::NodePoint):{
|
||||
case(Tool::NodePoint):{
|
||||
VPointF point;
|
||||
if(mode == Draw::Calculation){
|
||||
point = data->GetPoint(id);
|
||||
|
@ -89,7 +89,7 @@ void DialogDetail::NewItem(qint64 id, Tools::Enum typeTool, Draw::Mode mode, Nod
|
|||
name = point.name();
|
||||
break;
|
||||
}
|
||||
case(Tools::NodeArc):{
|
||||
case(Tool::NodeArc):{
|
||||
VArc arc;
|
||||
if(mode == Draw::Calculation){
|
||||
arc = data->GetArc(id);
|
||||
|
@ -99,7 +99,7 @@ void DialogDetail::NewItem(qint64 id, Tools::Enum typeTool, Draw::Mode mode, Nod
|
|||
name = data->GetNameArc(arc.GetCenter(), id, mode);
|
||||
break;
|
||||
}
|
||||
case(Tools::NodeSpline):{
|
||||
case(Tool::NodeSpline):{
|
||||
VSpline spl;
|
||||
if(mode == Draw::Calculation){
|
||||
spl = data->GetSpline(id);
|
||||
|
@ -109,7 +109,7 @@ void DialogDetail::NewItem(qint64 id, Tools::Enum typeTool, Draw::Mode mode, Nod
|
|||
name = spl.GetName();
|
||||
break;
|
||||
}
|
||||
case(Tools::NodeSplinePath):{
|
||||
case(Tool::NodeSplinePath):{
|
||||
VSplinePath splPath;
|
||||
if(mode == Draw::Calculation){
|
||||
splPath = data->GetSplinePath(id);
|
||||
|
|
|
@ -31,17 +31,17 @@ class DialogDetail : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogDetail(const VContainer *data, Draw::Mode mode, QWidget *parent = 0);
|
||||
explicit DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent = 0);
|
||||
VDetail getDetails() const;
|
||||
void setDetails(const VDetail &value);
|
||||
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
private:
|
||||
Ui::DialogDetail ui;
|
||||
VDetail details;
|
||||
void NewItem(qint64 id, Tools::Enum typeTool, Draw::Mode mode, NodeDetail::Type typeNode);
|
||||
void NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode);
|
||||
};
|
||||
|
||||
#endif // DIALOGDETAIL_H
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "container/vpointf.h"
|
||||
#include "container/calculator.h"
|
||||
|
||||
DialogEndLine::DialogEndLine(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogEndLine::DialogEndLine(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(new Ui::DialogEndLine), pointName(QString()), typeLine(QString()),
|
||||
formula(QString()), angle(0), basePointId(0){
|
||||
ui->setupUi(this);
|
||||
|
@ -79,7 +79,7 @@ DialogEndLine::DialogEndLine(const VContainer *data, Draw::Mode mode, QWidget *p
|
|||
connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogEndLine::FormulaChanged);
|
||||
}
|
||||
|
||||
void DialogEndLine::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogEndLine::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -38,7 +38,7 @@ class DialogEndLine : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogEndLine(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
explicit DialogEndLine(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
~DialogEndLine();
|
||||
QString getPointName() const;
|
||||
|
@ -52,7 +52,7 @@ public:
|
|||
qint64 getBasePointId() const;
|
||||
void setBasePointId(const qint64 &value, const qint64 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
private:
|
||||
Q_DISABLE_COPY(DialogEndLine)
|
||||
|
|
|
@ -144,12 +144,12 @@ QString DialogHistory::Record(const VToolRecord &tool){
|
|||
qint64 center = 0;
|
||||
QDomElement domElement;
|
||||
switch( tool.getTypeTool() ){
|
||||
case Tools::ArrowTool:
|
||||
case Tool::ArrowTool:
|
||||
break;
|
||||
case Tools::SinglePointTool:
|
||||
case Tool::SinglePointTool:
|
||||
record = QString("%1 - Базова точка").arg(data->GetPoint(tool.getId()).name());
|
||||
break;
|
||||
case Tools::EndLineTool:
|
||||
case Tool::EndLineTool:
|
||||
domElement = doc->elementById(QString().setNum(tool.getId()));
|
||||
if(domElement.isElement()){
|
||||
basePointId = domElement.attribute("basePoint", "").toLongLong();
|
||||
|
@ -157,7 +157,7 @@ QString DialogHistory::Record(const VToolRecord &tool){
|
|||
record = QString("%1_%2 - Відрізок з точки %1 до точки %2").arg(data->GetPoint(basePointId).name(),
|
||||
data->GetPoint(tool.getId()).name());
|
||||
break;
|
||||
case Tools::LineTool:
|
||||
case Tool::LineTool:
|
||||
domElement = doc->elementById(QString().setNum(tool.getId()));
|
||||
if(domElement.isElement()){
|
||||
firstPointId = domElement.attribute("firstPoint", "").toLongLong();
|
||||
|
@ -166,7 +166,7 @@ QString DialogHistory::Record(const VToolRecord &tool){
|
|||
record = QString("%1_%2 - Лінія з точки %1 до точки %2").arg(data->GetPoint(firstPointId).name(),
|
||||
data->GetPoint(secondPointId).name());
|
||||
break;
|
||||
case Tools::AlongLineTool:
|
||||
case Tool::AlongLineTool:
|
||||
domElement = doc->elementById(QString().setNum(tool.getId()));
|
||||
if(domElement.isElement()){
|
||||
basePointId = domElement.attribute("firstPoint", "").toLongLong();
|
||||
|
@ -176,10 +176,10 @@ QString DialogHistory::Record(const VToolRecord &tool){
|
|||
data->GetPoint(secondPointId).name(),
|
||||
data->GetPoint(tool.getId()).name());
|
||||
break;
|
||||
case Tools::ShoulderPointTool:
|
||||
case Tool::ShoulderPointTool:
|
||||
record = QString("%1 - Плечева точка").arg(data->GetPoint(tool.getId()).name());
|
||||
break;
|
||||
case Tools::NormalTool:
|
||||
case Tool::NormalTool:
|
||||
domElement = doc->elementById(QString().setNum(tool.getId()));
|
||||
if(domElement.isElement()){
|
||||
basePointId = domElement.attribute("firstPoint", "").toLongLong();
|
||||
|
@ -189,7 +189,7 @@ QString DialogHistory::Record(const VToolRecord &tool){
|
|||
data->GetPoint(secondPointId).name(),
|
||||
data->GetPoint(tool.getId()).name());
|
||||
break;
|
||||
case Tools::BisectorTool:
|
||||
case Tool::BisectorTool:
|
||||
domElement = doc->elementById(QString().setNum(tool.getId()));
|
||||
if(domElement.isElement()){
|
||||
firstPointId = domElement.attribute("firstPoint", "").toLongLong();
|
||||
|
@ -201,7 +201,7 @@ QString DialogHistory::Record(const VToolRecord &tool){
|
|||
data->GetPoint(thirdPointId).name(),
|
||||
data->GetPoint(tool.getId()).name());
|
||||
break;
|
||||
case Tools::LineIntersectTool:
|
||||
case Tool::LineIntersectTool:
|
||||
domElement = doc->elementById(QString().setNum(tool.getId()));
|
||||
if(domElement.isElement()){
|
||||
p1Line1 = domElement.attribute("p1Line1", "").toLongLong();
|
||||
|
@ -215,18 +215,18 @@ QString DialogHistory::Record(const VToolRecord &tool){
|
|||
data->GetPoint(p2Line2).name(),
|
||||
data->GetPoint(tool.getId()).name());
|
||||
break;
|
||||
case Tools::SplineTool:{
|
||||
case Tool::SplineTool:{
|
||||
VSpline spl = data->GetSpline(tool.getId());
|
||||
record = QString("Сплайн %1_%2").arg(data->GetPoint(spl.GetP1()).name(),
|
||||
data->GetPoint(spl.GetP4()).name());
|
||||
}
|
||||
break;
|
||||
case Tools::ArcTool:{
|
||||
case Tool::ArcTool:{
|
||||
VArc arc = data->GetArc(tool.getId());
|
||||
record = QString("Дуга з центром в точці %1").arg(data->GetPoint(arc.GetCenter()).name());
|
||||
}
|
||||
break;
|
||||
case Tools::SplinePathTool:{
|
||||
case Tool::SplinePathTool:{
|
||||
VSplinePath splPath = data->GetSplinePath(tool.getId());
|
||||
QVector<VSplinePoint> points = splPath.GetSplinePath();
|
||||
if(points.size() != 0 ){
|
||||
|
@ -238,7 +238,7 @@ QString DialogHistory::Record(const VToolRecord &tool){
|
|||
}
|
||||
}
|
||||
break;
|
||||
case Tools::PointOfContact:
|
||||
case Tool::PointOfContact:
|
||||
domElement = doc->elementById(QString().setNum(tool.getId()));
|
||||
if(domElement.isElement()){
|
||||
center = domElement.attribute("center", "").toLongLong();
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <QPushButton>
|
||||
#include <QCloseEvent>
|
||||
|
||||
DialogLine::DialogLine(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogLine::DialogLine(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(new Ui::DialogLine), number(0), firstPoint(0), secondPoint(0){
|
||||
ui->setupUi(this);
|
||||
bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
|
||||
|
@ -75,7 +75,7 @@ void DialogLine::DialogAccepted(){
|
|||
DialogClosed(QDialog::Accepted);
|
||||
}
|
||||
|
||||
void DialogLine::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogLine::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -36,7 +36,7 @@ class DialogLine : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogLine(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
explicit DialogLine(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
~DialogLine();
|
||||
qint64 getFirstPoint() const;
|
||||
|
@ -44,7 +44,7 @@ public:
|
|||
qint64 getSecondPoint() const;
|
||||
void setSecondPoint(const qint64 &value);
|
||||
public slots:
|
||||
void ChoosedObject(qint64 id, Scene::Type type);
|
||||
void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
private:
|
||||
Q_DISABLE_COPY(DialogLine)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "dialoglineintersect.h"
|
||||
#include "ui_dialoglineintersect.h"
|
||||
|
||||
DialogLineIntersect::DialogLineIntersect(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogLineIntersect::DialogLineIntersect(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(new Ui::DialogLineIntersect), number(0), pointName(QString()),
|
||||
p1Line1(0), p2Line1(0), p1Line2(0), p2Line2(0), flagPoint(true){
|
||||
ui->setupUi(this);
|
||||
|
@ -45,7 +45,7 @@ DialogLineIntersect::~DialogLineIntersect()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void DialogLineIntersect::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogLineIntersect::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -32,7 +32,7 @@ class DialogLineIntersect : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogLineIntersect(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
explicit DialogLineIntersect(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
~DialogLineIntersect();
|
||||
qint64 getP1Line1() const;
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
QString getPointName() const;
|
||||
void setPointName(const QString &value);
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
void P1Line1Changed( int index);
|
||||
void P2Line1Changed( int index);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "ui_dialognormal.h"
|
||||
#include <QMenu>
|
||||
|
||||
DialogNormal::DialogNormal(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogNormal::DialogNormal(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(new Ui::DialogNormal), number(0), pointName(QString()),
|
||||
typeLine(QString()), formula(QString()), angle(0), firstPointId(0), secondPointId(0){
|
||||
ui->setupUi(this);
|
||||
|
@ -82,7 +82,7 @@ DialogNormal::~DialogNormal()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void DialogNormal::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogNormal::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -38,7 +38,7 @@ class DialogNormal : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogNormal(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
explicit DialogNormal(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
~DialogNormal();
|
||||
QString getPointName() const;
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
qint64 getSecondPointId() const;
|
||||
void setSecondPointId(const qint64 &value, const qint64 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
private:
|
||||
Q_DISABLE_COPY(DialogNormal)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "dialogpointofcontact.h"
|
||||
|
||||
DialogPointOfContact::DialogPointOfContact(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogPointOfContact::DialogPointOfContact(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(), number(0), pointName(QString()), radius(QString()), center(0),
|
||||
firstPoint(0), secondPoint(0){
|
||||
ui.setupUi(this);
|
||||
|
@ -58,7 +58,7 @@ DialogPointOfContact::DialogPointOfContact(const VContainer *data, Draw::Mode mo
|
|||
connect(ui.lineEditFormula, &QLineEdit::textChanged, this, &DialogPointOfContact::FormulaChanged);
|
||||
}
|
||||
|
||||
void DialogPointOfContact::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogPointOfContact::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -33,7 +33,7 @@ class DialogPointOfContact : public DialogTool
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogPointOfContact(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
explicit DialogPointOfContact(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
QString getPointName() const;
|
||||
void setPointName(const QString &value);
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
void setSecondPoint(const qint64 &value, const qint64 &id);
|
||||
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
private:
|
||||
Q_DISABLE_COPY(DialogPointOfContact)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "dialogshoulderpoint.h"
|
||||
#include "ui_dialogshoulderpoint.h"
|
||||
|
||||
DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(new Ui::DialogShoulderPoint), number(0), pointName(QString()),
|
||||
typeLine(QString()), formula(QString()), p1Line(0), p2Line(0), pShoulder(0){
|
||||
ui->setupUi(this);
|
||||
|
@ -66,7 +66,7 @@ DialogShoulderPoint::~DialogShoulderPoint()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void DialogShoulderPoint::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogShoulderPoint::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -35,7 +35,7 @@ class DialogShoulderPoint : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogShoulderPoint(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
explicit DialogShoulderPoint(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
~DialogShoulderPoint();
|
||||
QString getPointName() const;
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
qint64 getPShoulder() const;
|
||||
void setPShoulder(const qint64 &value, const qint64 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
private:
|
||||
Q_DISABLE_COPY(DialogShoulderPoint)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "dialogspline.h"
|
||||
#include "ui_dialogspline.h"
|
||||
|
||||
DialogSpline::DialogSpline(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogSpline::DialogSpline(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(new Ui::DialogSpline), number(0), p1(0), p4(0), angle1(0), angle2(0),
|
||||
kAsm1(1), kAsm2(1), kCurve(1){
|
||||
ui->setupUi(this);
|
||||
|
@ -41,7 +41,7 @@ DialogSpline::~DialogSpline(){
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void DialogSpline::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogSpline::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -33,7 +33,7 @@ class DialogSpline : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogSpline(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
explicit DialogSpline(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
~DialogSpline();
|
||||
qint64 getP1() const;
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
qreal getKCurve() const;
|
||||
void setKCurve(const qreal &value);
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
private:
|
||||
Q_DISABLE_COPY(DialogSpline)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "ui_dialogsplinepath.h"
|
||||
#include "geometry/vsplinepoint.h"
|
||||
|
||||
DialogSplinePath::DialogSplinePath(const VContainer *data, Draw::Mode mode, QWidget *parent) :
|
||||
DialogSplinePath::DialogSplinePath(const VContainer *data, Draw::Draws mode, QWidget *parent) :
|
||||
DialogTool(data, mode, parent), ui(new Ui::DialogSplinePath), path(VSplinePath()){
|
||||
ui->setupUi(this);
|
||||
bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
|
||||
|
@ -68,7 +68,7 @@ void DialogSplinePath::SetPath(const VSplinePath &value){
|
|||
}
|
||||
|
||||
|
||||
void DialogSplinePath::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogSplinePath::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
if(idDetail == 0 && mode == Draw::Modeling){
|
||||
if(type == Scene::Detail){
|
||||
idDetail = id;
|
||||
|
|
|
@ -34,13 +34,13 @@ class DialogSplinePath : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogSplinePath(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
explicit DialogSplinePath(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
~DialogSplinePath();
|
||||
VSplinePath GetPath() const;
|
||||
void SetPath(const VSplinePath &value);
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
virtual void DialogAccepted();
|
||||
void PointChenged(int row);
|
||||
void currentPointChanged( int index );
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "geometry/vdetail.h"
|
||||
#include <QDebug>
|
||||
|
||||
DialogTool::DialogTool(const VContainer *data, Draw::Mode mode, QWidget *parent):QDialog(parent), data(data),
|
||||
DialogTool::DialogTool(const VContainer *data, Draw::Draws mode, QWidget *parent):QDialog(parent), data(data),
|
||||
isInitialized(false), flagName(true), flagFormula(true), timerFormula(0), bOk(0), spinBoxAngle(0),
|
||||
lineEditFormula(0), listWidget(0), labelResultCalculation(0), labelDescription(0),
|
||||
radioButtonSizeGrowth(0), radioButtonStandartTable(0), radioButtonIncrements(0),
|
||||
|
@ -74,14 +74,14 @@ void DialogTool::FillComboBoxPoints(QComboBox *box, const qint64 &id) const{
|
|||
}
|
||||
VDetail det = data->GetDetail(idDetail);
|
||||
for(qint32 i = 0; i< det.CountNode(); ++i){
|
||||
if(det[i].getTypeTool() == Tools::NodePoint ||
|
||||
det[i].getTypeTool() == Tools::AlongLineTool ||
|
||||
det[i].getTypeTool() == Tools::BisectorTool ||
|
||||
det[i].getTypeTool() == Tools::EndLineTool ||
|
||||
det[i].getTypeTool() == Tools::LineIntersectTool ||
|
||||
det[i].getTypeTool() == Tools::NormalTool ||
|
||||
det[i].getTypeTool() == Tools::PointOfContact ||
|
||||
det[i].getTypeTool() == Tools::ShoulderPointTool){
|
||||
if(det[i].getTypeTool() == Tool::NodePoint ||
|
||||
det[i].getTypeTool() == Tool::AlongLineTool ||
|
||||
det[i].getTypeTool() == Tool::BisectorTool ||
|
||||
det[i].getTypeTool() == Tool::EndLineTool ||
|
||||
det[i].getTypeTool() == Tool::LineIntersectTool ||
|
||||
det[i].getTypeTool() == Tool::NormalTool ||
|
||||
det[i].getTypeTool() == Tool::PointOfContact ||
|
||||
det[i].getTypeTool() == Tool::ShoulderPointTool){
|
||||
if(det[i].getId() != id){
|
||||
VPointF point = data->GetModelingPoint(det[i].getId());
|
||||
box->addItem(point.name(), det[i].getId());
|
||||
|
@ -200,7 +200,7 @@ void DialogTool::CheckState(){
|
|||
}
|
||||
|
||||
|
||||
void DialogTool::ChoosedObject(qint64 id, Scene::Type type){
|
||||
void DialogTool::ChoosedObject(qint64 id, Scene::Scenes type){
|
||||
Q_UNUSED(id);
|
||||
Q_UNUSED(type);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class DialogTool : public QDialog
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DialogTool(const VContainer *data, Draw::Mode mode = Draw::Calculation,
|
||||
DialogTool(const VContainer *data, Draw::Draws mode = Draw::Calculation,
|
||||
QWidget *parent = 0);
|
||||
virtual ~DialogTool();
|
||||
qint64 getIdDetail() const;
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
signals:
|
||||
void DialogClosed(int result);
|
||||
public slots:
|
||||
virtual void ChoosedObject(qint64 id, Scene::Type type);
|
||||
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
|
||||
void NamePointChanged();
|
||||
virtual void DialogAccepted();
|
||||
virtual void DialogRejected();
|
||||
|
@ -86,7 +86,7 @@ protected:
|
|||
QRadioButton *radioButtonIncrements;
|
||||
QRadioButton *radioButtonLengthLine;
|
||||
qint64 idDetail;
|
||||
Draw::Mode mode;
|
||||
Draw::Draws mode;
|
||||
bool CheckObject(const qint64 &id);
|
||||
virtual void closeEvent ( QCloseEvent * event );
|
||||
virtual void showEvent( QShowEvent *event );
|
||||
|
|
|
@ -29,7 +29,7 @@ VArc::VArc () : f1(0), formulaF1(QString()), f2(0), formulaF2(QString()), radius
|
|||
}
|
||||
|
||||
VArc::VArc (const QMap<qint64, VPointF> *points, qint64 center, qreal radius, QString formulaRadius,
|
||||
qreal f1, QString formulaF1, qreal f2, QString formulaF2, Draw::Mode mode, qint64 idObject)
|
||||
qreal f1, QString formulaF1, qreal f2, QString formulaF2, Draw::Draws mode, qint64 idObject)
|
||||
: f1(f1), formulaF1(formulaF1), f2(f2), formulaF2(formulaF2), radius(radius), formulaRadius(formulaRadius),
|
||||
center(center), points(points), _referens(0), mode(mode), idObject(idObject){
|
||||
}
|
||||
|
@ -213,12 +213,12 @@ void VArc::decrementReferens(){
|
|||
}
|
||||
|
||||
|
||||
Draw::Mode VArc::getMode() const
|
||||
Draw::Draws VArc::getMode() const
|
||||
{
|
||||
return mode;
|
||||
}
|
||||
|
||||
void VArc::setMode(const Draw::Mode &value)
|
||||
void VArc::setMode(const Draw::Draws &value)
|
||||
{
|
||||
mode = value;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
*/
|
||||
VArc (const QMap<qint64, VPointF> *points, qint64 center, qreal radius, QString formulaRadius,
|
||||
qreal f1, QString formulaF1, qreal f2 , QString formulaF2,
|
||||
Draw::Mode mode = Draw::Calculation, qint64 idObject = 0);
|
||||
Draw::Draws mode = Draw::Calculation, qint64 idObject = 0);
|
||||
VArc(const VArc &arc);
|
||||
VArc& operator= (const VArc &arc);
|
||||
/**
|
||||
|
@ -101,8 +101,8 @@ public:
|
|||
qint32 referens() const;
|
||||
void incrementReferens();
|
||||
void decrementReferens();
|
||||
Draw::Mode getMode() const;
|
||||
void setMode(const Draw::Mode &value);
|
||||
Draw::Draws getMode() const;
|
||||
void setMode(const Draw::Draws &value);
|
||||
|
||||
qint64 getIdObject() const;
|
||||
void setIdObject(const qint64 &value);
|
||||
|
@ -129,7 +129,7 @@ private:
|
|||
qint64 center;
|
||||
const QMap<qint64, VPointF> *points;
|
||||
qint32 _referens;
|
||||
Draw::Mode mode;
|
||||
Draw::Draws mode;
|
||||
qint64 idObject;
|
||||
};
|
||||
|
||||
|
|
|
@ -27,19 +27,15 @@
|
|||
#include <QString>
|
||||
#include <QPainterPath>
|
||||
|
||||
namespace Detail{
|
||||
enum Contour
|
||||
{
|
||||
OpenContour,
|
||||
CloseContour
|
||||
};
|
||||
namespace Detail {
|
||||
enum Contour { OpenContour, CloseContour };
|
||||
Q_DECLARE_FLAGS(Contours, Contour)
|
||||
|
||||
enum Equidistant
|
||||
{
|
||||
OpenEquidistant,
|
||||
CloseEquidistant
|
||||
};
|
||||
enum Equidistant { OpenEquidistant, CloseEquidistant };
|
||||
Q_DECLARE_FLAGS(Equidistants, Equidistant)
|
||||
}
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(Detail::Contours)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(Detail::Equidistants)
|
||||
|
||||
class VDetail
|
||||
{
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
|
||||
#include "vnodedetail.h"
|
||||
|
||||
VNodeDetail::VNodeDetail():id(0), typeTool(Tools::NodePoint), mode(Draw::Calculation),
|
||||
VNodeDetail::VNodeDetail():id(0), typeTool(Tool::NodePoint), mode(Draw::Calculation),
|
||||
typeNode(NodeDetail::Contour){
|
||||
}
|
||||
|
||||
VNodeDetail::VNodeDetail(qint64 id, Tools::Enum typeTool, Draw::Mode mode, NodeDetail::Type typeNode):id(id),
|
||||
VNodeDetail::VNodeDetail(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode):id(id),
|
||||
typeTool(typeTool), mode(mode), typeNode(typeNode){
|
||||
}
|
||||
|
||||
|
@ -33,11 +33,11 @@ VNodeDetail::VNodeDetail(const VNodeDetail &node):id(node.getId()), typeTool(nod
|
|||
mode(node.getMode()), typeNode(node.getTypeNode()){
|
||||
}
|
||||
|
||||
Tools::Enum VNodeDetail::getTypeTool() const{
|
||||
Tool::Tools VNodeDetail::getTypeTool() const{
|
||||
return typeTool;
|
||||
}
|
||||
|
||||
void VNodeDetail::setTypeTool(const Tools::Enum &value){
|
||||
void VNodeDetail::setTypeTool(const Tool::Tools &value){
|
||||
typeTool = value;
|
||||
}
|
||||
|
||||
|
@ -49,18 +49,18 @@ void VNodeDetail::setId(const qint64 &value){
|
|||
id = value;
|
||||
}
|
||||
|
||||
Draw::Mode VNodeDetail::getMode() const{
|
||||
Draw::Draws VNodeDetail::getMode() const{
|
||||
return mode;
|
||||
}
|
||||
|
||||
void VNodeDetail::setMode(const Draw::Mode &value){
|
||||
void VNodeDetail::setMode(const Draw::Draws &value){
|
||||
mode = value;
|
||||
}
|
||||
|
||||
NodeDetail::Type VNodeDetail::getTypeNode() const{
|
||||
NodeDetail::NodeDetails VNodeDetail::getTypeNode() const{
|
||||
return typeNode;
|
||||
}
|
||||
|
||||
void VNodeDetail::setTypeNode(const NodeDetail::Type &value){
|
||||
void VNodeDetail::setTypeNode(const NodeDetail::NodeDetails &value){
|
||||
typeNode = value;
|
||||
}
|
||||
|
|
|
@ -26,34 +26,32 @@
|
|||
#include <QMetaType>
|
||||
#include "options.h"
|
||||
|
||||
namespace NodeDetail{
|
||||
enum Type
|
||||
{
|
||||
Contour,
|
||||
Modeling
|
||||
};
|
||||
namespace NodeDetail {
|
||||
enum NodeDetail { Contour, Modeling };
|
||||
Q_DECLARE_FLAGS(NodeDetails, NodeDetail)
|
||||
}
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(NodeDetail::NodeDetails)
|
||||
|
||||
class VNodeDetail
|
||||
{
|
||||
public:
|
||||
VNodeDetail();
|
||||
VNodeDetail(qint64 id, Tools::Enum typeTool, Draw::Mode mode, NodeDetail::Type typeNode);
|
||||
VNodeDetail(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode);
|
||||
VNodeDetail(const VNodeDetail &node);
|
||||
qint64 getId() const;
|
||||
void setId(const qint64 &value);
|
||||
Tools::Enum getTypeTool() const;
|
||||
void setTypeTool(const Tools::Enum &value);
|
||||
Draw::Mode getMode() const;
|
||||
void setMode(const Draw::Mode &value);
|
||||
NodeDetail::Type getTypeNode() const;
|
||||
void setTypeNode(const NodeDetail::Type &value);
|
||||
Tool::Tools getTypeTool() const;
|
||||
void setTypeTool(const Tool::Tools &value);
|
||||
Draw::Draws getMode() const;
|
||||
void setMode(const Draw::Draws &value);
|
||||
NodeDetail::NodeDetails getTypeNode() const;
|
||||
void setTypeNode(const NodeDetail::NodeDetails &value);
|
||||
|
||||
private:
|
||||
qint64 id;
|
||||
Tools::Enum typeTool;
|
||||
Draw::Mode mode;
|
||||
NodeDetail::Type typeNode;
|
||||
Tool::Tools typeTool;
|
||||
Draw::Draws mode;
|
||||
NodeDetail::NodeDetails typeNode;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(VNodeDetail)
|
||||
|
|
|
@ -35,14 +35,14 @@ VSpline::VSpline ( const VSpline & spline ):p1(spline.GetP1 ()), p2(spline.GetP2
|
|||
}
|
||||
|
||||
VSpline::VSpline (const QMap<qint64, VPointF> *points, qint64 p1, qint64 p4, qreal angle1, qreal angle2,
|
||||
qreal kAsm1, qreal kAsm2 , qreal kCurve, Draw::Mode mode, qint64 idObject):p1(p1), p2(QPointF()), p3(QPointF()),
|
||||
qreal kAsm1, qreal kAsm2 , qreal kCurve, Draw::Draws mode, qint64 idObject):p1(p1), p2(QPointF()), p3(QPointF()),
|
||||
p4(p4), angle1(angle1), angle2(angle2), kAsm1(kAsm1), kAsm2(kAsm2), kCurve(kCurve), points(points),
|
||||
_referens(0), mode(mode), idObject(idObject){
|
||||
ModifiSpl ( p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve );
|
||||
}
|
||||
|
||||
VSpline::VSpline (const QMap<qint64, VPointF> *points, qint64 p1, QPointF p2, QPointF p3, qint64 p4,
|
||||
qreal kCurve, Draw::Mode mode, qint64 idObject):p1(p1), p2(p2), p3(p3), p4(p4), angle1(0), angle2(0), kAsm1(1), kAsm2(1),
|
||||
qreal kCurve, Draw::Draws mode, qint64 idObject):p1(p1), p2(p2), p3(p3), p4(p4), angle1(0), angle2(0), kAsm1(1), kAsm2(1),
|
||||
kCurve(1), points(points), _referens(0), mode(mode), idObject(idObject){
|
||||
ModifiSpl ( p1, p2, p3, p4, kCurve);
|
||||
}
|
||||
|
@ -768,11 +768,11 @@ qint32 VSpline::Cubic(qreal *x, qreal a, qreal b, qreal c){
|
|||
// this->ModifiSpl(P1, P2, P3, P4);
|
||||
//}
|
||||
|
||||
Draw::Mode VSpline::getMode() const{
|
||||
Draw::Draws VSpline::getMode() const{
|
||||
return mode;
|
||||
}
|
||||
|
||||
void VSpline::setMode(const Draw::Mode &value){
|
||||
void VSpline::setMode(const Draw::Draws &value){
|
||||
mode = value;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
*/
|
||||
VSpline (const QMap<qint64, VPointF> *points, qint64 p1, qint64 p4, qreal angle1,
|
||||
qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve,
|
||||
Draw::Mode mode = Draw::Calculation, qint64 idObject = 0);
|
||||
Draw::Draws mode = Draw::Calculation, qint64 idObject = 0);
|
||||
/**
|
||||
* @brief VSpline конструктор.
|
||||
* @param p1 початкова точка сплайну.
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
* @param p4 кінцева точка сплайну.
|
||||
*/
|
||||
VSpline (const QMap<qint64, VPointF> *points, qint64 p1, QPointF p2, QPointF p3,
|
||||
qint64 p4, qreal kCurve, Draw::Mode mode = Draw::Calculation,
|
||||
qint64 p4, qreal kCurve, Draw::Draws mode = Draw::Calculation,
|
||||
qint64 idObject = 0);
|
||||
/**
|
||||
* @brief ModifiSpl модифікує сплайн.
|
||||
|
@ -183,8 +183,8 @@ public:
|
|||
qint32 referens() const;
|
||||
void incrementReferens();
|
||||
void decrementReferens();
|
||||
Draw::Mode getMode() const;
|
||||
void setMode(const Draw::Mode &value);
|
||||
Draw::Draws getMode() const;
|
||||
void setMode(const Draw::Draws &value);
|
||||
static QVector<QPointF> SplinePoints(QPointF p1, QPointF p4, qreal angle1,
|
||||
qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve);
|
||||
qint64 getIdObject() const;
|
||||
|
@ -230,7 +230,7 @@ private:
|
|||
qreal kCurve;
|
||||
const QMap<qint64, VPointF> *points;
|
||||
qint32 _referens;
|
||||
Draw::Mode mode;
|
||||
Draw::Draws mode;
|
||||
qint64 idObject;
|
||||
/**
|
||||
* @brief LengthBezier повертає дожину сплайну за його чотирьма точками.
|
||||
|
|
|
@ -25,7 +25,7 @@ VSplinePath::VSplinePath(): path(QVector<VSplinePoint>()), kCurve(1), mode(Draw:
|
|||
_referens(0), idObject(0){
|
||||
}
|
||||
|
||||
VSplinePath::VSplinePath(const QMap<qint64, VPointF> *points, qreal kCurve, Draw::Mode mode, qint64 idObject): path(QVector<VSplinePoint>()),
|
||||
VSplinePath::VSplinePath(const QMap<qint64, VPointF> *points, qreal kCurve, Draw::Draws mode, qint64 idObject): path(QVector<VSplinePoint>()),
|
||||
kCurve(kCurve), mode(mode), points(points), _referens(0), idObject(idObject){
|
||||
}
|
||||
|
||||
|
@ -34,11 +34,11 @@ VSplinePath::VSplinePath(const VSplinePath &splPath): path(*splPath.GetPoint()),
|
|||
idObject(splPath.getIdObject()){
|
||||
}
|
||||
|
||||
Draw::Mode VSplinePath::getMode() const{
|
||||
Draw::Draws VSplinePath::getMode() const{
|
||||
return mode;
|
||||
}
|
||||
|
||||
void VSplinePath::setMode(const Draw::Mode &value){
|
||||
void VSplinePath::setMode(const Draw::Draws &value){
|
||||
mode = value;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
* @brief VSplinePath конструктор по замовчуванню.
|
||||
*/
|
||||
VSplinePath(const QMap<qint64, VPointF> *points, qreal kCurve = 1,
|
||||
Draw::Mode mode = Draw::Calculation, qint64 idObject = 0);
|
||||
Draw::Draws mode = Draw::Calculation, qint64 idObject = 0);
|
||||
VSplinePath(const VSplinePath& splPath);
|
||||
/**
|
||||
* @brief append додає точку сплайну до шляху.
|
||||
|
@ -77,8 +77,8 @@ public:
|
|||
qint32 referens() const;
|
||||
void incrementReferens();
|
||||
void decrementReferens();
|
||||
Draw::Mode getMode() const;
|
||||
void setMode(const Draw::Mode &value);
|
||||
Draw::Draws getMode() const;
|
||||
void setMode(const Draw::Draws &value);
|
||||
|
||||
qint64 getIdObject() const;
|
||||
void setIdObject(const qint64 &value);
|
||||
|
@ -89,7 +89,7 @@ protected:
|
|||
*/
|
||||
QVector<VSplinePoint> path;
|
||||
qreal kCurve;
|
||||
Draw::Mode mode;
|
||||
Draw::Draws mode;
|
||||
const QMap<qint64, VPointF> *points;
|
||||
qint32 _referens;
|
||||
qint64 idObject;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "exception/vexceptionwrongparameterid.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent), ui(new Ui::MainWindow), tool(Tools::ArrowTool), currentScene(0), sceneDraw(0),
|
||||
QMainWindow(parent), ui(new Ui::MainWindow), tool(Tool::ArrowTool), currentScene(0), sceneDraw(0),
|
||||
sceneDetails(0), mouseCoordinate(0), helpLabel(0), view(0), isInitialized(false), dialogTable(0),
|
||||
dialogEndLine(QSharedPointer<DialogEndLine>()), dialogLine(QSharedPointer<DialogLine>()),
|
||||
dialogAlongLine(QSharedPointer<DialogAlongLine>()),
|
||||
|
@ -152,7 +152,7 @@ void MainWindow::ActionNewDraw(){
|
|||
connect(spoint, &VToolPoint::ChoosedTool, sceneDraw, &VMainGraphicsScene::ChoosedItem);
|
||||
QMap<qint64, VDataTool*>* tools = doc->getTools();
|
||||
tools->insert(id, spoint);
|
||||
VDrawTool::AddRecord(id, Tools::SinglePointTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::SinglePointTool, doc);
|
||||
SetEnableTool(true);
|
||||
SetEnableWidgets(true);
|
||||
changeInFile = true;
|
||||
|
@ -191,7 +191,7 @@ void MainWindow::OptionDraw(){
|
|||
}
|
||||
|
||||
template <typename Dialog, typename Func>
|
||||
void MainWindow::SetToolButton(bool checked, Tools::Enum t, const QString &cursor,
|
||||
void MainWindow::SetToolButton(bool checked, Tool::Tools t, const QString &cursor,
|
||||
QSharedPointer<Dialog> &dialog, Func closeDialogSlot){
|
||||
if(checked){
|
||||
CanselTool();
|
||||
|
@ -211,8 +211,8 @@ void MainWindow::SetToolButton(bool checked, Tools::Enum t, const QString &curso
|
|||
}
|
||||
}
|
||||
|
||||
template <typename Tool>
|
||||
void MainWindow::AddToolToDetail(Tool *tool, const qint64 &id, Tools::Enum typeTool,
|
||||
template <typename T>
|
||||
void MainWindow::AddToolToDetail(T *tool, const qint64 &id, Tool::Tools typeTool,
|
||||
const qint64 &idDetail){
|
||||
QMap<qint64, VDataTool*>* tools = doc->getTools();
|
||||
VToolDetail *det = qobject_cast<VToolDetail*>(tools->value(idDetail));
|
||||
|
@ -221,7 +221,7 @@ void MainWindow::AddToolToDetail(Tool *tool, const qint64 &id, Tools::Enum typeT
|
|||
}
|
||||
|
||||
void MainWindow::ToolEndLine(bool checked){
|
||||
SetToolButton(checked, Tools::EndLineTool, ":/cursor/endline_cursor.png", dialogEndLine,
|
||||
SetToolButton(checked, Tool::EndLineTool, ":/cursor/endline_cursor.png", dialogEndLine,
|
||||
&MainWindow::ClosedDialogEndLine);
|
||||
}
|
||||
|
||||
|
@ -231,14 +231,14 @@ void MainWindow::ClosedDialogEndLine(int result){
|
|||
VToolEndLine::Create(dialogEndLine, currentScene, doc, data);
|
||||
} else {
|
||||
VModelingEndLine *endLine = VModelingEndLine::Create(dialogEndLine, doc, data);
|
||||
AddToolToDetail(endLine, endLine->getId(), Tools::EndLineTool, dialogEndLine->getIdDetail());
|
||||
AddToolToDetail(endLine, endLine->getId(), Tool::EndLineTool, dialogEndLine->getIdDetail());
|
||||
}
|
||||
}
|
||||
ArrowTool();
|
||||
}
|
||||
|
||||
void MainWindow::ToolLine(bool checked){
|
||||
SetToolButton(checked, Tools::LineTool, ":/cursor/line_cursor.png", dialogLine,
|
||||
SetToolButton(checked, Tool::LineTool, ":/cursor/line_cursor.png", dialogLine,
|
||||
&MainWindow::ClosedDialogLine);
|
||||
}
|
||||
|
||||
|
@ -248,14 +248,14 @@ void MainWindow::ClosedDialogLine(int result){
|
|||
VToolLine::Create(dialogLine, currentScene, doc, data);
|
||||
} else {
|
||||
VModelingLine *line = VModelingLine::Create(dialogLine, doc, data);
|
||||
AddToolToDetail(line, line->getId(), Tools::LineTool, dialogLine->getIdDetail());
|
||||
AddToolToDetail(line, line->getId(), Tool::LineTool, dialogLine->getIdDetail());
|
||||
}
|
||||
}
|
||||
ArrowTool();
|
||||
}
|
||||
|
||||
void MainWindow::ToolAlongLine(bool checked){
|
||||
SetToolButton(checked, Tools::AlongLineTool, ":/cursor/alongline_cursor.png", dialogAlongLine,
|
||||
SetToolButton(checked, Tool::AlongLineTool, ":/cursor/alongline_cursor.png", dialogAlongLine,
|
||||
&MainWindow::ClosedDialogAlongLine);
|
||||
}
|
||||
|
||||
|
@ -265,14 +265,14 @@ void MainWindow::ClosedDialogAlongLine(int result){
|
|||
VToolAlongLine::Create(dialogAlongLine, currentScene, doc, data);
|
||||
} else{
|
||||
VModelingAlongLine *point = VModelingAlongLine::Create(dialogAlongLine, doc, data);
|
||||
AddToolToDetail(point, point->getId(), Tools::AlongLineTool, dialogAlongLine->getIdDetail());
|
||||
AddToolToDetail(point, point->getId(), Tool::AlongLineTool, dialogAlongLine->getIdDetail());
|
||||
}
|
||||
}
|
||||
ArrowTool();
|
||||
}
|
||||
|
||||
void MainWindow::ToolShoulderPoint(bool checked){
|
||||
SetToolButton(checked, Tools::ShoulderPointTool, ":/cursor/shoulder_cursor.png", dialogShoulderPoint,
|
||||
SetToolButton(checked, Tool::ShoulderPointTool, ":/cursor/shoulder_cursor.png", dialogShoulderPoint,
|
||||
&MainWindow::ClosedDialogShoulderPoint);
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ void MainWindow::ClosedDialogShoulderPoint(int result){
|
|||
VToolShoulderPoint::Create(dialogShoulderPoint, currentScene, doc, data);
|
||||
} else {
|
||||
VModelingShoulderPoint *point = VModelingShoulderPoint::Create(dialogShoulderPoint, doc, data);
|
||||
AddToolToDetail(point, point->getId(), Tools::ShoulderPointTool,
|
||||
AddToolToDetail(point, point->getId(), Tool::ShoulderPointTool,
|
||||
dialogShoulderPoint->getIdDetail());
|
||||
}
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ void MainWindow::ClosedDialogShoulderPoint(int result){
|
|||
}
|
||||
|
||||
void MainWindow::ToolNormal(bool checked){
|
||||
SetToolButton(checked, Tools::NormalTool, ":/cursor/normal_cursor.png", dialogNormal,
|
||||
SetToolButton(checked, Tool::NormalTool, ":/cursor/normal_cursor.png", dialogNormal,
|
||||
&MainWindow::ClosedDialogNormal);
|
||||
}
|
||||
|
||||
|
@ -300,14 +300,14 @@ void MainWindow::ClosedDialogNormal(int result){
|
|||
VToolNormal::Create(dialogNormal, currentScene, doc, data);
|
||||
} else {
|
||||
VModelingNormal *point = VModelingNormal::Create(dialogNormal, doc, data);
|
||||
AddToolToDetail(point, point->getId(), Tools::NormalTool, dialogNormal->getIdDetail());
|
||||
AddToolToDetail(point, point->getId(), Tool::NormalTool, dialogNormal->getIdDetail());
|
||||
}
|
||||
}
|
||||
ArrowTool();
|
||||
}
|
||||
|
||||
void MainWindow::ToolBisector(bool checked){
|
||||
SetToolButton(checked, Tools::BisectorTool, ":/cursor/bisector_cursor.png", dialogBisector,
|
||||
SetToolButton(checked, Tool::BisectorTool, ":/cursor/bisector_cursor.png", dialogBisector,
|
||||
&MainWindow::ClosedDialogBisector);
|
||||
}
|
||||
|
||||
|
@ -317,14 +317,14 @@ void MainWindow::ClosedDialogBisector(int result){
|
|||
VToolBisector::Create(dialogBisector, currentScene, doc, data);
|
||||
} else {
|
||||
VModelingBisector *point = VModelingBisector::Create(dialogBisector, doc, data);
|
||||
AddToolToDetail(point, point->getId(), Tools::BisectorTool, dialogBisector->getIdDetail());
|
||||
AddToolToDetail(point, point->getId(), Tool::BisectorTool, dialogBisector->getIdDetail());
|
||||
}
|
||||
}
|
||||
ArrowTool();
|
||||
}
|
||||
|
||||
void MainWindow::ToolLineIntersect(bool checked){
|
||||
SetToolButton(checked, Tools::LineIntersectTool, ":/cursor/intersect_cursor.png", dialogLineIntersect,
|
||||
SetToolButton(checked, Tool::LineIntersectTool, ":/cursor/intersect_cursor.png", dialogLineIntersect,
|
||||
&MainWindow::ClosedDialogLineIntersect);
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ void MainWindow::ClosedDialogLineIntersect(int result){
|
|||
VToolLineIntersect::Create(dialogLineIntersect, currentScene, doc, data);
|
||||
} else {
|
||||
VModelingLineIntersect *point = VModelingLineIntersect::Create(dialogLineIntersect, doc, data);
|
||||
AddToolToDetail(point, point->getId(), Tools::LineIntersectTool,
|
||||
AddToolToDetail(point, point->getId(), Tool::LineIntersectTool,
|
||||
dialogLineIntersect->getIdDetail());
|
||||
}
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ void MainWindow::ClosedDialogLineIntersect(int result){
|
|||
}
|
||||
|
||||
void MainWindow::ToolSpline(bool checked){
|
||||
SetToolButton(checked, Tools::SplineTool, ":/cursor/spline_cursor.png", dialogSpline,
|
||||
SetToolButton(checked, Tool::SplineTool, ":/cursor/spline_cursor.png", dialogSpline,
|
||||
&MainWindow::ClosedDialogSpline);
|
||||
}
|
||||
|
||||
|
@ -352,14 +352,14 @@ void MainWindow::ClosedDialogSpline(int result){
|
|||
VToolSpline::Create(dialogSpline, currentScene, doc, data);
|
||||
} else {
|
||||
VModelingSpline *spl = VModelingSpline::Create(dialogSpline, doc, data);
|
||||
AddToolToDetail(spl, spl->getId(), Tools::SplineTool, dialogSpline->getIdDetail());
|
||||
AddToolToDetail(spl, spl->getId(), Tool::SplineTool, dialogSpline->getIdDetail());
|
||||
}
|
||||
}
|
||||
ArrowTool();
|
||||
}
|
||||
|
||||
void MainWindow::ToolArc(bool checked){
|
||||
SetToolButton(checked, Tools::ArcTool, ":/cursor/arc_cursor.png", dialogArc,
|
||||
SetToolButton(checked, Tool::ArcTool, ":/cursor/arc_cursor.png", dialogArc,
|
||||
&MainWindow::ClosedDialogArc);
|
||||
}
|
||||
|
||||
|
@ -369,14 +369,14 @@ void MainWindow::ClosedDialogArc(int result){
|
|||
VToolArc::Create(dialogArc, currentScene, doc, data);
|
||||
} else {
|
||||
VModelingArc *arc = VModelingArc::Create(dialogArc, doc, data);
|
||||
AddToolToDetail(arc, arc->getId(), Tools::ArcTool, dialogArc->getIdDetail());
|
||||
AddToolToDetail(arc, arc->getId(), Tool::ArcTool, dialogArc->getIdDetail());
|
||||
}
|
||||
}
|
||||
ArrowTool();
|
||||
}
|
||||
|
||||
void MainWindow::ToolSplinePath(bool checked){
|
||||
SetToolButton(checked, Tools::SplinePathTool, ":/cursor/splinepath_cursor.png", dialogSplinePath,
|
||||
SetToolButton(checked, Tool::SplinePathTool, ":/cursor/splinepath_cursor.png", dialogSplinePath,
|
||||
&MainWindow::ClosedDialogSplinePath);
|
||||
}
|
||||
|
||||
|
@ -386,14 +386,14 @@ void MainWindow::ClosedDialogSplinePath(int result){
|
|||
VToolSplinePath::Create(dialogSplinePath, currentScene, doc, data);
|
||||
} else {
|
||||
VModelingSplinePath *spl = VModelingSplinePath::Create(dialogSplinePath, doc, data);
|
||||
AddToolToDetail(spl, spl->getId(), Tools::SplinePathTool, dialogSplinePath->getIdDetail());
|
||||
AddToolToDetail(spl, spl->getId(), Tool::SplinePathTool, dialogSplinePath->getIdDetail());
|
||||
}
|
||||
}
|
||||
ArrowTool();
|
||||
}
|
||||
|
||||
void MainWindow::ToolPointOfContact(bool checked){
|
||||
SetToolButton(checked, Tools::PointOfContact, ":/cursor/pointcontact_cursor.png", dialogPointOfContact,
|
||||
SetToolButton(checked, Tool::PointOfContact, ":/cursor/pointcontact_cursor.png", dialogPointOfContact,
|
||||
&MainWindow::ClosedDialogPointOfContact);
|
||||
}
|
||||
|
||||
|
@ -404,7 +404,7 @@ void MainWindow::ClosedDialogPointOfContact(int result){
|
|||
} else {
|
||||
VModelingPointOfContact *point = VModelingPointOfContact::Create(dialogPointOfContact, doc,
|
||||
data);
|
||||
AddToolToDetail(point, point->getId(), Tools::PointOfContact,
|
||||
AddToolToDetail(point, point->getId(), Tool::PointOfContact,
|
||||
dialogPointOfContact->getIdDetail());
|
||||
}
|
||||
}
|
||||
|
@ -414,7 +414,7 @@ void MainWindow::ClosedDialogPointOfContact(int result){
|
|||
void MainWindow::ToolDetail(bool checked){
|
||||
if(checked){
|
||||
CanselTool();
|
||||
tool = Tools::Detail;
|
||||
tool = Tool::Detail;
|
||||
QPixmap pixmap("://cursor/new_detail_cursor.png");
|
||||
QCursor cur(pixmap, 2, 3);
|
||||
view->setCursor(cur);
|
||||
|
@ -575,79 +575,79 @@ void MainWindow::mouseMove(QPointF scenePos){
|
|||
void MainWindow::CanselTool(){
|
||||
switch( tool )
|
||||
{
|
||||
case Tools::ArrowTool:
|
||||
case Tool::ArrowTool:
|
||||
ui->actionArrowTool->setChecked(false);
|
||||
break;
|
||||
case Tools::SinglePointTool:
|
||||
case Tool::SinglePointTool:
|
||||
//Nothing to do here because we can't create this tool from main window.
|
||||
break;
|
||||
case Tools::EndLineTool:
|
||||
case Tool::EndLineTool:
|
||||
dialogEndLine.clear();
|
||||
ui->toolButtonEndLine->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearSelection();
|
||||
break;
|
||||
case Tools::LineTool:
|
||||
case Tool::LineTool:
|
||||
dialogLine.clear();
|
||||
ui->toolButtonLine->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearFocus();
|
||||
break;
|
||||
case Tools::AlongLineTool:
|
||||
case Tool::AlongLineTool:
|
||||
dialogAlongLine.clear();
|
||||
ui->toolButtonAlongLine->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearSelection();
|
||||
break;
|
||||
case Tools::ShoulderPointTool:
|
||||
case Tool::ShoulderPointTool:
|
||||
dialogShoulderPoint.clear();
|
||||
ui->toolButtonShoulderPoint->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearSelection();
|
||||
break;
|
||||
case Tools::NormalTool:
|
||||
case Tool::NormalTool:
|
||||
dialogNormal.clear();
|
||||
ui->toolButtonNormal->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearSelection();
|
||||
break;
|
||||
case Tools::BisectorTool:
|
||||
case Tool::BisectorTool:
|
||||
dialogBisector.clear();
|
||||
ui->toolButtonBisector->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearSelection();
|
||||
break;
|
||||
case Tools::LineIntersectTool:
|
||||
case Tool::LineIntersectTool:
|
||||
dialogLineIntersect.clear();
|
||||
ui->toolButtonLineIntersect->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearSelection();
|
||||
break;
|
||||
case Tools::SplineTool:
|
||||
case Tool::SplineTool:
|
||||
dialogSpline.clear();
|
||||
ui->toolButtonSpline->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearSelection();
|
||||
break;
|
||||
case Tools::ArcTool:
|
||||
case Tool::ArcTool:
|
||||
dialogArc.clear();
|
||||
ui->toolButtonArc->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearSelection();
|
||||
break;
|
||||
case Tools::SplinePathTool:
|
||||
case Tool::SplinePathTool:
|
||||
dialogSplinePath.clear();
|
||||
ui->toolButtonSplinePath->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearSelection();
|
||||
break;
|
||||
case Tools::PointOfContact:
|
||||
case Tool::PointOfContact:
|
||||
dialogPointOfContact.clear();
|
||||
ui->toolButtonPointOfContact->setChecked(false);
|
||||
currentScene->setFocus(Qt::OtherFocusReason);
|
||||
currentScene->clearSelection();
|
||||
break;
|
||||
case Tools::Detail:
|
||||
case Tool::Detail:
|
||||
dialogDetail.clear();
|
||||
ui->toolButtonNewDetail->setChecked(false);
|
||||
break;
|
||||
|
@ -660,7 +660,7 @@ void MainWindow::CanselTool(){
|
|||
void MainWindow::ArrowTool(){
|
||||
CanselTool();
|
||||
ui->actionArrowTool->setChecked(true);
|
||||
tool = Tools::ArrowTool;
|
||||
tool = Tool::ArrowTool;
|
||||
QCursor cur(Qt::ArrowCursor);
|
||||
view->setCursor(cur);
|
||||
helpLabel->setText("");
|
||||
|
|
10
mainwindow.h
10
mainwindow.h
|
@ -113,7 +113,7 @@ protected:
|
|||
private:
|
||||
Q_DISABLE_COPY(MainWindow)
|
||||
Ui::MainWindow *ui;
|
||||
Tools::Enum tool;
|
||||
Tool::Tools tool;
|
||||
VMainGraphicsScene *currentScene;
|
||||
VMainGraphicsScene *sceneDraw;
|
||||
VMainGraphicsScene *sceneDetails;
|
||||
|
@ -140,7 +140,7 @@ private:
|
|||
QComboBox *comboBoxDraws;
|
||||
QString fileName;
|
||||
bool changeInFile;
|
||||
Draw::Mode mode;
|
||||
Draw::Draws mode;
|
||||
void ToolBarOption();
|
||||
void ToolBarDraws();
|
||||
void CanselTool();
|
||||
|
@ -148,12 +148,12 @@ private:
|
|||
void SetEnableWidgets(bool enable);
|
||||
void SetEnableTool(bool enable);
|
||||
template <typename Dialog, typename Func>
|
||||
void SetToolButton(bool checked, Tools::Enum t, const QString &cursor,
|
||||
void SetToolButton(bool checked, Tool::Tools t, const QString &cursor,
|
||||
QSharedPointer<Dialog> &dialog,
|
||||
Func closeDialogSlot);
|
||||
void MinimumScrollBar();
|
||||
template <typename Tool>
|
||||
void AddToolToDetail(Tool *tool, const qint64 &id, Tools::Enum typeTool,
|
||||
template <typename T>
|
||||
void AddToolToDetail(T *tool, const qint64 &id, Tool::Tools typeTool,
|
||||
const qint64 &idDetail);
|
||||
};
|
||||
|
||||
|
|
69
options.h
69
options.h
|
@ -22,7 +22,7 @@
|
|||
#ifndef OPTIONS_H
|
||||
#define OPTIONS_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QFlags>
|
||||
|
||||
#define PrintDPI 96
|
||||
#define PaperSize 50000
|
||||
|
@ -31,49 +31,40 @@
|
|||
#define widthMainLine toPixel(0.8)
|
||||
#define widthHairLine widthMainLine/3
|
||||
|
||||
|
||||
namespace Scene{
|
||||
enum Type
|
||||
{
|
||||
Point,
|
||||
Line,
|
||||
Spline,
|
||||
Arc,
|
||||
SplinePath,
|
||||
Detail
|
||||
};
|
||||
enum Scene { Point, Line, Spline, Arc, SplinePath, Detail };
|
||||
Q_DECLARE_FLAGS(Scenes, Scene)
|
||||
}
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS( Scene::Scenes )
|
||||
|
||||
namespace Tools{
|
||||
enum Enum
|
||||
{
|
||||
ArrowTool,
|
||||
SinglePointTool,
|
||||
EndLineTool,
|
||||
LineTool,
|
||||
AlongLineTool,
|
||||
ShoulderPointTool,
|
||||
NormalTool,
|
||||
BisectorTool,
|
||||
LineIntersectTool,
|
||||
SplineTool,
|
||||
ArcTool,
|
||||
SplinePathTool,
|
||||
PointOfContact,
|
||||
Detail,
|
||||
NodePoint,
|
||||
NodeArc,
|
||||
NodeSpline,
|
||||
NodeSplinePath
|
||||
};
|
||||
namespace Tool{
|
||||
enum Tool {ArrowTool,
|
||||
SinglePointTool,
|
||||
EndLineTool,
|
||||
LineTool,
|
||||
AlongLineTool,
|
||||
ShoulderPointTool,
|
||||
NormalTool,
|
||||
BisectorTool,
|
||||
LineIntersectTool,
|
||||
SplineTool,
|
||||
ArcTool,
|
||||
SplinePathTool,
|
||||
PointOfContact,
|
||||
Detail,
|
||||
NodePoint,
|
||||
NodeArc,
|
||||
NodeSpline,
|
||||
NodeSplinePath
|
||||
};
|
||||
Q_DECLARE_FLAGS(Tools, Tool)
|
||||
}
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS( Tool::Tools )
|
||||
|
||||
namespace Draw{
|
||||
enum Mode
|
||||
{
|
||||
Calculation,
|
||||
Modeling
|
||||
};
|
||||
namespace Draw {
|
||||
enum Draw { Calculation, Modeling };
|
||||
Q_DECLARE_FLAGS(Draws, Draw)
|
||||
}
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(Draw::Draws)
|
||||
|
||||
#endif // OPTIONS_H
|
||||
|
|
|
@ -36,7 +36,7 @@ VDrawTool::~VDrawTool(){
|
|||
void VDrawTool::setDialog(){
|
||||
}
|
||||
|
||||
void VDrawTool::AddRecord(const qint64 id, Tools::Enum toolType, VDomDocument *doc){
|
||||
void VDrawTool::AddRecord(const qint64 id, Tool::Tools toolType, VDomDocument *doc){
|
||||
qint64 cursor = doc->getCursor();
|
||||
QVector<VToolRecord> *history = doc->getHistory();
|
||||
if(cursor <= 0){
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
VDrawTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0);
|
||||
virtual ~VDrawTool();
|
||||
virtual void setDialog();
|
||||
static void AddRecord(const qint64 id, Tools::Enum toolType, VDomDocument *doc);
|
||||
static void AddRecord(const qint64 id, Tool::Tools toolType, VDomDocument *doc);
|
||||
void ignoreContextMenu(bool enable);
|
||||
public slots:
|
||||
virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
|
||||
|
|
|
@ -112,7 +112,7 @@ void VToolAlongLine::Create(QSharedPointer<DialogAlongLine> &dialog, VMainGraphi
|
|||
void VToolAlongLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
||||
const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation){
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VPointF firstPoint = data->GetPoint(firstPointId);
|
||||
VPointF secondPoint = data->GetPoint(secondPointId);
|
||||
QLineF line = QLineF(firstPoint.toQPointF(), secondPoint.toQPointF());
|
||||
|
@ -135,7 +135,7 @@ void VToolAlongLine::Create(const qint64 _id, const QString &pointName, const QS
|
|||
}
|
||||
}
|
||||
}
|
||||
VDrawTool::AddRecord(id, Tools::AlongLineTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::AlongLineTool, doc);
|
||||
data->AddLine(firstPointId, id);
|
||||
data->AddLine(id, secondPointId);
|
||||
if(parse == Document::FullParse){
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
static void Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
||||
const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation);
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -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,
|
||||
const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation){
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;
|
||||
|
||||
Calculator cal(data);
|
||||
|
@ -100,7 +100,7 @@ void VToolArc::Create(const qint64 _id, const qint64 ¢er, const QString &rad
|
|||
}
|
||||
}
|
||||
data->AddLengthArc(data->GetNameArc(center,id), arc.GetLength());
|
||||
VDrawTool::AddRecord(id, Tools::ArcTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::ArcTool, doc);
|
||||
if(parse == Document::FullParse){
|
||||
VToolArc *toolArc = new VToolArc(doc, data, id, typeCreation);
|
||||
scene->addItem(toolArc);
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
VContainer *data);
|
||||
static void Create(const qint64 _id, const qint64 ¢er, const QString &radius,
|
||||
const QString &f1, const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation);
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -78,7 +78,7 @@ void VToolBisector::Create(const qint64 _id, const QString &formula, const qint6
|
|||
const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
|
||||
const QString &pointName, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
||||
Document::Enum parse, Tool::Enum typeCreation){
|
||||
const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VPointF firstPoint = data->GetPoint(firstPointId);
|
||||
VPointF secondPoint = data->GetPoint(secondPointId);
|
||||
VPointF thirdPoint = data->GetPoint(thirdPointId);
|
||||
|
@ -104,7 +104,7 @@ void VToolBisector::Create(const qint64 _id, const QString &formula, const qint6
|
|||
}
|
||||
}
|
||||
data->AddLine(firstPointId, id);
|
||||
VDrawTool::AddRecord(id, Tools::BisectorTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::BisectorTool, doc);
|
||||
if(parse == Document::FullParse){
|
||||
VToolBisector *point = new VToolBisector(doc, data, id, typeLine, formula,
|
||||
firstPointId, secondPointId, thirdPointId,
|
||||
|
|
|
@ -41,7 +41,8 @@ public:
|
|||
static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
|
||||
const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
|
||||
const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse, Tool::Enum typeCreation);
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -61,7 +61,7 @@ void VToolEndLine::Create(QSharedPointer<DialogEndLine> &dialog, VMainGraphicsSc
|
|||
void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
||||
const QString &formula, const qreal &angle, const qint64 &basePointId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation){
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
|
||||
VPointF basePoint = data->GetPoint(basePointId);
|
||||
QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y()));
|
||||
|
@ -86,7 +86,7 @@ void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QStr
|
|||
}
|
||||
}
|
||||
data->AddLine(basePointId, id);
|
||||
VDrawTool::AddRecord(id, Tools::EndLineTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::EndLineTool, doc);
|
||||
if(parse == Document::FullParse){
|
||||
VToolEndLine *point = new VToolEndLine(doc, data, id, typeLine, formula, angle,
|
||||
basePointId, typeCreation);
|
||||
|
|
|
@ -39,8 +39,8 @@ public:
|
|||
VContainer *data);
|
||||
static void Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
||||
const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
Tool::Enum typeCreation);
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
||||
const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -53,7 +53,7 @@ void VToolLine::Create(QSharedPointer<DialogLine> &dialog, VMainGraphicsScene *s
|
|||
}
|
||||
|
||||
void VToolLine::Create(const qint64 &id, const qint64 &firstPoint, const qint64 &secondPoint,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
Q_CHECK_PTR(scene);
|
||||
Q_CHECK_PTR(doc);
|
||||
|
@ -66,7 +66,7 @@ void VToolLine::Create(const qint64 &id, const qint64 &firstPoint, const qint64
|
|||
Q_CHECK_PTR(tool);
|
||||
tool->VDataTool::setData(data);
|
||||
}
|
||||
VDrawTool::AddRecord(id, Tools::LineTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::LineTool, doc);
|
||||
if(parse == Document::FullParse){
|
||||
qint64 id = data->getNextId();
|
||||
VToolLine *line = new VToolLine(doc, data, id, firstPoint, secondPoint, typeCreation);
|
||||
|
|
|
@ -36,8 +36,8 @@ public:
|
|||
static void Create(QSharedPointer<DialogLine> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||
VContainer *data);
|
||||
static void Create(const qint64 &id, const qint64 &firstPoint, const qint64 &secondPoint,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
Tool::Enum typeCreation);
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
||||
const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void ChangedActivDraw(const QString newName);
|
||||
|
|
|
@ -58,7 +58,7 @@ void VToolLineIntersect::Create(QSharedPointer<DialogLineIntersect> &dialog, VMa
|
|||
void VToolLineIntersect::Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id,
|
||||
const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation){
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VPointF p1Line1 = data->GetPoint(p1Line1Id);
|
||||
VPointF p2Line1 = data->GetPoint(p2Line1Id);
|
||||
VPointF p1Line2 = data->GetPoint(p1Line2Id);
|
||||
|
@ -87,7 +87,7 @@ void VToolLineIntersect::Create(const qint64 _id, const qint64 &p1Line1Id, const
|
|||
data->AddLine(id, p2Line1Id);
|
||||
data->AddLine(p1Line2Id, id);
|
||||
data->AddLine(id, p2Line2Id);
|
||||
VDrawTool::AddRecord(id, Tools::LineIntersectTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::LineIntersectTool, doc);
|
||||
if(parse == Document::FullParse){
|
||||
VToolLineIntersect *point = new VToolLineIntersect(doc, data, id, p1Line1Id,
|
||||
p2Line1Id, p1Line2Id,
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
static void Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id,
|
||||
const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation);
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -63,7 +63,7 @@ void VToolNormal::Create(QSharedPointer<DialogNormal> &dialog, VMainGraphicsScen
|
|||
void VToolNormal::Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
|
||||
const qint64 &secondPointId, const QString typeLine, const QString pointName,
|
||||
const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse, Tool::Enum typeCreation){
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VPointF firstPoint = data->GetPoint(firstPointId);
|
||||
VPointF secondPoint = data->GetPoint(secondPointId);
|
||||
Calculator cal(data);
|
||||
|
@ -87,7 +87,7 @@ void VToolNormal::Create(const qint64 _id, const QString &formula, const qint64
|
|||
}
|
||||
}
|
||||
data->AddLine(firstPointId, id);
|
||||
VDrawTool::AddRecord(id, Tools::NormalTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::NormalTool, doc);
|
||||
if(parse == Document::FullParse){
|
||||
VToolNormal *point = new VToolNormal(doc, data, id, typeLine, formula, angle,
|
||||
firstPointId, secondPointId, typeCreation);
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
|
||||
const qint64 &secondPointId, const QString typeLine, const QString pointName,
|
||||
const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse, Tool::Enum typeCreation);
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
|
||||
const qreal &length, const qreal &angle = 0);
|
||||
public slots:
|
||||
|
|
|
@ -82,7 +82,7 @@ void VToolPointOfContact::Create(const qint64 _id, const QString &radius, const
|
|||
const qint64 &firstPointId, const qint64 &secondPointId,
|
||||
const QString &pointName, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
||||
Document::Enum parse, Tool::Enum typeCreation){
|
||||
const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VPointF centerP = data->GetPoint(center);
|
||||
VPointF firstP = data->GetPoint(firstPointId);
|
||||
VPointF secondP = data->GetPoint(secondPointId);
|
||||
|
@ -107,7 +107,7 @@ void VToolPointOfContact::Create(const qint64 _id, const QString &radius, const
|
|||
}
|
||||
}
|
||||
}
|
||||
VDrawTool::AddRecord(id, Tools::PointOfContact, doc);
|
||||
VDrawTool::AddRecord(id, Tool::PointOfContact, doc);
|
||||
if(parse == Document::FullParse){
|
||||
VToolPointOfContact *point = new VToolPointOfContact(doc, data, id, radius, center,
|
||||
firstPointId, secondPointId, typeCreation);
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
static void Create(const qint64 _id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId,
|
||||
const qint64 &secondPointId, const QString &pointName,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation);
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -86,7 +86,7 @@ void VToolShoulderPoint::Create(const qint64 _id, const QString &formula, const
|
|||
const qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine,
|
||||
const QString &pointName, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data,
|
||||
Document::Enum parse, Tool::Enum typeCreation){
|
||||
const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VPointF firstPoint = data->GetPoint(p1Line);
|
||||
VPointF secondPoint = data->GetPoint(p2Line);
|
||||
VPointF shoulderPoint = data->GetPoint(pShoulder);
|
||||
|
@ -113,7 +113,7 @@ void VToolShoulderPoint::Create(const qint64 _id, const QString &formula, const
|
|||
}
|
||||
data->AddLine(p1Line, id);
|
||||
data->AddLine(p2Line, id);
|
||||
VDrawTool::AddRecord(id, Tools::ShoulderPointTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::ShoulderPointTool, doc);
|
||||
if(parse == Document::FullParse){
|
||||
VToolShoulderPoint *point = new VToolShoulderPoint(doc, data, id, typeLine, formula,
|
||||
p1Line, p2Line, pShoulder,
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
static void Create(const qint64 _id, const QString &formula, const qint64 &p1Line, const qint64 &p2Line,
|
||||
const qint64 &pShoulder, const QString &typeLine, const QString &pointName,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation);
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -89,7 +89,7 @@ void VToolSpline::Create(QSharedPointer<DialogSpline> &dialog, VMainGraphicsScen
|
|||
|
||||
void VToolSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
|
||||
const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
VSpline spline = VSpline(data->DataPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve);
|
||||
qint64 id = _id;
|
||||
|
@ -107,7 +107,7 @@ void VToolSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, c
|
|||
}
|
||||
}
|
||||
data->AddLengthSpline(data->GetNameSpline(p1, p4), spline.GetLength());
|
||||
VDrawTool::AddRecord(id, Tools::SplineTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::SplineTool, doc);
|
||||
if(parse == Document::FullParse){
|
||||
VToolSpline *spl = new VToolSpline(doc, data, id, typeCreation);
|
||||
scene->addItem(spl);
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
VContainer *data);
|
||||
static void Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
|
||||
const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation);
|
||||
signals:
|
||||
void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position,
|
||||
|
|
|
@ -74,7 +74,7 @@ void VToolSplinePath::Create(QSharedPointer<DialogSplinePath> &dialog, VMainGrap
|
|||
}
|
||||
|
||||
void VToolSplinePath::Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
qint64 id = _id;
|
||||
if(typeCreation == Tool::FromGui){
|
||||
|
@ -91,7 +91,7 @@ void VToolSplinePath::Create(const qint64 _id, const VSplinePath &path, VMainGra
|
|||
}
|
||||
}
|
||||
data->AddLengthSpline(data->GetNameSplinePath(path), path.GetLength());
|
||||
VDrawTool::AddRecord(id, Tools::SplinePathTool, doc);
|
||||
VDrawTool::AddRecord(id, Tool::SplinePathTool, doc);
|
||||
if(parse == Document::FullParse){
|
||||
VToolSplinePath *spl = new VToolSplinePath(doc, data, id, typeCreation);
|
||||
scene->addItem(spl);
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
static void Create(QSharedPointer<DialogSplinePath> &dialog, VMainGraphicsScene *scene,
|
||||
VDomDocument *doc, VContainer *data);
|
||||
static void Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse, Tool::Enum typeCreation);
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
signals:
|
||||
void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos,
|
||||
const QPointF &controlPoint, const QPointF &splinePoint);
|
||||
|
|
|
@ -113,7 +113,7 @@ VModelingAlongLine *VModelingAlongLine::Create(const qint64 _id, const QString &
|
|||
const QString &typeLine, const QString &formula,
|
||||
const qint64 &firstPointId, const qint64 &secondPointId,
|
||||
const qreal &mx, const qreal &my, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse,
|
||||
VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
VModelingAlongLine *point = 0;
|
||||
VPointF firstPoint = data->GetModelingPoint(firstPointId);
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
static VModelingAlongLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
||||
const QString &formula, const qint64 &firstPointId,
|
||||
const qint64 &secondPointId, const qreal &mx, const qreal &my,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
|
|
|
@ -61,7 +61,7 @@ VModelingArc* VModelingArc::Create(QSharedPointer<DialogArc> &dialog, VDomDocume
|
|||
|
||||
VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius,
|
||||
const QString &f1, const QString &f2, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation){
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VModelingArc *toolArc = 0;
|
||||
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
static VModelingArc* Create(QSharedPointer<DialogArc> &dialog, VDomDocument *doc, VContainer *data);
|
||||
static VModelingArc* Create(const qint64 _id, const qint64 ¢er, const QString &radius,
|
||||
const QString &f1, const QString &f2, VDomDocument *doc, VContainer *data,
|
||||
Document::Enum parse, Tool::Enum typeCreation);
|
||||
const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -78,7 +78,7 @@ VModelingBisector *VModelingBisector::Create(const qint64 _id, const QString &fo
|
|||
const qint64 &firstPointId, const qint64 &secondPointId,
|
||||
const qint64 &thirdPointId, const QString &typeLine,
|
||||
const QString &pointName, const qreal &mx, const qreal &my,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
VModelingBisector *point = 0;
|
||||
VPointF firstPoint = data->GetModelingPoint(firstPointId);
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
const qint64 &secondPointId, const qint64 &thirdPointId,
|
||||
const QString &typeLine, const QString &pointName, const qreal &mx,
|
||||
const qreal &my, VDomDocument *doc, VContainer *data,
|
||||
Document::Enum parse, Tool::Enum typeCreation);
|
||||
const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -62,7 +62,7 @@ VModelingEndLine *VModelingEndLine::Create(const qint64 _id, const QString &poin
|
|||
const QString &typeLine, const QString &formula,
|
||||
const qreal &angle, const qint64 &basePointId, const qreal &mx,
|
||||
const qreal &my, VDomDocument *doc, VContainer *data,
|
||||
Document::Enum parse, Tool::Enum typeCreation){
|
||||
const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VModelingEndLine *point = 0;
|
||||
VPointF basePoint = data->GetModelingPoint(basePointId);
|
||||
QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y()));
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
static VModelingEndLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine,
|
||||
const QString &formula, const qreal &angle, const qint64 &basePointId,
|
||||
const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data,
|
||||
Document::Enum parse, Tool::Enum typeCreation);
|
||||
const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -53,7 +53,7 @@ VModelingLine *VModelingLine::Create(QSharedPointer<DialogLine> &dialog, VDomDoc
|
|||
}
|
||||
|
||||
VModelingLine *VModelingLine::Create(const qint64 &id, const qint64 &firstPoint, const qint64 &secondPoint,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
VModelingLine *line = 0;
|
||||
Q_CHECK_PTR(doc);
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
virtual void setDialog();
|
||||
static VModelingLine* Create(QSharedPointer<DialogLine> &dialog, VDomDocument *doc, VContainer *data);
|
||||
static VModelingLine* Create(const qint64 &id, const qint64 &firstPoint, const qint64 &secondPoint,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
|
|
|
@ -59,7 +59,7 @@ VModelingLineIntersect *VModelingLineIntersect::Create(const qint64 _id, const q
|
|||
const qint64 &p2Line1Id, const qint64 &p1Line2Id,
|
||||
const qint64 &p2Line2Id, const QString &pointName,
|
||||
const qreal &mx, const qreal &my, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse,
|
||||
VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
VModelingLineIntersect *point = 0;
|
||||
VPointF p1Line1 = data->GetModelingPoint(p1Line1Id);
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
static VModelingLineIntersect* Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id,
|
||||
const qint64 &p1Line2Id, const qint64 &p2Line2Id,
|
||||
const QString &pointName, const qreal &mx, const qreal &my,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
|
|
|
@ -64,7 +64,7 @@ VModelingNormal *VModelingNormal::Create(const qint64 _id, const QString &formul
|
|||
const qint64 &firstPointId, const qint64 &secondPointId,
|
||||
const QString typeLine, const QString pointName,
|
||||
const qreal angle, const qreal &mx, const qreal &my,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
VModelingNormal *point = 0;
|
||||
VPointF firstPoint = data->GetModelingPoint(firstPointId);
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
static VModelingNormal* Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
|
||||
const qint64 &secondPointId, const QString typeLine,
|
||||
const QString pointName, const qreal angle, const qreal &mx,
|
||||
const qreal &my, VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation);
|
||||
static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint,
|
||||
const qreal &length, const qreal &angle = 0);
|
||||
|
|
|
@ -83,7 +83,7 @@ VModelingPointOfContact *VModelingPointOfContact::Create(const qint64 _id, const
|
|||
const qint64 &secondPointId,
|
||||
const QString &pointName, const qreal &mx,
|
||||
const qreal &my, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse,
|
||||
VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
VModelingPointOfContact *point = 0;
|
||||
VPointF centerP = data->GetModelingPoint(center);
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
static VModelingPointOfContact* Create(const qint64 _id, const QString &radius, const qint64 ¢er,
|
||||
const qint64 &firstPointId, const qint64 &secondPointId,
|
||||
const QString &pointName, const qreal &mx, const qreal &my,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
|
|
|
@ -87,7 +87,7 @@ VModelingShoulderPoint *VModelingShoulderPoint::Create(const qint64 _id, const Q
|
|||
const qint64 &pShoulder, const QString &typeLine,
|
||||
const QString &pointName, const qreal &mx,
|
||||
const qreal &my, VDomDocument *doc, VContainer *data,
|
||||
Document::Enum parse, Tool::Enum typeCreation){
|
||||
const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VModelingShoulderPoint *point = 0;
|
||||
VPointF firstPoint = data->GetModelingPoint(p1Line);
|
||||
VPointF secondPoint = data->GetModelingPoint(p2Line);
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
const qint64 &p2Line, const qint64 &pShoulder,
|
||||
const QString &typeLine, const QString &pointName,
|
||||
const qreal &mx, const qreal &my, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation);
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
|
|
|
@ -90,7 +90,7 @@ VModelingSpline *VModelingSpline::Create(QSharedPointer<DialogSpline> &dialog, V
|
|||
VModelingSpline *VModelingSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4,
|
||||
const qreal &kAsm1, const qreal kAsm2, const qreal &angle1,
|
||||
const qreal &angle2, const qreal &kCurve, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation){
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VModelingSpline *spl = 0;
|
||||
VSpline spline = VSpline(data->DataModelingPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve);
|
||||
qint64 id = _id;
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
static VModelingSpline* Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
|
||||
const qreal kAsm2, const qreal &angle1, const qreal &angle2,
|
||||
const qreal &kCurve, VDomDocument *doc, VContainer *data,
|
||||
Document::Enum parse, Tool::Enum typeCreation);
|
||||
const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
signals:
|
||||
void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position,
|
||||
const QPointF &controlPoint, const QPointF &splinePoint );
|
||||
|
|
|
@ -74,7 +74,7 @@ VModelingSplinePath *VModelingSplinePath::Create(QSharedPointer<DialogSplinePath
|
|||
}
|
||||
|
||||
VModelingSplinePath * VModelingSplinePath::Create(const qint64 _id, const VSplinePath &path,
|
||||
VDomDocument *doc, VContainer *data, Document::Enum parse,
|
||||
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
VModelingSplinePath *spl = 0;
|
||||
qint64 id = _id;
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
static VModelingSplinePath* Create(QSharedPointer<DialogSplinePath> &dialog,
|
||||
VDomDocument *doc, VContainer *data);
|
||||
static VModelingSplinePath* Create(const qint64 _id, const VSplinePath &path, VDomDocument *doc,
|
||||
VContainer *data, Document::Enum parse, Tool::Enum typeCreation);
|
||||
VContainer *data, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
signals:
|
||||
void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos,
|
||||
const QPointF &controlPoint, const QPointF &splinePoint);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <QDebug>
|
||||
|
||||
VAbstractNode::VAbstractNode(VDomDocument *doc, VContainer *data, qint64 id, qint64 idNode,
|
||||
Draw::Mode typeobject, QObject *parent) :
|
||||
Draw::Draws typeobject, QObject *parent) :
|
||||
VAbstractTool(doc, data, id, parent), idNode(idNode), typeobject(typeobject){
|
||||
}
|
||||
|
||||
|
|
|
@ -29,11 +29,11 @@ class VAbstractNode : public VAbstractTool
|
|||
Q_OBJECT
|
||||
public:
|
||||
VAbstractNode(VDomDocument *doc, VContainer *data, qint64 id, qint64 idNode,
|
||||
Draw::Mode typeobject, QObject *parent = 0 );
|
||||
Draw::Draws typeobject, QObject *parent = 0 );
|
||||
virtual ~VAbstractNode();
|
||||
protected:
|
||||
qint64 idNode;
|
||||
Draw::Mode typeobject;
|
||||
Draw::Draws typeobject;
|
||||
void AddToModeling(const QDomElement &domElement);
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "vnodearc.h"
|
||||
|
||||
VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Mode typeobject,
|
||||
VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject,
|
||||
Tool::Enum typeCreation, QGraphicsItem * parent) :
|
||||
VAbstractNode(doc, data, id, idArc, typeobject), QGraphicsPathItem(parent){
|
||||
RefreshGeometry();
|
||||
|
@ -35,7 +35,7 @@ VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc,
|
|||
}
|
||||
|
||||
VNodeArc *VNodeArc::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc,
|
||||
Draw::Mode typeobject, Document::Enum parse, Tool::Enum typeCreation){
|
||||
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VNodeArc *arc = 0;
|
||||
if(parse == Document::FullParse){
|
||||
arc = new VNodeArc(doc, data, id, idArc, typeobject, typeCreation);
|
||||
|
|
|
@ -29,10 +29,10 @@ class VNodeArc :public VAbstractNode, public QGraphicsPathItem
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Mode typeobject,
|
||||
VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject,
|
||||
Tool::Enum typeCreation, QGraphicsItem * parent = 0);
|
||||
static VNodeArc *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc,
|
||||
Draw::Mode typeobject, Document::Enum parse, Tool::Enum typeCreation);
|
||||
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "vnodepoint.h"
|
||||
|
||||
VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint,
|
||||
Draw::Mode typeobject, Tool::Enum typeCreation, QGraphicsItem *parent)
|
||||
Draw::Draws typeobject, Tool::Enum typeCreation, QGraphicsItem *parent)
|
||||
:VAbstractNode(doc, data, id, idPoint, typeobject), QGraphicsEllipseItem(parent),
|
||||
radius(toPixel(1.5)), namePoint(0), lineName(0){
|
||||
namePoint = new VGraphicsSimpleTextItem(this);
|
||||
|
@ -40,7 +40,7 @@ VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 id
|
|||
}
|
||||
|
||||
VNodePoint *VNodePoint::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint,
|
||||
Draw::Mode typeobject, Document::Enum parse, Tool::Enum typeCreation){
|
||||
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VNodePoint *point = 0;
|
||||
if(parse == Document::FullParse){
|
||||
point = new VNodePoint(doc, data, id, idPoint, typeobject, typeCreation);
|
||||
|
|
|
@ -29,10 +29,10 @@ class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Mode typeobject,
|
||||
VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject,
|
||||
Tool::Enum typeCreation, QGraphicsItem * parent = 0 );
|
||||
static VNodePoint *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint,
|
||||
Draw::Mode typeobject, Document::Enum parse, Tool::Enum typeCreation);
|
||||
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
void NameChangePosition(const QPointF pos);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "vnodespline.h"
|
||||
|
||||
VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
|
||||
Draw::Mode typeobject, Tool::Enum typeCreation, QGraphicsItem * parent) :
|
||||
Draw::Draws typeobject, Tool::Enum typeCreation, QGraphicsItem * parent) :
|
||||
VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent){
|
||||
RefreshGeometry();
|
||||
this->setPen(QPen(baseColor, widthHairLine));
|
||||
|
@ -35,7 +35,7 @@ VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64
|
|||
}
|
||||
|
||||
VNodeSpline *VNodeSpline::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
|
||||
Draw::Mode typeobject, Document::Enum parse, Tool::Enum typeCreation){
|
||||
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation){
|
||||
VNodeSpline *spl = 0;
|
||||
if(parse == Document::FullParse){
|
||||
spl = new VNodeSpline(doc, data, id, idSpline, typeobject, typeCreation);
|
||||
|
|
|
@ -29,10 +29,10 @@ class VNodeSpline:public VAbstractNode, public QGraphicsPathItem
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Mode typeobject,
|
||||
VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject,
|
||||
Tool::Enum typeCreation, QGraphicsItem * parent = 0);
|
||||
static VNodeSpline *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
|
||||
Draw::Mode typeobject, Document::Enum parse, Tool::Enum typeCreation);
|
||||
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile ();
|
||||
protected:
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "vnodesplinepath.h"
|
||||
|
||||
VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
|
||||
Draw::Mode typeobject, Tool::Enum typeCreation,
|
||||
Draw::Draws typeobject, Tool::Enum typeCreation,
|
||||
QGraphicsItem * parent) :
|
||||
VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent){
|
||||
RefreshGeometry();
|
||||
|
@ -36,7 +36,7 @@ VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id,
|
|||
}
|
||||
|
||||
VNodeSplinePath *VNodeSplinePath::Create(VDomDocument *doc, VContainer *data, qint64 id,
|
||||
qint64 idSpline, Draw::Mode typeobject, Document::Enum parse,
|
||||
qint64 idSpline, Draw::Draws typeobject, const Document::Documents &parse,
|
||||
Tool::Enum typeCreation){
|
||||
VNodeSplinePath *splPath = 0;
|
||||
if(parse == Document::FullParse){
|
||||
|
|
|
@ -30,9 +30,9 @@ class VNodeSplinePath : public VAbstractNode, public QGraphicsPathItem
|
|||
Q_OBJECT
|
||||
public:
|
||||
VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
|
||||
Draw::Mode typeobject, Tool::Enum typeCreation, QGraphicsItem * parent = 0);
|
||||
Draw::Draws typeobject, Tool::Enum typeCreation, QGraphicsItem * parent = 0);
|
||||
static VNodeSplinePath *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline,
|
||||
Draw::Mode typeobject, Document::Enum parse, Tool::Enum typeCreation);
|
||||
Draw::Draws typeobject, const Document::Documents &parse, Tool::Enum typeCreation);
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
protected:
|
||||
|
|
|
@ -51,7 +51,7 @@ public slots:
|
|||
virtual void FullUpdateFromFile()=0;
|
||||
signals:
|
||||
void toolhaveChange();
|
||||
void ChoosedTool(qint64 id, Scene::Type type);
|
||||
void ChoosedTool(qint64 id, Scene::Scenes type);
|
||||
void FullUpdateTree();
|
||||
protected:
|
||||
VDomDocument *doc;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user