Refactoring. Left method getPointName only in parent class.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-02-02 18:35:40 +02:00
parent e3b54789f3
commit d5836e2fb3
35 changed files with 9 additions and 169 deletions

View File

@ -277,16 +277,6 @@ void DialogAlongLine::setPointName(const QString &value)
ui->lineEditNamePoint->setText(pointName);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogAlongLine::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line

View File

@ -48,7 +48,6 @@ public:
DialogAlongLine(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogAlongLine();
QString getPointName() const;
void setPointName(const QString &value);
QString getTypeLine() const;

View File

@ -299,16 +299,6 @@ void DialogBisector::closeEvent(QCloseEvent *event)
DialogTool::closeEvent(event);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogBisector::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line

View File

@ -49,7 +49,6 @@ public:
DialogBisector(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogBisector();
QString getPointName() const;
void setPointName(const QString &value);
QString getTypeLine() const;

View File

@ -80,12 +80,6 @@ DialogCurveIntersectAxis::~DialogCurveIntersectAxis()
delete ui;
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogCurveIntersectAxis::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
void DialogCurveIntersectAxis::setPointName(const QString &value)
{

View File

@ -45,7 +45,6 @@ public:
DialogCurveIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogCurveIntersectAxis();
QString getPointName() const;
void setPointName(const QString &value);
QString getTypeLine() const;

View File

@ -197,16 +197,6 @@ QString DialogCutArc::getFormula() const
return qApp->FormulaFromUser(formula);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name point on arc
* @return name
*/
QString DialogCutArc::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getArcId return id of arc

View File

@ -49,7 +49,6 @@ public:
DialogCutArc(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogCutArc();
QString getPointName() const;
void setPointName(const QString &value);
QString getFormula() const;

View File

@ -180,16 +180,6 @@ void DialogCutSpline::ShowVisualization()
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogCutSpline::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFormula return string of formula

View File

@ -48,7 +48,6 @@ public:
DialogCutSpline(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogCutSpline();
QString getPointName() const;
void setPointName(const QString &value);
QString getFormula() const;

View File

@ -180,16 +180,6 @@ void DialogCutSplinePath::ShowVisualization()
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogCutSplinePath::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFormula return string of formula

View File

@ -48,7 +48,6 @@ public:
DialogCutSplinePath(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogCutSplinePath();
QString getPointName() const;
void setPointName(const QString &value);
QString getFormula() const;

View File

@ -310,16 +310,6 @@ DialogEndLine::~DialogEndLine()
delete ui;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogEndLine::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line

View File

@ -48,7 +48,6 @@ public:
DialogEndLine(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogEndLine();
QString getPointName() const;
void setPointName(const QString &value);
QString getTypeLine() const;

View File

@ -264,16 +264,6 @@ void DialogHeight::ShowVisualization()
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogHeight::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line

View File

@ -48,7 +48,6 @@ public:
DialogHeight(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogHeight();
QString getPointName() const;
void setPointName(const QString &value);
QString getTypeLine() const;

View File

@ -430,13 +430,3 @@ quint32 DialogLineIntersect::getP2Line2() const
{
return p2Line2;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name of point
*/
QString DialogLineIntersect::getPointName() const
{
return pointName;
}

View File

@ -60,7 +60,6 @@ public:
quint32 getP2Line2() const;
void setP2Line2(const quint32 &value);
QString getPointName() const;
void setPointName(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);

View File

@ -89,12 +89,6 @@ DialogLineIntersectAxis::~DialogLineIntersectAxis()
delete ui;
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogLineIntersectAxis::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::setPointName(const QString &value)
{

View File

@ -45,7 +45,6 @@ public:
DialogLineIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogLineIntersectAxis();
QString getPointName() const;
void setPointName(const QString &value);
QString getTypeLine() const;

View File

@ -270,16 +270,6 @@ void DialogNormal::setPointName(const QString &value)
ui->lineEditNamePoint->setText(pointName);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogNormal::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line

View File

@ -48,7 +48,6 @@ public:
DialogNormal(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogNormal();
QString getPointName() const;
void setPointName(const QString &value);
QString getTypeLine() const;

View File

@ -297,16 +297,6 @@ void DialogPointOfContact::setPointName(const QString &value)
ui->lineEditNamePoint->setText(pointName);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogPointOfContact::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getRadius return formula radius of arc

View File

@ -49,7 +49,6 @@ public:
DialogPointOfContact(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
virtual ~DialogPointOfContact();
QString getPointName() const;
void setPointName(const QString &value);
QString getRadius() const;

View File

@ -201,16 +201,6 @@ void DialogPointOfIntersection::setPointName(const QString &value)
ui->lineEditNamePoint->setText(pointName);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogPointOfIntersection::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getFirstPointId return id of first point

View File

@ -48,7 +48,6 @@ public:
DialogPointOfIntersection(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogPointOfIntersection();
QString getPointName() const;
void setPointName(const QString &value);
quint32 getFirstPointId() const;

View File

@ -298,16 +298,6 @@ void DialogShoulderPoint::setPointName(const QString &value)
ui->lineEditNamePoint->setText(pointName);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogShoulderPoint::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getTypeLine return type of line

View File

@ -48,7 +48,6 @@ public:
DialogShoulderPoint(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogShoulderPoint();
QString getPointName() const;
void setPointName(const QString &value);
QString getTypeLine() const;

View File

@ -108,16 +108,6 @@ DialogSinglePoint::~DialogSinglePoint()
delete ui;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getName return name
* @return name
*/
QString DialogSinglePoint::getName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPoint return point

View File

@ -46,7 +46,6 @@ public:
DialogSinglePoint(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
~DialogSinglePoint();
void setData(const QString &name, const QPointF &point);
QString getName()const;
QPointF getPoint()const;
public slots:
void mousePress(const QPointF &scenePos);

View File

@ -1187,6 +1187,12 @@ void DialogTool::SetToolId(const quint32 &value)
toolId = value;
}
//---------------------------------------------------------------------------------------------------------------------
QString DialogTool::getPointName() const
{
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ShowVariable show variables in list

View File

@ -69,6 +69,8 @@ public:
quint32 GetToolId() const;
void SetToolId(const quint32 &value);
QString getPointName() const;
signals:
/**
* @brief DialogClosed signal dialog closed

View File

@ -315,13 +315,3 @@ quint32 DialogTriangle::getSecondPointId() const
{
return secondPointId;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getPointName return name of point
* @return name
*/
QString DialogTriangle::getPointName() const
{
return pointName;
}

View File

@ -60,7 +60,6 @@ public:
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
QString getPointName() const;
void setPointName(const QString &value);
public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type);

View File

@ -195,7 +195,7 @@ void VToolSinglePoint::SaveDialog(QDomElement &domElement)
DialogSinglePoint *dialogTool = qobject_cast<DialogSinglePoint*>(dialog);
SCASSERT(dialogTool != nullptr);
QPointF p = dialogTool->getPoint();
QString name = dialogTool->getName();
QString name = dialogTool->getPointName();
doc->SetAttribute(domElement, AttrName, name);
doc->SetAttribute(domElement, AttrX, QString().setNum(qApp->fromPixel(p.x())));
doc->SetAttribute(domElement, AttrY, QString().setNum(qApp->fromPixel(p.y())));