From 25e6df1c1d9fd36bca824136e30b69d82ac05c84 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 26 Feb 2014 11:38:14 +0200 Subject: [PATCH] Methods can be static. --HG-- branch : feature --- src/geometry/vequidistant.cpp | 12 ++++++------ src/geometry/vequidistant.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/geometry/vequidistant.cpp b/src/geometry/vequidistant.cpp index 66407cf34..285a6eecd 100644 --- a/src/geometry/vequidistant.cpp +++ b/src/geometry/vequidistant.cpp @@ -157,7 +157,7 @@ QPainterPath VEquidistant::ContourPath(const quint32 &idDetail, const VContainer return path; } -qreal VEquidistant::GetLengthContour(const QVector &contour, const QVector &newPoints) const +qreal VEquidistant::GetLengthContour(const QVector &contour, const QVector &newPoints) { qreal length = 0; QVector points; @@ -170,7 +170,7 @@ qreal VEquidistant::GetLengthContour(const QVector &contour, const QVec return length; } -QVector VEquidistant::biasPoints(const QVector &points, const qreal &mx, const qreal &my) const +QVector VEquidistant::biasPoints(const QVector &points, const qreal &mx, const qreal &my) { QVector p; for (qint32 i = 0; i < points.size(); ++i) @@ -183,7 +183,7 @@ QVector VEquidistant::biasPoints(const QVector &points, const return p; } -QVector VEquidistant::CorrectEquidistantPoints(const QVector &points) const +QVector VEquidistant::CorrectEquidistantPoints(const QVector &points) { QVector 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 points, const Detail::Eq return ekv; } -QVector VEquidistant::CheckLoops(const QVector &points) const +QVector VEquidistant::CheckLoops(const QVector &points) { QVector ekvPoints; /*If we got less than 4 points no need seek loops.*/ @@ -353,7 +353,7 @@ QVector VEquidistant::CheckLoops(const QVector &points) const return ekvPoints; } -QVector VEquidistant::GetReversePoint(const QVector &points) const +QVector VEquidistant::GetReversePoint(const QVector &points) { Q_ASSERT(points.size() > 0); QVector 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; diff --git a/src/geometry/vequidistant.h b/src/geometry/vequidistant.h index 652788fbb..2d261a0f4 100644 --- a/src/geometry/vequidistant.h +++ b/src/geometry/vequidistant.h @@ -52,7 +52,7 @@ private: * @param newPoints point whos we try to add to contour. * @return length length of contour. */ - qreal GetLengthContour(const QVector &contour, const QVector &newPoints) const; + static qreal GetLengthContour(const QVector &contour, const QVector &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 biasPoints(const QVector &points, const qreal &mx, const qreal &my) const; + static QVector biasPoints(const QVector &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 CorrectEquidistantPoints(const QVector &points) const; + static QVector CorrectEquidistantPoints(const QVector &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 CheckLoops(const QVector &points) const; + static QVector CheckLoops(const QVector &points); /** * @brief GetReversePoint return revers container of points. * @param points container with points. * @return reverced points. */ - QVector GetReversePoint(const QVector &points) const; + static QVector GetReversePoint(const QVector &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