Refactoring.
--HG-- branch : feature
This commit is contained in:
parent
f141edad27
commit
c52d0a045d
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
DialogAlongLine::DialogAlongLine(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogAlongLine::DialogAlongLine(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogAlongLine),
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogAlongLine),
|
||||||
typeLine(QString()), formula(QString()), formulaBaseHeight(0), line(nullptr), lineColor(VAbstractTool::ColorBlack)
|
formula(QString()), formulaBaseHeight(0), line(nullptr), lineColor(VAbstractTool::ColorBlack)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
InitVariables(ui);
|
||||||
|
@ -180,14 +180,14 @@ void DialogAlongLine::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
void DialogAlongLine::SaveData()
|
void DialogAlongLine::SaveData()
|
||||||
{
|
{
|
||||||
pointName = ui->lineEditNamePoint->text();
|
pointName = ui->lineEditNamePoint->text();
|
||||||
typeLine = GetTypeLine(ui->comboBoxLineType);
|
|
||||||
formula = ui->plainTextEditFormula->toPlainText();
|
formula = ui->plainTextEditFormula->toPlainText();
|
||||||
formula.replace("\n", " ");
|
formula.replace("\n", " ");
|
||||||
|
|
||||||
line->setPoint1Id(getFirstPointId());
|
line->setPoint1Id(getFirstPointId());
|
||||||
line->setPoint2Id(getSecondPointId());
|
line->setPoint2Id(getSecondPointId());
|
||||||
line->setLength(formula);
|
line->setLength(formula);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
|
||||||
line->RefreshGeometry();
|
line->RefreshGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,9 +245,8 @@ void DialogAlongLine::setFormula(const QString &value)
|
||||||
*/
|
*/
|
||||||
void DialogAlongLine::setTypeLine(const QString &value)
|
void DialogAlongLine::setTypeLine(const QString &value)
|
||||||
{
|
{
|
||||||
typeLine = value;
|
|
||||||
ChangeCurrentData(ui->comboBoxLineType, value);
|
ChangeCurrentData(ui->comboBoxLineType, value);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -281,7 +280,7 @@ void DialogAlongLine::setPointName(const QString &value)
|
||||||
*/
|
*/
|
||||||
QString DialogAlongLine::getTypeLine() const
|
QString DialogAlongLine::getTypeLine() const
|
||||||
{
|
{
|
||||||
return typeLine;
|
return GetTypeLine(ui->comboBoxLineType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -88,9 +88,6 @@ private:
|
||||||
/** @brief ui keeps information about user interface */
|
/** @brief ui keeps information about user interface */
|
||||||
Ui::DialogAlongLine *ui;
|
Ui::DialogAlongLine *ui;
|
||||||
|
|
||||||
/** @brief typeLine type of line */
|
|
||||||
QString typeLine;
|
|
||||||
|
|
||||||
/** @brief formula formula */
|
/** @brief formula formula */
|
||||||
QString formula;
|
QString formula;
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
* @param parent parent widget
|
* @param parent parent widget
|
||||||
*/
|
*/
|
||||||
DialogBisector::DialogBisector(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogBisector::DialogBisector(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogBisector), typeLine(QString()),
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogBisector), formula(QString()), formulaBaseHeight(0),
|
||||||
formula(QString()), formulaBaseHeight(0), line(nullptr)
|
line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
InitVariables(ui);
|
||||||
|
@ -216,9 +216,8 @@ void DialogBisector::setPointName(const QString &value)
|
||||||
*/
|
*/
|
||||||
void DialogBisector::setTypeLine(const QString &value)
|
void DialogBisector::setTypeLine(const QString &value)
|
||||||
{
|
{
|
||||||
typeLine = value;
|
|
||||||
ChangeCurrentData(ui->comboBoxLineType, value);
|
ChangeCurrentData(ui->comboBoxLineType, value);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -276,7 +275,7 @@ void DialogBisector::setThirdPointId(const quint32 &value)
|
||||||
void DialogBisector::SaveData()
|
void DialogBisector::SaveData()
|
||||||
{
|
{
|
||||||
pointName = ui->lineEditNamePoint->text();
|
pointName = ui->lineEditNamePoint->text();
|
||||||
typeLine = GetTypeLine(ui->comboBoxLineType);
|
|
||||||
formula = ui->plainTextEditFormula->toPlainText();
|
formula = ui->plainTextEditFormula->toPlainText();
|
||||||
formula.replace("\n", " ");
|
formula.replace("\n", " ");
|
||||||
|
|
||||||
|
@ -284,7 +283,7 @@ void DialogBisector::SaveData()
|
||||||
line->setPoint2Id(getSecondPointId());
|
line->setPoint2Id(getSecondPointId());
|
||||||
line->setPoint3Id(getThirdPointId());
|
line->setPoint3Id(getThirdPointId());
|
||||||
line->setLength(formula);
|
line->setLength(formula);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
|
||||||
line->RefreshGeometry();
|
line->RefreshGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,7 +301,7 @@ void DialogBisector::closeEvent(QCloseEvent *event)
|
||||||
*/
|
*/
|
||||||
QString DialogBisector::getTypeLine() const
|
QString DialogBisector::getTypeLine() const
|
||||||
{
|
{
|
||||||
return typeLine;
|
return GetTypeLine(ui->comboBoxLineType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -89,9 +89,6 @@ private:
|
||||||
/** @brief ui keeps information about user interface */
|
/** @brief ui keeps information about user interface */
|
||||||
Ui::DialogBisector *ui;
|
Ui::DialogBisector *ui;
|
||||||
|
|
||||||
/** @brief typeLine type of line */
|
|
||||||
QString typeLine;
|
|
||||||
|
|
||||||
/** @brief formula formula */
|
/** @brief formula formula */
|
||||||
QString formula;
|
QString formula;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogCurveIntersectAxis::DialogCurveIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogCurveIntersectAxis::DialogCurveIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogCurveIntersectAxis), typeLine(QString()),
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogCurveIntersectAxis),
|
||||||
formulaAngle(QString()), formulaBaseHeightAngle(0), line(nullptr)
|
formulaAngle(QString()), formulaBaseHeightAngle(0), line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
@ -90,15 +90,14 @@ void DialogCurveIntersectAxis::setPointName(const QString &value)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QString DialogCurveIntersectAxis::getTypeLine() const
|
QString DialogCurveIntersectAxis::getTypeLine() const
|
||||||
{
|
{
|
||||||
return typeLine;
|
return GetTypeLine(ui->comboBoxLineType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogCurveIntersectAxis::setTypeLine(const QString &value)
|
void DialogCurveIntersectAxis::setTypeLine(const QString &value)
|
||||||
{
|
{
|
||||||
typeLine = value;
|
|
||||||
ChangeCurrentData(ui->comboBoxLineType, value);
|
ChangeCurrentData(ui->comboBoxLineType, value);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -252,7 +251,6 @@ void DialogCurveIntersectAxis::ShowVisualization()
|
||||||
void DialogCurveIntersectAxis::SaveData()
|
void DialogCurveIntersectAxis::SaveData()
|
||||||
{
|
{
|
||||||
pointName = ui->lineEditNamePoint->text();
|
pointName = ui->lineEditNamePoint->text();
|
||||||
typeLine = GetTypeLine(ui->comboBoxLineType);
|
|
||||||
|
|
||||||
formulaAngle = ui->plainTextEditFormula->toPlainText();
|
formulaAngle = ui->plainTextEditFormula->toPlainText();
|
||||||
formulaAngle.replace("\n", " ");
|
formulaAngle.replace("\n", " ");
|
||||||
|
@ -260,7 +258,7 @@ void DialogCurveIntersectAxis::SaveData()
|
||||||
line->setPoint1Id(getCurveId());
|
line->setPoint1Id(getCurveId());
|
||||||
line->setAxisPointId(getBasePointId());
|
line->setAxisPointId(getBasePointId());
|
||||||
line->setAngle(formulaAngle);
|
line->setAngle(formulaAngle);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
|
||||||
line->RefreshGeometry();
|
line->RefreshGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,9 +77,6 @@ private:
|
||||||
Q_DISABLE_COPY(DialogCurveIntersectAxis)
|
Q_DISABLE_COPY(DialogCurveIntersectAxis)
|
||||||
Ui::DialogCurveIntersectAxis *ui;
|
Ui::DialogCurveIntersectAxis *ui;
|
||||||
|
|
||||||
/** @brief typeLine type of line */
|
|
||||||
QString typeLine;
|
|
||||||
|
|
||||||
QString formulaAngle;
|
QString formulaAngle;
|
||||||
int formulaBaseHeightAngle;
|
int formulaBaseHeightAngle;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
* @param parent parent widget
|
* @param parent parent widget
|
||||||
*/
|
*/
|
||||||
DialogEndLine::DialogEndLine(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogEndLine::DialogEndLine(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogEndLine), typeLine(QString()),
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogEndLine),
|
||||||
formulaLength(QString()), formulaAngle(QString()), formulaBaseHeight(0), formulaBaseHeightAngle(0), line(nullptr)
|
formulaLength(QString()), formulaAngle(QString()), formulaBaseHeight(0), formulaBaseHeightAngle(0), line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
@ -170,9 +170,8 @@ void DialogEndLine::setPointName(const QString &value)
|
||||||
*/
|
*/
|
||||||
void DialogEndLine::setTypeLine(const QString &value)
|
void DialogEndLine::setTypeLine(const QString &value)
|
||||||
{
|
{
|
||||||
typeLine = value;
|
|
||||||
ChangeCurrentData(ui->comboBoxLineType, value);
|
ChangeCurrentData(ui->comboBoxLineType, value);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -273,7 +272,6 @@ void DialogEndLine::ShowVisualization()
|
||||||
void DialogEndLine::SaveData()
|
void DialogEndLine::SaveData()
|
||||||
{
|
{
|
||||||
pointName = ui->lineEditNamePoint->text();
|
pointName = ui->lineEditNamePoint->text();
|
||||||
typeLine = GetTypeLine(ui->comboBoxLineType);
|
|
||||||
|
|
||||||
formulaLength = ui->plainTextEditFormula->toPlainText();
|
formulaLength = ui->plainTextEditFormula->toPlainText();
|
||||||
formulaLength.replace("\n", " ");
|
formulaLength.replace("\n", " ");
|
||||||
|
@ -284,7 +282,7 @@ void DialogEndLine::SaveData()
|
||||||
line->setPoint1Id(getBasePointId());
|
line->setPoint1Id(getBasePointId());
|
||||||
line->setLength(formulaLength);
|
line->setLength(formulaLength);
|
||||||
line->setAngle(formulaAngle);
|
line->setAngle(formulaAngle);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
|
||||||
line->RefreshGeometry();
|
line->RefreshGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,7 +311,7 @@ DialogEndLine::~DialogEndLine()
|
||||||
*/
|
*/
|
||||||
QString DialogEndLine::getTypeLine() const
|
QString DialogEndLine::getTypeLine() const
|
||||||
{
|
{
|
||||||
return typeLine;
|
return GetTypeLine(ui->comboBoxLineType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -90,9 +90,6 @@ private:
|
||||||
/** @brief ui keeps information about user interface */
|
/** @brief ui keeps information about user interface */
|
||||||
Ui::DialogEndLine *ui;
|
Ui::DialogEndLine *ui;
|
||||||
|
|
||||||
/** @brief typeLine type of line */
|
|
||||||
QString typeLine;
|
|
||||||
|
|
||||||
/** @brief formula formula */
|
/** @brief formula formula */
|
||||||
QString formulaLength;
|
QString formulaLength;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
* @param parent parent widget
|
* @param parent parent widget
|
||||||
*/
|
*/
|
||||||
DialogHeight::DialogHeight(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogHeight::DialogHeight(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogHeight), typeLine(QString()), line(nullptr)
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogHeight), line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
|
@ -95,9 +95,8 @@ void DialogHeight::setPointName(const QString &value)
|
||||||
*/
|
*/
|
||||||
void DialogHeight::setTypeLine(const QString &value)
|
void DialogHeight::setTypeLine(const QString &value)
|
||||||
{
|
{
|
||||||
typeLine = value;
|
|
||||||
ChangeCurrentData(ui->comboBoxLineType, value);
|
ChangeCurrentData(ui->comboBoxLineType, value);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -196,12 +195,11 @@ void DialogHeight::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
void DialogHeight::SaveData()
|
void DialogHeight::SaveData()
|
||||||
{
|
{
|
||||||
pointName = ui->lineEditNamePoint->text();
|
pointName = ui->lineEditNamePoint->text();
|
||||||
typeLine = GetTypeLine(ui->comboBoxLineType);
|
|
||||||
|
|
||||||
line->setPoint1Id(getBasePointId());
|
line->setPoint1Id(getBasePointId());
|
||||||
line->setLineP1Id(getP1LineId());
|
line->setLineP1Id(getP1LineId());
|
||||||
line->setLineP2Id(getP2LineId());
|
line->setLineP2Id(getP2LineId());
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
|
||||||
line->RefreshGeometry();
|
line->RefreshGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,7 +265,7 @@ void DialogHeight::ShowVisualization()
|
||||||
*/
|
*/
|
||||||
QString DialogHeight::getTypeLine() const
|
QString DialogHeight::getTypeLine() const
|
||||||
{
|
{
|
||||||
return typeLine;
|
return GetTypeLine(ui->comboBoxLineType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -77,9 +77,6 @@ private:
|
||||||
/** @brief ui keeps information about user interface */
|
/** @brief ui keeps information about user interface */
|
||||||
Ui::DialogHeight *ui;
|
Ui::DialogHeight *ui;
|
||||||
|
|
||||||
/** @brief typeLine type of line */
|
|
||||||
QString typeLine;
|
|
||||||
|
|
||||||
VisToolHeight *line;
|
VisToolHeight *line;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
* @param parent parent widget
|
* @param parent parent widget
|
||||||
*/
|
*/
|
||||||
DialogLine::DialogLine(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogLine::DialogLine(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogLine), typeLine(QString()), line(nullptr)
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogLine), line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitOkCancelApply(ui);
|
InitOkCancelApply(ui);
|
||||||
|
@ -94,9 +94,8 @@ void DialogLine::setSecondPoint(const quint32 &value)
|
||||||
*/
|
*/
|
||||||
void DialogLine::setTypeLine(const QString &value)
|
void DialogLine::setTypeLine(const QString &value)
|
||||||
{
|
{
|
||||||
typeLine = value;
|
|
||||||
ChangeCurrentData(ui->comboBoxLineType, value);
|
ChangeCurrentData(ui->comboBoxLineType, value);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -153,11 +152,9 @@ void DialogLine::ShowVisualization()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogLine::SaveData()
|
void DialogLine::SaveData()
|
||||||
{
|
{
|
||||||
typeLine = GetTypeLine(ui->comboBoxLineType);
|
|
||||||
|
|
||||||
line->setPoint1Id(getFirstPoint());
|
line->setPoint1Id(getFirstPoint());
|
||||||
line->setPoint2Id(getSecondPoint());
|
line->setPoint2Id(getSecondPoint());
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
|
||||||
line->RefreshGeometry();
|
line->RefreshGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,5 +224,5 @@ quint32 DialogLine::getSecondPoint() const
|
||||||
*/
|
*/
|
||||||
QString DialogLine::getTypeLine() const
|
QString DialogLine::getTypeLine() const
|
||||||
{
|
{
|
||||||
return typeLine;
|
return GetTypeLine(ui->comboBoxLineType);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,8 +72,6 @@ private:
|
||||||
/** @brief ui keeps information about user interface */
|
/** @brief ui keeps information about user interface */
|
||||||
Ui::DialogLine *ui;
|
Ui::DialogLine *ui;
|
||||||
|
|
||||||
/** @brief typeLine type of line */
|
|
||||||
QString typeLine;
|
|
||||||
VisToolLine *line;
|
VisToolLine *line;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogLineIntersectAxis::DialogLineIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogLineIntersectAxis::DialogLineIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogLineIntersectAxis), typeLine(QString()),
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogLineIntersectAxis), formulaAngle(QString()),
|
||||||
formulaAngle(QString()), formulaBaseHeightAngle(0), line(nullptr)
|
formulaBaseHeightAngle(0), line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
InitVariables(ui);
|
||||||
|
@ -98,15 +98,14 @@ void DialogLineIntersectAxis::setPointName(const QString &value)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QString DialogLineIntersectAxis::getTypeLine() const
|
QString DialogLineIntersectAxis::getTypeLine() const
|
||||||
{
|
{
|
||||||
return typeLine;
|
return GetTypeLine(ui->comboBoxLineType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogLineIntersectAxis::setTypeLine(const QString &value)
|
void DialogLineIntersectAxis::setTypeLine(const QString &value)
|
||||||
{
|
{
|
||||||
typeLine = value;
|
|
||||||
ChangeCurrentData(ui->comboBoxLineType, value);
|
ChangeCurrentData(ui->comboBoxLineType, value);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -316,7 +315,6 @@ void DialogLineIntersectAxis::ShowVisualization()
|
||||||
void DialogLineIntersectAxis::SaveData()
|
void DialogLineIntersectAxis::SaveData()
|
||||||
{
|
{
|
||||||
pointName = ui->lineEditNamePoint->text();
|
pointName = ui->lineEditNamePoint->text();
|
||||||
typeLine = GetTypeLine(ui->comboBoxLineType);
|
|
||||||
|
|
||||||
formulaAngle = ui->plainTextEditFormula->toPlainText();
|
formulaAngle = ui->plainTextEditFormula->toPlainText();
|
||||||
formulaAngle.replace("\n", " ");
|
formulaAngle.replace("\n", " ");
|
||||||
|
@ -325,7 +323,7 @@ void DialogLineIntersectAxis::SaveData()
|
||||||
line->setPoint2Id(getSecondPointId());
|
line->setPoint2Id(getSecondPointId());
|
||||||
line->setAxisPointId(getBasePointId());
|
line->setAxisPointId(getBasePointId());
|
||||||
line->setAngle(formulaAngle);
|
line->setAngle(formulaAngle);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
|
||||||
line->RefreshGeometry();
|
line->RefreshGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,9 +81,6 @@ private:
|
||||||
Q_DISABLE_COPY(DialogLineIntersectAxis)
|
Q_DISABLE_COPY(DialogLineIntersectAxis)
|
||||||
Ui::DialogLineIntersectAxis *ui;
|
Ui::DialogLineIntersectAxis *ui;
|
||||||
|
|
||||||
/** @brief typeLine type of line */
|
|
||||||
QString typeLine;
|
|
||||||
|
|
||||||
QString formulaAngle;
|
QString formulaAngle;
|
||||||
int formulaBaseHeightAngle;
|
int formulaBaseHeightAngle;
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@
|
||||||
* @param parent parent widget
|
* @param parent parent widget
|
||||||
*/
|
*/
|
||||||
DialogNormal::DialogNormal(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogNormal::DialogNormal(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogNormal), typeLine(QString()),
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogNormal), formula(QString()), angle(0), formulaBaseHeight(0),
|
||||||
formula(QString()), angle(0), formulaBaseHeight(0), line(nullptr)
|
line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
InitVariables(ui);
|
||||||
|
@ -173,7 +173,6 @@ void DialogNormal::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
void DialogNormal::SaveData()
|
void DialogNormal::SaveData()
|
||||||
{
|
{
|
||||||
pointName = ui->lineEditNamePoint->text();
|
pointName = ui->lineEditNamePoint->text();
|
||||||
typeLine = GetTypeLine(ui->comboBoxLineType);
|
|
||||||
formula = ui->plainTextEditFormula->toPlainText();
|
formula = ui->plainTextEditFormula->toPlainText();
|
||||||
formula.replace("\n", " ");
|
formula.replace("\n", " ");
|
||||||
angle = ui->doubleSpinBoxAngle->value();
|
angle = ui->doubleSpinBoxAngle->value();
|
||||||
|
@ -182,7 +181,7 @@ void DialogNormal::SaveData()
|
||||||
line->setPoint2Id(getSecondPointId());
|
line->setPoint2Id(getSecondPointId());
|
||||||
line->setLength(formula);
|
line->setLength(formula);
|
||||||
line->setAngle(angle);
|
line->setAngle(angle);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
|
||||||
line->RefreshGeometry();
|
line->RefreshGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,9 +251,8 @@ void DialogNormal::setFormula(const QString &value)
|
||||||
*/
|
*/
|
||||||
void DialogNormal::setTypeLine(const QString &value)
|
void DialogNormal::setTypeLine(const QString &value)
|
||||||
{
|
{
|
||||||
typeLine = value;
|
|
||||||
ChangeCurrentData(ui->comboBoxLineType, value);
|
ChangeCurrentData(ui->comboBoxLineType, value);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -275,7 +273,7 @@ void DialogNormal::setPointName(const QString &value)
|
||||||
*/
|
*/
|
||||||
QString DialogNormal::getTypeLine() const
|
QString DialogNormal::getTypeLine() const
|
||||||
{
|
{
|
||||||
return typeLine;
|
return GetTypeLine(ui->comboBoxLineType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -88,9 +88,6 @@ private:
|
||||||
/** @brief ui keeps information about user interface */
|
/** @brief ui keeps information about user interface */
|
||||||
Ui::DialogNormal *ui;
|
Ui::DialogNormal *ui;
|
||||||
|
|
||||||
/** @brief typeLine type of line */
|
|
||||||
QString typeLine;
|
|
||||||
|
|
||||||
/** @brief formula formula */
|
/** @brief formula formula */
|
||||||
QString formula;
|
QString formula;
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
* @param parent parent widget
|
* @param parent parent widget
|
||||||
*/
|
*/
|
||||||
DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogShoulderPoint), typeLine(QString()),
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogShoulderPoint), formula(QString()),
|
||||||
formula(QString()), formulaBaseHeight(0), line (nullptr)
|
formulaBaseHeight(0), line (nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
InitVariables(ui);
|
||||||
|
@ -201,7 +201,6 @@ void DialogShoulderPoint::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
void DialogShoulderPoint::SaveData()
|
void DialogShoulderPoint::SaveData()
|
||||||
{
|
{
|
||||||
pointName = ui->lineEditNamePoint->text();
|
pointName = ui->lineEditNamePoint->text();
|
||||||
typeLine = GetTypeLine(ui->comboBoxLineType);
|
|
||||||
formula = ui->plainTextEditFormula->toPlainText();
|
formula = ui->plainTextEditFormula->toPlainText();
|
||||||
formula.replace("\n", " ");
|
formula.replace("\n", " ");
|
||||||
|
|
||||||
|
@ -209,7 +208,7 @@ void DialogShoulderPoint::SaveData()
|
||||||
line->setLineP1Id(getP1Line());
|
line->setLineP1Id(getP1Line());
|
||||||
line->setLineP2Id(getP2Line());
|
line->setLineP2Id(getP2Line());
|
||||||
line->setLength(formula);
|
line->setLength(formula);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
|
||||||
line->RefreshGeometry();
|
line->RefreshGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,9 +277,8 @@ void DialogShoulderPoint::setFormula(const QString &value)
|
||||||
*/
|
*/
|
||||||
void DialogShoulderPoint::setTypeLine(const QString &value)
|
void DialogShoulderPoint::setTypeLine(const QString &value)
|
||||||
{
|
{
|
||||||
typeLine = value;
|
|
||||||
ChangeCurrentData(ui->comboBoxLineType, value);
|
ChangeCurrentData(ui->comboBoxLineType, value);
|
||||||
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
|
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -301,7 +299,7 @@ void DialogShoulderPoint::setPointName(const QString &value)
|
||||||
*/
|
*/
|
||||||
QString DialogShoulderPoint::getTypeLine() const
|
QString DialogShoulderPoint::getTypeLine() const
|
||||||
{
|
{
|
||||||
return typeLine;
|
return GetTypeLine(ui->comboBoxLineType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -88,9 +88,6 @@ private:
|
||||||
/** @brief ui keeps information about user interface */
|
/** @brief ui keeps information about user interface */
|
||||||
Ui::DialogShoulderPoint *ui;
|
Ui::DialogShoulderPoint *ui;
|
||||||
|
|
||||||
/** @brief typeLine type of line */
|
|
||||||
QString typeLine;
|
|
||||||
|
|
||||||
/** @brief formula formula */
|
/** @brief formula formula */
|
||||||
QString formula;
|
QString formula;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user