Refactoring.

--HG--
branch : develop
This commit is contained in:
dismine 2013-10-26 20:55:06 +03:00
parent d20667f056
commit b42bc9560a
49 changed files with 260 additions and 614 deletions

View File

@ -24,27 +24,21 @@
#include <QString> #include <QString>
class VIncrementTableRow class VIncrementTableRow{
{
public: public:
VIncrementTableRow(); VIncrementTableRow();
VIncrementTableRow(qint64 id, qreal base, qreal ksize, qreal kgrowth, VIncrementTableRow(qint64 id, qreal base, qreal ksize, qreal kgrowth,
QString description = QString()); QString description = QString());
qint64 getId() const; qint64 getId() const;
void setId(const qint64 &value); void setId(const qint64 &value);
qreal getBase() const; qreal getBase() const;
void setBase(const qreal &value); void setBase(const qreal &value);
qreal getKsize() const; qreal getKsize() const;
void setKsize(const qreal &value); void setKsize(const qreal &value);
qreal getKgrowth() const; qreal getKgrowth() const;
void setKgrowth(const qreal &value); void setKgrowth(const qreal &value);
QString getDescription() const; QString getDescription() const;
void setDescription(const QString &value); void setDescription(const QString &value);
private: private:
qint64 id; qint64 id;
qreal base; qreal base;

View File

@ -24,8 +24,7 @@
#include <QString> #include <QString>
class VStandartTableCell class VStandartTableCell{
{
public: public:
VStandartTableCell(); VStandartTableCell();
VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description = QString()); VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description = QString());

View File

@ -121,44 +121,24 @@ void DialogAlongLine::DialogAccepted(){
emit DialogClosed(QDialog::Accepted); emit DialogClosed(QDialog::Accepted);
} }
qint64 DialogAlongLine::getSecondPointId() const{
return secondPointId;
}
void DialogAlongLine::setSecondPointId(const qint64 &value, const qint64 &id){ void DialogAlongLine::setSecondPointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
} }
qint64 DialogAlongLine::getFirstPointId() const{
return firstPointId;
}
void DialogAlongLine::setFirstPointId(const qint64 &value, const qint64 &id){ void DialogAlongLine::setFirstPointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id); setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
} }
QString DialogAlongLine::getFormula() const{
return formula;
}
void DialogAlongLine::setFormula(const QString &value){ void DialogAlongLine::setFormula(const QString &value){
formula = value; formula = value;
ui->lineEditFormula->setText(formula); ui->lineEditFormula->setText(formula);
} }
QString DialogAlongLine::getTypeLine() const{
return typeLine;
}
void DialogAlongLine::setTypeLine(const QString &value){ void DialogAlongLine::setTypeLine(const QString &value){
typeLine = value; typeLine = value;
SetupTypeLine(ui->comboBoxLineType, value); SetupTypeLine(ui->comboBoxLineType, value);
} }
QString DialogAlongLine::getPointName() const{
return pointName;
}
void DialogAlongLine::setPointName(const QString &value){ void DialogAlongLine::setPointName(const QString &value){
pointName = value; pointName = value;
ui->lineEditNamePoint->setText(pointName); ui->lineEditNamePoint->setText(pointName);

View File

@ -23,28 +23,26 @@
#define DIALOGALONGLINE_H #define DIALOGALONGLINE_H
#include "dialogtool.h" #include "dialogtool.h"
#include "container/calculator.h"
namespace Ui { namespace Ui {
class DialogAlongLine; class DialogAlongLine;
} }
class DialogAlongLine : public DialogTool class DialogAlongLine : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogAlongLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, DialogAlongLine(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogAlongLine(); ~DialogAlongLine();
QString getPointName() const; inline QString getPointName() const {return pointName;}
void setPointName(const QString &value); void setPointName(const QString &value);
QString getTypeLine() const; inline QString getTypeLine() const {return typeLine;}
void setTypeLine(const QString &value); void setTypeLine(const QString &value);
QString getFormula() const; inline QString getFormula() const {return formula;}
void setFormula(const QString &value); void setFormula(const QString &value);
qint64 getFirstPointId() const; inline qint64 getFirstPointId() const {return firstPointId;}
void setFirstPointId(const qint64 &value, const qint64 &id); void setFirstPointId(const qint64 &value, const qint64 &id);
qint64 getSecondPointId() const; inline qint64 getSecondPointId() const {return secondPointId;}
void setSecondPointId(const qint64 &value, const qint64 &id); void setSecondPointId(const qint64 &value, const qint64 &id);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -21,7 +21,6 @@
#include "dialogarc.h" #include "dialogarc.h"
#include "ui_dialogarc.h" #include "ui_dialogarc.h"
#include "../container/calculator.h"
DialogArc::DialogArc(const VContainer *data, Draw::Draws 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), DialogTool(data, mode, parent), ui(new Ui::DialogArc), flagRadius(false), flagF1(false), flagF2(false),
@ -78,8 +77,8 @@ DialogArc::DialogArc(const VContainer *data, Draw::Draws mode, QWidget *parent)
connect(ui->lineEditF2, &QLineEdit::textChanged, this, &DialogArc::F2Changed); connect(ui->lineEditF2, &QLineEdit::textChanged, this, &DialogArc::F2Changed);
} }
qint64 DialogArc::GetCenter() const{ DialogArc::~DialogArc(){
return center; delete ui;
} }
void DialogArc::SetCenter(const qint64 &value){ void DialogArc::SetCenter(const qint64 &value){
@ -87,37 +86,21 @@ void DialogArc::SetCenter(const qint64 &value){
ChangeCurrentData(ui->comboBoxBasePoint, center); ChangeCurrentData(ui->comboBoxBasePoint, center);
} }
QString DialogArc::GetF2() const{
return f2;
}
void DialogArc::SetF2(const QString &value){ void DialogArc::SetF2(const QString &value){
f2 = value; f2 = value;
ui->lineEditF2->setText(f2); ui->lineEditF2->setText(f2);
} }
QString DialogArc::GetF1() const{
return f1;
}
void DialogArc::SetF1(const QString &value){ void DialogArc::SetF1(const QString &value){
f1 = value; f1 = value;
ui->lineEditF1->setText(f1); ui->lineEditF1->setText(f1);
} }
QString DialogArc::GetRadius() const{
return radius;
}
void DialogArc::SetRadius(const QString &value){ void DialogArc::SetRadius(const QString &value){
radius = value; radius = value;
ui->lineEditRadius->setText(radius); ui->lineEditRadius->setText(radius);
} }
DialogArc::~DialogArc(){
delete ui;
}
void DialogArc::ChoosedObject(qint64 id, Scene::Scenes type){ void DialogArc::ChoosedObject(qint64 id, Scene::Scenes type){
if(idDetail == 0 && mode == Draw::Modeling){ if(idDetail == 0 && mode == Draw::Modeling){
if(type == Scene::Detail){ if(type == Scene::Detail){

View File

@ -28,24 +28,19 @@ namespace Ui {
class DialogArc; class DialogArc;
} }
class DialogArc : public DialogTool class DialogArc : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogArc(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); DialogArc(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0);
~DialogArc(); ~DialogArc();
qint64 GetCenter() const; inline qint64 GetCenter() const {return center;}
void SetCenter(const qint64 &value); void SetCenter(const qint64 &value);
inline QString GetRadius() const {return radius;}
QString GetRadius() const;
void SetRadius(const QString &value); void SetRadius(const QString &value);
inline QString GetF1() const {return f1;}
QString GetF1() const;
void SetF1(const QString &value); void SetF1(const QString &value);
inline QString GetF2() const {return f2;}
QString GetF2() const;
void SetF2(const QString &value); void SetF2(const QString &value);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);
virtual void DialogAccepted(); virtual void DialogAccepted();

View File

@ -121,53 +121,29 @@ void DialogBisector::ChoosedObject(qint64 id, Scene::Scenes type){
} }
} }
QString DialogBisector::getPointName() const{
return pointName;
}
void DialogBisector::setPointName(const QString &value){ void DialogBisector::setPointName(const QString &value){
pointName = value; pointName = value;
ui->lineEditNamePoint->setText(pointName); ui->lineEditNamePoint->setText(pointName);
} }
QString DialogBisector::getTypeLine() const{
return typeLine;
}
void DialogBisector::setTypeLine(const QString &value){ void DialogBisector::setTypeLine(const QString &value){
typeLine = value; typeLine = value;
SetupTypeLine(ui->comboBoxLineType, value); SetupTypeLine(ui->comboBoxLineType, value);
} }
QString DialogBisector::getFormula() const{
return formula;
}
void DialogBisector::setFormula(const QString &value){ void DialogBisector::setFormula(const QString &value){
formula = value; formula = value;
ui->lineEditFormula->setText(formula); ui->lineEditFormula->setText(formula);
} }
qint64 DialogBisector::getFirstPointId() const{
return firstPointId;
}
void DialogBisector::setFirstPointId(const qint64 &value, const qint64 &id){ void DialogBisector::setFirstPointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id); setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
} }
qint64 DialogBisector::getSecondPointId() const{
return secondPointId;
}
void DialogBisector::setSecondPointId(const qint64 &value, const qint64 &id){ void DialogBisector::setSecondPointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
} }
qint64 DialogBisector::getThirdPointId() const{
return thirdPointId;
}
void DialogBisector::setThirdPointId(const qint64 &value, const qint64 &id){ void DialogBisector::setThirdPointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxThirdPoint, thirdPointId, value, id); setCurrentPointId(ui->comboBoxThirdPoint, thirdPointId, value, id);
} }

View File

@ -23,32 +23,29 @@
#define DIALOGBISECTOR_H #define DIALOGBISECTOR_H
#include "dialogtool.h" #include "dialogtool.h"
#include <QListWidgetItem>
#include "container/calculator.h"
namespace Ui { namespace Ui {
class DialogBisector; class DialogBisector;
} }
class DialogBisector : public DialogTool class DialogBisector : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogBisector(const VContainer *data, Draw::Draws mode = Draw::Calculation, explicit DialogBisector(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogBisector(); ~DialogBisector();
QString getPointName() const; QString getPointName() const {return pointName;}
void setPointName(const QString &value); void setPointName(const QString &value);
QString getTypeLine() const; inline QString getTypeLine() const {return typeLine;}
void setTypeLine(const QString &value); void setTypeLine(const QString &value);
QString getFormula() const; inline QString getFormula() const {return formula;}
void setFormula(const QString &value); void setFormula(const QString &value);
qint64 getFirstPointId() const; inline qint64 getFirstPointId() const {return firstPointId;}
void setFirstPointId(const qint64 &value, const qint64 &id); void setFirstPointId(const qint64 &value, const qint64 &id);
qint64 getSecondPointId() const; inline qint64 getSecondPointId() const {return secondPointId;}
void setSecondPointId(const qint64 &value, const qint64 &id); void setSecondPointId(const qint64 &value, const qint64 &id);
qint64 getThirdPointId() const; inline qint64 getThirdPointId() const {return thirdPointId;}
void setThirdPointId(const qint64 &value, const qint64 &id); void setThirdPointId(const qint64 &value, const qint64 &id);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -20,7 +20,6 @@
****************************************************************************/ ****************************************************************************/
#include "dialogdetail.h" #include "dialogdetail.h"
#include <QDebug>
DialogDetail::DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent) : DialogDetail::DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent) :
DialogTool(data, mode, parent), ui(), details(VDetail()), supplement(true), closed(true){ DialogTool(data, mode, parent), ui(), details(VDetail()), supplement(true), closed(true){
@ -157,10 +156,6 @@ void DialogDetail::NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, No
this, &DialogDetail::BiasYChanged); this, &DialogDetail::BiasYChanged);
} }
VDetail DialogDetail::getDetails() const{
return details;
}
void DialogDetail::setDetails(const VDetail &value){ void DialogDetail::setDetails(const VDetail &value){
details = value; details = value;
ui.listWidget->clear(); ui.listWidget->clear();

View File

@ -24,13 +24,12 @@
#include "ui_dialogdetail.h" #include "ui_dialogdetail.h"
#include "dialogtool.h" #include "dialogtool.h"
#include "geometry/vdetail.h"
class DialogDetail : public DialogTool{ class DialogDetail : public DialogTool{
Q_OBJECT Q_OBJECT
public: public:
DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent = 0); DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent = 0);
VDetail getDetails() const; inline VDetail getDetails() const {return details;}
void setDetails(const VDetail &value); void setDetails(const VDetail &value);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -21,10 +21,6 @@
#include "dialogendline.h" #include "dialogendline.h"
#include "ui_dialogendline.h" #include "ui_dialogendline.h"
#include <QCloseEvent>
#include <QString>
#include "container/vpointf.h"
#include "container/calculator.h"
DialogEndLine::DialogEndLine(const VContainer *data, Draw::Draws 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()), DialogTool(data, mode, parent), ui(new Ui::DialogEndLine), pointName(QString()), typeLine(QString()),
@ -110,46 +106,26 @@ void DialogEndLine::ChoosedObject(qint64 id, Scene::Scenes type){
} }
} }
QString DialogEndLine::getPointName() const{
return pointName;
}
void DialogEndLine::setPointName(const QString &value){ void DialogEndLine::setPointName(const QString &value){
pointName = value; pointName = value;
ui->lineEditNamePoint->setText(pointName); ui->lineEditNamePoint->setText(pointName);
} }
QString DialogEndLine::getTypeLine() const{
return typeLine;
}
void DialogEndLine::setTypeLine(const QString &value){ void DialogEndLine::setTypeLine(const QString &value){
typeLine = value; typeLine = value;
SetupTypeLine(ui->comboBoxLineType, value); SetupTypeLine(ui->comboBoxLineType, value);
} }
QString DialogEndLine::getFormula() const{
return formula;
}
void DialogEndLine::setFormula(const QString &value){ void DialogEndLine::setFormula(const QString &value){
formula = value; formula = value;
ui->lineEditFormula->setText(formula); ui->lineEditFormula->setText(formula);
} }
qreal DialogEndLine::getAngle() const{
return angle;
}
void DialogEndLine::setAngle(const qreal &value){ void DialogEndLine::setAngle(const qreal &value){
angle = value; angle = value;
ui->doubleSpinBoxAngle->setValue(angle); ui->doubleSpinBoxAngle->setValue(angle);
} }
qint64 DialogEndLine::getBasePointId() const{
return basePointId;
}
void DialogEndLine::setBasePointId(const qint64 &value, const qint64 &id){ void DialogEndLine::setBasePointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxBasePoint, basePointId, value, id); setCurrentPointId(ui->comboBoxBasePoint, basePointId, value, id);
} }
@ -163,7 +139,6 @@ void DialogEndLine::DialogAccepted(){
emit DialogClosed(QDialog::Accepted); emit DialogClosed(QDialog::Accepted);
} }
DialogEndLine::~DialogEndLine() DialogEndLine::~DialogEndLine(){
{
delete ui; delete ui;
} }

View File

@ -23,8 +23,6 @@
#define DIALOGENDLINE_H #define DIALOGENDLINE_H
#include "dialogtool.h" #include "dialogtool.h"
#include <QListWidgetItem>
#include "container/calculator.h"
namespace Ui { namespace Ui {
class DialogEndLine; class DialogEndLine;
@ -36,15 +34,15 @@ public:
explicit DialogEndLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, explicit DialogEndLine(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogEndLine(); ~DialogEndLine();
QString getPointName() const; inline QString getPointName() const {return pointName;}
void setPointName(const QString &value); void setPointName(const QString &value);
QString getTypeLine() const; inline QString getTypeLine() const {return typeLine;}
void setTypeLine(const QString &value); void setTypeLine(const QString &value);
QString getFormula() const; inline QString getFormula() const {return formula;}
void setFormula(const QString &value); void setFormula(const QString &value);
qreal getAngle() const; inline qreal getAngle() const {return angle;}
void setAngle(const qreal &value); void setAngle(const qreal &value);
qint64 getBasePointId() const; inline qint64 getBasePointId() const {return basePointId;}
void setBasePointId(const qint64 &value, const qint64 &id); void setBasePointId(const qint64 &value, const qint64 &id);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -23,46 +23,26 @@ DialogHeight::~DialogHeight(){
delete ui; delete ui;
} }
QString DialogHeight::getPointName() const{
return pointName;
}
void DialogHeight::setPointName(const QString &value){ void DialogHeight::setPointName(const QString &value){
pointName = value; pointName = value;
ui->lineEditNamePoint->setText(pointName); ui->lineEditNamePoint->setText(pointName);
} }
QString DialogHeight::getTypeLine() const{
return typeLine;
}
void DialogHeight::setTypeLine(const QString &value){ void DialogHeight::setTypeLine(const QString &value){
typeLine = value; typeLine = value;
SetupTypeLine(ui->comboBoxLineType, value); SetupTypeLine(ui->comboBoxLineType, value);
} }
qint64 DialogHeight::getBasePointId() const{
return basePointId;
}
void DialogHeight::setBasePointId(const qint64 &value, const qint64 &id){ void DialogHeight::setBasePointId(const qint64 &value, const qint64 &id){
basePointId = value; basePointId = value;
setCurrentPointId(ui->comboBoxBasePoint, basePointId, value, id); setCurrentPointId(ui->comboBoxBasePoint, basePointId, value, id);
} }
qint64 DialogHeight::getP1LineId() const{
return p1LineId;
}
void DialogHeight::setP1LineId(const qint64 &value, const qint64 &id){ void DialogHeight::setP1LineId(const qint64 &value, const qint64 &id){
p1LineId = value; p1LineId = value;
setCurrentPointId(ui->comboBoxP1Line, p1LineId, value, id); setCurrentPointId(ui->comboBoxP1Line, p1LineId, value, id);
} }
qint64 DialogHeight::getP2LineId() const{
return p2LineId;
}
void DialogHeight::setP2LineId(const qint64 &value, const qint64 &id){ void DialogHeight::setP2LineId(const qint64 &value, const qint64 &id){
p2LineId = value; p2LineId = value;
setCurrentPointId(ui->comboBoxP2Line, p2LineId, value, id); setCurrentPointId(ui->comboBoxP2Line, p2LineId, value, id);

View File

@ -13,15 +13,15 @@ public:
explicit DialogHeight(const VContainer *data, Draw::Draws mode = Draw::Calculation, explicit DialogHeight(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogHeight(); ~DialogHeight();
QString getPointName() const; inline QString getPointName() const {return pointName;}
void setPointName(const QString &value); void setPointName(const QString &value);
QString getTypeLine() const; inline QString getTypeLine() const {return typeLine;}
void setTypeLine(const QString &value); void setTypeLine(const QString &value);
qint64 getBasePointId() const; inline qint64 getBasePointId() const {return basePointId;}
void setBasePointId(const qint64 &value, const qint64 &id); void setBasePointId(const qint64 &value, const qint64 &id);
qint64 getP1LineId() const; inline qint64 getP1LineId() const {return p1LineId;}
void setP1LineId(const qint64 &value, const qint64 &id); void setP1LineId(const qint64 &value, const qint64 &id);
qint64 getP2LineId() const; inline qint64 getP2LineId() const{return p2LineId;}
void setP2LineId(const qint64 &value, const qint64 &id); void setP2LineId(const qint64 &value, const qint64 &id);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -304,7 +304,6 @@ void DialogHistory::ShowPoint(){
} }
} }
void DialogHistory::closeEvent(QCloseEvent *event){ void DialogHistory::closeEvent(QCloseEvent *event){
QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0); QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0);
qint64 id = qvariant_cast<qint64>(item->data(Qt::UserRole)); qint64 id = qvariant_cast<qint64>(item->data(Qt::UserRole));

View File

@ -29,12 +29,10 @@ namespace Ui {
class DialogHistory; class DialogHistory;
} }
class DialogHistory : public DialogTool class DialogHistory : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent = 0); DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent = 0);
virtual ~DialogHistory(); virtual ~DialogHistory();
public slots: public slots:
virtual void DialogAccepted(); virtual void DialogAccepted();

View File

@ -21,12 +21,8 @@
#include "dialogincrements.h" #include "dialogincrements.h"
#include "ui_dialogincrements.h" #include "ui_dialogincrements.h"
#include <QHeaderView> #include <widgets/doubledelegate.h>
#include <QCloseEvent> #include <exception/vexception.h>
#include "widgets/doubledelegate.h"
#include "container/vincrementtablerow.h"
#include <QDebug>
#include "exception/vexception.h"
DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget *parent) : DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget *parent) :
DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogIncrements), data(data), doc(doc), DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogIncrements), data(data), doc(doc),

View File

@ -21,8 +21,6 @@
#include "dialogline.h" #include "dialogline.h"
#include "ui_dialogline.h" #include "ui_dialogline.h"
#include <QPushButton>
#include <QCloseEvent>
DialogLine::DialogLine(const VContainer *data, Draw::Draws 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){ DialogTool(data, mode, parent), ui(new Ui::DialogLine), number(0), firstPoint(0), secondPoint(0){
@ -40,10 +38,6 @@ DialogLine::~DialogLine(){
delete ui; delete ui;
} }
qint64 DialogLine::getSecondPoint() const{
return secondPoint;
}
void DialogLine::setSecondPoint(const qint64 &value){ void DialogLine::setSecondPoint(const qint64 &value){
secondPoint = value; secondPoint = value;
VPointF point = data->GetPoint(value); VPointF point = data->GetPoint(value);
@ -53,10 +47,6 @@ void DialogLine::setSecondPoint(const qint64 &value){
} }
} }
qint64 DialogLine::getFirstPoint() const{
return firstPoint;
}
void DialogLine::setFirstPoint(const qint64 &value){ void DialogLine::setFirstPoint(const qint64 &value){
firstPoint = value; firstPoint = value;
VPointF point = data->GetPoint(value); VPointF point = data->GetPoint(value);

View File

@ -28,16 +28,15 @@ namespace Ui {
class DialogLine; class DialogLine;
} }
class DialogLine : public DialogTool class DialogLine : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, explicit DialogLine(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogLine(); ~DialogLine();
qint64 getFirstPoint() const; inline qint64 getFirstPoint() const {return firstPoint;}
void setFirstPoint(const qint64 &value); void setFirstPoint(const qint64 &value);
qint64 getSecondPoint() const; inline qint64 getSecondPoint() const {return secondPoint;}
void setSecondPoint(const qint64 &value); void setSecondPoint(const qint64 &value);
public slots: public slots:
void ChoosedObject(qint64 id, Scene::Scenes type); void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -41,8 +41,7 @@ DialogLineIntersect::DialogLineIntersect(const VContainer *data, Draw::Draws mod
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogLineIntersect::NamePointChanged); connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogLineIntersect::NamePointChanged);
} }
DialogLineIntersect::~DialogLineIntersect() DialogLineIntersect::~DialogLineIntersect(){
{
delete ui; delete ui;
} }
@ -179,46 +178,26 @@ bool DialogLineIntersect::CheckIntersecion(){
} }
} }
qint64 DialogLineIntersect::getP2Line2() const{
return p2Line2;
}
void DialogLineIntersect::setP2Line2(const qint64 &value){ void DialogLineIntersect::setP2Line2(const qint64 &value){
p2Line2 = value; p2Line2 = value;
ChangeCurrentData(ui->comboBoxP2Line2, value); ChangeCurrentData(ui->comboBoxP2Line2, value);
} }
qint64 DialogLineIntersect::getP1Line2() const{
return p1Line2;
}
void DialogLineIntersect::setP1Line2(const qint64 &value){ void DialogLineIntersect::setP1Line2(const qint64 &value){
p1Line2 = value; p1Line2 = value;
ChangeCurrentData(ui->comboBoxP1Line2, value); ChangeCurrentData(ui->comboBoxP1Line2, value);
} }
qint64 DialogLineIntersect::getP2Line1() const{
return p2Line1;
}
void DialogLineIntersect::setP2Line1(const qint64 &value){ void DialogLineIntersect::setP2Line1(const qint64 &value){
p2Line1 = value; p2Line1 = value;
ChangeCurrentData(ui->comboBoxP2Line1, value); ChangeCurrentData(ui->comboBoxP2Line1, value);
} }
qint64 DialogLineIntersect::getP1Line1() const{
return p1Line1;
}
void DialogLineIntersect::setP1Line1(const qint64 &value){ void DialogLineIntersect::setP1Line1(const qint64 &value){
p1Line1 = value; p1Line1 = value;
ChangeCurrentData(ui->comboBoxP1Line1, value); ChangeCurrentData(ui->comboBoxP1Line1, value);
} }
QString DialogLineIntersect::getPointName() const{
return pointName;
}
void DialogLineIntersect::setPointName(const QString &value){ void DialogLineIntersect::setPointName(const QString &value){
pointName = value; pointName = value;
ui->lineEditNamePoint->setText(pointName); ui->lineEditNamePoint->setText(pointName);

View File

@ -28,22 +28,21 @@ namespace Ui {
class DialogLineIntersect; class DialogLineIntersect;
} }
class DialogLineIntersect : public DialogTool class DialogLineIntersect : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogLineIntersect(const VContainer *data, Draw::Draws mode = Draw::Calculation, explicit DialogLineIntersect(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogLineIntersect(); ~DialogLineIntersect();
qint64 getP1Line1() const; inline qint64 getP1Line1() const {return p1Line1;}
void setP1Line1(const qint64 &value); void setP1Line1(const qint64 &value);
qint64 getP2Line1() const; inline qint64 getP2Line1() const {return p2Line1;}
void setP2Line1(const qint64 &value); void setP2Line1(const qint64 &value);
qint64 getP1Line2() const; inline qint64 getP1Line2() const {return p1Line2;}
void setP1Line2(const qint64 &value); void setP1Line2(const qint64 &value);
qint64 getP2Line2() const; inline qint64 getP2Line2() const {return p2Line2;}
void setP2Line2(const qint64 &value); void setP2Line2(const qint64 &value);
QString getPointName() const; inline QString getPointName() const {return pointName;}
void setPointName(const QString &value); void setPointName(const QString &value);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -21,7 +21,6 @@
#include "dialognormal.h" #include "dialognormal.h"
#include "ui_dialognormal.h" #include "ui_dialognormal.h"
#include <QMenu>
DialogNormal::DialogNormal(const VContainer *data, Draw::Draws 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()), DialogTool(data, mode, parent), ui(new Ui::DialogNormal), number(0), pointName(QString()),
@ -83,8 +82,7 @@ DialogNormal::DialogNormal(const VContainer *data, Draw::Draws mode, QWidget *pa
connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogNormal::FormulaChanged); connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogNormal::FormulaChanged);
} }
DialogNormal::~DialogNormal() DialogNormal::~DialogNormal(){
{
delete ui; delete ui;
} }
@ -140,53 +138,29 @@ void DialogNormal::DialogAccepted(){
emit DialogClosed(QDialog::Accepted); emit DialogClosed(QDialog::Accepted);
} }
qint64 DialogNormal::getSecondPointId() const{
return secondPointId;
}
void DialogNormal::setSecondPointId(const qint64 &value, const qint64 &id){ void DialogNormal::setSecondPointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
} }
qint64 DialogNormal::getFirstPointId() const{
return firstPointId;
}
void DialogNormal::setFirstPointId(const qint64 &value, const qint64 &id){ void DialogNormal::setFirstPointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id); setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
} }
qreal DialogNormal::getAngle() const{
return angle;
}
void DialogNormal::setAngle(const qreal &value){ void DialogNormal::setAngle(const qreal &value){
angle = value; angle = value;
ui->doubleSpinBoxAngle->setValue(angle); ui->doubleSpinBoxAngle->setValue(angle);
} }
QString DialogNormal::getFormula() const{
return formula;
}
void DialogNormal::setFormula(const QString &value){ void DialogNormal::setFormula(const QString &value){
formula = value; formula = value;
ui->lineEditFormula->setText(formula); ui->lineEditFormula->setText(formula);
} }
QString DialogNormal::getTypeLine() const{
return typeLine;
}
void DialogNormal::setTypeLine(const QString &value){ void DialogNormal::setTypeLine(const QString &value){
typeLine = value; typeLine = value;
SetupTypeLine(ui->comboBoxLineType, value); SetupTypeLine(ui->comboBoxLineType, value);
} }
QString DialogNormal::getPointName() const{
return pointName;
}
void DialogNormal::setPointName(const QString &value){ void DialogNormal::setPointName(const QString &value){
pointName = value; pointName = value;
ui->lineEditNamePoint->setText(pointName); ui->lineEditNamePoint->setText(pointName);

View File

@ -23,31 +23,28 @@
#define DIALOGNORMAL_H #define DIALOGNORMAL_H
#include "dialogtool.h" #include "dialogtool.h"
#include <QListWidgetItem>
#include "container/calculator.h"
namespace Ui { namespace Ui {
class DialogNormal; class DialogNormal;
} }
class DialogNormal : public DialogTool class DialogNormal : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogNormal(const VContainer *data, Draw::Draws mode = Draw::Calculation, explicit DialogNormal(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogNormal(); ~DialogNormal();
QString getPointName() const; inline QString getPointName() const{return pointName;}
void setPointName(const QString &value); void setPointName(const QString &value);
QString getTypeLine() const; inline QString getTypeLine() const {return typeLine;}
void setTypeLine(const QString &value); void setTypeLine(const QString &value);
QString getFormula() const; inline QString getFormula() const {return formula;}
void setFormula(const QString &value); void setFormula(const QString &value);
qreal getAngle() const; inline qreal getAngle() const {return angle;}
void setAngle(const qreal &value); void setAngle(const qreal &value);
qint64 getFirstPointId() const; inline qint64 getFirstPointId() const {return firstPointId;}
void setFirstPointId(const qint64 &value, const qint64 &id); void setFirstPointId(const qint64 &value, const qint64 &id);
qint64 getSecondPointId() const; inline qint64 getSecondPointId() const {return secondPointId;}
void setSecondPointId(const qint64 &value, const qint64 &id); void setSecondPointId(const qint64 &value, const qint64 &id);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -115,7 +115,6 @@ void DialogPointOfContact::ChoosedObject(qint64 id, Scene::Scenes type){
} }
} }
void DialogPointOfContact::DialogAccepted(){ void DialogPointOfContact::DialogAccepted(){
pointName = ui.lineEditNamePoint->text(); pointName = ui.lineEditNamePoint->text();
radius = ui.lineEditFormula->text(); radius = ui.lineEditFormula->text();
@ -125,44 +124,24 @@ void DialogPointOfContact::DialogAccepted(){
emit DialogClosed(QDialog::Accepted); emit DialogClosed(QDialog::Accepted);
} }
qint64 DialogPointOfContact::getSecondPoint() const{
return secondPoint;
}
void DialogPointOfContact::setSecondPoint(const qint64 &value, const qint64 &id){ void DialogPointOfContact::setSecondPoint(const qint64 &value, const qint64 &id){
setCurrentPointId(ui.comboBoxSecondPoint, secondPoint, value, id); setCurrentPointId(ui.comboBoxSecondPoint, secondPoint, value, id);
} }
qint64 DialogPointOfContact::getFirstPoint() const{
return firstPoint;
}
void DialogPointOfContact::setFirstPoint(const qint64 &value, const qint64 &id){ void DialogPointOfContact::setFirstPoint(const qint64 &value, const qint64 &id){
setCurrentPointId(ui.comboBoxFirstPoint, firstPoint, value, id); setCurrentPointId(ui.comboBoxFirstPoint, firstPoint, value, id);
} }
qint64 DialogPointOfContact::getCenter() const{
return center;
}
void DialogPointOfContact::setCenter(const qint64 &value, const qint64 &id){ void DialogPointOfContact::setCenter(const qint64 &value, const qint64 &id){
setCurrentPointId(ui.comboBoxCenter, center, value, id); setCurrentPointId(ui.comboBoxCenter, center, value, id);
center = value; center = value;
} }
QString DialogPointOfContact::getRadius() const{
return radius;
}
void DialogPointOfContact::setRadius(const QString &value){ void DialogPointOfContact::setRadius(const QString &value){
radius = value; radius = value;
ui.lineEditFormula->setText(radius); ui.lineEditFormula->setText(radius);
} }
QString DialogPointOfContact::getPointName() const{
return pointName;
}
void DialogPointOfContact::setPointName(const QString &value){ void DialogPointOfContact::setPointName(const QString &value){
pointName = value; pointName = value;
ui.lineEditNamePoint->setText(pointName); ui.lineEditNamePoint->setText(pointName);

View File

@ -24,30 +24,23 @@
#include "ui_dialogpointofcontact.h" #include "ui_dialogpointofcontact.h"
#include "dialogtool.h" #include "dialogtool.h"
#include "container/calculator.h"
class DialogPointOfContact : public DialogTool class DialogPointOfContact : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogPointOfContact(const VContainer *data, Draw::Draws mode = Draw::Calculation, DialogPointOfContact(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
QString getPointName() const; inline QString getPointName() const {return pointName;}
void setPointName(const QString &value); void setPointName(const QString &value);
inline QString getRadius() const {return radius;}
QString getRadius() const;
void setRadius(const QString &value); void setRadius(const QString &value);
inline qint64 getCenter() const {return center;}
qint64 getCenter() const;
void setCenter(const qint64 &value, const qint64 &id); void setCenter(const qint64 &value, const qint64 &id);
inline qint64 getFirstPoint() const {return firstPoint;}
qint64 getFirstPoint() const;
void setFirstPoint(const qint64 &value, const qint64 &id); void setFirstPoint(const qint64 &value, const qint64 &id);
inline qint64 getSecondPoint() const {return secondPoint;}
qint64 getSecondPoint() const;
void setSecondPoint(const qint64 &value, const qint64 &id); void setSecondPoint(const qint64 &value, const qint64 &id);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);
virtual void DialogAccepted(); virtual void DialogAccepted();

View File

@ -21,10 +21,6 @@ DialogPointOfIntersection::~DialogPointOfIntersection(){
delete ui; delete ui;
} }
qint64 DialogPointOfIntersection::getSecondPointId() const{
return secondPointId;
}
void DialogPointOfIntersection::setSecondPointId(const qint64 &value, const qint64 &id){ void DialogPointOfIntersection::setSecondPointId(const qint64 &value, const qint64 &id){
secondPointId = value; secondPointId = value;
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
@ -79,19 +75,11 @@ void DialogPointOfIntersection::DialogAccepted(){
emit DialogClosed(QDialog::Accepted); emit DialogClosed(QDialog::Accepted);
} }
qint64 DialogPointOfIntersection::getFirstPointId() const{
return firstPointId;
}
void DialogPointOfIntersection::setFirstPointId(const qint64 &value, const qint64 &id){ void DialogPointOfIntersection::setFirstPointId(const qint64 &value, const qint64 &id){
firstPointId = value; firstPointId = value;
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id); setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
} }
QString DialogPointOfIntersection::getPointName() const{
return pointName;
}
void DialogPointOfIntersection::setPointName(const QString &value){ void DialogPointOfIntersection::setPointName(const QString &value){
pointName = value; pointName = value;
ui->lineEditNamePoint->setText(pointName); ui->lineEditNamePoint->setText(pointName);

View File

@ -13,11 +13,11 @@ public:
DialogPointOfIntersection(const VContainer *data, Draw::Draws mode = Draw::Calculation, DialogPointOfIntersection(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogPointOfIntersection(); ~DialogPointOfIntersection();
QString getPointName() const; inline QString getPointName() const {return pointName;}
void setPointName(const QString &value); void setPointName(const QString &value);
qint64 getFirstPointId() const; inline qint64 getFirstPointId() const {return firstPointId;}
void setFirstPointId(const qint64 &value, const qint64 &id); void setFirstPointId(const qint64 &value, const qint64 &id);
qint64 getSecondPointId() const; inline qint64 getSecondPointId() const {return secondPointId;}
void setSecondPointId(const qint64 &value, const qint64 &id); void setSecondPointId(const qint64 &value, const qint64 &id);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -67,8 +67,7 @@ DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, Draw::Draws mod
connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogShoulderPoint::FormulaChanged); connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogShoulderPoint::FormulaChanged);
} }
DialogShoulderPoint::~DialogShoulderPoint() DialogShoulderPoint::~DialogShoulderPoint(){
{
delete ui; delete ui;
} }
@ -133,52 +132,28 @@ void DialogShoulderPoint::DialogAccepted(){
emit DialogClosed(QDialog::Accepted); emit DialogClosed(QDialog::Accepted);
} }
qint64 DialogShoulderPoint::getPShoulder() const{
return pShoulder;
}
void DialogShoulderPoint::setPShoulder(const qint64 &value, const qint64 &id){ void DialogShoulderPoint::setPShoulder(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxPShoulder, pShoulder, value, id); setCurrentPointId(ui->comboBoxPShoulder, pShoulder, value, id);
} }
qint64 DialogShoulderPoint::getP2Line() const{
return p2Line;
}
void DialogShoulderPoint::setP2Line(const qint64 &value, const qint64 &id){ void DialogShoulderPoint::setP2Line(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxP2Line, p2Line, value, id); setCurrentPointId(ui->comboBoxP2Line, p2Line, value, id);
} }
qint64 DialogShoulderPoint::getP1Line() const{
return p1Line;
}
void DialogShoulderPoint::setP1Line(const qint64 &value, const qint64 &id){ void DialogShoulderPoint::setP1Line(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxP1Line, p1Line, value, id); setCurrentPointId(ui->comboBoxP1Line, p1Line, value, id);
} }
QString DialogShoulderPoint::getFormula() const{
return formula;
}
void DialogShoulderPoint::setFormula(const QString &value){ void DialogShoulderPoint::setFormula(const QString &value){
formula = value; formula = value;
ui->lineEditFormula->setText(formula); ui->lineEditFormula->setText(formula);
} }
QString DialogShoulderPoint::getTypeLine() const{
return typeLine;
}
void DialogShoulderPoint::setTypeLine(const QString &value){ void DialogShoulderPoint::setTypeLine(const QString &value){
typeLine = value; typeLine = value;
SetupTypeLine(ui->comboBoxLineType, value); SetupTypeLine(ui->comboBoxLineType, value);
} }
QString DialogShoulderPoint::getPointName() const{
return pointName;
}
void DialogShoulderPoint::setPointName(const QString &value){ void DialogShoulderPoint::setPointName(const QString &value){
pointName = value; pointName = value;
ui->lineEditNamePoint->setText(pointName); ui->lineEditNamePoint->setText(pointName);

View File

@ -23,30 +23,28 @@
#define DIALOGSHOULDERPOINT_H #define DIALOGSHOULDERPOINT_H
#include "dialogtool.h" #include "dialogtool.h"
#include "container/calculator.h"
namespace Ui { namespace Ui {
class DialogShoulderPoint; class DialogShoulderPoint;
} }
class DialogShoulderPoint : public DialogTool class DialogShoulderPoint : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogShoulderPoint(const VContainer *data, Draw::Draws mode = Draw::Calculation, DialogShoulderPoint(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogShoulderPoint(); ~DialogShoulderPoint();
QString getPointName() const; inline QString getPointName() const {return pointName;}
void setPointName(const QString &value); void setPointName(const QString &value);
QString getTypeLine() const; inline QString getTypeLine() const {return typeLine;}
void setTypeLine(const QString &value); void setTypeLine(const QString &value);
QString getFormula() const; inline QString getFormula() const {return formula;}
void setFormula(const QString &value); void setFormula(const QString &value);
qint64 getP1Line() const; inline qint64 getP1Line() const {return p1Line;}
void setP1Line(const qint64 &value, const qint64 &id); void setP1Line(const qint64 &value, const qint64 &id);
qint64 getP2Line() const; inline qint64 getP2Line() const {return p2Line;}
void setP2Line(const qint64 &value, const qint64 &id); void setP2Line(const qint64 &value, const qint64 &id);
qint64 getPShoulder() const; inline qint64 getPShoulder() const {return pShoulder;}
void setPShoulder(const qint64 &value, const qint64 &id); void setPShoulder(const qint64 &value, const qint64 &id);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -21,10 +21,6 @@
#include "dialogsinglepoint.h" #include "dialogsinglepoint.h"
#include "ui_dialogsinglepoint.h" #include "ui_dialogsinglepoint.h"
#include <QShowEvent>
#include <QPushButton>
#include <QDebug>
#include "options.h"
DialogSinglePoint::DialogSinglePoint(const VContainer *data, QWidget *parent) : DialogSinglePoint::DialogSinglePoint(const VContainer *data, QWidget *parent) :
DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogSinglePoint), name(QString()), DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogSinglePoint), name(QString()),
@ -69,14 +65,6 @@ void DialogSinglePoint::setData(const QString name, const QPointF point){
ui->doubleSpinBoxY->setValue(point.y()/PrintDPI*25.4); ui->doubleSpinBoxY->setValue(point.y()/PrintDPI*25.4);
} }
QString DialogSinglePoint::getName()const{
return name;
}
QPointF DialogSinglePoint::getPoint()const{
return point;
}
DialogSinglePoint::~DialogSinglePoint(){ DialogSinglePoint::~DialogSinglePoint(){
delete ui; delete ui;
} }

View File

@ -28,14 +28,13 @@ namespace Ui {
class DialogSinglePoint; class DialogSinglePoint;
} }
class DialogSinglePoint : public DialogTool class DialogSinglePoint : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogSinglePoint(const VContainer *data, QWidget *parent = 0); DialogSinglePoint(const VContainer *data, QWidget *parent = 0);
void setData(const QString name, const QPointF point); void setData(const QString name, const QPointF point);
QString getName()const; inline QString getName()const {return name;}
QPointF getPoint()const; inline QPointF getPoint()const {return point;}
~DialogSinglePoint(); ~DialogSinglePoint();
public slots: public slots:
void mousePress(QPointF scenePos); void mousePress(QPointF scenePos);

View File

@ -109,64 +109,36 @@ void DialogSpline::DialogAccepted(){
emit DialogClosed(QDialog::Accepted); emit DialogClosed(QDialog::Accepted);
} }
qreal DialogSpline::getKCurve() const{
return kCurve;
}
void DialogSpline::setKCurve(const qreal &value){ void DialogSpline::setKCurve(const qreal &value){
kCurve = value; kCurve = value;
ui->doubleSpinBoxKcurve->setValue(value); ui->doubleSpinBoxKcurve->setValue(value);
} }
qreal DialogSpline::getKAsm2() const{
return kAsm2;
}
void DialogSpline::setKAsm2(const qreal &value){ void DialogSpline::setKAsm2(const qreal &value){
kAsm2 = value; kAsm2 = value;
ui->doubleSpinBoxKasm2->setValue(value); ui->doubleSpinBoxKasm2->setValue(value);
} }
qreal DialogSpline::getKAsm1() const{
return kAsm1;
}
void DialogSpline::setKAsm1(const qreal &value){ void DialogSpline::setKAsm1(const qreal &value){
kAsm1 = value; kAsm1 = value;
ui->doubleSpinBoxKasm1->setValue(value); ui->doubleSpinBoxKasm1->setValue(value);
} }
qreal DialogSpline::getAngle2() const{
return angle2;
}
void DialogSpline::setAngle2(const qreal &value){ void DialogSpline::setAngle2(const qreal &value){
angle2 = value; angle2 = value;
ui->spinBoxAngle2->setValue(static_cast<qint32>(value)); ui->spinBoxAngle2->setValue(static_cast<qint32>(value));
} }
qreal DialogSpline::getAngle1() const{
return angle1;
}
void DialogSpline::setAngle1(const qreal &value){ void DialogSpline::setAngle1(const qreal &value){
angle1 = value; angle1 = value;
ui->spinBoxAngle1->setValue(static_cast<qint32>(value)); ui->spinBoxAngle1->setValue(static_cast<qint32>(value));
} }
qint64 DialogSpline::getP4() const{
return p4;
}
void DialogSpline::setP4(const qint64 &value){ void DialogSpline::setP4(const qint64 &value){
p4 = value; p4 = value;
ChangeCurrentData(ui->comboBoxP4, value); ChangeCurrentData(ui->comboBoxP4, value);
} }
qint64 DialogSpline::getP1() const{
return p1;
}
void DialogSpline::setP1(const qint64 &value){ void DialogSpline::setP1(const qint64 &value){
p1 = value; p1 = value;
ChangeCurrentData(ui->comboBoxP1, value); ChangeCurrentData(ui->comboBoxP1, value);

View File

@ -28,26 +28,25 @@ namespace Ui {
class DialogSpline; class DialogSpline;
} }
class DialogSpline : public DialogTool class DialogSpline : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogSpline(const VContainer *data, Draw::Draws mode = Draw::Calculation, explicit DialogSpline(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogSpline(); ~DialogSpline();
qint64 getP1() const; inline qint64 getP1() const {return p1;}
void setP1(const qint64 &value); void setP1(const qint64 &value);
qint64 getP4() const; inline qint64 getP4() const {return p4;}
void setP4(const qint64 &value); void setP4(const qint64 &value);
qreal getAngle1() const; inline qreal getAngle1() const {return angle1;}
void setAngle1(const qreal &value); void setAngle1(const qreal &value);
qreal getAngle2() const; inline qreal getAngle2() const {return angle2;}
void setAngle2(const qreal &value); void setAngle2(const qreal &value);
qreal getKAsm1() const; inline qreal getKAsm1() const {return kAsm1;}
void setKAsm1(const qreal &value); void setKAsm1(const qreal &value);
qreal getKAsm2() const; inline qreal getKAsm2() const {return kAsm2;}
void setKAsm2(const qreal &value); void setKAsm2(const qreal &value);
qreal getKCurve() const; inline qreal getKCurve() const {return kCurve;}
void setKCurve(const qreal &value); void setKCurve(const qreal &value);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -48,15 +48,10 @@ DialogSplinePath::DialogSplinePath(const VContainer *data, Draw::Draws mode, QWi
this, &DialogSplinePath::KAsm2Changed); this, &DialogSplinePath::KAsm2Changed);
} }
DialogSplinePath::~DialogSplinePath() DialogSplinePath::~DialogSplinePath(){
{
delete ui; delete ui;
} }
VSplinePath DialogSplinePath::GetPath() const{
return path;
}
void DialogSplinePath::SetPath(const VSplinePath &value){ void DialogSplinePath::SetPath(const VSplinePath &value){
this->path = value; this->path = value;
ui->listWidget->clear(); ui->listWidget->clear();

View File

@ -29,14 +29,13 @@ namespace Ui {
class DialogSplinePath; class DialogSplinePath;
} }
class DialogSplinePath : public DialogTool class DialogSplinePath : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
explicit DialogSplinePath(const VContainer *data, Draw::Draws mode = Draw::Calculation, DialogSplinePath(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogSplinePath(); ~DialogSplinePath();
VSplinePath GetPath() const; inline VSplinePath GetPath() const {return path;}
void SetPath(const VSplinePath &value); void SetPath(const VSplinePath &value);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -20,11 +20,7 @@
****************************************************************************/ ****************************************************************************/
#include "dialogtool.h" #include "dialogtool.h"
#include <QListWidgetItem> #include <container/calculator.h>
#include <QCloseEvent>
#include "container/calculator.h"
#include "geometry/vdetail.h"
#include <QDebug>
DialogTool::DialogTool(const VContainer *data, Draw::Draws 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), isInitialized(false), flagName(true), flagFormula(true), timerFormula(0), bOk(0), spinBoxAngle(0),
@ -36,9 +32,6 @@ DialogTool::DialogTool(const VContainer *data, Draw::Draws mode, QWidget *parent
connect(timerFormula, &QTimer::timeout, this, &DialogTool::EvalFormula); connect(timerFormula, &QTimer::timeout, this, &DialogTool::EvalFormula);
} }
DialogTool::~DialogTool(){
}
void DialogTool::closeEvent(QCloseEvent *event){ void DialogTool::closeEvent(QCloseEvent *event){
DialogClosed(QDialog::Rejected); DialogClosed(QDialog::Rejected);
event->accept(); event->accept();
@ -214,7 +207,6 @@ void DialogTool::CheckState(){
bOk->setEnabled(flagFormula && flagName); bOk->setEnabled(flagFormula && flagName);
} }
void DialogTool::ChoosedObject(qint64 id, Scene::Scenes type){ void DialogTool::ChoosedObject(qint64 id, Scene::Scenes type){
Q_UNUSED(id); Q_UNUSED(id);
Q_UNUSED(type); Q_UNUSED(type);
@ -456,11 +448,3 @@ void DialogTool::ShowVariable(const QHash<key, val> *var){
connect(listWidget, &QListWidget::currentRowChanged, this, &DialogTool::ValChenged); connect(listWidget, &QListWidget::currentRowChanged, this, &DialogTool::ValChenged);
listWidget->setCurrentRow (0); listWidget->setCurrentRow (0);
} }
qint64 DialogTool::getIdDetail() const{
return idDetail;
}
void DialogTool::setIdDetail(const qint64 &value){
idDetail = value;
}

View File

@ -23,24 +23,16 @@
#define DIALOGTOOL_H #define DIALOGTOOL_H
#include <QDialog> #include <QDialog>
#include <QComboBox> #include <container/vcontainer.h>
#include <QDoubleSpinBox>
#include <QPushButton>
#include <QLineEdit>
#include <QListWidget>
#include <QLabel>
#include <QRadioButton>
#include <QTimer>
#include "container/vcontainer.h"
class DialogTool : public QDialog{ class DialogTool : public QDialog{
Q_OBJECT Q_OBJECT
public: public:
DialogTool(const VContainer *data, Draw::Draws mode = Draw::Calculation, DialogTool(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
virtual ~DialogTool(); virtual ~DialogTool() {}
qint64 getIdDetail() const; inline qint64 getIdDetail() const {return idDetail;}
void setIdDetail(const qint64 &value); inline void setIdDetail(const qint64 &value) {idDetail = value;}
signals: signals:
void DialogClosed(int result); void DialogClosed(int result);
void ToolTip(const QString &toolTip); void ToolTip(const QString &toolTip);

View File

@ -78,46 +78,27 @@ void DialogTriangle::DialogAccepted(){
axisP2Id = getCurrentPointId(ui->comboBoxAxisP2); axisP2Id = getCurrentPointId(ui->comboBoxAxisP2);
emit DialogClosed(QDialog::Accepted); emit DialogClosed(QDialog::Accepted);
} }
QString DialogTriangle::getPointName() const{
return pointName;
}
void DialogTriangle::setPointName(const QString &value){ void DialogTriangle::setPointName(const QString &value){
pointName = value; pointName = value;
ui->lineEditNamePoint->setText(pointName); ui->lineEditNamePoint->setText(pointName);
} }
qint64 DialogTriangle::getSecondPointId() const{
return secondPointId;
}
void DialogTriangle::setSecondPointId(const qint64 &value, const qint64 &id){ void DialogTriangle::setSecondPointId(const qint64 &value, const qint64 &id){
secondPointId = value; secondPointId = value;
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
} }
qint64 DialogTriangle::getFirstPointId() const{
return firstPointId;
}
void DialogTriangle::setFirstPointId(const qint64 &value, const qint64 &id){ void DialogTriangle::setFirstPointId(const qint64 &value, const qint64 &id){
firstPointId = value; firstPointId = value;
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id); setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
} }
qint64 DialogTriangle::getAxisP2Id() const{
return axisP2Id;
}
void DialogTriangle::setAxisP2Id(const qint64 &value, const qint64 &id){ void DialogTriangle::setAxisP2Id(const qint64 &value, const qint64 &id){
axisP2Id = value; axisP2Id = value;
setCurrentPointId(ui->comboBoxAxisP2, axisP2Id, value, id); setCurrentPointId(ui->comboBoxAxisP2, axisP2Id, value, id);
} }
qint64 DialogTriangle::getAxisP1Id() const{
return axisP1Id;
}
void DialogTriangle::setAxisP1Id(const qint64 &value, const qint64 &id){ void DialogTriangle::setAxisP1Id(const qint64 &value, const qint64 &id){
axisP1Id = value; axisP1Id = value;
setCurrentPointId(ui->comboBoxAxisP1, axisP1Id, value, id); setCurrentPointId(ui->comboBoxAxisP1, axisP1Id, value, id);

View File

@ -7,23 +7,21 @@ namespace Ui {
class DialogTriangle; class DialogTriangle;
} }
class DialogTriangle : public DialogTool class DialogTriangle : public DialogTool{
{
Q_OBJECT Q_OBJECT
public: public:
DialogTriangle(const VContainer *data, Draw::Draws mode = Draw::Calculation, DialogTriangle(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0); QWidget *parent = 0);
~DialogTriangle(); ~DialogTriangle();
qint64 getAxisP1Id() const; inline qint64 getAxisP1Id() const {return axisP1Id;}
void setAxisP1Id(const qint64 &value, const qint64 &id); void setAxisP1Id(const qint64 &value, const qint64 &id);
qint64 getAxisP2Id() const; inline qint64 getAxisP2Id() const {return axisP2Id;}
void setAxisP2Id(const qint64 &value, const qint64 &id); void setAxisP2Id(const qint64 &value, const qint64 &id);
qint64 getFirstPointId() const; inline qint64 getFirstPointId() const {return firstPointId;}
void setFirstPointId(const qint64 &value, const qint64 &id); void setFirstPointId(const qint64 &value, const qint64 &id);
qint64 getSecondPointId() const; inline qint64 getSecondPointId() const {return secondPointId;}
void setSecondPointId(const qint64 &value, const qint64 &id); void setSecondPointId(const qint64 &value, const qint64 &id);
QString getPointName() const; inline QString getPointName() const {return pointName;}
void setPointName(const QString &value); void setPointName(const QString &value);
public slots: public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type); virtual void ChoosedObject(qint64 id, Scene::Scenes type);

View File

@ -20,6 +20,7 @@
****************************************************************************/ ****************************************************************************/
#include "vtoolbisector.h" #include "vtoolbisector.h"
#include <container/calculator.h>
VToolBisector::VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, VToolBisector::VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &firstPointId, const QString &typeLine, const QString &formula, const qint64 &firstPointId,

View File

@ -23,6 +23,7 @@
#include <QDebug> #include <QDebug>
#include <QMenu> #include <QMenu>
#include "widgets/vmaingraphicsscene.h" #include "widgets/vmaingraphicsscene.h"
#include <container/calculator.h>
VToolEndLine::VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, VToolEndLine::VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &basePointId, const QString &formula, const qreal &angle, const qint64 &basePointId,

View File

@ -20,6 +20,7 @@
****************************************************************************/ ****************************************************************************/
#include "vtoolnormal.h" #include "vtoolnormal.h"
#include <container/calculator.h>
VToolNormal::VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, VToolNormal::VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const qint64 &firstPointId, const QString &formula, const qreal &angle, const qint64 &firstPointId,

View File

@ -20,6 +20,7 @@
****************************************************************************/ ****************************************************************************/
#include "vtoolpointofcontact.h" #include "vtoolpointofcontact.h"
#include <container/calculator.h>
VToolPointOfContact::VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, VToolPointOfContact::VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center, const QString &radius, const qint64 &center,

View File

@ -21,6 +21,7 @@
#include "vtoolshoulderpoint.h" #include "vtoolshoulderpoint.h"
#include <QDebug> #include <QDebug>
#include <container/calculator.h>
VToolShoulderPoint::VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, VToolShoulderPoint::VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &p1Line, const QString &typeLine, const QString &formula, const qint64 &p1Line,

View File

@ -20,8 +20,8 @@
****************************************************************************/ ****************************************************************************/
#include "vmodelingbisector.h" #include "vmodelingbisector.h"
#include <QMenu>
#include "../drawTools/vtoolbisector.h" #include "../drawTools/vtoolbisector.h"
#include <container/calculator.h>
VModelingBisector::VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id, VModelingBisector::VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &firstPointId, const QString &typeLine, const QString &formula, const qint64 &firstPointId,

View File

@ -20,9 +20,7 @@
****************************************************************************/ ****************************************************************************/
#include "vmodelingendline.h" #include "vmodelingendline.h"
#include <QDebug> #include <container/calculator.h>
#include <QMenu>
#include "widgets/vmaingraphicsscene.h"
VModelingEndLine::VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, VModelingEndLine::VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qreal &angle, const QString &typeLine, const QString &formula, const qreal &angle,

View File

@ -21,6 +21,7 @@
#include "vmodelingnormal.h" #include "vmodelingnormal.h"
#include "../drawTools/vtoolnormal.h" #include "../drawTools/vtoolnormal.h"
#include <container/calculator.h>
VModelingNormal::VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id, VModelingNormal::VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &typeLine,

View File

@ -21,6 +21,7 @@
#include "vmodelingpointofcontact.h" #include "vmodelingpointofcontact.h"
#include "../drawTools/vtoolpointofcontact.h" #include "../drawTools/vtoolpointofcontact.h"
#include <container/calculator.h>
VModelingPointOfContact::VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, VModelingPointOfContact::VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center, const QString &radius, const qint64 &center,

View File

@ -22,6 +22,7 @@
#include "vmodelingshoulderpoint.h" #include "vmodelingshoulderpoint.h"
#include <QDebug> #include <QDebug>
#include "../drawTools/vtoolshoulderpoint.h" #include "../drawTools/vtoolshoulderpoint.h"
#include <container/calculator.h>
VModelingShoulderPoint::VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, VModelingShoulderPoint::VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &p1Line, const QString &typeLine, const QString &formula, const qint64 &p1Line,