Methods can be static.

--HG--
branch : feature
This commit is contained in:
dismine 2014-02-26 11:38:14 +02:00
parent 4fcd7d9b25
commit 25e6df1c1d
2 changed files with 12 additions and 12 deletions

View File

@ -157,7 +157,7 @@ QPainterPath VEquidistant::ContourPath(const quint32 &idDetail, const VContainer
return path;
}
qreal VEquidistant::GetLengthContour(const QVector<QPointF> &contour, const QVector<QPointF> &newPoints) const
qreal VEquidistant::GetLengthContour(const QVector<QPointF> &contour, const QVector<QPointF> &newPoints)
{
qreal length = 0;
QVector<QPointF> points;
@ -170,7 +170,7 @@ qreal VEquidistant::GetLengthContour(const QVector<QPointF> &contour, const QVec
return length;
}
QVector<QPointF> VEquidistant::biasPoints(const QVector<QPointF> &points, const qreal &mx, const qreal &my) const
QVector<QPointF> VEquidistant::biasPoints(const QVector<QPointF> &points, const qreal &mx, const qreal &my)
{
QVector<QPointF> p;
for (qint32 i = 0; i < points.size(); ++i)
@ -183,7 +183,7 @@ QVector<QPointF> VEquidistant::biasPoints(const QVector<QPointF> &points, const
return p;
}
QVector<QPointF> VEquidistant::CorrectEquidistantPoints(const QVector<QPointF> &points) const
QVector<QPointF> VEquidistant::CorrectEquidistantPoints(const QVector<QPointF> &points)
{
QVector<QPointF> correctPoints;
if (points.size()<4)//Better don't check if only three points. We can destroy equidistant.
@ -295,7 +295,7 @@ QPainterPath VEquidistant::Equidistant(QVector<QPointF> points, const Detail::Eq
return ekv;
}
QVector<QPointF> VEquidistant::CheckLoops(const QVector<QPointF> &points) const
QVector<QPointF> VEquidistant::CheckLoops(const QVector<QPointF> &points)
{
QVector<QPointF> ekvPoints;
/*If we got less than 4 points no need seek loops.*/
@ -353,7 +353,7 @@ QVector<QPointF> VEquidistant::CheckLoops(const QVector<QPointF> &points) const
return ekvPoints;
}
QVector<QPointF> VEquidistant::GetReversePoint(const QVector<QPointF> &points) const
QVector<QPointF> VEquidistant::GetReversePoint(const QVector<QPointF> &points)
{
Q_ASSERT(points.size() > 0);
QVector<QPointF> reversePoints;
@ -421,7 +421,7 @@ QLineF VEquidistant::ParallelLine(const QLineF &line, qreal width) const
return paralel;
}
QPointF VEquidistant::SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width) const
QPointF VEquidistant::SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width)
{
Q_ASSERT(width > 0);
QLineF pLine = line;

View File

@ -52,7 +52,7 @@ private:
* @param newPoints point whos we try to add to contour.
* @return length length of contour.
*/
qreal GetLengthContour(const QVector<QPointF> &contour, const QVector<QPointF> &newPoints) const;
static qreal GetLengthContour(const QVector<QPointF> &contour, const QVector<QPointF> &newPoints);
/**
* @brief biasPoints bias point.
* @param points vector of points.
@ -60,13 +60,13 @@ private:
* @param my offset respect to y.
* @return new vector biased points.
*/
QVector<QPointF> biasPoints(const QVector<QPointF> &points, const qreal &mx, const qreal &my) const;
static QVector<QPointF> biasPoints(const QVector<QPointF> &points, const qreal &mx, const qreal &my);
/**
* @brief CorrectEquidistantPoints clear equivalent points and remove point on line from equdistant.
* @param points list of points equdistant.
* @return corrected list.
*/
QVector<QPointF> CorrectEquidistantPoints(const QVector<QPointF> &points) const;
static QVector<QPointF> CorrectEquidistantPoints(const QVector<QPointF> &points);
/**
* @brief Equidistant create equidistant painter path for detail.
* @param points vector of points.
@ -80,13 +80,13 @@ private:
* @param points vector of points of equidistant.
* @return vector of points of equidistant.
*/
QVector<QPointF> CheckLoops(const QVector<QPointF> &points) const;
static QVector<QPointF> CheckLoops(const QVector<QPointF> &points);
/**
* @brief GetReversePoint return revers container of points.
* @param points container with points.
* @return reverced points.
*/
QVector<QPointF> GetReversePoint(const QVector<QPointF> &points) const;
static QVector<QPointF> GetReversePoint(const QVector<QPointF> &points);
/**
* @brief EkvPoint return vector of points of equidistant two lines. Last point of two lines must be equal.
* @param line1 first line.
@ -109,7 +109,7 @@ private:
* @param width width to parallel line.
* @return point of parallel line.
*/
QPointF SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width) const;
static QPointF SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width);
};
#endif // VEQUIDISTANT_H