From a7dcba0bccd505f672310722d7205c60f57c9c17 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 1 Jul 2011 06:50:25 +0000 Subject: TQt4 port ksplash-engine-moodin This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ksplash-engine-moodin@1238987 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/scaler.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/scaler.cpp') diff --git a/src/scaler.cpp b/src/scaler.cpp index 70be6d7..398ba07 100644 --- a/src/scaler.cpp +++ b/src/scaler.cpp @@ -9,27 +9,27 @@ * * ***************************************************************************/ -#include +#include #include "scaler.h" -Scaler::Scaler(QSize baseResolution, QSize targetResolution) +Scaler::Scaler(TQSize baseResolution, TQSize targetResolution) { mBaseResolution = baseResolution; mTargetResolution = targetResolution; } -void Scaler::autoCoords(QPoint* pt, const QFont& f, const QString& s) +void Scaler::autoCoords(TQPoint* pt, const TQFont& f, const TQString& s) { - QFontMetrics fm(f); - QSize fmSize(fm.size(0L, s)); + TQFontMetrics fm(f); + TQSize fmSize(fm.size(0L, s)); autoCoords(pt, fmSize); } -void Scaler::autoCoords(QPoint* pt, const QSize s) +void Scaler::autoCoords(TQPoint* pt, const TQSize s) { scaleCoords(pt); @@ -37,12 +37,12 @@ void Scaler::autoCoords(QPoint* pt, const QSize s) pt->setX(center(mTargetResolution.width(), s.width())); else if ((pt->y() == -1) && (pt->x() != -1)) pt->setY(center(mTargetResolution.height(), s.height())); - else if (*pt == QPoint(-1, -1)) - *pt = QPoint(center(mTargetResolution.width(), s.width()), center(mTargetResolution.height(), s.height())); + else if (*pt == TQPoint(-1, -1)) + *pt = TQPoint(center(mTargetResolution.width(), s.width()), center(mTargetResolution.height(), s.height())); } -void Scaler::scaleCoords(QPoint* pt) +void Scaler::scaleCoords(TQPoint* pt) { if (mBaseResolution == mTargetResolution) return; @@ -61,7 +61,7 @@ void Scaler::scaleCoords(QPoint* pt) } -bool Scaler::scaleSize(QImage* i) +bool Scaler::scaleSize(TQImage* i) { if ((!i) || !resolutionDiff()) return false; @@ -77,7 +77,7 @@ bool Scaler::scaleSize(QImage* i) } -bool Scaler::scaleSize(QFont* f) +bool Scaler::scaleSize(TQFont* f) { if ((!f) || !resolutionDiff()) return false; -- cgit v1.2.1