summaryrefslogtreecommitdiffstats
path: root/lib/kotext/KoTextCustomItem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kotext/KoTextCustomItem.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kotext/KoTextCustomItem.cpp')
-rw-r--r--lib/kotext/KoTextCustomItem.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/kotext/KoTextCustomItem.cpp b/lib/kotext/KoTextCustomItem.cpp
index 115e8881..e90eae47 100644
--- a/lib/kotext/KoTextCustomItem.cpp
+++ b/lib/kotext/KoTextCustomItem.cpp
@@ -26,15 +26,15 @@
#include <kcommand.h>
-//void KoTextCustomItem::setPainter( QPainter*, bool adjust ){ if ( adjust ) width = 0; }
-//void KoTextCustomItem::setPainter( QPainter*, bool ){ resize(); } // changed for kotext
+//void KoTextCustomItem::setPainter( TQPainter*, bool adjust ){ if ( adjust ) width = 0; }
+//void KoTextCustomItem::setPainter( TQPainter*, bool ){ resize(); } // changed for kotext
bool KoTextCustomItem::enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, bool atEnd )
{
doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; Q_UNUSED( atEnd ) return TRUE;
}
-bool KoTextCustomItem::enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, const QPoint & )
+bool KoTextCustomItem::enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *&parag, int &idx, int &ox, int &oy, const TQPoint & )
{
doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE;
}
@@ -70,7 +70,7 @@ KoTextFormat * KoTextCustomItem::format() const
}
-void KoTextCustomItem::draw(QPainter* p, int _x, int _y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected )
+void KoTextCustomItem::draw(TQPainter* p, int _x, int _y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected )
{
KoTextZoomHandler *zh=textDocument()->paintingZoomHandler();
//kdDebug(32500)<<" x :"<<_x<<" y :"<<_y<<" cx :"<<cx<<" cy :"<<cy<<" ch :"<<ch<<" cw :"<<cw<<endl;
@@ -81,20 +81,20 @@ void KoTextCustomItem::draw(QPainter* p, int _x, int _y, int cx, int cy, int cw,
KoTextStringChar* stringChar = paragraph()->at( charIndex );
// Convert x, y, cx, cy, cw and ch from Layout Units to pixels.
- int x = zh->layoutUnitToPixelX(_x) /*+ stringChar->pixelxadj*/;
- int y = zh->layoutUnitToPixelY(_y);
- cx = zh->layoutUnitToPixelX(cx);
- cy = zh->layoutUnitToPixelY(cy);
- cw = zh->layoutUnitToPixelX(_x,cw);
- ch = zh->layoutUnitToPixelY(_y,ch);
- int wpix = zh->layoutUnitToPixelX(_x,width);
- int hpix = zh->layoutUnitToPixelX(_y,height);
+ int x = zh->tqlayoutUnitToPixelX(_x) /*+ stringChar->pixelxadj*/;
+ int y = zh->tqlayoutUnitToPixelY(_y);
+ cx = zh->tqlayoutUnitToPixelX(cx);
+ cy = zh->tqlayoutUnitToPixelY(cy);
+ cw = zh->tqlayoutUnitToPixelX(_x,cw);
+ ch = zh->tqlayoutUnitToPixelY(_y,ch);
+ int wpix = zh->tqlayoutUnitToPixelX(_x,width);
+ int hpix = zh->tqlayoutUnitToPixelX(_y,height);
//kdDebug(32500)<<"After x :"<<x<<" y :"<<y<<" cx :"<<cx<<" cy :"<<cy<<" ch :"<<ch<<" cw :"<<cw<<endl;
- int ascentpix = zh->layoutUnitToPixelY( _y, ascent() );
+ int ascentpix = zh->tqlayoutUnitToPixelY( _y, ascent() );
KoTextFormat * fmt = stringChar->format();
- //bool forPrint = ( p->device()->devType() == QInternal::Printer );
+ //bool forPrint = ( p->device()->devType() == TQInternal::Printer );
p->setFont( fmt->screenFont( zh ) );
int offset=0;
@@ -125,7 +125,7 @@ void CustomItemsMap::insertItems( const KoTextCursor & startCursor, int size )
KoTextCursor cursor( startCursor );
for ( int i = 0; i < size; ++i )
{
- CustomItemsMap::Iterator it = find( i );
+ CustomItemsMap::Iterator it = tqfind( i );
if ( it != end() )
{
kdDebug(32500) << "CustomItemsMap::insertItems setting custom item " << it.data() << endl;