Refactoring.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-02-03 12:17:04 +02:00
parent 4572da85c8
commit cf2aea280d
112 changed files with 1050 additions and 1066 deletions

View File

@ -40,10 +40,10 @@ class VContainer;
* Note. If created to many parser for different purpes in the same time parser can work wrong.
* Example:
* DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data);
* dialog->setFormula(formula);
* dialog->SetFormula(formula);
* if (dialog->exec() == QDialog::Accepted)
* {
* formula = dialog->getFormula();
* formula = dialog->GetFormula();
* //Need delete dialog here because parser in dialog don't allow use correct separator for parsing here.
* //Don't know why.
* delete dialog;

View File

@ -56,7 +56,7 @@ VFormula &VFormula::operator=(const VFormula &formula)
{
return *this;
}
this->formula = formula.getFormula();
this->formula = formula.GetFormula();
this->value = formula.getStringValue();
this->checkZero = formula.getCheckZero();
this->data = formula.getData();
@ -69,7 +69,7 @@ VFormula &VFormula::operator=(const VFormula &formula)
//---------------------------------------------------------------------------------------------------------------------
VFormula::VFormula(const VFormula &formula)
:formula(formula.getFormula()), value(formula.getStringValue()), checkZero(formula.getCheckZero()),
:formula(formula.GetFormula()), value(formula.getStringValue()), checkZero(formula.getCheckZero()),
data(formula.getData()), toolId(formula.getToolId()), postfix(formula.getPostfix()), _error(formula.error()),
dValue(formula.getDoubleValue())
{}
@ -78,7 +78,7 @@ VFormula::VFormula(const VFormula &formula)
bool VFormula::operator==(const VFormula &formula) const
{
bool isEqual = false;
if (this->formula == formula.getFormula() && this->value == formula.getStringValue() &&
if (this->formula == formula.GetFormula() && this->value == formula.getStringValue() &&
this->checkZero == formula.getCheckZero() && this->data == formula.getData() &&
this->toolId == formula.getToolId() && this->postfix == formula.getPostfix() &&
this->_error == formula.error() && qFuzzyCompare(this->dValue, formula.getDoubleValue()))
@ -94,7 +94,7 @@ bool VFormula::operator!=(const VFormula &formula) const
}
//---------------------------------------------------------------------------------------------------------------------
QString VFormula::getFormula(FormulaType type) const
QString VFormula::GetFormula(FormulaType type) const
{
if (type == FormulaType::ToUser)
{
@ -107,7 +107,7 @@ QString VFormula::getFormula(FormulaType type) const
}
//---------------------------------------------------------------------------------------------------------------------
void VFormula::setFormula(const QString &value, FormulaType type)
void VFormula::SetFormula(const QString &value, FormulaType type)
{
if (formula != value)
{

View File

@ -46,8 +46,8 @@ public:
bool operator==(const VFormula &formula) const;
bool operator!=(const VFormula &formula) const;
QString getFormula(FormulaType type = FormulaType::ToUser) const;
void setFormula(const QString &value, FormulaType type = FormulaType::ToUser);
QString GetFormula(FormulaType type = FormulaType::ToUser) const;
void SetFormula(const QString &value, FormulaType type = FormulaType::ToUser);
QString getStringValue() const;
qreal getDoubleValue() const;

View File

@ -183,10 +183,10 @@ void DialogAlongLine::SaveData()
formula = ui->plainTextEditFormula->toPlainText();
formula.replace("\n", " ");
line->setPoint1Id(getFirstPointId());
line->setPoint2Id(getSecondPointId());
line->setPoint1Id(GetFirstPointId());
line->setPoint2Id(GetSecondPointId());
line->setLength(formula);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine()));
line->RefreshGeometry();
}
@ -199,10 +199,10 @@ void DialogAlongLine::closeEvent(QCloseEvent *event)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setSecondPointId set id second point of line
* @brief SetSecondPointId set id second point of line
* @param value id
*/
void DialogAlongLine::setSecondPointId(const quint32 &value)
void DialogAlongLine::SetSecondPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxSecondPoint, value);
line->setPoint2Id(value);
@ -210,10 +210,10 @@ void DialogAlongLine::setSecondPointId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFirstPointId set id first point of line
* @brief SetFirstPointId set id first point of line
* @param value id
*/
void DialogAlongLine::setFirstPointId(const quint32 &value)
void DialogAlongLine::SetFirstPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxFirstPoint, value);
line->setPoint1Id(value);
@ -221,10 +221,10 @@ void DialogAlongLine::setFirstPointId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFormula set string of formula
* @brief SetFormula set string of formula
* @param value formula
*/
void DialogAlongLine::setFormula(const QString &value)
void DialogAlongLine::SetFormula(const QString &value)
{
formula = qApp->FormulaToUser(value);
// increase height if needed.
@ -239,33 +239,33 @@ void DialogAlongLine::setFormula(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setTypeLine set type of line
* @brief SetTypeLine set type of line
* @param value type
*/
void DialogAlongLine::setTypeLine(const QString &value)
void DialogAlongLine::SetTypeLine(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineType, value);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogAlongLine::getLineColor() const
QString DialogAlongLine::GetLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
return GetComboBoxCurrentData(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogAlongLine::setLineColor(const QString &value)
void DialogAlongLine::SetLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogAlongLine::setPointName(const QString &value)
void DialogAlongLine::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -273,40 +273,40 @@ void DialogAlongLine::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line
* @brief GetTypeLine return type of line
* @return type
*/
QString DialogAlongLine::getTypeLine() const
QString DialogAlongLine::GetTypeLine() const
{
return GetTypeLine(ui->comboBoxLineType);
return GetComboBoxCurrentData(ui->comboBoxLineType);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFormula return string of formula
* @brief GetFormula return string of formula
* @return formula
*/
QString DialogAlongLine::getFormula() const
QString DialogAlongLine::GetFormula() const
{
return qApp->FormulaFromUser(formula);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFirstPointId return id first point of line
* @brief GetFirstPointId return id first point of line
* @return id
*/
quint32 DialogAlongLine::getFirstPointId() const
quint32 DialogAlongLine::GetFirstPointId() const
{
return getCurrentObjectId(ui->comboBoxFirstPoint);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getSecondPointId return id second point of line
* @brief GetSecondPointId return id second point of line
* @return id
*/
quint32 DialogAlongLine::getSecondPointId() const
quint32 DialogAlongLine::GetSecondPointId() const
{
return getCurrentObjectId(ui->comboBoxSecondPoint);
}

View File

@ -48,22 +48,22 @@ public:
DialogAlongLine(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogAlongLine();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getTypeLine() const;
void setTypeLine(const QString &value);
QString GetTypeLine() const;
void SetTypeLine(const QString &value);
QString getLineColor() const;
void setLineColor(const QString &value);
QString GetLineColor() const;
void SetLineColor(const QString &value);
QString getFormula() const;
void setFormula(const QString &value);
QString GetFormula() const;
void SetFormula(const QString &value);
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
/**

View File

@ -157,7 +157,7 @@ void DialogArc::SetF2(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
QString DialogArc::GetColor() const
{
return GetLineColor(ui->comboBoxColor);
return GetComboBoxCurrentData(ui->comboBoxColor);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -200,10 +200,10 @@ void DialogBisector::ChosenObject(quint32 id, const SceneObject &type)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogBisector::setPointName(const QString &value)
void DialogBisector::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -211,10 +211,10 @@ void DialogBisector::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setTypeLine set type of line
* @brief SetTypeLine set type of line
* @param value type
*/
void DialogBisector::setTypeLine(const QString &value)
void DialogBisector::SetTypeLine(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineType, value);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
@ -222,10 +222,10 @@ void DialogBisector::setTypeLine(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFormula set string of formula
* @brief SetFormula set string of formula
* @param value formula
*/
void DialogBisector::setFormula(const QString &value)
void DialogBisector::SetFormula(const QString &value)
{
formula = qApp->FormulaToUser(value);
// increase height if needed.
@ -240,10 +240,10 @@ void DialogBisector::setFormula(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFirstPointId set id of first point
* @brief SetFirstPointId set id of first point
* @param value id
*/
void DialogBisector::setFirstPointId(const quint32 &value)
void DialogBisector::SetFirstPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxFirstPoint, value);
line->setPoint1Id(value);
@ -251,10 +251,10 @@ void DialogBisector::setFirstPointId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setSecondPointId set id of second point
* @brief SetSecondPointId set id of second point
* @param value id
*/
void DialogBisector::setSecondPointId(const quint32 &value)
void DialogBisector::SetSecondPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxSecondPoint, value);
line->setPoint2Id(value);
@ -262,23 +262,23 @@ void DialogBisector::setSecondPointId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setThirdPointId set id of third point
* @brief SetThirdPointId set id of third point
* @param value id
*/
void DialogBisector::setThirdPointId(const quint32 &value)
void DialogBisector::SetThirdPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxThirdPoint, value);
line->setPoint3Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogBisector::getLineColor() const
QString DialogBisector::GetLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
return GetComboBoxCurrentData(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogBisector::setLineColor(const QString &value)
void DialogBisector::SetLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
@ -291,11 +291,11 @@ void DialogBisector::SaveData()
formula = ui->plainTextEditFormula->toPlainText();
formula.replace("\n", " ");
line->setPoint1Id(getFirstPointId());
line->setPoint2Id(getSecondPointId());
line->setPoint3Id(getThirdPointId());
line->setPoint1Id(GetFirstPointId());
line->setPoint2Id(GetSecondPointId());
line->setPoint3Id(GetThirdPointId());
line->setLength(formula);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine()));
line->RefreshGeometry();
}
@ -308,50 +308,50 @@ void DialogBisector::closeEvent(QCloseEvent *event)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line
* @brief GetTypeLine return type of line
* @return type
*/
QString DialogBisector::getTypeLine() const
QString DialogBisector::GetTypeLine() const
{
return GetTypeLine(ui->comboBoxLineType);
return GetComboBoxCurrentData(ui->comboBoxLineType);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFormula return string of formula
* @brief GetFormula return string of formula
* @return formula
*/
QString DialogBisector::getFormula() const
QString DialogBisector::GetFormula() const
{
return qApp->FormulaFromUser(formula);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFirstPointId return id of first point
* @brief GetFirstPointId return id of first point
* @return id
*/
quint32 DialogBisector::getFirstPointId() const
quint32 DialogBisector::GetFirstPointId() const
{
return getCurrentObjectId(ui->comboBoxFirstPoint);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getSecondPointId return id of second point
* @brief GetSecondPointId return id of second point
* @return id
*/
quint32 DialogBisector::getSecondPointId() const
quint32 DialogBisector::GetSecondPointId() const
{
return getCurrentObjectId(ui->comboBoxSecondPoint);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getThirdPointId return id of third point
* @brief GetThirdPointId return id of third point
* @return id
*/
quint32 DialogBisector::getThirdPointId() const
quint32 DialogBisector::GetThirdPointId() const
{
return getCurrentObjectId(ui->comboBoxThirdPoint);
}

View File

@ -49,25 +49,25 @@ public:
DialogBisector(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogBisector();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getTypeLine() const;
void setTypeLine(const QString &value);
QString GetTypeLine() const;
void SetTypeLine(const QString &value);
QString getFormula() const;
void setFormula(const QString &value);
QString GetFormula() const;
void SetFormula(const QString &value);
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
quint32 getThirdPointId() const;
void setThirdPointId(const quint32 &value);
quint32 GetThirdPointId() const;
void SetThirdPointId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
QString GetLineColor() const;
void SetLineColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
/**

View File

@ -81,33 +81,33 @@ DialogCurveIntersectAxis::~DialogCurveIntersectAxis()
}
//---------------------------------------------------------------------------------------------------------------------
void DialogCurveIntersectAxis::setPointName(const QString &value)
void DialogCurveIntersectAxis::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogCurveIntersectAxis::getTypeLine() const
QString DialogCurveIntersectAxis::GetTypeLine() const
{
return GetTypeLine(ui->comboBoxLineType);
return GetComboBoxCurrentData(ui->comboBoxLineType);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogCurveIntersectAxis::setTypeLine(const QString &value)
void DialogCurveIntersectAxis::SetTypeLine(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineType, value);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogCurveIntersectAxis::getAngle() const
QString DialogCurveIntersectAxis::GetAngle() const
{
return qApp->FormulaFromUser(formulaAngle);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogCurveIntersectAxis::setAngle(const QString &value)
void DialogCurveIntersectAxis::SetAngle(const QString &value)
{
formulaAngle = qApp->FormulaToUser(value);
// increase height if needed. TODO : see if I can get the max number of caracters in one line
@ -117,18 +117,18 @@ void DialogCurveIntersectAxis::setAngle(const QString &value)
this->DeployAngleTextEdit();
}
ui->plainTextEditFormula->setPlainText(formulaAngle);
line->setAngle(formulaAngle);
line->SetAngle(formulaAngle);
MoveCursorToEnd(ui->plainTextEditFormula);
}
//---------------------------------------------------------------------------------------------------------------------
quint32 DialogCurveIntersectAxis::getBasePointId() const
quint32 DialogCurveIntersectAxis::GetBasePointId() const
{
return getCurrentObjectId(ui->comboBoxAxisPoint);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogCurveIntersectAxis::setBasePointId(const quint32 &value)
void DialogCurveIntersectAxis::SetBasePointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxAxisPoint, value);
line->setAxisPointId(value);
@ -148,13 +148,13 @@ void DialogCurveIntersectAxis::setCurveId(const quint32 &value)
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogCurveIntersectAxis::getLineColor() const
QString DialogCurveIntersectAxis::GetLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
return GetComboBoxCurrentData(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogCurveIntersectAxis::setLineColor(const QString &value)
void DialogCurveIntersectAxis::SetLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
@ -169,7 +169,7 @@ void DialogCurveIntersectAxis::ShowDialog(bool click)
/*We will ignore click if poinet is in point circle*/
VMainGraphicsScene *scene = qApp->getCurrentScene();
SCASSERT(scene != nullptr);
const QSharedPointer<VPointF> point = data->GeometricObject<VPointF>(getBasePointId());
const QSharedPointer<VPointF> point = data->GeometricObject<VPointF>(GetBasePointId());
QLineF line = QLineF(point->toQPointF(), scene->getScenePos());
//Radius of point circle, but little bigger. Need handle with hover sizes.
@ -180,7 +180,7 @@ void DialogCurveIntersectAxis::ShowDialog(bool click)
}
}
this->setModal(true);
this->setAngle(line->Angle());//Show in dialog angle what user choose
this->SetAngle(line->Angle());//Show in dialog angle what user choose
emit ToolTip("");
timerFormula->start();
this->show();
@ -268,9 +268,9 @@ void DialogCurveIntersectAxis::SaveData()
formulaAngle.replace("\n", " ");
line->setPoint1Id(getCurveId());
line->setAxisPointId(getBasePointId());
line->setAngle(formulaAngle);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
line->setAxisPointId(GetBasePointId());
line->SetAngle(formulaAngle);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine()));
line->RefreshGeometry();
}

View File

@ -45,22 +45,22 @@ public:
DialogCurveIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogCurveIntersectAxis();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getTypeLine() const;
void setTypeLine(const QString &value);
QString GetTypeLine() const;
void SetTypeLine(const QString &value);
QString getAngle() const;
void setAngle(const QString &value);
QString GetAngle() const;
void SetAngle(const QString &value);
quint32 getBasePointId() const;
void setBasePointId(const quint32 &value);
quint32 GetBasePointId() const;
void SetBasePointId(const quint32 &value);
quint32 getCurveId() const;
void setCurveId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
QString GetLineColor() const;
void SetLineColor(const QString &value);
virtual void ShowDialog(bool click);
public slots:

View File

@ -159,10 +159,10 @@ void DialogCutArc::setArcId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFormula set string with formula length
* @brief SetFormula set string with formula length
* @param value string with formula
*/
void DialogCutArc::setFormula(const QString &value)
void DialogCutArc::SetFormula(const QString &value)
{
formula = qApp->FormulaToUser(value);
// increase height if needed.
@ -177,10 +177,10 @@ void DialogCutArc::setFormula(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name point on arc
* @brief SetPointName set name point on arc
* @param value name
*/
void DialogCutArc::setPointName(const QString &value)
void DialogCutArc::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -188,10 +188,10 @@ void DialogCutArc::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFormula return string with formula length
* @brief GetFormula return string with formula length
* @return formula
*/
QString DialogCutArc::getFormula() const
QString DialogCutArc::GetFormula() const
{
return qApp->FormulaFromUser(formula);
}

View File

@ -49,10 +49,10 @@ public:
DialogCutArc(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogCutArc();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getFormula() const;
void setFormula(const QString &value);
QString GetFormula() const;
void SetFormula(const QString &value);
quint32 getArcId() const;
void setArcId(const quint32 &value);

View File

@ -80,10 +80,10 @@ DialogCutSpline::~DialogCutSpline()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogCutSpline::setPointName(const QString &value)
void DialogCutSpline::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -91,10 +91,10 @@ void DialogCutSpline::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFormula set string of formula
* @brief SetFormula set string of formula
* @param value formula
*/
void DialogCutSpline::setFormula(const QString &value)
void DialogCutSpline::SetFormula(const QString &value)
{
formula = qApp->FormulaToUser(value);
// increase height if needed. TODO : see if I can get the max number of caracters in one line
@ -181,10 +181,10 @@ void DialogCutSpline::ShowVisualization()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFormula return string of formula
* @brief GetFormula return string of formula
* @return formula
*/
QString DialogCutSpline::getFormula() const
QString DialogCutSpline::GetFormula() const
{
return qApp->FormulaFromUser(formula);
}

View File

@ -48,10 +48,10 @@ public:
DialogCutSpline(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogCutSpline();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getFormula() const;
void setFormula(const QString &value);
QString GetFormula() const;
void SetFormula(const QString &value);
quint32 getSplineId() const;
void setSplineId(const quint32 &value);

View File

@ -80,10 +80,10 @@ DialogCutSplinePath::~DialogCutSplinePath()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogCutSplinePath::setPointName(const QString &value)
void DialogCutSplinePath::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -91,10 +91,10 @@ void DialogCutSplinePath::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFormula set string of formula
* @brief SetFormula set string of formula
* @param value formula
*/
void DialogCutSplinePath::setFormula(const QString &value)
void DialogCutSplinePath::SetFormula(const QString &value)
{
formula = qApp->FormulaToUser(value);
// increase height if needed. TODO : see if I can get the max number of caracters in one line
@ -181,10 +181,10 @@ void DialogCutSplinePath::ShowVisualization()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFormula return string of formula
* @brief GetFormula return string of formula
* @return formula
*/
QString DialogCutSplinePath::getFormula() const
QString DialogCutSplinePath::GetFormula() const
{
return qApp->FormulaFromUser(formula);
}

View File

@ -48,10 +48,10 @@ public:
DialogCutSplinePath(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogCutSplinePath();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getFormula() const;
void setFormula(const QString &value);
QString GetFormula() const;
void SetFormula(const QString &value);
quint32 getSplinePathId() const;
void setSplinePathId(const quint32 &value);

View File

@ -121,7 +121,7 @@ void DialogEditWrongFormula::closeEvent(QCloseEvent *event)
}
//---------------------------------------------------------------------------------------------------------------------
void DialogEditWrongFormula::setFormula(const QString &value)
void DialogEditWrongFormula::SetFormula(const QString &value)
{
formula = qApp->FormulaToUser(value);
// increase height if needed. TODO : see if I can get the max number of caracters in one line
@ -147,7 +147,7 @@ void DialogEditWrongFormula::setPostfix(const QString &value)
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogEditWrongFormula::getFormula() const
QString DialogEditWrongFormula::GetFormula() const
{
return qApp->FormulaFromUser(formula);
}

View File

@ -51,8 +51,8 @@ public:
explicit DialogEditWrongFormula(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogEditWrongFormula();
QString getFormula() const;
void setFormula(const QString &value);
QString GetFormula() const;
void SetFormula(const QString &value);
void setCheckZero(bool value);
void setPostfix(const QString &value);
public slots:

View File

@ -154,10 +154,10 @@ void DialogEndLine::ChosenObject(quint32 id, const SceneObject &type)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogEndLine::setPointName(const QString &value)
void DialogEndLine::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -165,10 +165,10 @@ void DialogEndLine::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setTypeLine set type of line
* @brief SetTypeLine set type of line
* @param value type
*/
void DialogEndLine::setTypeLine(const QString &value)
void DialogEndLine::SetTypeLine(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineType, value);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
@ -176,10 +176,10 @@ void DialogEndLine::setTypeLine(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFormula set string of formula
* @brief SetFormula set string of formula
* @param value formula
*/
void DialogEndLine::setFormula(const QString &value)
void DialogEndLine::SetFormula(const QString &value)
{
formulaLength = qApp->FormulaToUser(value);
// increase height if needed. TODO : see if I can get the max number of caracters in one line
@ -195,10 +195,10 @@ void DialogEndLine::setFormula(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setAngle set angle of line
* @brief SetAngle set angle of line
* @param value angle in degree
*/
void DialogEndLine::setAngle(const QString &value)
void DialogEndLine::SetAngle(const QString &value)
{
formulaAngle = qApp->FormulaToUser(value);
// increase height if needed. TODO : see if I can get the max number of caracters in one line
@ -208,29 +208,29 @@ void DialogEndLine::setAngle(const QString &value)
this->DeployAngleTextEdit();
}
ui->plainTextEditAngle->setPlainText(formulaAngle);
line->setAngle(formulaAngle);
line->SetAngle(formulaAngle);
MoveCursorToEnd(ui->plainTextEditAngle);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setBasePointId set id base point of line
* @brief SetBasePointId set id base point of line
* @param value id
*/
void DialogEndLine::setBasePointId(const quint32 &value)
void DialogEndLine::SetBasePointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxBasePoint, value);
line->setPoint1Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogEndLine::getLineColor() const
QString DialogEndLine::GetLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
return GetComboBoxCurrentData(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogEndLine::setLineColor(const QString &value)
void DialogEndLine::SetLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
@ -249,7 +249,7 @@ void DialogEndLine::ShowDialog(bool click)
/*We will ignore click if poinet is in point circle*/
VMainGraphicsScene *scene = qApp->getCurrentScene();
SCASSERT(scene != nullptr);
const QSharedPointer<VPointF> point = data->GeometricObject<VPointF>(getBasePointId());
const QSharedPointer<VPointF> point = data->GeometricObject<VPointF>(GetBasePointId());
QLineF line = QLineF(point->toQPointF(), scene->getScenePos());
//Radius of point circle, but little bigger. Need handle with hover sizes.
@ -260,7 +260,7 @@ void DialogEndLine::ShowDialog(bool click)
}
}
this->setModal(true);
this->setAngle(line->Angle());//Show in dialog angle what user choose
this->SetAngle(line->Angle());//Show in dialog angle what user choose
emit ToolTip("");
timerFormula->start();
this->show();
@ -291,10 +291,10 @@ void DialogEndLine::SaveData()
formulaAngle = ui->plainTextEditAngle->toPlainText();
formulaAngle.replace("\n", " ");
line->setPoint1Id(getBasePointId());
line->setPoint1Id(GetBasePointId());
line->setLength(formulaLength);
line->setAngle(formulaAngle);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
line->SetAngle(formulaAngle);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine()));
line->RefreshGeometry();
}
@ -318,40 +318,40 @@ DialogEndLine::~DialogEndLine()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line
* @brief GetTypeLine return type of line
* @return type
*/
QString DialogEndLine::getTypeLine() const
QString DialogEndLine::GetTypeLine() const
{
return GetTypeLine(ui->comboBoxLineType);
return GetComboBoxCurrentData(ui->comboBoxLineType);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFormula return string of formula
* @brief GetFormula return string of formula
* @return formula
*/
QString DialogEndLine::getFormula() const
QString DialogEndLine::GetFormula() const
{
return qApp->FormulaFromUser(formulaLength);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getAngle return formula angle of line
* @brief GetAngle return formula angle of line
* @return angle formula
*/
QString DialogEndLine::getAngle() const
QString DialogEndLine::GetAngle() const
{
return qApp->FormulaFromUser(formulaAngle);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getBasePointId return id base point of line
* @brief GetBasePointId return id base point of line
* @return id
*/
quint32 DialogEndLine::getBasePointId() const
quint32 DialogEndLine::GetBasePointId() const
{
return getCurrentObjectId(ui->comboBoxBasePoint);
}

View File

@ -48,22 +48,22 @@ public:
DialogEndLine(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogEndLine();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getTypeLine() const;
void setTypeLine(const QString &value);
QString GetTypeLine() const;
void SetTypeLine(const QString &value);
QString getFormula() const;
void setFormula(const QString &value);
QString GetFormula() const;
void SetFormula(const QString &value);
QString getAngle() const;
void setAngle(const QString &value);
QString GetAngle() const;
void SetAngle(const QString &value);
quint32 getBasePointId() const;
void setBasePointId(const quint32 &value);
quint32 GetBasePointId() const;
void SetBasePointId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
QString GetLineColor() const;
void SetLineColor(const QString &value);
virtual void ShowDialog(bool click);
public slots:

View File

@ -79,10 +79,10 @@ DialogHeight::~DialogHeight()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogHeight::setPointName(const QString &value)
void DialogHeight::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -90,10 +90,10 @@ void DialogHeight::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setTypeLine set type of line
* @brief SetTypeLine set type of line
* @param value type
*/
void DialogHeight::setTypeLine(const QString &value)
void DialogHeight::SetTypeLine(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineType, value);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
@ -101,10 +101,10 @@ void DialogHeight::setTypeLine(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setBasePointId set id base point of height
* @brief SetBasePointId set id base point of height
* @param value id
*/
void DialogHeight::setBasePointId(const quint32 &value)
void DialogHeight::SetBasePointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxBasePoint, value);
line->setPoint1Id(value);
@ -112,10 +112,10 @@ void DialogHeight::setBasePointId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP1LineId set id first point of line
* @brief SetP1LineId set id first point of line
* @param value id
*/
void DialogHeight::setP1LineId(const quint32 &value)
void DialogHeight::SetP1LineId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP1Line, value);
line->setLineP1Id(value);
@ -123,23 +123,23 @@ void DialogHeight::setP1LineId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP2LineId set id second point of line
* @brief SetP2LineId set id second point of line
* @param value id
*/
void DialogHeight::setP2LineId(const quint32 &value)
void DialogHeight::SetP2LineId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP2Line, value);
line->setLineP2Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogHeight::getLineColor() const
QString DialogHeight::GetLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
return GetComboBoxCurrentData(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogHeight::setLineColor(const QString &value)
void DialogHeight::SetLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
@ -208,10 +208,10 @@ void DialogHeight::SaveData()
{
pointName = ui->lineEditNamePoint->text();
line->setPoint1Id(getBasePointId());
line->setLineP1Id(getP1LineId());
line->setLineP2Id(getP2LineId());
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
line->setPoint1Id(GetBasePointId());
line->setLineP1Id(GetP1LineId());
line->setLineP2Id(GetP2LineId());
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine()));
line->RefreshGeometry();
}
@ -272,40 +272,40 @@ void DialogHeight::ShowVisualization()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line
* @brief GetTypeLine return type of line
* @return type
*/
QString DialogHeight::getTypeLine() const
QString DialogHeight::GetTypeLine() const
{
return GetTypeLine(ui->comboBoxLineType);
return GetComboBoxCurrentData(ui->comboBoxLineType);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getBasePointId return id base point of height
* @brief GetBasePointId return id base point of height
* @return id
*/
quint32 DialogHeight::getBasePointId() const
quint32 DialogHeight::GetBasePointId() const
{
return getCurrentObjectId(ui->comboBoxBasePoint);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getP1LineId return id first point of line
* @brief GetP1LineId return id first point of line
* @return id id
*/
quint32 DialogHeight::getP1LineId() const
quint32 DialogHeight::GetP1LineId() const
{
return getCurrentObjectId(ui->comboBoxP1Line);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getP2LineId return id second point of line
* @brief GetP2LineId return id second point of line
* @return id
*/
quint32 DialogHeight::getP2LineId() const
quint32 DialogHeight::GetP2LineId() const
{
return getCurrentObjectId(ui->comboBoxP2Line);
}

View File

@ -48,22 +48,22 @@ public:
DialogHeight(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogHeight();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getTypeLine() const;
void setTypeLine(const QString &value);
QString GetTypeLine() const;
void SetTypeLine(const QString &value);
quint32 getBasePointId() const;
void setBasePointId(const quint32 &value);
quint32 GetBasePointId() const;
void SetBasePointId(const quint32 &value);
quint32 getP1LineId() const;
void setP1LineId(const quint32 &value);
quint32 GetP1LineId() const;
void SetP1LineId(const quint32 &value);
quint32 getP2LineId() const;
void setP2LineId(const quint32 &value);
quint32 GetP2LineId() const;
void SetP2LineId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
QString GetLineColor() const;
void SetLineColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
virtual void PointNameChanged();

View File

@ -78,10 +78,10 @@ DialogLine::~DialogLine()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setSecondPoint set id second point
* @brief SetSecondPoint set id second point
* @param value id
*/
void DialogLine::setSecondPoint(const quint32 &value)
void DialogLine::SetSecondPoint(const quint32 &value)
{
setCurrentPointId(ui->comboBoxSecondPoint, value);
line->setPoint2Id(value);
@ -89,33 +89,33 @@ void DialogLine::setSecondPoint(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setTypeLine set type of line
* @brief SetTypeLine set type of line
* @param value type
*/
void DialogLine::setTypeLine(const QString &value)
void DialogLine::SetTypeLine(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineType, value);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogLine::getLineColor() const
QString DialogLine::GetLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
return GetComboBoxCurrentData(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLine::setLineColor(const QString &value)
void DialogLine::SetLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFirstPoint set id first point
* @brief SetFirstPoint set id first point
* @param value id
*/
void DialogLine::setFirstPoint(const quint32 &value)
void DialogLine::SetFirstPoint(const quint32 &value)
{
setCurrentPointId(ui->comboBoxFirstPoint, value);
line->setPoint1Id(value);
@ -164,9 +164,9 @@ void DialogLine::ShowVisualization()
//---------------------------------------------------------------------------------------------------------------------
void DialogLine::SaveData()
{
line->setPoint1Id(getFirstPoint());
line->setPoint2Id(getSecondPoint());
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
line->setPoint1Id(GetFirstPoint());
line->setPoint2Id(GetSecondPoint());
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine()));
line->RefreshGeometry();
}
@ -211,30 +211,30 @@ void DialogLine::ChosenObject(quint32 id, const SceneObject &type)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFirstPoint return id first point
* @brief GetFirstPoint return id first point
* @return id
*/
quint32 DialogLine::getFirstPoint() const
quint32 DialogLine::GetFirstPoint() const
{
return qvariant_cast<quint32>(ui->comboBoxFirstPoint->currentData());
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getSecondPoint return id second point
* @brief GetSecondPoint return id second point
* @return id
*/
quint32 DialogLine::getSecondPoint() const
quint32 DialogLine::GetSecondPoint() const
{
return qvariant_cast<quint32>(ui->comboBoxSecondPoint->currentData());
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line
* @brief GetTypeLine return type of line
* @return type
*/
QString DialogLine::getTypeLine() const
QString DialogLine::GetTypeLine() const
{
return GetTypeLine(ui->comboBoxLineType);
return GetComboBoxCurrentData(ui->comboBoxLineType);
}

View File

@ -48,17 +48,17 @@ public:
DialogLine(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogLine();
quint32 getFirstPoint() const;
void setFirstPoint(const quint32 &value);
quint32 GetFirstPoint() const;
void SetFirstPoint(const quint32 &value);
quint32 getSecondPoint() const;
void setSecondPoint(const quint32 &value);
quint32 GetSecondPoint() const;
void SetSecondPoint(const quint32 &value);
QString getTypeLine() const;
void setTypeLine(const QString &value);
QString GetTypeLine() const;
void SetTypeLine(const QString &value);
QString getLineColor() const;
void setLineColor(const QString &value);
QString GetLineColor() const;
void SetLineColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
virtual void PointNameChanged();

View File

@ -165,10 +165,10 @@ void DialogLineIntersect::SaveData()
{
pointName = ui->lineEditNamePoint->text();
line->setPoint1Id(getP1Line1());
line->setLine1P2Id(getP2Line1());
line->setLine2P1Id(getP1Line2());
line->setLine2P2Id(getP2Line2());
line->setPoint1Id(GetP1Line1());
line->setLine1P2Id(GetP2Line1());
line->setLine2P1Id(GetP1Line2());
line->setLine2P2Id(GetP2Line2());
line->RefreshGeometry();
}
@ -263,10 +263,10 @@ void DialogLineIntersect::CheckState()
*/
bool DialogLineIntersect::CheckIntersecion()
{
const QSharedPointer<VPointF> p1L1 = data->GeometricObject<VPointF>(getP1Line1());
const QSharedPointer<VPointF> p2L1 = data->GeometricObject<VPointF>(getP2Line1());
const QSharedPointer<VPointF> p1L2 = data->GeometricObject<VPointF>(getP1Line2());
const QSharedPointer<VPointF> p2L2 = data->GeometricObject<VPointF>(getP2Line2());
const QSharedPointer<VPointF> p1L1 = data->GeometricObject<VPointF>(GetP1Line1());
const QSharedPointer<VPointF> p2L1 = data->GeometricObject<VPointF>(GetP2Line1());
const QSharedPointer<VPointF> p1L2 = data->GeometricObject<VPointF>(GetP1Line2());
const QSharedPointer<VPointF> p2L2 = data->GeometricObject<VPointF>(GetP2Line2());
QLineF line1(p1L1->toQPointF(), p2L1->toQPointF());
QLineF line2(p1L2->toQPointF(), p2L2->toQPointF());
@ -284,10 +284,10 @@ bool DialogLineIntersect::CheckIntersecion()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP2Line2 set id second point of second line
* @brief SetP2Line2 set id second point of second line
* @param value id
*/
void DialogLineIntersect::setP2Line2(const quint32 &value)
void DialogLineIntersect::SetP2Line2(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP2Line2, value);
line->setLine2P2Id(value);
@ -295,10 +295,10 @@ void DialogLineIntersect::setP2Line2(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP1Line2 set id first point of second line
* @brief SetP1Line2 set id first point of second line
* @param value id
*/
void DialogLineIntersect::setP1Line2(const quint32 &value)
void DialogLineIntersect::SetP1Line2(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP1Line2, value);
line->setLine2P1Id(value);
@ -306,10 +306,10 @@ void DialogLineIntersect::setP1Line2(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP2Line1 set id second point of first line
* @brief SetP2Line1 set id second point of first line
* @param value id
*/
void DialogLineIntersect::setP2Line1(const quint32 &value)
void DialogLineIntersect::SetP2Line1(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP2Line1, value);
line->setLine1P2Id(value);
@ -317,10 +317,10 @@ void DialogLineIntersect::setP2Line1(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP1Line1 set id first point of first line
* @brief SetP1Line1 set id first point of first line
* @param value id
*/
void DialogLineIntersect::setP1Line1(const quint32 &value)
void DialogLineIntersect::SetP1Line1(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP1Line1, value);
line->setPoint1Id(value);
@ -328,10 +328,10 @@ void DialogLineIntersect::setP1Line1(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name of point
*/
void DialogLineIntersect::setPointName(const QString &value)
void DialogLineIntersect::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -339,40 +339,40 @@ void DialogLineIntersect::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getP1Line1 return id first point of first line
* @brief GetP1Line1 return id first point of first line
* @return id
*/
quint32 DialogLineIntersect::getP1Line1() const
quint32 DialogLineIntersect::GetP1Line1() const
{
return getCurrentObjectId(ui->comboBoxP1Line1);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getP2Line1 return id second point of first line
* @brief GetP2Line1 return id second point of first line
* @return id
*/
quint32 DialogLineIntersect::getP2Line1() const
quint32 DialogLineIntersect::GetP2Line1() const
{
return getCurrentObjectId(ui->comboBoxP2Line1);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getP1Line2 return id first point of second line
* @brief GetP1Line2 return id first point of second line
* @return id
*/
quint32 DialogLineIntersect::getP1Line2() const
quint32 DialogLineIntersect::GetP1Line2() const
{
return getCurrentObjectId(ui->comboBoxP1Line2);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getP2Line2 return id second point of second line
* @brief GetP2Line2 return id second point of second line
* @return id
*/
quint32 DialogLineIntersect::getP2Line2() const
quint32 DialogLineIntersect::GetP2Line2() const
{
return getCurrentObjectId(ui->comboBoxP2Line2);
}

View File

@ -48,19 +48,19 @@ public:
DialogLineIntersect(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogLineIntersect();
quint32 getP1Line1() const;
void setP1Line1(const quint32 &value);
quint32 GetP1Line1() const;
void SetP1Line1(const quint32 &value);
quint32 getP2Line1() const;
void setP2Line1(const quint32 &value);
quint32 GetP2Line1() const;
void SetP2Line1(const quint32 &value);
quint32 getP1Line2() const;
void setP1Line2(const quint32 &value);
quint32 GetP1Line2() const;
void SetP1Line2(const quint32 &value);
quint32 getP2Line2() const;
void setP2Line2(const quint32 &value);
quint32 GetP2Line2() const;
void SetP2Line2(const quint32 &value);
void setPointName(const QString &value);
void SetPointName(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
void PointChanged();

View File

@ -89,33 +89,33 @@ DialogLineIntersectAxis::~DialogLineIntersectAxis()
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::setPointName(const QString &value)
void DialogLineIntersectAxis::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogLineIntersectAxis::getTypeLine() const
QString DialogLineIntersectAxis::GetTypeLine() const
{
return GetTypeLine(ui->comboBoxLineType);
return GetComboBoxCurrentData(ui->comboBoxLineType);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::setTypeLine(const QString &value)
void DialogLineIntersectAxis::SetTypeLine(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineType, value);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogLineIntersectAxis::getAngle() const
QString DialogLineIntersectAxis::GetAngle() const
{
return qApp->FormulaFromUser(formulaAngle);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::setAngle(const QString &value)
void DialogLineIntersectAxis::SetAngle(const QString &value)
{
formulaAngle = qApp->FormulaToUser(value);
// increase height if needed. TODO : see if I can get the max number of caracters in one line
@ -125,57 +125,57 @@ void DialogLineIntersectAxis::setAngle(const QString &value)
this->DeployAngleTextEdit();
}
ui->plainTextEditFormula->setPlainText(formulaAngle);
line->setAngle(formulaAngle);
line->SetAngle(formulaAngle);
MoveCursorToEnd(ui->plainTextEditFormula);
}
//---------------------------------------------------------------------------------------------------------------------
quint32 DialogLineIntersectAxis::getBasePointId() const
quint32 DialogLineIntersectAxis::GetBasePointId() const
{
return getCurrentObjectId(ui->comboBoxAxisPoint);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::setBasePointId(const quint32 &value)
void DialogLineIntersectAxis::SetBasePointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxAxisPoint, value);
line->setAxisPointId(value);
}
//---------------------------------------------------------------------------------------------------------------------
quint32 DialogLineIntersectAxis::getFirstPointId() const
quint32 DialogLineIntersectAxis::GetFirstPointId() const
{
return getCurrentObjectId(ui->comboBoxFirstLinePoint);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::setFirstPointId(const quint32 &value)
void DialogLineIntersectAxis::SetFirstPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxFirstLinePoint, value);
line->setPoint1Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
quint32 DialogLineIntersectAxis::getSecondPointId() const
quint32 DialogLineIntersectAxis::GetSecondPointId() const
{
return getCurrentObjectId(ui->comboBoxSecondLinePoint);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::setSecondPointId(const quint32 &value)
void DialogLineIntersectAxis::SetSecondPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxSecondLinePoint, value);
line->setPoint2Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogLineIntersectAxis::getLineColor() const
QString DialogLineIntersectAxis::GetLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
return GetComboBoxCurrentData(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::setLineColor(const QString &value)
void DialogLineIntersectAxis::SetLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
@ -190,7 +190,7 @@ void DialogLineIntersectAxis::ShowDialog(bool click)
/*We will ignore click if poinet is in point circle*/
VMainGraphicsScene *scene = qApp->getCurrentScene();
SCASSERT(scene != nullptr);
const QSharedPointer<VPointF> point = data->GeometricObject<VPointF>(getBasePointId());
const QSharedPointer<VPointF> point = data->GeometricObject<VPointF>(GetBasePointId());
QLineF line = QLineF(point->toQPointF(), scene->getScenePos());
//Radius of point circle, but little bigger. Need handle with hover sizes.
@ -201,7 +201,7 @@ void DialogLineIntersectAxis::ShowDialog(bool click)
}
}
this->setModal(true);
this->setAngle(line->Angle());//Show in dialog angle what user choose
this->SetAngle(line->Angle());//Show in dialog angle what user choose
emit ToolTip("");
timerFormula->start();
this->show();
@ -331,11 +331,11 @@ void DialogLineIntersectAxis::SaveData()
formulaAngle = ui->plainTextEditFormula->toPlainText();
formulaAngle.replace("\n", " ");
line->setPoint1Id(getFirstPointId());
line->setPoint2Id(getSecondPointId());
line->setAxisPointId(getBasePointId());
line->setAngle(formulaAngle);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
line->setPoint1Id(GetFirstPointId());
line->setPoint2Id(GetSecondPointId());
line->setAxisPointId(GetBasePointId());
line->SetAngle(formulaAngle);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine()));
line->RefreshGeometry();
}

View File

@ -45,25 +45,25 @@ public:
DialogLineIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogLineIntersectAxis();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getTypeLine() const;
void setTypeLine(const QString &value);
QString GetTypeLine() const;
void SetTypeLine(const QString &value);
QString getAngle() const;
void setAngle(const QString &value);
QString GetAngle() const;
void SetAngle(const QString &value);
quint32 getBasePointId() const;
void setBasePointId(const quint32 &value);
quint32 GetBasePointId() const;
void SetBasePointId(const quint32 &value);
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
QString GetLineColor() const;
void SetLineColor(const QString &value);
virtual void ShowDialog(bool click);
public slots:

View File

@ -177,11 +177,11 @@ void DialogNormal::SaveData()
formula.replace("\n", " ");
angle = ui->doubleSpinBoxAngle->value();
line->setPoint1Id(getFirstPointId());
line->setPoint2Id(getSecondPointId());
line->setPoint1Id(GetFirstPointId());
line->setPoint2Id(GetSecondPointId());
line->setLength(formula);
line->setAngle(angle);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
line->SetAngle(angle);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine()));
line->RefreshGeometry();
}
@ -194,33 +194,33 @@ void DialogNormal::closeEvent(QCloseEvent *event)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setSecondPointId set id of second point
* @brief SetSecondPointId set id of second point
* @param value id
*/
void DialogNormal::setSecondPointId(const quint32 &value)
void DialogNormal::SetSecondPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxSecondPoint, value);
line->setPoint2Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogNormal::getLineColor() const
QString DialogNormal::GetLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
return GetComboBoxCurrentData(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogNormal::setLineColor(const QString &value)
void DialogNormal::SetLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFirstPointId set id of first point
* @brief SetFirstPointId set id of first point
* @param value id
*/
void DialogNormal::setFirstPointId(const quint32 &value)
void DialogNormal::SetFirstPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxFirstPoint, value);
line->setPoint1Id(value);
@ -228,22 +228,22 @@ void DialogNormal::setFirstPointId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setAngle set aditional angle of normal
* @brief SetAngle set aditional angle of normal
* @param value angle in degree
*/
void DialogNormal::setAngle(const qreal &value)
void DialogNormal::SetAngle(const qreal &value)
{
angle = value;
ui->doubleSpinBoxAngle->setValue(angle);
line->setAngle(angle);
line->SetAngle(angle);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFormula set string of formula
* @brief SetFormula set string of formula
* @param value formula
*/
void DialogNormal::setFormula(const QString &value)
void DialogNormal::SetFormula(const QString &value)
{
formula = qApp->FormulaToUser(value);
// increase height if needed.
@ -258,10 +258,10 @@ void DialogNormal::setFormula(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setTypeLine set type of line
* @brief SetTypeLine set type of line
* @param value type
*/
void DialogNormal::setTypeLine(const QString &value)
void DialogNormal::SetTypeLine(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineType, value);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
@ -269,10 +269,10 @@ void DialogNormal::setTypeLine(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogNormal::setPointName(const QString &value)
void DialogNormal::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -280,50 +280,50 @@ void DialogNormal::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line
* @brief GetTypeLine return type of line
* @return type
*/
QString DialogNormal::getTypeLine() const
QString DialogNormal::GetTypeLine() const
{
return GetTypeLine(ui->comboBoxLineType);
return GetComboBoxCurrentData(ui->comboBoxLineType);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFormula return string of formula
* @brief GetFormula return string of formula
* @return formula
*/
QString DialogNormal::getFormula() const
QString DialogNormal::GetFormula() const
{
return qApp->FormulaFromUser(formula);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getAngle return aditional angle of normal
* @brief GetAngle return aditional angle of normal
* @return angle in degree
*/
qreal DialogNormal::getAngle() const
qreal DialogNormal::GetAngle() const
{
return angle;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFirstPointId return id of first point
* @brief GetFirstPointId return id of first point
* @return id
*/
quint32 DialogNormal::getFirstPointId() const
quint32 DialogNormal::GetFirstPointId() const
{
return getCurrentObjectId(ui->comboBoxFirstPoint);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getSecondPointId return id of second point
* @brief GetSecondPointId return id of second point
* @return id
*/
quint32 DialogNormal::getSecondPointId() const
quint32 DialogNormal::GetSecondPointId() const
{
return getCurrentObjectId(ui->comboBoxSecondPoint);
}

View File

@ -48,25 +48,25 @@ public:
DialogNormal(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogNormal();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getTypeLine() const;
void setTypeLine(const QString &value);
QString GetTypeLine() const;
void SetTypeLine(const QString &value);
QString getFormula() const;
void setFormula(const QString &value);
QString GetFormula() const;
void SetFormula(const QString &value);
qreal getAngle() const;
void setAngle(const qreal &value);
qreal GetAngle() const;
void SetAngle(const qreal &value);
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
QString GetLineColor() const;
void SetLineColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
/**

View File

@ -218,8 +218,8 @@ void DialogPointOfContact::SaveData()
radius = ui->plainTextEditFormula->toPlainText();
radius.replace("\n", " ");
line->setPoint1Id(getFirstPoint());
line->setLineP2Id(getSecondPoint());
line->setPoint1Id(GetFirstPoint());
line->setLineP2Id(GetSecondPoint());
line->setRadiusId(getCenter());
line->setRadius(radius);
line->RefreshGeometry();
@ -234,10 +234,10 @@ void DialogPointOfContact::closeEvent(QCloseEvent *event)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setSecondPoint set id second point
* @brief SetSecondPoint set id second point
* @param value id
*/
void DialogPointOfContact::setSecondPoint(const quint32 &value)
void DialogPointOfContact::SetSecondPoint(const quint32 &value)
{
setCurrentPointId(ui->comboBoxSecondPoint, value);
line->setLineP2Id(value);
@ -245,10 +245,10 @@ void DialogPointOfContact::setSecondPoint(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFirstPoint set id first point
* @brief SetFirstPoint set id first point
* @param value id
*/
void DialogPointOfContact::setFirstPoint(const quint32 &value)
void DialogPointOfContact::SetFirstPoint(const quint32 &value)
{
setCurrentPointId(ui->comboBoxFirstPoint, value);
line->setPoint1Id(value);
@ -285,10 +285,10 @@ void DialogPointOfContact::setRadius(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogPointOfContact::setPointName(const QString &value)
void DialogPointOfContact::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -316,20 +316,20 @@ quint32 DialogPointOfContact::getCenter() const
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFirstPoint return id first point
* @brief GetFirstPoint return id first point
* @return id
*/
quint32 DialogPointOfContact::getFirstPoint() const
quint32 DialogPointOfContact::GetFirstPoint() const
{
return getCurrentObjectId(ui->comboBoxFirstPoint);;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getSecondPoint return id second point
* @brief GetSecondPoint return id second point
* @return id
*/
quint32 DialogPointOfContact::getSecondPoint() const
quint32 DialogPointOfContact::GetSecondPoint() const
{
return getCurrentObjectId(ui->comboBoxSecondPoint);
}

View File

@ -49,7 +49,7 @@ public:
DialogPointOfContact(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
virtual ~DialogPointOfContact();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getRadius() const;
void setRadius(const QString &value);
@ -57,11 +57,11 @@ public:
quint32 getCenter() const;
void setCenter(const quint32 &value);
quint32 getFirstPoint() const;
void setFirstPoint(const quint32 &value);
quint32 GetFirstPoint() const;
void SetFirstPoint(const quint32 &value);
quint32 getSecondPoint() const;
void setSecondPoint(const quint32 &value);
quint32 GetSecondPoint() const;
void SetSecondPoint(const quint32 &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
/**

View File

@ -76,10 +76,10 @@ DialogPointOfIntersection::~DialogPointOfIntersection()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setSecondPointId set id of second point
* @brief SetSecondPointId set id of second point
* @param value id
*/
void DialogPointOfIntersection::setSecondPointId(const quint32 &value)
void DialogPointOfIntersection::SetSecondPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxSecondPoint, value);
line->setPoint2Id(value);
@ -132,8 +132,8 @@ void DialogPointOfIntersection::SaveData()
{
pointName = ui->lineEditNamePoint->text();
line->setPoint1Id(getFirstPointId());
line->setPoint2Id(getSecondPointId());
line->setPoint1Id(GetFirstPointId());
line->setPoint2Id(GetSecondPointId());
line->RefreshGeometry();
}
@ -178,10 +178,10 @@ void DialogPointOfIntersection::ShowVisualization()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFirstPointId set id of first point
* @brief SetFirstPointId set id of first point
* @param value id
*/
void DialogPointOfIntersection::setFirstPointId(const quint32 &value)
void DialogPointOfIntersection::SetFirstPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxFirstPoint, value);
line->setPoint1Id(value);
@ -189,10 +189,10 @@ void DialogPointOfIntersection::setFirstPointId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogPointOfIntersection::setPointName(const QString &value)
void DialogPointOfIntersection::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -200,20 +200,20 @@ void DialogPointOfIntersection::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFirstPointId return id of first point
* @brief GetFirstPointId return id of first point
* @return id
*/
quint32 DialogPointOfIntersection::getFirstPointId() const
quint32 DialogPointOfIntersection::GetFirstPointId() const
{
return getCurrentObjectId(ui->comboBoxFirstPoint);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getSecondPointId return id of second point
* @brief GetSecondPointId return id of second point
* @return id
*/
quint32 DialogPointOfIntersection::getSecondPointId() const
quint32 DialogPointOfIntersection::GetSecondPointId() const
{
return getCurrentObjectId(ui->comboBoxSecondPoint);
}

View File

@ -48,13 +48,13 @@ public:
DialogPointOfIntersection(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogPointOfIntersection();
void setPointName(const QString &value);
void SetPointName(const QString &value);
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
virtual void PointNameChanged();

View File

@ -204,11 +204,11 @@ void DialogShoulderPoint::SaveData()
formula = ui->plainTextEditFormula->toPlainText();
formula.replace("\n", " ");
line->setPoint1Id(getP3());
line->setLineP1Id(getP1Line());
line->setLineP2Id(getP2Line());
line->setPoint1Id(GetP3());
line->setLineP1Id(GetP1Line());
line->setLineP2Id(GetP2Line());
line->setLength(formula);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine()));
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine()));
line->RefreshGeometry();
}
@ -224,30 +224,30 @@ void DialogShoulderPoint::closeEvent(QCloseEvent *event)
* @brief setPShoulder set id shoulder point
* @param value id
*/
void DialogShoulderPoint::setP3(const quint32 &value)
void DialogShoulderPoint::SetP3(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP3, value);
line->setPoint1Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogShoulderPoint::getLineColor() const
QString DialogShoulderPoint::GetLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
return GetComboBoxCurrentData(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogShoulderPoint::setLineColor(const QString &value)
void DialogShoulderPoint::SetLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP2Line set id second point of line
* @brief SetP2Line set id second point of line
* @param value id
*/
void DialogShoulderPoint::setP2Line(const quint32 &value)
void DialogShoulderPoint::SetP2Line(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP2Line, value);
line->setLineP2Id(value);
@ -255,10 +255,10 @@ void DialogShoulderPoint::setP2Line(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP1Line set id first point of line
* @brief SetP1Line set id first point of line
* @param value id
*/
void DialogShoulderPoint::setP1Line(const quint32 &value)
void DialogShoulderPoint::SetP1Line(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP1Line, value);
line->setLineP1Id(value);
@ -266,10 +266,10 @@ void DialogShoulderPoint::setP1Line(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFormula set string of formula
* @brief SetFormula set string of formula
* @param value formula
*/
void DialogShoulderPoint::setFormula(const QString &value)
void DialogShoulderPoint::SetFormula(const QString &value)
{
formula = qApp->FormulaToUser(value);
// increase height if needed.
@ -284,10 +284,10 @@ void DialogShoulderPoint::setFormula(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setTypeLine set type of line
* @brief SetTypeLine set type of line
* @param value type
*/
void DialogShoulderPoint::setTypeLine(const QString &value)
void DialogShoulderPoint::SetTypeLine(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineType, value);
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
@ -295,10 +295,10 @@ void DialogShoulderPoint::setTypeLine(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogShoulderPoint::setPointName(const QString &value)
void DialogShoulderPoint::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -306,40 +306,40 @@ void DialogShoulderPoint::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line
* @brief GetTypeLine return type of line
* @return type
*/
QString DialogShoulderPoint::getTypeLine() const
QString DialogShoulderPoint::GetTypeLine() const
{
return GetTypeLine(ui->comboBoxLineType);
return GetComboBoxCurrentData(ui->comboBoxLineType);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFormula return string of formula
* @brief GetFormula return string of formula
* @return formula
*/
QString DialogShoulderPoint::getFormula() const
QString DialogShoulderPoint::GetFormula() const
{
return qApp->FormulaFromUser(formula);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getP1Line return id first point of line
* @brief GetP1Line return id first point of line
* @return id
*/
quint32 DialogShoulderPoint::getP1Line() const
quint32 DialogShoulderPoint::GetP1Line() const
{
return getCurrentObjectId(ui->comboBoxP1Line);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getP2Line return id second point of line
* @brief GetP2Line return id second point of line
* @return id
*/
quint32 DialogShoulderPoint::getP2Line() const
quint32 DialogShoulderPoint::GetP2Line() const
{
return getCurrentObjectId(ui->comboBoxP2Line);
}
@ -349,7 +349,7 @@ quint32 DialogShoulderPoint::getP2Line() const
* @brief getPShoulder return id shoulder point
* @return id
*/
quint32 DialogShoulderPoint::getP3() const
quint32 DialogShoulderPoint::GetP3() const
{
return getCurrentObjectId(ui->comboBoxP3);
}

View File

@ -48,25 +48,25 @@ public:
DialogShoulderPoint(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogShoulderPoint();
void setPointName(const QString &value);
void SetPointName(const QString &value);
QString getTypeLine() const;
void setTypeLine(const QString &value);
QString GetTypeLine() const;
void SetTypeLine(const QString &value);
QString getFormula() const;
void setFormula(const QString &value);
QString GetFormula() const;
void SetFormula(const QString &value);
quint32 getP1Line() const;
void setP1Line(const quint32 &value);
quint32 GetP1Line() const;
void SetP1Line(const quint32 &value);
quint32 getP2Line() const;
void setP2Line(const quint32 &value);
quint32 GetP2Line() const;
void SetP2Line(const quint32 &value);
quint32 getP3() const;
void setP3(const quint32 &value);
quint32 GetP3() const;
void SetP3(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
QString GetLineColor() const;
void SetLineColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
/**

View File

@ -92,7 +92,7 @@ void DialogSinglePoint::UpdateList()
* @param name name of point
* @param point data for point
*/
void DialogSinglePoint::setData(const QString &name, const QPointF &point)
void DialogSinglePoint::SetData(const QString &name, const QPointF &point)
{
pointName = name;
this->point = point;
@ -113,7 +113,7 @@ DialogSinglePoint::~DialogSinglePoint()
* @brief getPoint return point
* @return point
*/
QPointF DialogSinglePoint::getPoint() const
QPointF DialogSinglePoint::GetPoint() const
{
return point;
}

View File

@ -45,8 +45,10 @@ class DialogSinglePoint : public DialogTool
public:
DialogSinglePoint(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogSinglePoint();
void setData(const QString &name, const QPointF &point);
QPointF getPoint()const;
void SetData(const QString &name, const QPointF &point);
QPointF GetPoint()const;
public slots:
void mousePress(const QPointF &scenePos);
virtual void UpdateList();

View File

@ -71,10 +71,10 @@ DialogSpline::~DialogSpline()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getP1 return id first point of spline
* @brief GetP1 return id first point of spline
* @return id
*/
quint32 DialogSpline::getP1() const
quint32 DialogSpline::GetP1() const
{
return getCurrentObjectId(ui->comboBoxP1);
}
@ -147,13 +147,13 @@ void DialogSpline::SaveData()
kAsm2 = ui->doubleSpinBoxKasm2->value();
kCurve = ui->doubleSpinBoxKcurve->value();
path->setPoint1Id(getP1());
path->setPoint4Id(getP4());
path->setAngle1(angle1);
path->setAngle2(angle2);
path->setKAsm1(kAsm1);
path->setKAsm2(kAsm2);
path->setKCurve(kCurve);
path->setPoint1Id(GetP1());
path->setPoint4Id(GetP4());
path->SetAngle1(angle1);
path->SetAngle2(angle2);
path->SetKAsm1(kAsm1);
path->SetKAsm2(kAsm2);
path->SetKCurve(kCurve);
path->RefreshGeometry();
}
@ -203,82 +203,82 @@ void DialogSpline::ShowVisualization()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setKCurve set coefficient curve
* @brief SetKCurve set coefficient curve
* @param value value. Can be >= 0.
*/
void DialogSpline::setKCurve(const qreal &value)
void DialogSpline::SetKCurve(const qreal &value)
{
kCurve = value;
ui->doubleSpinBoxKcurve->setValue(value);
path->setKCurve(kCurve);
path->SetKCurve(kCurve);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogSpline::getColor() const
QString DialogSpline::GetColor() const
{
return GetLineColor(ui->comboBoxColor);
return GetComboBoxCurrentData(ui->comboBoxColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogSpline::setColor(const QString &value)
void DialogSpline::SetColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setKAsm2 set second coefficient asymmetry
* @brief SetKAsm2 set second coefficient asymmetry
* @param value value. Can be >= 0.
*/
void DialogSpline::setKAsm2(const qreal &value)
void DialogSpline::SetKAsm2(const qreal &value)
{
kAsm2 = value;
ui->doubleSpinBoxKasm2->setValue(value);
path->setKAsm2(kAsm2);
path->SetKAsm2(kAsm2);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setKAsm1 set first coefficient asymmetry
* @brief SetKAsm1 set first coefficient asymmetry
* @param value value. Can be >= 0.
*/
void DialogSpline::setKAsm1(const qreal &value)
void DialogSpline::SetKAsm1(const qreal &value)
{
kAsm1 = value;
ui->doubleSpinBoxKasm1->setValue(value);
path->setKAsm1(kAsm1);
path->SetKAsm1(kAsm1);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setAngle2 set second angle of spline
* @brief SetAngle2 set second angle of spline
* @param value angle in degree
*/
void DialogSpline::setAngle2(const qreal &value)
void DialogSpline::SetAngle2(const qreal &value)
{
angle2 = value;
ui->spinBoxAngle2->setValue(static_cast<qint32>(value));
path->setAngle2(angle2);
path->SetAngle2(angle2);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setAngle1 set first angle of spline
* @brief SetAngle1 set first angle of spline
* @param value angle in degree
*/
void DialogSpline::setAngle1(const qreal &value)
void DialogSpline::SetAngle1(const qreal &value)
{
angle1 = value;
ui->spinBoxAngle1->setValue(static_cast<qint32>(value));
path->setAngle1(angle1);
path->SetAngle1(angle1);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP4 set id fourth point of spline
* @brief SetP4 set id fourth point of spline
* @param value id
*/
void DialogSpline::setP4(const quint32 &value)
void DialogSpline::SetP4(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP4, value);
path->setPoint4Id(value);
@ -286,10 +286,10 @@ void DialogSpline::setP4(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP1 set id first point of spline
* @brief SetP1 set id first point of spline
* @param value id
*/
void DialogSpline::setP1(const quint32 &value)
void DialogSpline::SetP1(const quint32 &value)
{
setCurrentPointId(ui->comboBoxP1, value);
path->setPoint1Id(value);
@ -297,60 +297,60 @@ void DialogSpline::setP1(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getP4 return id fourth point of spline
* @brief GetP4 return id fourth point of spline
* @return id
*/
quint32 DialogSpline::getP4() const
quint32 DialogSpline::GetP4() const
{
return getCurrentObjectId(ui->comboBoxP4);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getAngle1 return first angle of spline
* @brief GetAngle1 return first angle of spline
* @return angle in degree
*/
qreal DialogSpline::getAngle1() const
qreal DialogSpline::GetAngle1() const
{
return angle1;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getAngle2 return second angle of spline
* @brief GetAngle2 return second angle of spline
* @return angle in degree
*/
qreal DialogSpline::getAngle2() const
qreal DialogSpline::GetAngle2() const
{
return angle2;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getKAsm1 return first coefficient asymmetry
* @brief GetKAsm1 return first coefficient asymmetry
* @return value. Can be >= 0.
*/
qreal DialogSpline::getKAsm1() const
qreal DialogSpline::GetKAsm1() const
{
return kAsm1;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getKAsm2 return second coefficient asymmetry
* @brief GetKAsm2 return second coefficient asymmetry
* @return value. Can be >= 0.
*/
qreal DialogSpline::getKAsm2() const
qreal DialogSpline::GetKAsm2() const
{
return kAsm2;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getKCurve return coefficient curve
* @brief GetKCurve return coefficient curve
* @return value. Can be >= 0.
*/
qreal DialogSpline::getKCurve() const
qreal DialogSpline::GetKCurve() const
{
return kCurve;
}

View File

@ -48,29 +48,29 @@ public:
DialogSpline(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogSpline();
quint32 getP1() const;
void setP1(const quint32 &value);
quint32 GetP1() const;
void SetP1(const quint32 &value);
quint32 getP4() const;
void setP4(const quint32 &value);
quint32 GetP4() const;
void SetP4(const quint32 &value);
qreal getAngle1() const;
void setAngle1(const qreal &value);
qreal GetAngle1() const;
void SetAngle1(const qreal &value);
qreal getAngle2() const;
void setAngle2(const qreal &value);
qreal GetAngle2() const;
void SetAngle2(const qreal &value);
qreal getKAsm1() const;
void setKAsm1(const qreal &value);
qreal GetKAsm1() const;
void SetKAsm1(const qreal &value);
qreal getKAsm2() const;
void setKAsm2(const qreal &value);
qreal GetKAsm2() const;
void SetKAsm2(const qreal &value);
qreal getKCurve() const;
void setKCurve(const qreal &value);
qreal GetKCurve() const;
void SetKCurve(const qreal &value);
QString getColor() const;
void setColor(const QString &value);
QString GetColor() const;
void SetColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
virtual void PointNameChanged();

View File

@ -88,20 +88,20 @@ void DialogSplinePath::SetPath(const VSplinePath &value)
NewItem(path.at(i).P().id(), path.at(i).KAsm1(), path.at(i).Angle1(), path.at(i).KAsm2(), path.at(i).Angle2());
}
ui->listWidget->setFocus(Qt::OtherFocusReason);
ui->doubleSpinBoxKcurve->setValue(path.getKCurve());
ui->doubleSpinBoxKcurve->setValue(path.GetKCurve());
visPath->setPath(path);
ui->listWidget->blockSignals(false);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogSplinePath::getColor() const
QString DialogSplinePath::GetColor() const
{
return GetLineColor(ui->comboBoxColor);
return GetComboBoxCurrentData(ui->comboBoxColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogSplinePath::setColor(const QString &value)
void DialogSplinePath::SetColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxColor, value);
}
@ -375,5 +375,5 @@ void DialogSplinePath::SavePath()
QListWidgetItem *item = ui->listWidget->item(i);
path.append( qvariant_cast<VSplinePoint>(item->data(Qt::UserRole)));
}
path.setKCurve(ui->doubleSpinBoxKcurve->value());
path.SetKCurve(ui->doubleSpinBoxKcurve->value());
}

View File

@ -52,8 +52,8 @@ public:
VSplinePath GetPath() const;
void SetPath(const VSplinePath &value);
QString getColor() const;
void setColor(const QString &value);
QString GetColor() const;
void SetColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
void PointChanged(int row);

View File

@ -346,12 +346,7 @@ void DialogTool::FillComboBoxLineColors(QComboBox *box) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line
* @param box combobox
* @return type
*/
QString DialogTool::GetTypeLine(const QComboBox *box) const
QString DialogTool::GetComboBoxCurrentData(const QComboBox *box) const
{
SCASSERT(box != nullptr)
QString value = box->currentData().toString();
@ -362,18 +357,6 @@ QString DialogTool::GetTypeLine(const QComboBox *box) const
return value;
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogTool::GetLineColor(const QComboBox *box) const
{
SCASSERT(box != nullptr)
QString value = box->currentData().toString();
if (value.isEmpty())
{
value = VAbstractTool::ColorBlack;
}
return value;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ChangeCurrentData select item in combobox by id

View File

@ -225,8 +225,7 @@ protected:
void FillComboBoxLineColors(QComboBox *box)const;
virtual void CheckState();
QString GetTypeLine(const QComboBox *box)const;
QString GetLineColor(const QComboBox *box)const;
QString GetComboBoxCurrentData(const QComboBox *box)const;
template <class key, class val>
void ShowVariable(const QMap<key, val> var);
void ChangeCurrentData(QComboBox *box, const QVariant &value) const;

View File

@ -161,10 +161,10 @@ void DialogTriangle::SaveData()
{
pointName = ui->lineEditNamePoint->text();
line->setPoint1Id(getAxisP1Id());
line->setPoint2Id(getAxisP2Id());
line->setHypotenuseP1Id(getFirstPointId());
line->setHypotenuseP2Id(getSecondPointId());
line->setPoint1Id(GetAxisP1Id());
line->setPoint2Id(GetAxisP2Id());
line->setHypotenuseP1Id(GetFirstPointId());
line->setHypotenuseP2Id(GetSecondPointId());
line->RefreshGeometry();
}
@ -218,10 +218,10 @@ void DialogTriangle::ShowVisualization()
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setPointName set name of point
* @brief SetPointName set name of point
* @param value name
*/
void DialogTriangle::setPointName(const QString &value)
void DialogTriangle::SetPointName(const QString &value)
{
pointName = value;
ui->lineEditNamePoint->setText(pointName);
@ -229,10 +229,10 @@ void DialogTriangle::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setSecondPointId set id of second point
* @brief SetSecondPointId set id of second point
* @param value id
*/
void DialogTriangle::setSecondPointId(const quint32 &value)
void DialogTriangle::SetSecondPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxSecondPoint, value);
line->setHypotenuseP2Id(value);
@ -240,10 +240,10 @@ void DialogTriangle::setSecondPointId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFirstPointId set id of first point
* @brief SetFirstPointId set id of first point
* @param value id
*/
void DialogTriangle::setFirstPointId(const quint32 &value)
void DialogTriangle::SetFirstPointId(const quint32 &value)
{
setCurrentPointId(ui->comboBoxFirstPoint, value);
line->setHypotenuseP1Id(value);
@ -251,10 +251,10 @@ void DialogTriangle::setFirstPointId(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setAxisP2Id set id second point of axis
* @brief SetAxisP2Id set id second point of axis
* @param value id
*/
void DialogTriangle::setAxisP2Id(const quint32 &value)
void DialogTriangle::SetAxisP2Id(const quint32 &value)
{
setCurrentPointId(ui->comboBoxAxisP2, value);
line->setPoint2Id(value);
@ -262,10 +262,10 @@ void DialogTriangle::setAxisP2Id(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setAxisP1Id set id first point of axis
* @brief SetAxisP1Id set id first point of axis
* @param value id
*/
void DialogTriangle::setAxisP1Id(const quint32 &value)
void DialogTriangle::SetAxisP1Id(const quint32 &value)
{
setCurrentPointId(ui->comboBoxAxisP1, value);
line->setPoint1Id(value);
@ -273,40 +273,40 @@ void DialogTriangle::setAxisP1Id(const quint32 &value)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getAxisP1Id return id first point of axis
* @brief GetAxisP1Id return id first point of axis
* @return id
*/
quint32 DialogTriangle::getAxisP1Id() const
quint32 DialogTriangle::GetAxisP1Id() const
{
return getCurrentObjectId(ui->comboBoxAxisP1);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getAxisP2Id return id second point of axis
* @brief GetAxisP2Id return id second point of axis
* @return id
*/
quint32 DialogTriangle::getAxisP2Id() const
quint32 DialogTriangle::GetAxisP2Id() const
{
return getCurrentObjectId(ui->comboBoxAxisP2);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFirstPointId return id of first point
* @brief GetFirstPointId return id of first point
* @return id
*/
quint32 DialogTriangle::getFirstPointId() const
quint32 DialogTriangle::GetFirstPointId() const
{
return getCurrentObjectId(ui->comboBoxFirstPoint);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getSecondPointId return id of second point
* @brief GetSecondPointId return id of second point
* @return id
*/
quint32 DialogTriangle::getSecondPointId() const
quint32 DialogTriangle::GetSecondPointId() const
{
return getCurrentObjectId(ui->comboBoxSecondPoint);
}

View File

@ -48,19 +48,19 @@ public:
DialogTriangle(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogTriangle();
quint32 getAxisP1Id() const;
void setAxisP1Id(const quint32 &value);
quint32 GetAxisP1Id() const;
void SetAxisP1Id(const quint32 &value);
quint32 getAxisP2Id() const;
void setAxisP2Id(const quint32 &value);
quint32 GetAxisP2Id() const;
void SetAxisP2Id(const quint32 &value);
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
void setPointName(const QString &value);
void SetPointName(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
virtual void PointNameChanged();

View File

@ -255,7 +255,7 @@ QString VArc::GetFormulaF1() const
//---------------------------------------------------------------------------------------------------------------------
void VArc::SetFormulaF1(const VFormula &value)
{
d->formulaF1 = value.getFormula(FormulaType::FromUser);
d->formulaF1 = value.GetFormula(FormulaType::FromUser);
d->f1 = value.getDoubleValue();
}
@ -282,7 +282,7 @@ QString VArc::GetFormulaF2() const
//---------------------------------------------------------------------------------------------------------------------
void VArc::SetFormulaF2(const VFormula &value)
{
d->formulaF2 = value.getFormula(FormulaType::FromUser);
d->formulaF2 = value.GetFormula(FormulaType::FromUser);
d->f2 = value.getDoubleValue();
}
@ -309,7 +309,7 @@ QString VArc::GetFormulaRadius() const
//---------------------------------------------------------------------------------------------------------------------
void VArc::SetFormulaRadius(const VFormula &value)
{
d->formulaRadius = value.getFormula(FormulaType::FromUser);
d->formulaRadius = value.GetFormula(FormulaType::FromUser);
d->radius = value.getDoubleValue();
}

View File

@ -255,13 +255,13 @@ void VSplinePath::Clear()
}
//---------------------------------------------------------------------------------------------------------------------
qreal VSplinePath::getKCurve() const
qreal VSplinePath::GetKCurve() const
{
return d->kCurve;
}
//---------------------------------------------------------------------------------------------------------------------
void VSplinePath::setKCurve(const qreal &value)
void VSplinePath::SetKCurve(const qreal &value)
{
if (value > 0)
{

View File

@ -118,15 +118,15 @@ public:
*/
void Clear();
/**
* @brief getKCurve return coefficient of curvature spline path.
* @brief GetKCurve return coefficient of curvature spline path.
* @return coefficient of curvature spline.
*/
qreal getKCurve() const;
qreal GetKCurve() const;
/**
* @brief setKCurve set coefficient of curvature spline path.
* @brief SetKCurve set coefficient of curvature spline path.
* @param value coefficient of curvature spline path.
*/
void setKCurve(const qreal &value);
void SetKCurve(const qreal &value);
/**
* @brief GetPoint pointer to list spline point.
* @return list.
@ -160,8 +160,8 @@ public:
*
* VSplinePoint splP1 = splPath->at(p1);
* VSplinePoint splP2 = splPath->at(p2);
* VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->getKCurve());
* VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->getKCurve());
* VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->GetKCurve());
* VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->GetKCurve());
* @param length length first spline path.
* @param p1 index first spline point in list.
* @param p2 index second spline point in list.

View File

@ -241,10 +241,10 @@ qreal VDrawTool::CheckFormula(const quint32 &toolId, QString &formula, VContaine
{
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, qApp->getMainWindow());
dialog->setWindowTitle(tr("Edit wrong formula"));
dialog->setFormula(formula);
dialog->SetFormula(formula);
if (dialog->exec() == QDialog::Accepted)
{
formula = dialog->getFormula();
formula = dialog->GetFormula();
/* Need delete dialog here because parser in dialog don't allow use correct separator for parsing
* here. */
delete dialog;

View File

@ -144,10 +144,10 @@ void VToolAlongLine::SaveDialog(QDomElement &domElement)
DialogAlongLine *dialogTool = qobject_cast<DialogAlongLine*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine());
doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula());
doc->SetAttribute(domElement, AttrFirstPoint, dialogTool->getFirstPointId());
doc->SetAttribute(domElement, AttrSecondPoint, dialogTool->getSecondPointId());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrFirstPoint, dialogTool->GetFirstPointId());
doc->SetAttribute(domElement, AttrSecondPoint, dialogTool->GetSecondPointId());
}
//---------------------------------------------------------------------------------------------------------------------
@ -169,13 +169,13 @@ void VToolAlongLine::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolAlongLine::getSecondPointId() const
quint32 VToolAlongLine::GetSecondPointId() const
{
return secondPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolAlongLine::setSecondPointId(const quint32 &value)
void VToolAlongLine::SetSecondPointId(const quint32 &value)
{
if (value != NULL_ID)
{
@ -231,11 +231,11 @@ void VToolAlongLine::setDialog()
DialogAlongLine *dialogTool = qobject_cast<DialogAlongLine*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setTypeLine(typeLine);
dialogTool->setFormula(formulaLength);
dialogTool->setFirstPointId(basePointId);
dialogTool->setSecondPointId(secondPointId);
dialogTool->setPointName(p->name());
dialogTool->SetTypeLine(typeLine);
dialogTool->SetFormula(formulaLength);
dialogTool->SetFirstPointId(basePointId);
dialogTool->SetSecondPointId(secondPointId);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -251,10 +251,10 @@ VToolAlongLine* VToolAlongLine::Create(DialogTool *dialog, VMainGraphicsScene *s
SCASSERT(dialog != nullptr);
DialogAlongLine *dialogTool = qobject_cast<DialogAlongLine*>(dialog);
SCASSERT(dialogTool != nullptr);
QString formula = dialogTool->getFormula();
const quint32 firstPointId = dialogTool->getFirstPointId();
const quint32 secondPointId = dialogTool->getSecondPointId();
const QString typeLine = dialogTool->getTypeLine();
QString formula = dialogTool->GetFormula();
const quint32 firstPointId = dialogTool->GetFirstPointId();
const quint32 secondPointId = dialogTool->GetSecondPointId();
const QString typeLine = dialogTool->GetTypeLine();
const QString pointName = dialogTool->getPointName();
VToolAlongLine *point=nullptr;
point = Create(0, pointName, typeLine, formula, firstPointId, secondPointId, 5, 10, scene, doc, data,

View File

@ -52,8 +52,8 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::AlongLine)};
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
virtual void ShowVisualization(bool show);
public slots:
virtual void FullUpdateFromFile();

View File

@ -197,7 +197,7 @@ void VToolArc::setCenter(const quint32 &value)
}
//---------------------------------------------------------------------------------------------------------------------
VFormula VToolArc::getFormulaRadius() const
VFormula VToolArc::GetFormulaRadius() const
{
QSharedPointer<VArc> arc = VAbstractTool::data.GeometricObject<VArc>(id);
SCASSERT(arc.isNull() == false);
@ -210,7 +210,7 @@ VFormula VToolArc::getFormulaRadius() const
}
//---------------------------------------------------------------------------------------------------------------------
void VToolArc::setFormulaRadius(const VFormula &value)
void VToolArc::SetFormulaRadius(const VFormula &value)
{
if (value.error() == false)
{
@ -225,7 +225,7 @@ void VToolArc::setFormulaRadius(const VFormula &value)
}
//---------------------------------------------------------------------------------------------------------------------
VFormula VToolArc::getFormulaF1() const
VFormula VToolArc::GetFormulaF1() const
{
QSharedPointer<VArc> arc = VAbstractTool::data.GeometricObject<VArc>(id);
SCASSERT(arc.isNull() == false);
@ -238,7 +238,7 @@ VFormula VToolArc::getFormulaF1() const
}
//---------------------------------------------------------------------------------------------------------------------
void VToolArc::setFormulaF1(const VFormula &value)
void VToolArc::SetFormulaF1(const VFormula &value)
{
if (value.error() == false)
{
@ -254,7 +254,7 @@ void VToolArc::setFormulaF1(const VFormula &value)
}
//---------------------------------------------------------------------------------------------------------------------
VFormula VToolArc::getFormulaF2() const
VFormula VToolArc::GetFormulaF2() const
{
QSharedPointer<VArc> arc = VAbstractTool::data.GeometricObject<VArc>(id);
SCASSERT(arc.isNull() == false);
@ -267,7 +267,7 @@ VFormula VToolArc::getFormulaF2() const
}
//---------------------------------------------------------------------------------------------------------------------
void VToolArc::setFormulaF2(const VFormula &value)
void VToolArc::SetFormulaF2(const VFormula &value)
{
if (value.error() == false)
{

View File

@ -55,14 +55,14 @@ public:
quint32 getCenter() const;
void setCenter(const quint32 &value);
VFormula getFormulaRadius() const;
void setFormulaRadius(const VFormula &value);
VFormula GetFormulaRadius() const;
void SetFormulaRadius(const VFormula &value);
VFormula getFormulaF1() const;
void setFormulaF1(const VFormula &value);
VFormula GetFormulaF1() const;
void SetFormulaF1(const VFormula &value);
VFormula getFormulaF2() const;
void setFormulaF2(const VFormula &value);
VFormula GetFormulaF2() const;
void SetFormulaF2(const VFormula &value);
virtual void ShowVisualization(bool show);
protected:

View File

@ -112,12 +112,12 @@ void VToolBisector::setDialog()
DialogBisector *dialogTool = qobject_cast<DialogBisector*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setTypeLine(typeLine);
dialogTool->setFormula(formulaLength);
dialogTool->setFirstPointId(firstPointId);
dialogTool->setSecondPointId(basePointId);
dialogTool->setThirdPointId(thirdPointId);
dialogTool->setPointName(p->name());
dialogTool->SetTypeLine(typeLine);
dialogTool->SetFormula(formulaLength);
dialogTool->SetFirstPointId(firstPointId);
dialogTool->SetSecondPointId(basePointId);
dialogTool->SetThirdPointId(thirdPointId);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -134,11 +134,11 @@ VToolBisector* VToolBisector::Create(DialogTool *dialog, VMainGraphicsScene *sce
SCASSERT(dialog != nullptr);
DialogBisector *dialogTool = qobject_cast<DialogBisector*>(dialog);
SCASSERT(dialogTool != nullptr);
QString formula = dialogTool->getFormula();
const quint32 firstPointId = dialogTool->getFirstPointId();
const quint32 secondPointId = dialogTool->getSecondPointId();
const quint32 thirdPointId = dialogTool->getThirdPointId();
const QString typeLine = dialogTool->getTypeLine();
QString formula = dialogTool->GetFormula();
const quint32 firstPointId = dialogTool->GetFirstPointId();
const quint32 secondPointId = dialogTool->GetSecondPointId();
const quint32 thirdPointId = dialogTool->GetThirdPointId();
const QString typeLine = dialogTool->GetTypeLine();
const QString pointName = dialogTool->getPointName();
VToolBisector *point = nullptr;
point=Create(0, formula, firstPointId, secondPointId, thirdPointId, typeLine, pointName, 5, 10, scene, doc, data,
@ -296,11 +296,11 @@ void VToolBisector::SaveDialog(QDomElement &domElement)
DialogBisector *dialogTool = qobject_cast<DialogBisector*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine());
doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula());
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPointId()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPointId()));
doc->SetAttribute(domElement, AttrThirdPoint, QString().setNum(dialogTool->getThirdPointId()));
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId()));
doc->SetAttribute(domElement, AttrThirdPoint, QString().setNum(dialogTool->GetThirdPointId()));
}
//---------------------------------------------------------------------------------------------------------------------
@ -323,13 +323,13 @@ void VToolBisector::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolBisector::getThirdPointId() const
quint32 VToolBisector::GetThirdPointId() const
{
return thirdPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolBisector::setThirdPointId(const quint32 &value)
void VToolBisector::SetThirdPointId(const quint32 &value)
{
if (value != NULL_ID)
{
@ -377,13 +377,13 @@ void VToolBisector::ShowVisualization(bool show)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolBisector::getFirstPointId() const
quint32 VToolBisector::GetFirstPointId() const
{
return firstPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolBisector::setFirstPointId(const quint32 &value)
void VToolBisector::SetFirstPointId(const quint32 &value)
{
if (value != NULL_ID)
{

View File

@ -56,11 +56,11 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::Bisector)};
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getThirdPointId() const;
void setThirdPointId(const quint32 &value);
quint32 GetThirdPointId() const;
void SetThirdPointId(const quint32 &value);
virtual void ShowVisualization(bool show);
public slots:

View File

@ -66,11 +66,11 @@ void VToolCurveIntersectAxis::setDialog()
DialogCurveIntersectAxis *dialogTool = qobject_cast<DialogCurveIntersectAxis*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setTypeLine(typeLine);
dialogTool->setAngle(formulaAngle);
dialogTool->setBasePointId(basePointId);
dialogTool->SetTypeLine(typeLine);
dialogTool->SetAngle(formulaAngle);
dialogTool->SetBasePointId(basePointId);
dialogTool->setCurveId(curveId);
dialogTool->setPointName(p->name());
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -81,9 +81,9 @@ VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(DialogTool *dialog, VMa
DialogCurveIntersectAxis *dialogTool = qobject_cast<DialogCurveIntersectAxis*>(dialog);
SCASSERT(dialogTool);
const QString pointName = dialogTool->getPointName();
const QString typeLine = dialogTool->getTypeLine();
QString formulaAngle = dialogTool->getAngle();
const quint32 basePointId = dialogTool->getBasePointId();
const QString typeLine = dialogTool->GetTypeLine();
QString formulaAngle = dialogTool->GetAngle();
const quint32 basePointId = dialogTool->GetBasePointId();
const quint32 curveId = dialogTool->getCurveId();
VToolCurveIntersectAxis *point = nullptr;
@ -173,7 +173,7 @@ QPointF VToolCurveIntersectAxis::FindPoint(const QPointF &point, qreal angle,
}
//---------------------------------------------------------------------------------------------------------------------
VFormula VToolCurveIntersectAxis::getFormulaAngle() const
VFormula VToolCurveIntersectAxis::GetFormulaAngle() const
{
VFormula fAngle(formulaAngle, getData());
fAngle.setCheckZero(false);
@ -183,11 +183,11 @@ VFormula VToolCurveIntersectAxis::getFormulaAngle() const
}
//---------------------------------------------------------------------------------------------------------------------
void VToolCurveIntersectAxis::setFormulaAngle(const VFormula &value)
void VToolCurveIntersectAxis::SetFormulaAngle(const VFormula &value)
{
if (value.error() == false)
{
formulaAngle = value.getFormula(FormulaType::FromUser);
formulaAngle = value.GetFormula(FormulaType::FromUser);
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
@ -226,7 +226,7 @@ void VToolCurveIntersectAxis::ShowVisualization(bool show)
visual->setPoint1Id(curveId);
visual->setAxisPointId(basePointId);
visual->setAngle(qApp->FormulaToUser(formulaAngle));
visual->SetAngle(qApp->FormulaToUser(formulaAngle));
visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
visual->RefreshGeometry();
vis = visual;
@ -265,7 +265,7 @@ void VToolCurveIntersectAxis::FullUpdateFromFile()
VisToolCurveIntersectAxis *visual = qobject_cast<VisToolCurveIntersectAxis *>(vis);
visual->setPoint1Id(curveId);
visual->setAxisPointId(basePointId);
visual->setAngle(qApp->FormulaToUser(formulaAngle));
visual->SetAngle(qApp->FormulaToUser(formulaAngle));
visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
visual->RefreshGeometry();
}
@ -290,9 +290,9 @@ void VToolCurveIntersectAxis::SaveDialog(QDomElement &domElement)
DialogCurveIntersectAxis *dialogTool = qobject_cast<DialogCurveIntersectAxis*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine());
doc->SetAttribute(domElement, AttrAngle, dialogTool->getAngle());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->getBasePointId()));
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId()));
doc->SetAttribute(domElement, AttrCurve, QString().setNum(dialogTool->getCurveId()));
}

View File

@ -54,8 +54,8 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::CurveIntersectAxis)};
VFormula getFormulaAngle() const;
void setFormulaAngle(const VFormula &value);
VFormula GetFormulaAngle() const;
void SetFormulaAngle(const VFormula &value);
quint32 getCurveId() const;
void setCurveId(const quint32 &value);

View File

@ -94,7 +94,7 @@ void VToolCut::setCurveCutId(const quint32 &value)
}
//---------------------------------------------------------------------------------------------------------------------
VFormula VToolCut::getFormula() const
VFormula VToolCut::GetFormula() const
{
VFormula val(formula, getData());
val.setCheckZero(true);
@ -104,11 +104,11 @@ VFormula VToolCut::getFormula() const
}
//---------------------------------------------------------------------------------------------------------------------
void VToolCut::setFormula(const VFormula &value)
void VToolCut::SetFormula(const VFormula &value)
{
if (value.error() == false)
{
formula = value.getFormula(FormulaType::FromUser);
formula = value.GetFormula(FormulaType::FromUser);
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);

View File

@ -43,8 +43,8 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::Cut)};
VFormula getFormula() const;
void setFormula(const VFormula &value);
VFormula GetFormula() const;
void SetFormula(const VFormula &value);
quint32 getCurveCutId() const;
void setCurveCutId(const quint32 &value);

View File

@ -77,9 +77,9 @@ void VToolCutArc::setDialog()
DialogCutArc *dialogTool = qobject_cast<DialogCutArc*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> point = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setFormula(formula);
dialogTool->SetFormula(formula);
dialogTool->setArcId(curveCutId);
dialogTool->setPointName(point->name());
dialogTool->SetPointName(point->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -96,7 +96,7 @@ VToolCutArc* VToolCutArc::Create(DialogTool *dialog, VMainGraphicsScene *scene,
DialogCutArc *dialogTool = qobject_cast<DialogCutArc*>(dialog);
SCASSERT(dialogTool != nullptr);
const QString pointName = dialogTool->getPointName();
QString formula = dialogTool->getFormula();
QString formula = dialogTool->GetFormula();
const quint32 arcId = dialogTool->getArcId();
VToolCutArc* point = nullptr;
point=Create(0, pointName, formula, arcId, 5, 10, scene, doc, data, Document::FullParse, Source::FromGui);
@ -271,7 +271,7 @@ void VToolCutArc::SaveDialog(QDomElement &domElement)
DialogCutArc *dialogTool = qobject_cast<DialogCutArc*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrArc, QString().setNum(dialogTool->getArcId()));
}

View File

@ -76,9 +76,9 @@ void VToolCutSpline::setDialog()
DialogCutSpline *dialogTool = qobject_cast<DialogCutSpline*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> point = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setFormula(formula);
dialogTool->SetFormula(formula);
dialogTool->setSplineId(curveCutId);
dialogTool->setPointName(point->name());
dialogTool->SetPointName(point->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -96,7 +96,7 @@ VToolCutSpline* VToolCutSpline::Create(DialogTool *dialog, VMainGraphicsScene *s
DialogCutSpline *dialogTool = qobject_cast<DialogCutSpline*>(dialog);
SCASSERT(dialogTool != nullptr);
const QString pointName = dialogTool->getPointName();
QString formula = dialogTool->getFormula();
QString formula = dialogTool->GetFormula();
const quint32 splineId = dialogTool->getSplineId();
VToolCutSpline* point = nullptr;
point = Create(0, pointName, formula, splineId, 5, 10, scene, doc, data, Document::FullParse, Source::FromGui);
@ -282,7 +282,7 @@ void VToolCutSpline::SaveDialog(QDomElement &domElement)
DialogCutSpline *dialogTool = qobject_cast<DialogCutSpline*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrSpline, QString().setNum(dialogTool->getSplineId()));
}

View File

@ -80,9 +80,9 @@ void VToolCutSplinePath::setDialog()
DialogCutSplinePath *dialogTool = qobject_cast<DialogCutSplinePath*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> point = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setFormula(formula);
dialogTool->SetFormula(formula);
dialogTool->setSplinePathId(curveCutId);
dialogTool->setPointName(point->name());
dialogTool->SetPointName(point->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -100,7 +100,7 @@ VToolCutSplinePath* VToolCutSplinePath::Create(DialogTool *dialog, VMainGraphics
DialogCutSplinePath *dialogTool = qobject_cast<DialogCutSplinePath*>(dialog);
SCASSERT(dialogTool != nullptr);
const QString pointName = dialogTool->getPointName();
QString formula = dialogTool->getFormula();
QString formula = dialogTool->GetFormula();
const quint32 splinePathId = dialogTool->getSplinePathId();
VToolCutSplinePath* point = nullptr;
point = Create(0, pointName, formula, splinePathId, 5, 10, scene, doc, data, Document::FullParse, Source::FromGui);
@ -156,8 +156,8 @@ VToolCutSplinePath* VToolCutSplinePath::Create(const quint32 _id, const QString
VSplinePoint splP1 = splPath->at(p1);
VSplinePoint splP2 = splPath->at(p2);
const VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->getKCurve());
const VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->getKCurve());
const VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->GetKCurve());
const VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->GetKCurve());
VSplinePath *splPath1 = new VSplinePath();
VSplinePath *splPath2 = new VSplinePath();
@ -191,8 +191,8 @@ VToolCutSplinePath* VToolCutSplinePath::Create(const quint32 _id, const QString
splPath2->append(splPath->at(i));
}
}
splPath1->setKCurve(splPath->getKCurve());
splPath2->setKCurve(splPath->getKCurve());
splPath1->SetKCurve(splPath->GetKCurve());
splPath2->SetKCurve(splPath->GetKCurve());
splPath1->setMaxCountPoints(splPath->CountPoint());
splPath2->setMaxCountPoints(splPath->CountPoint());
@ -331,7 +331,7 @@ void VToolCutSplinePath::SaveDialog(QDomElement &domElement)
DialogCutSplinePath *dialogTool = qobject_cast<DialogCutSplinePath*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrSplinePath, QString().setNum(dialogTool->getSplinePathId()));
}

View File

@ -79,11 +79,11 @@ void VToolEndLine::setDialog()
DialogEndLine *dialogTool = qobject_cast<DialogEndLine*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setTypeLine(typeLine);
dialogTool->setFormula(formulaLength);
dialogTool->setAngle(formulaAngle);
dialogTool->setBasePointId(basePointId);
dialogTool->setPointName(p->name());
dialogTool->SetTypeLine(typeLine);
dialogTool->SetFormula(formulaLength);
dialogTool->SetAngle(formulaAngle);
dialogTool->SetBasePointId(basePointId);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -101,10 +101,10 @@ VToolEndLine* VToolEndLine::Create(DialogTool *dialog, VMainGraphicsScene *scene
DialogEndLine *dialogTool = qobject_cast<DialogEndLine*>(dialog);
SCASSERT(dialogTool);
const QString pointName = dialogTool->getPointName();
const QString typeLine = dialogTool->getTypeLine();
QString formulaLength = dialogTool->getFormula();
QString formulaAngle = dialogTool->getAngle();
const quint32 basePointId = dialogTool->getBasePointId();
const QString typeLine = dialogTool->GetTypeLine();
QString formulaLength = dialogTool->GetFormula();
QString formulaAngle = dialogTool->GetAngle();
const quint32 basePointId = dialogTool->GetBasePointId();
VToolEndLine *point = nullptr;
point=Create(0, pointName, typeLine, formulaLength, formulaAngle, basePointId, 5, 10, scene, doc, data,
@ -196,7 +196,7 @@ void VToolEndLine::FullUpdateFromFile()
VisToolEndLine *visual = qobject_cast<VisToolEndLine *>(vis);
visual->setPoint1Id(basePointId);
visual->setLength(qApp->FormulaToUser(formulaLength));
visual->setAngle(qApp->FormulaToUser(formulaAngle));
visual->SetAngle(qApp->FormulaToUser(formulaAngle));
visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
visual->RefreshGeometry();
}
@ -232,10 +232,10 @@ void VToolEndLine::SaveDialog(QDomElement &domElement)
DialogEndLine *dialogTool = qobject_cast<DialogEndLine*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine());
doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula());
doc->SetAttribute(domElement, AttrAngle, dialogTool->getAngle());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->getBasePointId()));
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId()));
}
//---------------------------------------------------------------------------------------------------------------------
@ -257,7 +257,7 @@ void VToolEndLine::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
}
//---------------------------------------------------------------------------------------------------------------------
VFormula VToolEndLine::getFormulaAngle() const
VFormula VToolEndLine::GetFormulaAngle() const
{
VFormula fAngle(formulaAngle, getData());
fAngle.setCheckZero(false);
@ -267,11 +267,11 @@ VFormula VToolEndLine::getFormulaAngle() const
}
//---------------------------------------------------------------------------------------------------------------------
void VToolEndLine::setFormulaAngle(const VFormula &value)
void VToolEndLine::SetFormulaAngle(const VFormula &value)
{
if (value.error() == false)
{
formulaAngle = value.getFormula(FormulaType::FromUser);
formulaAngle = value.GetFormula(FormulaType::FromUser);
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
@ -292,7 +292,7 @@ void VToolEndLine::ShowVisualization(bool show)
visual->setPoint1Id(basePointId);
visual->setLength(qApp->FormulaToUser(formulaLength));
visual->setAngle(qApp->FormulaToUser(formulaAngle));
visual->SetAngle(qApp->FormulaToUser(formulaAngle));
visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
visual->RefreshGeometry();
vis = visual;

View File

@ -53,8 +53,8 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::EndLine)};
VFormula getFormulaAngle() const;
void setFormulaAngle(const VFormula &value);
VFormula GetFormulaAngle() const;
void SetFormulaAngle(const VFormula &value);
virtual void ShowVisualization(bool show);
public slots:
virtual void FullUpdateFromFile();

View File

@ -72,11 +72,11 @@ void VToolHeight::setDialog()
DialogHeight *dialogTool = qobject_cast<DialogHeight*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setTypeLine(typeLine);
dialogTool->setBasePointId(basePointId);
dialogTool->setP1LineId(p1LineId);
dialogTool->setP2LineId(p2LineId);
dialogTool->setPointName(p->name());
dialogTool->SetTypeLine(typeLine);
dialogTool->SetBasePointId(basePointId);
dialogTool->SetP1LineId(p1LineId);
dialogTool->SetP2LineId(p2LineId);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -95,10 +95,10 @@ VToolHeight* VToolHeight::Create(DialogTool *dialog, VMainGraphicsScene *scene,
SCASSERT(dialogTool != nullptr);
disconnect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogHeight::UpdateList);
const QString pointName = dialogTool->getPointName();
const QString typeLine = dialogTool->getTypeLine();
const quint32 basePointId = dialogTool->getBasePointId();
const quint32 p1LineId = dialogTool->getP1LineId();
const quint32 p2LineId = dialogTool->getP2LineId();
const QString typeLine = dialogTool->GetTypeLine();
const quint32 basePointId = dialogTool->GetBasePointId();
const quint32 p1LineId = dialogTool->GetP1LineId();
const quint32 p2LineId = dialogTool->GetP2LineId();
VToolHeight *point = nullptr;
point = Create(0, pointName, typeLine, basePointId, p1LineId, p2LineId, 5, 10, scene, doc, data,
@ -244,10 +244,10 @@ void VToolHeight::SaveDialog(QDomElement &domElement)
DialogHeight *dialogTool = qobject_cast<DialogHeight*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->getBasePointId()));
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->getP1LineId()));
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->getP2LineId()));
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId()));
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetP1LineId()));
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetP2LineId()));
}
//---------------------------------------------------------------------------------------------------------------------
@ -269,13 +269,13 @@ void VToolHeight::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolHeight::getP2LineId() const
quint32 VToolHeight::GetP2LineId() const
{
return p2LineId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolHeight::setP2LineId(const quint32 &value)
void VToolHeight::SetP2LineId(const quint32 &value)
{
if (value != NULL_ID)
{
@ -322,13 +322,13 @@ void VToolHeight::ShowVisualization(bool show)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolHeight::getP1LineId() const
quint32 VToolHeight::GetP1LineId() const
{
return p1LineId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolHeight::setP1LineId(const quint32 &value)
void VToolHeight::SetP1LineId(const quint32 &value)
{
if (value != NULL_ID)
{

View File

@ -53,11 +53,11 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::Height)};
quint32 getP1LineId() const;
void setP1LineId(const quint32 &value);
quint32 GetP1LineId() const;
void SetP1LineId(const quint32 &value);
quint32 getP2LineId() const;
void setP2LineId(const quint32 &value);
quint32 GetP2LineId() const;
void SetP2LineId(const quint32 &value);
virtual void ShowVisualization(bool show);
public slots:

View File

@ -82,9 +82,9 @@ void VToolLine::setDialog()
SCASSERT(dialog != nullptr);
DialogLine *dialogTool = qobject_cast<DialogLine*>(dialog);
SCASSERT(dialogTool != nullptr);
dialogTool->setFirstPoint(firstPoint);
dialogTool->setSecondPoint(secondPoint);
dialogTool->setTypeLine(typeLine);
dialogTool->SetFirstPoint(firstPoint);
dialogTool->SetSecondPoint(secondPoint);
dialogTool->SetTypeLine(typeLine);
}
//---------------------------------------------------------------------------------------------------------------------
@ -100,9 +100,9 @@ VToolLine *VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPat
SCASSERT(dialog != nullptr);
DialogLine *dialogTool = qobject_cast<DialogLine*>(dialog);
SCASSERT(dialogTool != nullptr);
const quint32 firstPoint = dialogTool->getFirstPoint();
const quint32 secondPoint = dialogTool->getSecondPoint();
const QString typeLine = dialogTool->getTypeLine();
const quint32 firstPoint = dialogTool->GetFirstPoint();
const quint32 secondPoint = dialogTool->GetSecondPoint();
const QString typeLine = dialogTool->GetTypeLine();
VToolLine *line = nullptr;
line = Create(0, firstPoint, secondPoint, typeLine, scene, doc, data, Document::FullParse, Source::FromGui);
@ -366,9 +366,9 @@ void VToolLine::SaveDialog(QDomElement &domElement)
SCASSERT(dialog != nullptr);
DialogLine *dialogTool = qobject_cast<DialogLine*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPoint()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPoint()));
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine());
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPoint()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPoint()));
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
}
//---------------------------------------------------------------------------------------------------------------------
@ -383,13 +383,13 @@ void VToolLine::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLine::getSecondPoint() const
quint32 VToolLine::GetSecondPoint() const
{
return secondPoint;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLine::setSecondPoint(const quint32 &value)
void VToolLine::SetSecondPoint(const quint32 &value)
{
if (value != NULL_ID)
{
@ -435,7 +435,7 @@ void VToolLine::ShowVisualization(bool show)
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLine::setTypeLine(const QString &value)
void VToolLine::SetTypeLine(const QString &value)
{
typeLine = value;
@ -444,13 +444,13 @@ void VToolLine::setTypeLine(const QString &value)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLine::getFirstPoint() const
quint32 VToolLine::GetFirstPoint() const
{
return firstPoint;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLine::setFirstPoint(const quint32 &value)
void VToolLine::SetFirstPoint(const quint32 &value)
{
if (value != NULL_ID)
{

View File

@ -51,14 +51,14 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::Line)};
virtual QString getTagName() const;
quint32 getFirstPoint() const;
void setFirstPoint(const quint32 &value);
quint32 GetFirstPoint() const;
void SetFirstPoint(const quint32 &value);
quint32 getSecondPoint() const;
void setSecondPoint(const quint32 &value);
quint32 GetSecondPoint() const;
void SetSecondPoint(const quint32 &value);
virtual void ShowVisualization(bool show);
virtual void setTypeLine(const QString &value);
virtual void SetTypeLine(const QString &value);
public slots:
virtual void FullUpdateFromFile();
virtual void ChangedActivDraw(const QString &newName);

View File

@ -74,11 +74,11 @@ void VToolLineIntersect::setDialog()
DialogLineIntersect *dialogTool = qobject_cast<DialogLineIntersect*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setP1Line1(p1Line1);
dialogTool->setP2Line1(p2Line1);
dialogTool->setP1Line2(p1Line2);
dialogTool->setP2Line2(p2Line2);
dialogTool->setPointName(p->name());
dialogTool->SetP1Line1(p1Line1);
dialogTool->SetP2Line1(p2Line1);
dialogTool->SetP1Line2(p1Line2);
dialogTool->SetP2Line2(p2Line2);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -96,10 +96,10 @@ VToolLineIntersect* VToolLineIntersect::Create(DialogTool *dialog, VMainGraphics
SCASSERT(dialog != nullptr);
DialogLineIntersect *dialogTool = qobject_cast<DialogLineIntersect*>(dialog);
SCASSERT(dialogTool != nullptr);
const quint32 p1Line1Id = dialogTool->getP1Line1();
const quint32 p2Line1Id = dialogTool->getP2Line1();
const quint32 p1Line2Id = dialogTool->getP1Line2();
const quint32 p2Line2Id = dialogTool->getP2Line2();
const quint32 p1Line1Id = dialogTool->GetP1Line1();
const quint32 p2Line1Id = dialogTool->GetP2Line1();
const quint32 p1Line2Id = dialogTool->GetP1Line2();
const quint32 p2Line2Id = dialogTool->GetP2Line2();
const QString pointName = dialogTool->getPointName();
VToolLineIntersect* point = nullptr;
point = Create(0, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, pointName, 5, 10, scene, doc, data,
@ -267,10 +267,10 @@ void VToolLineIntersect::SaveDialog(QDomElement &domElement)
DialogLineIntersect *dialogTool = qobject_cast<DialogLineIntersect*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrP1Line1, QString().setNum(dialogTool->getP1Line1()));
doc->SetAttribute(domElement, AttrP2Line1, QString().setNum(dialogTool->getP2Line1()));
doc->SetAttribute(domElement, AttrP1Line2, QString().setNum(dialogTool->getP1Line2()));
doc->SetAttribute(domElement, AttrP2Line2, QString().setNum(dialogTool->getP2Line2()));
doc->SetAttribute(domElement, AttrP1Line1, QString().setNum(dialogTool->GetP1Line1()));
doc->SetAttribute(domElement, AttrP2Line1, QString().setNum(dialogTool->GetP2Line1()));
doc->SetAttribute(domElement, AttrP1Line2, QString().setNum(dialogTool->GetP1Line2()));
doc->SetAttribute(domElement, AttrP2Line2, QString().setNum(dialogTool->GetP2Line2()));
}
//---------------------------------------------------------------------------------------------------------------------
@ -292,13 +292,13 @@ void VToolLineIntersect::SaveOptions(QDomElement &tag, QSharedPointer<VGObject>
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLineIntersect::getP2Line2() const
quint32 VToolLineIntersect::GetP2Line2() const
{
return p2Line2;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersect::setP2Line2(const quint32 &value)
void VToolLineIntersect::SetP2Line2(const quint32 &value)
{
if (value != NULL_ID)
{
@ -345,13 +345,13 @@ void VToolLineIntersect::ShowVisualization(bool show)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLineIntersect::getP1Line2() const
quint32 VToolLineIntersect::GetP1Line2() const
{
return p1Line2;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersect::setP1Line2(const quint32 &value)
void VToolLineIntersect::SetP1Line2(const quint32 &value)
{
if (value != NULL_ID)
{
@ -363,13 +363,13 @@ void VToolLineIntersect::setP1Line2(const quint32 &value)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLineIntersect::getP2Line1() const
quint32 VToolLineIntersect::GetP2Line1() const
{
return p2Line1;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersect::setP2Line1(const quint32 &value)
void VToolLineIntersect::SetP2Line1(const quint32 &value)
{
if (value != NULL_ID)
{
@ -381,13 +381,13 @@ void VToolLineIntersect::setP2Line1(const quint32 &value)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLineIntersect::getP1Line1() const
quint32 VToolLineIntersect::GetP1Line1() const
{
return p1Line1;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersect::setP1Line1(const quint32 &value)
void VToolLineIntersect::SetP1Line1(const quint32 &value)
{
if (value != NULL_ID)
{

View File

@ -51,17 +51,17 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::LineIntersect)};
quint32 getP1Line1() const;
void setP1Line1(const quint32 &value);
quint32 GetP1Line1() const;
void SetP1Line1(const quint32 &value);
quint32 getP2Line1() const;
void setP2Line1(const quint32 &value);
quint32 GetP2Line1() const;
void SetP2Line1(const quint32 &value);
quint32 getP1Line2() const;
void setP1Line2(const quint32 &value);
quint32 GetP1Line2() const;
void SetP1Line2(const quint32 &value);
quint32 getP2Line2() const;
void setP2Line2(const quint32 &value);
quint32 GetP2Line2() const;
void SetP2Line2(const quint32 &value);
virtual void ShowVisualization(bool show);
public slots:

View File

@ -67,12 +67,12 @@ void VToolLineIntersectAxis::setDialog()
DialogLineIntersectAxis *dialogTool = qobject_cast<DialogLineIntersectAxis*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setTypeLine(typeLine);
dialogTool->setAngle(formulaAngle);
dialogTool->setBasePointId(basePointId);
dialogTool->setFirstPointId(firstPointId);
dialogTool->setSecondPointId(secondPointId);
dialogTool->setPointName(p->name());
dialogTool->SetTypeLine(typeLine);
dialogTool->SetAngle(formulaAngle);
dialogTool->SetBasePointId(basePointId);
dialogTool->SetFirstPointId(firstPointId);
dialogTool->SetSecondPointId(secondPointId);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -83,11 +83,11 @@ VToolLineIntersectAxis *VToolLineIntersectAxis::Create(DialogTool *dialog, VMain
DialogLineIntersectAxis *dialogTool = qobject_cast<DialogLineIntersectAxis*>(dialog);
SCASSERT(dialogTool);
const QString pointName = dialogTool->getPointName();
const QString typeLine = dialogTool->getTypeLine();
QString formulaAngle = dialogTool->getAngle();
const quint32 basePointId = dialogTool->getBasePointId();
const quint32 firstPointId = dialogTool->getFirstPointId();
const quint32 secondPointId = dialogTool->getSecondPointId();
const QString typeLine = dialogTool->GetTypeLine();
QString formulaAngle = dialogTool->GetAngle();
const quint32 basePointId = dialogTool->GetBasePointId();
const quint32 firstPointId = dialogTool->GetFirstPointId();
const quint32 secondPointId = dialogTool->GetSecondPointId();
VToolLineIntersectAxis *point = nullptr;
point=Create(0, pointName, typeLine, formulaAngle, basePointId, firstPointId, secondPointId, 5, 10, scene, doc,
@ -170,7 +170,7 @@ QPointF VToolLineIntersectAxis::FindPoint(const QLineF &axis, const QLineF &line
}
//---------------------------------------------------------------------------------------------------------------------
VFormula VToolLineIntersectAxis::getFormulaAngle() const
VFormula VToolLineIntersectAxis::GetFormulaAngle() const
{
VFormula fAngle(formulaAngle, getData());
fAngle.setCheckZero(false);
@ -180,11 +180,11 @@ VFormula VToolLineIntersectAxis::getFormulaAngle() const
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersectAxis::setFormulaAngle(const VFormula &value)
void VToolLineIntersectAxis::SetFormulaAngle(const VFormula &value)
{
if (value.error() == false)
{
formulaAngle = value.getFormula(FormulaType::FromUser);
formulaAngle = value.GetFormula(FormulaType::FromUser);
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
@ -192,13 +192,13 @@ void VToolLineIntersectAxis::setFormulaAngle(const VFormula &value)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLineIntersectAxis::getFirstPointId() const
quint32 VToolLineIntersectAxis::GetFirstPointId() const
{
return firstPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersectAxis::setFirstPointId(const quint32 &value)
void VToolLineIntersectAxis::SetFirstPointId(const quint32 &value)
{
if (value != NULL_ID)
{
@ -210,13 +210,13 @@ void VToolLineIntersectAxis::setFirstPointId(const quint32 &value)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLineIntersectAxis::getSecondPointId() const
quint32 VToolLineIntersectAxis::GetSecondPointId() const
{
return secondPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersectAxis::setSecondPointId(const quint32 &value)
void VToolLineIntersectAxis::SetSecondPointId(const quint32 &value)
{
if (value != NULL_ID)
{
@ -242,7 +242,7 @@ void VToolLineIntersectAxis::ShowVisualization(bool show)
visual->setPoint1Id(firstPointId);
visual->setPoint2Id(secondPointId);
visual->setAxisPointId(basePointId);
visual->setAngle(qApp->FormulaToUser(formulaAngle));
visual->SetAngle(qApp->FormulaToUser(formulaAngle));
visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
visual->RefreshGeometry();
vis = visual;
@ -283,7 +283,7 @@ void VToolLineIntersectAxis::FullUpdateFromFile()
visual->setPoint1Id(firstPointId);
visual->setPoint2Id(secondPointId);
visual->setAxisPointId(basePointId);
visual->setAngle(qApp->FormulaToUser(formulaAngle));
visual->SetAngle(qApp->FormulaToUser(formulaAngle));
visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
visual->RefreshGeometry();
}
@ -308,11 +308,11 @@ void VToolLineIntersectAxis::SaveDialog(QDomElement &domElement)
DialogLineIntersectAxis *dialogTool = qobject_cast<DialogLineIntersectAxis*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine());
doc->SetAttribute(domElement, AttrAngle, dialogTool->getAngle());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->getBasePointId()));
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->getFirstPointId()));
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->getSecondPointId()));
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId()));
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetFirstPointId()));
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetSecondPointId()));
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -55,14 +55,14 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::LineIntersectAxis)};
VFormula getFormulaAngle() const;
void setFormulaAngle(const VFormula &value);
VFormula GetFormulaAngle() const;
void SetFormulaAngle(const VFormula &value);
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
virtual void ShowVisualization(bool show);
public slots:

View File

@ -108,13 +108,13 @@ void VToolLinePoint::SetFactor(qreal factor)
}
//---------------------------------------------------------------------------------------------------------------------
qreal VToolLinePoint::getAngle() const
qreal VToolLinePoint::GetAngle() const
{
return angle;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLinePoint::setAngle(const qreal &value)
void VToolLinePoint::SetAngle(const qreal &value)
{
angle = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
@ -122,13 +122,13 @@ void VToolLinePoint::setAngle(const qreal &value)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLinePoint::getBasePointId() const
quint32 VToolLinePoint::GetBasePointId() const
{
return basePointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLinePoint::setBasePointId(const quint32 &value)
void VToolLinePoint::SetBasePointId(const quint32 &value)
{
if (value != NULL_ID)
{
@ -140,7 +140,7 @@ void VToolLinePoint::setBasePointId(const quint32 &value)
}
//---------------------------------------------------------------------------------------------------------------------
VFormula VToolLinePoint::getFormulaLength() const
VFormula VToolLinePoint::GetFormulaLength() const
{
VFormula fLength(formulaLength, this->getData());
fLength.setCheckZero(true);
@ -151,11 +151,11 @@ VFormula VToolLinePoint::getFormulaLength() const
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLinePoint::setFormulaLength(const VFormula &value)
void VToolLinePoint::SetFormulaLength(const VFormula &value)
{
if (value.error() == false)
{
formulaLength = value.getFormula(FormulaType::FromUser);
formulaLength = value.GetFormula(FormulaType::FromUser);
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);

View File

@ -44,14 +44,14 @@ public:
virtual ~VToolLinePoint();
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::LinePoint)};
VFormula getFormulaLength() const;
void setFormulaLength(const VFormula &value);
VFormula GetFormulaLength() const;
void SetFormulaLength(const VFormula &value);
quint32 getBasePointId() const;
void setBasePointId(const quint32 &value);
quint32 GetBasePointId() const;
void SetBasePointId(const quint32 &value);
qreal getAngle() const;
void setAngle(const qreal &value);
qreal GetAngle() const;
void SetAngle(const qreal &value);
public slots:
virtual void ChangedActivDraw(const QString &newName);

View File

@ -75,12 +75,12 @@ void VToolNormal::setDialog()
DialogNormal *dialogTool = qobject_cast<DialogNormal*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setTypeLine(typeLine);
dialogTool->setFormula(formulaLength);
dialogTool->setAngle(angle);
dialogTool->setFirstPointId(basePointId);
dialogTool->setSecondPointId(secondPointId);
dialogTool->setPointName(p->name());
dialogTool->SetTypeLine(typeLine);
dialogTool->SetFormula(formulaLength);
dialogTool->SetAngle(angle);
dialogTool->SetFirstPointId(basePointId);
dialogTool->SetSecondPointId(secondPointId);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -96,12 +96,12 @@ VToolNormal* VToolNormal::Create(DialogTool *dialog, VMainGraphicsScene *scene,
SCASSERT(dialog != nullptr);
DialogNormal *dialogTool = qobject_cast<DialogNormal*>(dialog);
SCASSERT(dialogTool != nullptr);
QString formula = dialogTool->getFormula();
const quint32 firstPointId = dialogTool->getFirstPointId();
const quint32 secondPointId = dialogTool->getSecondPointId();
const QString typeLine = dialogTool->getTypeLine();
QString formula = dialogTool->GetFormula();
const quint32 firstPointId = dialogTool->GetFirstPointId();
const quint32 secondPointId = dialogTool->GetSecondPointId();
const QString typeLine = dialogTool->GetTypeLine();
const QString pointName = dialogTool->getPointName();
const qreal angle = dialogTool->getAngle();
const qreal angle = dialogTool->GetAngle();
VToolNormal *point = nullptr;
point=Create(0, formula, firstPointId, secondPointId, typeLine, pointName, angle, 5, 10, scene, doc, data,
Document::FullParse, Source::FromGui);
@ -217,7 +217,7 @@ void VToolNormal::FullUpdateFromFile()
visual->setPoint1Id(basePointId);
visual->setPoint2Id(secondPointId);
visual->setLength(qApp->FormulaToUser(formulaLength));
visual->setAngle(angle);
visual->SetAngle(angle);
visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
visual->RefreshGeometry();
}
@ -274,11 +274,11 @@ void VToolNormal::SaveDialog(QDomElement &domElement)
DialogNormal *dialogTool = qobject_cast<DialogNormal*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine());
doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula());
doc->SetAttribute(domElement, AttrAngle, QString().setNum(dialogTool->getAngle()));
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPointId()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPointId()));
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrAngle, QString().setNum(dialogTool->GetAngle()));
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId()));
}
//---------------------------------------------------------------------------------------------------------------------
@ -301,13 +301,13 @@ void VToolNormal::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolNormal::getSecondPointId() const
quint32 VToolNormal::GetSecondPointId() const
{
return secondPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolNormal::setSecondPointId(const quint32 &value)
void VToolNormal::SetSecondPointId(const quint32 &value)
{
if (value != NULL_ID)
{
@ -333,7 +333,7 @@ void VToolNormal::ShowVisualization(bool show)
visual->setPoint1Id(basePointId);
visual->setPoint2Id(secondPointId);
visual->setLength(qApp->FormulaToUser(formulaLength));
visual->setAngle(angle);
visual->SetAngle(angle);
visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine));
visual->RefreshGeometry();
vis = visual;

View File

@ -53,8 +53,8 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::Normal)};
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
virtual void ShowVisualization(bool show);
public slots:

View File

@ -78,9 +78,9 @@ void VToolPointOfContact::setDialog()
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setRadius(arcRadius);
dialogTool->setCenter(center);
dialogTool->setFirstPoint(firstPointId);
dialogTool->setSecondPoint(secondPointId);
dialogTool->setPointName(p->name());
dialogTool->SetFirstPoint(firstPointId);
dialogTool->SetSecondPoint(secondPointId);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -138,8 +138,8 @@ VToolPointOfContact* VToolPointOfContact::Create(DialogTool *dialog, VMainGraphi
SCASSERT(dialogTool != nullptr);
QString radius = dialogTool->getRadius();
const quint32 center = dialogTool->getCenter();
const quint32 firstPointId = dialogTool->getFirstPoint();
const quint32 secondPointId = dialogTool->getSecondPoint();
const quint32 firstPointId = dialogTool->GetFirstPoint();
const quint32 secondPointId = dialogTool->GetSecondPoint();
const QString pointName = dialogTool->getPointName();
VToolPointOfContact *point = nullptr;
point=Create(0, radius, center, firstPointId, secondPointId, pointName, 5, 10, scene, doc, data,
@ -300,8 +300,8 @@ void VToolPointOfContact::SaveDialog(QDomElement &domElement)
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrRadius, dialogTool->getRadius());
doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->getCenter()));
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPoint()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPoint()));
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPoint()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPoint()));
}
//---------------------------------------------------------------------------------------------------------------------
@ -323,13 +323,13 @@ void VToolPointOfContact::SaveOptions(QDomElement &tag, QSharedPointer<VGObject>
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolPointOfContact::getSecondPointId() const
quint32 VToolPointOfContact::GetSecondPointId() const
{
return secondPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolPointOfContact::setSecondPointId(const quint32 &value)
void VToolPointOfContact::SetSecondPointId(const quint32 &value)
{
secondPointId = value;
}
@ -370,13 +370,13 @@ void VToolPointOfContact::ShowVisualization(bool show)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolPointOfContact::getFirstPointId() const
quint32 VToolPointOfContact::GetFirstPointId() const
{
return firstPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolPointOfContact::setFirstPointId(const quint32 &value)
void VToolPointOfContact::SetFirstPointId(const quint32 &value)
{
firstPointId = value;
}
@ -415,7 +415,7 @@ void VToolPointOfContact::setArcRadius(const VFormula &value)
{
if (value.error() == false)
{
arcRadius = value.getFormula(FormulaType::FromUser);
arcRadius = value.GetFormula(FormulaType::FromUser);
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);

View File

@ -62,11 +62,11 @@ public:
quint32 getCenter() const;
void setCenter(const quint32 &value);
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
virtual void ShowVisualization(bool show);
public slots:

View File

@ -70,9 +70,9 @@ void VToolPointOfIntersection::setDialog()
DialogPointOfIntersection *dialogTool = qobject_cast<DialogPointOfIntersection*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setFirstPointId(firstPointId);
dialogTool->setSecondPointId(secondPointId);
dialogTool->setPointName(p->name());
dialogTool->SetFirstPointId(firstPointId);
dialogTool->SetSecondPointId(secondPointId);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -90,8 +90,8 @@ VToolPointOfIntersection *VToolPointOfIntersection::Create(DialogTool *dialog, V
SCASSERT(dialog != nullptr);
DialogPointOfIntersection *dialogTool = qobject_cast<DialogPointOfIntersection*>(dialog);
SCASSERT(dialogTool != nullptr);
const quint32 firstPointId = dialogTool->getFirstPointId();
const quint32 secondPointId = dialogTool->getSecondPointId();
const quint32 firstPointId = dialogTool->GetFirstPointId();
const quint32 secondPointId = dialogTool->GetSecondPointId();
const QString pointName = dialogTool->getPointName();
VToolPointOfIntersection *point = nullptr;
point = Create(0, pointName, firstPointId, secondPointId, 5, 10, scene, doc, data, Document::FullParse,
@ -222,8 +222,8 @@ void VToolPointOfIntersection::SaveDialog(QDomElement &domElement)
DialogPointOfIntersection *dialogTool = qobject_cast<DialogPointOfIntersection*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPointId()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPointId()));
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId()));
}
//---------------------------------------------------------------------------------------------------------------------
@ -243,13 +243,13 @@ void VToolPointOfIntersection::SaveOptions(QDomElement &tag, QSharedPointer<VGOb
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolPointOfIntersection::getSecondPointId() const
quint32 VToolPointOfIntersection::GetSecondPointId() const
{
return secondPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolPointOfIntersection::setSecondPointId(const quint32 &value)
void VToolPointOfIntersection::SetSecondPointId(const quint32 &value)
{
if (value != NULL_ID)
{
@ -294,13 +294,13 @@ void VToolPointOfIntersection::ShowVisualization(bool show)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolPointOfIntersection::getFirstPointId() const
quint32 VToolPointOfIntersection::GetFirstPointId() const
{
return firstPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolPointOfIntersection::setFirstPointId(const quint32 &value)
void VToolPointOfIntersection::SetFirstPointId(const quint32 &value)
{
if (value != NULL_ID)
{

View File

@ -52,11 +52,11 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::PointOfIntersection) };
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
virtual void ShowVisualization(bool show);
public slots:

View File

@ -74,12 +74,12 @@ void VToolShoulderPoint::setDialog()
DialogShoulderPoint *dialogTool = qobject_cast<DialogShoulderPoint*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setTypeLine(typeLine);
dialogTool->setFormula(formulaLength);
dialogTool->setP1Line(basePointId);
dialogTool->setP2Line(p2Line);
dialogTool->setP3(pShoulder);
dialogTool->setPointName(p->name());
dialogTool->SetTypeLine(typeLine);
dialogTool->SetFormula(formulaLength);
dialogTool->SetP1Line(basePointId);
dialogTool->SetP2Line(p2Line);
dialogTool->SetP3(pShoulder);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -134,11 +134,11 @@ VToolShoulderPoint* VToolShoulderPoint::Create(DialogTool *dialog, VMainGraphics
SCASSERT(dialog != nullptr);
DialogShoulderPoint *dialogTool = qobject_cast<DialogShoulderPoint*>(dialog);
SCASSERT(dialogTool);
QString formula = dialogTool->getFormula();
const quint32 p1Line = dialogTool->getP1Line();
const quint32 p2Line = dialogTool->getP2Line();
const quint32 pShoulder = dialogTool->getP3();
const QString typeLine = dialogTool->getTypeLine();
QString formula = dialogTool->GetFormula();
const quint32 p1Line = dialogTool->GetP1Line();
const quint32 p2Line = dialogTool->GetP2Line();
const quint32 pShoulder = dialogTool->GetP3();
const QString typeLine = dialogTool->GetTypeLine();
const QString pointName = dialogTool->getPointName();
VToolShoulderPoint * point = nullptr;
point=Create(0, formula, p1Line, p2Line, pShoulder, typeLine, pointName, 5, 10, scene, doc, data,
@ -300,11 +300,11 @@ void VToolShoulderPoint::SaveDialog(QDomElement &domElement)
DialogShoulderPoint *dialogTool = qobject_cast<DialogShoulderPoint*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine());
doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula());
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->getP1Line()));
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->getP2Line()));
doc->SetAttribute(domElement, AttrPShoulder, QString().setNum(dialogTool->getP3()));
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetP1Line()));
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetP2Line()));
doc->SetAttribute(domElement, AttrPShoulder, QString().setNum(dialogTool->GetP3()));
}
//---------------------------------------------------------------------------------------------------------------------
@ -381,13 +381,13 @@ void VToolShoulderPoint::ShowVisualization(bool show)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolShoulderPoint::getP2Line() const
quint32 VToolShoulderPoint::GetP2Line() const
{
return p2Line;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolShoulderPoint::setP2Line(const quint32 &value)
void VToolShoulderPoint::SetP2Line(const quint32 &value)
{
if (value != NULL_ID)
{

View File

@ -54,8 +54,8 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::ShoulderPoint) };
quint32 getP2Line() const;
void setP2Line(const quint32 &value);
quint32 GetP2Line() const;
void SetP2Line(const quint32 &value);
quint32 getPShoulder() const;
void setPShoulder(const quint32 &value);

View File

@ -58,7 +58,7 @@ VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id,
this->setFlag(QGraphicsItem::ItemIsMovable, true);
this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
this->setFlag(QGraphicsItem::ItemIsFocusable, false);
setColorLabel(Qt::black);
SetColorLabel(Qt::black);
if (typeCreation == Source::FromGui)
{
AddToFile();
@ -79,7 +79,7 @@ void VToolSinglePoint::setDialog()
DialogSinglePoint *dialogTool = qobject_cast<DialogSinglePoint*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setData(p->name(), p->toQPointF());
dialogTool->SetData(p->name(), p->toQPointF());
}
//---------------------------------------------------------------------------------------------------------------------
@ -194,7 +194,7 @@ void VToolSinglePoint::SaveDialog(QDomElement &domElement)
SCASSERT(dialog != nullptr);
DialogSinglePoint *dialogTool = qobject_cast<DialogSinglePoint*>(dialog);
SCASSERT(dialogTool != nullptr);
QPointF p = dialogTool->getPoint();
QPointF p = dialogTool->GetPoint();
QString name = dialogTool->getPointName();
doc->SetAttribute(domElement, AttrName, name);
doc->SetAttribute(domElement, AttrX, QString().setNum(qApp->fromPixel(p.x())));
@ -241,10 +241,10 @@ void VToolSinglePoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setColorLabel change color for label and label line.
* @brief SetColorLabel change color for label and label line.
* @param color new color.
*/
void VToolSinglePoint::setColorLabel(const Qt::GlobalColor &color)
void VToolSinglePoint::SetColorLabel(const Qt::GlobalColor &color)
{
namePoint->setBrush(color);
lineName->setPen(QPen(color, qApp->toPixel(qApp->widthHairLine())/factor));
@ -310,12 +310,12 @@ void VToolSinglePoint::ChangedActivDraw(const QString &newName)
if (nameActivDraw == newName)
{
this->setEnabled(true);
setColorLabel(Qt::black);
SetColorLabel(Qt::black);
}
else
{
this->setEnabled(false);
setColorLabel(Qt::gray);
SetColorLabel(Qt::gray);
}
}

View File

@ -71,7 +71,7 @@ protected:
private:
QString namePP;
QString mPath;
void setColorLabel(const Qt::GlobalColor & color);
void SetColorLabel(const Qt::GlobalColor & color);
};

View File

@ -98,13 +98,13 @@ void VToolSpline::setDialog()
DialogSpline *dialogTool = qobject_cast<DialogSpline*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VSpline> spl = VAbstractTool::data.GeometricObject<VSpline>(id);
dialogTool->setP1(spl->GetP1().id());
dialogTool->setP4(spl->GetP4().id());
dialogTool->setAngle1(spl->GetAngle1());
dialogTool->setAngle2(spl->GetAngle2());
dialogTool->setKAsm1(spl->GetKasm1());
dialogTool->setKAsm2(spl->GetKasm2());
dialogTool->setKCurve(spl->GetKcurve());
dialogTool->SetP1(spl->GetP1().id());
dialogTool->SetP4(spl->GetP4().id());
dialogTool->SetAngle1(spl->GetAngle1());
dialogTool->SetAngle2(spl->GetAngle2());
dialogTool->SetKAsm1(spl->GetKasm1());
dialogTool->SetKAsm2(spl->GetKasm2());
dialogTool->SetKCurve(spl->GetKcurve());
}
//---------------------------------------------------------------------------------------------------------------------
@ -121,13 +121,13 @@ VToolSpline* VToolSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene,
SCASSERT(dialog != nullptr);
DialogSpline *dialogTool = qobject_cast<DialogSpline*>(dialog);
SCASSERT(dialogTool != nullptr);
const quint32 p1 = dialogTool->getP1();
const quint32 p4 = dialogTool->getP4();
const qreal kAsm1 = dialogTool->getKAsm1();
const qreal kAsm2 = dialogTool->getKAsm2();
const qreal angle1 = dialogTool->getAngle1();
const qreal angle2 = dialogTool->getAngle2();
const qreal kCurve = dialogTool->getKCurve();
const quint32 p1 = dialogTool->GetP1();
const quint32 p4 = dialogTool->GetP4();
const qreal kAsm1 = dialogTool->GetKAsm1();
const qreal kAsm2 = dialogTool->GetKAsm2();
const qreal angle1 = dialogTool->GetAngle1();
const qreal angle2 = dialogTool->GetAngle2();
const qreal kCurve = dialogTool->GetKCurve();
VToolSpline *spl = nullptr;
spl = Create(0, p1, p4, kAsm1, kAsm2, angle1, angle2, kCurve, scene, doc, data, Document::FullParse,
Source::FromGui);
@ -225,11 +225,11 @@ void VToolSpline::ShowVisualization(bool show)
const QSharedPointer<VSpline> spl = VAbstractTool::data.GeometricObject<VSpline>(id);
visual->setPoint1Id(spl->GetP1().id());
visual->setPoint4Id(spl->GetP4().id());
visual->setAngle1(spl->GetAngle1());
visual->setAngle2(spl->GetAngle2());
visual->setKAsm1(spl->GetKasm1());
visual->setKAsm2(spl->GetKasm2());
visual->setKCurve(spl->GetKcurve());
visual->SetAngle1(spl->GetAngle1());
visual->SetAngle2(spl->GetAngle2());
visual->SetKAsm1(spl->GetKasm1());
visual->SetKAsm2(spl->GetKasm2());
visual->SetKCurve(spl->GetKcurve());
visual->RefreshGeometry();
vis = visual;
}
@ -308,10 +308,10 @@ void VToolSpline::SaveDialog(QDomElement &domElement)
DialogSpline *dialogTool = qobject_cast<DialogSpline*>(dialog);
SCASSERT(dialogTool != nullptr);
VPointF point1 = *VAbstractTool::data.GeometricObject<VPointF>(dialogTool->getP1());
VPointF point4 = *VAbstractTool::data.GeometricObject<VPointF>(dialogTool->getP4());
VSpline spl = VSpline (point1, point4, dialogTool->getAngle1(), dialogTool->getAngle2(),
dialogTool->getKAsm1(), dialogTool->getKAsm2(), dialogTool->getKCurve());
VPointF point1 = *VAbstractTool::data.GeometricObject<VPointF>(dialogTool->GetP1());
VPointF point4 = *VAbstractTool::data.GeometricObject<VPointF>(dialogTool->GetP4());
VSpline spl = VSpline (point1, point4, dialogTool->GetAngle1(), dialogTool->GetAngle2(),
dialogTool->GetKAsm1(), dialogTool->GetKAsm2(), dialogTool->GetKCurve());
controlPoints[0]->blockSignals(true);
controlPoints[1]->blockSignals(true);
@ -322,7 +322,7 @@ void VToolSpline::SaveDialog(QDomElement &domElement)
controlPoints[0]->blockSignals(false);
controlPoints[1]->blockSignals(false);
spl = VSpline (point1, controlPoints[0]->pos(), controlPoints[1]->pos(), point4, dialogTool->getKCurve());
spl = VSpline (point1, controlPoints[0]->pos(), controlPoints[1]->pos(), point4, dialogTool->GetKCurve());
doc->SetAttribute(domElement, AttrPoint1, spl.GetP1().id());
doc->SetAttribute(domElement, AttrPoint4, spl.GetP4().id());
@ -388,11 +388,11 @@ void VToolSpline::RefreshGeometry()
VisToolSpline *visual = qobject_cast<VisToolSpline *>(vis);
visual->setPoint1Id(spl->GetP1().id());
visual->setPoint4Id(spl->GetP4().id());
visual->setAngle1(spl->GetAngle1());
visual->setAngle2(spl->GetAngle2());
visual->setKAsm1(spl->GetKasm1());
visual->setKAsm2(spl->GetKasm2());
visual->setKCurve(spl->GetKcurve());
visual->SetAngle1(spl->GetAngle1());
visual->SetAngle2(spl->GetAngle2());
visual->SetKAsm1(spl->GetKasm1());
visual->SetKAsm2(spl->GetKasm2());
visual->SetKCurve(spl->GetKcurve());
visual->RefreshGeometry();
}
}

View File

@ -237,7 +237,7 @@ void VToolSplinePath::RefreshSplinePath(VSplinePath &splPath)
controlPoints[j-1]->blockSignals(false);
spl = VSpline (spl.GetP1(), controlPoints[j-2]->pos(), controlPoints[j-1]->pos(), spl.GetP4(),
splPath.getKCurve());
splPath.GetKCurve());
UpdateControlPoints(spl, splPath, i);
}
}
@ -340,7 +340,7 @@ void VToolSplinePath::RefreshDataInFile()
}
VSplinePath splPath = *VAbstractTool::data.GeometricObject<VSplinePath>(id);
RefreshSplinePath(splPath);
doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.getKCurve()));
doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.GetKCurve()));
UpdatePathPoint(doc, domElement, splPath);
}
@ -388,7 +388,7 @@ void VToolSplinePath::SaveDialog(QDomElement &domElement)
VSplinePath splPath = dialogTool->GetPath();
RefreshSplinePath(splPath);
doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.getKCurve()));
doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.GetKCurve()));
UpdatePathPoint(doc, domElement, splPath);
}
@ -400,7 +400,7 @@ void VToolSplinePath::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &ob
doc->SetAttribute(tag, VDomDocument::AttrId, id);
doc->SetAttribute(tag, AttrType, ToolType);
doc->SetAttribute(tag, AttrKCurve, splPath->getKCurve());
doc->SetAttribute(tag, AttrKCurve, splPath->GetKCurve());
doc->RemoveAllChild(tag);
for (qint32 i = 0; i < splPath->CountPoint(); ++i)

View File

@ -74,11 +74,11 @@ void VToolTriangle::setDialog()
DialogTriangle *dialogTool = qobject_cast<DialogTriangle*>(dialog);
SCASSERT(dialogTool != nullptr);
const QSharedPointer<VPointF> p = VAbstractTool::data.GeometricObject<VPointF>(id);
dialogTool->setAxisP1Id(axisP1Id);
dialogTool->setAxisP2Id(axisP2Id);
dialogTool->setFirstPointId(firstPointId);
dialogTool->setSecondPointId(secondPointId);
dialogTool->setPointName(p->name());
dialogTool->SetAxisP1Id(axisP1Id);
dialogTool->SetAxisP2Id(axisP2Id);
dialogTool->SetFirstPointId(firstPointId);
dialogTool->SetSecondPointId(secondPointId);
dialogTool->SetPointName(p->name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -95,10 +95,10 @@ VToolTriangle* VToolTriangle::Create(DialogTool *dialog, VMainGraphicsScene *sce
SCASSERT(dialog != nullptr);
DialogTriangle *dialogTool = qobject_cast<DialogTriangle*>(dialog);
SCASSERT(dialogTool != nullptr);
const quint32 axisP1Id = dialogTool->getAxisP1Id();
const quint32 axisP2Id = dialogTool->getAxisP2Id();
const quint32 firstPointId = dialogTool->getFirstPointId();
const quint32 secondPointId = dialogTool->getSecondPointId();
const quint32 axisP1Id = dialogTool->GetAxisP1Id();
const quint32 axisP2Id = dialogTool->GetAxisP2Id();
const quint32 firstPointId = dialogTool->GetFirstPointId();
const quint32 secondPointId = dialogTool->GetSecondPointId();
const QString pointName = dialogTool->getPointName();
VToolTriangle* point = nullptr;
point = Create(0, pointName, axisP1Id, axisP2Id, firstPointId, secondPointId, 5, 10, scene, doc, data,
@ -283,10 +283,10 @@ void VToolTriangle::SaveDialog(QDomElement &domElement)
DialogTriangle *dialogTool = qobject_cast<DialogTriangle*>(dialog);
SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrAxisP1, QString().setNum(dialogTool->getAxisP1Id()));
doc->SetAttribute(domElement, AttrAxisP2, QString().setNum(dialogTool->getAxisP2Id()));
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPointId()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPointId()));
doc->SetAttribute(domElement, AttrAxisP1, QString().setNum(dialogTool->GetAxisP1Id()));
doc->SetAttribute(domElement, AttrAxisP2, QString().setNum(dialogTool->GetAxisP2Id()));
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId()));
}
//---------------------------------------------------------------------------------------------------------------------
@ -308,13 +308,13 @@ void VToolTriangle::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolTriangle::getSecondPointId() const
quint32 VToolTriangle::GetSecondPointId() const
{
return secondPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolTriangle::setSecondPointId(const quint32 &value)
void VToolTriangle::SetSecondPointId(const quint32 &value)
{
if (value != NULL_ID)
{
@ -361,13 +361,13 @@ void VToolTriangle::ShowVisualization(bool show)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolTriangle::getFirstPointId() const
quint32 VToolTriangle::GetFirstPointId() const
{
return firstPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolTriangle::setFirstPointId(const quint32 &value)
void VToolTriangle::SetFirstPointId(const quint32 &value)
{
if (value != NULL_ID)
{
@ -379,13 +379,13 @@ void VToolTriangle::setFirstPointId(const quint32 &value)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolTriangle::getAxisP2Id() const
quint32 VToolTriangle::GetAxisP2Id() const
{
return axisP2Id;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolTriangle::setAxisP2Id(const quint32 &value)
void VToolTriangle::SetAxisP2Id(const quint32 &value)
{
if (value != NULL_ID)
{
@ -397,13 +397,13 @@ void VToolTriangle::setAxisP2Id(const quint32 &value)
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolTriangle::getAxisP1Id() const
quint32 VToolTriangle::GetAxisP1Id() const
{
return axisP1Id;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolTriangle::setAxisP1Id(const quint32 &value)
void VToolTriangle::SetAxisP1Id(const quint32 &value)
{
if (value != NULL_ID)
{

View File

@ -54,17 +54,17 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::Triangle)};
quint32 getAxisP1Id() const;
void setAxisP1Id(const quint32 &value);
quint32 GetAxisP1Id() const;
void SetAxisP1Id(const quint32 &value);
quint32 getAxisP2Id() const;
void setAxisP2Id(const quint32 &value);
quint32 GetAxisP2Id() const;
void SetAxisP2Id(const quint32 &value);
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 GetFirstPointId() const;
void SetFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
quint32 GetSecondPointId() const;
void SetSecondPointId(const quint32 &value);
virtual void ShowVisualization(bool show);
public slots:

View File

@ -239,7 +239,7 @@ QString VAbstractTool::getLineType() const
}
//---------------------------------------------------------------------------------------------------------------------
void VAbstractTool::setTypeLine(const QString &value)
void VAbstractTool::SetTypeLine(const QString &value)
{
typeLine = value;

View File

@ -115,7 +115,7 @@ public:
const VContainer *getData() const;
QString getLineType() const;
virtual void setTypeLine(const QString &value);
virtual void SetTypeLine(const QString &value);
QMap<QString, quint32> PointsList() const;
virtual QString getTagName() const =0;
virtual void ShowVisualization(bool show) =0;

View File

@ -206,7 +206,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
{
VSpline spline(splinePath->at(i-1).P(), splinePath->at(i).P(),
splinePath->at(i-1).Angle2(), splinePath->at(i).Angle1(), splinePath->at(i-1).KAsm2(),
splinePath->at(i).KAsm1(), splinePath->getKCurve());
splinePath->at(i).KAsm1(), splinePath->GetKCurve());
VPointF *p1 = new VPointF(spline.GetP1());
BiasRotatePoint(p1, dx, dy, data->GeometricObject<VPointF>(pRotate)->toQPointF(),
@ -366,7 +366,7 @@ void VToolUnionDetails::UpdatePoints(const quint32 &idDetail, VContainer *data,
{
VSpline spline(splinePath->at(i-1).P(), splinePath->at(i).P(),
splinePath->at(i-1).Angle2(), splinePath->at(i).Angle1(), splinePath->at(i-1).KAsm2(),
splinePath->at(i).KAsm1(), splinePath->getKCurve());
splinePath->at(i).KAsm1(), splinePath->GetKCurve());
VPointF *p1 = new VPointF(spline.GetP1());
BiasRotatePoint(p1, dx, dy, data->GeometricObject<VPointF>(pRotate)->toQPointF(),

View File

@ -89,7 +89,7 @@ void MoveSplinePath::Do(const VSplinePath &splPath)
QDomElement domElement = doc->elementById(QString().setNum(nodeId));
if (domElement.isElement())
{
doc->SetAttribute(domElement, VToolSplinePath::AttrKCurve, QString().setNum(splPath.getKCurve()));
doc->SetAttribute(domElement, VToolSplinePath::AttrKCurve, QString().setNum(splPath.GetKCurve()));
VToolSplinePath::UpdatePathPoint(doc, domElement, splPath);
emit NeedLiteParsing(Document::LiteParse);

View File

@ -92,7 +92,7 @@ QString VisToolCurveIntersectAxis::Angle() const
}
//---------------------------------------------------------------------------------------------------------------------
void VisToolCurveIntersectAxis::setAngle(const QString &expression)
void VisToolCurveIntersectAxis::SetAngle(const QString &expression)
{
angle = FindVal(expression);
}

View File

@ -43,7 +43,7 @@ public:
virtual void RefreshGeometry();
QString Angle() const;
void setAngle(const QString &expression);
void SetAngle(const QString &expression);
void setAxisPointId(const quint32 &value);
virtual int type() const {return Type;}

View File

@ -67,8 +67,8 @@ void VisToolCutSplinePath::RefreshGeometry()
VSplinePoint splP1 = splPath->at(p1);
VSplinePoint splP2 = splPath->at(p2);
const VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, p, splPath->getKCurve());
const VSpline spl2 = VSpline(p, spl2p2, spl2p3, splP2.P(), splPath->getKCurve());
const VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, p, splPath->GetKCurve());
const VSpline spl2 = VSpline(p, spl2p2, spl2p3, splP2.P(), splPath->GetKCurve());
VSplinePath spPath1 = VSplinePath();
VSplinePath spPath2 = VSplinePath();
@ -104,8 +104,8 @@ void VisToolCutSplinePath::RefreshGeometry()
}
}
spPath1.setKCurve(splPath->getKCurve());
spPath2.setKCurve(splPath->getKCurve());
spPath1.SetKCurve(splPath->GetKCurve());
spPath2.SetKCurve(splPath->GetKCurve());
DrawPoint(point, cutPoint, mainColor);

View File

@ -72,7 +72,7 @@ QString VisToolEndLine::Angle() const
}
//---------------------------------------------------------------------------------------------------------------------
void VisToolEndLine::setAngle(const QString &expression)
void VisToolEndLine::SetAngle(const QString &expression)
{
angle = FindVal(expression);
}

View File

@ -42,7 +42,7 @@ public:
virtual void RefreshGeometry();
QString Angle() const;
void setAngle(const QString &expression);
void SetAngle(const QString &expression);
void setLength(const QString &expression);
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Vis::ToolEndLine)};

View File

@ -108,7 +108,7 @@ QString VisToolLineIntersectAxis::Angle() const
}
//---------------------------------------------------------------------------------------------------------------------
void VisToolLineIntersectAxis::setAngle(const QString &expression)
void VisToolLineIntersectAxis::SetAngle(const QString &expression)
{
angle = FindVal(expression);
}

View File

@ -43,7 +43,7 @@ public:
virtual void RefreshGeometry();
QString Angle() const;
void setAngle(const QString &expression);
void SetAngle(const QString &expression);
void setPoint2Id(const quint32 &value);
void setAxisPointId(const quint32 &value);

Some files were not shown because too many files have changed in this diff Show More