From 94844816550ad672ccfcdc25659c625546239998 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:32:11 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kword/DESIGN | 10 +- kword/HACKING | 6 +- kword/KWAnchor.cpp | 4 +- kword/KWCanvas.cpp | 16 +- kword/KWCanvas.h | 6 +- kword/KWCommand.cpp | 70 ++++----- kword/KWCommand.h | 4 +- kword/KWConfig.cpp | 10 +- kword/KWConfigFootNoteDia.cpp | 20 +-- kword/KWCreateBookmarkDia.cpp | 2 +- kword/KWCreateBookmarkDiaBase.ui | 2 +- kword/KWDeleteDia.cpp | 10 +- kword/KWDocStruct.cpp | 12 +- kword/KWDocStruct.h | 2 +- kword/KWDocument.cpp | 130 ++++++++-------- kword/KWDocument.h | 24 +-- kword/KWEditPersonnalExpression.cpp | 46 +++--- kword/KWFindReplace.cpp | 4 +- kword/KWFootNoteDia.cpp | 2 +- kword/KWFormulaFrameSet.cpp | 2 +- kword/KWFrame.cpp | 2 +- kword/KWFrame.h | 4 +- kword/KWFrameDia.cpp | 96 ++++++------ kword/KWFrameLayout.cpp | 20 +-- kword/KWFrameLayout.h | 10 +- kword/KWFrameSet.cpp | 20 +-- kword/KWFrameSet.h | 16 +- kword/KWFrameStyle.cpp | 2 +- kword/KWFrameStyle.h | 4 +- kword/KWFrameStyleManager.cpp | 24 +-- kword/KWFrameStyleManager.h | 10 +- kword/KWFrameViewManager.cpp | 6 +- kword/KWImportStyleDia.cpp | 6 +- kword/KWInsertDia.cpp | 2 +- kword/KWInsertPageDia.cpp | 4 +- kword/KWInsertPicDia.cpp | 4 +- kword/KWInsertTOCCommand.cpp | 10 +- kword/KWMailMergeDataBase.cpp | 66 ++++---- kword/KWMailMergeDataBase.h | 2 +- kword/KWMailMergeLabelAction.cpp | 6 +- kword/KWOasisLoader.cpp | 2 +- kword/KWPageManager.cpp | 4 +- kword/KWPageManager.h | 2 +- kword/KWPartFrameSet.cpp | 10 +- kword/KWPartFrameSet.h | 4 +- kword/KWPictureFrameSet.cpp | 4 +- kword/KWResizeTableDia.cpp | 6 +- kword/KWSelectBookmarkDiaBase.ui | 2 +- kword/KWSortDia.cpp | 4 +- kword/KWSplitCellDia.cpp | 2 +- kword/KWStartupWidget.cpp | 8 +- kword/KWStartupWidget.h | 2 +- kword/KWStartupWidgetBase.ui | 4 +- kword/KWStatisticsDialog.cpp | 6 +- kword/KWTableDia.cpp | 2 +- kword/KWTableDia.h | 4 +- kword/KWTableFrameSet.cpp | 26 ++-- kword/KWTableFrameSet.h | 6 +- kword/KWTableStyle.cpp | 2 +- kword/KWTableStyle.h | 4 +- kword/KWTableStyleManager.cpp | 30 ++-- kword/KWTableTemplate.h | 2 +- kword/KWTableTemplateSelector.cpp | 20 +-- kword/KWTableTemplateSelector.h | 4 +- kword/KWTextFrameSet.cpp | 80 +++++----- kword/KWTextFrameSet.h | 20 +-- kword/KWTextParag.cpp | 44 +++--- kword/KWTextParag.h | 4 +- kword/KWVariable.cpp | 10 +- kword/KWView.cpp | 172 ++++++++++----------- kword/KWView.h | 8 +- kword/KWViewMode.cpp | 60 +++---- kword/KWViewMode.h | 6 +- kword/KWordFrameSetIface.cpp | 8 +- kword/KWordFrameSetIface.h | 2 +- kword/KWordViewIface.cpp | 2 +- kword/KWordViewIface.h | 2 +- kword/OASIS | 4 +- kword/defs.h | 2 +- kword/demos/framestest.kwd | 2 +- kword/mailmerge/KWClassicSerialDataSource.cpp | 50 +++--- kword/mailmerge/kabc/KWMailMergeKABC.cpp | 28 ++-- kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp | 4 +- kword/mailmerge/kabc/addresspicker.ui | 12 +- kword/mailmerge/kspread/kwmailmerge_kspread.cpp | 8 +- .../kspread/kwmailmerge_kspread_config.cpp | 12 +- kword/mailmerge/sql/KWMySqlCursor.h | 6 +- kword/mailmerge/sql/KWQtSqlEasyFilter.cpp | 4 +- kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp | 2 +- .../mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp | 48 +++--- kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp | 28 ++-- .../mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp | 4 +- kword/mailmerge/sql/kwqtsqlpower.ui | 8 +- kword/mailmerge/sql/qtsqlopenwidget.ui | 2 +- kword/tests/KWPageManagerTester.cpp | 28 ++-- 95 files changed, 763 insertions(+), 763 deletions(-) (limited to 'kword') diff --git a/kword/DESIGN b/kword/DESIGN index a920c8db..6a01ae28 100644 --- a/kword/DESIGN +++ b/kword/DESIGN @@ -38,7 +38,7 @@ cell, we contain the cells in their own KWTextFrameset. is defined by m_zOrder in KWFrame. This number is relative to the other frames *on the same page*. -Frame tqlayout and pages +Frame layout and pages ====================== Generally, the user is free to position frames where he/she wants to. @@ -63,10 +63,10 @@ In WP mode, removing pages is automatically done by KWDocument::tryRemovingPages In DTP mode pages are user-controlled (insert and delete page actions), but overflowing text can still create a new page as well. -The difficulty with frame tqlayout is that in most cases the frame size and -number depends on the text inside, and the text tqlayout depends on the frames -(frame width, frames on top, etc.). This is why text tqlayout (formatMore()) -and frame tqlayout (e.g. KWFrameLayout) often call each other, resulting in +The difficulty with frame layout is that in most cases the frame size and +number depends on the text inside, and the text layout depends on the frames +(frame width, frames on top, etc.). This is why text layout (formatMore()) +and frame layout (e.g. KWFrameLayout) often call each other, resulting in infinite loops when some code goes wrong. Editing diff --git a/kword/HACKING b/kword/HACKING index c808ac27..440da6bd 100644 --- a/kword/HACKING +++ b/kword/HACKING @@ -59,7 +59,7 @@ DIRECTORIES: various QTSQL interface implementation files to handle table selection and mailmerge data templates: - various page tqlayout templates + various page layout templates make_template.pl - Perl script to create XML templates - from KWord-saved XML files subdirectories @@ -89,7 +89,7 @@ FILES: main.cc - the main kwaboutdata.h - the appname, authors... - shared between main.cc and kwfactory.cc - kword.rc - xml-gui tqlayout + kword.rc - xml-gui layout kword.desktop - application .desktop file main document data structures: @@ -154,7 +154,7 @@ FILES: framedia.h/cc - frame dialog kwframe.h/cc - frame, framesets (picture/formula/...), - framesetedit objects for editing framesets - kwframetqlayout.h/cc - the frame tqlayout engine for headers/main + kwframelayout.h/cc - the frame layout engine for headers/main frames/footers/footnotes. (this is a helper for KWDoc::recalcFrames) kwtextframeset.h/cc - text frameset diff --git a/kword/KWAnchor.cpp b/kword/KWAnchor.cpp index 11136e3d..a291999e 100644 --- a/kword/KWAnchor.cpp +++ b/kword/KWAnchor.cpp @@ -70,7 +70,7 @@ void KWAnchor::finalize() void KWAnchor::draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ) { // (x,y) is the position of the inline item (in Layout Units) - // (cx,cy,cw,ch) is the rectangle to be painted, in tqlayout units too + // (cx,cy,cw,ch) is the rectangle to be painted, in layout units too if ( m_deleted ) return; @@ -234,7 +234,7 @@ void KWAnchor::resize() if ( parag ) { kdDebug(32001) << "KWAnchor::resize invalidating parag " << parag->paragId() << endl; - parag->tqinvalidate( 0 ); + parag->invalidate( 0 ); } } } diff --git a/kword/KWCanvas.cpp b/kword/KWCanvas.cpp index fdd6eb6b..5b15914b 100644 --- a/kword/KWCanvas.cpp +++ b/kword/KWCanvas.cpp @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include @@ -201,7 +201,7 @@ void KWCanvas::repaintChanged( KWFrameSet * fs, bool resetChanged ) void KWCanvas::repaintAll( bool erase /* = false */ ) { //kdDebug(32002) << "KWCanvas::repaintAll erase=" << erase << endl; - viewport()->tqrepaint( erase ); + viewport()->repaint( erase ); } void KWCanvas::viewportResizeEvent( TQResizeEvent * ) @@ -305,7 +305,7 @@ void KWCanvas::drawFrameSet( KWFrameSet * frameset, TQPainter * painter, if ( painter->device()->devType() == TQInternal::Printer ) focus = false; - TQColorGroup gb = TQApplication::tqpalette().active(); + TQColorGroup gb = TQApplication::palette().active(); if ( focus && m_currentFrameSetEdit && frameset == m_currentFrameSetEdit->frameSet() ) // Currently edited frameset m_currentFrameSetEdit->drawContents( painter, crect, gb, onlyChanged, resetChanged, viewMode, m_frameViewManager ); @@ -543,9 +543,9 @@ void KWCanvas::contentsMousePressEvent( TQMouseEvent *e ) if ( e->button() == Qt::MidButton ) { if ( m_doc->isReadWrite() && m_currentFrameSetEdit && m_mouseMode == MM_EDIT ) { - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); m_currentFrameSetEdit->paste(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); } } else if ( e->button() == Qt::RightButton ) { @@ -1032,7 +1032,7 @@ void KWCanvas::mrCreateTable() emit docStructChanged(Tables); } m_doc->updateAllFrames(); - m_doc->tqlayout(); + m_doc->layout(); repaintAll(); } @@ -1751,7 +1751,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e ) break; case TQt::Key_M: // 'M' -> mark debug output { - const TQDateTime dtMark ( TQDateTime::tqcurrentDateTime() ); + const TQDateTime dtMark ( TQDateTime::currentDateTime() ); kdDebug(32002) << "Developer mark: " << dtMark.toString("yyyy-MM-dd hh:mm:ss,zzz") << endl; keyev->accept(); break; @@ -2231,7 +2231,7 @@ void FrameResizePolicy::handleMouseMove(TQt::ButtonState keyState, const KoPoint sizeRect.setX( TQMAX(0, sizeRect.x()) ); // otherwise it would get wider than the page } - // each frame in m_frames should be retqshaped from the original size stored in the + // each frame in m_frames should be reshaped from the original size stored in the // m_frameResize data to a size that equals the reshaping of m_boundingrect to sizeRect class Converter { public: diff --git a/kword/KWCanvas.h b/kword/KWCanvas.h index 955ea605..5283db0a 100644 --- a/kword/KWCanvas.h +++ b/kword/KWCanvas.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -76,13 +76,13 @@ public: void repaintAll( bool erase = false ); /** - * Only tqrepaint the frameset @p fs. + * Only repaint the frameset @p fs. * @p resetChanged should only be true for the last view * (see KWFrameSet::drawContents) */ void repaintChanged( KWFrameSet * fs, bool resetChanged ); - /** We need to tqrepaint if the window is resized. */ + /** We need to repaint if the window is resized. */ void viewportResizeEvent( TQResizeEvent * ); void print( TQPainter *painter, KPrinter *printer ); diff --git a/kword/KWCommand.cpp b/kword/KWCommand.cpp index 47fda3e6..20a4c918 100644 --- a/kword/KWCommand.cpp +++ b/kword/KWCommand.cpp @@ -145,14 +145,14 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c ) break; } TQDomElement paragElem = *it; - // First line (if appending to non-empty line) : apply offset to formatting, don't apply parag tqlayout + // First line (if appending to non-empty line) : apply offset to formatting, don't apply parag layout if ( item == 0 && m_idx > 0 ) { // First load the default format, but only apply it to our new chars - TQDomElement tqlayout = paragElem.namedItem( "LAYOUT" ).toElement(); - if ( !tqlayout.isNull() ) + TQDomElement layout = paragElem.namedItem( "LAYOUT" ).toElement(); + if ( !layout.isNull() ) { - TQDomElement formatElem = tqlayout.namedItem( "FORMAT" ).toElement(); + TQDomElement formatElem = layout.namedItem( "FORMAT" ).toElement(); if ( !formatElem.isNull() ) { KoTextFormat f = parag->loadFormat( formatElem, 0L, TQFont(), KGlobal::locale()->language(),false ); @@ -167,7 +167,7 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c ) } else { - if ( item == 0 ) // This paragraph existed, store its parag tqlayout + if ( item == 0 ) // This paragraph existed, store its parag layout { delete m_oldParagLayout; m_oldParagLayout = new KoParagLayout( parag->paragLayout() ); @@ -179,7 +179,7 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c ) parag->setFormat( 0, len, parag->paragFormat(), TRUE ); parag->loadFormatting( paragElem, 0, (textFs->isMainFrameset()) ); } - parag->tqinvalidate(0); // the formatting will be done by caller (either KWTextFrameSet::pasteOasis or KoTextObject::undo/redo) + parag->invalidate(0); // the formatting will be done by caller (either KWTextFrameSet::pasteOasis or KoTextObject::undo/redo) parag->setChanged( TRUE ); parag = static_cast(parag->next()); //kdDebug() << "KWPasteTextCommand::execute going to next parag: " << parag << endl; @@ -913,7 +913,7 @@ KWFrameMoveCommand::KWFrameMoveCommand( const TQString &name, void KWFrameMoveCommand::execute() { - bool needRetqlayout = false; + bool needRelayout = false; KWDocument * doc = 0L; TQValueList::Iterator moveIt = m_frameMove.begin(); TQValueList::Iterator tmp = m_indexFrame.begin(); @@ -925,13 +925,13 @@ void KWFrameMoveCommand::execute() frame->moveTopLeft( (*moveIt).newPos ); frame->updateRulerHandles(); - needRetqlayout = needRetqlayout || ( frame->runAround() != KWFrame::RA_NO ); + needRelayout = needRelayout || ( frame->runAround() != KWFrame::RA_NO ); } if ( doc ) { doc->updateAllFrames(); - if ( needRetqlayout ) - doc->tqlayout(); + if ( needRelayout ) + doc->layout(); doc->updateRulerFrameStartEnd(); doc->repaintAllViews(); @@ -940,7 +940,7 @@ void KWFrameMoveCommand::execute() void KWFrameMoveCommand::unexecute() { - bool needRetqlayout = false; + bool needRelayout = false; KWDocument * doc = 0L; TQValueList::Iterator moveIt = m_frameMove.begin(); TQValueList::Iterator tmp = m_indexFrame.begin(); @@ -952,14 +952,14 @@ void KWFrameMoveCommand::unexecute() frame->moveTopLeft( (*moveIt).oldPos ); frame->updateRulerHandles(); - needRetqlayout = needRetqlayout || ( frame->runAround() != KWFrame::RA_NO ); + needRelayout = needRelayout || ( frame->runAround() != KWFrame::RA_NO ); } if ( doc ) { doc->updateAllFrames(); - if ( needRetqlayout ) - doc->tqlayout(); + if ( needRelayout ) + doc->layout(); doc->updateRulerFrameStartEnd(); doc->repaintAllViews(); } @@ -995,7 +995,7 @@ void KWFramePropertiesCommand::execute() { doc->frameChanged( frame ); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); doc->repaintAllViews(); doc->updateRulerFrameStartEnd(); } @@ -1016,7 +1016,7 @@ void KWFramePropertiesCommand::unexecute() { doc->frameChanged( frame ); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); doc->repaintAllViews(); doc->updateRulerFrameStartEnd(); } @@ -1226,7 +1226,7 @@ void KWDeleteTableCommand::execute() doc->refreshDocStructure((int)Tables); doc->updateAllFrames(); m_pTable->updateFrames(); // not in the doc list anymore, so the above call didn't do it! - doc->tqlayout(); + doc->layout(); doc->repaintAllViews(); doc->updateRulerFrameStartEnd(); @@ -1240,7 +1240,7 @@ void KWDeleteTableCommand::unexecute() doc->addFrameSet(m_pTable); doc->refreshDocStructure((int)Tables); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); doc->repaintAllViews(); doc->updateRulerFrameStartEnd(); } @@ -1284,7 +1284,7 @@ void KWInsertColumnCommand::execute() } Q_ASSERT(m_pTable->boundingRect().right() <= m_maxRight); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); doc->repaintAllViews(); } @@ -1300,7 +1300,7 @@ void KWInsertColumnCommand::unexecute() m_pTable->resizeWidth(m_oldWidth); } doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); doc->repaintAllViews(); } @@ -1332,7 +1332,7 @@ void KWInsertRowCommand::execute() m_pTable->insertNewRow(m_rowPos); //only happens the first time } doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); doc->repaintAllViews(); } @@ -1345,7 +1345,7 @@ void KWInsertRowCommand::unexecute() m_pTable->deleteRow( m_rowPos, *m_rr); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); } @@ -1372,7 +1372,7 @@ void KWRemoveRowCommand::execute() m_pTable->deleteRow( m_rowPos, *m_rr); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); } void KWRemoveRowCommand::unexecute() @@ -1381,7 +1381,7 @@ void KWRemoveRowCommand::unexecute() KWDocument * doc = m_pTable->kWordDocument(); m_pTable->reInsertRow(*m_rr); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); doc->repaintAllViews(); } @@ -1407,7 +1407,7 @@ void KWRemoveColumnCommand::execute() m_pTable->deleteColumn( m_colPos, *m_rc); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); } void KWRemoveColumnCommand::unexecute() @@ -1416,7 +1416,7 @@ void KWRemoveColumnCommand::unexecute() KWDocument * doc = m_pTable->kWordDocument(); m_pTable->reInsertColumn(*m_rc); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); doc->repaintAllViews(); } @@ -1441,7 +1441,7 @@ void KWSplitCellCommand::execute() //kdDebug()<<"split Cell m_colBegin :"<splitCell(m_rowEnd, m_colEnd,m_colBegin,m_rowBegin,m_ListFrameSet); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); } void KWSplitCellCommand::unexecute() @@ -1478,7 +1478,7 @@ void KWSplitCellCommand::unexecute() m_rowBegin+m_rowEnd-1+cell->rowSpan()-1); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); } @@ -1507,7 +1507,7 @@ void KWJoinCellCommand::execute() doc->terminateEditing(m_pTable); m_pTable->joinCells(m_colBegin,m_rowBegin,m_colEnd,m_rowEnd); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); } void KWJoinCellCommand::unexecute() @@ -1517,7 +1517,7 @@ void KWJoinCellCommand::unexecute() doc->terminateEditing(m_pTable); m_pTable->splitCell(m_rowEnd-m_rowBegin+1, m_colEnd-m_colBegin+1,m_colBegin,m_rowBegin,m_ListFrameSet,m_copyFrame); doc->updateAllFrames(); - doc->tqlayout(); + doc->layout(); } @@ -1746,7 +1746,7 @@ KWInsertRemovePageCommand::~KWInsertRemovePageCommand() { TQString KWInsertRemovePageCommand::name() const { return m_cmd == Insert ? i18n("Insert Page") // problem with after/before page - : i18n("Delete Page %1").tqarg(m_pgNum); + : i18n("Delete Page %1").arg(m_pgNum); } void KWInsertRemovePageCommand::execute() { @@ -1977,7 +1977,7 @@ void KWChangeFootNoteParametersCommand::changeVariableParameter( FootNoteParamet if ( m_var->numberingType()== KWFootNoteVariable::Manual) { m_var->resize(); - m_var->paragraph()->tqinvalidate(0); + m_var->paragraph()->invalidate(0); m_var->paragraph()->setChanged( true ); } @@ -1986,7 +1986,7 @@ void KWChangeFootNoteParametersCommand::changeVariableParameter( FootNoteParamet if ( frameset) frameset->renumberFootNotes(); - // Re-tqlayout the footnote/endnote frame + // Re-layout the footnote/endnote frame KWFrame* footNoteFrame = m_var->frameSet()->frame( 0 ); int framePage = footNoteFrame->pageNumber(); m_doc->recalcFrames( framePage, -1 ); @@ -2061,14 +2061,14 @@ KWResizeColumnCommand::KWResizeColumnCommand( KWTableFrameSet *table, int col, d void KWResizeColumnCommand::execute() { m_table->resizeColumn(m_col, m_newSize); - m_table->kWordDocument()->tqlayout(); + m_table->kWordDocument()->layout(); m_table->kWordDocument()->repaintAllViews(); } void KWResizeColumnCommand::unexecute() { m_table->resizeColumn(m_col, m_oldSize); - m_table->kWordDocument()->tqlayout(); + m_table->kWordDocument()->layout(); m_table->kWordDocument()->repaintAllViews(); } diff --git a/kword/KWCommand.h b/kword/KWCommand.h index 7c905fb3..71d13f1f 100644 --- a/kword/KWCommand.h +++ b/kword/KWCommand.h @@ -380,7 +380,7 @@ protected: bool m_oldValue; }; -///////////////////////////////tqlayout command/////////////////////////// +///////////////////////////////layout command/////////////////////////// struct KWPageLayoutStruct { KWPageLayoutStruct( const KoPageLayout& pgLayout, const KoColumns& cl, const KoKWHeaderFooter& hf ) : _pgLayout(pgLayout), _cl(cl), _hf(hf) { @@ -391,7 +391,7 @@ struct KWPageLayoutStruct { }; /** - * Command created when changing the page tqlayout + * Command created when changing the page layout */ class KWPageLayoutCommand : public KNamedCommand { diff --git a/kword/KWConfig.cpp b/kword/KWConfig.cpp index 977ff322..82db66e8 100644 --- a/kword/KWConfig.cpp +++ b/kword/KWConfig.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include "KWConfig.h" #include "KWView.h" @@ -75,7 +75,7 @@ using namespace KSpell2; // (Note: KDialogBase should have version of the methods that take a TQString for the icon name) static inline TQPixmap loadIcon( const char * name ) { return KGlobal::instance()->iconLoader() - ->loadIcon( TQString::tqfromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); + ->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); } KWConfig::KWConfig( KWView* parent ) @@ -217,7 +217,7 @@ ConfigureSpellPage::ConfigureSpellPage( KWView *view, TQVBox *box, char *name ) config = KWFactory::instance()->config(); m_spellConfigWidget = new ConfigWidget( view->broker(), box ); m_spellConfigWidget->setBackgroundCheckingButtonShown( true ); - m_spellConfigWidget->tqlayout()->setMargin( 0 ); + m_spellConfigWidget->layout()->setMargin( 0 ); } void ConfigureSpellPage::apply() @@ -655,7 +655,7 @@ KCommand *ConfigureMiscPage::apply() } if ( needRepaint ) { - doc->tqlayout(); + doc->layout(); doc->repaintAllViews(); } return macroCmd; @@ -803,7 +803,7 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, TQVBox *box, cha labelStartingPage->setBuddy( m_variableNumberOffset ); TQHBox* hbTabStop = new TQHBox( gbDocumentSettings ); - tabStop = new TQLabel(i18n("Tab stop (%1):").tqarg(doc->unitName()), hbTabStop); + tabStop = new TQLabel(i18n("Tab stop (%1):").arg(doc->unitName()), hbTabStop); m_tabStopWidth = new KoUnitDoubleSpinBox( hbTabStop, MM_TO_POINT(2), doc->pageManager()->page(doc->startPage())->width(), diff --git a/kword/KWConfigFootNoteDia.cpp b/kword/KWConfigFootNoteDia.cpp index 8cfa8975..e0bf26de 100644 --- a/kword/KWConfigFootNoteDia.cpp +++ b/kword/KWConfigFootNoteDia.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include @@ -81,8 +81,8 @@ void KWConfigFootNoteDia::setupTab3() "of the three alignments."); TQWhatsThis::add(positionGroupBox, comment); positionGroupBox->setColumnLayout(0, Qt::Vertical ); - TQVBoxLayout *positionLayout = new TQVBoxLayout( positionGroupBox->tqlayout() ); - positionLayout->tqsetAlignment( TQt::AlignTop ); + TQVBoxLayout *positionLayout = new TQVBoxLayout( positionGroupBox->layout() ); + positionLayout->setAlignment( TQt::AlignTop ); // i18n context information necessary for gender considerations (e.g. in Polish) rbPosLeft = new TQRadioButton( i18n("Position", "Left"), positionGroupBox, "rbPosLeft" ); @@ -106,35 +106,35 @@ void KWConfigFootNoteDia::setupTab3() break; } - TQGridLayout *tqlayout = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint()); + TQGridLayout *layout = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint()); spWidth = new KoUnitDoubleSpinBox(page, 0, 5, 0.5, m_doc->footNoteSeparatorLineWidth(), m_doc->unit(), 1); - tqlayout->addWidget( spWidth, 1, 1 ); + layout->addWidget( spWidth, 1, 1 ); spLength = new KIntNumInput( page, "spLength" ); spLength->setRange( 1, 100, 1,false ); spLength->setValue( m_doc->footNoteSeparatorLineLength()); spLength->setSuffix(i18n(" %")); - tqlayout->addWidget( spLength, 0, 1 ); + layout->addWidget( spLength, 0, 1 ); TQLabel *lSize = new TQLabel( i18n( "&Width:"), page ); lSize->setBuddy( spWidth ); comment= i18n ("The width is the thickness of the separator line, set to 0 for no separator line."); TQWhatsThis::add(lSize, comment); TQWhatsThis::add(spWidth, comment); - tqlayout->addWidget( lSize, 1, 0 ); + layout->addWidget( lSize, 1, 0 ); TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - tqlayout->addMultiCell( spacer, 0, 1, 2, 2 ); + layout->addMultiCell( spacer, 0, 1, 2, 2 ); TQLabel *lWidth = new TQLabel( i18n("&Size on page:"), page, "lWidth" ); lWidth->setBuddy( spLength ); comment= i18n ("The size of the separator line can be defined as a percentage of the width of the page."); TQWhatsThis::add(spLength, comment); TQWhatsThis::add(lWidth, comment); - tqlayout->addWidget( lWidth, 0, 0 ); - pageLayout->addLayout( tqlayout ); + layout->addWidget( lWidth, 0, 0 ); + pageLayout->addLayout( layout ); TQHBoxLayout *styleLayout = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "styleLayout"); diff --git a/kword/KWCreateBookmarkDia.cpp b/kword/KWCreateBookmarkDia.cpp index 131192e9..1c802156 100644 --- a/kword/KWCreateBookmarkDia.cpp +++ b/kword/KWCreateBookmarkDia.cpp @@ -20,7 +20,7 @@ #include #include "KWDocument.h" #include -#include +#include #include #include #include diff --git a/kword/KWCreateBookmarkDiaBase.ui b/kword/KWCreateBookmarkDiaBase.ui index 0d164ed4..e789ac28 100644 --- a/kword/KWCreateBookmarkDiaBase.ui +++ b/kword/KWCreateBookmarkDiaBase.ui @@ -21,7 +21,7 @@ - tqlayout2 + layout2 diff --git a/kword/KWDeleteDia.cpp b/kword/KWDeleteDia.cpp index 12f7b3b5..aec0eebf 100644 --- a/kword/KWDeleteDia.cpp +++ b/kword/KWDeleteDia.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include KWDeleteDia::KWDeleteDia( KWView *parent, KWTableFrameSet *table, DeleteType type, TQValueList remove) : KDialogBase( Plain, (type==deleteRow?i18n("Delete Row") : i18n("Delete Column")), Ok | Cancel, Ok, parent, "Delete Table items dialog", true ) @@ -58,7 +58,7 @@ void KWDeleteDia::setupTab1() { message = m_type == deleteRow ? i18n("Delete all selected rows?") : i18n("Delete all selected cells?"); else if ( count == 1 ) { message = m_type == deleteRow ? i18n( "Delete row number %1?" ) : i18n( "Delete column number %1?" ); - message = message.tqarg( m_toRemove.first() + 1 ); // +1 because humans count from 1 + message = message.arg( m_toRemove.first() + 1 ); // +1 because humans count from 1 } else { message = m_type == deleteRow ? i18n( "Delete rows: %1 ?" ) : i18n( "Delete columns: %1 ?" ); @@ -70,12 +70,12 @@ void KWDeleteDia::setupTab1() { rows += ", "; rows += TQString().setNum((*items) +1); } - message = message.tqarg( rows ); + message = message.arg( rows ); } TQLabel *rc = new TQLabel( message , tab1 ); - rc->resize( rc->tqsizeHint() ); - rc->tqsetAlignment( AlignLeft | AlignBottom ); + rc->resize( rc->sizeHint() ); + rc->setAlignment( AlignLeft | AlignBottom ); grid1->addWidget( rc, 1, 0 ); } diff --git a/kword/KWDocStruct.cpp b/kword/KWDocStruct.cpp index 5fe52cf6..bf39df9f 100644 --- a/kword/KWDocStruct.cpp +++ b/kword/KWDocStruct.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include /******************************************************************/ /* Class: KWOrderedFrameSet */ @@ -385,12 +385,12 @@ void KWDocStructTextFrameSetItem::setupTextFrames() if ( KListViewItem::parent()->firstChild() == this && dok->processingType() == KWDocument::WP ) { if ( dok->numColumns() == 1 ) - name=i18n( "Page %1" ).tqarg(TQString::number(j + 1)); + name=i18n( "Page %1" ).arg(TQString::number(j + 1)); else - name=i18n( "Column %1" ).tqarg(TQString::number(j + 1)); + name=i18n( "Column %1" ).arg(TQString::number(j + 1)); } else - name=i18n( "Text Frame %1" ).tqarg(TQString::number(j + 1)); + name=i18n( "Text Frame %1" ).arg(TQString::number(j + 1)); KWDocStructTextFrameItem* child = findTextFrameItem(frame); if (child) child->setText(0, name); @@ -899,7 +899,7 @@ void KWDocStructRootItem::setupFormulaFrames() if ( frameset->type() == FT_FORMULA && frameset->frameCount()>0 ) { - _name=i18n("Formula Frame %1").tqarg(TQString::number(i+1)); + _name=i18n("Formula Frame %1").arg(TQString::number(i+1)); child = new KWDocStructFormulaItem(this, _name, dynamic_cast( frameset )); } } @@ -977,7 +977,7 @@ void KWDocStructRootItem::setupPictures() frameset = dok->frameSet( i ); if ( frameset->type() == FT_PICTURE && frameset->frameCount()>0) { - _name=i18n("Picture (%1) %2").tqarg(dynamic_cast( frameset )->key().filename()).tqarg(++j); + _name=i18n("Picture (%1) %2").arg(dynamic_cast( frameset )->key().filename()).arg(++j); child = new KWDocStructPictureItem(this, _name, dynamic_cast( frameset )); } } diff --git a/kword/KWDocStruct.h b/kword/KWDocStruct.h index 2eb4eb9d..87ac0f6f 100644 --- a/kword/KWDocStruct.h +++ b/kword/KWDocStruct.h @@ -290,7 +290,7 @@ public: void setup(); void refreshTree(int _type); - TQSize tqminimumSizeHint() const { + TQSize minimumSizeHint() const { return TQSize( 0, 0 ); } void selectItem(); diff --git a/kword/KWDocument.cpp b/kword/KWDocument.cpp index 9420f048..55f5f351 100644 --- a/kword/KWDocument.cpp +++ b/kword/KWDocument.cpp @@ -483,8 +483,8 @@ void KWDocument::newZoomAndResolution( bool updateViews, bool forPrint ) // First recalc all frames (including the kotextdocument width) updateAllFrames(); - // Then retqlayout the text inside the frames - tqlayout(); + // Then relayout the text inside the frames + layout(); if ( updateViews ) { emit newContentsSize(); @@ -617,9 +617,9 @@ KoPageLayout KWDocument::pageLayout(int pageNumber /* = 0 */) const return pageManager()->pageLayout(pageNumber); } -void KWDocument::setPageLayout( const KoPageLayout& tqlayout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews ) +void KWDocument::setPageLayout( const KoPageLayout& layout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews ) { - m_pageLayout = tqlayout; + m_pageLayout = layout; if ( m_processingType == WP ) { m_pageColumns = cl; } @@ -643,8 +643,8 @@ void KWDocument::setPageLayout( const KoPageLayout& tqlayout, const KoColumns& c if ( updateViews ) { - // Invalidate document tqlayout, for proper tqrepaint - this->tqlayout(); + // Invalidate document layout, for proper repaint + this->layout(); emit pageLayoutChanged( m_pageLayout ); updateContentsSize(); } @@ -953,10 +953,10 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla if ( fromPage > toPage ) // this can happen with "endnotes only" pages :) // ### really? fromPage = toPage; // ie. start at the last real page KWFrameLayout frameLayout( this, headerFooterList, footnotesHFList, endnotesHFList ); - frameLayout.tqlayout( frameset, m_pageColumns.columns, fromPage, toPage, flags ); + frameLayout.layout( frameset, m_pageColumns.columns, fromPage, toPage, flags ); // If the number of pages changed, update views and variables etc. - // (now that the frame tqlayout has been done) + // (now that the frame layout has been done) if ( pageCount() != oldPages && !m_bGeneratingPreview ) { // Very much like the end of appendPage, but we don't want to call recalcFrames ;) @@ -996,7 +996,7 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla bool KWDocument::loadChildren( KoStore *store ) { //kdDebug(32001) << "KWDocument::loadChildren" << endl; - TQPtrListIterator it( tqchildren() ); + TQPtrListIterator it( children() ); for( ; it.current(); ++it ) { if ( !it.current()->loadDocument( store ) ) return FALSE; @@ -1060,7 +1060,7 @@ bool KWDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles if ( localName.isEmpty() ) setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No tag found inside office:body." ) ); else - setErrorMessage( i18n( "This is not a word processing document, but %1. Please try opening it with the appropriate application." ).tqarg( KoDocument::tagNameToDocumentType( localName ) ) ); + setErrorMessage( i18n( "This is not a word processing document, but %1. Please try opening it with the appropriate application." ).arg( KoDocument::tagNameToDocumentType( localName ) ) ); return false; } @@ -1072,7 +1072,7 @@ bool KWDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles // In theory the page format is the style:master-page-name of the first paragraph... // But, hmm, in a doc with only a table there was no reference to the master page at all... - // So we load the standard page tqlayout to start with, and in KWTextParag + // So we load the standard page layout to start with, and in KWTextParag // we might overwrite it with another one. m_loadingInfo->m_currentMasterPage = "Standard"; if ( !loadOasisPageLayout( m_loadingInfo->m_currentMasterPage, context ) ) @@ -1133,15 +1133,15 @@ bool KWDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles // load padding, background and borders for the main frame const TQDomElement* masterPage = context.oasisStyles().masterPages()[ m_loadingInfo->m_currentMasterPage ]; - const TQDomElement *masterPageStyle = masterPage ? context.oasisStyles().findStyle(masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0; + const TQDomElement *masterPageStyle = masterPage ? context.oasisStyles().findStyle(masterPage->attributeNS( KoXmlNS::style, "page-layout-name", TQString() ) ) : 0; if ( masterPageStyle ) { KoStyleStack styleStack; styleStack.push( *masterPageStyle ); - styleStack.setTypeProperties( "page-tqlayout" ); + styleStack.setTypeProperties( "page-layout" ); frame->loadBorderProperties( styleStack ); } - fs->renumberFootNotes( false /*no tqrepaint*/ ); + fs->renumberFootNotes( false /*no repaint*/ ); } else { // DTP mode: the items in the body are page-sequence and then frames @@ -1152,7 +1152,7 @@ bool KWDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles const TQString localName = tag.localName(); if ( localName == "page-sequence" && tag.namespaceURI() == KoXmlNS::text ) { - // We don't have support for changing the page tqlayout yet, so just take the + // We don't have support for changing the page layout yet, so just take the // number of pages int pages=1; TQDomElement page; @@ -1205,14 +1205,14 @@ bool KWDocument::loadOasisPageLayout( const TQString& masterPageName, KoOasisCon const KoOasisStyles& oasisStyles = context.oasisStyles(); const TQDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ]; Q_ASSERT( masterPage ); - const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0; + const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", TQString() ) ) : 0; Q_ASSERT( masterPageStyle ); if ( masterPageStyle ) { m_pageLayout.loadOasis( *masterPageStyle ); pageManager()->setDefaultPage(m_pageLayout); - const TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-tqlayout-properties" ) ); + const TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-layout-properties" ) ); const TQDomElement footnoteSep = KoDom::namedItemNS( properties, KoXmlNS::style, "footnote-sep" ); if ( !footnoteSep.isNull() ) { // style:width="0.018cm" style:distance-before-sep="0.101cm" @@ -1292,24 +1292,24 @@ bool KWDocument::loadMasterPageStyle( const TQString& masterPageName, KoOasisCon const KoOasisStyles& oasisStyles = context.oasisStyles(); const TQDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ]; Q_ASSERT( masterPage ); - const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0; + const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", TQString() ) ) : 0; Q_ASSERT( masterPageStyle ); // This check is done here and not in loadOasisPageLayout in case the Standard master-page // has no page information but the first paragraph points to a master-page that does (#129585) if ( m_pageLayout.ptWidth <= 1e-13 || m_pageLayout.ptHeight <= 1e-13 ) { - // Loading page tqlayout failed, try to see why. - TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-tqlayout-properties" ) ); + // Loading page layout failed, try to see why. + TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-layout-properties" ) ); //if ( properties.isNull() ) - // setErrorMessage( i18n( "Invalid document. No page tqlayout properties were found. The application which produced this document isn't OASIS-compliant." ) ); + // setErrorMessage( i18n( "Invalid document. No page layout properties were found. The application which produced this document isn't OASIS-compliant." ) ); //else if ( properties.hasAttributeNS( KoXmlNS::fo, "page-width" ) ) - // setErrorMessage( i18n( "Invalid document. Page tqlayout has no page width. The application which produced this document isn't OASIS-compliant." ) ); + // setErrorMessage( i18n( "Invalid document. Page layout has no page width. The application which produced this document isn't OASIS-compliant." ) ); //else if ( properties.hasAttributeNS( "http://www.w3.org/1999/XSL/Format", "page-width" ) ) setErrorMessage( i18n( "Invalid document. 'fo' has the wrong namespace. The application which produced this document is not OASIS-compliant." ) ); else - setErrorMessage( i18n( "Invalid document. Paper size: %1x%2" ).tqarg( m_pageLayout.ptWidth ).tqarg( m_pageLayout.ptHeight ) ); + setErrorMessage( i18n( "Invalid document. Paper size: %1x%2" ).arg( m_pageLayout.ptWidth ).arg( m_pageLayout.ptHeight ) ); return false; } @@ -1484,7 +1484,7 @@ bool KWDocument::loadXML( TQIODevice *, const TQDomDocument & doc ) else if ( value != "application/x-kword" && value != "application/vnd.kde.kword" ) { kdError(32001) << "Unknown mime type " << value << endl; - setErrorMessage( i18n( "Invalid document. Expected mimetype application/x-kword or application/vnd.kde.kword, got %1" ).tqarg( value ) ); + setErrorMessage( i18n( "Invalid document. Expected mimetype application/x-kword or application/vnd.kde.kword, got %1" ).arg( value ) ); return false; } m_syntaxVersion = KWDocument::getAttribute( word, "syntaxVersion", 0 ); @@ -1492,7 +1492,7 @@ bool KWDocument::loadXML( TQIODevice *, const TQDomDocument & doc ) { int ret = KMessageBox::warningContinueCancel( 0, i18n("This document was created with a newer version of KWord (syntax version: %1)\n" - "Opening it in this version of KWord will lose some information.").tqarg(m_syntaxVersion), + "Opening it in this version of KWord will lose some information.").arg(m_syntaxVersion), i18n("File Format Mismatch"), KStdGuiItem::cont() ); if ( ret == KMessageBox::Cancel ) { @@ -1535,7 +1535,7 @@ bool KWDocument::loadXML( TQIODevice *, const TQDomDocument & doc ) if ( pgLayout.ptWidth <= 0 || pgLayout.ptHeight <= 0 ) { setErrorMessage( i18n( "Invalid document. Paper size: %1x%2" ) - .tqarg( pgLayout.ptWidth ).tqarg( pgLayout.ptHeight ) ); + .arg( pgLayout.ptWidth ).arg( pgLayout.ptHeight ) ); return false; } } @@ -1928,7 +1928,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml // Renumber footnotes KWTextFrameSet *frameset = dynamic_cast( m_lstFrameSet.getFirst() ); if ( frameset ) - frameset->renumberFootNotes( false /*no tqrepaint*/ ); + frameset->renumberFootNotes( false /*no repaint*/ ); emit sigProgress(-1); @@ -2499,7 +2499,7 @@ void KWDocument::processAnchorRequests() KWFrameSet * fs = frameSetByName( fsname ); Q_ASSERT( fs ); if ( fs ) - fs->setAnchored( itanch.data().textfs, itanch.data().paragId, itanch.data().index, true, false /*don't tqrepaint yet*/ ); + fs->setAnchored( itanch.data().textfs, itanch.data().paragId, itanch.data().index, true, false /*don't repaint yet*/ ); } m_anchorRequests.clear(); } @@ -2533,7 +2533,7 @@ bool KWDocument::processFootNoteRequests() if ( ret ) { KWFrameSet *frameset = m_lstFrameSet.getFirst(); if ( frameset && frameset->type() == FT_TEXT ) - static_cast(frameset)->renumberFootNotes( false /*no tqrepaint*/ ); + static_cast(frameset)->renumberFootNotes( false /*no repaint*/ ); } return ret; } @@ -2545,13 +2545,13 @@ TQString KWDocument::uniqueFramesetName( const TQString& oldName ) { // make up a new name for the frameset, use Copy[digits]-[oldname] as template. // Fully translatable naturally :) - TQString searchString( "^(" + i18n("Copy%1-%2").tqarg("\\d*").tqarg("){0,1}") ); + TQString searchString( "^(" + i18n("Copy%1-%2").arg("\\d*").arg("){0,1}") ); searchString = searchString.replace(TQRegExp("\\-"), "\\-"); // escape the '-' TQRegExp searcher(searchString); int count=0; do { newName=oldName; - newName.replace(searcher,i18n("Copy%1-%2").tqarg(count > 0? TQString("%1").tqarg(count):"").tqarg("")); + newName.replace(searcher,i18n("Copy%1-%2").arg(count > 0? TQString("%1").arg(count):"").arg("")); count++; } while ( frameSetByName( newName ) ); } @@ -2705,7 +2705,7 @@ void KWDocument::completePasting() processAnchorRequests(); if ( processFootNoteRequests() ) { - // We pasted footnotes. Retqlayout frames. + // We pasted footnotes. Relayout frames. recalcFrames(); } @@ -2762,7 +2762,7 @@ void KWDocument::insertEmbedded( KoStore *store, TQDomElement topElem, KMacroCom kdDebug() << "KWDocument::insertEmbedded loading embedded object" << endl; part->load( settings ); if ( offset != 0 ) { - TQRect r = ch->tqgeometry(); + TQRect r = ch->geometry(); r.moveBy( (int)offset, (int)offset ); ch->setGeometry( r ); } @@ -2804,7 +2804,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S if ( saveFlag == SaveAll ) pictureList = savePictureList(); - m_varColl->variableSetting()->setModificationDate(TQDateTime::tqcurrentDateTime()); + m_varColl->variableSetting()->setModificationDate(TQDateTime::currentDateTime()); recalcVariables( VT_DATE ); recalcVariables( VT_TIME ); // for "current time" recalcVariables( VT_STATISTIC ); @@ -2837,7 +2837,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S } // Header and footers save their content into master-styles/master-page, and their - // styles into the page-tqlayout automatic-style. + // styles into the page-layout automatic-style. // However the paragraph styles used by header/footers need to be known before // hand, to promote them to styles.xml. So we collect them first, which means // storing the content into a buffer. @@ -3235,7 +3235,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle buffer.close(); if ( m_pageColumns.columns > 1 ) { - buffer.tqsetBufferFromCopy(TQByteArray()); // clear data + buffer.setBuffer(TQByteArray()); // clear data buffer.open( IO_WriteOnly ); KoXmlWriter columnsTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level columnsTmpWriter.startElement( "style:columns" ); @@ -3251,8 +3251,8 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle // if there's more than one pagemaster we need to rethink all this pageLayoutName = mainStyles.lookup( pageLayout, "pm" ); - pageLayout.writeStyle( stylesWriter, mainStyles, "style:page-tqlayout", pageLayoutName, - "style:page-tqlayout-properties", false /*don't close*/ ); + pageLayout.writeStyle( stylesWriter, mainStyles, "style:page-layout", pageLayoutName, + "style:page-layout-properties", false /*don't close*/ ); // Ouch another problem: there is only one header style in oasis // ##### can't have different borders for even/odd headers... @@ -3301,7 +3301,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle stylesWriter->endElement(); // header-style } } - stylesWriter->endElement(); // style:page-tqlayout + stylesWriter->endElement(); // style:page-layout // Headers and footers might have created new automatic parag/text styles -> save those KWOasisSaver::writeAutomaticStyles( *stylesWriter, mainStyles, true ); @@ -3313,7 +3313,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle stylesWriter->startElement( "office:master-styles" ); stylesWriter->startElement( "style:master-page" ); stylesWriter->addAttribute( "style:name", "Standard" ); - stylesWriter->addAttribute( "style:page-tqlayout-name", pageLayoutName ); + stylesWriter->addAttribute( "style:page-layout-name", pageLayoutName ); if ( isHeaderVisible() || isFooterVisible() ) { // ### TODO save them even when hidden (and not empty)? stylesWriter->addCompleteElement( headerFooterContent.data() ); @@ -3405,7 +3405,7 @@ void KWDocument::saveOasisBody( KoXmlWriter& writer, KoSavingContext& context ) TQDomDocument KWDocument::saveXML() { - m_varColl->variableSetting()->setModificationDate(TQDateTime::tqcurrentDateTime()); + m_varColl->variableSetting()->setModificationDate(TQDateTime::currentDateTime()); recalcVariables( VT_DATE ); recalcVariables( VT_TIME ); // for "current time" recalcVariables( VT_STATISTIC ); @@ -3601,7 +3601,7 @@ TQDomDocument KWDocument::saveXML() } // Save embedded objects - saveEmbeddedObjects( kwdoc, tqchildren() ); + saveEmbeddedObjects( kwdoc, children() ); return doc; } @@ -3779,7 +3779,7 @@ void KWDocument::paintContent( TQPainter& painter, const TQRect& rectangle, bool viewMode->setDrawFrameBackground( !transparent ); viewMode->setDrawSelections( false ); - TQColorGroup cg = TQApplication::tqpalette().active(); + TQColorGroup cg = TQApplication::palette().active(); if (!transparent) { @@ -3810,8 +3810,8 @@ TQPixmap KWDocument::generatePreview( const TQSize& size ) double oldZoomX = zoomedResolutionX(); double oldZoomY = zoomedResolutionY(); - // Sometimes (due to the different resolution?) the tqlayout creates a new page - // while saving the preview. If this happens, we don't want to tqrepaint the real views + // Sometimes (due to the different resolution?) the layout creates a new page + // while saving the preview. If this happens, we don't want to repaint the real views // (due to KWCanvas::slotNewContentsSize) // ##### One day when we have real doc/view separation in kotextparag, we shouldn't mess with // the real view's resolution, we should instead create a fake view for the preview itself. @@ -3887,7 +3887,7 @@ KWPartFrameSet* KWDocument::insertObject( const KoRect& rect, KoDocumentEntry& e KWCreateFrameCommand *cmd = new KWCreateFrameCommand( i18n("Create Part Frame"), frame); addCommand(cmd); - frameChanged( frame ); // tqrepaint etc. + frameChanged( frame ); // repaint etc. return frameset; } @@ -4210,7 +4210,7 @@ TQString KWDocument::generateFramesetName( const TQString & templateName ) int num = 1; bool exists; do { - name = templateName.tqarg( num ); + name = templateName.arg( num ); exists = frameSetByName( name ); ++num; } while ( exists ); @@ -4364,7 +4364,7 @@ void KWDocument::setHeaderVisible( bool h ) m_headerVisible = h; recalcFrames(); updateAllFrames(); - tqlayout(); + layout(); setModified(true); repaintAllViews( true ); } @@ -4374,7 +4374,7 @@ void KWDocument::setFooterVisible( bool f ) m_footerVisible = f; recalcFrames(); updateAllFrames(); - tqlayout(); + layout(); setModified(true); repaintAllViews( true ); } @@ -4457,9 +4457,9 @@ void KWDocument::setMailMergeRecord( int r ) slRecordNum = r; } -void KWDocument::getPageLayout( KoPageLayout& tqlayout, KoColumns& cl, KoKWHeaderFooter& hf ) +void KWDocument::getPageLayout( KoPageLayout& layout, KoColumns& cl, KoKWHeaderFooter& hf ) { - tqlayout = m_pageLayout; + layout = m_pageLayout; cl = m_pageColumns; hf = m_pageHeaderFooter; } @@ -4560,20 +4560,20 @@ void KWDocument::printDebug() } #endif -void KWDocument::tqlayout() +void KWDocument::layout() { TQPtrListIterator it = framesetsIterator(); for (; it.current(); ++it ) if ( it.current()->isVisible() ) - it.current()->tqlayout(); + it.current()->layout(); } -void KWDocument::tqinvalidate(const KWFrameSet *skipThisFrameSet) +void KWDocument::invalidate(const KWFrameSet *skipThisFrameSet) { TQPtrListIterator it = framesetsIterator(); for (; it.current(); ++it ) if(it.current()!=skipThisFrameSet) - it.current()->tqinvalidate(); + it.current()->invalidate(); } KFormula::Document* KWDocument::formulaDocument( bool init ) @@ -4835,7 +4835,7 @@ void KWDocument::slotChapterParagraphFormatted( KoTextParag* /*parag*/ ) { // Attempt at invalidating from the parag's page only // But that's not good enough - if a header gets moved down, - // we also need to tqinvalidate the previous page, from where the paragraph disappeared. + // we also need to invalidate the previous page, from where the paragraph disappeared. /* KoPoint p; KWFrame* frame = internalToDocument( parag->rect().topLeft(), p ); @@ -5033,7 +5033,7 @@ void KWDocument::displayFootNoteFieldCode() KoTextParag * parag = it.current()->paragraph(); if ( parag ) { - parag->tqinvalidate( 0 ); + parag->invalidate( 0 ); parag->setChanged( true ); } } @@ -5058,7 +5058,7 @@ void KWDocument::changeFootNoteConfig() KoTextParag * parag = footNoteVar->paragraph(); if ( parag ) { - parag->tqinvalidate( 0 ); + parag->invalidate( 0 ); parag->setChanged( true ); } KoTextDocument* textdoc = parag->textDocument(); @@ -5083,7 +5083,7 @@ void KWDocument::setTabStopValue ( double tabStop ) KWTextFrameSet *frm; for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ){ frm->textDocument()->setTabStops( ptToLayoutUnitPixX( tabStop )); - frm->tqlayout(); + frm->layout(); } repaintAllViews(); } @@ -5120,11 +5120,11 @@ void KWDocument::switchViewMode( const TQString& newViewModeType ) (*it)->switchModeView(); emit newContentsSize(); - // Since the text tqlayout depends on the view mode, we need to redo it + // Since the text layout depends on the view mode, we need to redo it // But after telling the canvas about the new viewmode, otherwise stuff like // slotNewContentsSize will crash. updateAllFrames(); - tqlayout(); + layout(); repaintAllViews( true ); for( TQValueList::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) @@ -5395,7 +5395,7 @@ void KWDocument::setEmpty() { KoDocument::setEmpty(); // Whether loaded from template or from empty doc: this is a new one -> set creation date - m_varColl->variableSetting()->setCreationDate(TQDateTime::tqcurrentDateTime()); + m_varColl->variableSetting()->setCreationDate(TQDateTime::currentDateTime()); recalcVariables( VT_DATE ); // , VST_CREATION_DATE ... // If we then load a document, it will override that date. } @@ -5466,15 +5466,15 @@ void KWDocument::FramesChangedHandler::execute() { KWFrameSet *fs = *iter; fs->updateFrames(); if(!m_needLayout) - fs->tqlayout(); + fs->layout(); } KWFrameList::recalcAllFrames(m_parent); } - // If frame with text flowing around it -> re-tqlayout all frames + // If frame with text flowing around it -> re-layout all frames if ( m_needLayout) - m_parent->tqlayout(); + m_parent->layout(); //m_parent->repaintAllViewsExcept( 0 ); m_parent->repaintAllViews(); m_parent->updateRulerFrameStartEnd(); diff --git a/kword/KWDocument.h b/kword/KWDocument.h index fcda863f..1a9aa16e 100644 --- a/kword/KWDocument.h +++ b/kword/KWDocument.h @@ -214,9 +214,9 @@ public: /// because KoDocument:insertChild is protected. KWDocumentChild* createChildDoc( const KoRect& rect, KoDocument* childDoc ); - void setPageLayout( const KoPageLayout& tqlayout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews = true ); + void setPageLayout( const KoPageLayout& layout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews = true ); - void getPageLayout( KoPageLayout& tqlayout, KoColumns& cl, KoKWHeaderFooter& hf ); + void getPageLayout( KoPageLayout& layout, KoColumns& cl, KoKWHeaderFooter& hf ); KWTextFrameSet * textFrameSet ( unsigned int num ) const; /// Return the frameset number @p num @@ -268,12 +268,12 @@ public: /** - * schedule a tqrepaint of all views but don't execute immediately + * schedule a repaint of all views but don't execute immediately */ void delayedRepaintAllViews(); /** - * schedule a frame tqlayout (e.g. for footnotes) but don't execute immediately + * schedule a frame layout (e.g. for footnotes) but don't execute immediately */ void delayedRecalcFrames( int fromPage ); @@ -437,7 +437,7 @@ public: //int applyStyleChangeMask() { return styleMask; } //void setApplyStyleChangeMask( int f ) { styleMask = f; } - // paragLayoutChanged is a set of flags for the parag tqlayout - see the enum in KWParagLayout + // paragLayoutChanged is a set of flags for the parag layout - see the enum in KWParagLayout // formatChanged is a set of flags from KoTextFormat // If both are -1, it means the style has been deleted. void applyStyleChange( KoStyleChangeDefMap changed ); @@ -519,7 +519,7 @@ public: void newZoomAndResolution( bool updateViews, bool forPrint ); /** - * Due to the way the text formatter works (it caches tqlayout information in + * Due to the way the text formatter works (it caches layout information in * the paragraphs and characters), we currently can't have one viewmode per view. * It has to be the same for all views. */ @@ -565,8 +565,8 @@ public: void printDebug(); #endif - /** calls tqlayout() on all framesets */ - void tqlayout(); + /** calls layout() on all framesets */ + void layout(); // This settings has to be here [instead of KWView] because we need to // format paragraphs slightly differently (to add room for the CR char) @@ -764,7 +764,7 @@ public: KWBgSpellCheck* backSpeller() const { return m_bgSpellCheck; } - /// Load the given page tqlayout; public for KWTextParag + /// Load the given page layout; public for KWTextParag bool loadOasisPageLayout( const TQString& masterPageName, KoOasisContext& context ); // end of public methods @@ -773,7 +773,7 @@ signals: /// This is emitted by setPageLayout if updateViews=true void pageLayoutChanged( const KoPageLayout& ); - /// Emitted when the scrollview contents must be resized (e.g. new page, new tqlayout...) + /// Emitted when the scrollview contents must be resized (e.g. new page, new layout...) void newContentsSize(); /** This is emitted when the height of the text in the main frameset changes @@ -796,8 +796,8 @@ public slots: void slotRepaintChanged( KWFrameSet * frameset ); void framesChanged( const TQValueList &frames); - /** calls tqinvalidate() on all framesets */ - void tqinvalidate(const KWFrameSet *skipThisFrameSet=0); + /** calls invalidate() on all framesets */ + void invalidate(const KWFrameSet *skipThisFrameSet=0); virtual void initEmpty(); diff --git a/kword/KWEditPersonnalExpression.cpp b/kword/KWEditPersonnalExpression.cpp index 3638301d..501705e0 100644 --- a/kword/KWEditPersonnalExpression.cpp +++ b/kword/KWEditPersonnalExpression.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include KWEditPersonnalExpression::KWEditPersonnalExpression( TQWidget *parent, const char *name ) : KDialogBase( parent, name , true, i18n("Edit Personal Expression"), Ok|Cancel, Ok, true ) @@ -40,62 +40,62 @@ KWEditPersonnalExpression::KWEditPersonnalExpression( TQWidget *parent, const ch setMainWidget(page); TQGridLayout* form1Layout = new TQGridLayout( page, 1, 1, 0, KDialog::spacingHint(), "form1Layout"); - TQHBoxLayout *hortqlayout1 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "hortqlayout1"); + TQHBoxLayout *horlayout1 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "horlayout1"); TQLabel *groupnameLabel = new TQLabel(i18n("Group name:"), page, "groupnameLabel" ); - hortqlayout1->addWidget( groupnameLabel ); + horlayout1->addWidget( groupnameLabel ); m_groupLineEdit = new TQLineEdit( page, "groupLineEdit" ); - hortqlayout1->addWidget( m_groupLineEdit ); + horlayout1->addWidget( m_groupLineEdit ); - form1Layout->addLayout( hortqlayout1, 0, 1 ); + form1Layout->addLayout( horlayout1, 0, 1 ); TQGroupBox *expressionGroupBox = new TQGroupBox( page, "expressionGroupBox" ); - expressionGroupBox->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 0, expressionGroupBox->sizePolicy().hasHeightForWidth() ) ); + expressionGroupBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 0, expressionGroupBox->sizePolicy().hasHeightForWidth() ) ); expressionGroupBox->setTitle( i18n( "Expressions" ) ); expressionGroupBox->setColumnLayout(0, Qt::Vertical ); - expressionGroupBox->tqlayout()->setSpacing( KDialog::spacingHint() ); - expressionGroupBox->tqlayout()->setMargin( KDialog::marginHint() ); - TQVBoxLayout *expressionGroupBoxLayout = new TQVBoxLayout( expressionGroupBox->tqlayout() ); - expressionGroupBoxLayout->tqsetAlignment( TQt::AlignTop ); + expressionGroupBox->layout()->setSpacing( KDialog::spacingHint() ); + expressionGroupBox->layout()->setMargin( KDialog::marginHint() ); + TQVBoxLayout *expressionGroupBoxLayout = new TQVBoxLayout( expressionGroupBox->layout() ); + expressionGroupBoxLayout->setAlignment( TQt::AlignTop ); m_ExpressionsList = new TQListBox( expressionGroupBox, "listOfExpressions" ); - m_ExpressionsList->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 1, 0, m_ExpressionsList->sizePolicy().hasHeightForWidth() ) ); + m_ExpressionsList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 1, 0, m_ExpressionsList->sizePolicy().hasHeightForWidth() ) ); expressionGroupBoxLayout->addWidget( m_ExpressionsList ); m_expressionLineEdit = new TQLineEdit( expressionGroupBox, "expressionLineEdit" ); expressionGroupBoxLayout->addWidget( m_expressionLineEdit ); - TQHBoxLayout *hortqlayout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "hortqlayout2"); + TQHBoxLayout *horlayout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "horlayout2"); TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - hortqlayout2->addItem( spacer ); + horlayout2->addItem( spacer ); m_addExpression = new TQPushButton( i18n("&New"), expressionGroupBox, "m_addExpression" ); - hortqlayout2->addWidget( m_addExpression ); + horlayout2->addWidget( m_addExpression ); m_delExpression = new TQPushButton( i18n("&Delete"), expressionGroupBox, "m_delExpression" ); - hortqlayout2->addWidget( m_delExpression ); - expressionGroupBoxLayout->addLayout( hortqlayout2 ); + horlayout2->addWidget( m_delExpression ); + expressionGroupBoxLayout->addLayout( horlayout2 ); form1Layout->addWidget( expressionGroupBox, 1, 1 ); - TQVBoxLayout *verttqlayout = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "verttqlayout"); + TQVBoxLayout *vertlayout = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "vertlayout"); m_groupList = new TQListBox( page, "groupList" ); m_groupList->insertItem( "group1" ); m_groupList->setMaximumSize( TQSize( 200, 32767 ) ); - verttqlayout->addWidget( m_groupList ); + vertlayout->addWidget( m_groupList ); - TQHBoxLayout *hortqlayout3 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "hortqlayout3"); + TQHBoxLayout *horlayout3 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "horlayout3"); m_addGroup = new TQPushButton( i18n("New"), page, "m_addGroup" ); - hortqlayout3->addWidget( m_addGroup ); + horlayout3->addWidget( m_addGroup ); m_delGroup = new TQPushButton(i18n("Delete"), page, "m_delGroup" ); - hortqlayout3->addWidget( m_delGroup ); - verttqlayout->addLayout( hortqlayout3 ); + horlayout3->addWidget( m_delGroup ); + vertlayout->addLayout( horlayout3 ); - form1Layout->addMultiCellLayout( verttqlayout, 0, 1, 0, 0 ); + form1Layout->addMultiCellLayout( vertlayout, 0, 1, 0, 0 ); loadFile(); if(listExpression.count() == 0) diff --git a/kword/KWFindReplace.cpp b/kword/KWFindReplace.cpp index f1168ba3..6b9ce223 100644 --- a/kword/KWFindReplace.cpp +++ b/kword/KWFindReplace.cpp @@ -55,8 +55,8 @@ void KWFindReplace::emitNewCommand(KCommand *cmd) void KWFindReplace::highlightPortion(KoTextParag * parag, int index, int length, KoTextDocument *textdocument, KDialogBase* dialog) { KWTextDocument *textdoc=static_cast(textdocument); - bool tqrepaint = isReplace() ? options() & KReplaceDialog::PromptOnReplace : true; - textdoc->textFrameSet()->highlightPortion( parag, index, length, m_canvas, tqrepaint, dialog ); + bool repaint = isReplace() ? options() & KReplaceDialog::PromptOnReplace : true; + textdoc->textFrameSet()->highlightPortion( parag, index, length, m_canvas, repaint, dialog ); } #include "KWFindReplace.moc" diff --git a/kword/KWFootNoteDia.cpp b/kword/KWFootNoteDia.cpp index 24060cf2..5822c299 100644 --- a/kword/KWFootNoteDia.cpp +++ b/kword/KWFootNoteDia.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include "KWConfigFootNoteDia.h" diff --git a/kword/KWFormulaFrameSet.cpp b/kword/KWFormulaFrameSet.cpp index f8d597e8..f54942a4 100644 --- a/kword/KWFormulaFrameSet.cpp +++ b/kword/KWFormulaFrameSet.cpp @@ -219,7 +219,7 @@ void KWFormulaFrameSet::slotFormulaChanged( double width, double height ) m_frames.first()->setHeight( height ); updateFrames(); - kWordDocument()->tqlayout(); + kWordDocument()->layout(); if ( ( oldWidth != width ) || ( oldHeight != height ) ) { kWordDocument()->repaintAllViews( false ); kWordDocument()->updateRulerFrameStartEnd(); diff --git a/kword/KWFrame.cpp b/kword/KWFrame.cpp index a559b892..e1cdb9d8 100644 --- a/kword/KWFrame.cpp +++ b/kword/KWFrame.cpp @@ -166,7 +166,7 @@ void KWFrame::copySettings(KWFrame *frm) void KWFrame::frameBordersChanged() { if (frameSet()->isFloating()) - frameSet()->anchorFrameset()->tqinvalidate(); + frameSet()->anchorFrameset()->invalidate(); } diff --git a/kword/KWFrame.h b/kword/KWFrame.h index 88552259..fbd53572 100644 --- a/kword/KWFrame.h +++ b/kword/KWFrame.h @@ -24,7 +24,7 @@ #include "defs.h" #include -#include +#include #include "KoBorder.h" #include @@ -221,7 +221,7 @@ public: /** The "internal Y" is the offset (in pt) of the real frame showed in this one * ("real" means "the last that isn't a copy") * This offset in pt is the sum of the height of the frames before that one. - * For text frames, this is equivalent to the tqlayout units (after multiplication). */ + * For text frames, this is equivalent to the layout units (after multiplication). */ void setInternalY( double y ) { m_internalY = y; } double internalY() const { return m_internalY; } diff --git a/kword/KWFrameDia.cpp b/kword/KWFrameDia.cpp index 2d9cb423..ec5578ee 100644 --- a/kword/KWFrameDia.cpp +++ b/kword/KWFrameDia.cpp @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include @@ -67,7 +67,7 @@ void KWBrushStylePreview::drawContents( TQPainter* painter ) { painter->save(); painter->translate( contentsRect().x(), contentsRect().y() ); - painter->fillRect( contentsRect(), tqcolorGroup().base() ); // in case of a transparent brush + painter->fillRect( contentsRect(), colorGroup().base() ); // in case of a transparent brush painter->fillRect( contentsRect(), brush ); painter->restore(); } @@ -102,7 +102,7 @@ KWFrameDia::KWFrameDia( TQWidget* parent, KWFrame *frame) kdDebug() << "ERROR: KWFrameDia::constructor no frame.."<frameSet()->name() ) ); + setCaption( i18n( "Frame Properties for %1" ).arg( m_frame->frameSet()->name() ) ); KWFrameSet *fs = m_frame->frameSet()->groupmanager(); if(fs==0L) fs=m_frame->frameSet(); m_frameType = fs->type(); @@ -149,7 +149,7 @@ KWFrameDia::KWFrameDia( TQWidget *parent, TQPtrList listOfFrames) : KDi return; } if ( listOfFrames.count() == 1 ) - setCaption( i18n( "Frame Settings for %1" ).tqarg( f->frameSet()->name() ) ); + setCaption( i18n( "Frame Settings for %1" ).arg( f->frameSet()->name() ) ); KWFrameSet *fs = f->frameSet()->groupmanager(); if(fs==0L) fs=f->frameSet(); @@ -518,14 +518,14 @@ void KWFrameDia::setupTab1(){ // TAB Frame Options m_grid1->addWidget(m_sideHeads, row, 0); m_sideGrid = new TQGridLayout( m_sideHeads, 4, 2, KDialog::marginHint(), KDialog::spacingHint() ); - sideTitle1 = new TQLabel ( i18n("Size (%1):").tqarg(m_doc->unitName()),m_sideHeads); - sideTitle1->resize(sideTitle1->tqsizeHint()); + sideTitle1 = new TQLabel ( i18n("Size (%1):").arg(m_doc->unitName()),m_sideHeads); + sideTitle1->resize(sideTitle1->sizeHint()); m_sideGrid->addWidget(sideTitle1,1,0); m_sideWidth= new TQLineEdit(m_sideHeads,""); m_sideWidth->setMaxLength(6); m_sideGrid->addWidget(m_sideWidth,1,1); - sideTitle2 = new TQLabel( i18n("Gap size (%1):").tqarg(m_doc->unitName()),m_sideHeads); - sideTitle2->resize(sideTitle2->tqsizeHint()); + sideTitle2 = new TQLabel( i18n("Gap size (%1):").arg(m_doc->unitName()),m_sideHeads); + sideTitle2->resize(sideTitle2->sizeHint()); m_sideGrid->addWidget(sideTitle2,2,0); m_sideGap = new TQLineEdit(m_sideHeads,""); m_sideGap->setMaxLength(6); @@ -536,7 +536,7 @@ void KWFrameDia::setupTab1(){ // TAB Frame Options m_sideAlign->insertItem ( i18n("Right")); m_sideAlign->insertItem ( i18n("Closest to Binding")); m_sideAlign->insertItem ( i18n("Closest to Page Edge")); - m_sideAlign->resize(m_sideAlign->tqsizeHint()); + m_sideAlign->resize(m_sideAlign->sizeHint()); m_sideGrid->addMultiCellWidget(m_sideAlign,3,3,0,1); m_sideGrid->addRowSpacing( 0, KDialog::marginHint() + 5 ); @@ -614,9 +614,9 @@ void KWFrameDia::setupTab2() { // TAB Text Runaround // First groupbox m_runGroup = new TQButtonGroup( i18n( "Layout of Text in Other Frames" ), m_tab2); m_runGroup->setColumnLayout( 0, Qt::Vertical ); - m_runGroup->tqlayout()->setSpacing( KDialog::spacingHint() ); - TQGridLayout *groupBox1Layout = new TQGridLayout( m_runGroup->tqlayout() ); - groupBox1Layout->tqsetAlignment( TQt::AlignTop ); + m_runGroup->layout()->setSpacing( KDialog::spacingHint() ); + TQGridLayout *groupBox1Layout = new TQGridLayout( m_runGroup->layout() ); + groupBox1Layout->setAlignment( TQt::AlignTop ); m_rRunNo = new TQRadioButton( i18n( "Text will run &through this frame" ), m_runGroup ); groupBox1Layout->addWidget( m_rRunNo, 0, 1 ); @@ -650,10 +650,10 @@ void KWFrameDia::setupTab2() { // TAB Text Runaround // Second groupbox m_runSideGroup = new TQButtonGroup( i18n( "Run Around Side" ), m_tab2); m_runSideGroup->setColumnLayout( 0, Qt::Vertical ); - m_runSideGroup->tqlayout()->setSpacing( KDialog::spacingHint() ); - m_runSideGroup->tqlayout()->setMargin( KDialog::marginHint() ); - TQGridLayout *runSideLayout = new TQGridLayout( m_runSideGroup->tqlayout() ); - runSideLayout->tqsetAlignment( TQt::AlignTop ); + m_runSideGroup->layout()->setSpacing( KDialog::spacingHint() ); + m_runSideGroup->layout()->setMargin( KDialog::marginHint() ); + TQGridLayout *runSideLayout = new TQGridLayout( m_runSideGroup->layout() ); + runSideLayout->setAlignment( TQt::AlignTop ); m_rRunLeft = new TQRadioButton( i18n( "Run Around", "&Left" ), m_runSideGroup ); runSideLayout->addWidget( m_rRunLeft, 0, 0 /*1*/ ); @@ -803,9 +803,9 @@ void KWFrameDia::setupTab3(){ // TAB Frameset myGroup->insert(m_rExistingFrameset,1); connect (m_rExistingFrameset, TQT_SIGNAL( toggled(bool)), this, TQT_SLOT(ensureValidFramesetSelected())); - TQHBoxLayout *tqlayout2 = new TQHBoxLayout( 0, 0, 6); + TQHBoxLayout *layout2 = new TQHBoxLayout( 0, 0, 6); TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); - tqlayout2->addItem( spacer ); + layout2->addItem( spacer ); m_lFrameSList = new TQListView( m_tab3, "m_lFrameSList" ); m_lFrameSList->addColumn( i18n("No.") ); @@ -815,8 +815,8 @@ void KWFrameDia::setupTab3(){ // TAB Frameset connect( m_lFrameSList, TQT_SIGNAL(selectionChanged ()),this,TQT_SLOT(selectExistingFrameset ()) ); connect (m_lFrameSList, TQT_SIGNAL( selectionChanged()), this, TQT_SLOT(ensureValidFramesetSelected())); - tqlayout2->addWidget( m_lFrameSList ); - tabLayout->addLayout( tqlayout2 ); + layout2->addWidget( m_lFrameSList ); + tabLayout->addLayout( layout2 ); m_rNewFrameset = new TQRadioButton( m_tab3); m_rNewFrameset->setText( i18n( "Create a new frameset" ) ); @@ -829,14 +829,14 @@ void KWFrameDia::setupTab3(){ // TAB Frameset line1->setFrameShape( TQFrame::HLine ); tabLayout->addWidget( line1 ); - TQHBoxLayout *tqlayout1 = new TQHBoxLayout( 0, 0, 6 ); + TQHBoxLayout *layout1 = new TQHBoxLayout( 0, 0, 6 ); TQLabel *textLabel1 = new TQLabel( m_tab3 ); textLabel1->setText( i18n( "Name of frameset:" ) ); - tqlayout1->addWidget( textLabel1 ); + layout1->addWidget( textLabel1 ); m_eFrameSetName = new TQLineEdit( m_tab3 ); - tqlayout1->addWidget( m_eFrameSetName ); - tabLayout->addLayout( tqlayout1 ); + layout1->addWidget( m_eFrameSetName ); + tabLayout->addLayout( layout1 ); int amount=0; // now fill the gui. @@ -853,7 +853,7 @@ void KWFrameDia::setupTab3(){ // TAB Frameset if ( fs->isDeleted() ) continue; TQListViewItem *item = new TQListViewItem( m_lFrameSList ); - item->setText( 0, TQString( "%1" ).tqarg( i + 1 ) ); + item->setText( 0, TQString( "%1" ).arg( i + 1 ) ); item->setText( 1, fs->name() ); amount++; if( m_frame && m_frame->frameSet() == fs ) { @@ -961,43 +961,43 @@ void KWFrameDia::setupTab4() { // TAB Geometry TQGridLayout* pGrid = new TQGridLayout( m_grp1, 3, 4, KDialog::marginHint(), KDialog::spacingHint() ); m_lx = new TQLabel( i18n( "Left:" ), m_grp1 ); - m_lx->resize( m_lx->tqsizeHint() ); + m_lx->resize( m_lx->sizeHint() ); pGrid->addWidget( m_lx, 1, 0 ); m_sx = new KoUnitDoubleSpinBox( m_grp1, 0, 9999, 1, 0.0, m_doc->unit() ); - m_sx->resize( m_sx->tqsizeHint() ); + m_sx->resize( m_sx->sizeHint() ); pGrid->addWidget( m_sx, 1, 1 ); m_ly = new TQLabel( i18n( "Top:" ), m_grp1 ); - m_ly->resize( m_ly->tqsizeHint() ); + m_ly->resize( m_ly->sizeHint() ); pGrid->addWidget( m_ly, 1, 2 ); m_sy = new KoUnitDoubleSpinBox( m_grp1, 0, 9999, 1, 0.0, m_doc->unit() ); - m_sy->resize( m_sy->tqsizeHint() ); + m_sy->resize( m_sy->sizeHint() ); pGrid->addWidget( m_sy, 1, 3 ); m_lw = new TQLabel( i18n( "Width:" ), m_grp1 ); - m_lw->resize( m_lw->tqsizeHint() ); + m_lw->resize( m_lw->sizeHint() ); pGrid->addWidget( m_lw, 2, 0 ); m_sw = new KoUnitDoubleSpinBox( m_grp1, 0, 9999, 1, 0.0, m_doc->unit() ); - m_sw->resize( m_sw->tqsizeHint() ); + m_sw->resize( m_sw->sizeHint() ); connect( m_sw, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotUpdateHeightForWidth(double)) ); pGrid->addWidget( m_sw, 2, 1 ); m_lh = new TQLabel( i18n( "Height:" ), m_grp1 ); - m_lh->resize( m_lh->tqsizeHint() ); + m_lh->resize( m_lh->sizeHint() ); pGrid->addWidget( m_lh, 2, 2 ); m_sh = new KoUnitDoubleSpinBox( m_grp1, 0, 9999, 1, 0.0, m_doc->unit() ); connect( m_sh, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotUpdateWidthForHeight(double)) ); - m_sh->resize( m_sh->tqsizeHint() ); + m_sh->resize( m_sh->sizeHint() ); pGrid->addWidget( m_sh, 2, 3 ); @@ -1290,10 +1290,10 @@ void KWFrameDia::setupTab6() // Border style TQGroupBox *grp=new TQGroupBox( 0, Qt::Vertical, i18n( "Preview" ), m_tab6, "previewgrp" ); grid->addMultiCellWidget( grp , 0, 7, 1, 1 ); - grp->tqlayout()->setSpacing(KDialog::spacingHint()); - grp->tqlayout()->setMargin(KDialog::marginHint()); + grp->layout()->setSpacing(KDialog::spacingHint()); + grp->layout()->setMargin(KDialog::marginHint()); m_prev3 = new KoBorderPreview( grp ); - TQVBoxLayout *lay1 = new TQVBoxLayout( grp->tqlayout() ); + TQVBoxLayout *lay1 = new TQVBoxLayout( grp->layout() ); lay1->addWidget(m_prev3); connect( m_prev3, TQT_SIGNAL( choosearea(TQMouseEvent * ) ), @@ -1627,7 +1627,7 @@ void KWFrameDia::updateBrushPreview() } else { brushPreview->show(); brushPreview->setBrush(frameBrushStyle()); - brushPreview->tqrepaint(true); + brushPreview->repaint(true); } } #endif @@ -1857,11 +1857,11 @@ bool KWFrameDia::applyChanges() i18n( "A new frameset with the name '%1' " "can not be made because a frameset with that name " "already exists. Please enter another name or select " - "an existing frameset from the list.").tqarg(name)); + "an existing frameset from the list.").arg(name)); else KMessageBox::sorry( this, i18n( "A frameset with the name '%1' " - "already exists. Please enter another name." ).tqarg(name) ); + "already exists. Please enter another name." ).arg(name) ); m_eFrameSetName->setText(m_oldFrameSetName); return false; } @@ -2330,7 +2330,7 @@ bool KWFrameDia::applyChanges() void KWFrameDia::updateFrames() { m_doc->updateAllFrames(); - m_doc->tqlayout(); + m_doc->layout(); m_doc->repaintAllViews(); } @@ -2374,7 +2374,7 @@ bool KWFrameDia::mayDeleteFrameSet(KWTextFrameSet *fs) { i18n( "You are about to reconnect the last frame of the " "frameset '%1'. " "The contents of this frameset will be deleted.\n" - "Are you sure you want to do that?").tqarg(fs->name()), + "Are you sure you want to do that?").arg(fs->name()), i18n("Reconnect Frame"), i18n("&Reconnect")); if (result != KMessageBox::Continue) return false; @@ -2397,7 +2397,7 @@ KWFourSideConfigWidget::KWFourSideConfigWidget( KWDocument* doc, const TQString& mGrid->addMultiCellWidget( m_synchronize, 1, 1, 0, 1 ); TQLabel* lml = new TQLabel( i18n( "Left:" ), grp2 ); - //lml->resize( lml->tqsizeHint() ); + //lml->resize( lml->sizeHint() ); mGrid->addWidget( lml, 2, 0 ); m_inputLeft = new KoUnitDoubleSpinBox( grp2, 0, 9999, 1, 0.0, m_doc->unit() ); @@ -2405,31 +2405,31 @@ KWFourSideConfigWidget::KWFourSideConfigWidget( KWDocument* doc, const TQString& mGrid->addWidget( m_inputLeft, 2, 1 ); TQLabel* lmt = new TQLabel( i18n( "Top:" ), grp2 ); - //lmt->resize( lmt->tqsizeHint() ); + //lmt->resize( lmt->sizeHint() ); mGrid->addWidget( lmt, 2, 2 ); m_inputTop = new KoUnitDoubleSpinBox( grp2, 0, 9999, 1, 0.0, m_doc->unit() ); - //m_inputTop->resize( m_inputTop->tqsizeHint() ); + //m_inputTop->resize( m_inputTop->sizeHint() ); mGrid->addWidget( m_inputTop, 2, 3 ); TQLabel* lmr = new TQLabel( i18n( "Right:" ), grp2 ); - //lmr->resize( lmr->tqsizeHint() ); + //lmr->resize( lmr->sizeHint() ); mGrid->addWidget( lmr, 3, 0 ); m_inputRight = new KoUnitDoubleSpinBox( grp2, 0, 9999, 1, 0.0, m_doc->unit() ); - //m_inputRight->resize( m_inputRight->tqsizeHint() ); + //m_inputRight->resize( m_inputRight->sizeHint() ); mGrid->addWidget( m_inputRight, 3, 1 ); TQLabel* lmb = new TQLabel( i18n( "Bottom:" ), grp2 ); - //lmb->resize( lmb->tqsizeHint() ); + //lmb->resize( lmb->sizeHint() ); mGrid->addWidget( lmb, 3, 2 ); m_inputBottom = new KoUnitDoubleSpinBox( grp2, 0, 9999, 1, 0.0, m_doc->unit() ); - //m_inputBottom->resize( m_inputBottom->tqsizeHint() ); + //m_inputBottom->resize( m_inputBottom->sizeHint() ); mGrid->addWidget( m_inputBottom, 3, 3 ); mGrid->setRowSpacing( 0, KDialog::spacingHint() + 5 ); diff --git a/kword/KWFrameLayout.cpp b/kword/KWFrameLayout.cpp index 5a484198..8db6227a 100644 --- a/kword/KWFrameLayout.cpp +++ b/kword/KWFrameLayout.cpp @@ -38,7 +38,7 @@ KWFrameLayout::HeaderFooterFrameset::HeaderFooterFrameset( KWTextFrameSet* fs, i if ( fs->frameCount() > 0 ) m_height = fs->frame(0)->height(); else - m_height = 20; // whatever. The text tqlayout will resize it. + m_height = 20; // whatever. The text layout will resize it. Q_ASSERT( m_height > 0 ); } @@ -129,13 +129,13 @@ int KWFrameLayout::HeaderFooterFrameset::frameNumberForPage( int page ) const ///// -void KWFrameLayout::tqlayout( KWFrameSet* mainTextFrameSet, int numColumns, +void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, int fromPage, int toPage, uint flags ) { - //kdDebug(32002) << "KWFrameLayout::tqlayout " << kdBacktrace() << endl; + //kdDebug(32002) << "KWFrameLayout::layout " << kdBacktrace() << endl; // Just debug stuff #ifdef DEBUG_FRAMELAYOUT - kdDebug(32002) << "KWFrameLayout::tqlayout " << fromPage << " to " << toPage << endl; + kdDebug(32002) << "KWFrameLayout::layout " << fromPage << " to " << toPage << endl; Q_ASSERT( toPage >= fromPage ); TQPtrListIterator itdbg( m_headersFooters ); for ( ; itdbg.current() ; ++itdbg ) @@ -492,10 +492,10 @@ void KWFrameLayout::tqlayout( KWFrameSet* mainTextFrameSet, int numColumns, KWTextFrameSet* fs = static_cast(mainTextFrameSet); // Not right now, this could be called during formatting... - //m_doc->tqinvalidate(); - // ### This means the tqlayout will be done during painting. Not good. - // What about mainTextFrameSet->tqinvalidate() or even tqlayout()? - //TQTimer::singleShot( 0, m_doc, TQT_SLOT( tqinvalidate() ) ); + //m_doc->invalidate(); + // ### This means the layout will be done during painting. Not good. + // What about mainTextFrameSet->invalidate() or even layout()? + //TQTimer::singleShot( 0, m_doc, TQT_SLOT( invalidate() ) ); // Invalidate main textframeset only, and from top of page only. // Otherwise loading a long document (with headers/footers) takes ages, @@ -549,8 +549,8 @@ void KWFrameLayout::resizeOrCreateHeaderFooter( KWTextFrameSet* headerFooter, ui m_framesetsToUpdate.insert( headerFooter, true ); } -// Called at beginning and end of the tqlayout for a given page, -// to determine if the main-text-frame tqlayout really changed or not. +// Called at beginning and end of the layout for a given page, +// to determine if the main-text-frame layout really changed or not. // Testing in resizeMainTextFrame doesn't work, we call it several times, // once for each footnote, so it can't detect the "no change" case. KoRect KWFrameLayout::firstColumnRect( KWFrameSet* mainTextFrameSet, int pageNum, int numColumns ) const diff --git a/kword/KWFrameLayout.h b/kword/KWFrameLayout.h index 18089ee5..c4b3f7eb 100644 --- a/kword/KWFrameLayout.h +++ b/kword/KWFrameLayout.h @@ -68,7 +68,7 @@ public: // frame number for the given page.... -1 if no frame on that page // The first frame is number 0. int frameNumberForPage( int page ) const; - // The last frame we need (0-based), tqlayout() will delete any frame after that + // The last frame we need (0-based), layout() will delete any frame after that int lastFrameNumber( int lastPage ) const; void debug(); @@ -89,14 +89,14 @@ public: enum { DontRemovePages = 1 }; /** - * The main method of this file. Do the frame tqlayout. + * The main method of this file. Do the frame layout. * @param mainTextFrameSet if set, its frames will be resized. Usually: set in WP mode, not set in DTP mode. * @param numColumns number of columns to create for the main textframeset. Only relevant if mainTextFrameSet!=0. - * @param fromPage first page to tqlayout ( 0-based ) - * @param toPage last page to tqlayout ( 0-based ) + * @param fromPage first page to layout ( 0-based ) + * @param toPage last page to layout ( 0-based ) * @param flags see enum above */ - void tqlayout( KWFrameSet* mainTextFrameSet, int numColumns, + void layout( KWFrameSet* mainTextFrameSet, int numColumns, int fromPage, int toPage, uint flags ); protected: diff --git a/kword/KWFrameSet.cpp b/kword/KWFrameSet.cpp index d1129b1f..515b0df0 100644 --- a/kword/KWFrameSet.cpp +++ b/kword/KWFrameSet.cpp @@ -292,7 +292,7 @@ void KWFrameSet::setFloating() frameSet->findPosition( dPoint, parag, index ); // Create anchor. TODO: refcount the anchors! setAnchored( frameSet, parag, index ); - frameSet->tqlayout(); + frameSet->layout(); m_doc->frameChanged( m_frames.first() ); return; } @@ -303,15 +303,15 @@ void KWFrameSet::setProtectSize( bool b) m_protectSize = b; } -void KWFrameSet::setAnchored( KWTextFrameSet* textfs, int paragId, int index, bool placeHolderExists /* = false */, bool tqrepaint ) +void KWFrameSet::setAnchored( KWTextFrameSet* textfs, int paragId, int index, bool placeHolderExists /* = false */, bool repaint ) { KWTextParag * parag = static_cast( textfs->textDocument()->paragAt( paragId ) ); Q_ASSERT( parag ); if ( parag ) - setAnchored( textfs, parag, index, placeHolderExists, tqrepaint ); + setAnchored( textfs, parag, index, placeHolderExists, repaint ); } -void KWFrameSet::setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int index, bool placeHolderExists /* = false */, bool tqrepaint ) +void KWFrameSet::setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int index, bool placeHolderExists /* = false */, bool repaint ) { kdDebug(32001) << "KWFrameSet::setAnchored " << textfs << " " << parag->paragId() << " " << index << " " << placeHolderExists << endl; Q_ASSERT( textfs ); @@ -321,7 +321,7 @@ void KWFrameSet::setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int in m_anchorTextFs = textfs; KWFrameList::createFrameList(textfs, m_doc); // remove ourselves from others list now we are inline if ( parag ) - createAnchors( parag, index, placeHolderExists, tqrepaint ); + createAnchors( parag, index, placeHolderExists, repaint ); if ( !placeHolderExists ) // i.e. not while loading { @@ -381,7 +381,7 @@ KWAnchor * KWFrameSet::createAnchor( KoTextDocument *txt, int frameNum ) } void KWFrameSet::createAnchors( KoTextParag * parag, int index, bool placeHolderExists /*= false */ /*only used when loading*/, - bool tqrepaint ) + bool repaint ) { kdDebug(32001) << "KWFrameSet::createAnchors" << endl; Q_ASSERT( m_anchorTextFs ); @@ -398,7 +398,7 @@ void KWFrameSet::createAnchors( KoTextParag * parag, int index, bool placeHolder } } parag->setChanged( true ); - if ( tqrepaint ) + if ( repaint ) emit repaintChanged( m_anchorTextFs ); } @@ -460,7 +460,7 @@ void KWFrameSet::moveFloatingFrame( int frameNum, const KoPoint &position ) if( frame->frameStack() ) frame->frameStack()->updateAfterMove( oldPageNum ); } - tqinvalidate(); + invalidate(); } KoRect KWFrameSet::floatingFrameRect( int frameNum ) @@ -789,7 +789,7 @@ void KWFrameSet::drawFrame( KWFrame *frame, TQPainter *painter, const TQRect &fc doubleBufPainter->begin( pix ); // Initialize the pixmap to the page background color // (if the frame is over the page margins, no underlying frame will paint anything there) - doubleBufPainter->fillRect( 0, 0, outerCRect.width(), outerCRect.height(), TQApplication::tqpalette().active().brush( TQColorGroup::Base ) ); + doubleBufPainter->fillRect( 0, 0, outerCRect.width(), outerCRect.height(), TQApplication::palette().active().brush( TQColorGroup::Base ) ); // The double-buffer pixmap has (0,0) at outerCRect.topLeft(), so we need to // translate the double-buffer painter; drawFrameAndBorders will draw using view coordinates. @@ -828,7 +828,7 @@ void KWFrameSet::drawFrame( KWFrame *frame, TQPainter *painter, const TQRect &fc kdDebug(32001) << " translating by " << translationOffset.x() << ", " << translationOffset.y() << " before drawFrameContents" << endl; #endif doubleBufPainter->translate( translationOffset.x(), translationOffset.y() ); // This assume that viewToNormal() is only a translation - // We can't "tqrepaint changed parags only" if we just drew the underlying frames, hence the "false" + // We can't "repaint changed parags only" if we just drew the underlying frames, hence the "false" drawFrameContents( frame, doubleBufPainter, fcrect, frameColorGroup, false, resetChanged, edit, viewMode ); doubleBufPainter->restore(); diff --git a/kword/KWFrameSet.h b/kword/KWFrameSet.h index 7218abe7..67cad0da 100644 --- a/kword/KWFrameSet.h +++ b/kword/KWFrameSet.h @@ -199,7 +199,7 @@ public: * The way this "onlyChanged/resetChanged" works is: when something changes, * all views are asked to redraw themselves with onlyChanged=true. * But all views except the last one shouldn't reset the changed flag to false, - * otherwise the other views wouldn't tqrepaint anything. + * otherwise the other views wouldn't repaint anything. * So resetChanged is called with "false" for all views except the last one, * and with "true" for the last one, so that it resets the flag. * @@ -310,9 +310,9 @@ public: /** Allows to detect that updateFrames() hasn't been called yet (e.g. on loading) */ bool hasFramesInPageArray() const { return !m_framesInPage.isEmpty(); } - /** retqlayout text in frames, so that it flows correctly around other frames */ - virtual void tqlayout() {} - virtual void tqinvalidate() {} + /** relayout text in frames, so that it flows correctly around other frames */ + virtual void layout() {} + virtual void invalidate() {} /// save to XML - when saving virtual TQDomElement save( TQDomElement &parentElem, bool saveFrames = true ) = 0; @@ -359,11 +359,11 @@ public: * Make this frameset anchored, with the anchor at @p paragId,@p index in the text frameset @p textfs. * Also used during OASIS loading (placeHolderExists=true) */ - void setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int index, bool placeHolderExists = false, bool tqrepaint = true ); + void setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int index, bool placeHolderExists = false, bool repaint = true ); /** Make this frameset floating, with the anchor at @p paragId,@p index in the text frameset @p textfs. * \deprecated */ - void setAnchored( KWTextFrameSet* textfs, int paragId, int index, bool placeHolderExists = false, bool tqrepaint = true ); + void setAnchored( KWTextFrameSet* textfs, int paragId, int index, bool placeHolderExists = false, bool repaint = true ); /** Note that this frameset has been made floating already, and store anchor position */ void setAnchored( KWTextFrameSet* textfs ); /// Make this frameset fixed, i.e. not anchored @@ -455,7 +455,7 @@ public: signals: /// Emitted when something has changed in this frameset, - /// so that all views tqrepaint it. KWDocument connects to it, + /// so that all views repaint it. KWDocument connects to it, /// and KWCanvas connects to KWDocument. void repaintChanged( KWFrameSet * frameset ); @@ -478,7 +478,7 @@ protected: void deleteAnchor( KWAnchor * anchor ); virtual void deleteAnchors(); - virtual void createAnchors( KoTextParag * parag, int index, bool placeHolderExists = false, bool tqrepaint = true ); + virtual void createAnchors( KoTextParag * parag, int index, bool placeHolderExists = false, bool repaint = true ); KWDocument *m_doc; // Document diff --git a/kword/KWFrameStyle.cpp b/kword/KWFrameStyle.cpp index 816afa9b..65ae6fbb 100644 --- a/kword/KWFrameStyle.cpp +++ b/kword/KWFrameStyle.cpp @@ -32,7 +32,7 @@ #include KWFrameStyleCollection::KWFrameStyleCollection() - : KoUserStyleCollection( TQString::tqfromLatin1( "frame" ) ) + : KoUserStyleCollection( TQString::fromLatin1( "frame" ) ) { } diff --git a/kword/KWFrameStyle.h b/kword/KWFrameStyle.h index 3336daa2..210b9b17 100644 --- a/kword/KWFrameStyle.h +++ b/kword/KWFrameStyle.h @@ -25,7 +25,7 @@ #include #include "KoBorder.h" -#include +#include class TQDomElement; class KoOasisContext; @@ -98,7 +98,7 @@ class KWFrameStyleCollection : public KoUserStyleCollection public: KWFrameStyleCollection(); - static TQString defaultStyleName() { return TQString::tqfromLatin1( "Plain" ); } + static TQString defaultStyleName() { return TQString::fromLatin1( "Plain" ); } /** * Find style based on the untranslated name @p name. diff --git a/kword/KWFrameStyleManager.cpp b/kword/KWFrameStyleManager.cpp index 781e9e8f..3d148f69 100644 --- a/kword/KWFrameStyleManager.cpp +++ b/kword/KWFrameStyleManager.cpp @@ -33,10 +33,10 @@ #include #include #include -#include +#include #include #include -#include +#include /******************************************************************/ /* Class: KWTableStylePreview */ @@ -90,7 +90,7 @@ void KWFrameStylePreview::setFrameStyle( KWFrameStyle *_frameStyle ) frameStyle = _frameStyle; - tqrepaint( true ); + repaint( true ); } /******************************************************************/ @@ -235,27 +235,27 @@ void KWFrameStyleManager::addGeneralTab() tabLayout->setMargin( KDialog::marginHint() ); previewBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Preview" ), tab ); - previewBox->tqlayout()->setSpacing(KDialog::spacingHint()); - previewBox->tqlayout()->setMargin(KDialog::marginHint()); - TQGridLayout *previewLayout = new TQGridLayout( previewBox->tqlayout() ); + previewBox->layout()->setSpacing(KDialog::spacingHint()); + previewBox->layout()->setMargin(KDialog::marginHint()); + TQGridLayout *previewLayout = new TQGridLayout( previewBox->layout() ); preview = new KWFrameStylePreview( previewBox ); - preview->resize(preview->tqsizeHint()); + preview->resize(preview->sizeHint()); previewLayout->addWidget( preview, 0, 0 ); tabLayout->addMultiCellWidget( previewBox, 1, 1, 0, 1 ); m_nameString = new TQLineEdit( tab ); - m_nameString->resize(m_nameString->tqsizeHint() ); + m_nameString->resize(m_nameString->sizeHint() ); connect( m_nameString, TQT_SIGNAL( textChanged( const TQString &) ), this, TQT_SLOT( renameStyle(const TQString &) ) ); tabLayout->addWidget( m_nameString, 0, 1 ); TQLabel *nameLabel = new TQLabel( tab ); nameLabel->setText( i18n( "Name:" ) ); - nameLabel->resize(nameLabel->tqsizeHint()); - nameLabel->tqsetAlignment( AlignRight | AlignVCenter ); + nameLabel->resize(nameLabel->sizeHint()); + nameLabel->setAlignment( AlignRight | AlignVCenter ); tabLayout->addWidget( nameLabel, 0, 0 ); @@ -383,7 +383,7 @@ void KWFrameStyleManager::addStyle() { save(); - TQString str = i18n( "New Framestyle Template (%1)" ).tqarg(numFrameStyles++); + TQString str = i18n( "New Framestyle Template (%1)" ).arg(numFrameStyles++); if ( m_currentFrameStyle ) { m_currentFrameStyle = new KWFrameStyle( *m_currentFrameStyle ); // Create a new style, initializing from the current one @@ -598,7 +598,7 @@ void KWFrameStyleBackgroundTab::updateBrushConfiguration( const TQColor & _color m_backgroundColor.setColor( _color ); brushPreview->show(); brushPreview->setBrush( m_backgroundColor ); - brushPreview->tqrepaint(true); + brushPreview->repaint(true); } TQString KWFrameStyleBackgroundTab::tabName() diff --git a/kword/KWFrameStyleManager.h b/kword/KWFrameStyleManager.h index f261b2cd..32420f31 100644 --- a/kword/KWFrameStyleManager.h +++ b/kword/KWFrameStyleManager.h @@ -60,11 +60,11 @@ public: protected: void paintEvent( TQPaintEvent *e ); - void setTopBorder(KoBorder _bTop) { frameStyle->setTopBorder( _bTop ); tqrepaint( true ); } - void setBottomBorder(KoBorder _bBottom) { frameStyle->setBottomBorder( _bBottom ); tqrepaint( true ); } - void setRightBorder(KoBorder _bRight) { frameStyle->setRightBorder( _bRight ); tqrepaint( true ); } - void setLeftBorder(KoBorder _bLeft) { frameStyle->setLeftBorder( _bLeft ); tqrepaint( true ); } - void setBackground( const TQColor & col ) { frameStyle->setBackgroundColor( col ); tqrepaint( true ); } + void setTopBorder(KoBorder _bTop) { frameStyle->setTopBorder( _bTop ); repaint( true ); } + void setBottomBorder(KoBorder _bBottom) { frameStyle->setBottomBorder( _bBottom ); repaint( true ); } + void setRightBorder(KoBorder _bRight) { frameStyle->setRightBorder( _bRight ); repaint( true ); } + void setLeftBorder(KoBorder _bLeft) { frameStyle->setLeftBorder( _bLeft ); repaint( true ); } + void setBackground( const TQColor & col ) { frameStyle->setBackgroundColor( col ); repaint( true ); } KWFrameStyle *frameStyle; }; diff --git a/kword/KWFrameViewManager.cpp b/kword/KWFrameViewManager.cpp index c4349ae8..a0070584 100644 --- a/kword/KWFrameViewManager.cpp +++ b/kword/KWFrameViewManager.cpp @@ -283,14 +283,14 @@ TQCursor KWFrameViewManager::mouseCursor( const KoPoint &point, int keyState ) c } if(view == 0) - return TQCursor(); // default arrow tqshape + return TQCursor(); // default arrow shape KWFrameSet*frameSet = view->frame()->frameSet(); switch ( meaning ) { case MEANING_NONE: return TQt::ibeamCursor; // default cursor in margins case MEANING_MOUSE_INSIDE: - return TQCursor(); // default arrow tqshape + return TQCursor(); // default arrow shape case MEANING_MOUSE_INSIDE_TEXT: return TQt::ibeamCursor; case MEANING_MOUSE_OVER_LINK: @@ -327,7 +327,7 @@ TQCursor KWFrameViewManager::mouseCursor( const KoPoint &point, int keyState ) c case MEANING_FORBIDDEN: return KCursor::handCursor(); } - return TQCursor(); // default arrow tqshape + return TQCursor(); // default arrow shape } MouseMeaning KWFrameViewManager::mouseMeaning( const KoPoint &point, int keyState) const { diff --git a/kword/KWImportStyleDia.cpp b/kword/KWImportStyleDia.cpp index 725c932e..2eefb164 100644 --- a/kword/KWImportStyleDia.cpp +++ b/kword/KWImportStyleDia.cpp @@ -21,7 +21,7 @@ #include "KWDocument.h" #include -#include +#include #include #include #include @@ -99,7 +99,7 @@ void KWImportStyleDia::loadFile() TQDomElement styleElem = listStyles.item( item ).toElement(); KoParagStyle *sty = new KoParagStyle( TQString() ); - // Load the paragtqlayout from the