summaryrefslogtreecommitdiffstats
path: root/kword/KWTextFrameSet.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 /kword/KWTextFrameSet.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 'kword/KWTextFrameSet.cpp')
-rw-r--r--kword/KWTextFrameSet.cpp714
1 files changed, 357 insertions, 357 deletions
diff --git a/kword/KWTextFrameSet.cpp b/kword/KWTextFrameSet.cpp
index 9652cd0c..26b4da07 100644
--- a/kword/KWTextFrameSet.cpp
+++ b/kword/KWTextFrameSet.cpp
@@ -59,15 +59,15 @@
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qclipboard.h>
-#include <qdragobject.h>
-#include <qcursor.h>
-#include <qfile.h>
-#include <qprogressdialog.h>
-#include <qregexp.h>
+#include <tqclipboard.h>
+#include <tqdragobject.h>
+#include <tqcursor.h>
+#include <tqfile.h>
+#include <tqprogressdialog.h>
+#include <tqregexp.h>
#include <assert.h>
-#include <qapplication.h>
+#include <tqapplication.h>
//#define DEBUG_MARGINS
//#define DEBUG_FORMATVERTICALLY
@@ -102,7 +102,7 @@ private:
KWTextFrameSet *m_textfs;
};
-KWTextFrameSet::KWTextFrameSet( KWDocument *_doc, const QString & name )
+KWTextFrameSet::KWTextFrameSet( KWDocument *_doc, const TQString & name )
: KWFrameSet( _doc )
{
//kdDebug() << "KWTextFrameSet::KWTextFrameSet " << this << endl;
@@ -111,14 +111,14 @@ KWTextFrameSet::KWTextFrameSet( KWDocument *_doc, const QString & name )
else
m_name = name;
- QObject::setName( m_name.utf8() ); // store name in the QObject, for DCOP users
+ TQObject::setName( m_name.utf8() ); // store name in the TQObject, for DCOP users
init();
}
-KWTextFrameSet::KWTextFrameSet( KWDocument* doc, const QDomElement& tag, KoOasisContext& /*context*/ )
+KWTextFrameSet::KWTextFrameSet( KWDocument* doc, const TQDomElement& tag, KoOasisContext& /*context*/ )
: KWFrameSet( doc )
{
- m_name = tag.attributeNS( KoXmlNS::draw, "name", QString::null );
+ m_name = tag.attributeNS( KoXmlNS::draw, "name", TQString() );
if ( doc->frameSetByName( m_name ) ) // already exists!
m_name = doc->generateFramesetName( m_name + " %1" );
init();
@@ -127,10 +127,10 @@ KWTextFrameSet::KWTextFrameSet( KWDocument* doc, const QDomElement& tag, KoOasis
}
// protected constructor for testing purposes; does not do an init.
-KWTextFrameSet::KWTextFrameSet( const QString &name ) : KWFrameSet(0) {
+KWTextFrameSet::KWTextFrameSet( const TQString &name ) : KWFrameSet(0) {
m_name = name;
- QObject::setName( m_name.utf8() ); // store name in the QObject, for DCOP users
+ TQObject::setName( m_name.utf8() ); // store name in the TQObject, for DCOP users
m_currentViewMode = 0L;
m_currentDrawnFrame = 0L;
m_lastTextDocHeight = 0;
@@ -144,7 +144,7 @@ void KWTextFrameSet::init()
m_lastTextDocHeight = 0;
// Create the text document to set in the text object
KWTextDocument* textdoc = new KWTextDocument( this,
- new KoTextFormatCollection( m_doc->defaultFont(), QColor(),
+ new KoTextFormatCollection( m_doc->defaultFont(), TQColor(),
m_doc->globalLanguage(),
m_doc->globalHyphenation() ),
new KWTextFormatter( this ) );
@@ -156,25 +156,25 @@ void KWTextFrameSet::init()
m_textobj = new KoTextObject( textdoc, m_doc->styleCollection()->findStyle( "Standard" ),
this, (m_name+"-textobj").utf8() );
m_doc->backSpeller()->registerNewTextObject( m_textobj );
- connect( m_textobj, SIGNAL( availableHeightNeeded() ),
- SLOT( slotAvailableHeightNeeded() ) );
- connect( m_textobj, SIGNAL( afterFormatting( int, KoTextParag*, bool* ) ),
- SLOT( slotAfterFormatting( int, KoTextParag*, bool* ) ) );
- //connect( m_textobj, SIGNAL( formattingFirstParag() ),
- // SLOT( slotFormattingFirstParag() ) );
- //connect( m_textobj, SIGNAL( chapterParagraphFormatted( KoTextParag * ) ),
- // SLOT( slotChapterParagraphFormatted( KoTextParag * ) ) );
- connect( m_textobj, SIGNAL( newCommand( KCommand * ) ),
- SLOT( slotNewCommand( KCommand * ) ) );
- connect( m_textobj, SIGNAL( repaintChanged( KoTextObject* ) ),
- SLOT( slotRepaintChanged() ) );
- connect( m_textobj, SIGNAL( paragraphDeleted( KoTextParag*) ),
- SLOT( slotParagraphDeleted(KoTextParag*) ));
-
- connect( m_textobj, SIGNAL( paragraphCreated( KoTextParag*) ),
- SLOT( slotParagraphCreated(KoTextParag*) ));
- connect( m_textobj, SIGNAL( paragraphModified( KoTextParag*, int, int, int) ),
- SLOT( slotParagraphModified(KoTextParag*, int, int, int) ));
+ connect( m_textobj, TQT_SIGNAL( availableHeightNeeded() ),
+ TQT_SLOT( slotAvailableHeightNeeded() ) );
+ connect( m_textobj, TQT_SIGNAL( afterFormatting( int, KoTextParag*, bool* ) ),
+ TQT_SLOT( slotAfterFormatting( int, KoTextParag*, bool* ) ) );
+ //connect( m_textobj, TQT_SIGNAL( formattingFirstParag() ),
+ // TQT_SLOT( slotFormattingFirstParag() ) );
+ //connect( m_textobj, TQT_SIGNAL( chapterParagraphFormatted( KoTextParag * ) ),
+ // TQT_SLOT( slotChapterParagraphFormatted( KoTextParag * ) ) );
+ connect( m_textobj, TQT_SIGNAL( newCommand( KCommand * ) ),
+ TQT_SLOT( slotNewCommand( KCommand * ) ) );
+ connect( m_textobj, TQT_SIGNAL( tqrepaintChanged( KoTextObject* ) ),
+ TQT_SLOT( slotRepaintChanged() ) );
+ connect( m_textobj, TQT_SIGNAL( paragraphDeleted( KoTextParag*) ),
+ TQT_SLOT( slotParagraphDeleted(KoTextParag*) ));
+
+ connect( m_textobj, TQT_SIGNAL( paragraphCreated( KoTextParag*) ),
+ TQT_SLOT( slotParagraphCreated(KoTextParag*) ));
+ connect( m_textobj, TQT_SIGNAL( paragraphModified( KoTextParag*, int, int, int) ),
+ TQT_SLOT( slotParagraphModified(KoTextParag*, int, int, int) ));
}
void KWTextFrameSet::slotParagraphModified(KoTextParag* _parag, int /*KoTextParag::ParagModifyType*/ _type, int start, int lenght)
@@ -222,23 +222,23 @@ void KWTextFrameSet::slotAvailableHeightNeeded()
updateFrames( 0 ); // only do the available-height determination
}
-KWFrame * KWTextFrameSet::documentToInternal( const KoPoint &dPoint, QPoint &iPoint ) const
+KWFrame * KWTextFrameSet::documentToInternal( const KoPoint &dPoint, TQPoint &iPoint ) const
{
#ifdef DEBUG_DTI
kdDebug() << "KWTextFrameSet::documentToInternal dPoint:" << dPoint.x() << "," << dPoint.y() << endl;
#endif
- if ( !m_doc->layoutViewMode()->hasFrames() ) { // text viewmode
- iPoint = QPoint( m_doc->ptToLayoutUnitPixX( dPoint.x() ),
+ if ( !m_doc->tqlayoutViewMode()->hasFrames() ) { // text viewmode
+ iPoint = TQPoint( m_doc->ptToLayoutUnitPixX( dPoint.x() ),
m_doc->ptToLayoutUnitPixY( dPoint.y() ) );
return m_frames.getFirst();
}
// Find the frame that contains dPoint. To go fast, we look them up by page number.
int pageNum = m_doc->pageManager()->pageNumber(dPoint);
- QPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame *theFrame = frameIt.current();
- if ( theFrame->contains( dPoint ) )
+ if ( theFrame->tqcontains( dPoint ) )
{
iPoint.setX( m_doc->ptToLayoutUnitPixX( dPoint.x() - theFrame->innerRect().x() ) );
iPoint.setY( m_doc->ptToLayoutUnitPixY( dPoint.y() - theFrame->innerRect().y() + theFrame->internalY() ) );
@@ -260,25 +260,25 @@ KWFrame * KWTextFrameSet::documentToInternal( const KoPoint &dPoint, QPoint &iPo
return 0;
}
-KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoint, QPoint &iPoint, RelativePosition& relPos, KWViewMode *viewMode ) const
+KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoint, TQPoint &iPoint, RelativePosition& relPos, KWViewMode *viewMode ) const
{
#ifdef DEBUG_DTI
kdDebug() << "KWTextFrameSet::documentToInternalMouseSelection dPoint:" << dPoint.x() << "," << dPoint.y() << endl;
#endif
if ( !viewMode->hasFrames() ) { // text viewmode
relPos = InsideFrame;
- iPoint = QPoint( m_doc->ptToLayoutUnitPixX( dPoint.x() ),
+ iPoint = TQPoint( m_doc->ptToLayoutUnitPixX( dPoint.x() ),
m_doc->ptToLayoutUnitPixY( dPoint.y() ) );
return m_frames.getFirst();
}
// Find the frame that contains dPoint. To go fast, we look them up by page number.
int pageNum = m_doc->pageManager()->pageNumber(dPoint);
- QPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame *theFrame = frameIt.current();
- if ( theFrame->contains( dPoint ) )
+ if ( theFrame->tqcontains( dPoint ) )
{
iPoint.setX( m_doc->ptToLayoutUnitPixX( dPoint.x() - theFrame->innerRect().x() ) );
iPoint.setY( m_doc->ptToLayoutUnitPixY( dPoint.y() - theFrame->innerRect().y() + theFrame->internalY() ) );
@@ -300,7 +300,7 @@ KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoin
#ifdef DEBUG_DTI
kdDebug() << "documentToInternal: openLeftRect=" << openLeftRect << endl;
#endif
- if ( openLeftRect.contains( dPoint ) )
+ if ( openLeftRect.tqcontains( dPoint ) )
{
// We are at the left of this frame (and not in any other frame of this frameset)
iPoint.setX( m_doc->ptToLayoutUnitPixX(theFrame->innerRect().left() ));
@@ -317,7 +317,7 @@ KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoin
#ifdef DEBUG_DTI
kdDebug() << "documentToInternal: openTopRect=" << openTopRect << endl;
#endif
- if ( openTopRect.contains( dPoint ) )
+ if ( openTopRect.tqcontains( dPoint ) )
{
// We are at the top of this frame (...)
iPoint.setX( m_doc->ptToLayoutUnitPixX( dPoint.x() - theFrame->innerRect().left() ) );
@@ -348,14 +348,14 @@ KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoin
}
else
{
- QPtrListIterator<KWFrame> frameIt( framesInPage( pageNum + 1 ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( pageNum + 1 ) );
if ( frameIt.current() )
{
// There is a frame on the next page
KWFrame *theFrame = frameIt.current();
KoRect openTopRect( theFrame->innerRect() );
openTopRect.setTop( 0 );
- if ( openTopRect.contains( dPoint ) ) // We are at the top of this frame
+ if ( openTopRect.tqcontains( dPoint ) ) // We are at the top of this frame
iPoint.setX( m_doc->ptToLayoutUnitPixX( dPoint.x() - theFrame->left() ) );
else
iPoint.setX( 0 ); // We are, hmm, on the left or right of the frames
@@ -377,26 +377,26 @@ KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoin
return 0;
}
-KWFrame * KWTextFrameSet::internalToDocumentWithHint( const QPoint &iPoint, KoPoint &dPoint, const KoPoint &hintDPoint ) const
+KWFrame * KWTextFrameSet::internalToDocumentWithHint( const TQPoint &iPoint, KoPoint &dPoint, const KoPoint &hintDPoint ) const
{
#ifdef DEBUG_ITD
kdDebug() << "KWTextFrameSet::internalToDocumentWithHint hintDPoint: " << hintDPoint.x() << "," << hintDPoint.y() << endl;
#endif
- if ( !m_doc->layoutViewMode()->hasFrames() ) { // text viewmode
- dPoint = m_doc->layoutUnitPtToPt( m_doc->pixelToPt( iPoint ) );
+ if ( !m_doc->tqlayoutViewMode()->hasFrames() ) { // text viewmode
+ dPoint = m_doc->tqlayoutUnitPtToPt( m_doc->pixelToPt( iPoint ) );
return m_frames.getFirst();
}
KWFrame *lastFrame = 0L;
- QPtrListIterator<KWFrame> frameIt( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( frameIterator() );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame *theFrame = frameIt.current();
- QRect r( 0, m_doc->ptToLayoutUnitPixY( theFrame->internalY() ), m_doc->ptToLayoutUnitPixX( theFrame->innerWidth() )+1, m_doc->ptToLayoutUnitPixY( theFrame->innerHeight() )+1 );
+ TQRect r( 0, m_doc->ptToLayoutUnitPixY( theFrame->internalY() ), m_doc->ptToLayoutUnitPixX( theFrame->innerWidth() )+1, m_doc->ptToLayoutUnitPixY( theFrame->innerHeight() )+1 );
#ifdef DEBUG_ITD
kdDebug() << "ITD: r=" << r << " iPoint=" << iPoint.x() << "," << iPoint.y() << endl;
#endif
// r is the frame in qrt coords
- if ( r.contains( iPoint ) ) // both r and p are in layout units (aka internal)
+ if ( r.tqcontains( iPoint ) ) // both r and p are in tqlayout units (aka internal)
{
dPoint = internalToDocumentKnowingFrame( iPoint, theFrame );
#ifdef DEBUG_ITD
@@ -421,7 +421,7 @@ KWFrame * KWTextFrameSet::internalToDocumentWithHint( const QPoint &iPoint, KoPo
kdDebug(32002) << "KWTextFrameSet::internalToDocumentWithHint " << iPoint.x() << "," << iPoint.y()
<< " not in any frame of " << (void*)this << endl;
#endif
- dPoint = m_doc->layoutUnitPtToPt( m_doc->pixelToPt( iPoint ) ); // bah
+ dPoint = m_doc->tqlayoutUnitPtToPt( m_doc->pixelToPt( iPoint ) ); // bah
return 0L;
}
@@ -429,7 +429,7 @@ KWFrame * KWTextFrameSet::internalToDocumentWithHint( const QPoint &iPoint, KoPo
KoPoint KWTextFrameSet::internalToDocumentKnowingFrame( const KoPoint &relPoint, KWFrame* theFrame ) const
{
// It's ok to have theFrame == 0 in the text viewmode, but not in other modes
- if ( m_doc->layoutViewMode()->hasFrames() )
+ if ( m_doc->tqlayoutViewMode()->hasFrames() )
Q_ASSERT( theFrame );
if ( theFrame )
return KoPoint( relPoint.x() + theFrame->innerRect().x(),
@@ -438,16 +438,16 @@ KoPoint KWTextFrameSet::internalToDocumentKnowingFrame( const KoPoint &relPoint,
return relPoint;
}
-KoPoint KWTextFrameSet::internalToDocumentKnowingFrame( const QPoint &iPoint, KWFrame* theFrame ) const
+KoPoint KWTextFrameSet::internalToDocumentKnowingFrame( const TQPoint &iPoint, KWFrame* theFrame ) const
{
// Convert LU to relative coordinates (pt), then call the real internalToDocumentKnowingFrame().
- return internalToDocumentKnowingFrame( m_doc->layoutUnitPtToPt( m_doc->pixelToPt( iPoint ) ), theFrame );
+ return internalToDocumentKnowingFrame( m_doc->tqlayoutUnitPtToPt( m_doc->pixelToPt( iPoint ) ), theFrame );
}
-QPoint KWTextFrameSet::moveToPage( int currentPgNum, short int direction ) const
+TQPoint KWTextFrameSet::moveToPage( int currentPgNum, short int direction ) const
{
if ( !isVisible() || m_frames.isEmpty() )
- return QPoint();
+ return TQPoint();
//kdDebug() << "KWTextFrameSet::moveToPage currentPgNum=" << currentPgNum << " direction=" << direction << endl;
int num = currentPgNum + direction;
int pages = m_doc->pageCount();
@@ -459,20 +459,20 @@ QPoint KWTextFrameSet::moveToPage( int currentPgNum, short int direction ) const
continue; // No frame on that page
//kdDebug() << "KWTextFrameSet::moveToPage ok for first frame in page " << num << endl;
- QPtrListIterator<KWFrame> frameIt( framesInPage( num ) );
- return QPoint( 0, m_doc->ptToLayoutUnitPixY( frameIt.current()->internalY() ) + 2 ); // found, ok.
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( num ) );
+ return TQPoint( 0, m_doc->ptToLayoutUnitPixY( frameIt.current()->internalY() ) + 2 ); // found, ok.
}
// Not found. Go to top of first frame or bottom of last frame, depending on direction
if ( direction < 0 )
- return QPoint( 0, m_doc->ptToLayoutUnitPixY( m_frames.getFirst()->internalY() ) + 2 );
+ return TQPoint( 0, m_doc->ptToLayoutUnitPixY( m_frames.getFirst()->internalY() ) + 2 );
else
{
KWFrame * theFrame = m_frames.getLast();
- return QPoint( 0, m_doc->ptToLayoutUnitPixY( theFrame->internalY() + theFrame->innerHeight() ) );
+ return TQPoint( 0, m_doc->ptToLayoutUnitPixY( theFrame->internalY() + theFrame->innerHeight() ) );
}
}
-void KWTextFrameSet::drawContents( QPainter *p, const QRect & crect, const QColorGroup &cg,
+void KWTextFrameSet::drawContents( TQPainter *p, const TQRect & crect, const TQColorGroup &cg,
bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode,
KWFrameViewManager *fvm)
@@ -521,29 +521,29 @@ void KWTextFrameSet::drawContents( QPainter *p, const QRect & crect, const QColo
break;
}
- QRect flatRect = viewMode->normalToView( m_doc->zoomRect( rect ) );
+ TQRect flatRect = viewMode->normalToView( m_doc->zoomRect( rect ) );
//kdDebug() << " KWTextFrameSet::drawContents rect=" << rect << " zoomed:" << flatRect << endl;
- flatRect.setBottom( flatRect.top() + 1 ); // #!@!@!& QRect....
+ flatRect.setBottom( flatRect.top() + 1 ); // #!@!@!& TQRect....
if ( flatRect.intersects( crect ) ) {
p->save();
- QPen pen( KoTextFormat::defaultTextColor( p ), // always in default fg color (and black when printing)
+ TQPen pen( KoTextFormat::defaultTextColor( p ), // always in default fg color (and black when printing)
KoBorder::zoomWidthY( m_doc->footNoteSeparatorLineWidth(), m_doc, 1 ) ); // penwidth = zoomIt( 2 pt )
switch( m_doc->footNoteSeparatorLineType())
{
case SLT_SOLID:
- pen.setStyle( SolidLine );
+ pen.setStyle( Qt::SolidLine );
break;
case SLT_DASH:
- pen.setStyle( DashLine );
+ pen.setStyle( Qt::DashLine );
break;
case SLT_DOT:
- pen.setStyle( DotLine );
+ pen.setStyle( Qt::DotLine );
break;
case SLT_DASH_DOT:
- pen.setStyle( DashDotLine );
+ pen.setStyle( Qt::DashDotLine );
break;
case SLT_DASH_DOT_DOT:
- pen.setStyle( DashDotDotLine );
+ pen.setStyle( Qt::DashDotDotLine );
break;
}
p->setPen( pen );
@@ -558,9 +558,9 @@ void KWTextFrameSet::drawContents( QPainter *p, const QRect & crect, const QColo
}
}
-void KWTextFrameSet::drawFrame( KWFrame *theFrame, QPainter *painter, const QRect &fcrect, const QRect &crect,
- const QPoint& translationOffset,
- KWFrame *settingsFrame, const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+void KWTextFrameSet::drawFrame( KWFrame *theFrame, TQPainter *painter, const TQRect &fcrect, const TQRect &crect,
+ const TQPoint& translationOffset,
+ KWFrame *settingsFrame, const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode, bool drawUnderlyingFrames )
{
// Detect if text frame needs transparency painting, to save time if it's using SolidPattern
@@ -572,8 +572,8 @@ void KWTextFrameSet::drawFrame( KWFrame *theFrame, QPainter *painter, const QRec
KWFrameSet::drawFrame( theFrame, painter, fcrect, crect, translationOffset, settingsFrame, cg, onlyChanged, resetChanged, edit, viewMode, drawUnderlyingFrames );
}
-void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, const QRect &r,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, TQPainter *painter, const TQRect &r,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode )
{
Q_ASSERT( r.isValid() );
@@ -586,13 +586,13 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, co
{
// Update variables for each frame (e.g. for page-number)
// If more than KWPgNumVariable need this functionality, create an intermediary base class
- QPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
+ TQPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
for ( ; cit.current() ; ++cit )
{
KWPgNumVariable * var = dynamic_cast<KWPgNumVariable *>( cit.current() );
if ( var && !var->isDeleted() )
{
- QSize oldSize( var->width, var->height );
+ TQSize oldSize( var->width, var->height );
const int pageNumberOffset = kWordDocument()->variableCollection()->variableSetting()->startingPageNumber() - 1;
switch ( var->subType() )
{
@@ -605,7 +605,7 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, co
var->setSectionTitle( kWordDocument()->sectionTitle( theFrame->pageNumber() ) );
break;
case KWPgNumVariable::VST_PGNUM_PREVIOUS:
- var->setPgNum( QMAX(theFrame->pageNumber()-1,0) + pageNumberOffset );
+ var->setPgNum( TQMAX(theFrame->pageNumber()-1,0) + pageNumberOffset );
break;
case KWPgNumVariable::VST_PGNUM_NEXT:
var->setPgNum( theFrame->pageNumber() + 1 + pageNumberOffset );
@@ -613,9 +613,9 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, co
}
var->resize();
- QSize newSize( var->width, var->height );
+ TQSize newSize( var->width, var->height );
if ( oldSize != newSize )
- var->paragraph()->invalidate( 0 ); // size has changed -> need reformatting !
+ var->paragraph()->tqinvalidate( 0 ); // size has changed -> need reformatting !
var->paragraph()->setChanged( true );
}
}
@@ -632,7 +632,7 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, co
if ( m_doc->viewFormattingChars() )
drawingFlags |= KoTextDocument::DrawFormattingChars;
- //kdDebug(32001) << "KWTextFrameSet::drawFrame calling drawWYSIWYG. cg base color:" << cg.brush( QColorGroup::Base) << endl;
+ //kdDebug(32001) << "KWTextFrameSet::drawFrame calling drawWYSIWYG. cg base color:" << cg.brush( TQColorGroup::Base) << endl;
KoTextParag * lastFormatted = textDocument()->drawWYSIWYG(
painter, r.x(), r.y(), r.width(), r.height(),
cg, kWordDocument(),
@@ -646,59 +646,59 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, co
// Finding the "last parag of the frame" is a bit tricky.
// It's usually the one before lastFormatted, except if it's actually lastParag :} [see KoTextDocument::draw]
KoTextParag * lastDrawn = lastFormatted->prev();
- if ( lastFormatted == textDocument()->lastParag() && ( !lastDrawn || m_doc->layoutUnitToPixelY( lastDrawn->rect().bottom() ) < r.bottom() ) )
+ if ( lastFormatted == textDocument()->lastParag() && ( !lastDrawn || m_doc->tqlayoutUnitToPixelY( lastDrawn->rect().bottom() ) < r.bottom() ) )
lastDrawn = lastFormatted;
//kdDebug(32002) << "KWTextFrameSet::drawFrame drawn. onlyChanged=" << onlyChanged << " resetChanged=" << resetChanged << " lastDrawn=" << lastDrawn->paragId() << " lastDrawn's bottom:" << lastDrawn->rect().bottom() << " r.bottom=" << r.bottom() << endl;
- if ( lastDrawn && m_doc->layoutUnitToPixelY( lastDrawn->rect().bottom() ) > r.bottom() )
+ if ( lastDrawn && m_doc->tqlayoutUnitToPixelY( lastDrawn->rect().bottom() ) > r.bottom() )
{
//kdDebug(32002) << "KWTextFrameSet::drawFrame setting lastDrawn " << lastDrawn->paragId() << " to changed" << endl;
lastDrawn->setChanged( true );
}
}
- // NOTE: QTextView sets m_lastFormatted to lastFormatted here
+ // NOTE: TQTextView sets m_lastFormatted to lastFormatted here
// But when scrolling up, this causes to reformat a lot of stuff for nothing.
// And updateViewArea takes care of formatting things before we even arrive here.
- // Blank area under the very last paragraph - QRT draws it up to textdoc->height,
+ // Blank area under the very last paragraph - TQRT draws it up to textdoc->height,
// we have to draw it from there up to the bottom of the last frame.
if ( ( !lastFormatted || lastFormatted == textDocument()->lastParag() )
&& viewMode->drawFrameBackground() )
{
// This is drawing code, so we convert everything to pixels
int docHeight = textDocument()->lastParag()->pixelRect(m_doc).bottom() + 1;
- //QRect frameRect = m_doc->zoomRect( (theFrame->innerRect()) );
+ //TQRect frameRect = m_doc->zoomRect( (theFrame->innerRect()) );
- QSize availSize = viewMode->availableSizeForText( this );
- QRect blank( 0, docHeight, availSize.width(), availSize.height() /*+ frameRect.height() ?? */ - docHeight );
+ TQSize availSize = viewMode->availableSizeForText( this );
+ TQRect blank( 0, docHeight, availSize.width(), availSize.height() /*+ frameRect.height() ?? */ - docHeight );
//kdDebug(32002) << this << " Blank area: " << blank << endl;
- painter->fillRect( blank, cg.brush( QColorGroup::Base ) );
+ painter->fillRect( blank, cg.brush( TQColorGroup::Base ) );
// for debugging :)
- //painter->setPen( QPen(Qt::blue, 1, DashLine) ); painter->drawRect( blank );
+ //painter->setPen( TQPen(TQt::blue, 1, DashLine) ); painter->drawRect( blank );
}
m_currentDrawnFrame = 0L;
}
-void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorVisible, KWCanvas *canvas, KWFrame *theFrame )
+void KWTextFrameSet::drawCursor( TQPainter *p, KoTextCursor *cursor, bool cursorVisible, KWCanvas *canvas, KWFrame *theFrame )
{
// This redraws the paragraph where the cursor is - with a small clip region around the cursor
m_currentViewMode = canvas->viewMode();
bool hasFrames = m_currentViewMode->hasFrames();
m_currentDrawnFrame = theFrame;
- QRect normalFrameRect;
+ TQRect normalFrameRect;
if (hasFrames)
normalFrameRect = m_doc->zoomRect( theFrame->innerRect() );
else
- normalFrameRect = QRect( QPoint(0, 0), m_currentViewMode->contentsSize() );
+ normalFrameRect = TQRect( TQPoint(0, 0), m_currentViewMode->contentsSize() );
KoTextParag* parag = cursor->parag();
- QPoint topLeft = parag->rect().topLeft(); // in QRT coords
+ TQPoint topLeft = parag->rect().topLeft(); // in TQRT coords
int lineY;
// Cursor height, in pixels
- int cursorHeight = m_doc->layoutUnitToPixelY( topLeft.y(), parag->lineHeightOfChar( cursor->index(), 0, &lineY ) );
- QPoint iPoint( topLeft.x() + cursor->x(),
+ int cursorHeight = m_doc->tqlayoutUnitToPixelY( topLeft.y(), parag->lineHeightOfChar( cursor->index(), 0, &lineY ) );
+ TQPoint iPoint( topLeft.x() + cursor->x(),
topLeft.y() + lineY );
#ifdef DEBUG_CURSOR
@@ -713,15 +713,15 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
{
#ifdef DEBUG_CURSOR
kdDebug() << " dPoint(doc, pts)=" << dPoint.x() << "," << dPoint.y() << endl;
- QPoint debugPt = m_doc->zoomPoint( dPoint );
+ TQPoint debugPt = m_doc->zoomPoint( dPoint );
kdDebug() << " zoomed dPoint(doc, pixels)=" << debugPt.x() << "," << debugPt.y() << endl;
#endif
- QPoint vPoint = m_currentViewMode->normalToView( m_doc->zoomPoint( dPoint ) ); // from doc to view contents
+ TQPoint vPoint = m_currentViewMode->normalToView( m_doc->zoomPoint( dPoint ) ); // from doc to view contents
#ifdef DEBUG_CURSOR
kdDebug() << " vPoint(view, pixels)=" << vPoint.x() << "," << vPoint.y() << endl;
#endif
// from now on, iPoint will be in pixels
- iPoint = m_doc->layoutUnitToPixel( iPoint );
+ iPoint = m_doc->tqlayoutUnitToPixel( iPoint );
//int xadj = parag->at( cursor->index() )->pixelxadj;
#ifdef DEBUG_CURSOR
//kdDebug() << " iPoint in pixels : " << iPoint.x() << "," << iPoint.y() << " will add xadj=" << xadj << endl;
@@ -729,23 +729,23 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
//iPoint.rx() += xadj;
//vPoint.rx() += xadj;
// very small clipping around the cursor
- QRect clip( vPoint.x() - 5, vPoint.y(), 10, cursorHeight );
+ TQRect clip( vPoint.x() - 5, vPoint.y(), 10, cursorHeight );
#ifdef DEBUG_CURSOR
kdDebug() << " clip(view, before intersect)=" << clip << endl;
#endif
- QRect viewFrameRect = m_currentViewMode->normalToView( normalFrameRect );
+ TQRect viewFrameRect = m_currentViewMode->normalToView( normalFrameRect );
clip &= viewFrameRect; // clip to frame
#ifdef DEBUG_CURSOR
kdDebug() << "KWTextFrameSet::drawCursor normalFrameRect=" << normalFrameRect
<< " clip(view, after intersect)=" << clip << endl;
#endif
- QRegion reg;
+ TQRegion reg;
if ( hasFrames ) {
reg = frameClipRegion( p, theFrame, clip, m_currentViewMode );
- if ( !isFloating() ) // problem with multiparent inline frames
+ if ( !isFloating() ) // problem with multitqparent inline frames
reg &= p->xForm( viewFrameRect );
}
@@ -753,11 +753,11 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
{
#ifdef DEBUG_CURSOR
// for debug only!
- //p->fillRect( clip, QBrush( Qt::red, QBrush::Dense3Pattern ) );
+ //p->fillRect( clip, TQBrush( TQt::red, TQBrush::Dense3Pattern ) );
#endif
p->save();
- QColorGroup cg = QApplication::palette().active();
+ TQColorGroup cg = TQApplication::tqpalette().active();
if ( hasFrames )
{
@@ -775,18 +775,18 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
// The settings come from this frame
KWFrame * settings = settingsFrame( theFrame );
- QBrush bgBrush( settings->backgroundColor() );
+ TQBrush bgBrush( settings->backgroundColor() );
bgBrush.setColor( KWDocument::resolveBgColor( bgBrush.color(), p ) );
- cg.setBrush( QColorGroup::Base, bgBrush );
+ cg.setBrush( TQColorGroup::Base, bgBrush );
// color of cursor, the inverse of the frame background
- QColor background = bgBrush.color();
- cg.setColor(QColorGroup::Text, QColor( 255 - background.red(),
+ TQColor background = bgBrush.color();
+ cg.setColor(TQColorGroup::Text, TQColor( 255 - background.red(),
255 - background.green(), 255 - background.blue()) );
}
else if(dynamic_cast<KWViewModeText *>(m_currentViewMode) != 0)
p->translate( KWViewModeText::OFFSET, 0 );
- QPixmap *pix = 0;
+ TQPixmap *pix = 0;
uint drawingFlags = KoTextDocument::DrawSelections;
if ( m_doc->backgroundSpellCheckEnabled() )
drawingFlags |= KoTextDocument::DrawMisspelledLine;
@@ -803,7 +803,7 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
textDocument()->drawParagWYSIWYG(
p, parag,
- QMAX(0, iPoint.x() - 5), // negative values create problems
+ TQMAX(0, iPoint.x() - 5), // negative values create problems
iPoint.y(), clip.width(), clip.height(),
pix, cg, m_doc, // TODO view's zoom handler
cursorVisible, cursor, FALSE /*resetChanged*/, drawingFlags );
@@ -816,7 +816,7 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
p->restore();
//XIM Position
- QPoint ximPoint = vPoint;
+ TQPoint ximPoint = vPoint;
canvas->setXimPosition( ximPoint.x(), ximPoint.y(),
0, cursorHeight - parag->lineSpacing( line ) );
}
@@ -824,23 +824,23 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
m_currentDrawnFrame = 0L;
}
-void KWTextFrameSet::layout()
+void KWTextFrameSet::tqlayout()
{
- invalidate();
- // Get the thing going though, repainting doesn't call formatMore
+ tqinvalidate();
+ // Get the thing going though, tqrepainting doesn't call formatMore
m_textobj->formatMore( 2 );
}
-void KWTextFrameSet::invalidate()
+void KWTextFrameSet::tqinvalidate()
{
- //kdDebug() << "KWTextFrameSet::invalidate " << name() << endl;
+ //kdDebug() << "KWTextFrameSet::tqinvalidate " << name() << endl;
m_textobj->setLastFormattedParag( textDocument()->firstParag() );
- textDocument()->invalidate(); // lazy layout, real update follows upon next repaint
+ textDocument()->tqinvalidate(); // lazy tqlayout, real update follows upon next tqrepaint
}
void KWTextFrameSet::slotRepaintChanged()
{
- emit repaintChanged( this );
+ emit tqrepaintChanged( this );
}
int KWTextFrameSet::paragraphs()
@@ -864,7 +864,7 @@ int KWTextFrameSet::paragraphsSelected()
}
-bool KWTextFrameSet::statistics( QProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words,
+bool KWTextFrameSet::statistics( TQProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words,
ulong & sentences, ulong & syllables, ulong & lines, bool selected )
{
return m_textobj->statistics( progress, charsWithSpace, charsWithoutSpace, words, sentences, syllables, lines, selected );
@@ -873,15 +873,15 @@ bool KWTextFrameSet::statistics( QProgressDialog *progress, ulong & charsWithSpa
// Only interested in the body textframeset, not in header/footer
#define kdDebugBody(area) if ( frameSetInfo() == FI_BODY ) kdDebug(area)
-QValueList<KWFrame*> KWTextFrameSet::framesFromTo( int y1, int y2 ) const
+TQValueList<KWFrame*> KWTextFrameSet::framesFromTo( int y1, int y2 ) const
{
- QValueList<KWFrame*> framesList;
+ TQValueList<KWFrame*> framesList;
KoPoint pt;
- KWFrame * firstFrame = internalToDocument( QPoint(0, y1), pt );
+ KWFrame * firstFrame = internalToDocument( TQPoint(0, y1), pt );
if ( !firstFrame )
return framesList;
framesList.append( firstFrame );
- uint frameIndex = const_cast<KWTextFrameSet *>(this)->m_frames.findRef( firstFrame );
+ uint frameIndex = const_cast<KWTextFrameSet *>(this)->m_frames.tqfindRef( firstFrame );
while ( ++frameIndex < m_frames.count() ) {
KWFrame* f = frame( frameIndex );
if ( f->internalY() > y2 ) // too far down, we're done
@@ -926,7 +926,7 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
// List of text frames holding the paragraph (yp,yp+h)
// Usually there is only one, but you can have a paragraph
// starting in one frame/column and ending in another one.
- QValueList<KWFrame*> textFrames = framesFromTo( yp, yp + h );
+ TQValueList<KWFrame*> textFrames = framesFromTo( yp, yp + h );
if (textFrames.isEmpty())
{
#ifdef DEBUG_MARGINS
@@ -960,7 +960,7 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
if ( validHeight )
*validHeight = h; // TODO
- // Everything from there is in layout units
+ // Everything from there is in tqlayout units
// Note: it is very important that this method works in internal coordinates.
// Otherwise, parags broken at the line-level (e.g. between two columns) are seen
// as still in one piece, and we miss the frames in the 2nd column.
@@ -974,15 +974,15 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins: looking for frames between " << yp << " and " << yp+h << " (internal coords)" << endl;
#endif
- if ( m_doc->layoutViewMode()->shouldAdjustMargins() )
+ if ( m_doc->tqlayoutViewMode()->shouldAdjustMargins() )
{
// Principle: for every frame on top at this height, we'll move from and to
// towards each other. The text flows between 'from' and 'to'
- for ( QValueList<KWFrame*>::const_iterator txtit = textFrames.begin(), txtend = textFrames.end() ; txtit != txtend ; ++txtit ) {
+ for ( TQValueList<KWFrame*>::const_iterator txtit = textFrames.begin(), txtend = textFrames.end() ; txtit != txtend ; ++txtit ) {
KWFrame* theFrame = *txtit;
Q_ASSERT( theFrame->frameStack() );
- QValueList<KWFrame*> onTop = theFrame->frameStack()->framesOnTop();
- for (QValueListIterator<KWFrame*> fIt = onTop.begin(); from < to && fIt != onTop.end(); ++fIt )
+ TQValueList<KWFrame*> onTop = theFrame->frameStack()->framesOnTop();
+ for (TQValueListIterator<KWFrame*> fIt = onTop.begin(); from < to && fIt != onTop.end(); ++fIt )
{
if ( (*fIt)->runAround() == KWFrame::RA_BOUNDINGRECT )
{
@@ -990,24 +990,24 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins found frame on top " << (*fIt)->frameSet()->name() << " with rect-on-top at (normal coords) " << rectOnTop << endl;
#endif
- QPoint iTop, iBottom; // top and bottom of intersection in internal coordinates
+ TQPoint iTop, iBottom; // top and bottom of intersection in internal coordinates
if ( documentToInternal( rectOnTop.topLeft(), iTop ) &&
iTop.y() <= yp + h && // optimization
documentToInternal( rectOnTop.bottomRight(), iBottom ) )
{
#ifdef DEBUG_MARGINS
- kdDebugBody(32002) << " in internal coords: " << QRect(iTop,iBottom) << endl;
+ kdDebugBody(32002) << " in internal coords: " << TQRect(iTop,iBottom) << endl;
#endif
// Look for intersection between yp -- yp+h and iTop -- iBottom
- if ( QMAX( yp, iTop.y() ) <= QMIN( yp+h, iBottom.y() ) )
+ if ( TQMAX( yp, iTop.y() ) <= TQMIN( yp+h, iBottom.y() ) )
{
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins iTop=" << iTop.x() << "," << iTop.y()
<< " iBottom=" << iBottom.x() << "," << iBottom.y() << endl;
#endif
- int availLeft = QMAX( 0, iTop.x() - from );
- int availRight = QMAX( 0, to - iBottom.x() );
+ int availLeft = TQMAX( 0, iTop.x() - from );
+ int availRight = TQMAX( 0, to - iBottom.x() );
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins availLeft=" << availLeft
<< " availRight=" << availRight << endl;
@@ -1025,10 +1025,10 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
if ( chooseLeft )
// flow text at the left of the frame
- to = QMIN( to, from + availLeft - 1 ); // can only go left -> QMIN
+ to = TQMIN( to, from + availLeft - 1 ); // can only go left -> TQMIN
else
// flow text at the right of the frame
- from = QMAX( from, to - availRight + 1 ); // can only go right -> QMAX
+ from = TQMAX( from, to - availRight + 1 ); // can only go right -> TQMAX
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins from=" << from << " to=" << to << endl;
@@ -1052,8 +1052,8 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
}
else
{
- *breakBegin = QMIN( *breakBegin, iTop.y() );
- *breakEnd = QMAX( *breakEnd, iBottom.y() );
+ *breakBegin = TQMIN( *breakBegin, iTop.y() );
+ *breakEnd = TQMAX( *breakEnd, iBottom.y() );
}
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins iBottom.y=" << iBottom.y()
@@ -1113,7 +1113,7 @@ bool KWTextFrameSet::checkVerticalBreak( int & yp, int & hp, KoTextParag * parag
// its bottom. Without the +1, we hit the frame again on the next adjustLMargin call.
// Check for intersection between the parag (yp -- yp+hp) and the break area (breakBegin -- breakEnd)
- if ( QMAX( yp, breakBegin ) <= QMIN( yp+hp, breakEnd ) )
+ if ( TQMAX( yp, breakBegin ) <= TQMIN( yp+hp, breakEnd ) )
{
if ( !parag || linesTogether ) // Paragraph-level breaking
{
@@ -1126,7 +1126,7 @@ bool KWTextFrameSet::checkVerticalBreak( int & yp, int & hp, KoTextParag * parag
}
else // Line-level breaking
{
- QMap<int, KoTextParagLineStart*>& lineStarts = parag->lineStartList();
+ TQMap<int, KoTextParagLineStart*>& lineStarts = parag->lineStartList();
#ifdef DEBUG_FORMATVERTICALLY
kdDebug(32002) << "checkVerticalBreak parag " << parag->paragId()
<< ". lineStarts has " << lineStarts.count()
@@ -1134,7 +1134,7 @@ bool KWTextFrameSet::checkVerticalBreak( int & yp, int & hp, KoTextParag * parag
#endif
int dy = 0;
int line = 0;
- QMap<int, KoTextParagLineStart*>::Iterator it = lineStarts.begin();
+ TQMap<int, KoTextParagLineStart*>::Iterator it = lineStarts.begin();
for ( ; it != lineStarts.end() ; ++it, ++line )
{
KoTextParagLineStart * ls = it.data();
@@ -1149,7 +1149,7 @@ bool KWTextFrameSet::checkVerticalBreak( int & yp, int & hp, KoTextParag * parag
#endif
if ( !dy )
{
- if ( QMAX( y, breakBegin ) <= QMIN( y + ls->h, breakEnd ) )
+ if ( TQMAX( y, breakBegin ) <= TQMIN( y + ls->h, breakEnd ) )
{
if ( line == 0 ) // First line ? It's like a paragraph breaking then
{
@@ -1189,11 +1189,11 @@ bool KWTextFrameSet::checkVerticalBreak( int & yp, int & hp, KoTextParag * parag
return false;
}
-int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRect )
+int KWTextFrameSet::formatVertically( KoTextParag * _parag, const TQRect& paragRect )
{
// WARNING: in this whole method parag can be 0. See adjustFlow()
KWTextParag *parag = static_cast<KWTextParag *>( _parag );
- if ( !m_doc->layoutViewMode()->shouldFormatVertically() )
+ if ( !m_doc->tqlayoutViewMode()->shouldFormatVertically() )
{
return 0;
}
@@ -1229,7 +1229,7 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
#endif
int totalHeight = 0;
- QPtrListIterator<KWFrame> frameIt( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( frameIterator() );
for ( ; frameIt.current(); ++frameIt )
{
int frameHeight = kWordDocument()->ptToLayoutUnitPixY( frameIt.current()->innerHeight() );
@@ -1241,7 +1241,7 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
{
// ## TODO optimize this [maybe we should simply start from the end in the main loop?]
// Or cache the attribute ( e.g. "frame->hasCopy()" ).
- QPtrListIterator<KWFrame> nextFrame( frameIt );
+ TQPtrListIterator<KWFrame> nextFrame( frameIt );
while ( !check && !nextFrame.atLast() )
{
++nextFrame;
@@ -1271,7 +1271,7 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
// don't move down parags that have only one line and are bigger than the page (e.g. floating tables)
if ( hp < frameHeight || ( parag && parag->lineStartList().count() > 1 ) )
{
- // breakBegin==breakEnd==bottom, since the next frame's top is the same as bottom, in QRT coords.
+ // breakBegin==breakEnd==bottom, since the next frame's top is the same as bottom, in TQRT coords.
(void) checkVerticalBreak( yp, hp, parag, linesTogether, bottom, bottom );
// Some people write a single paragraph over 3 frames! So we have to keep looking, that's why we ignore the return value
}
@@ -1293,13 +1293,13 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
for ( ; frameIt.current(); ++frameIt )
{
Q_ASSERT( frameIt.current()->frameStack() );
- QValueList<KWFrame*> onTop = frameIt.current()->frameStack()->framesOnTop();
- for (QValueListIterator<KWFrame*> fIt = onTop.begin(); fIt != onTop.end(); ++fIt )
+ TQValueList<KWFrame*> onTop = frameIt.current()->frameStack()->framesOnTop();
+ for (TQValueListIterator<KWFrame*> fIt = onTop.begin(); fIt != onTop.end(); ++fIt )
{
if ( (*fIt)->runAround() == KWFrame::RA_SKIP )
{
KoRect rectOnTop = frameIt.current()->intersect( (*fIt)->runAroundRect() );
- QPoint iTop, iBottom; // top and bottom in internal coordinates
+ TQPoint iTop, iBottom; // top and bottom in internal coordinates
if ( documentToInternal( rectOnTop.topLeft(), iTop ) &&
iTop.y() <= yp + hp &&
documentToInternal( rectOnTop.bottomLeft(), iBottom ) &&
@@ -1339,7 +1339,7 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
if ( hp != oldHeight )
parag->setHeight( hp );
if ( yp != oldY ) {
- QRect r = parag->rect();
+ TQRect r = parag->rect();
r.moveBy( 0, yp - oldY );
parag->setRect( r );
parag->setMovedDown( true );
@@ -1355,7 +1355,7 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
// There is no parag pointer in that case.
int KWTextFrameSet::adjustFlow( int y, int w, int h )
{
- QRect r( 0, y, w, h );
+ TQRect r( 0, y, w, h );
return formatVertically( 0L, r );
}
@@ -1367,11 +1367,11 @@ void KWTextFrameSet::fixParagWidth( KWTextParag* parag )
if ( parag->hardFrameBreakAfter() )
{
KoTextFormat * lastFormat = parag->at( parag->length() - 1 )->format();
- const QFontMetrics& refFontMetrics = lastFormat->refFontMetrics();
+ const TQFontMetrics& refFontMetrics = lastFormat->refFontMetrics();
// keep in sync with KWTextFrameSet::formatVertically
- QString str = i18n( "--- Frame Break ---" );
+ TQString str = i18n( "--- Frame Break ---" );
int width = refFontMetrics.width( str );
- parag->setWidth( QMIN( parag->rect().width() + width, textDocument()->width() ) );
+ parag->setWidth( TQMIN( parag->rect().width() + width, textDocument()->width() ) );
}
else // default KoTextFormatter implementation
parag->fixParagWidth( true );
@@ -1450,15 +1450,15 @@ void KWTextFrameSet::updateFrames( int flags )
// Adjustment on 20-Jun-2002 which does not change the itent of this but moves the
// sorting from top-left of frame to the whole frame area. (TZ)
- QValueList<FrameStruct> sortedFrames;
+ TQValueList<FrameStruct> sortedFrames;
int width = 0;
- QPtrListIterator<KWFrame> frameIter( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIter( frameIterator() );
for ( ; frameIter.current(); ++frameIter )
{
// Calculate max width while we're at it
//kdDebug(32002) << "KWTextFrameSet::updateFrames frame " << *frameIter.current() << " innerWidth=" << frameIter.current()->innerWidth() << "pt" << endl;
- width = QMAX( width, m_doc->ptToLayoutUnitPixX( frameIter.current()->innerWidth()));
+ width = TQMAX( width, m_doc->ptToLayoutUnitPixX( frameIter.current()->innerWidth()));
if ( flags & SortFrames )
{
FrameStruct str;
@@ -1470,7 +1470,7 @@ void KWTextFrameSet::updateFrames( int flags )
{
//kdDebug(32002) << "KWTextFrameSet::updateFrames setWidth " << width << " LU pixels." << endl;
//textDocument()->setMinimumWidth( -1, 0 );
- textDocument()->setWidth( width + 1 ); // QRect semantics problem (#32866)
+ textDocument()->setWidth( width + 1 ); // TQRect semantics problem (#32866)
} //else kdDebug(32002) << "KWTextFrameSet::updateFrames width already " << width << " LU pixels." << endl;
if ( flags & SortFrames )
@@ -1481,7 +1481,7 @@ void KWTextFrameSet::updateFrames( int flags )
m_frames.setAutoDelete( false );
m_frames.clear();
- QValueList<FrameStruct>::Iterator it = sortedFrames.begin();
+ TQValueList<FrameStruct>::Iterator it = sortedFrames.begin();
for ( ; it != sortedFrames.end() ; ++it )
m_frames.append( (*it).frame );
}
@@ -1491,7 +1491,7 @@ void KWTextFrameSet::updateFrames( int flags )
double lastRealFrameHeight = 0;
bool firstFrame = true;
- QPtrListIterator<KWFrame> frameIt( m_frames );
+ TQPtrListIterator<KWFrame> frameIt( m_frames );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame* theFrame = frameIt.current();
@@ -1528,7 +1528,7 @@ KWFrame * KWTextFrameSet::internalToDocument( const KoPoint &relPoint, KoPoint &
#ifdef DEBUG_ITD
kdDebug() << name() << " ITD called for relPoint=" << relPoint.x() << "," << relPoint.y() << endl;
#endif
- if ( !m_doc->layoutViewMode()->hasFrames() ) { // text viewmode
+ if ( !m_doc->tqlayoutViewMode()->hasFrames() ) { // text viewmode
dPoint = relPoint;
return m_frames.getFirst();
}
@@ -1628,7 +1628,7 @@ KWFrame * KWTextFrameSet::internalToDocument( const KoPoint &relPoint, KoPoint &
}
// Now iterate over the frames in page 'result' and find the right one
- QPtrListIterator<KWFrame> frameIt( *m_framesInPage[result] );
+ TQPtrListIterator<KWFrame> frameIt( *m_framesInPage[result] );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame *theFrame = frameIt.current();
@@ -1636,7 +1636,7 @@ KWFrame * KWTextFrameSet::internalToDocument( const KoPoint &relPoint, KoPoint &
#ifdef DEBUG_ITD
kdDebug() << "KWTextFrameSet::internalToDocument frame's relative rect:" << relRect << endl;
#endif
- if ( relRect.contains( relPoint ) ) // both relRect and relPoint are in "relative coordinates"
+ if ( relRect.tqcontains( relPoint ) ) // both relRect and relPoint are in "relative coordinates"
{
dPoint = internalToDocumentKnowingFrame( relPoint, theFrame );
return theFrame;
@@ -1651,9 +1651,9 @@ KWFrame * KWTextFrameSet::internalToDocument( const KoPoint &relPoint, KoPoint &
}
// same but with iPoint in LU
-KWFrame * KWTextFrameSet::internalToDocument( const QPoint &iPoint, KoPoint &dPoint ) const
+KWFrame * KWTextFrameSet::internalToDocument( const TQPoint &iPoint, KoPoint &dPoint ) const
{
- KoPoint relPoint = m_doc->layoutUnitPtToPt( m_doc->pixelToPt( iPoint ) );
+ KoPoint relPoint = m_doc->tqlayoutUnitPtToPt( m_doc->pixelToPt( iPoint ) );
return internalToDocument( relPoint, dPoint );
}
@@ -1666,7 +1666,7 @@ void KWTextFrameSet::printDebug()
kdDebug() << "KoTextDocument width = " << textDocument()->width() << " height = " << textDocument()->height() << endl;
}
- QPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
+ TQPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
for ( ; cit.current() ; ++cit )
{
KWAnchor *anc = dynamic_cast<KWAnchor *>( cit.current() );
@@ -1676,13 +1676,13 @@ void KWTextFrameSet::printDebug()
}
#endif
-QDomElement KWTextFrameSet::saveInternal( QDomElement &parentElem, bool saveFrames, bool saveAnchorsFramesets )
+TQDomElement KWTextFrameSet::saveInternal( TQDomElement &tqparentElem, bool saveFrames, bool saveAnchorsFramesets )
{
if ( m_frames.isEmpty() ) // Deleted frameset -> don't save
- return QDomElement();
+ return TQDomElement();
- QDomElement framesetElem = parentElem.ownerDocument().createElement( "FRAMESET" );
- parentElem.appendChild( framesetElem );
+ TQDomElement framesetElem = tqparentElem.ownerDocument().createElement( "FRAMESET" );
+ tqparentElem.appendChild( framesetElem );
if ( m_groupmanager ) {
framesetElem.setAttribute( "grpMgr", m_groupmanager->name() );
@@ -1708,7 +1708,7 @@ QDomElement KWTextFrameSet::saveInternal( QDomElement &parentElem, bool saveFram
return framesetElem;
}
-KWFrame* KWTextFrameSet::loadOasisTextFrame( const QDomElement& frameTag, const QDomElement &tag, KoOasisContext& context )
+KWFrame* KWTextFrameSet::loadOasisTextFrame( const TQDomElement& frameTag, const TQDomElement &tag, KoOasisContext& context )
{
context.styleStack().save();
context.fillStyleStack( frameTag, KoXmlNS::draw, "style-name", "graphic" ); // get the style for the graphics element
@@ -1718,14 +1718,14 @@ KWFrame* KWTextFrameSet::loadOasisTextFrame( const QDomElement& frameTag, const
// Load minimum height - only available for text-box
bool hasMinHeight = tag.hasAttributeNS( KoXmlNS::fo, "min-height" );
if ( hasMinHeight ) {
- double height = KoUnit::parseValue( tag.attributeNS( KoXmlNS::fo, "min-height", QString::null ) );
+ double height = KoUnit::parseValue( tag.attributeNS( KoXmlNS::fo, "min-height", TQString() ) );
frame->setMinimumFrameHeight( height );
if ( height > frame->height() || !tag.hasAttributeNS( KoXmlNS::fo, "height" ) )
frame->setHeight( height );
}
// Load overflow behavior (OASIS 14.27.27, not in OO-1.1 DTD). This is here since it's only for text framesets.
- const QString overflowBehavior = context.styleStack().attributeNS( KoXmlNS::style, "overflow-behavior" );
+ const TQString overflowBehavior = context.styleStack().attributeNS( KoXmlNS::style, "overflow-behavior" );
if ( frame->minimumFrameHeight() > 0 )
frame->setFrameBehavior( KWFrame::AutoExtendFrame );
else if ( overflowBehavior == "auto-create-new-frame" )
@@ -1743,12 +1743,12 @@ KWFrame* KWTextFrameSet::loadOasisTextFrame( const QDomElement& frameTag, const
return frame;
}
-void KWTextFrameSet::loadOasisContent( const QDomElement &bodyElem, KoOasisContext& context )
+void KWTextFrameSet::loadOasisContent( const TQDomElement &bodyElem, KoOasisContext& context )
{
return m_textobj->loadOasisContent( bodyElem, context, m_doc->styleCollection() );
}
-KWFrame* KWTextFrameSet::loadOasis( const QDomElement& frameTag, const QDomElement &tag, KoOasisContext& context )
+KWFrame* KWTextFrameSet::loadOasis( const TQDomElement& frameTag, const TQDomElement &tag, KoOasisContext& context )
{
KWFrame* frame = loadOasisTextFrame( frameTag, tag, context );
loadOasisContent( tag, context );
@@ -1765,7 +1765,7 @@ void KWTextFrameSet::saveOasisContent( KoXmlWriter& writer, KoSavingContext& con
{
// TODO save protectContent
- QMap<const KoTextParag*, KoTextBookmarkList> bookmarksPerParagraph;
+ TQMap<const KoTextParag*, KoTextBookmarkList> bookmarksPerParagraph;
if ( m_doc->bookmarkList() )
bookmarksPerParagraph = m_doc->bookmarkList()->bookmarksPerParagraph();
@@ -1795,9 +1795,9 @@ void KWTextFrameSet::saveOasisContent( KoXmlWriter& writer, KoSavingContext& con
}
- // I want Qt4's QMap/QHash::value()!
+ // I want TQt4's TQMap/TQHash::value()!
KoSavingContext::BookmarkPositions bookmarkStarts, bookmarkEnds;
- QMap<const KoTextParag*, KoTextBookmarkList>::const_iterator bkit = bookmarksPerParagraph.find( parag );
+ TQMap<const KoTextParag*, KoTextBookmarkList>::const_iterator bkit = bookmarksPerParagraph.tqfind( parag );
if ( bkit != bookmarksPerParagraph.end() ) {
// Massage a bit the bookmarks data; KoTextParag wants it ordered by position, for speed.
const KoTextBookmarkList& bookmarks = *bkit;
@@ -1835,10 +1835,10 @@ void KWTextFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context, b
{
// Save first frame with the whole contents
KWFrame* frame = m_frames.getFirst();
- QString lastFrameName = name();
+ TQString lastFrameName = name();
frame->startOasisFrame( writer, context.mainStyles(), lastFrameName );
- QString nextFrameName = name() + "-";
+ TQString nextFrameName = name() + "-";
writer.startElement( "draw:text-box" );
if ( frame->frameBehavior() == KWFrame::AutoExtendFrame )
@@ -1853,18 +1853,18 @@ void KWTextFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context, b
if ( saveFrames ) // false when called from KWDocument::saveSelectedFrames
{
int frameNumber = 2;
- QPtrListIterator<KWFrame> frameIter( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIter( frameIterator() );
++frameIter; // skip first frame, already saved
for ( ; frameIter.current(); ++frameIter, ++frameNumber )
{
- const QString frameName = nextFrameName + QString::number( frameNumber );
+ const TQString frameName = nextFrameName + TQString::number( frameNumber );
frameIter.current()->startOasisFrame( writer, context.mainStyles(), frameName, lastFrameName );
lastFrameName = frameName; // this is used for copy-frames
writer.startElement( "draw:text-box" );
if ( frame->frameBehavior() == KWFrame::AutoExtendFrame )
writer.addAttributePt( "fo:min-height", frame->minimumFrameHeight() );
if ( frameNumber < (int)m_frames.count() )
- writer.addAttribute( "draw:chain-next-name", nextFrameName + QString::number( frameNumber+1 ) );
+ writer.addAttribute( "draw:chain-next-name", nextFrameName + TQString::number( frameNumber+1 ) );
// No contents. Well, OOo saves an empty paragraph, but I'd say that's wrong.
writer.endElement();
writer.endElement(); // draw:frame
@@ -1872,7 +1872,7 @@ void KWTextFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context, b
}
}
-void KWTextFrameSet::load( QDomElement &attributes, bool loadFrames )
+void KWTextFrameSet::load( TQDomElement &attributes, bool loadFrames )
{
KWFrameSet::load( attributes, loadFrames );
if ( attributes.hasAttribute( "protectContent"))
@@ -1883,7 +1883,7 @@ void KWTextFrameSet::load( QDomElement &attributes, bool loadFrames )
KWTextParag *lastParagraph = 0L;
// <PARAGRAPH>
- QDomElement paragraph = attributes.firstChild().toElement();
+ TQDomElement paragraph = attributes.firstChild().toElement();
for ( ; !paragraph.isNull() ; paragraph = paragraph.nextSibling().toElement() )
{
if ( paragraph.tagName() == "PARAGRAPH" )
@@ -1928,7 +1928,7 @@ void KWTextFrameSet::setVisible(bool visible)
void KWTextFrameSet::setInlineFramesVisible(bool visible)
{
- QPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
+ TQPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
for ( ; cit.current() ; ++cit )
{
KWAnchor *anc = dynamic_cast<KWAnchor *>( cit.current() );
@@ -1937,7 +1937,7 @@ void KWTextFrameSet::setInlineFramesVisible(bool visible)
}
}
-void KWTextFrameSet::addTextFrameSets( QPtrList<KWTextFrameSet> & lst, bool onlyReadWrite )
+void KWTextFrameSet::addTextFrameSets( TQPtrList<KWTextFrameSet> & lst, bool onlyReadWrite )
{
if (!textObject()->protectContent() || !onlyReadWrite)
lst.append(this);
@@ -1984,7 +1984,7 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
frmBehavior = KWFrame::Ignore;
}
- int difference = ( bottom + 2 ) - availHeight; // in layout unit pixels
+ int difference = ( bottom + 2 ) - availHeight; // in tqlayout unit pixels
#ifdef DEBUG_FORMAT_MORE
kdDebug(32002) << "AutoExtendFrame bottom=" << bottom << " availHeight=" << availHeight
<< " => difference = " << difference << endl;
@@ -2010,7 +2010,7 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
// The Y position doesn't matter much, recalcFrames will reposition the frame
// But the point of this code is set the correct height for the frame.
double maxFooterSize = footerHeaderSizeMax( theFrame );
- double diffPt = m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
+ double diffPt = m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
wantedPosition = theFrame->top() - diffPt;
#ifdef DEBUG_FORMAT_MORE
kdDebug() << " diffPt=" << diffPt << " -> wantedPosition=" << wantedPosition << endl;
@@ -2038,24 +2038,24 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
}
// Other frames are resized by the bottom
- wantedPosition = m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) ) + theFrame->bottom();
+ wantedPosition = m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) ) + theFrame->bottom();
KWPage *page = m_doc->pageManager()->page( theFrame );
double pageBottom;
if(page)
pageBottom = page->offsetInDocument() + page->height() - page->bottomMargin();
else
pageBottom = theFrame->bottom();
- double newPosition = QMIN( wantedPosition, pageBottom );
+ double newPosition = TQMIN( wantedPosition, pageBottom );
kdDebug(32002) << "wantedPosition=" << wantedPosition << " pageBottom=" << pageBottom
<< " -> newPosition=" << newPosition << endl;
if ( theFrame->frameSet()->isAHeader() )
{
double maxHeaderSize=footerHeaderSizeMax( theFrame );
- newPosition = QMIN( newPosition, maxHeaderSize + theFrame->top() );
+ newPosition = TQMIN( newPosition, maxHeaderSize + theFrame->top() );
}
- newPosition = QMAX( newPosition, theFrame->top() ); // avoid negative heights
+ newPosition = TQMAX( newPosition, theFrame->top() ); // avoid negative heights
kdDebug(32002) << "newPosition=" << newPosition << endl;
bool resized = false;
@@ -2065,7 +2065,7 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
kdDebug(32002) << "is table cell; just setting new minFrameHeight, to " << newPosition - theFrame->top() << endl;
#endif
double newMinFrameHeight = newPosition - theFrame->top();
- resized = QABS( newMinFrameHeight - theFrame->minimumFrameHeight() ) > 1E-10;
+ resized = TQABS( newMinFrameHeight - theFrame->minimumFrameHeight() ) > 1E-10;
if ( resized ) {
theFrame->setMinimumFrameHeight( newMinFrameHeight );
KWTableFrameSet::Cell *cell = (KWTableFrameSet::Cell *)theFrame->frameSet();
@@ -2086,7 +2086,7 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
// The Y position doesn't matter much, recalcFrames will reposition the frame
// But the point of this code is set the correct height for the frame.
double maxFooterSize = footerHeaderSizeMax( theFrame );
- double diffPt = m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
+ double diffPt = m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
wantedPosition = theFrame->top() - diffPt;
if ( wantedPosition < 0 )
{
@@ -2108,7 +2108,7 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
}
return true; // abort formatting for now (not sure this is correct)
} else {
- resized = QABS( theFrame->bottom() - newPosition ) > 1E-10;
+ resized = TQABS( theFrame->bottom() - newPosition ) > 1E-10;
#ifdef DEBUG_FORMAT_MORE
kdDebug() << " bottom=" << theFrame->bottom() << " new position:" << newPosition << " wantedPosition=" << wantedPosition << " resized=" << resized << endl;
#endif
@@ -2183,7 +2183,7 @@ void KWTextFrameSet::slotAfterFormattingTooMuchSpace( int bottom )
#endif
if ( theFrame->frameSet()->isAFooter() || theFrame->frameSet()->isFootEndNote() )
{
- double wantedPosition = theFrame->top() + m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
+ double wantedPosition = theFrame->top() + m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
Q_ASSERT( wantedPosition < theFrame->bottom() );
if ( wantedPosition != theFrame->top() )
{
@@ -2199,11 +2199,11 @@ void KWTextFrameSet::slotAfterFormattingTooMuchSpace( int bottom )
}
else // header or other frame: resize bottom
{
- double wantedPosition = theFrame->bottom() - m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
+ double wantedPosition = theFrame->bottom() - m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
#ifdef DEBUG_FORMAT_MORE
kdDebug() << "slotAfterFormatting wantedPosition=" << wantedPosition << " top+minheight=" << theFrame->top() + s_minFrameHeight << endl;
#endif
- wantedPosition = QMAX( wantedPosition, theFrame->top() + s_minFrameHeight );
+ wantedPosition = TQMAX( wantedPosition, theFrame->top() + s_minFrameHeight );
if( theFrame->frameSet()->groupmanager() ) {
if ( wantedPosition != theFrame->bottom()) {
KWTableFrameSet *table = theFrame->frameSet()->groupmanager();
@@ -2231,7 +2231,7 @@ void KWTextFrameSet::slotAfterFormattingTooMuchSpace( int bottom )
else if ( table->anchorFrameset()->isAFooter() || table->anchorFrameset()->isFootEndNote() )
{
theFrame = table->anchorFrameset()->frameIterator().getLast();
- double wantedPosition = theFrame->top() + m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
+ double wantedPosition = theFrame->top() + m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
Q_ASSERT( wantedPosition < theFrame->bottom() );
if ( wantedPosition != theFrame->top() )
{
@@ -2244,7 +2244,7 @@ void KWTextFrameSet::slotAfterFormattingTooMuchSpace( int bottom )
}
} else {
// Also apply the frame's minimum height
- wantedPosition = QMAX( wantedPosition, theFrame->top() + theFrame->minimumFrameHeight() );
+ wantedPosition = TQMAX( wantedPosition, theFrame->top() + theFrame->minimumFrameHeight() );
if ( wantedPosition != theFrame->bottom()) {
#ifdef DEBUG_FORMAT_MORE
kdDebug() << " the frame was " << *theFrame << endl;
@@ -2340,8 +2340,8 @@ bool KWTextFrameSet::createNewPageAndNewFrame( KoTextParag* lastFormatted, int /
if(isMainFrameset()) // is never added in the framesToCopyOnNewPage
heightWeWillGet += m_doc->ptToLayoutUnitPixY( m_frames.last()->height() );
else {
- QPtrList<KWFrame> framesToCopy = m_doc->framesToCopyOnNewPage( lastPageNumber );
- QPtrListIterator<KWFrame> frameIt( framesToCopy );
+ TQPtrList<KWFrame> framesToCopy = m_doc->framesToCopyOnNewPage( lastPageNumber );
+ TQPtrListIterator<KWFrame> frameIt( framesToCopy );
for ( ; frameIt.current(); ++frameIt )
if (frameIt.current()->frameSet() == this &&
frameIt.current()->newFrameBehavior()==KWFrame::Reconnect)
@@ -2388,7 +2388,7 @@ bool KWTextFrameSet::createNewPageAndNewFrame( KoTextParag* lastFormatted, int /
Q_ASSERT(frame(0) && frame(0)->frameStack());
frame(0)->frameStack()->update();
/// We don't want to start from the beginning every time !
- ////m_doc->invalidate();
+ ////m_doc->tqinvalidate();
// Reformat the last paragraph. If it's over the two pages, it will need
// the new page (e.g. for inline frames that need internalToDocument to work)
@@ -2400,7 +2400,7 @@ bool KWTextFrameSet::createNewPageAndNewFrame( KoTextParag* lastFormatted, int /
if ( lastFormatted )
{
m_textobj->setLastFormattedParag( lastFormatted );
- lastFormatted->invalidate( 0 );
+ lastFormatted->tqinvalidate( 0 );
//This was a way to format the rest from here (recursively), but it didn't help much ensureCursorVisible()
//So instead I fixed formatMore to return formatMore(2) itself.
//m_textobj->formatMore( 2 );
@@ -2414,7 +2414,7 @@ double KWTextFrameSet::footNoteSize( KWFrame *theFrame )
{
double tmp =0.0;
int page = theFrame->pageNumber();
- QPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
for ( ; fit.current() ; ++fit )
{
if((fit.current()->isFootNote() || fit.current()->isEndNote()) &&
@@ -2439,7 +2439,7 @@ double KWTextFrameSet::footerHeaderSizeMax( KWFrame *theFrame )
bool header=theFrame->frameSet()->isAHeader();
if( header ? m_doc->isHeaderVisible():m_doc->isFooterVisible() )
{
- QPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
for ( ; fit.current() ; ++fit )
{
bool state = header ? fit.current()->isAFooter():fit.current()->isAHeader();
@@ -2459,9 +2459,9 @@ double KWTextFrameSet::footerHeaderSizeMax( KWFrame *theFrame )
return tmp;
}
-void KWTextFrameSet::frameResized( KWFrame *theFrame, bool invalidateLayout )
+void KWTextFrameSet::frameResized( KWFrame *theFrame, bool tqinvalidateLayout )
{
- kdDebug(32002) << "KWTextFrameSet::frameResized " << theFrame << " " << *theFrame << " invalidateLayout=" << invalidateLayout << endl;
+ kdDebug(32002) << "KWTextFrameSet::frameResized " << theFrame << " " << *theFrame << " tqinvalidateLayout=" << tqinvalidateLayout << endl;
if ( theFrame->height() < 0 )
return; // safety!
@@ -2484,12 +2484,12 @@ void KWTextFrameSet::frameResized( KWFrame *theFrame, bool invalidateLayout )
m_doc->recalcFrames( theFrame->pageNumber(), -1 ); // warning this can delete theFrame!
// m_doc->frameChanged( theFrame );
- // Warning, can't call layout() (frameChanged calls it)
+ // Warning, can't call tqlayout() (frameChanged calls it)
// from here, since it calls formatMore() !
- if ( invalidateLayout )
- m_doc->invalidate(this);
+ if ( tqinvalidateLayout )
+ m_doc->tqinvalidate(this);
- // Can't repaint directly, we might be in a paint event already
+ // Can't tqrepaint directly, we might be in a paint event already
m_doc->delayedRepaintAllViews();
}
@@ -2526,7 +2526,7 @@ bool KWTextFrameSet::canRemovePage( int num )
return true;
}
- QPtrListIterator<KWFrame> frameIt( framesInPage( num ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( num ) );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame * theFrame = frameIt.current();
@@ -2553,7 +2553,7 @@ void KWTextFrameSet::deleteFrame( unsigned int num, bool remove, bool recalc )
KWFrameSet::deleteFrame( num, remove, recalc );
}
-void KWTextFrameSet::updateViewArea( QWidget * w, KWViewMode* viewMode, const QPoint & nPointBottom )
+void KWTextFrameSet::updateViewArea( TQWidget * w, KWViewMode* viewMode, const TQPoint & nPointBottom )
{
if (!isVisible(viewMode))
return;
@@ -2572,10 +2572,10 @@ void KWTextFrameSet::updateViewArea( QWidget * w, KWViewMode* viewMode, const QP
else
{
// Find frames on that page, and keep the max bottom, in internal coordinates
- QPtrListIterator<KWFrame> frameIt( framesInPage( maxPage ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( maxPage ) );
for ( ; frameIt.current(); ++frameIt )
{
- maxY = QMAX( maxY, m_doc->ptToLayoutUnitPixY( frameIt.current()->internalY() + frameIt.current()->innerHeight() ) );
+ maxY = TQMAX( maxY, m_doc->ptToLayoutUnitPixY( frameIt.current()->internalY() + frameIt.current()->innerHeight() ) );
}
}
#ifdef DEBUG_VIEWAREA
@@ -2610,7 +2610,7 @@ KCommand * KWTextFrameSet::setPageBreakingCommand( KoTextCursor * cursor, int pa
}
m_textobj->formatMore( 2 );
- emit repaintChanged( this );
+ emit tqrepaintChanged( this );
KoTextObject::UndoRedoInfo & undoRedoInfo = m_textobj->undoRedoInfoStruct();
undoRedoInfo.newParagLayout.pageBreaking = pageBreaking;
KoTextParagCommand *cmd = new KoTextParagCommand(
@@ -2626,7 +2626,7 @@ KCommand * KWTextFrameSet::setPageBreakingCommand( KoTextCursor * cursor, int pa
return new KoTextCommand( m_textobj, /*cmd, */i18n("Change Paragraph Attribute") );
}
-KCommand * KWTextFrameSet::pasteOasis( KoTextCursor * cursor, const QByteArray & data, bool removeSelected )
+KCommand * KWTextFrameSet::pasteOasis( KoTextCursor * cursor, const TQByteArray & data, bool removeSelected )
{
if (protectContent() )
return 0;
@@ -2642,7 +2642,7 @@ KCommand * KWTextFrameSet::pasteOasis( KoTextCursor * cursor, const QByteArray &
KWOasisPasteCommand * cmd = new KWOasisPasteCommand( textDocument(), cursor->parag()->paragId(), cursor->index(), data );
textDocument()->addCommand( cmd );
- macroCmd->addCommand( new KoTextCommand( m_textobj, /*cmd, */QString::null ) );
+ macroCmd->addCommand( new KoTextCommand( m_textobj, /*cmd, */TQString() ) );
*cursor = *( cmd->execute( cursor ) );
@@ -2650,7 +2650,7 @@ KCommand * KWTextFrameSet::pasteOasis( KoTextCursor * cursor, const QByteArray &
//m_textobj->formatMore( 2 );
ensureFormatted( cursor->parag() );
- emit repaintChanged( this );
+ emit tqrepaintChanged( this );
m_textobj->emitEnsureCursorVisible();
m_textobj->emitUpdateUI( true );
m_textobj->emitShowCursor();
@@ -2671,12 +2671,12 @@ void KWTextFrameSet::insertTOC( KoTextCursor * cursor )
KoTextDocCommand * cmd = new KWInsertTOCCommand( this,cur ? cur->parag(): cursor->parag() );
textDocument()->addCommand( cmd );
- macroCmd->addCommand( new KoTextCommand( m_textobj, QString::null ) );
+ macroCmd->addCommand( new KoTextCommand( m_textobj, TQString() ) );
*cursor = *( cmd->execute( cursor ) );
m_textobj->setLastFormattedParag( textDocument()->firstParag() );
m_textobj->formatMore( 2 );
- emit repaintChanged( this );
+ emit tqrepaintChanged( this );
m_textobj->emitEnsureCursorVisible();
m_textobj->emitUpdateUI( true );
m_textobj->emitShowCursor();
@@ -2686,7 +2686,7 @@ void KWTextFrameSet::insertTOC( KoTextCursor * cursor )
KNamedCommand* KWTextFrameSet::insertFrameBreakCommand( KoTextCursor *cursor )
{
- KMacroCommand* macroCmd = new KMacroCommand( QString::null );
+ KMacroCommand* macroCmd = new KMacroCommand( TQString() );
macroCmd->addCommand( m_textobj->insertParagraphCommand( cursor ) );
KWTextParag *parag = static_cast<KWTextParag *>( cursor->parag() );
if(parag->prev()) {
@@ -2713,32 +2713,32 @@ void KWTextFrameSet::insertFrameBreak( KoTextCursor *cursor )
m_textobj->setLastFormattedParag( cursor->parag() );
m_textobj->formatMore( 2 );
- emit repaintChanged( this );
+ emit tqrepaintChanged( this );
m_textobj->emitEnsureCursorVisible();
m_textobj->emitUpdateUI( true );
m_textobj->emitShowCursor();
}
-QRect KWTextFrameSet::paragRect( KoTextParag * parag ) const
+TQRect KWTextFrameSet::paragRect( KoTextParag * parag ) const
{
// ## Warning. Imagine a paragraph cut in two pieces (at the line-level),
// between two columns. A single rect in internal coords, but two rects in
- // normal coords. QRect( topLeft, bottomRight ) is just plain wrong.
+ // normal coords. TQRect( topLeft, bottomRight ) is just plain wrong.
// Currently this method is only used for "ensure visible" so that's fine, but
// we shouldn't use it for more precise stuff.
KoPoint p;
(void)internalToDocument( parag->rect().topLeft(), p );
- QPoint topLeft = m_doc->zoomPoint( p );
+ TQPoint topLeft = m_doc->zoomPoint( p );
(void)internalToDocument( parag->rect().bottomRight(), p );
- QPoint bottomRight = m_doc->zoomPoint( p );
- return QRect( topLeft, bottomRight );
+ TQPoint bottomRight = m_doc->zoomPoint( p );
+ return TQRect( topLeft, bottomRight );
}
void KWTextFrameSet::findPosition( const KoPoint &dPoint, KoTextParag * & parag, int & index )
{
KoTextCursor cursor( textDocument() );
- QPoint iPoint;
+ TQPoint iPoint;
if ( documentToInternal( dPoint, iPoint ) )
{
cursor.place( iPoint, textDocument()->firstParag() );
@@ -2756,7 +2756,7 @@ void KWTextFrameSet::findPosition( const KoPoint &dPoint, KoTextParag * & parag,
bool KWTextFrameSet::minMaxInternalOnPage( int pageNum, int& topLU, int& bottomLU ) const
{
- QPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
if ( !frameIt.current() )
return false;
@@ -2767,10 +2767,10 @@ bool KWTextFrameSet::minMaxInternalOnPage( int pageNum, int& topLU, int& bottomL
for ( ; frameIt.current(); ++frameIt )
{
double y = frameIt.current()->internalY();
- topPt = QMIN( topPt, y );
- bottomPt = QMAX( bottomPt, y + frameIt.current()->height() );
+ topPt = TQMIN( topPt, y );
+ bottomPt = TQMAX( bottomPt, y + frameIt.current()->height() );
}
- // Convert to layout units
+ // Convert to tqlayout units
topLU = m_doc->ptToLayoutUnitPixY( topPt );
bottomLU = m_doc->ptToLayoutUnitPixY( bottomPt );
return true;
@@ -2800,7 +2800,7 @@ KCommand * KWTextFrameSet::deleteAnchoredFrame( KWAnchor * anchor )
textDocument()->setSelectionEnd( KoTextDocument::Temp, &c );
KCommand *cmd = m_textobj->removeSelectedTextCommand( &c, KoTextDocument::Temp );
- m_doc->repaintAllViews();
+ m_doc->tqrepaintAllViews();
return cmd;
}
@@ -2809,43 +2809,43 @@ bool KWTextFrameSet::hasSelection() const
return m_textobj->hasSelection();
}
-QString KWTextFrameSet::selectedText() const
+TQString KWTextFrameSet::selectedText() const
{
return m_textobj->selectedText();
}
-QString KWTextFrameSet::toPlainText() const
+TQString KWTextFrameSet::toPlainText() const
{
return m_textobj->textDocument()->plainText();
}
-void KWTextFrameSet::highlightPortion( KoTextParag * parag, int index, int length, KWCanvas * canvas, bool repaint, KDialogBase* dialog )
+void KWTextFrameSet::highlightPortion( KoTextParag * parag, int index, int length, KWCanvas * canvas, bool tqrepaint, KDialogBase* dialog )
{
Q_ASSERT( isVisible() );
Q_ASSERT( m_textobj->isVisible() );
- //kdDebug() << "highlighting in " << name() << " parag=" << parag->paragId() << " index=" << index << " repaint=" << repaint << endl;
- m_textobj->highlightPortion( parag, index, length, repaint );
- if ( repaint ) {
+ //kdDebug() << "highlighting in " << name() << " parag=" << parag->paragId() << " index=" << index << " tqrepaint=" << tqrepaint << endl;
+ m_textobj->highlightPortion( parag, index, length, tqrepaint );
+ if ( tqrepaint ) {
// Position the cursor
canvas->editTextFrameSet( this, parag, index );
// Ensure text is fully visible
- QRect expose = canvas->viewMode()->normalToView( paragRect( parag ) );
+ TQRect expose = canvas->viewMode()->normalToView( paragRect( parag ) );
canvas->ensureVisible( (expose.left()+expose.right()) / 2, // point = center of the rect
(expose.top()+expose.bottom()) / 2,
(expose.right()-expose.left()) / 2, // margin = half-width of the rect
(expose.bottom()-expose.top()) / 2);
if ( dialog ) {
//kdDebug() << k_funcinfo << " dialog=" << dialog << " avoiding rect=" << expose << endl;
- QRect globalRect( expose );
+ TQRect globalRect( expose );
globalRect.moveTopLeft( canvas->mapToGlobal( globalRect.topLeft() ) );
KDialog::avoidArea( dialog, globalRect );
}
}
}
-void KWTextFrameSet::removeHighlight( bool repaint )
+void KWTextFrameSet::removeHighlight( bool tqrepaint )
{
- m_textobj->removeHighlight( repaint );
+ m_textobj->removeHighlight( tqrepaint );
}
void KWTextFrameSet::clearUndoRedoInfo()
@@ -2900,10 +2900,10 @@ KCommand *KWTextFrameSet::setParagLayoutFormatCommand( KoParagLayout *newLayout,
return m_textobj->setParagLayoutFormatCommand(newLayout, flags, marginIndex);
}
-class KWFootNoteVarList : public QPtrList< KWFootNoteVariable >
+class KWFootNoteVarList : public TQPtrList< KWFootNoteVariable >
{
protected:
- virtual int compareItems(QPtrCollection::Item a, QPtrCollection::Item b)
+ virtual int compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b)
{
KWFootNoteVariable* vara = ((KWFootNoteVariable *)a);
KWFootNoteVariable* varb = ((KWFootNoteVariable *)b);
@@ -2920,10 +2920,10 @@ protected:
}
};
-void KWTextFrameSet::renumberFootNotes( bool repaint )
+void KWTextFrameSet::renumberFootNotes( bool tqrepaint )
{
KWFootNoteVarList lst;
- QPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
+ TQPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
for ( ; cit.current() ; ++cit )
{
KWFootNoteVariable *fnv = dynamic_cast<KWFootNoteVariable *>( cit.current() );
@@ -2936,10 +2936,10 @@ void KWTextFrameSet::renumberFootNotes( bool repaint )
short int footNoteNumDisplay = 1; // the number being displayed
short int endNoteNumDisplay = 1;
bool needRepaint = false;
- QPtrListIterator< KWFootNoteVariable > vit( lst );
+ TQPtrListIterator< KWFootNoteVariable > vit( lst );
//create a list with all manual footnotes numbers
- QValueList<int> addedNums;
+ TQValueList<int> addedNums;
for ( ; vit.current() ; ++vit )
{
KWFootNoteVariable* var = vit.current();
@@ -2966,7 +2966,7 @@ void KWTextFrameSet::renumberFootNotes( bool repaint )
}
if ( var->numberingType()==KWFootNoteVariable::Auto )
{
- if ( addedNums.contains( numDisplay ) != 0 ) // the automatic generated number should not be equal to a manual one
+ if ( addedNums.tqcontains( numDisplay ) != 0 ) // the automatic generated number should not be equal to a manual one
{
numDisplay++;
continue; //try with the next number
@@ -2982,39 +2982,39 @@ void KWTextFrameSet::renumberFootNotes( bool repaint )
{
if ( var->frameSet() ) //safety
{
- QString fsName = endNote ? i18n("Endnote %1") : i18n("Footnote %1");
+ TQString fsName = endNote ? i18n("Endnote %1") : i18n("Footnote %1");
if ( var->numberingType()== KWFootNoteVariable::Manual)
var->frameSet()->setName( m_doc->generateFramesetName(fsName));
else
- var->frameSet()->setName( fsName.arg( var->text() ) );
+ var->frameSet()->setName( fsName.tqarg( var->text() ) );
var->frameSet()->setCounterText( var->text() );
}
var->resize();
- var->paragraph()->invalidate(0);
+ var->paragraph()->tqinvalidate(0);
var->paragraph()->setChanged( true );
needRepaint = true;
}
++vit;
}
- if ( needRepaint && repaint )
+ if ( needRepaint && tqrepaint )
m_doc->slotRepaintChanged( this );
}
-KoTextDocCommand *KWTextFrameSet::deleteTextCommand( KoTextDocument *textdoc, int id, int index, const QMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const QValueList<KoParagLayout> & oldParagLayouts )
+KoTextDocCommand *KWTextFrameSet::deleteTextCommand( KoTextDocument *textdoc, int id, int index, const TQMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const TQValueList<KoParagLayout> & oldParagLayouts )
{
return new KWTextDeleteCommand( textdoc, id, index, str, customItemsMap, oldParagLayouts );
}
-QByteArray KWTextFrameSet::sortText(SortType type) const
+TQByteArray KWTextFrameSet::sortText(SortType type) const
{
const KoTextCursor c1 = textDocument()->selectionStartCursor(KoTextDocument::Standard );
const KoTextCursor c2 = textDocument()->selectionEndCursor( KoTextDocument::Standard );
if ( c1.parag() == c2.parag() )
- return QByteArray();
+ return TQByteArray();
else
{
// ( paragraph text -> paragraph ) map. Note that this sorts on the key automatically.
- QMap<QString, const KoTextParag*> sortMap;
+ TQMap<TQString, const KoTextParag*> sortMap;
sortMap.insert( c1.parag()->toString(0), c1.parag() );
const KoTextParag *p = c1.parag()->next();
@@ -3024,11 +3024,11 @@ QByteArray KWTextFrameSet::sortText(SortType type) const
}
sortMap.insert( c2.parag()->toString(0), c2.parag());
- typedef QValueList<const KoTextParag *> ParagList;
+ typedef TQValueList<const KoTextParag *> ParagList;
ParagList sortedParags = sortMap.values();
if ( type == KW_SORTDECREASE )
{
- // I could use an STL algorithm here, but only if Qt was compiled with STL support...
+ // I could use an STL algorithm here, but only if TQt was compiled with STL support...
ParagList newList;
for ( ParagList::const_iterator it = sortedParags.begin(),
end = sortedParags.end();
@@ -3041,15 +3041,15 @@ QByteArray KWTextFrameSet::sortText(SortType type) const
KWOasisSaver oasisSaver( m_doc );
oasisSaver.saveParagraphs( sortedParags );
if ( !oasisSaver.finish() )
- return QByteArray();
+ return TQByteArray();
return oasisSaver.data();
}
}
// This is used when loading (KWTextDocument::loadOasisFootnote)
// and when inserting from the GUI (KWTextFrameSetEdit::insertFootNote),
-// so don't add any 'repaint' or 'recalc' code here
-KWFootNoteFrameSet * KWTextFrameSet::insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const QString &manualString )
+// so don't add any 'tqrepaint' or 'recalc' code here
+KWFootNoteFrameSet * KWTextFrameSet::insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const TQString &manualString )
{
kdDebug() << "KWTextFrameSetEdit::insertFootNote " << endl;
KWDocument * doc = m_doc;
@@ -3074,7 +3074,7 @@ KWFootNoteFrameSet * KWTextFrameSet::insertFootNote( NoteType noteType, KWFootNo
KoVariable* KWTextFrameSet::variableUnderMouse( const KoPoint& dPoint )
{
- QPoint iPoint;
+ TQPoint iPoint;
if ( documentToInternal( dPoint, iPoint ) )
return textObject()->variableAtPoint( iPoint );
return 0;
@@ -3082,7 +3082,7 @@ KoVariable* KWTextFrameSet::variableUnderMouse( const KoPoint& dPoint )
KoLinkVariable* KWTextFrameSet::linkVariableUnderMouse( const KoPoint& dPoint )
{
- QPoint iPoint;
+ TQPoint iPoint;
if ( documentToInternal( dPoint, iPoint ) )
{
KoLinkVariable* linkVariable = dynamic_cast<KoLinkVariable *>( textObject()->variableAtPoint( iPoint ) );
@@ -3100,11 +3100,11 @@ KWTextFrameSetEdit::KWTextFrameSetEdit( KWTextFrameSet * fs, KWCanvas * canvas )
//kdDebug(32001) << "KWTextFrameSetEdit::KWTextFrameSetEdit " << fs->name() << endl;
KoTextView::setReadWrite( fs->kWordDocument()->isReadWrite() );
KoTextObject* textobj = fs->textObject();
- connect( textobj, SIGNAL( selectionChanged(bool) ), canvas, SIGNAL( selectionChanged(bool) ) );
- connect( fs, SIGNAL( frameDeleted(KWFrame *) ), this, SLOT( slotFrameDeleted(KWFrame *) ) );
- connect( textView(), SIGNAL( cut() ), SLOT( cut() ) );
- connect( textView(), SIGNAL( copy() ), SLOT( copy() ) );
- connect( textView(), SIGNAL( paste() ), SLOT( paste() ) );
+ connect( textobj, TQT_SIGNAL( selectionChanged(bool) ), canvas, TQT_SIGNAL( selectionChanged(bool) ) );
+ connect( fs, TQT_SIGNAL( frameDeleted(KWFrame *) ), this, TQT_SLOT( slotFrameDeleted(KWFrame *) ) );
+ connect( textView(), TQT_SIGNAL( cut() ), TQT_SLOT( cut() ) );
+ connect( textView(), TQT_SIGNAL( copy() ), TQT_SLOT( copy() ) );
+ connect( textView(), TQT_SIGNAL( paste() ), TQT_SLOT( paste() ) );
updateUI( true, true );
if( canvas->gui() && canvas->gui()->getHorzRuler())
@@ -3134,7 +3134,7 @@ KoTextViewIface* KWTextFrameSetEdit::dcopObject()
void KWTextFrameSetEdit::terminate(bool removeSelection)
{
- disconnect( textView()->textObject(), SIGNAL( selectionChanged(bool) ), m_canvas, SIGNAL( selectionChanged(bool) ) );
+ disconnect( textView()->textObject(), TQT_SIGNAL( selectionChanged(bool) ), m_canvas, TQT_SIGNAL( selectionChanged(bool) ) );
textView()->terminate(removeSelection);
}
@@ -3146,12 +3146,12 @@ void KWTextFrameSetEdit::slotFrameDeleted( KWFrame *frm )
void KWTextFrameSetEdit::paste()
{
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::tqclipboard()->data();
int provides = KWView::checkClipboard( data );
pasteData( data, provides, false );
}
-void KWTextFrameSetEdit::pasteData( QMimeSource* data, int provides, bool drop )
+void KWTextFrameSetEdit::pasteData( TQMimeSource* data, int provides, bool drop )
{
if ( provides & KWView::ProvidesOasis )
{
@@ -3161,9 +3161,9 @@ void KWTextFrameSetEdit::pasteData( QMimeSource* data, int provides, bool drop )
}
else if ( provides & KWView::ProvidesPlainText )
{
- // Note: QClipboard::text() seems to do a better job than encodedData( "text/plain" )
+ // Note: TQClipboard::text() seems to do a better job than tqencodedData( "text/plain" )
// In particular it handles charsets (in the mimetype).
- const QString text = QApplication::clipboard()->text();
+ const TQString text = TQApplication::tqclipboard()->text();
const bool removeSelected = !drop;
if ( !text.isEmpty() )
textObject()->pasteText( cursor(), text, currentFormat(), removeSelected );
@@ -3182,13 +3182,13 @@ void KWTextFrameSetEdit::pasteData( QMimeSource* data, int provides, bool drop )
}
}
-KCommand* KWTextFrameSetEdit::pasteOasisCommand( QMimeSource* data )
+KCommand* KWTextFrameSetEdit::pasteOasisCommand( TQMimeSource* data )
{
// Find which mimetype it was (could be oasis text, oasis presentation etc.)
- QCString returnedTypeMime = KoTextObject::providesOasis( data );
+ TQCString returnedTypeMime = KoTextObject::providesOasis( data );
if ( !returnedTypeMime.isEmpty() )
{
- QByteArray arr = data->encodedData( returnedTypeMime );
+ TQByteArray arr = data->tqencodedData( returnedTypeMime );
Q_ASSERT( !arr.isEmpty() );
if ( arr.size() )
return textFrameSet()->pasteOasis( cursor(), arr, true );
@@ -3207,13 +3207,13 @@ void KWTextFrameSetEdit::cut()
void KWTextFrameSetEdit::copy()
{
if ( textDocument()->hasSelection( KoTextDocument::Standard ) ) {
- QDragObject *drag = newDrag( 0 );
- QApplication::clipboard()->setData( drag );
+ TQDragObject *drag = newDrag( 0 );
+ TQApplication::tqclipboard()->setData( drag );
}
}
bool KWTextFrameSetEdit::doIgnoreDoubleSpace(KoTextParag * parag,
- int index,QChar ch )
+ int index,TQChar ch )
{
if( textFrameSet()->kWordDocument()->allowAutoFormat())
{
@@ -3228,7 +3228,7 @@ bool KWTextFrameSetEdit::doIgnoreDoubleSpace(KoTextParag * parag,
}
-void KWTextFrameSetEdit::doAutoFormat( KoTextCursor* cursor, KoTextParag *parag, int index, QChar ch )
+void KWTextFrameSetEdit::doAutoFormat( KoTextCursor* cursor, KoTextParag *parag, int index, TQChar ch )
{
if( textFrameSet()->kWordDocument()->allowAutoFormat() )
{
@@ -3260,7 +3260,7 @@ bool KWTextFrameSetEdit::doToolTipCompletion( KoTextCursor* cursor, KoTextParag
return false;
}
-void KWTextFrameSetEdit::showToolTipBox(KoTextParag *parag, int index, QWidget *widget, const QPoint &pos)
+void KWTextFrameSetEdit::showToolTipBox(KoTextParag *parag, int index, TQWidget *widget, const TQPoint &pos)
{
if( textFrameSet()->kWordDocument()->allowAutoFormat() )
{
@@ -3302,7 +3302,7 @@ void KWTextFrameSetEdit::startDrag()
{
textView()->dragStarted();
m_canvas->dragStarted();
- QDragObject *drag = newDrag( m_canvas->viewport() );
+ TQDragObject *drag = newDrag( m_canvas->viewport() );
if ( !frameSet()->kWordDocument()->isReadWrite() )
drag->dragCopy();
else {
@@ -3310,7 +3310,7 @@ void KWTextFrameSetEdit::startDrag()
if ( move )
{
#if 0
- if ( QDragObject::target() != m_canvas && QDragObject::target() != m_canvas->viewport() ) {
+ if ( TQDragObject::target() != m_canvas && TQDragObject::target() != m_canvas->viewport() ) {
//This is when dropping text _out_ of KWord. Since we have Move and Copy
//options (Copy being accessed by pressing CTRL), both are possible.
//But is that intuitive enough ? Doesn't the user expect a Copy in all cases ?
@@ -3323,10 +3323,10 @@ void KWTextFrameSetEdit::startDrag()
}
}
-QDragObject * KWTextFrameSetEdit::newDrag( QWidget * parent )
+TQDragObject * KWTextFrameSetEdit::newDrag( TQWidget * tqparent )
{
KWTextFrameSet* fs = textFrameSet();
- return fs->kWordDocument()->dragSelected( parent, fs );
+ return fs->kWordDocument()->dragSelected( tqparent, fs );
}
void KWTextFrameSetEdit::ensureCursorVisible()
@@ -3352,18 +3352,18 @@ void KWTextFrameSetEdit::ensureCursorVisible()
KoPoint hintDPoint;
if ( m_currentFrame )
hintDPoint = m_currentFrame->topLeft();
- KWFrame * theFrame = textFrameSet()->internalToDocumentWithHint( QPoint(x, y), pt, hintDPoint );
+ KWFrame * theFrame = textFrameSet()->internalToDocumentWithHint( TQPoint(x, y), pt, hintDPoint );
//kdDebug() << "KWTextFrameSetEdit::ensureCursorVisible frame=" << theFrame << " m_currentFrame=" << m_currentFrame << endl;
if ( theFrame && m_currentFrame != theFrame )
{
m_currentFrame = theFrame;
m_canvas->gui()->getView()->updatePageInfo();
}
- QPoint cursorPos = textFrameSet()->kWordDocument()->zoomPoint( pt );
+ TQPoint cursorPos = textFrameSet()->kWordDocument()->zoomPoint( pt );
cursorPos = m_canvas->viewMode()->normalToView( cursorPos );
- areaLeft = textFrameSet()->kWordDocument()->layoutUnitToPixelX( areaLeft ) + 1;
- areaRight = textFrameSet()->kWordDocument()->layoutUnitToPixelX( areaRight ) + 1;
- cursorHeight = textFrameSet()->kWordDocument()->layoutUnitToPixelY( cursorHeight );
+ areaLeft = textFrameSet()->kWordDocument()->tqlayoutUnitToPixelX( areaLeft ) + 1;
+ areaRight = textFrameSet()->kWordDocument()->tqlayoutUnitToPixelX( areaRight ) + 1;
+ cursorHeight = textFrameSet()->kWordDocument()->tqlayoutUnitToPixelY( cursorHeight );
//kdDebug() << "KWTextFrameSetEdit::ensureCursorVisible pt=" << pt << " cursorPos=" << cursorPos
// << " areaLeft=" << areaLeft << " areaRight=" << areaRight << " y=" << y << endl;
m_canvas->ensureVisible( cursorPos.x() - areaLeft, cursorPos.y() + cursorHeight / 2, areaLeft + areaRight, cursorHeight / 2 + 2 );
@@ -3396,7 +3396,7 @@ bool KWTextFrameSetEdit::enterCustomItem( KoTextCustomItem* customItem, bool fro
// A FormulaFrameSetEdit looks a little different from
// a FormulaFrameSet. (Colors)
static_cast<KWFormulaFrameSet*>( frameSet )->setChanged();
- canvas->repaintChanged( frameSet, true );
+ canvas->tqrepaintChanged( frameSet, true );
}
return true;
}
@@ -3404,7 +3404,7 @@ bool KWTextFrameSetEdit::enterCustomItem( KoTextCustomItem* customItem, bool fro
return false;
}
-void KWTextFrameSetEdit::keyPressEvent( QKeyEvent* e )
+void KWTextFrameSetEdit::keyPressEvent( TQKeyEvent* e )
{
// Handle moving into inline frames (e.g. formula frames).
if ( !( e->state() & ControlButton ) && !( e->state() & ShiftButton ) )
@@ -3452,31 +3452,31 @@ void KWTextFrameSetEdit::keyPressEvent( QKeyEvent* e )
}
}
// Calculate position of tooltip for autocompletion
- QPoint pos = textFrameSet()->cursorPos( cursor(), m_canvas, m_currentFrame );
+ TQPoint pos = textFrameSet()->cursorPos( cursor(), m_canvas, m_currentFrame );
textView()->handleKeyPressEvent( e, m_canvas, pos );
}
-void KWTextFrameSetEdit::keyReleaseEvent( QKeyEvent* e )
+void KWTextFrameSetEdit::keyReleaseEvent( TQKeyEvent* e )
{
textView()->handleKeyReleaseEvent( e );
}
-void KWTextFrameSetEdit::imStartEvent( QIMEvent* e )
+void KWTextFrameSetEdit::imStartEvent( TQIMEvent* e )
{
textView()->handleImStartEvent( e );
}
-void KWTextFrameSetEdit::imComposeEvent( QIMEvent* e )
+void KWTextFrameSetEdit::imComposeEvent( TQIMEvent* e )
{
textView()->handleImComposeEvent( e );
}
-void KWTextFrameSetEdit::imEndEvent( QIMEvent* e )
+void KWTextFrameSetEdit::imEndEvent( TQIMEvent* e )
{
textView()->handleImEndEvent( e );
}
-void KWTextFrameSetEdit::mousePressEvent( QMouseEvent *e, const QPoint &, const KoPoint & dPoint )
+void KWTextFrameSetEdit::mousePressEvent( TQMouseEvent *e, const TQPoint &, const KoPoint & dPoint )
{
if ( dPoint.x() < 0 || dPoint.y() < 0 )
return; // Ignore clicks completely outside of the page (e.g. in the gray area, or ruler)
@@ -3485,7 +3485,7 @@ void KWTextFrameSetEdit::mousePressEvent( QMouseEvent *e, const QPoint &, const
if ( m_currentFrame )
hideCursor(); // Need to do that with the old m_currentFrame
- QPoint iPoint;
+ TQPoint iPoint;
KWTextFrameSet::RelativePosition relPos;
KWFrame * theFrame = textFrameSet()->documentToInternalMouseSelection( dPoint, iPoint, relPos, m_canvas->viewMode() );
if ( theFrame && m_currentFrame != theFrame )
@@ -3509,7 +3509,7 @@ void KWTextFrameSetEdit::mousePressEvent( QMouseEvent *e, const QPoint &, const
}
// else mightStartDrag = FALSE; necessary?
- if ( e->button() != LeftButton )
+ if ( e->button() != Qt::LeftButton )
return;
KoVariable* var = variable();
if ( var )
@@ -3523,14 +3523,14 @@ void KWTextFrameSetEdit::mousePressEvent( QMouseEvent *e, const QPoint &, const
}
}
-void KWTextFrameSetEdit::mouseMoveEvent( QMouseEvent * e, const QPoint & nPoint, const KoPoint & )
+void KWTextFrameSetEdit::mouseMoveEvent( TQMouseEvent * e, const TQPoint & nPoint, const KoPoint & )
{
if ( textView()->maybeStartDrag( e ) )
return;
if ( nPoint.x() < 0 || nPoint.y() < 0 )
return; // Ignore clicks completely outside of the page (e.g. in the gray area, or ruler)
- QPoint iPoint;
+ TQPoint iPoint;
KoPoint dPoint = frameSet()->kWordDocument()->unzoomPoint( nPoint );
KWTextFrameSet::RelativePosition relPos;
if ( nPoint.y() > 0 && textFrameSet()->documentToInternalMouseSelection( dPoint, iPoint, relPos , m_canvas->viewMode()) )
@@ -3549,7 +3549,7 @@ bool KWTextFrameSetEdit::openLink( KoLinkVariable* variable )
KWDocument* doc = fs->kWordDocument();
if ( doc->variableCollection()->variableSetting()->displayLink() ) {
- const QString url = variable->url();
+ const TQString url = variable->url();
if( url.startsWith("bkm://") )
{
const KoTextBookmark* bookmark = doc->bookmarkByName(url.mid(6) );
@@ -3573,17 +3573,17 @@ void KWTextFrameSetEdit::openLink()
openLink( v );
}
-void KWTextFrameSetEdit::mouseReleaseEvent( QMouseEvent *, const QPoint &, const KoPoint & )
+void KWTextFrameSetEdit::mouseReleaseEvent( TQMouseEvent *, const TQPoint &, const KoPoint & )
{
textView()->handleMouseReleaseEvent();
}
-void KWTextFrameSetEdit::mouseDoubleClickEvent( QMouseEvent *e, const QPoint &, const KoPoint & )
+void KWTextFrameSetEdit::mouseDoubleClickEvent( TQMouseEvent *e, const TQPoint &, const KoPoint & )
{
- textView()->handleMouseDoubleClickEvent( e, QPoint() /* Currently unused */ );
+ textView()->handleMouseDoubleClickEvent( e, TQPoint() /* Currently unused */ );
}
-void KWTextFrameSetEdit::dragEnterEvent( QDragEnterEvent * e )
+void KWTextFrameSetEdit::dragEnterEvent( TQDragEnterEvent * e )
{
int provides = KWView::checkClipboard( e );
if ( !frameSet()->kWordDocument()->isReadWrite() || provides == 0 )
@@ -3594,7 +3594,7 @@ void KWTextFrameSetEdit::dragEnterEvent( QDragEnterEvent * e )
e->acceptAction();
}
-void KWTextFrameSetEdit::dragMoveEvent( QDragMoveEvent * e, const QPoint &nPoint, const KoPoint & )
+void KWTextFrameSetEdit::dragMoveEvent( TQDragMoveEvent * e, const TQPoint &nPoint, const KoPoint & )
{
int provides = KWView::checkClipboard( e );
if ( !frameSet()->kWordDocument()->isReadWrite() || provides == 0 )
@@ -3606,7 +3606,7 @@ void KWTextFrameSetEdit::dragMoveEvent( QDragMoveEvent * e, const QPoint &nPoint
// wants the dropped image to be inline or absolute positioned.
if ( provides & ( KWView::ProvidesOasis | KWView::ProvidesPlainText | KWView::ProvidesFormula ) )
{
- QPoint iPoint;
+ TQPoint iPoint;
KoPoint dPoint = frameSet()->kWordDocument()->unzoomPoint( nPoint );
if ( textFrameSet()->documentToInternal( dPoint, iPoint ) )
{
@@ -3618,18 +3618,18 @@ void KWTextFrameSetEdit::dragMoveEvent( QDragMoveEvent * e, const QPoint &nPoint
e->acceptAction();
}
-void KWTextFrameSetEdit::dragLeaveEvent( QDragLeaveEvent * )
+void KWTextFrameSetEdit::dragLeaveEvent( TQDragLeaveEvent * )
{
}
-void KWTextFrameSetEdit::dropEvent( QDropEvent * e, const QPoint & nPoint, const KoPoint &, KWView* view )
+void KWTextFrameSetEdit::dropEvent( TQDropEvent * e, const TQPoint & nPoint, const KoPoint &, KWView* view )
{
int provides = KWView::checkClipboard( e );
if ( frameSet()->kWordDocument()->isReadWrite() && provides )
{
e->acceptAction();
KoTextCursor dropCursor( textDocument() );
- QPoint dropPoint;
+ TQPoint dropPoint;
KoPoint dPoint = frameSet()->kWordDocument()->unzoomPoint( nPoint );
if ( !textFrameSet()->documentToInternal( dPoint, dropPoint ) )
return; // Don't know where to paste
@@ -3639,7 +3639,7 @@ void KWTextFrameSetEdit::dropEvent( QDropEvent * e, const QPoint & nPoint, const
if ( ( e->source() == m_canvas ||
e->source() == m_canvas->viewport() ) &&
- e->action() == QDropEvent::Move &&
+ e->action() == TQDropEvent::Move &&
// this is the indicator that the source and dest text objects are the same
textDocument()->hasSelection( KoTextDocument::Standard ) ) {
@@ -3652,9 +3652,9 @@ void KWTextFrameSetEdit::dropEvent( QDropEvent * e, const QPoint & nPoint, const
cmd = pasteOasisCommand( e );
if ( cmd )
macroCmd->addCommand(cmd);
- //relayout textframeset after a dnd otherwise autoextend
- //frameset is not re-layouted
- textFrameSet()->layout();
+ //retqlayout textframeset after a dnd otherwise autoextend
+ //frameset is not re-tqlayouted
+ textFrameSet()->tqlayout();
frameSet()->kWordDocument()->addCommand( macroCmd );
}
return;
@@ -3702,7 +3702,7 @@ void KWTextFrameSetEdit::drawCursor( bool visible )
if ( m_canvas->viewMode()->hasFrames() && !m_currentFrame )
return;
- QPainter p( m_canvas->viewport() );
+ TQPainter p( m_canvas->viewport() );
p.translate( -m_canvas->contentsX(), -m_canvas->contentsY() );
p.setBrushOrigin( -m_canvas->contentsX(), -m_canvas->contentsY() );
@@ -3711,7 +3711,7 @@ void KWTextFrameSetEdit::drawCursor( bool visible )
bool KWTextFrameSetEdit::pgUpKeyPressed()
{
- QRect crect( m_canvas->contentsX(), m_canvas->contentsY(),
+ TQRect crect( m_canvas->contentsX(), m_canvas->contentsY(),
m_canvas->visibleWidth(), m_canvas->visibleHeight() );
crect = m_canvas->viewMode()->viewToNormal( crect );
@@ -3741,7 +3741,7 @@ bool KWTextFrameSetEdit::pgUpKeyPressed()
bool KWTextFrameSetEdit::pgDownKeyPressed()
{
- QRect crect( m_canvas->contentsX(), m_canvas->contentsY(),
+ TQRect crect( m_canvas->contentsX(), m_canvas->contentsY(),
m_canvas->visibleWidth(), m_canvas->visibleHeight() );
crect = m_canvas->viewMode()->viewToNormal( crect );
// Go down of 90% of crect.height()
@@ -3777,7 +3777,7 @@ void KWTextFrameSetEdit::ctrlPgUpKeyPressed()
{
if ( m_currentFrame )
{
- QPoint iPoint = textFrameSet()->moveToPage( m_currentFrame->pageNumber(), -1 );
+ TQPoint iPoint = textFrameSet()->moveToPage( m_currentFrame->pageNumber(), -1 );
if ( !iPoint.isNull() )
placeCursor( iPoint );
}
@@ -3787,7 +3787,7 @@ void KWTextFrameSetEdit::ctrlPgDownKeyPressed()
{
if ( m_currentFrame )
{
- QPoint iPoint = textFrameSet()->moveToPage( m_currentFrame->pageNumber(), +1 );
+ TQPoint iPoint = textFrameSet()->moveToPage( m_currentFrame->pageNumber(), +1 );
if ( !iPoint.isNull() )
placeCursor( iPoint );
}
@@ -3799,7 +3799,7 @@ void KWTextFrameSetEdit::setCursor( KoTextParag* parag, int index )
cursor()->setIndex( index );
}
-void KWTextFrameSetEdit::insertExpression(const QString &_c)
+void KWTextFrameSetEdit::insertExpression(const TQString &_c)
{
if(textObject()->hasSelection() )
frameSet()->kWordDocument()->addCommand(textObject()->replaceSelectionCommand(
@@ -3808,11 +3808,11 @@ void KWTextFrameSetEdit::insertExpression(const QString &_c)
textObject()->insert( cursor(), currentFormat(), _c, i18n("Insert Expression") );
}
-void KWTextFrameSetEdit::insertFloatingFrameSet( KWFrameSet * fs, const QString & commandName )
+void KWTextFrameSetEdit::insertFloatingFrameSet( KWFrameSet * fs, const TQString & commandName )
{
textObject()->clearUndoRedoInfo();
CustomItemsMap customItemsMap;
- QString placeHolders;
+ TQString placeHolders;
// TODO support for multiple floating items (like multiple-page tables)
int frameNumber = 0;
int index = 0;
@@ -3822,7 +3822,7 @@ void KWTextFrameSetEdit::insertFloatingFrameSet( KWFrameSet * fs, const QString
if ( frameNumber == 0 && anchor->ownLine() && cursor()->index() > 0 ) // enforce start of line - currently unused
{
kdDebug() << "ownline -> prepending \\n" << endl;
- placeHolders += QChar('\n');
+ placeHolders += TQChar('\n');
index++;
insertFlags |= KoTextObject::CheckNewLine;
}
@@ -3835,14 +3835,14 @@ void KWTextFrameSetEdit::insertFloatingFrameSet( KWFrameSet * fs, const QString
customItemsMap );
}
-void KWTextFrameSetEdit::insertLink(const QString &_linkName, const QString & hrefName)
+void KWTextFrameSetEdit::insertLink(const TQString &_linkName, const TQString & hrefName)
{
KWDocument * doc = frameSet()->kWordDocument();
KoVariable * var = new KoLinkVariable( textFrameSet()->textDocument(), _linkName, hrefName, doc->variableFormatCollection()->format( "STRING" ), doc->variableCollection() );
insertVariable( var );
}
-void KWTextFrameSetEdit::insertComment(const QString &_comment)
+void KWTextFrameSetEdit::insertComment(const TQString &_comment)
{
KWDocument * doc = frameSet()->kWordDocument();
KoVariable * var = new KoNoteVariable( textFrameSet()->textDocument(), _comment, doc->variableFormatCollection()->format( "STRING" ), doc->variableCollection() );
@@ -3850,14 +3850,14 @@ void KWTextFrameSetEdit::insertComment(const QString &_comment)
}
-void KWTextFrameSetEdit::insertCustomVariable( const QString &name)
+void KWTextFrameSetEdit::insertCustomVariable( const TQString &name)
{
KWDocument * doc = frameSet()->kWordDocument();
KoVariable * var = new KoCustomVariable( textFrameSet()->textDocument(), name, doc->variableFormatCollection()->format( "STRING" ), doc->variableCollection());
insertVariable( var );
}
-void KWTextFrameSetEdit::insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const QString &manualString )
+void KWTextFrameSetEdit::insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const TQString &manualString )
{
KWFootNoteFrameSet *fs = textFrameSet()->insertFootNote( noteType, numType, manualString );
KWFootNoteVariable * var = fs->footNoteVariable();
@@ -3893,7 +3893,7 @@ void KWTextFrameSetEdit::insertVariable( int type, int subtype )
if ( type == VT_CUSTOM )
{
KoCustomVarDialog dia( m_canvas );
- if ( dia.exec() == QDialog::Accepted )
+ if ( dia.exec() == TQDialog::Accepted )
{
KoCustomVariable *v = new KoCustomVariable( textFrameSet()->textDocument(), dia.name(), doc->variableFormatCollection()->format( "STRING" ),doc->variableCollection() );
v->setValue( dia.value() );
@@ -3904,7 +3904,7 @@ void KWTextFrameSetEdit::insertVariable( int type, int subtype )
else if ( type == VT_MAILMERGE )
{
KWMailMergeVariableInsertDia dia( m_canvas, doc->mailMergeDataBase() );
- if ( dia.exec() == QDialog::Accepted )
+ if ( dia.exec() == TQDialog::Accepted )
{
var = new KWMailMergeVariable( textFrameSet()->textDocument(), dia.getName(), doc->variableFormatCollection()->format( "STRING" ),doc->variableCollection(),doc );
}
@@ -3984,9 +3984,9 @@ void KWTextFrameSetEdit::updateUI( bool updateFormat, bool force )
// Paragraph settings
KWTextParag * parag = static_cast<KWTextParag *>(cursor()->parag());
- if ( m_paragLayout.alignment != parag->resolveAlignment() || force ) {
- m_paragLayout.alignment = parag->resolveAlignment();
- m_canvas->gui()->getView()->showAlign( m_paragLayout.alignment );
+ if ( m_paragLayout.tqalignment != parag->resolveAlignment() || force ) {
+ m_paragLayout.tqalignment = parag->resolveAlignment();
+ m_canvas->gui()->getView()->showAlign( m_paragLayout.tqalignment );
}
// Counter
@@ -4023,22 +4023,22 @@ void KWTextFrameSetEdit::updateUI( bool updateFormat, bool force )
m_canvas->gui()->getView()->showStyle( m_paragLayout.style->name() );
}
- if( m_paragLayout.margins[QStyleSheetItem::MarginLeft] != parag->margin(QStyleSheetItem::MarginLeft)
- || m_paragLayout.margins[QStyleSheetItem::MarginFirstLine] != parag->margin(QStyleSheetItem::MarginFirstLine)
- || m_paragLayout.margins[QStyleSheetItem::MarginRight] != parag->margin(QStyleSheetItem::MarginRight)
+ if( m_paragLayout.margins[TQStyleSheetItem::MarginLeft] != parag->margin(TQStyleSheetItem::MarginLeft)
+ || m_paragLayout.margins[TQStyleSheetItem::MarginFirstLine] != parag->margin(TQStyleSheetItem::MarginFirstLine)
+ || m_paragLayout.margins[TQStyleSheetItem::MarginRight] != parag->margin(TQStyleSheetItem::MarginRight)
|| parag->string()->isRightToLeft() != m_rtl
|| force )
{
- m_paragLayout.margins[QStyleSheetItem::MarginFirstLine] = parag->margin(QStyleSheetItem::MarginFirstLine);
- m_paragLayout.margins[QStyleSheetItem::MarginLeft] = parag->margin(QStyleSheetItem::MarginLeft);
- m_paragLayout.margins[QStyleSheetItem::MarginRight] = parag->margin(QStyleSheetItem::MarginRight);
+ m_paragLayout.margins[TQStyleSheetItem::MarginFirstLine] = parag->margin(TQStyleSheetItem::MarginFirstLine);
+ m_paragLayout.margins[TQStyleSheetItem::MarginLeft] = parag->margin(TQStyleSheetItem::MarginLeft);
+ m_paragLayout.margins[TQStyleSheetItem::MarginRight] = parag->margin(TQStyleSheetItem::MarginRight);
if ( m_rtl != parag->string()->isRightToLeft() && parag->counter() )
{
- parag->counter()->invalidate();
- parag->setChanged( true ); // repaint
+ parag->counter()->tqinvalidate();
+ parag->setChanged( true ); // tqrepaint
}
m_rtl = parag->string()->isRightToLeft();
- m_canvas->gui()->getView()->showRulerIndent( m_paragLayout.margins[QStyleSheetItem::MarginLeft], m_paragLayout.margins[QStyleSheetItem::MarginFirstLine], m_paragLayout.margins[QStyleSheetItem::MarginRight], m_rtl );
+ m_canvas->gui()->getView()->showRulerIndent( m_paragLayout.margins[TQStyleSheetItem::MarginLeft], m_paragLayout.margins[TQStyleSheetItem::MarginFirstLine], m_paragLayout.margins[TQStyleSheetItem::MarginRight], m_rtl );
}
if( m_paragLayout.tabList() != parag->tabList() || force)
{
@@ -4062,19 +4062,19 @@ void KWTextFrameSetEdit::showFormat( KoTextFormat *format )
m_canvas->gui()->getView()->showFormat( *format );
}
-QPoint KWTextFrameSet::cursorPos( KoTextCursor *cursor, KWCanvas* canvas, KWFrame* currentFrame )
+TQPoint KWTextFrameSet::cursorPos( KoTextCursor *cursor, KWCanvas* canvas, KWFrame* currentFrame )
{
KWViewMode *viewMode = canvas->viewMode();
KoTextParag* parag = cursor->parag();
- const QPoint topLeft = parag->rect().topLeft(); // in QRT coords
+ const TQPoint topLeft = parag->rect().topLeft(); // in TQRT coords
int lineY;
parag->lineHeightOfChar( cursor->index(), 0, &lineY );
// iPoint is the topright corner of the current character
- QPoint iPoint( topLeft.x() + cursor->x() + parag->at( cursor->index() )->width, topLeft.y() + lineY );
+ TQPoint iPoint( topLeft.x() + cursor->x() + parag->at( cursor->index() )->width, topLeft.y() + lineY );
KoPoint dPoint;
- QPoint vPoint;
+ TQPoint vPoint;
KoPoint hintDPoint = currentFrame ? currentFrame->innerRect().topLeft() : KoPoint();
if ( internalToDocumentWithHint( iPoint, dPoint, hintDPoint ) )
{
@@ -4130,7 +4130,7 @@ void KWFootNoteFrameSet::setFootNoteVariable( KWFootNoteVariable* var )
m_footNoteVar = var;
}
-void KWFootNoteFrameSet::setCounterText( const QString& text )
+void KWFootNoteFrameSet::setCounterText( const TQString& text )
{
KoTextParag* parag = textDocument()->firstParag();
Q_ASSERT( parag );
@@ -4138,7 +4138,7 @@ void KWFootNoteFrameSet::setCounterText( const QString& text )
KoParagCounter counter;
counter.setNumbering( KoParagCounter::NUM_FOOTNOTE );
counter.setPrefix( text );
- counter.setSuffix( QString::null );
+ counter.setSuffix( TQString() );
parag->setCounter( counter );
}
}