diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:31 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:31 -0600 |
commit | c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch) | |
tree | 1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /kword/KWTextFrameSet.cpp | |
parent | 94844816550ad672ccfcdc25659c625546239998 (diff) | |
download | koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'kword/KWTextFrameSet.cpp')
-rw-r--r-- | kword/KWTextFrameSet.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kword/KWTextFrameSet.cpp b/kword/KWTextFrameSet.cpp index cf0d8943..43a1de5a 100644 --- a/kword/KWTextFrameSet.cpp +++ b/kword/KWTextFrameSet.cpp @@ -59,7 +59,7 @@ #include <kmessagebox.h> #include <kdebug.h> -#include <clipboard.h> +#include <tqclipboard.h> #include <tqdragobject.h> #include <tqcursor.h> #include <tqfile.h> @@ -396,7 +396,7 @@ KWFrame * KWTextFrameSet::internalToDocumentWithHint( const TQPoint &iPoint, KoP 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.contains( iPoint ) ) // both r and p are in tqlayout units (aka internal) { dPoint = internalToDocumentKnowingFrame( iPoint, theFrame ); #ifdef DEBUG_ITD @@ -615,7 +615,7 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, TQPainter *painter, c var->resize(); 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 ); } } @@ -757,7 +757,7 @@ void KWTextFrameSet::drawCursor( TQPainter *p, KoTextCursor *cursor, bool cursor #endif p->save(); - TQColorGroup cg = TQApplication::palette().active(); + TQColorGroup cg = TQApplication::tqpalette().active(); if ( hasFrames ) { @@ -824,18 +824,18 @@ void KWTextFrameSet::drawCursor( TQPainter *p, KoTextCursor *cursor, bool cursor m_currentDrawnFrame = 0L; } -void KWTextFrameSet::layout() +void KWTextFrameSet::tqlayout() { - invalidate(); + tqinvalidate(); // Get the thing going though, repainting 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() @@ -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. @@ -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; @@ -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 ); @@ -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); + 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(); } @@ -2770,7 +2770,7 @@ bool KWTextFrameSet::minMaxInternalOnPage( int pageNum, int& topLU, int& bottomL 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; @@ -2819,13 +2819,13 @@ 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 @@ -2843,9 +2843,9 @@ void KWTextFrameSet::highlightPortion( KoTextParag * parag, int index, int lengt } } -void KWTextFrameSet::removeHighlight( bool repaint ) +void KWTextFrameSet::removeHighlight( bool tqrepaint ) { - m_textobj->removeHighlight( repaint ); + m_textobj->removeHighlight( tqrepaint ); } void KWTextFrameSet::clearUndoRedoInfo() @@ -2920,7 +2920,7 @@ protected: } }; -void KWTextFrameSet::renumberFootNotes( bool repaint ) +void KWTextFrameSet::renumberFootNotes( bool tqrepaint ) { KWFootNoteVarList lst; TQPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() ); @@ -2986,17 +2986,17 @@ void KWTextFrameSet::renumberFootNotes( bool repaint ) 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 ); } @@ -3048,7 +3048,7 @@ TQByteArray KWTextFrameSet::sortText(SortType type) const // 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 +// 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; @@ -3146,7 +3146,7 @@ void KWTextFrameSetEdit::slotFrameDeleted( KWFrame *frm ) void KWTextFrameSetEdit::paste() { - TQMimeSource *data = TQApplication::clipboard()->data(); + TQMimeSource *data = TQApplication::tqclipboard()->data(); int provides = KWView::checkClipboard( data ); pasteData( data, provides, false ); } @@ -3161,9 +3161,9 @@ void KWTextFrameSetEdit::pasteData( TQMimeSource* data, int provides, bool drop } else if ( provides & KWView::ProvidesPlainText ) { - // Note: TQClipboard::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 TQString text = TQApplication::clipboard()->text(); + const TQString text = TQApplication::tqclipboard()->text(); const bool removeSelected = !drop; if ( !text.isEmpty() ) textObject()->pasteText( cursor(), text, currentFormat(), removeSelected ); @@ -3188,7 +3188,7 @@ KCommand* KWTextFrameSetEdit::pasteOasisCommand( TQMimeSource* data ) TQCString returnedTypeMime = KoTextObject::providesOasis( data ); if ( !returnedTypeMime.isEmpty() ) { - TQByteArray arr = data->encodedData( returnedTypeMime ); + TQByteArray arr = data->tqencodedData( returnedTypeMime ); Q_ASSERT( !arr.isEmpty() ); if ( arr.size() ) return textFrameSet()->pasteOasis( cursor(), arr, true ); @@ -3208,7 +3208,7 @@ void KWTextFrameSetEdit::copy() { if ( textDocument()->hasSelection( KoTextDocument::Standard ) ) { TQDragObject *drag = newDrag( 0 ); - TQApplication::clipboard()->setData( drag ); + TQApplication::tqclipboard()->setData( drag ); } } @@ -3652,9 +3652,9 @@ void KWTextFrameSetEdit::dropEvent( TQDropEvent * e, const TQPoint & nPoint, con cmd = pasteOasisCommand( e ); if ( cmd ) macroCmd->addCommand(cmd); - //relayout textframeset after a dnd otherwise autoextend + //retqlayout textframeset after a dnd otherwise autoextend //frameset is not re-layouted - textFrameSet()->layout(); + textFrameSet()->tqlayout(); frameSet()->kWordDocument()->addCommand( macroCmd ); } return; @@ -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 @@ -4034,8 +4034,8 @@ void KWTextFrameSetEdit::updateUI( bool updateFormat, bool force ) 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[TQStyleSheetItem::MarginLeft], m_paragLayout.margins[TQStyleSheetItem::MarginFirstLine], m_paragLayout.margins[TQStyleSheetItem::MarginRight], m_rtl ); |