Refactoring.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-02-03 11:27:33 +02:00
parent d6a2388762
commit 4572da85c8
22 changed files with 165 additions and 0 deletions

View File

@ -154,6 +154,18 @@ void DialogArc::SetF2(const QString &value)
MoveCursorToEnd(ui->plainTextEditF2);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogArc::GetColor() const
{
return GetLineColor(ui->comboBoxColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogArc::SetColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief SetF1 set formula first angle of arc

View File

@ -59,6 +59,9 @@ public:
QString GetF2() const;
void SetF2(const QString &value);
QString GetColor() const;
void SetColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
/**

View File

@ -271,6 +271,18 @@ void DialogBisector::setThirdPointId(const quint32 &value)
line->setPoint3Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogBisector::getLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogBisector::setLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogBisector::SaveData()
{

View File

@ -65,6 +65,9 @@ public:
quint32 getThirdPointId() const;
void setThirdPointId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
/**

View File

@ -147,6 +147,18 @@ void DialogCurveIntersectAxis::setCurveId(const quint32 &value)
line->setPoint1Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogCurveIntersectAxis::getLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogCurveIntersectAxis::setLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogCurveIntersectAxis::ShowDialog(bool click)
{

View File

@ -59,6 +59,9 @@ public:
quint32 getCurveId() const;
void setCurveId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
virtual void ShowDialog(bool click);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);

View File

@ -223,6 +223,18 @@ void DialogEndLine::setBasePointId(const quint32 &value)
line->setPoint1Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogEndLine::getLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogEndLine::setLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief DialogEndLine::ShowDialog show dialog after finish working with visual part

View File

@ -62,6 +62,9 @@ public:
quint32 getBasePointId() const;
void setBasePointId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
virtual void ShowDialog(bool click);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);

View File

@ -132,6 +132,18 @@ void DialogHeight::setP2LineId(const quint32 &value)
line->setLineP2Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogHeight::getLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogHeight::setLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.

View File

@ -61,6 +61,9 @@ public:
quint32 getP2LineId() const;
void setP2LineId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
virtual void PointNameChanged();

View File

@ -98,6 +98,18 @@ void DialogLine::setTypeLine(const QString &value)
line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value));
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogLine::getLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLine::setLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFirstPoint set id first point

View File

@ -56,6 +56,9 @@ public:
QString getTypeLine() const;
void setTypeLine(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

@ -168,6 +168,18 @@ void DialogLineIntersectAxis::setSecondPointId(const quint32 &value)
line->setPoint2Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogLineIntersectAxis::getLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::setLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::ShowDialog(bool click)
{

View File

@ -62,6 +62,9 @@ public:
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
virtual void ShowDialog(bool click);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);

View File

@ -203,6 +203,18 @@ void DialogNormal::setSecondPointId(const quint32 &value)
line->setPoint2Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogNormal::getLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogNormal::setLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setFirstPointId set id of first point

View File

@ -64,6 +64,9 @@ public:
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
/**

View File

@ -230,6 +230,18 @@ void DialogShoulderPoint::setP3(const quint32 &value)
line->setPoint1Id(value);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogShoulderPoint::getLineColor() const
{
return GetLineColor(ui->comboBoxLineColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogShoulderPoint::setLineColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxLineColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setP2Line set id second point of line

View File

@ -64,6 +64,9 @@ public:
quint32 getP3() const;
void setP3(const quint32 &value);
QString getLineColor() const;
void setLineColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
/**

View File

@ -213,6 +213,18 @@ void DialogSpline::setKCurve(const qreal &value)
path->setKCurve(kCurve);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogSpline::getColor() const
{
return GetLineColor(ui->comboBoxColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogSpline::setColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setKAsm2 set second coefficient asymmetry

View File

@ -68,6 +68,9 @@ public:
qreal getKCurve() const;
void setKCurve(const qreal &value);
QString getColor() const;
void setColor(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);
virtual void PointNameChanged();

View File

@ -94,6 +94,18 @@ void DialogSplinePath::SetPath(const VSplinePath &value)
ui->listWidget->blockSignals(false);
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogSplinePath::getColor() const
{
return GetLineColor(ui->comboBoxColor);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogSplinePath::setColor(const QString &value)
{
ChangeCurrentData(ui->comboBoxColor, value);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.

View File

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