summaryrefslogtreecommitdiffstats
path: root/kword/KWTextFrameSet.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
commit94844816550ad672ccfcdc25659c625546239998 (patch)
treee35fc60fd736c645d59f6408af032774ad8023d3 /kword/KWTextFrameSet.cpp
parent2a811c38c74c03648ecf857e566c44483cbad706 (diff)
downloadkoffice-94844816550ad672ccfcdc25659c625546239998.tar.gz
koffice-94844816550ad672ccfcdc25659c625546239998.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kword/KWTextFrameSet.cpp')
-rw-r--r--kword/KWTextFrameSet.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/kword/KWTextFrameSet.cpp b/kword/KWTextFrameSet.cpp
index 43a1de5a..cf0d8943 100644
--- a/kword/KWTextFrameSet.cpp
+++ b/kword/KWTextFrameSet.cpp
@@ -59,7 +59,7 @@
#include <kmessagebox.h>
#include <kdebug.h>
-#include <tqclipboard.h>
+#include <clipboard.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 tqlayout units (aka internal)
+ if ( r.contains( iPoint ) ) // both r and p are in layout 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()->tqinvalidate( 0 ); // size has changed -> need reformatting !
+ var->paragraph()->invalidate( 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::tqpalette().active();
+ TQColorGroup cg = TQApplication::palette().active();
if ( hasFrames )
{
@@ -824,18 +824,18 @@ void KWTextFrameSet::drawCursor( TQPainter *p, KoTextCursor *cursor, bool cursor
m_currentDrawnFrame = 0L;
}
-void KWTextFrameSet::tqlayout()
+void KWTextFrameSet::layout()
{
- tqinvalidate();
+ invalidate();
// Get the thing going though, repainting doesn't call formatMore
m_textobj->formatMore( 2 );
}
-void KWTextFrameSet::tqinvalidate()
+void KWTextFrameSet::invalidate()
{
- //kdDebug() << "KWTextFrameSet::tqinvalidate " << name() << endl;
+ //kdDebug() << "KWTextFrameSet::invalidate " << name() << endl;
m_textobj->setLastFormattedParag( textDocument()->firstParag() );
- textDocument()->tqinvalidate(); // lazy tqlayout, real update follows upon next tqrepaint
+ textDocument()->invalidate(); // lazy layout, real update follows upon next repaint
}
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 tqlayout units
+ // Everything from there is in layout 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 tqlayout unit pixels
+ int difference = ( bottom + 2 ) - availHeight; // in layout 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->tqinvalidate();
+ ////m_doc->invalidate();
// 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->tqinvalidate( 0 );
+ lastFormatted->invalidate( 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 tqlayout() (frameChanged calls it)
+ // Warning, can't call layout() (frameChanged calls it)
// from here, since it calls formatMore() !
if ( invalidateLayout )
- m_doc->tqinvalidate(this);
+ m_doc->invalidate(this);
- // Can't tqrepaint directly, we might be in a paint event already
+ // Can't repaint 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 tqlayout units
+ // Convert to layout 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 tqrepaint, KDialogBase* dialog )
+void KWTextFrameSet::highlightPortion( KoTextParag * parag, int index, int length, KWCanvas * canvas, bool repaint, KDialogBase* dialog )
{
Q_ASSERT( isVisible() );
Q_ASSERT( m_textobj->isVisible() );
- //kdDebug() << "highlighting in " << name() << " parag=" << parag->paragId() << " index=" << index << " tqrepaint=" << tqrepaint << endl;
- m_textobj->highlightPortion( parag, index, length, tqrepaint );
- if ( tqrepaint ) {
+ //kdDebug() << "highlighting in " << name() << " parag=" << parag->paragId() << " index=" << index << " repaint=" << repaint << endl;
+ m_textobj->highlightPortion( parag, index, length, repaint );
+ if ( repaint ) {
// 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 tqrepaint )
+void KWTextFrameSet::removeHighlight( bool repaint )
{
- m_textobj->removeHighlight( tqrepaint );
+ m_textobj->removeHighlight( repaint );
}
void KWTextFrameSet::clearUndoRedoInfo()
@@ -2920,7 +2920,7 @@ protected:
}
};
-void KWTextFrameSet::renumberFootNotes( bool tqrepaint )
+void KWTextFrameSet::renumberFootNotes( bool repaint )
{
KWFootNoteVarList lst;
TQPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
@@ -2986,17 +2986,17 @@ void KWTextFrameSet::renumberFootNotes( bool tqrepaint )
if ( var->numberingType()== KWFootNoteVariable::Manual)
var->frameSet()->setName( m_doc->generateFramesetName(fsName));
else
- var->frameSet()->setName( fsName.tqarg( var->text() ) );
+ var->frameSet()->setName( fsName.arg( var->text() ) );
var->frameSet()->setCounterText( var->text() );
}
var->resize();
- var->paragraph()->tqinvalidate(0);
+ var->paragraph()->invalidate(0);
var->paragraph()->setChanged( true );
needRepaint = true;
}
++vit;
}
- if ( needRepaint && tqrepaint )
+ if ( needRepaint && repaint )
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 'tqrepaint' or 'recalc' code here
+// so don't add any 'repaint' 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::tqclipboard()->data();
+ TQMimeSource *data = TQApplication::clipboard()->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 tqencodedData( "text/plain" )
+ // Note: TQClipboard::text() seems to do a better job than encodedData( "text/plain" )
// In particular it handles charsets (in the mimetype).
- const TQString text = TQApplication::tqclipboard()->text();
+ const TQString text = TQApplication::clipboard()->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->tqencodedData( returnedTypeMime );
+ TQByteArray arr = data->encodedData( 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::tqclipboard()->setData( drag );
+ TQApplication::clipboard()->setData( drag );
}
}
@@ -3652,9 +3652,9 @@ void KWTextFrameSetEdit::dropEvent( TQDropEvent * e, const TQPoint & nPoint, con
cmd = pasteOasisCommand( e );
if ( cmd )
macroCmd->addCommand(cmd);
- //retqlayout textframeset after a dnd otherwise autoextend
+ //relayout textframeset after a dnd otherwise autoextend
//frameset is not re-layouted
- textFrameSet()->tqlayout();
+ textFrameSet()->layout();
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.tqalignment != parag->resolveAlignment() || force ) {
- m_paragLayout.tqalignment = parag->resolveAlignment();
- m_canvas->gui()->getView()->showAlign( m_paragLayout.tqalignment );
+ if ( m_paragLayout.alignment != parag->resolveAlignment() || force ) {
+ m_paragLayout.alignment = parag->resolveAlignment();
+ m_canvas->gui()->getView()->showAlign( m_paragLayout.alignment );
}
// 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()->tqinvalidate();
- parag->setChanged( true ); // tqrepaint
+ parag->counter()->invalidate();
+ parag->setChanged( true ); // repaint
}
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 );