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

View File

@ -24,19 +24,18 @@
#include <QString>
class VStandartTableCell
{
class VStandartTableCell{
public:
VStandartTableCell();
VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description = QString());
qint32 GetBase() const;
qreal GetKsize() const;
qreal GetKgrowth() const;
VStandartTableCell();
VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description = QString());
qint32 GetBase() const;
qreal GetKsize() const;
qreal GetKgrowth() const;
QString GetDescription() const;
private:
qint32 base;
qreal ksize;
qreal kgrowth;
qint32 base;
qreal ksize;
qreal kgrowth;
QString description;
};

View File

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

View File

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

View File

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

View File

@ -28,24 +28,19 @@ namespace Ui {
class DialogArc;
}
class DialogArc : public DialogTool
{
class DialogArc : public DialogTool{
Q_OBJECT
public:
explicit DialogArc(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0);
~DialogArc();
qint64 GetCenter() const;
void SetCenter(const qint64 &value);
QString GetRadius() const;
void SetRadius(const QString &value);
QString GetF1() const;
void SetF1(const QString &value);
QString GetF2() const;
void SetF2(const QString &value);
DialogArc(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0);
~DialogArc();
inline qint64 GetCenter() const {return center;}
void SetCenter(const qint64 &value);
inline QString GetRadius() const {return radius;}
void SetRadius(const QString &value);
inline QString GetF1() const {return f1;}
void SetF1(const QString &value);
inline QString GetF2() const {return f2;}
void SetF2(const QString &value);
public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
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){
pointName = value;
ui->lineEditNamePoint->setText(pointName);
}
QString DialogBisector::getTypeLine() const{
return typeLine;
}
void DialogBisector::setTypeLine(const QString &value){
typeLine = value;
SetupTypeLine(ui->comboBoxLineType, value);
}
QString DialogBisector::getFormula() const{
return formula;
}
void DialogBisector::setFormula(const QString &value){
formula = value;
ui->lineEditFormula->setText(formula);
}
qint64 DialogBisector::getFirstPointId() const{
return firstPointId;
}
void DialogBisector::setFirstPointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
}
qint64 DialogBisector::getSecondPointId() const{
return secondPointId;
}
void DialogBisector::setSecondPointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
}
qint64 DialogBisector::getThirdPointId() const{
return thirdPointId;
}
void DialogBisector::setThirdPointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxThirdPoint, thirdPointId, value, id);
}

View File

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

View File

@ -20,7 +20,6 @@
****************************************************************************/
#include "dialogdetail.h"
#include <QDebug>
DialogDetail::DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent) :
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);
}
VDetail DialogDetail::getDetails() const{
return details;
}
void DialogDetail::setDetails(const VDetail &value){
details = value;
ui.listWidget->clear();

View File

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

View File

@ -21,10 +21,6 @@
#include "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) :
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){
pointName = value;
ui->lineEditNamePoint->setText(pointName);
}
QString DialogEndLine::getTypeLine() const{
return typeLine;
}
void DialogEndLine::setTypeLine(const QString &value){
typeLine = value;
SetupTypeLine(ui->comboBoxLineType, value);
}
QString DialogEndLine::getFormula() const{
return formula;
}
void DialogEndLine::setFormula(const QString &value){
formula = value;
ui->lineEditFormula->setText(formula);
}
qreal DialogEndLine::getAngle() const{
return angle;
}
void DialogEndLine::setAngle(const qreal &value){
angle = value;
ui->doubleSpinBoxAngle->setValue(angle);
}
qint64 DialogEndLine::getBasePointId() const{
return basePointId;
}
void DialogEndLine::setBasePointId(const qint64 &value, const qint64 &id){
setCurrentPointId(ui->comboBoxBasePoint, basePointId, value, id);
}
@ -163,7 +139,6 @@ void DialogEndLine::DialogAccepted(){
emit DialogClosed(QDialog::Accepted);
}
DialogEndLine::~DialogEndLine()
{
DialogEndLine::~DialogEndLine(){
delete ui;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -29,32 +29,30 @@ namespace Ui {
class DialogHistory;
}
class DialogHistory : public DialogTool
{
class DialogHistory : public DialogTool{
Q_OBJECT
public:
explicit DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent = 0);
virtual ~DialogHistory();
DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent = 0);
virtual ~DialogHistory();
public slots:
virtual void DialogAccepted();
void cellClicked(int row, int column);
void ChangedCursor(qint64 id);
void UpdateHistory();
virtual void DialogAccepted();
void cellClicked(int row, int column);
void ChangedCursor(qint64 id);
void UpdateHistory();
signals:
void ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable);
void ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable);
protected:
virtual void closeEvent ( QCloseEvent * event );
virtual void closeEvent ( QCloseEvent * event );
private:
Q_DISABLE_COPY(DialogHistory)
Ui::DialogHistory *ui;
VDomDocument *doc;
qint32 cursorRow;
qint32 cursorToolRecordRow;
void FillTable();
QString Record(const VToolRecord &tool);
void InitialTable();
void ShowPoint();
VDomDocument *doc;
qint32 cursorRow;
qint32 cursorToolRecordRow;
void FillTable();
QString Record(const VToolRecord &tool);
void InitialTable();
void ShowPoint();
};
#endif // DIALOGHISTORY_H

View File

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

View File

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

View File

@ -28,16 +28,15 @@ namespace Ui {
class DialogLine;
}
class DialogLine : public DialogTool
{
class DialogLine : public DialogTool{
Q_OBJECT
public:
explicit DialogLine(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0);
~DialogLine();
qint64 getFirstPoint() const;
inline qint64 getFirstPoint() const {return firstPoint;}
void setFirstPoint(const qint64 &value);
qint64 getSecondPoint() const;
inline qint64 getSecondPoint() const {return secondPoint;}
void setSecondPoint(const qint64 &value);
public slots:
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);
}
DialogLineIntersect::~DialogLineIntersect()
{
DialogLineIntersect::~DialogLineIntersect(){
delete ui;
}
@ -179,46 +178,26 @@ bool DialogLineIntersect::CheckIntersecion(){
}
}
qint64 DialogLineIntersect::getP2Line2() const{
return p2Line2;
}
void DialogLineIntersect::setP2Line2(const qint64 &value){
p2Line2 = value;
ChangeCurrentData(ui->comboBoxP2Line2, value);
}
qint64 DialogLineIntersect::getP1Line2() const{
return p1Line2;
}
void DialogLineIntersect::setP1Line2(const qint64 &value){
p1Line2 = value;
ChangeCurrentData(ui->comboBoxP1Line2, value);
}
qint64 DialogLineIntersect::getP2Line1() const{
return p2Line1;
}
void DialogLineIntersect::setP2Line1(const qint64 &value){
p2Line1 = value;
ChangeCurrentData(ui->comboBoxP2Line1, value);
}
qint64 DialogLineIntersect::getP1Line1() const{
return p1Line1;
}
void DialogLineIntersect::setP1Line1(const qint64 &value){
p1Line1 = value;
ChangeCurrentData(ui->comboBoxP1Line1, value);
}
QString DialogLineIntersect::getPointName() const{
return pointName;
}
void DialogLineIntersect::setPointName(const QString &value){
pointName = value;
ui->lineEditNamePoint->setText(pointName);

View File

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

View File

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

View File

@ -23,31 +23,28 @@
#define DIALOGNORMAL_H
#include "dialogtool.h"
#include <QListWidgetItem>
#include "container/calculator.h"
namespace Ui {
class DialogNormal;
}
class DialogNormal : public DialogTool
{
class DialogNormal : public DialogTool{
Q_OBJECT
public:
explicit DialogNormal(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0);
~DialogNormal();
QString getPointName() const;
inline QString getPointName() const{return pointName;}
void setPointName(const QString &value);
QString getTypeLine() const;
inline QString getTypeLine() const {return typeLine;}
void setTypeLine(const QString &value);
QString getFormula() const;
inline QString getFormula() const {return formula;}
void setFormula(const QString &value);
qreal getAngle() const;
inline qreal getAngle() const {return angle;}
void setAngle(const qreal &value);
qint64 getFirstPointId() const;
inline qint64 getFirstPointId() const {return firstPointId;}
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);
public slots:
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(){
pointName = ui.lineEditNamePoint->text();
radius = ui.lineEditFormula->text();
@ -125,44 +124,24 @@ void DialogPointOfContact::DialogAccepted(){
emit DialogClosed(QDialog::Accepted);
}
qint64 DialogPointOfContact::getSecondPoint() const{
return secondPoint;
}
void DialogPointOfContact::setSecondPoint(const qint64 &value, const qint64 &id){
setCurrentPointId(ui.comboBoxSecondPoint, secondPoint, value, id);
}
qint64 DialogPointOfContact::getFirstPoint() const{
return firstPoint;
}
void DialogPointOfContact::setFirstPoint(const qint64 &value, const qint64 &id){
setCurrentPointId(ui.comboBoxFirstPoint, firstPoint, value, id);
}
qint64 DialogPointOfContact::getCenter() const{
return center;
}
void DialogPointOfContact::setCenter(const qint64 &value, const qint64 &id){
setCurrentPointId(ui.comboBoxCenter, center, value, id);
center = value;
}
QString DialogPointOfContact::getRadius() const{
return radius;
}
void DialogPointOfContact::setRadius(const QString &value){
radius = value;
ui.lineEditFormula->setText(radius);
}
QString DialogPointOfContact::getPointName() const{
return pointName;
}
void DialogPointOfContact::setPointName(const QString &value){
pointName = value;
ui.lineEditNamePoint->setText(pointName);

View File

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

View File

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

View File

@ -10,25 +10,25 @@ class DialogPointOfIntersection;
class DialogPointOfIntersection : public DialogTool{
Q_OBJECT
public:
DialogPointOfIntersection(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0);
~DialogPointOfIntersection();
QString getPointName() const;
void setPointName(const QString &value);
qint64 getFirstPointId() const;
void setFirstPointId(const qint64 &value, const qint64 &id);
qint64 getSecondPointId() const;
void setSecondPointId(const qint64 &value, const qint64 &id);
DialogPointOfIntersection(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0);
~DialogPointOfIntersection();
inline QString getPointName() const {return pointName;}
void setPointName(const QString &value);
inline qint64 getFirstPointId() const {return firstPointId;}
void setFirstPointId(const qint64 &value, const qint64 &id);
inline qint64 getSecondPointId() const {return secondPointId;}
void setSecondPointId(const qint64 &value, const qint64 &id);
public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
virtual void DialogAccepted();
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogPointOfIntersection)
Ui::DialogPointOfIntersection *ui;
qint32 number;
QString pointName;
qint64 firstPointId;
qint64 secondPointId;
qint32 number;
QString pointName;
qint64 firstPointId;
qint64 secondPointId;
};
#endif // DIALOGPOINTOFINTERSECTION_H

View File

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

View File

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

View File

@ -21,10 +21,6 @@
#include "dialogsinglepoint.h"
#include "ui_dialogsinglepoint.h"
#include <QShowEvent>
#include <QPushButton>
#include <QDebug>
#include "options.h"
DialogSinglePoint::DialogSinglePoint(const VContainer *data, QWidget *parent) :
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);
}
QString DialogSinglePoint::getName()const{
return name;
}
QPointF DialogSinglePoint::getPoint()const{
return point;
}
DialogSinglePoint::~DialogSinglePoint(){
delete ui;
}

View File

@ -28,23 +28,22 @@ namespace Ui {
class DialogSinglePoint;
}
class DialogSinglePoint : public DialogTool
{
class DialogSinglePoint : public DialogTool{
Q_OBJECT
public:
explicit DialogSinglePoint(const VContainer *data, QWidget *parent = 0);
void setData(const QString name, const QPointF point);
QString getName()const;
QPointF getPoint()const;
~DialogSinglePoint();
DialogSinglePoint(const VContainer *data, QWidget *parent = 0);
void setData(const QString name, const QPointF point);
inline QString getName()const {return name;}
inline QPointF getPoint()const {return point;}
~DialogSinglePoint();
public slots:
void mousePress(QPointF scenePos);
virtual void DialogAccepted();
void mousePress(QPointF scenePos);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogSinglePoint)
Ui::DialogSinglePoint *ui;
QString name;
QPointF point;
QString name;
QPointF point;
};
#endif // DIALOGSINGLEPOINT_H

View File

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

View File

@ -28,41 +28,40 @@ namespace Ui {
class DialogSpline;
}
class DialogSpline : public DialogTool
{
class DialogSpline : public DialogTool{
Q_OBJECT
public:
explicit DialogSpline(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0);
~DialogSpline();
qint64 getP1() const;
void setP1(const qint64 &value);
qint64 getP4() const;
void setP4(const qint64 &value);
qreal getAngle1() const;
void setAngle1(const qreal &value);
qreal getAngle2() const;
void setAngle2(const qreal &value);
qreal getKAsm1() const;
void setKAsm1(const qreal &value);
qreal getKAsm2() const;
void setKAsm2(const qreal &value);
qreal getKCurve() const;
void setKCurve(const qreal &value);
explicit DialogSpline(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0);
~DialogSpline();
inline qint64 getP1() const {return p1;}
void setP1(const qint64 &value);
inline qint64 getP4() const {return p4;}
void setP4(const qint64 &value);
inline qreal getAngle1() const {return angle1;}
void setAngle1(const qreal &value);
inline qreal getAngle2() const {return angle2;}
void setAngle2(const qreal &value);
inline qreal getKAsm1() const {return kAsm1;}
void setKAsm1(const qreal &value);
inline qreal getKAsm2() const {return kAsm2;}
void setKAsm2(const qreal &value);
inline qreal getKCurve() const {return kCurve;}
void setKCurve(const qreal &value);
public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
virtual void DialogAccepted();
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogSpline)
Ui::DialogSpline *ui;
qint32 number;
qint64 p1; // перша точка
qint64 p4; // четверта точка
qreal angle1; // кут нахилу дотичної в першій точці
qreal angle2; // кут нахилу дотичної в другій точці
qreal kAsm1;
qreal kAsm2;
qreal kCurve;
qint32 number;
qint64 p1; // перша точка
qint64 p4; // четверта точка
qreal angle1; // кут нахилу дотичної в першій точці
qreal angle2; // кут нахилу дотичної в другій точці
qreal kAsm1;
qreal kAsm2;
qreal kCurve;
};
#endif // DIALOGSPLINE_H

View File

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

View File

@ -29,32 +29,31 @@ namespace Ui {
class DialogSplinePath;
}
class DialogSplinePath : public DialogTool
{
class DialogSplinePath : public DialogTool{
Q_OBJECT
public:
explicit DialogSplinePath(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0);
~DialogSplinePath();
VSplinePath GetPath() const;
void SetPath(const VSplinePath &value);
DialogSplinePath(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0);
~DialogSplinePath();
inline VSplinePath GetPath() const {return path;}
void SetPath(const VSplinePath &value);
public slots:
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
virtual void DialogAccepted();
void PointChenged(int row);
void currentPointChanged( int index );
void Angle1Changed( int index );
void Angle2Changed( int index );
void KAsm1Changed(qreal d);
void KAsm2Changed(qreal d);
virtual void ChoosedObject(qint64 id, Scene::Scenes type);
virtual void DialogAccepted();
void PointChenged(int row);
void currentPointChanged( int index );
void Angle1Changed( int index );
void Angle2Changed( int index );
void KAsm1Changed(qreal d);
void KAsm2Changed(qreal d);
private:
Q_DISABLE_COPY(DialogSplinePath)
Ui::DialogSplinePath *ui;
VSplinePath path;
void NewItem(qint64 id, qreal kAsm1, qreal angle, qreal kAsm2);
void DataPoint(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2);
void EnableFields();
void SetAngle(qint32 angle);
VSplinePath path;
void NewItem(qint64 id, qreal kAsm1, qreal angle, qreal kAsm2);
void DataPoint(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2);
void EnableFields();
void SetAngle(qint32 angle);
};
#endif // DIALOGSPLINEPATH_H

View File

@ -20,11 +20,7 @@
****************************************************************************/
#include "dialogtool.h"
#include <QListWidgetItem>
#include <QCloseEvent>
#include "container/calculator.h"
#include "geometry/vdetail.h"
#include <QDebug>
#include <container/calculator.h>
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),
@ -36,9 +32,6 @@ DialogTool::DialogTool(const VContainer *data, Draw::Draws mode, QWidget *parent
connect(timerFormula, &QTimer::timeout, this, &DialogTool::EvalFormula);
}
DialogTool::~DialogTool(){
}
void DialogTool::closeEvent(QCloseEvent *event){
DialogClosed(QDialog::Rejected);
event->accept();
@ -214,7 +207,6 @@ void DialogTool::CheckState(){
bOk->setEnabled(flagFormula && flagName);
}
void DialogTool::ChoosedObject(qint64 id, Scene::Scenes type){
Q_UNUSED(id);
Q_UNUSED(type);
@ -456,11 +448,3 @@ void DialogTool::ShowVariable(const QHash<key, val> *var){
connect(listWidget, &QListWidget::currentRowChanged, this, &DialogTool::ValChenged);
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
#include <QDialog>
#include <QComboBox>
#include <QDoubleSpinBox>
#include <QPushButton>
#include <QLineEdit>
#include <QListWidget>
#include <QLabel>
#include <QRadioButton>
#include <QTimer>
#include "container/vcontainer.h"
#include <container/vcontainer.h>
class DialogTool : public QDialog{
Q_OBJECT
public:
DialogTool(const VContainer *data, Draw::Draws mode = Draw::Calculation,
QWidget *parent = 0);
virtual ~DialogTool();
qint64 getIdDetail() const;
void setIdDetail(const qint64 &value);
virtual ~DialogTool() {}
inline qint64 getIdDetail() const {return idDetail;}
inline void setIdDetail(const qint64 &value) {idDetail = value;}
signals:
void DialogClosed(int result);
void ToolTip(const QString &toolTip);
@ -91,7 +83,7 @@ protected:
QRadioButton *radioButtonLengthArc;
QRadioButton *radioButtonLengthCurve;
qint64 idDetail;
Draw::Draws mode;
Draw::Draws mode;
bool CheckObject(const qint64 &id);
virtual void closeEvent ( QCloseEvent * event );
virtual void showEvent( QShowEvent *event );

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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