diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
commit | 11f31c37e5fa4889d9989f10272f44845449cb7b (patch) | |
tree | 4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/general/Spline.cpp | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip |
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/general/Spline.cpp')
-rw-r--r-- | src/gui/general/Spline.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/general/Spline.cpp b/src/gui/general/Spline.cpp index 455cca5..297c21f 100644 --- a/src/gui/general/Spline.cpp +++ b/src/gui/general/Spline.cpp @@ -25,7 +25,7 @@ #include "Spline.h" -#include <qpoint.h> +#include <tqpoint.h> namespace Rosegarden @@ -33,25 +33,25 @@ namespace Rosegarden Spline::PointList * -Spline::calculate(const QPoint &s, const QPoint &f, const PointList &cp, - QPoint &topLeft, QPoint &bottomRight) +Spline::calculate(const TQPoint &s, const TQPoint &f, const PointList &cp, + TQPoint &topLeft, TQPoint &bottomRight) { if (cp.size() < 2) return 0; int i; PointList *acc = new PointList(); - QPoint p(s); + TQPoint p(s); - topLeft = bottomRight = QPoint(0, 0); + topLeft = bottomRight = TQPoint(0, 0); for (i = 1; i < cp.size(); ++i) { - QPoint c(cp[i - 1]); + TQPoint c(cp[i - 1]); int x = (c.x() + cp[i].x()) / 2; int y = (c.y() + cp[i].y()) / 2; - QPoint n(x, y); + TQPoint n(x, y); calculateSegment(acc, p, n, c, topLeft, bottomRight); @@ -65,8 +65,8 @@ Spline::calculate(const QPoint &s, const QPoint &f, const PointList &cp, void Spline::calculateSegment(PointList *acc, - const QPoint &s, const QPoint &f, const QPoint &c, - QPoint &topLeft, QPoint &bottomRight) + const TQPoint &s, const TQPoint &f, const TQPoint &c, + TQPoint &topLeft, TQPoint &bottomRight) { int x, y, n; @@ -99,8 +99,8 @@ Spline::calculateSegment(PointList *acc, void Spline::calculateSegmentSub(PointList *acc, - const QPoint &s, const QPoint &f, const QPoint &c, - int n, QPoint &topLeft, QPoint &bottomRight) + const TQPoint &s, const TQPoint &f, const TQPoint &c, + int n, TQPoint &topLeft, TQPoint &bottomRight) { double ax = (double)(f.x() + s.x() - 2 * c.x()) / (double)n; double ay = (double)(f.y() + s.y() - 2 * c.y()) / (double)n; @@ -123,7 +123,7 @@ Spline::calculateSegmentSub(PointList *acc, if (y > bottomRight.y()) bottomRight.setY(y); - acc->push_back(QPoint(x, y)); + acc->push_back(TQPoint(x, y)); } } |