summaryrefslogtreecommitdiffstats
path: root/src/scaler.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 06:50:25 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 06:50:25 +0000
commita7dcba0bccd505f672310722d7205c60f57c9c17 (patch)
treeb78db5f5c2c96cad7a2c18feb8aebdf4c44fa879 /src/scaler.cpp
parent63dc78a1d3758ddb8a4d1f7fa947969141fe6a15 (diff)
downloadksplash-engine-moodin-a7dcba0bccd505f672310722d7205c60f57c9c17.tar.gz
ksplash-engine-moodin-a7dcba0bccd505f672310722d7205c60f57c9c17.zip
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
Diffstat (limited to 'src/scaler.cpp')
-rw-r--r--src/scaler.cpp22
1 files changed, 11 insertions, 11 deletions
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 <qfontmetrics.h>
+#include <tqfontmetrics.h>
#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;