summaryrefslogtreecommitdiffstats
path: root/lib/kotext/KoTextZoomHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kotext/KoTextZoomHandler.cpp')
-rw-r--r--lib/kotext/KoTextZoomHandler.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/kotext/KoTextZoomHandler.cpp b/lib/kotext/KoTextZoomHandler.cpp
index 306c7f2f4..e7e6d1b4a 100644
--- a/lib/kotext/KoTextZoomHandler.cpp
+++ b/lib/kotext/KoTextZoomHandler.cpp
@@ -19,7 +19,7 @@
#include "KoTextZoomHandler.h"
#include <kdebug.h>
-#include <qpaintdevice.h>
+#include <tqpaintdevice.h>
#include <KoUnit.h>
#include <KoGlobal.h>
@@ -36,54 +36,54 @@ int KoTextZoomHandler::fontSizeToLayoutUnit( double ptSizeFloat, bool forPrint )
}
#endif
-double KoTextZoomHandler::layoutUnitToFontSize( int luSize, bool /*forPrint*/ ) const
+double KoTextZoomHandler::tqlayoutUnitToFontSize( int luSize, bool /*forPrint*/ ) const
{
- // Qt will use QPaintDevice::x11AppDpiY() to go from pt to pixel for fonts
- return layoutUnitPtToPt( luSize ) * m_zoomedResolutionY
-#ifdef Q_WS_X11
- / POINT_TO_INCH(QPaintDevice::x11AppDpiY())
+ // TQt will use TQPaintDevice::x11AppDpiY() to go from pt to pixel for fonts
+ return tqlayoutUnitPtToPt( luSize ) * m_zoomedResolutionY
+#ifdef TQ_WS_X11
+ / POINT_TO_INCH(TQPaintDevice::x11AppDpiY())
#endif
;
}
-int KoTextZoomHandler::layoutUnitToPixelX( int x, int w ) const
+int KoTextZoomHandler::tqlayoutUnitToPixelX( int x, int w ) const
{
- // We call layoutUnitToPixelX on the right value, i.e. x+w-1,
+ // We call tqlayoutUnitToPixelX on the right value, i.e. x+w-1,
// and then determine the height from the result (i.e. right-left+1).
- // Calling layoutUnitToPixelX(w) leads to rounding problems.
- return layoutUnitToPixelY( x + w - 1 ) - layoutUnitToPixelY( x ) + 1;
+ // Calling tqlayoutUnitToPixelX(w) leads to rounding problems.
+ return tqlayoutUnitToPixelY( x + w - 1 ) - tqlayoutUnitToPixelY( x ) + 1;
}
-int KoTextZoomHandler::layoutUnitToPixelY( int y, int h ) const
+int KoTextZoomHandler::tqlayoutUnitToPixelY( int y, int h ) const
{
- // We call layoutUnitToPixelY on the bottom value, i.e. y+h-1,
+ // We call tqlayoutUnitToPixelY on the bottom value, i.e. y+h-1,
// and then determine the height from the result (i.e. bottom-top+1).
- // Calling layoutUnitToPixelY(h) leads to rounding problems.
- return layoutUnitToPixelY( y + h - 1 ) - layoutUnitToPixelY( y ) + 1;
+ // Calling tqlayoutUnitToPixelY(h) leads to rounding problems.
+ return tqlayoutUnitToPixelY( y + h - 1 ) - tqlayoutUnitToPixelY( y ) + 1;
}
-int KoTextZoomHandler::layoutUnitToPixelX( int lupix ) const
+int KoTextZoomHandler::tqlayoutUnitToPixelX( int lupix ) const
{
return int( static_cast<double>( lupix * m_zoomedResolutionX )
/ ( static_cast<double>( m_layoutUnitFactor ) * m_resolutionX ) );
}
-int KoTextZoomHandler::layoutUnitToPixelY( int lupix ) const
+int KoTextZoomHandler::tqlayoutUnitToPixelY( int lupix ) const
{
- // qRound replaced with a truncation, too many problems (e.g. bottom of parags)
+ // tqRound replaced with a truncation, too many problems (e.g. bottom of parags)
return int( static_cast<double>( lupix * m_zoomedResolutionY )
/ ( static_cast<double>( m_layoutUnitFactor ) * m_resolutionY ) );
}
int KoTextZoomHandler::pixelToLayoutUnitX( int x ) const
{
- return qRound( static_cast<double>( x * m_layoutUnitFactor * m_resolutionX )
+ return tqRound( static_cast<double>( x * m_layoutUnitFactor * m_resolutionX )
/ m_zoomedResolutionX );
}
int KoTextZoomHandler::pixelToLayoutUnitY( int y ) const
{
- return qRound( static_cast<double>( y * m_layoutUnitFactor * m_resolutionY )
+ return tqRound( static_cast<double>( y * m_layoutUnitFactor * m_resolutionY )
/ m_zoomedResolutionY );
}