summaryrefslogtreecommitdiffstats
path: root/src/kernel/qrichtext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qrichtext.cpp')
-rw-r--r--src/kernel/qrichtext.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/kernel/qrichtext.cpp b/src/kernel/qrichtext.cpp
index 43935513..ecc30407 100644
--- a/src/kernel/qrichtext.cpp
+++ b/src/kernel/qrichtext.cpp
@@ -74,7 +74,7 @@ class TQTextFormatCollection;
const int border_tolerance = 2;
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#include "qt_windows.h"
#endif
@@ -91,18 +91,18 @@ static inline int scale( int value, TQPainter *painter )
{
if ( is_printer( painter ) ) {
TQPaintDeviceMetrics metrics( painter->device() );
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
value = value * metrics.logicalDpiY() /
TQPaintDevice::x11AppDpiY( painter->device()->x11Screen() );
-#elif defined (Q_WS_WIN)
+#elif defined (TQ_WS_WIN)
HDC hdc = GetDC( 0 );
int gdc = GetDeviceCaps( hdc, LOGPIXELSY );
if ( gdc )
value = value * metrics.logicalDpiY() / gdc;
ReleaseDC( 0, hdc );
-#elif defined (Q_WS_MAC)
+#elif defined (TQ_WS_MAC)
value = value * metrics.logicalDpiY() / 75; // ##### FIXME
-#elif defined (Q_WS_QWS)
+#elif defined (TQ_WS_QWS)
value = value * metrics.logicalDpiY() / 75;
#endif
}
@@ -519,7 +519,7 @@ void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQ
tmpX = -1;
bool justInsert = TRUE;
TQString s( str );
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if ( checkNewLine ) {
int i = 0;
while ( ( i = s.find( '\r', i ) ) != -1 )
@@ -672,7 +672,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
TQTextParagraph *str = s;
if ( pos.y() < s->rect().y() ) {
pos.setY( s->rect().y() );
-#ifdef Q_WS_MACX
+#ifdef TQ_WS_MACX
pos.setX( s->rect().x() );
#endif
}
@@ -684,7 +684,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
if ( pos.y() >= r.y() && pos.y() <= r.y() + r.height() )
break;
if ( loosePlacing == TRUE && !s->next() ) {
-#ifdef Q_WS_MACX
+#ifdef TQ_WS_MACX
pos.setX( s->rect().x() + s->rect().width() );
#endif
break;
@@ -4020,7 +4020,7 @@ int TQTextString::width( int idx ) const
{
int r = c->c.row();
if(r < 0x06
-#ifndef Q_WS_WIN
+#ifndef TQ_WS_WIN
// Uniscribe's handling of Asian makes the condition below fail.
|| (r > 0x1f && !(r > 0xd7 && r < 0xe0))
#endif
@@ -4731,7 +4731,7 @@ void TQTextParagraph::setColorForSelection( TQColor &color, TQPainter &painter,
document()->selectionColor( selection ) :
cg.color( TQColorGroup::Highlight );
if ( selection == TQTextDocument::IMCompositionText ) {
-#ifndef Q_WS_MACX
+#ifndef TQ_WS_MACX
int h1, s1, v1, h2, s2, v2;
cg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 );
cg.color( TQColorGroup::Background ).hsv( &h2, &s2, &v2 );
@@ -6063,7 +6063,7 @@ void TQTextFormatCollection::setPaintDevice( TQPaintDevice *pd )
{
paintdevice = pd;
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
int scr = ( paintdevice ) ? paintdevice->x11Screen() : TQPaintDevice::x11AppScreen();
defFormat->fn.x11SetScreen( scr );
@@ -6076,7 +6076,7 @@ void TQTextFormatCollection::setPaintDevice( TQPaintDevice *pd )
format->fn.x11SetScreen( scr );
format->update();
}
-#endif // Q_WS_X11
+#endif // TQ_WS_X11
}
TQTextFormat *TQTextFormatCollection::format( TQTextFormat *f )
@@ -6695,7 +6695,7 @@ void TQTextImage::adjustToPainter( TQPainter* p )
height = scale( tmpheight, p );
}
-#if !defined(Q_WS_X11)
+#if !defined(TQ_WS_X11)
#include <ntqbitmap.h>
#include <ntqcleanuphandler.h>
static TQPixmap *qrt_selection = 0;
@@ -6744,7 +6744,7 @@ void TQTextImage::draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int
p->drawPixmap( cx , cy, pm, cx - x, cy - y, cw, ch );
if ( selected && placement() == PlaceInline && is_printer( p ) ) {
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
p->fillRect( TQRect( TQPoint( x, y ), pm.size() ), TQBrush( cg.highlight(), TQBrush::Dense4Pattern) );
#else // in WIN32 Dense4Pattern doesn't work correctly (transparency problem), so work around it
if ( !qrt_selection )