summaryrefslogtreecommitdiffstats
path: root/lib/kotext/KoTextZoomHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kotext/KoTextZoomHandler.h')
-rw-r--r--lib/kotext/KoTextZoomHandler.h72
1 files changed, 36 insertions, 36 deletions
diff --git a/lib/kotext/KoTextZoomHandler.h b/lib/kotext/KoTextZoomHandler.h
index 2490cfa6..81211086 100644
--- a/lib/kotext/KoTextZoomHandler.h
+++ b/lib/kotext/KoTextZoomHandler.h
@@ -23,7 +23,7 @@
#include <KoZoomHandler.h>
/**
- * This class extends KoZoomHandler to add support for WYSIWYG text layouting.
+ * This class extends KoZoomHandler to add support for WYSIWYG text tqlayouting.
*/
class KOTEXT_EXPORT KoTextZoomHandler : public KoZoomHandler
{
@@ -31,51 +31,51 @@ public:
KoTextZoomHandler() {}
virtual ~KoTextZoomHandler() {}
- //// Support for WYSIWYG text layouting /////
+ //// Support for WYSIWYG text tqlayouting /////
- /** The "[zoomed] view pixel" -> "layout unit pixel" conversions. */
+ /** The "[zoomed] view pixel" -> "tqlayout unit pixel" conversions. */
int pixelToLayoutUnitX( int x ) const;
int pixelToLayoutUnitY( int y ) const;
- QPoint pixelToLayoutUnit( const QPoint &p ) const
- { return QPoint( pixelToLayoutUnitX( p.x() ),
+ TQPoint pixelToLayoutUnit( const TQPoint &p ) const
+ { return TQPoint( pixelToLayoutUnitX( p.x() ),
pixelToLayoutUnitY( p.y() ) ); }
- QRect pixelToLayoutUnit( const QRect &r ) const
- { return QRect( pixelToLayoutUnit( r.topLeft() ),
+ TQRect pixelToLayoutUnit( const TQRect &r ) const
+ { return TQRect( pixelToLayoutUnit( r.topLeft() ),
pixelToLayoutUnit( r.bottomRight() ) ); }
- /** The "layout unit pixel" -> "[zoomed] view pixel" conversions. */
- int layoutUnitToPixelX( int lupix ) const;
- int layoutUnitToPixelY( int lupix ) const;
+ /** The "tqlayout unit pixel" -> "[zoomed] view pixel" conversions. */
+ int tqlayoutUnitToPixelX( int lupix ) const;
+ int tqlayoutUnitToPixelY( int lupix ) const;
/** This variant converts a width, using a reference X position.
* This prevents rounding problems. */
- int layoutUnitToPixelX( int x, int w ) const;
+ int tqlayoutUnitToPixelX( int x, int w ) const;
/** This variant converts a height, using a reference Y position.
* This prevents rounding problems. */
- int layoutUnitToPixelY( int y, int h ) const;
+ int tqlayoutUnitToPixelY( int y, int h ) const;
- QPoint layoutUnitToPixel( const QPoint &p ) const
- { return QPoint( layoutUnitToPixelX( p.x() ),
- layoutUnitToPixelY( p.y() ) ); }
- QRect layoutUnitToPixel( const QRect &r ) const
- { return QRect( layoutUnitToPixel( r.topLeft() ),
- layoutUnitToPixel( r.bottomRight() ) ); }
+ TQPoint tqlayoutUnitToPixel( const TQPoint &p ) const
+ { return TQPoint( tqlayoutUnitToPixelX( p.x() ),
+ tqlayoutUnitToPixelY( p.y() ) ); }
+ TQRect tqlayoutUnitToPixel( const TQRect &r ) const
+ { return TQRect( tqlayoutUnitToPixel( r.topLeft() ),
+ tqlayoutUnitToPixel( r.bottomRight() ) ); }
/** Basic pt to pixel and pixel to pt conversions, valid at any zoom level,
as well as at the Layout Unit level (and mostly useful for Layout Units).
Don't confuse with zoomIt, which also converts pt to pixels, but applying the zoom! */
int ptToPixelX( double pt ) const
- { return qRound( pt * m_resolutionX ); }
+ { return tqRound( pt * m_resolutionX ); }
int ptToPixelY( double pt ) const
- { return qRound( pt * m_resolutionY ); }
- QPoint ptToPixel( const KoPoint & p ) const {
- return QPoint( ptToPixelX( p.x() ), ptToPixelY( p.y() ) );
+ { return tqRound( pt * m_resolutionY ); }
+ TQPoint ptToPixel( const KoPoint & p ) const {
+ return TQPoint( ptToPixelX( p.x() ), ptToPixelY( p.y() ) );
}
double pixelXToPt( int x ) const
{ return static_cast<double>(x) / m_resolutionX; }
double pixelYToPt( int y ) const
{ return static_cast<double>(y) / m_resolutionY; }
- KoPoint pixelToPt( const QPoint& p ) const {
+ KoPoint pixelToPt( const TQPoint& p ) const {
return KoPoint( pixelXToPt( p.x() ), pixelYToPt( p.y() ) );
}
@@ -84,31 +84,31 @@ public:
{ return ptToPixelX( ptToLayoutUnitPt( x_pt ) ); }
int ptToLayoutUnitPixY( double y_pt ) const
{ return ptToPixelY( ptToLayoutUnitPt( y_pt ) ); }
- QPoint ptToLayoutUnitPix( const KoPoint & p ) const {
- return QPoint( ptToLayoutUnitPixX( p.x() ), ptToLayoutUnitPixY( p.y() ) );
+ TQPoint ptToLayoutUnitPix( const KoPoint & p ) const {
+ return TQPoint( ptToLayoutUnitPixX( p.x() ), ptToLayoutUnitPixY( p.y() ) );
}
/**
- * Given the font size for the font in layout units, in pt (use pointSize())
+ * Given the font size for the font in tqlayout units, in pt (use pointSize())
* this returns the font size to use on screen the current zoom, in pt (use setPointSizeFloat()),
*/
- double layoutUnitToFontSize( int luSize, bool /*forPrint*/ ) const;
+ double tqlayoutUnitToFontSize( int luSize, bool /*forPrint*/ ) const;
- // Note: For converting fontsizes from/to layout units and zoom-independent
+ // Note: For converting fontsizes from/to tqlayout units and zoom-independent
// pt sizes (like the one the user sees, e.g. 12pt),
- // use ptToLayoutUnit and layoutUnitToPt, not layoutToFontSize.
+ // use ptToLayoutUnit and tqlayoutUnitToPt, not tqlayoutToFontSize.
- // The conversions below convert between an internal text layout resolution of
+ // The conversions below convert between an internal text tqlayout resolution of
// ~1440 DPI (by default) and the point-size for the fonts (those known by the user).
// Those conversions don't depend on the zoom level.
/** Change the factor that converts between pointsizes
- * and layout units (by default 20 - for 1440 DPI at 72 DPI) */
+ * and tqlayout units (by default 20 - for 1440 DPI at 72 DPI) */
static void setPtToLayoutUnitFactor( int factor ) { m_layoutUnitFactor = factor; }
/** Not zoom dependent. Simply convert a pt value (e.g. a frame)
- * to high-resolution layout unit coordinates (in pt). */
+ * to high-resolution tqlayout unit coordinates (in pt). */
static double ptToLayoutUnitPt( double pt )
{ return pt * static_cast<double>( m_layoutUnitFactor ); }
/** Same thing for integer values, e.g. a font size in pt */
@@ -122,11 +122,11 @@ public:
{ return KoRect( ptToLayoutUnitPt( r.topLeft() ),
ptToLayoutUnitPt( r.bottomRight() ) ); }
- static double layoutUnitPtToPt( double lupt )
+ static double tqlayoutUnitPtToPt( double lupt )
{ return lupt / static_cast<double>( m_layoutUnitFactor ); }
- static KoPoint layoutUnitPtToPt( const KoPoint& p )
- { return KoPoint( layoutUnitPtToPt( p.x() ),
- layoutUnitPtToPt( p.y() ) ); }
+ static KoPoint tqlayoutUnitPtToPt( const KoPoint& p )
+ { return KoPoint( tqlayoutUnitPtToPt( p.x() ),
+ tqlayoutUnitPtToPt( p.y() ) ); }
protected:
/** This being static ensures that the same value is used by all KoTextZoomHandler instances */