diff options
Diffstat (limited to 'kword')
95 files changed, 763 insertions, 763 deletions
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 <tqbuffer.h> #include <tqtimer.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqprogressdialog.h> #include <tqobjectlist.h> #include <tqapplication.h> @@ -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 <kprinter.h> #include <KoRect.h> #include <tqscrollview.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <KoRichText.h> #include <KoQueryTrader.h> #include <KoPicture.h> @@ -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<KWTextParag *>(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<FrameMoveStruct>::Iterator moveIt = m_frameMove.begin(); TQValueList<FrameIndex>::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<FrameMoveStruct>::Iterator moveIt = m_frameMove.begin(); TQValueList<FrameIndex>::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 :"<<m_colBegin<<" m_colEnd :"<<m_colEnd<<" m_rowBegin :"<<m_rowBegin<<" m_colEnd :"<<m_colEnd<<endl; m_pTable->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 <tqpushbutton.h> #include <tqlistbox.h> #include <tqlineedit.h> -#include <tqlayout.h> +#include <layout.h> #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 <tqvbuttongroup.h> #include <tqlabel.h> #include <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcombobox.h> @@ -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 <klocale.h> #include "KWDocument.h" #include <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqpushbutton.h> #include <tqlistbox.h> 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 @@ </property> <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>tqlayout2</cstring> + <cstring>layout2</cstring> </property> <hbox> <property name="name"> 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 <klocale.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> KWDeleteDia::KWDeleteDia( KWView *parent, KWTableFrameSet *table, DeleteType type, TQValueList<uint> 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 <ktoolbar.h> #include <ktoolbarbutton.h> -#include <tqlayout.h> +#include <layout.h> /******************************************************************/ /* 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<KWFormulaFrameSet*>( 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<KWPictureFrameSet*>( frameset )->key().filename()).tqarg(++j); + _name=i18n("Picture (%1) %2").arg(dynamic_cast<KWPictureFrameSet*>( frameset )->key().filename()).arg(++j); child = new KWDocStructPictureItem(this, _name, dynamic_cast<KWPictureFrameSet*>( 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<KoDocumentChild> it( tqchildren() ); + TQPtrListIterator<KoDocumentChild> 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<KWTextFrameSet *>( 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<KWTextFrameSet *>(frameset)->renumberFootNotes( false /*no tqrepaint*/ ); + static_cast<KWTextFrameSet *>(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<KWFrameSet> 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<KWFrameSet> 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<KWView *>::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<KWFrame*> &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 <tqcombobox.h> #include <tqlineedit.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> 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<KWTextDocument *>(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 <tqradiobutton.h> #include <klocale.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #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 <KoRect.h> -#include <tqbrush.h> +#include <brush.h> #include "KoBorder.h" #include <tqptrlist.h> @@ -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 <tqbuttongroup.h> #include <tqhbox.h> #include <tqheader.h> -#include <tqlayout.h> +#include <layout.h> #include <stdlib.h> #include <limits.h> @@ -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.."<<endl; return; } - setCaption( i18n( "Frame Properties for %1" ).tqarg( m_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<KWFrame> 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<HeaderFooterFrameset> itdbg( m_headersFooters ); for ( ; itdbg.current() ; ++itdbg ) @@ -492,10 +492,10 @@ void KWFrameLayout::tqlayout( KWFrameSet* mainTextFrameSet, int numColumns, KWTextFrameSet* fs = static_cast<KWTextFrameSet *>(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<KWTextParag *>( 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 <tqdom.h> 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 <KoUserStyleCollection.h> #include "KoBorder.h" -#include <tqbrush.h> +#include <brush.h> 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 <tqtabwidget.h> #include <tqpushbutton.h> #include <tqlabel.h> -#include <tqbrush.h> +#include <brush.h> #include <tqgroupbox.h> #include <tqpainter.h> -#include <tqlayout.h> +#include <layout.h> /******************************************************************/ /* 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 <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqpushbutton.h> #include <tqlistbox.h> @@ -99,7 +99,7 @@ void KWImportStyleDia::loadFile() TQDomElement styleElem = listStyles.item( item ).toElement(); KoParagStyle *sty = new KoParagStyle( TQString() ); - // Load the paragtqlayout from the <STYLE> element + // Load the paraglayout from the <STYLE> element sty->loadStyle( styleElem, m_doc->syntaxVersion() ); //#### wrong syntaxVersion! TQString name = sty->displayName(); @@ -196,7 +196,7 @@ TQString KWImportFrameTableStyleDia::generateStyleName( const TQString & templat int num = 1; bool exists; do { - name = templateName.tqarg( num ); + name = templateName.arg( num ); exists = (m_list.findIndex( name )!=-1); ++num; } while ( exists ); diff --git a/kword/KWInsertDia.cpp b/kword/KWInsertDia.cpp index 09764608..23c7654a 100644 --- a/kword/KWInsertDia.cpp +++ b/kword/KWInsertDia.cpp @@ -28,7 +28,7 @@ #include <tqspinbox.h> #include <tqradiobutton.h> #include <tqbuttongroup.h> -#include <tqlayout.h> +#include <layout.h> KWInsertDia::KWInsertDia( KWView *parent, KWTableFrameSet *table, InsertType type, int insertHint) : KDialogBase( Plain, (type==insertRow?i18n("Insert Row") : i18n("Insert Column")), Ok | Cancel, Ok, parent, "Insert Table items dialog", true ) diff --git a/kword/KWInsertPageDia.cpp b/kword/KWInsertPageDia.cpp index 28d0cd34..95aed5c0 100644 --- a/kword/KWInsertPageDia.cpp +++ b/kword/KWInsertPageDia.cpp @@ -23,7 +23,7 @@ #include <klocale.h> #include <tqradiobutton.h> #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqbuttongroup.h> #include <tqvbox.h> @@ -34,7 +34,7 @@ KWInsertPageDia::KWInsertPageDia( TQWidget *parent, const char* name ) TQButtonGroup *grp = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Insert Page" ),page ); grp->setRadioButtonExclusive( TRUE ); - grp->tqlayout(); + grp->layout(); m_after = new TQRadioButton( i18n("After"), grp ); m_before = new TQRadioButton( i18n("Before"), grp ); diff --git a/kword/KWInsertPicDia.cpp b/kword/KWInsertPicDia.cpp index 4b5f3daa..4477068e 100644 --- a/kword/KWInsertPicDia.cpp +++ b/kword/KWInsertPicDia.cpp @@ -21,7 +21,7 @@ #include <tqpainter.h> #include <tqpushbutton.h> #include <tqbitmap.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcheckbox.h> #include <tqscrollview.h> @@ -62,7 +62,7 @@ public: m_size = picture.getOriginalSize(); m_picture = picture; resizeContents( m_size.width(), m_size.height() ); - tqrepaint( false ); + repaint( false ); return true; } else diff --git a/kword/KWInsertTOCCommand.cpp b/kword/KWInsertTOCCommand.cpp index 6c9851fe..ebf6c480 100644 --- a/kword/KWInsertTOCCommand.cpp +++ b/kword/KWInsertTOCCommand.cpp @@ -80,7 +80,7 @@ KoTextCursor * KWInsertTOCCommand::execute( KoTextCursor *c ) prevTOCParag->setPageBreaking( prevTOCParag->pageBreaking() | KWParagLayout::HardFrameBreakAfter ); // Format paragraphs, to take this page break into account and update page numbers - fs->tqlayout(); + fs->layout(); fs->updateFrames(); //kdDebug() << "KWInsertTOCCommand::execute layouting done, setting page numbers" << endl; @@ -199,7 +199,7 @@ KoTextCursor * KWInsertTOCCommand::removeTOC( KWTextFrameSet *fs, KoTextCursor * } p = p->prev(); } - textdoc->tqinvalidate(); + textdoc->invalidate(); if(posOfToc) { posOfTable=new KoTextCursor( textdoc ); @@ -217,8 +217,8 @@ KoParagStyle * KWInsertTOCCommand::findOrCreateTOCStyle( KWTextFrameSet *fs, int TQString displayName; if ( depth >= 0 ) { // Don't add i18n to this one, those are internal names and must have no spaces. - name = TQString( "Contents_Head_%1" ).tqarg( depth+1 ); - displayName = i18n( "Contents Head %1" ).tqarg( depth+1 ); + name = TQString( "Contents_Head_%1" ).arg( depth+1 ); + displayName = i18n( "Contents Head %1" ).arg( depth+1 ); } else { name = "Contents_Title"; displayName = i18n( "Contents Title" ); @@ -238,7 +238,7 @@ KoParagStyle * KWInsertTOCCommand::findOrCreateTOCStyle( KWTextFrameSet *fs, int // (not the whole line anymore), so we need the 4 borders. style->paragLayout().leftBorder = KoBorder( TQt::black, KoBorder::SOLID, 1 ); style->paragLayout().rightBorder = KoBorder( TQt::black, KoBorder::SOLID, 1 ); - style->paragLayout().tqalignment = TQt::AlignHCenter; + style->paragLayout().alignment = TQt::AlignHCenter; } else { diff --git a/kword/KWMailMergeDataBase.cpp b/kword/KWMailMergeDataBase.cpp index e477f502..acca9922 100644 --- a/kword/KWMailMergeDataBase.cpp +++ b/kword/KWMailMergeDataBase.cpp @@ -37,7 +37,7 @@ #include <tqfile.h> #include <tqvbox.h> #include <tqspinbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqpushbutton.h> @@ -60,7 +60,7 @@ KWMailMergeDataBase::KWMailMergeDataBase( KWDocument *doc_ ) TQStringList KWMailMergeDataBase::availablePlugins() { TQStringList tmp; - KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::tqfromLatin1("KWord/MailMergePlugin"),TQString()); + KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::fromLatin1("KWord/MailMergePlugin"),TQString()); for (KTrader::OfferList::Iterator it=pluginOffers.begin();*it;++it) { tmp.append((*it)->property("X-KDE-InternalName").toString()); @@ -79,7 +79,7 @@ bool KWMailMergeDataBase::loadPlugin(const TQString &name,const TQString &comman if (rejectdcopcall)return false; TQString constrain=TQString("[X-KDE-InternalName] =='"+name+"'"); kdDebug()<<constrain<<endl; - KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::tqfromLatin1("KWord/MailMergePlugin"),constrain); + KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::fromLatin1("KWord/MailMergePlugin"),constrain); KService::Ptr it=pluginOffers.first(); TQVariant verProp=it->property("X-KDE-PluginVersion"); @@ -116,9 +116,9 @@ KWMailMergeDataSource *KWMailMergeDataBase::openPluginFor(int type,int &version) { version=0; KWMailMergeDataSource *ret=0; - TQString constrain=TQString("'%1' in [X-KDE-Capabilities]").tqarg(((type==KWSLCreate)?KWSLCreate_text:KWSLOpen_text)); + TQString constrain=TQString("'%1' in [X-KDE-Capabilities]").arg(((type==KWSLCreate)?KWSLCreate_text:KWSLOpen_text)); kdDebug()<<constrain<<endl; - KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::tqfromLatin1("KWord/MailMergePlugin"),constrain); + KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::fromLatin1("KWord/MailMergePlugin"),constrain); //Only for debugging for (KTrader::OfferList::Iterator it=pluginOffers.begin();*it;++it) @@ -162,7 +162,7 @@ KWMailMergeDataSource *KWMailMergeDataBase::loadPlugin(const TQString& name) KLibrary *lib = loader->library(TQFile::encodeName(libname)); if (lib) { // get the create_ function - TQString factory=TQString("create_%1").tqarg(name); + TQString factory=TQString("create_%1").arg(name); void *create = lib->symbol(TQFile::encodeName(factory)); if (create) @@ -280,7 +280,7 @@ TQDomElement KWMailMergeDataBase::save(TQDomDocument &doc) const if (plugin) { kdDebug()<<"KWMailMergeDataBase::save() There is really something to save"<<endl; - TQDomElement el=doc.createElement(TQString::tqfromLatin1("PLUGIN")); + TQDomElement el=doc.createElement(TQString::fromLatin1("PLUGIN")); TQDataStream ds(plugin->info,IO_ReadOnly); TQString libname; @@ -288,7 +288,7 @@ TQDomElement KWMailMergeDataBase::save(TQDomDocument &doc) const el.setAttribute("library",libname); parentElem.appendChild(el); kdDebug()<<"KWMailMergeDataBase::save() Calling datasource save()"<<endl; - TQDomElement el2=doc.createElement(TQString::tqfromLatin1("DATASOURCE")); + TQDomElement el2=doc.createElement(TQString::fromLatin1("DATASOURCE")); plugin->save(doc,el2); parentElem.appendChild(el2); @@ -329,35 +329,35 @@ KWMailMergeChoosePluginDialog::KWMailMergeChoosePluginDialog( KTrader::OfferList /*parent*/ 0, "", true ), pluginOffers( offers ) { TQWidget *back = plainPage(); - TQVBoxLayout *tqlayout = new TQVBoxLayout( back, 0, spacingHint() ); + TQVBoxLayout *layout = new TQVBoxLayout( back, 0, spacingHint() ); TQLabel *label = new TQLabel( i18n( "&Available sources:" ), back ); chooser = new TQComboBox( false, back ); label->setBuddy( chooser ); descriptionLabel = new TQLabel( back ); descriptionLabel->hide(); - descriptionLabel->tqsetAlignment( WordBreak ); + descriptionLabel->setAlignment( WordBreak ); descriptionLabel->setFrameShape( TQFrame::Box ); descriptionLabel->setFrameShadow( TQFrame::Sunken ); - TQSize old_tqsizeHint; + TQSize old_sizeHint; for ( KTrader::OfferList::Iterator it = pluginOffers.begin(); *it; ++it ) { chooser->insertItem( (*it)->name() ); - old_tqsizeHint = descriptionLabel->tqsizeHint(); + old_sizeHint = descriptionLabel->sizeHint(); descriptionLabel->setText( (*it)->comment() ); - if (descriptionLabel->tqsizeHint().width()*descriptionLabel->tqsizeHint().height() > old_tqsizeHint.width()*old_tqsizeHint.height()) - descriptionLabel->setMinimumSize(descriptionLabel->tqsizeHint() ); + if (descriptionLabel->sizeHint().width()*descriptionLabel->sizeHint().height() > old_sizeHint.width()*old_sizeHint.height()) + descriptionLabel->setMinimumSize(descriptionLabel->sizeHint() ); } descriptionLabel->show(); connect( chooser, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( pluginChanged( int ) ) ); - tqlayout->addWidget( label ); - tqlayout->addWidget( chooser ); - tqlayout->addWidget( descriptionLabel ); - tqlayout->addStretch( 1 ); + layout->addWidget( label ); + layout->addWidget( chooser ); + layout->addWidget( descriptionLabel ); + layout->addStretch( 1 ); pluginChanged( 0 ); } @@ -387,41 +387,41 @@ KWMailMergeConfigDialog::KWMailMergeConfigDialog(TQWidget *parent,KWMailMergeDat { db_=db; TQWidget *back = plainPage(); - TQVBoxLayout *tqlayout=new TQVBoxLayout(back); + TQVBoxLayout *layout=new TQVBoxLayout(back); // TQVBox *back = new TQVBox( page ); - tqlayout->setSpacing( KDialog::spacingHint() ); + layout->setSpacing( KDialog::spacingHint() ); // TQVBox *row1 = new TQVBox( back ); // row1->setSpacing( KDialog::spacingHint() ); TQLabel *l = new TQLabel( i18n( "Datasource:" ),back ); -// l->setMaximumHeight( l->tqsizeHint().height() ); - tqlayout->addWidget(l); +// l->setMaximumHeight( l->sizeHint().height() ); + layout->addWidget(l); TQHBox *row1=new TQHBox(back); - tqlayout->addWidget(row1); + layout->addWidget(row1); row1->setSpacing( KDialog::spacingHint() ); edit=new TQPushButton(i18n("Edit Current..."),row1); create=new TQPushButton(i18n("Create New..."),row1); open=new TQPushButton(i18n("Open Existing..."),row1); KSeparator *separator1 = new KSeparator(back); - tqlayout->addWidget(separator1); + layout->addWidget(separator1); l = new TQLabel( i18n( "Merging:" ),back ); - tqlayout->addWidget(l); -// l->setMaximumHeight( l->tqsizeHint().height() ); + layout->addWidget(l); +// l->setMaximumHeight( l->sizeHint().height() ); TQHBox *row2=new TQHBox(back); - tqlayout->addWidget(row2); + layout->addWidget(row2); row2->setSpacing( KDialog::spacingHint() ); preview=new TQPushButton(i18n("Print Preview..."),row2); document=new TQPushButton(i18n("Create New Document"),row2); document->hide(); (void) new TQWidget(row2); - tqlayout->addStretch(); + layout->addStretch(); KSeparator *separator2 = new KSeparator(back); - tqlayout->addWidget(separator2); + layout->addWidget(separator2); enableDisableEdit(); @@ -482,7 +482,7 @@ void KWMailMergeConfigDialog::slotOpenClicked() void KWMailMergeConfigDialog::slotPreviewClicked() { db_->action=KWSLMergePreview; - KMainWindow *mw=dynamic_cast<KMainWindow*>(((TQWidget *)parent())->tqtopLevelWidget()); + KMainWindow *mw=dynamic_cast<KMainWindow*>(((TQWidget *)parent())->topLevelWidget()); if (mw) { KAction *ac=mw->actionCollection()->action(KStdAction::stdName(KStdAction::PrintPreview)); @@ -516,11 +516,11 @@ KWMailMergeVariableInsertDia::KWMailMergeVariableInsertDia( TQWidget *parent, KW m_db=db; TQWidget *page = plainPage(); - TQVBoxLayout *tqlayout = new TQVBoxLayout( page, marginHint(), spacingHint() ); - tqlayout->setAutoAdd( true ); + TQVBoxLayout *layout = new TQVBoxLayout( page, marginHint(), spacingHint() ); + layout->setAutoAdd( true ); TQLabel *l = new TQLabel( i18n( "Name:" ), page ); - l->setMaximumHeight( l->tqsizeHint().height() ); + l->setMaximumHeight( l->sizeHint().height() ); names = new TQListBox( page ); TQMap< TQString, TQString >::ConstIterator it = db->getRecordEntries().begin(); diff --git a/kword/KWMailMergeDataBase.h b/kword/KWMailMergeDataBase.h index 70f75f9e..36aff677 100644 --- a/kword/KWMailMergeDataBase.h +++ b/kword/KWMailMergeDataBase.h @@ -30,7 +30,7 @@ #include <tqstring.h> #include <tqstringlist.h> #include <tqdom.h> -#include <tqtextstream.h> +#include <textstream.h> #include "KWMailMergeDataSource.h" #include "KWordMailMergeDatabaseIface.h" diff --git a/kword/KWMailMergeLabelAction.cpp b/kword/KWMailMergeLabelAction.cpp index f3d70cb6..facb6e9d 100644 --- a/kword/KWMailMergeLabelAction.cpp +++ b/kword/KWMailMergeLabelAction.cpp @@ -63,7 +63,7 @@ protected: { validDrag = false; } - TQSize tqsizeHint() const + TQSize sizeHint() const { int w = fontMetrics().width( text() ); int h = fontMetrics().height(); @@ -72,10 +72,10 @@ protected: void drawButton( TQPainter * p ) { // Draw the background - tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, rect(), tqcolorGroup(), + tqstyle().drawComplexControl( TQStyle::CC_ToolButton, p, this, rect(), colorGroup(), TQStyle::Style_Enabled, TQStyle::SC_ToolButton ); // Draw the label - tqstyle().tqdrawControl( TQStyle::CE_ToolButtonLabel, p, this, rect(), tqcolorGroup(), + tqstyle().drawControl( TQStyle::CE_ToolButtonLabel, p, this, rect(), colorGroup(), TQStyle::Style_Enabled ); } void enterEvent( TQEvent* ) {}; diff --git a/kword/KWOasisLoader.cpp b/kword/KWOasisLoader.cpp index 42d72b5e..daaa8502 100644 --- a/kword/KWOasisLoader.cpp +++ b/kword/KWOasisLoader.cpp @@ -182,7 +182,7 @@ static KWFrameSet::Info headerTypeToFrameInfo( const TQString& localName, bool / return KWFrameSet::FI_EVEN_FOOTER; // ######## KWord extension, because I'm too lazy. - // TODO: the real solution is a separate page tqlayout for the first page. + // TODO: the real solution is a separate page layout for the first page. if ( localName == "header-first" ) // NOT OASIS COMPLIANT return KWFrameSet::FI_FIRST_HEADER; if ( localName == "footer-first" ) // NOT OASIS COMPLIANT diff --git a/kword/KWPageManager.cpp b/kword/KWPageManager.cpp index 9dc797a6..e13d4099 100644 --- a/kword/KWPageManager.cpp +++ b/kword/KWPageManager.cpp @@ -196,8 +196,8 @@ void KWPageManager::removePage(KWPage *page) { m_pageList.remove(page); } -void KWPageManager::setDefaultPage(const KoPageLayout &tqlayout) { - m_defaultPageLayout = tqlayout; +void KWPageManager::setDefaultPage(const KoPageLayout &layout) { + m_defaultPageLayout = layout; // make sure we have 1 default, either pageBound or left/right bound. if(m_defaultPageLayout.ptLeft < 0 || m_defaultPageLayout.ptRight < 0) { m_defaultPageLayout.ptLeft = -1; diff --git a/kword/KWPageManager.h b/kword/KWPageManager.h index 869a68f3..8f09b577 100644 --- a/kword/KWPageManager.h +++ b/kword/KWPageManager.h @@ -111,7 +111,7 @@ public: /// return the effective pageLayout of @p pageNumber combining the default and the page specific ones const KoPageLayout pageLayout(int pageNumber) const; - void setDefaultPage(const KoPageLayout &tqlayout); + void setDefaultPage(const KoPageLayout &layout); /** * Returns the argument point, with altered coordinats if the point happens to be diff --git a/kword/KWPartFrameSet.cpp b/kword/KWPartFrameSet.cpp index fc257709..33203d0b 100644 --- a/kword/KWPartFrameSet.cpp +++ b/kword/KWPartFrameSet.cpp @@ -137,9 +137,9 @@ void KWPartFrameSet::slotChildChanged() KWFrame *frame = listFrame.current(); if ( frame ) { - frame->setRect( KoRect::fromTQRect( getChild()->tqgeometry() ) ); + frame->setRect( KoRect::fromTQRect( getChild()->geometry() ) ); - //kdDebug(32001) << "KWPartFrameSet::slotChildChanged child's tqgeometry " << getChild()->tqgeometry() + //kdDebug(32001) << "KWPartFrameSet::slotChildChanged child's geometry " << getChild()->geometry() // << " frame set to " << *frame << endl; m_doc->frameChanged( frame ); //there is just a frame @@ -237,7 +237,7 @@ void KWPartFrameSet::printDebug() kdDebug() << " Url : " << getChild()->document()->url().url()<<endl; else kdWarning() << "NO DOCUMENT" << endl; - kdDebug() << " Rectangle : " << getChild()->tqgeometry().x() << "," << getChild()->tqgeometry().y() << " " << getChild()->tqgeometry().width() << "x" << getChild()->tqgeometry().height() << endl; + kdDebug() << " Rectangle : " << getChild()->geometry().x() << "," << getChild()->geometry().y() << " " << getChild()->geometry().width() << "x" << getChild()->geometry().height() << endl; } else kdWarning() << "NO CHILD" << endl; } @@ -335,12 +335,12 @@ KWDocumentChild::~KWDocumentChild() { } -void KWDocumentChild::setDocument( KoDocument *doc, const TQRect &tqgeometry ) +void KWDocumentChild::setDocument( KoDocument *doc, const TQRect &geometry ) { // When hitTest returns true, we want to activate the part right away. // PartManager supports selecting parts, but not in a doc/view separated way. doc->setSelectable( false ); - KoDocumentChild::setDocument( doc, tqgeometry ); + KoDocumentChild::setDocument( doc, geometry ); } KoDocument* KWDocumentChild::hitTest( const TQPoint& p, const TQWMatrix& _matrix ) diff --git a/kword/KWPartFrameSet.h b/kword/KWPartFrameSet.h index 25609c1a..d486b298 100644 --- a/kword/KWPartFrameSet.h +++ b/kword/KWPartFrameSet.h @@ -53,7 +53,7 @@ public: void setChild( KWDocumentChild* child ); /** - * Update the tqgeometry of m_child based on the tqgeometry of the frame. + * Update the geometry of m_child based on the geometry of the frame. */ void updateChildGeometry(); @@ -157,7 +157,7 @@ public: KWDocument* parent()const { return m_pKWordDoc; } - virtual void setDocument( KoDocument *doc, const TQRect &tqgeometry ); + virtual void setDocument( KoDocument *doc, const TQRect &geometry ); void setPartFrameSet( KWPartFrameSet* fs ) { m_partFrameSet = fs; } KWPartFrameSet * partFrameSet() const { return m_partFrameSet; } diff --git a/kword/KWPictureFrameSet.cpp b/kword/KWPictureFrameSet.cpp index 3d04fda0..2cc8443b 100644 --- a/kword/KWPictureFrameSet.cpp +++ b/kword/KWPictureFrameSet.cpp @@ -184,7 +184,7 @@ void KWPictureFrameSet::loadOasis( const TQDomElement& frame, const TQDomElement { TQCString data = binaryData.toElement().text().latin1(); m_picture.loadFromBase64( data ); - key = KoPictureKey("nofile", TQDateTime::tqcurrentDateTime(Qt::UTC)); + key = KoPictureKey("nofile", TQDateTime::currentDateTime(Qt::UTC)); m_picture.setKey(key); } else @@ -199,7 +199,7 @@ void KWPictureFrameSet::loadOasis( const TQDomElement& frame, const TQDomElement strExtension=href.mid(result+1); // As we are using KoPicture, the extension should be without the dot. } TQString filename(href/*.mid(1)*/); - key = KoPictureKey(filename, TQDateTime::tqcurrentDateTime(Qt::UTC)); + key = KoPictureKey(filename, TQDateTime::currentDateTime(Qt::UTC)); m_picture.setKey(key); KoStore* store = context.store(); diff --git a/kword/KWResizeTableDia.cpp b/kword/KWResizeTableDia.cpp index 3502701b..08c2ada2 100644 --- a/kword/KWResizeTableDia.cpp +++ b/kword/KWResizeTableDia.cpp @@ -43,10 +43,10 @@ KWResizeTableDia::KWResizeTableDia( TQWidget *parent, KWTableFrameSet *table, KW void KWResizeTableDia::setupTab1(int resizeColumn) { TQVBox *page = makeVBoxMainWidget(); TQLabel *rc = new TQLabel( i18n( "Column:" ), page ); - rc->resize( rc->tqsizeHint() ); - rc->tqsetAlignment( AlignLeft | AlignBottom ); + rc->resize( rc->sizeHint() ); + rc->setAlignment( AlignLeft | AlignBottom ); m_value = new TQSpinBox( 1, m_table->getColumns(), 1, page ); - m_value->resize( m_value->tqsizeHint() ); + m_value->resize( m_value->sizeHint() ); m_value->setValue( resizeColumn ); rc = new TQLabel( i18n( "Width:" ), page ); diff --git a/kword/KWSelectBookmarkDiaBase.ui b/kword/KWSelectBookmarkDiaBase.ui index 474498f4..55da7d96 100644 --- a/kword/KWSelectBookmarkDiaBase.ui +++ b/kword/KWSelectBookmarkDiaBase.ui @@ -61,7 +61,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> diff --git a/kword/KWSortDia.cpp b/kword/KWSortDia.cpp index 047dcf93..ff6d1d73 100644 --- a/kword/KWSortDia.cpp +++ b/kword/KWSortDia.cpp @@ -20,7 +20,7 @@ #include "KWSortDia.h" -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <tqradiobutton.h> #include <tqgroupbox.h> @@ -34,7 +34,7 @@ KWSortDia::KWSortDia( TQWidget *parent, const char* name ) TQButtonGroup *grp = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Sort" ),page ); grp->setRadioButtonExclusive( TRUE ); - grp->tqlayout(); + grp->layout(); m_increase = new TQRadioButton( i18n("Increase"), grp ); m_decrease = new TQRadioButton( i18n("Decrease"), grp ); diff --git a/kword/KWSplitCellDia.cpp b/kword/KWSplitCellDia.cpp index 5e988ea3..c67e46c9 100644 --- a/kword/KWSplitCellDia.cpp +++ b/kword/KWSplitCellDia.cpp @@ -21,7 +21,7 @@ #include "KWSplitCellDia.moc" #include "KWTableDia.h" -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqspinbox.h> diff --git a/kword/KWStartupWidget.cpp b/kword/KWStartupWidget.cpp index 60dab02b..3f941aae 100644 --- a/kword/KWStartupWidget.cpp +++ b/kword/KWStartupWidget.cpp @@ -25,7 +25,7 @@ #include <kdebug.h> #include <tqpushbutton.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> KWStartupWidget::KWStartupWidget(TQWidget *parent, KWDocument *doc, const KoColumns &columns) : KWStartupWidgetBase(parent) { @@ -55,9 +55,9 @@ KWStartupWidget::KWStartupWidget(TQWidget *parent, KWDocument *doc, const KoColu connect (m_WpStyleCheckbox, TQT_SIGNAL(toggled(bool)), m_columnsWidget, TQT_SLOT(setEnableColumns(bool))); } -void KWStartupWidget::sizeUpdated(KoPageLayout &tqlayout) { - m_layout = tqlayout; - m_columnsWidget->setLayout(tqlayout); +void KWStartupWidget::sizeUpdated(KoPageLayout &layout) { + m_layout = layout; + m_columnsWidget->setLayout(layout); } void KWStartupWidget::columnsUpdated(KoColumns &columns) { diff --git a/kword/KWStartupWidget.h b/kword/KWStartupWidget.h index 8202488c..22460eed 100644 --- a/kword/KWStartupWidget.h +++ b/kword/KWStartupWidget.h @@ -43,7 +43,7 @@ public: KWStartupWidget(TQWidget *parent, KWDocument *doc, const KoColumns &columns); private slots: - void sizeUpdated(KoPageLayout &tqlayout); + void sizeUpdated(KoPageLayout &layout); void columnsUpdated(KoColumns &columns); void buttonClicked(); diff --git a/kword/KWStartupWidgetBase.ui b/kword/KWStartupWidgetBase.ui index 57d7ce2f..cac182d2 100644 --- a/kword/KWStartupWidgetBase.ui +++ b/kword/KWStartupWidgetBase.ui @@ -65,7 +65,7 @@ For letters and notes with one main text, possibly on several pages, you should <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> @@ -90,7 +90,7 @@ For letters and notes with one main text, possibly on several pages, you should <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> diff --git a/kword/KWStatisticsDialog.cpp b/kword/KWStatisticsDialog.cpp index e8cd0e92..be1fa14e 100644 --- a/kword/KWStatisticsDialog.cpp +++ b/kword/KWStatisticsDialog.cpp @@ -23,7 +23,7 @@ #include <tqtabwidget.h> #include <tqvbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqprogressdialog.h> #include <tqcheckbox.h> @@ -206,7 +206,7 @@ bool KWStatisticsDialog::calcStats( TQLabel **resultLabel, bool selection, bool TQString flesch = locale->formatNumber( f , 1 ); if( words < 200 ) { // a kind of warning if too few words: - flesch = i18n("approximately %1").tqarg( flesch ); + flesch = i18n("approximately %1").arg( flesch ); } resultLabel[6]->setText( flesch ); return true; @@ -295,7 +295,7 @@ void KWStatisticsDialog::addBox( TQFrame *page, TQLabel **resultLabel, bool calc grid->addRowSpacing( 0, fHeight ); //maximum size for result column (don't know how to do this better..) - TQString init = i18n("approximately %1").tqarg( "00000000" ); + TQString init = i18n("approximately %1").arg( "00000000" ); // insert labels TQLabel *label1 = new TQLabel( i18n( "Characters including spaces:" ), box ); diff --git a/kword/KWTableDia.cpp b/kword/KWTableDia.cpp index 013a2be6..21b0670c 100644 --- a/kword/KWTableDia.cpp +++ b/kword/KWTableDia.cpp @@ -32,7 +32,7 @@ #include <kcommand.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqspinbox.h> #include <tqcheckbox.h> #include <tqbuttongroup.h> diff --git a/kword/KWTableDia.h b/kword/KWTableDia.h index 09dff25a..bf0f835f 100644 --- a/kword/KWTableDia.h +++ b/kword/KWTableDia.h @@ -52,8 +52,8 @@ public: KWTablePreview( TQWidget *_parent, int _rows, int _cols ) : TQWidget( _parent ), rows( _rows ), cols( _cols ) {} - void setRows( int _rows ) { rows = _rows; tqrepaint( true ); } - void setCols( int _cols ) { cols = _cols; tqrepaint( true ); } + void setRows( int _rows ) { rows = _rows; repaint( true ); } + void setCols( int _cols ) { cols = _cols; repaint( true ); } protected: void paintEvent( TQPaintEvent *e ); diff --git a/kword/KWTableFrameSet.cpp b/kword/KWTableFrameSet.cpp index f108573b..34765348 100644 --- a/kword/KWTableFrameSet.cpp +++ b/kword/KWTableFrameSet.cpp @@ -52,7 +52,7 @@ DESCRIPTION #include <dcopobject.h> #include <tqapplication.h> #include <tqpopupmenu.h> -#include <tqclipboard.h> +#include <clipboard.h> KWTableFrameSet::KWTableFrameSet( KWDocument *doc, const TQString & name ) : @@ -143,7 +143,7 @@ KWAnchor * KWTableFrameSet::createAnchor( KoTextDocument *txt, int frameNum ) } void KWTableFrameSet::createAnchors( KoTextParag * parag, int index, bool placeHolderExists /*= false */ /*only used when loading*/, - bool tqrepaint ) + bool repaint ) { //kdDebug(32004) << "KWTableFrameSet::createAnchors" << endl; // TODO make one rect per page, and create one anchor per page @@ -154,7 +154,7 @@ void KWTableFrameSet::createAnchors( KoTextParag * parag, int index, bool placeH parag->setCustomItem( index, anchor, 0 ); kdDebug(32004) << "KWTableFrameSet::createAnchors setting anchor" << endl; parag->setChanged( true ); - if ( tqrepaint ) + if ( repaint ) emit repaintChanged( m_anchorTextFs ); } @@ -1454,7 +1454,7 @@ void KWTableFrameSet::validate() for(uint j = cells->firstColumn(); j < cells->columnAfter(); ++j) { if( cell(i,j) != cells.current() ) { - TQString str = TQString("| 0x%1 ").tqarg( (unsigned long)cells.current(), 0, 16 ); + TQString str = TQString("| 0x%1 ").arg( (unsigned long)cells.current(), 0, 16 ); kdDebug(32004) << " KWTableFrameSet::validate() failed " << endl; kdDebug(32004) << "at row: "<< i << " col: "<< j << " cell: "<< str << endl; kdDebug(32004) << cells->firstRow() << " " << cells->firstColumn() << " " << cells->rowSpan() @@ -2183,16 +2183,16 @@ void KWTableFrameSet::finalize( ) { KWFrameSet::finalize(); } -void KWTableFrameSet::tqlayout() +void KWTableFrameSet::layout() { for (TableIter cells(this) ; cells ; ++cells) - cells->tqlayout(); + cells->layout(); } -void KWTableFrameSet::tqinvalidate() +void KWTableFrameSet::invalidate() { for (TableIter cells(this) ; cells ; ++cells) - cells->tqinvalidate(); + cells->invalidate(); } void KWTableFrameSet::setVisible( bool v ) @@ -2291,9 +2291,9 @@ void KWTableFrameSet::printArrayDebug() { kdDebug(32004) << " | Row/Cell arrays" << endl; Q_ASSERT( m_rows == m_rowArray.size() ); for ( unsigned int row = 0; row < m_rows; ++row ) { - TQString str = TQString( " | Row %1: " ).tqarg( row ); + TQString str = TQString( " | Row %1: " ).arg( row ); for ( unsigned int col = 0; col < getColumns(); ++col ) - str += TQString("| 0x%1 ").tqarg( (unsigned long)(*m_rowArray[row])[col], 0, 16 ); + str += TQString("| 0x%1 ").arg( (unsigned long)(*m_rowArray[row])[col], 0, 16 ); kdDebug(32004) << str<< " |" << endl; } } @@ -2319,7 +2319,7 @@ KWTableFrameSet::Cell::Cell( KWTableFrameSet *table, unsigned int row, unsigned KWTextFrameSet( table->m_doc, // Generate frameset name from table_name+row+col i18n("Hello dear translator :), 1 is the table name, 2 and 3 are row and column", "%1 Cell %2,%3") - .tqarg( table->name() ).tqarg(row).tqarg(col) ) + .arg( table->name() ).arg(row).arg(col) ) { m_row = row; m_col = col; @@ -2829,7 +2829,7 @@ KWTableFrameSet::MarkedIterator::MarkedIterator(KWTableFrameSet *table) : if ( current() ) { // kdDebug() << "MarkedIterator: visit: " -// << TQString("| 0x%1 ").tqarg((unsigned long)current(), 0, 16) << endl; +// << TQString("| 0x%1 ").arg((unsigned long)current(), 0, 16) << endl; current()->setMark(); } } @@ -2844,7 +2844,7 @@ KWTableFrameSet::MarkedIterator::operator++() } if ( current() ) { // kdDebug() << "MarkedIterator: visit: " -// << TQString("| 0x%1 ").tqarg((unsigned long)current(), 0, 16) << endl; +// << TQString("| 0x%1 ").arg((unsigned long)current(), 0, 16) << endl; current()->setMark(); } return ret; diff --git a/kword/KWTableFrameSet.h b/kword/KWTableFrameSet.h index e379f3b6..d5fdea1a 100644 --- a/kword/KWTableFrameSet.h +++ b/kword/KWTableFrameSet.h @@ -472,8 +472,8 @@ public: ulong & sentences, ulong & syllables,ulong & lines, bool selected ); virtual void finalize(); - virtual void tqinvalidate(); - virtual void tqlayout(); + virtual void invalidate(); + virtual void layout(); virtual void updateFrames( int flags = 0xff ); @@ -520,7 +520,7 @@ protected: /// \overload KWFrameSet::deleteAnchors virtual void deleteAnchors(); /// \overload KWFrameSet::createAnchors - 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 ); private: void addCellToArray( Cell* cell ); diff --git a/kword/KWTableStyle.cpp b/kword/KWTableStyle.cpp index 47f9029b..20016d49 100644 --- a/kword/KWTableStyle.cpp +++ b/kword/KWTableStyle.cpp @@ -31,7 +31,7 @@ #include <tqdom.h> KWTableStyleCollection::KWTableStyleCollection() - : KoUserStyleCollection( TQString::tqfromLatin1( "table" ) ) + : KoUserStyleCollection( TQString::fromLatin1( "table" ) ) { } diff --git a/kword/KWTableStyle.h b/kword/KWTableStyle.h index 0452312e..aa987589 100644 --- a/kword/KWTableStyle.h +++ b/kword/KWTableStyle.h @@ -26,7 +26,7 @@ #include <tqdom.h> #include <tqptrlist.h> -#include <tqbrush.h> +#include <brush.h> class KWFrameStyleCollection; class KoStyleCollection; @@ -89,7 +89,7 @@ class KWTableStyleCollection : public KoUserStyleCollection public: KWTableStyleCollection(); - 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/KWTableStyleManager.cpp b/kword/KWTableStyleManager.cpp index c7cd547a..4682c2cf 100644 --- a/kword/KWTableStyleManager.cpp +++ b/kword/KWTableStyleManager.cpp @@ -39,7 +39,7 @@ #include <tqgroupbox.h> #include <tqpainter.h> #include <tqlineedit.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcombobox.h> #include <tqframe.h> @@ -118,19 +118,19 @@ void KWTableStylePreview::drawContents( TQPainter *p ) { // For centering to work, and to even get word wrapping when the thing is too big :) m_textdoc->setWidth( widthLU ); - parag->tqinvalidate(0); + parag->invalidate(0); } parag->format(); TQRect textRect = parag->pixelRect( m_zoomHandler ); - // Center vertically, but not horizontally, to keep the parag tqalignment working, + // Center vertically, but not horizontally, to keep the parag alignment working, textRect.moveTopLeft( TQPoint( fr.x(), fr.y() + ( fr.height() - textRect.height() ) / 2 ) ); p->setClipRect( textRect.intersect( fr ) ); p->translate( textRect.x(), textRect.y() ); - TQColorGroup cg = TQApplication::tqpalette().active(); + TQColorGroup cg = TQApplication::palette().active(); cg.setBrush( TQColorGroup::Base, tableStyle->frameStyle()->backgroundColor() ); m_textdoc->drawWYSIWYG( p, 1, 0, textRect.width() - 1, textRect.height(), cg, m_zoomHandler ); @@ -145,7 +145,7 @@ void KWTableStylePreview::setTableStyle( KWTableStyle *_tableStyle ) KoTextParag * parag = m_textdoc->firstParag(); parag->applyStyle( tableStyle->paragraphStyle() ); - tqrepaint(true); + repaint(true); } /******************************************************************/ @@ -275,35 +275,35 @@ void KWTableStyleManager::setupMain() mainLayout->setSpacing( KDialog::spacingHint() ); preview = new KWTableStylePreview( i18n("Preview"), i18n("Tablestyles preview"), main ); - preview->resize(preview->tqsizeHint()); + preview->resize(preview->sizeHint()); mainLayout->addMultiCellWidget( preview, 1, 1, 0, 1 ); m_nameString = new TQLineEdit( main ); - 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 &) ) ); mainLayout->addWidget( m_nameString, 0, 1 ); TQLabel *nameLabel = new TQLabel( main ); nameLabel->setText( i18n( "Name:" ) ); - nameLabel->resize(nameLabel->tqsizeHint()); - nameLabel->tqsetAlignment( AlignRight | AlignVCenter ); + nameLabel->resize(nameLabel->sizeHint()); + nameLabel->setAlignment( AlignRight | AlignVCenter ); mainLayout->addWidget( nameLabel, 0, 0 ); TQGroupBox *adjustBox = new TQGroupBox( 0, Qt::Vertical, i18n("Adjust"), main); - adjustBox->tqlayout()->setSpacing(KDialog::spacingHint()); - adjustBox->tqlayout()->setMargin(KDialog::marginHint()); - TQGridLayout *adjustLayout = new TQGridLayout( adjustBox->tqlayout() ); + adjustBox->layout()->setSpacing(KDialog::spacingHint()); + adjustBox->layout()->setMargin(KDialog::marginHint()); + TQGridLayout *adjustLayout = new TQGridLayout( adjustBox->layout() ); TQLabel *frameStyleLabel = new TQLabel( adjustBox ); frameStyleLabel->setText( i18n( "Framestyle:" ) ); - frameStyleLabel->tqsetAlignment( AlignRight | AlignVCenter ); + frameStyleLabel->setAlignment( AlignRight | AlignVCenter ); TQLabel *styleLabel = new TQLabel( adjustBox ); styleLabel->setText( i18n( "Textstyle:" ) ); - styleLabel->tqsetAlignment( AlignRight | AlignVCenter ); + styleLabel->setAlignment( AlignRight | AlignVCenter ); m_frameStyle = new TQComboBox( adjustBox ); m_style = new TQComboBox( adjustBox ); @@ -412,7 +412,7 @@ void KWTableStyleManager::addStyle() save(); KWTableStyleCollection* collection = m_doc->tableStyleCollection(); - TQString str = i18n( "New Tablestyle Template (%1)" ).tqarg(numTableStyles++); + TQString str = i18n( "New Tablestyle Template (%1)" ).arg(numTableStyles++); if ( m_currentTableStyle ) { m_currentTableStyle = new KWTableStyle( *m_currentTableStyle ); diff --git a/kword/KWTableTemplate.h b/kword/KWTableTemplate.h index b0e608d7..6d62dc56 100644 --- a/kword/KWTableTemplate.h +++ b/kword/KWTableTemplate.h @@ -24,7 +24,7 @@ #include <tqdom.h> #include <tqptrlist.h> -#include <tqbrush.h> +#include <brush.h> class KWTableTemplate; class KWDocument; diff --git a/kword/KWTableTemplateSelector.cpp b/kword/KWTableTemplateSelector.cpp index c36743df..98e5e8fb 100644 --- a/kword/KWTableTemplateSelector.cpp +++ b/kword/KWTableTemplateSelector.cpp @@ -41,7 +41,7 @@ #include <tqdom.h> #include <tqrect.h> #include <tqptrlist.h> -#include <tqlayout.h> +#include <layout.h> #include <stdlib.h> #include <math.h> @@ -190,7 +190,7 @@ void KWTableTemplatePreview::drawCell( TQPainter *p, const KWTableStyle *ts, con { // For centering to work, and to even get word wrapping when the thing is too big :) m_textdoc->setWidth( widthLU ); - parag->tqinvalidate(0); + parag->invalidate(0); } double x_add = ( (rb < ts->frameStyle()->rightBorder().width()) ? ts->frameStyle()->rightBorder().width() : rb ) +1; @@ -207,7 +207,7 @@ void KWTableTemplatePreview::drawCell( TQPainter *p, const KWTableStyle *ts, con p->setClipRect( textRect.intersect( globalRect ) ); p->translate( textRect.x(), textRect.y() ); - TQColorGroup cg = TQApplication::tqpalette().active(); + TQColorGroup cg = TQApplication::palette().active(); cg.setBrush( TQColorGroup::Base, ts->frameStyle()->backgroundColor() ); m_textdoc->drawWYSIWYG( p, 1, 0, textRect.width() - 1, textRect.height(), cg, m_zoomHandler ); @@ -403,7 +403,7 @@ void KWTableTemplatePreview::setTableTemplate( KWTableTemplate *_tableTemplate ) setSpecialCells(_tableTemplate); - tqrepaint( true ); + repaint( true ); } void KWTableTemplatePreview::fillContents() @@ -447,7 +447,7 @@ void KWTableTemplatePreview::cbFirstRowChanged( bool enable ) if ( (!enable) && ( origTableTemplate->pTopRightCorner()==origTableTemplate->pFirstRow() ) ) tableTemplate->setTopRightCorner( tableTemplate->pBodyCell() ); if ( !m_disableRepaint ) - tqrepaint( true ); + repaint( true ); } void KWTableTemplatePreview::cbFirstColChanged( bool enable ) @@ -470,7 +470,7 @@ void KWTableTemplatePreview::cbFirstColChanged( bool enable ) tableTemplate->setBottomLeftCorner( tableTemplate->pBodyCell() ); if ( !m_disableRepaint ) - tqrepaint( true ); + repaint( true ); } void KWTableTemplatePreview::cbLastRowChanged( bool enable ) @@ -493,7 +493,7 @@ void KWTableTemplatePreview::cbLastRowChanged( bool enable ) tableTemplate->setBottomLeftCorner( tableTemplate->pBodyCell() ); if ( !m_disableRepaint ) - tqrepaint( true ); + repaint( true ); } void KWTableTemplatePreview::cbLastColChanged( bool enable ) @@ -516,7 +516,7 @@ void KWTableTemplatePreview::cbLastColChanged( bool enable ) tableTemplate->setBottomRightCorner( tableTemplate->pBodyCell() ); if ( !m_disableRepaint ) - tqrepaint( true ); + repaint( true ); } void KWTableTemplatePreview::cbBodyChanged( bool enable ) @@ -533,7 +533,7 @@ void KWTableTemplatePreview::cbBodyChanged( bool enable ) delete oldTemplate; if ( !m_disableRepaint ) - tqrepaint( true ); + repaint( true ); } @@ -648,7 +648,7 @@ void KWTableTemplateSelector::initPreview() preview->cbLastColChanged( cbLastCol->isChecked() ); preview->cbBodyChanged( cbBody->isChecked() ); preview->disableRepaint(false); - preview->tqrepaint(); + preview->repaint(); } int KWTableTemplateSelector::getFormatType() const diff --git a/kword/KWTableTemplateSelector.h b/kword/KWTableTemplateSelector.h index 1bae479b..9933b57a 100644 --- a/kword/KWTableTemplateSelector.h +++ b/kword/KWTableTemplateSelector.h @@ -26,9 +26,9 @@ #include <tqlabel.h> #include <tqpushbutton.h> -/*#include <tqlayout.h> +/*#include <layout.h> #include <tqfont.h> -#include <tqbrush.h> +#include <brush.h> */ class TQListBox; 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 ); diff --git a/kword/KWTextFrameSet.h b/kword/KWTextFrameSet.h index ef83a3c8..aee28007 100644 --- a/kword/KWTextFrameSet.h +++ b/kword/KWTextFrameSet.h @@ -93,14 +93,14 @@ public: void clearUndoRedoInfo(); /** Convert the @p dPoint in the normal coordinate system (and in pt) - * into a point (@p iPoint) in the internal qtextdoc coordinates (in tqlayout units). */ + * into a point (@p iPoint) in the internal qtextdoc coordinates (in layout units). */ KWFrame * documentToInternal( const KoPoint &dPoint, TQPoint &iPoint ) const; /// used by documentToInternalMouseSelection() enum RelativePosition { InsideFrame, LeftOfFrame, TopOfFrame, AtEnd }; KWFrame * documentToInternalMouseSelection( const KoPoint &dPoint, TQPoint &iPoint, RelativePosition& relPos, KWViewMode *viewMode ) const; - /** Convert the @p in the internal qtextdoc coordinates (in tqlayout units) + /** Convert the @p in the internal qtextdoc coordinates (in layout units) * into a point in the document coordinate system (in pt). * Also returns the frame in which this point is. */ KWFrame * internalToDocument( const KoPoint &relPoint, KoPoint &dPoint ) const; @@ -125,7 +125,7 @@ public: KoPoint internalToDocumentKnowingFrame( const TQPoint &iPoint, KWFrame* theFrame ) const; /** Implementation of Ctrl+PageUp/PageDown - * Returns a point in tqlayout units (for placing the cursor) */ + * Returns a point in layout units (for placing the cursor) */ TQPoint moveToPage( int currentPgNum, short int direction ) const; /** Return the available height in pixels (sum of all frames' height, with zoom applied) @@ -215,8 +215,8 @@ public: void findPosition( const KoPoint &dPoint, KoTextParag * & parag, int & index ); /** Highlighting support (for search/replace, spellchecking etc.) */ - void highlightPortion( KoTextParag * parag, int index, int length, KWCanvas * canvas, bool tqrepaint = true, KDialogBase* dialog = 0 ); - void removeHighlight( bool tqrepaint = true ); + void highlightPortion( KoTextParag * parag, int index, int length, KWCanvas * canvas, bool repaint = true, KDialogBase* dialog = 0 ); + void removeHighlight( bool repaint = true ); virtual void addTextFrameSets( TQPtrList<KWTextFrameSet> &lst, bool onlyReadWrite=false ); @@ -237,9 +237,9 @@ public: #endif /** Invalidate all paragraphs and start re-formatting */ - virtual void tqlayout(); + virtual void layout(); /** Invalidate all paragraphs (causes a re-flow of the text upon next redraw) */ - virtual void tqinvalidate(); + virtual void invalidate(); virtual int paragraphs(); virtual int paragraphsSelected(); @@ -275,19 +275,19 @@ public: /** Let KoTextFormatInterface set the modified format */ virtual KCommand *setFormatCommand( const KoTextFormat * newFormat, int flags, bool zoomFont = false ); - /** Let KoTextFormatInterface access the current parag tqlayout */ + /** Let KoTextFormatInterface access the current parag layout */ virtual const KoParagLayout * currentParagLayoutFormat() const; virtual bool rtl() const ; - /** Let KoTextFormatInterface set a modified current parag tqlayout */ + /** Let KoTextFormatInterface set a modified current parag layout */ virtual KCommand *setParagLayoutFormatCommand( KoParagLayout *newLayout, int flags, int marginIndex=-1); virtual KCommand *setChangeCaseOfTextCommand(KoChangeCaseDia::TypeOfCase _type); /** (Assuming this==main frameset), recalc the foot note numbers */ - void renumberFootNotes( bool tqrepaint = true ); + void renumberFootNotes( bool repaint = true ); /** * Iteration over text objects - used by KWBgSpellCheck diff --git a/kword/KWTextParag.cpp b/kword/KWTextParag.cpp index d50e98a0..41d1749a 100644 --- a/kword/KWTextParag.cpp +++ b/kword/KWTextParag.cpp @@ -109,9 +109,9 @@ void KWTextParag::drawFormattingChars( TQPainter &painter, int start, int len, void KWTextParag::setPageBreaking( int pb ) { m_layout.pageBreaking = pb; - tqinvalidate(0); + invalidate(0); if ( next() && ( pb & KoParagLayout::HardFrameBreakAfter ) ) - next()->tqinvalidate(0); + next()->invalidate(0); } KWTextDocument * KWTextParag::kwTextDocument() const @@ -385,7 +385,7 @@ void KWTextParag::save( TQDomElement &parentElem, int from /* default 0 */, TQDomElement layoutElem = doc.createElement( "LAYOUT" ); paragElem.appendChild( layoutElem ); - // save with the real tqalignment (left or right, not auto) + // save with the real alignment (left or right, not auto) m_layout.saveParagLayout( layoutElem, resolveAlignment() ); // Paragraph's format @@ -552,16 +552,16 @@ KoTextFormat KWTextParag::loadFormat( TQDomElement &formatElem, KoTextFormat * r void KWTextParag::loadLayout( TQDomElement & attributes ) { - TQDomElement tqlayout = attributes.namedItem( "LAYOUT" ).toElement(); - if ( !tqlayout.isNull() ) + TQDomElement layout = attributes.namedItem( "LAYOUT" ).toElement(); + if ( !layout.isNull() ) { KWDocument * doc = kwTextDocument()->textFrameSet()->kWordDocument(); - KoParagLayout paragLayout = loadParagLayout( tqlayout, doc, true ); + KoParagLayout paragLayout = loadParagLayout( layout, doc, true ); setParagLayout( paragLayout ); // Load default format from style. KoTextFormat *defaultFormat = style() ? &style()->format() : 0L; - TQDomElement formatElem = tqlayout.namedItem( "FORMAT" ).toElement(); + TQDomElement formatElem = layout.namedItem( "FORMAT" ).toElement(); if ( !formatElem.isNull() ) { // Load paragraph format @@ -577,7 +577,7 @@ void KWTextParag::loadLayout( TQDomElement & attributes ) else { // Even the simplest import filter should do <LAYOUT><NAME value="Standard"/></LAYOUT> - kdWarning(32001) << "No LAYOUT tag in PARAGRAPH, dunno what tqlayout to apply" << endl; + kdWarning(32001) << "No LAYOUT tag in PARAGRAPH, dunno what layout to apply" << endl; } } @@ -601,7 +601,7 @@ void KWTextParag::load( TQDomElement &attributes ) loadFormatting( attributes ); setChanged( true ); - tqinvalidate( 0 ); + invalidate( 0 ); } void KWTextParag::loadFormatting( TQDomElement &attributes, int offset, bool loadFootNote ) @@ -639,7 +639,7 @@ void KWTextParag::loadFormatting( TQDomElement &attributes, int offset, bool loa // However, as it is an invalid XML character, we must replace it // or it will be written out while save the file. KoTextStringChar& ch = string()->at(index); - if (ch.c.tqunicode()==1) + if (ch.c.unicode()==1) { kdDebug() << "Replacing TQChar(1) (in KWTextParag::loadFormatting)" << endl; ch.c='#'; @@ -740,12 +740,12 @@ void KWTextParag::loadFormatting( TQDomElement &attributes, int offset, bool loa } } -void KWTextParag::setParagLayout( const KoParagLayout & tqlayout, int flags, int marginIndex ) +void KWTextParag::setParagLayout( const KoParagLayout & layout, int flags, int marginIndex ) { - KoTextParag::setParagLayout( tqlayout, flags, marginIndex ); + KoTextParag::setParagLayout( layout, flags, marginIndex ); if ( flags & KoParagLayout::PageBreaking ) - setPageBreaking( tqlayout.pageBreaking ); + setPageBreaking( layout.pageBreaking ); } ////////// @@ -753,7 +753,7 @@ void KWTextParag::setParagLayout( const KoParagLayout & tqlayout, int flags, int // Create a KoParagLayout from XML. KoParagLayout KWTextParag::loadParagLayout( TQDomElement & parentElem, KWDocument *doc, bool findStyle ) { - KoParagLayout tqlayout; + KoParagLayout layout; // Only when loading paragraphs, not when loading styles if ( findStyle ) @@ -779,12 +779,12 @@ KoParagLayout KWTextParag::loadParagLayout( TQDomElement & parentElem, KWDocumen style = doc->styleCollection()->findStyle( "Standard" ); } Q_ASSERT(style); - tqlayout.style = style; + layout.style = style; } - KoParagLayout::loadParagLayout( tqlayout, parentElem, doc->syntaxVersion() ); + KoParagLayout::loadParagLayout( layout, parentElem, doc->syntaxVersion() ); - return tqlayout; + return layout; } void KWTextParag::join( KoTextParag *parag ) @@ -808,10 +808,10 @@ void KWTextParag::loadOasis( const TQDomElement& paragElement, KoOasisContext& c const TQDomElement* paragraphStyle = context.oasisStyles().findStyle( styleName, "paragraph" ); TQString masterPageName = paragraphStyle ? paragraphStyle->attributeNS( KoXmlNS::style, "master-page-name", TQString() ) : TQString(); - // In KWord we don't support sections so the first paragraph is the one that determines the page tqlayout. + // In KWord we don't support sections so the first paragraph is the one that determines the page layout. if ( prev() == 0 ) { if ( masterPageName.isEmpty() ) - masterPageName = "Standard"; // Seems to be a builtin name for the default tqlayout... + masterPageName = "Standard"; // Seems to be a builtin name for the default layout... currentMasterPageRef = masterPageName; // do this first to avoid recursion context.styleStack().save(); context.styleStack().setTypeProperties( "paragraph" ); @@ -822,18 +822,18 @@ void KWTextParag::loadOasis( const TQDomElement& paragElement, KoOasisContext& c doc->variableCollection()->variableSetting()->setStartingPageNumber( pageNumber.toInt() ); context.styleStack().restore(); - doc->loadOasisPageLayout( masterPageName, context ); // page tqlayout + doc->loadOasisPageLayout( masterPageName, context ); // page layout } else if ( !masterPageName.isEmpty() // empty means no change && masterPageName != currentMasterPageRef ) { - // Detected a change in the master page -> this means we have to use a new page tqlayout + // Detected a change in the master page -> this means we have to use a new page layout // and insert a frame break if not on the first paragraph. kdDebug(32001) << "KWTextParag::loadOasis: change of master page detected: from " << currentMasterPageRef << " to " << masterPageName << " -> inserting page break" << endl; currentMasterPageRef = masterPageName; // [see also KoParagLayout for the 'normal' way to insert page breaks] m_layout.pageBreaking |= KoParagLayout::HardFrameBreakBefore; - // We have no way to load/use the new page tqlayout, KWord doesn't have "sections". + // We have no way to load/use the new page layout, KWord doesn't have "sections". } } } diff --git a/kword/KWTextParag.h b/kword/KWTextParag.h index b0a9d044..de484a48 100644 --- a/kword/KWTextParag.h +++ b/kword/KWTextParag.h @@ -46,7 +46,7 @@ public: KWTextDocument * kwTextDocument() const; - virtual void setParagLayout( const KoParagLayout &tqlayout, int flags = KoParagLayout::All, int marginIndex = -1 ); + virtual void setParagLayout( const KoParagLayout &layout, int flags = KoParagLayout::All, int marginIndex = -1 ); /** The type of page-breaking behaviour */ void setPageBreaking( int pb ); // warning this sets all the flags! @@ -73,7 +73,7 @@ public: /** Load (from KWord-1.3 XML) and apply \<FORMAT\> tags (used by KWTextParag::load and by KWPasteCommand) */ void loadFormatting( TQDomElement &attributes, int offset = 0, bool loadFootNote=true ); - /** Load (from KWord-1.3 XML) and apply paragraph tqlayout */ + /** Load (from KWord-1.3 XML) and apply paragraph layout */ void loadLayout( TQDomElement & attributes ); /** Load (from KWord-1.3 XML), optionally using styles from document. */ diff --git a/kword/KWVariable.cpp b/kword/KWVariable.cpp index 5b82b220..80666965 100644 --- a/kword/KWVariable.cpp +++ b/kword/KWVariable.cpp @@ -351,7 +351,7 @@ void KWFootNoteVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& contex writer.startElement( "text:note-citation" ); if ( m_numberingType == Auto ) - writer.addTextNode( TQString( "%1" ).tqarg( m_numDisplay ) ); + writer.addTextNode( TQString( "%1" ).arg( m_numDisplay ) ); else { writer.addAttribute( "text:label", m_varValue.toString() ); @@ -478,7 +478,7 @@ TQString KWFootNoteVariable::text(bool realValue) void KWFootNoteVariable::setNumDisplay( int val ) { m_numDisplay = val; - if ( val != -1 ) // -1 is used to 'tqinvalidate so that renumberFootNotes recalcs' + if ( val != -1 ) // -1 is used to 'invalidate so that renumberFootNotes recalcs' formatedNote(); } @@ -532,7 +532,7 @@ void KWFootNoteVariable::finalize() fs->textObject()->abortFormatting(); // abortFormatting is a bool in kotextobject. So we need to return there before - // starting text tqlayout again. + // starting text layout again. m_doc->delayedRecalcFrames( TQMIN( pageNum, framePage ) ); m_doc->delayedRepaintAllViews(); } @@ -596,7 +596,7 @@ void KWFootNoteVariable::setDeleted( bool del ) m_doc->recalcFrames(); if (!del) - m_frameset->tqlayout(); // format its text, so that it resizes the frame + m_frameset->layout(); // format its text, so that it resizes the frame KoVariable::setDeleted( del ); // Does this compress? Probably not. m_doc->delayedRepaintAllViews(); @@ -617,7 +617,7 @@ double KWFootNoteVariable::varY() const if ( !fs->hasFramesInPageArray() ) // we need it for internalToDocument { kdDebug(32001) << "KWFootNoteVariable::varY too early, no updateFrames yet" << endl; - return 0; // this happens on loading - frame tqlayout is done before text tqlayout + return 0; // this happens on loading - frame layout is done before text layout } // What we need is "has never been formatted". Not "has just been invalidated"... //if ( !paragraph()->isValid() ) diff --git a/kword/KWView.cpp b/kword/KWView.cpp index 4ec739eb..785a57de 100644 --- a/kword/KWView.cpp +++ b/kword/KWView.cpp @@ -119,10 +119,10 @@ #include <tdeversion.h> #include <kiconloader.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqapplication.h> #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpaintdevicemetrics.h> #include <tqprogressdialog.h> #include <tqregexp.h> @@ -288,27 +288,27 @@ KWView::KWView( const TQString& viewMode, TQWidget *parent, const char *name, KW if ( KStatusBar* sb = statusBar() ) // No statusbar in e.g. konqueror { m_sbPageLabel = new KStatusBarLabel( TQString(), 0, sb ); - m_sbPageLabel->tqsetAlignment( AlignLeft | AlignVCenter ); + m_sbPageLabel->setAlignment( AlignLeft | AlignVCenter ); addStatusBarItem( m_sbPageLabel, 0 ); m_sbModifiedLabel = new KStatusBarLabel( " ", 0, sb ); - m_sbModifiedLabel->tqsetAlignment( AlignLeft | AlignVCenter ); + m_sbModifiedLabel->setAlignment( AlignLeft | AlignVCenter ); addStatusBarItem( m_sbModifiedLabel, 0 ); m_sbFramesLabel = new KStatusBarLabel( TQString(), 0, sb ); - m_sbFramesLabel->tqsetAlignment( AlignLeft | AlignVCenter ); + m_sbFramesLabel->setAlignment( AlignLeft | AlignVCenter ); addStatusBarItem( m_sbFramesLabel, 1 ); m_sbOverwriteLabel = new KStatusBarLabel( ' ' + i18n( "INSRT" ) + ' ', 0, sb ); - m_sbOverwriteLabel->tqsetAlignment( AlignHCenter | AlignVCenter ); + m_sbOverwriteLabel->setAlignment( AlignHCenter | AlignVCenter ); addStatusBarItem( m_sbOverwriteLabel, 0 ); m_sbZoomLabel = new KStatusBarLabel( ' ' + TQString::number( m_doc->zoom() ) + "% ", 0, sb ); - m_sbZoomLabel->tqsetAlignment( AlignHCenter | AlignVCenter ); + m_sbZoomLabel->setAlignment( AlignHCenter | AlignVCenter ); addStatusBarItem( m_sbZoomLabel, 0 ); m_sbUnitLabel = new KStatusBarLabel( ' ' + KoUnit::unitDescription( m_doc->unit() ) + ' ', 0, sb ); - m_sbUnitLabel->tqsetAlignment( AlignHCenter | AlignVCenter ); + m_sbUnitLabel->setAlignment( AlignHCenter | AlignVCenter ); addStatusBarItem( m_sbUnitLabel, 0 ); } @@ -339,7 +339,7 @@ KWView::KWView( const TQString& viewMode, TQWidget *parent, const char *name, KW connect( frameViewManager(), TQT_SIGNAL(sigFrameSetRenamed()), TQT_TQOBJECT(this), TQT_SLOT( updateFrameStatusBarItem())); - connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), + connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), TQT_TQOBJECT(this), TQT_SLOT( clipboardDataChanged() ) ); connect( m_gui->canvasWidget(), TQT_SIGNAL(currentFrameSetEditChanged()), @@ -404,7 +404,7 @@ KWView::KWView( const TQString& viewMode, TQWidget *parent, const char *name, KW // Determine initial scroll position // We do this delayed, so that the GUI has been fully constructed - // (and e.g. the statusbar can tqrepaint). + // (and e.g. the statusbar can repaint). TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetInitialPosition() ) ); TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateZoom() ) ); } @@ -640,7 +640,7 @@ void KWView::setupActions() TQT_TQOBJECT(this), TQT_SLOT( viewTextMode() ), actionCollection(), "view_textmode" ); m_actionViewTextMode->setToolTip( i18n( "Only show the text of the document." ) ); - m_actionViewTextMode->setWhatsThis( i18n( "Do not show any pictures, formatting or tqlayout. KWord will display only the text for editing." ) ); + m_actionViewTextMode->setWhatsThis( i18n( "Do not show any pictures, formatting or layout. KWord will display only the text for editing." ) ); m_actionViewTextMode->setExclusiveGroup( "viewmodes" ); m_actionViewPageMode = new KToggleAction( i18n( "&Page Mode" ), 0, @@ -1000,7 +1000,7 @@ void KWView::setupActions() // This approach allows to edit toolbars and extract separate actions from this menu KToggleAction* act = new KToggleAction( styleIt.current()->name(), /*TODO icon,*/ 0, TQT_TQOBJECT(this), TQT_SLOT( slotCounterStyleSelected() ), - actionCollection(), TQString("counterstyle_%1").tqarg( styleIt.current()->style() ).latin1() ); + actionCollection(), TQString("counterstyle_%1").arg( styleIt.current()->style() ).latin1() ); act->setExclusiveGroup( "counterstyle" ); // Add to the right menu: both for "none", bullet for bullets, numbers otherwise if ( styleIt.current()->style() == KoParagCounter::STYLE_NONE ) { @@ -1491,7 +1491,7 @@ void KWView::createExpressionActions( KActionMenu * parentMenu,const TQString& f TQString text = i18n( e2.namedItem( "Text" ).toElement().text().utf8() ); KAction * act = new KAction( text, 0, TQT_TQOBJECT(this), TQT_SLOT( insertExpression() ), actionCollection(), - TQString("expression-action_%1").tqarg(i).latin1() ); + TQString("expression-action_%1").arg(i).latin1() ); if ( personalShortCut.contains(text) ) act->setShortcut( personalShortCut[text] ); i++; @@ -1542,7 +1542,7 @@ void KWView::addVariableActions( int type, const TQStringList & texts, KAction * act = new KAction( (*it), 0, TQT_TQOBJECT(this), TQT_SLOT( insertVariable() ), actionCollection(), actionName ); // Mainly for KEditToolbar - act->setToolTip( i18n( "Insert variable \"%1\" into the text" ).tqarg( *it ) ); + act->setToolTip( i18n( "Insert variable \"%1\" into the text" ).arg( *it ) ); m_variableDefMap.insert( act, v ); parentMenu->insert( act ); } @@ -1583,7 +1583,7 @@ void KWView::refreshCustomMenu() if ( !lst.contains( varName) ) { lst.append( varName ); - TQCString name = TQString("custom-action_%1").tqarg(i).latin1(); + TQCString name = TQString("custom-action_%1").arg(i).latin1(); act = new KAction( varName, shortCuts[varName], TQT_TQOBJECT(this), TQT_SLOT( insertCustomVariable() ),actionCollection(), name ); act->setGroup( "custom-variable-action" ); m_actionInsertCustom->insert( act ); @@ -1595,7 +1595,7 @@ void KWView::refreshCustomMenu() if(state) m_actionInsertCustom->popupMenu()->insertSeparator(); - act = new KAction( i18n("New..."), 0, TQT_TQOBJECT(this), TQT_SLOT( insertNewCustomVariable() ), actionCollection(),TQString("custom-action_%1").tqarg(i).latin1()); + act = new KAction( i18n("New..."), 0, TQT_TQOBJECT(this), TQT_SLOT( insertNewCustomVariable() ), actionCollection(),TQString("custom-action_%1").arg(i).latin1()); act->setGroup( "custom-variable-action" ); @@ -1653,15 +1653,15 @@ void KWView::updatePageInfo() TQString oldText = m_sbPageLabel->text(); TQString newText; if ( viewMode()->hasPages() ) - newText = ' ' + i18n( "Page %1 of %2" ).tqarg(m_currentPage->pageNumber()) - .tqarg(m_doc->pageCount()) + ' '; + newText = ' ' + i18n( "Page %1 of %2" ).arg(m_currentPage->pageNumber()) + .arg(m_doc->pageCount()) + ' '; if ( newText != oldText ) { m_sbPageLabel->setText( newText ); - // Need to tqrepaint immediately. Otherwise when deleting 100 pages + // Need to repaint immediately. Otherwise when deleting 100 pages // at once, there's no feedback. - m_sbPageLabel->tqrepaint(); + m_sbPageLabel->repaint(); } } slotUpdateRuler(); @@ -1688,16 +1688,16 @@ void KWView::updateFrameStatusBarItem() TQString unitName = m_doc->unitName(); KWFrame * frame = frameViewManager()->selectedFrames()[0]->frame(); m_sbFramesLabel->setText( ' ' + i18n( "Statusbar info", "%1: %2, %3 - %4, %5 (width: %6, height: %7)" ) - .tqarg( frame->frameSet()->name() ) - .tqarg( KoUnit::toUserStringValue( frame->left(), unit ) ) - .tqarg( KoUnit::toUserStringValue( frame->top() - m_doc->pageManager()->topOfPage( + .arg( frame->frameSet()->name() ) + .arg( KoUnit::toUserStringValue( frame->left(), unit ) ) + .arg( KoUnit::toUserStringValue( frame->top() - m_doc->pageManager()->topOfPage( m_doc->pageManager()->pageNumber(frame->rect()) ), unit) ) - .tqarg( KoUnit::toUserStringValue( frame->right(), unit ) ) - .tqarg( KoUnit::toUserStringValue( frame->bottom(), unit ) ) - .tqarg( KoUnit::toUserStringValue( frame->width(), unit ) ) - .tqarg( KoUnit::toUserStringValue( frame->height(), unit ) ) ); + .arg( KoUnit::toUserStringValue( frame->right(), unit ) ) + .arg( KoUnit::toUserStringValue( frame->bottom(), unit ) ) + .arg( KoUnit::toUserStringValue( frame->width(), unit ) ) + .arg( KoUnit::toUserStringValue( frame->height(), unit ) ) ); } else - m_sbFramesLabel->setText( ' ' + i18n( "%1 frames selected" ).tqarg( nbFrame ) ); + m_sbFramesLabel->setText( ' ' + i18n( "%1 frames selected" ).arg( nbFrame ) ); } else if ( sb && m_sbFramesLabel ) m_sbFramesLabel->setText( TQString() ); @@ -1718,12 +1718,12 @@ void KWView::clipboardDataChanged() } KWFrameSetEdit * edit = m_gui->canvasWidget()->currentFrameSetEdit(); // Is there plain text in the clipboard ? - if ( edit && !TQApplication::tqclipboard()->text().isEmpty() ) + if ( edit && !TQApplication::clipboard()->text().isEmpty() ) { m_actionEditPaste->setEnabled(true); return; } - TQMimeSource *data = TQApplication::tqclipboard()->data(); + TQMimeSource *data = TQApplication::clipboard()->data(); const int provides = checkClipboard( data ); if ( provides & ( ProvidesImage | ProvidesOasis | ProvidesFormula ) ) m_actionEditPaste->setEnabled( true ); @@ -1789,7 +1789,7 @@ void KWView::print( KPrinter &prt ) m_doc->recalcVariables( VT_ALL ); } -// Don't tqrepaint behind the print dialog until we're done zooming/unzooming the doc +// Don't repaint behind the print dialog until we're done zooming/unzooming the doc m_gui->canvasWidget()->setUpdatesEnabled(false); m_gui->canvasWidget()->viewport()->setCursor( waitCursor ); @@ -1938,7 +1938,7 @@ void KWView::print( KPrinter &prt ) m_doc->variableCollection()->recalcVariables(VT_MAILMERGE); painter.end(); // this is what triggers the printing - m_doc->variableCollection()->variableSetting()->setLastPrintingDate(TQDateTime::tqcurrentDateTime()); + m_doc->variableCollection()->variableSetting()->setLastPrintingDate(TQDateTime::currentDateTime()); m_doc->recalcVariables( VT_DATE ); } @@ -2365,7 +2365,7 @@ void KWView::editCut() edit->cut(); else { TQDragObject *drag = m_doc->dragSelected( frameViewManager()->selectedFrames() ); - TQApplication::tqclipboard()->setData( drag ); + TQApplication::clipboard()->setData( drag ); deleteFrame(false); } } @@ -2377,13 +2377,13 @@ void KWView::editCopy() edit->copy(); else { TQDragObject *drag = m_doc->dragSelected( frameViewManager()->selectedFrames() ); - TQApplication::tqclipboard()->setData( drag ); + TQApplication::clipboard()->setData( drag ); } } void KWView::editPaste() { - TQMimeSource *data = TQApplication::tqclipboard()->data(); + TQMimeSource *data = TQApplication::clipboard()->data(); pasteData( data, false ); } @@ -2423,7 +2423,7 @@ void KWView::pasteData( TQMimeSource* data, bool drop ) provides = ProvidesPlainText; } if ( !drop ) // get it again, to avoid crashes - data = TQApplication::tqclipboard()->data(); + data = TQApplication::clipboard()->data(); } KWTextFrameSetEdit * edit = currentTextEdit(); if ( edit && ( provides & ProvidesPlainText ) ) { @@ -2433,7 +2433,7 @@ void KWView::pasteData( TQMimeSource* data, bool drop ) TQCString returnedTypeMime = KoTextObject::providesOasis( data ); if ( !returnedTypeMime.isEmpty() ) { - const TQByteArray arr = data->tqencodedData( returnedTypeMime ); + const TQByteArray arr = data->encodedData( returnedTypeMime ); if( !arr.isEmpty() ) { TQBuffer buffer( arr ); @@ -2629,7 +2629,7 @@ void KWView::adjustZOrderOfSelectedFrames(MoveFrameType moveType) { // Calling updateFrames() on the selected frames' framesets isn't enough, // we also need other framesets to notice the new frames on top. m_doc->updateAllFrames(); - m_doc->tqlayout(); + m_doc->layout(); m_doc->repaintAllViews(); } @@ -2784,7 +2784,7 @@ void KWView::deleteFrame( bool warning ) "Frameset '%1'. " "The contents of this Frameset will not appear " "anymore!\n" - "Are you sure you want to do that?").tqarg(fs->name()), + "Are you sure you want to do that?").arg(fs->name()), i18n("Delete Frame"), KStdGuiItem::del()); if (result != KMessageBox::Continue) @@ -2836,7 +2836,7 @@ void KWView::createLinkedFrame() if (selectedFrames.count() != 1) return; // action is disabled in such a case KWFrame* frame = selectedFrames[0]->frame(); - KWFrame* newFrame = new KWFrame(0L, frame->x() + m_gui->getVertRuler()->tqminimumSizeHint().width(), frame->y() + m_gui->getHorzRuler()->tqminimumSizeHint().height(), frame->width(), frame->height() ); + KWFrame* newFrame = new KWFrame(0L, frame->x() + m_gui->getVertRuler()->minimumSizeHint().width(), frame->y() + m_gui->getHorzRuler()->minimumSizeHint().height(), frame->width(), frame->height() ); newFrame->setZOrder( m_doc->maxZOrder( newFrame->pageNumber(m_doc) ) + 1 ); // make sure it's on top newFrame->setCopy(true); newFrame->setNewFrameBehavior( KWFrame::Copy ); @@ -3074,22 +3074,22 @@ void KWView::changeZoomMenu( int zoom ) qHeapSort( list ); for (TQValueList<int>::Iterator it = list.begin() ; it != list.end() ; ++it) - lst.append( i18n("%1%").tqarg(*it) ); + lst.append( i18n("%1%").arg(*it) ); } else { - lst << i18n("%1%").tqarg("33"); - lst << i18n("%1%").tqarg("50"); - lst << i18n("%1%").tqarg("75"); - lst << i18n("%1%").tqarg("100"); - lst << i18n("%1%").tqarg("125"); - lst << i18n("%1%").tqarg("150"); - lst << i18n("%1%").tqarg("200"); - lst << i18n("%1%").tqarg("250"); - lst << i18n("%1%").tqarg("350"); - lst << i18n("%1%").tqarg("400"); - lst << i18n("%1%").tqarg("450"); - lst << i18n("%1%").tqarg("500"); + lst << i18n("%1%").arg("33"); + lst << i18n("%1%").arg("50"); + lst << i18n("%1%").arg("75"); + lst << i18n("%1%").arg("100"); + lst << i18n("%1%").arg("125"); + lst << i18n("%1%").arg("150"); + lst << i18n("%1%").arg("200"); + lst << i18n("%1%").arg("250"); + lst << i18n("%1%").arg("350"); + lst << i18n("%1%").arg("400"); + lst << i18n("%1%").arg("450"); + lst << i18n("%1%").arg("500"); } m_actionViewZoom->setItems( lst ); } @@ -3097,7 +3097,7 @@ void KWView::changeZoomMenu( int zoom ) void KWView::showZoom( int zoom ) { TQStringList list = m_actionViewZoom->items(); - TQString zoomStr( i18n("%1%").tqarg( zoom ) ); + TQString zoomStr( i18n("%1%").arg( zoom ) ); m_actionViewZoom->setCurrentItem( list.findIndex(zoomStr) ); } @@ -3110,7 +3110,7 @@ void KWView::showZoom( const TQString& zoom ) void KWView::slotViewFormattingChars() { m_doc->setViewFormattingChars(m_actionViewFormattingChars->isChecked()); - m_doc->tqlayout(); // Due to the different formatting when this option is activated + m_doc->layout(); // Due to the different formatting when this option is activated m_doc->repaintAllViews(); } @@ -4112,7 +4112,7 @@ void KWView::insertFormula( TQMimeSource* source ) KWFormulaFrameSet *frameset = new KWFormulaFrameSet( m_doc, TQString() ); m_doc->addFrameSet( frameset, false ); // done first since the frame number is stored in the undo/redo if ( source ) { - TQByteArray data = source->tqencodedData( KFormula::MimeSource::selectionMimeType() ); + TQByteArray data = source->encodedData( KFormula::MimeSource::selectionMimeType() ); TQDomDocument formula; formula.setContent( data ); TQDomElement formulaElem = formula.namedItem("math").toElement(); @@ -4370,7 +4370,7 @@ void KWView::tableJoinCells() return; } m_doc->addCommand(cmd); - m_doc->tqlayout(); + m_doc->layout(); } void KWView::tableSplitCells() { @@ -4405,7 +4405,7 @@ void KWView::tableSplitCells(int cols, int rows) } m_doc->addCommand(cmd); m_doc->updateAllFrames(); - m_doc->tqlayout(); + m_doc->layout(); frameViewManager()->view(cell->frame(0))->setSelected(true); } @@ -4980,10 +4980,10 @@ void KWView::setSpacing( KoParagLayout::SpacingType spacing, const TQString& com KMacroCommand* macroCmd = 0L; for ( ; it.current() ; ++it ) { - KoParagLayout tqlayout( *it.current()->currentParagLayoutFormat() ); - tqlayout.lineSpacingType = spacing; + KoParagLayout layout( *it.current()->currentParagLayoutFormat() ); + layout.lineSpacingType = spacing; - KCommand *cmd = it.current()->setParagLayoutFormatCommand( &tqlayout, KoParagLayout::LineSpacing ); + KCommand *cmd = it.current()->setParagLayoutFormatCommand( &layout, KoParagLayout::LineSpacing ); if (cmd) { if ( !macroCmd ) @@ -5021,7 +5021,7 @@ void KWView::textSpacingDouble() void KWView::slotCounterStyleSelected() { - TQString actionName = TQString::tqfromLatin1(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()); + TQString actionName = TQString::fromLatin1(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()); TQString styleStr = actionName.mid(13); //kdDebug() << "KWView::slotCounterStyleSelected styleStr=" << styleStr << endl; KoParagCounter::Style style = (KoParagCounter::Style)(styleStr.toInt()); @@ -5167,8 +5167,8 @@ void KWView::textIncreaseIndent() m_doc->addCommand(macroCmd); if(!lst.isEmpty()) { - const KoParagLayout *tqlayout=lst.first()->currentParagLayoutFormat(); - showRulerIndent( tqlayout->margins[TQStyleSheetItem::MarginLeft], tqlayout->margins[TQStyleSheetItem::MarginFirstLine], tqlayout->margins[TQStyleSheetItem::MarginRight], lst.first()->rtl()); + const KoParagLayout *layout=lst.first()->currentParagLayoutFormat(); + showRulerIndent( layout->margins[TQStyleSheetItem::MarginLeft], layout->margins[TQStyleSheetItem::MarginFirstLine], layout->margins[TQStyleSheetItem::MarginRight], lst.first()->rtl()); } #if 0 @@ -5216,8 +5216,8 @@ void KWView::textDecreaseIndent() m_doc->addCommand(macroCmd); if(!lst.isEmpty()) { - const KoParagLayout *tqlayout=lst.first()->currentParagLayoutFormat(); - showRulerIndent( tqlayout->margins[TQStyleSheetItem::MarginLeft], tqlayout->margins[TQStyleSheetItem::MarginFirstLine], tqlayout->margins[TQStyleSheetItem::MarginRight], lst.first()->rtl()); + const KoParagLayout *layout=lst.first()->currentParagLayoutFormat(); + showRulerIndent( layout->margins[TQStyleSheetItem::MarginLeft], layout->margins[TQStyleSheetItem::MarginFirstLine], layout->margins[TQStyleSheetItem::MarginRight], lst.first()->rtl()); } @@ -5445,7 +5445,7 @@ void KWView::tabListChanged( const KoTabulatorList & tabList ) m_doc->addCommand(macroCmd); } -void KWView::newPageLayout( const KoPageLayout &tqlayout ) +void KWView::newPageLayout( const KoPageLayout &layout ) { TQString mode = viewMode()->type(); bool state = (mode!="ModeText"); @@ -5457,14 +5457,14 @@ void KWView::newPageLayout( const KoPageLayout &tqlayout ) KoKWHeaderFooter hf; m_doc->getPageLayout( pgLayout, cl, hf ); - if(tqlayout==pgLayout) + if(layout==pgLayout) return; KWPageLayoutStruct oldLayout( pgLayout, cl, hf ); - m_doc->setPageLayout( tqlayout, cl, hf ); + m_doc->setPageLayout( layout, cl, hf ); - KWPageLayoutStruct newLayout( tqlayout, cl, hf ); + KWPageLayoutStruct newLayout( layout, cl, hf ); KWTextFrameSetEdit *edit = currentTextEdit(); if (edit) @@ -5473,12 +5473,12 @@ void KWView::newPageLayout( const KoPageLayout &tqlayout ) m_doc->addCommand(cmd); } -void KWView::slotPageLayoutChanged( const KoPageLayout& tqlayout ) +void KWView::slotPageLayoutChanged( const KoPageLayout& layout ) { // This is connected to a signal of KWDocument, so that when the - // above method, or any other way of changing the page tqlayout happens, + // above method, or any other way of changing the page layout happens, // the rulers are updated in all views. - viewMode()->setPageLayout( m_gui->getHorzRuler(), m_gui->getVertRuler(), tqlayout ); + viewMode()->setPageLayout( m_gui->getHorzRuler(), m_gui->getVertRuler(), layout ); m_gui->canvasWidget()->repaintAll(); } @@ -5947,7 +5947,7 @@ void KWView::frameSelectedChanged() if(paragLayout->counter) counter = *(paragLayout->counter); showCounter( counter ); - int align = paragLayout->tqalignment; + int align = paragLayout->alignment; if ( align == TQt::AlignAuto ) align = TQt::AlignLeft; // ## seems hard to detect RTL here showAlign( align ); @@ -6038,7 +6038,7 @@ TQWidget* KWView::canvas() const { // used to be ->viewport(), but this makes no sense. // active embedded objects must be positioned relative to the real view, - // to scroll around with it, instead of being tqchildren of the fixed viewport. + // to scroll around with it, instead of being children of the fixed viewport. return m_gui->canvasWidget(); } @@ -6144,7 +6144,7 @@ void KWView::savePicture() if ( !KIO::NetAccess::upload( tempFile.name(), url, this ) ) { KMessageBox::sorry( this, i18n( - "Unable to save the file to '%1'. %2.").tqarg( url.prettyURL() ).tqarg( KIO::NetAccess::lastErrorString() ), + "Unable to save the file to '%1'. %2.").arg( url.prettyURL() ).arg( KIO::NetAccess::lastErrorString() ), i18n("Save Failed") ); } } @@ -6155,12 +6155,12 @@ void KWView::savePicture() } else KMessageBox::sorry( this, i18n( - "Error during saving. Could not create temporary file: %1.").tqarg( strerror( tempFile.status() ) ), + "Error during saving. Could not create temporary file: %1.").arg( strerror( tempFile.status() ) ), i18n("Save Picture") ); } } else - KMessageBox::sorry( this, i18n("URL %1 is invalid.").tqarg( url.prettyURL() ), i18n("Save Picture") ); + KMessageBox::sorry( this, i18n("URL %1 is invalid.").arg( url.prettyURL() ), i18n("Save Picture") ); } } } @@ -6586,7 +6586,7 @@ void KWView::switchModeView() updateZoomControls(); updatePageInfo(); - // set page tqlayout in rulers + // set page layout in rulers canvas->viewMode()->setPageLayout( m_gui->getHorzRuler(), m_gui->getVertRuler(), m_doc->pageLayout() ); } @@ -7167,7 +7167,7 @@ void KWView::updateRulerInProtectContentMode() hRuler->changeFlags(KoRuler::F_INDENTS | KoRuler::F_TABS); else hRuler->changeFlags(0); - hRuler->tqrepaint(); + hRuler->repaint(); } } @@ -7263,7 +7263,7 @@ void KWView::convertToTextBox() if ( cmd ) macro->addCommand( cmd ); // Auto-resize the frame from its contents - edit->textFrameSet()->tqlayout(); + edit->textFrameSet()->layout(); } m_doc->addCommand( macro ); } @@ -7618,19 +7618,19 @@ KWGUI::KWGUI( const TQString& viewMode, TQWidget *parent, KWView *daView ) l << 90; m_panner->setSizes( l ); - KoPageLayout tqlayout = doc->pageLayout(); + KoPageLayout layout = doc->pageLayout(); m_tabChooser = new KoTabChooser( m_right, KoTabChooser::TAB_ALL ); m_tabChooser->setReadWrite(doc->isReadWrite()); gridLayout->addWidget( m_tabChooser, 0, 0 ); - m_horRuler = new KoRuler( m_right, m_canvas->viewport(), Qt::Horizontal, tqlayout, + m_horRuler = new KoRuler( m_right, m_canvas->viewport(), Qt::Horizontal, layout, KoRuler::F_INDENTS | KoRuler::F_TABS, doc->unit(), m_tabChooser ); m_horRuler->setReadWrite(doc->isReadWrite()); gridLayout->addWidget( m_horRuler, 0, 1 ); - m_vertRuler = new KoRuler( m_right, m_canvas->viewport(), Qt::Vertical, tqlayout, + m_vertRuler = new KoRuler( m_right, m_canvas->viewport(), Qt::Vertical, layout, 0, doc->unit() ); m_vertRuler->setReadWrite(doc->isReadWrite()); gridLayout->addWidget( m_vertRuler, 1, 0 ); @@ -7680,8 +7680,8 @@ void KWGUI::resizeEvent( TQResizeEvent *e ) void KWGUI::reorganize() { - int hSpace = m_vertRuler->tqminimumSizeHint().width(); - int vSpace = m_horRuler->tqminimumSizeHint().height(); + int hSpace = m_vertRuler->minimumSizeHint().width(); + int vSpace = m_horRuler->minimumSizeHint().height(); if(m_view->kWordDocument()->showRuler()) { m_vertRuler->show(); diff --git a/kword/KWView.h b/kword/KWView.h index f023e6c6..095633bf 100644 --- a/kword/KWView.h +++ b/kword/KWView.h @@ -37,7 +37,7 @@ #include <kshortcut.h> #include <KoZoomMode.h> -#include <tqbrush.h> +#include <brush.h> #include <tqhbox.h> class KWPage; @@ -350,7 +350,7 @@ public slots: void configure(); void configureCompletion(); - void newPageLayout( const KoPageLayout &tqlayout ); + void newPageLayout( const KoPageLayout &layout ); void newLeftIndent( double leftIndent); void newFirstIndent( double firstIndent); void newRightIndent( double rightIndent); @@ -487,7 +487,7 @@ protected slots: void spellAddAutoCorrect (const TQString & originalword, const TQString & newword); void slotApplyFont(); void slotApplyParag(); - void slotPageLayoutChanged( const KoPageLayout& tqlayout ); + void slotPageLayoutChanged( const KoPageLayout& layout ); void slotChangeCaseState(bool b); void slotChangeCutState(bool b); void slotCorrectWord(); @@ -868,7 +868,7 @@ protected: KWDocStruct *m_docStruct; // The right side - TQWidget *m_right; // The tqlayout widget. + TQWidget *m_right; // The layout widget. KoTabChooser *m_tabChooser; KoRuler *m_vertRuler; diff --git a/kword/KWViewMode.cpp b/kword/KWViewMode.cpp index c1c6f16e..b8249839 100644 --- a/kword/KWViewMode.cpp +++ b/kword/KWViewMode.cpp @@ -63,7 +63,7 @@ void KWViewMode::drawOnePageBorder( TQPainter * painter, const TQRect & crect, c TQRegion pageEmptyRegion = emptySpaceRegion.intersect( pagecrect ); //kdDebug() << "RESULT: pageEmptyRegion: " << pageEmptyRegion << endl; if ( !pageEmptyRegion.isEmpty() ) - m_doc->eraseEmptySpace( painter, pageEmptyRegion, TQApplication::tqpalette().active().brush( TQColorGroup::Base ) ); + m_doc->eraseEmptySpace( painter, pageEmptyRegion, TQApplication::palette().active().brush( TQColorGroup::Base ) ); } } @@ -74,7 +74,7 @@ TQRect KWViewMode::drawRightShadow( TQPainter * painter, const TQRect & crect, c if ( !shadowRect.isEmpty() ) { painter->fillRect( shadowRect, - TQApplication::tqpalette().active().brush( TQColorGroup::Shadow ) ); + TQApplication::palette().active().brush( TQColorGroup::Shadow ) ); } return shadowRect; } @@ -85,7 +85,7 @@ TQRect KWViewMode::drawBottomShadow( TQPainter * painter, const TQRect & crect, shadowRect &= crect; // intersect if ( !shadowRect.isEmpty() ) painter->fillRect( shadowRect, - TQApplication::tqpalette().active().brush( TQColorGroup::Shadow ) ); + TQApplication::palette().active().brush( TQColorGroup::Shadow ) ); return shadowRect; } @@ -144,10 +144,10 @@ TQRect KWViewMode::rulerFrameRect() return TQRect(); } -void KWViewMode::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& tqlayout ) +void KWViewMode::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& layout ) { - hRuler->setPageLayout( tqlayout ); - vRuler->setPageLayout( tqlayout ); + hRuler->setPageLayout( layout ); + vRuler->setPageLayout( layout ); } // static @@ -230,7 +230,7 @@ int KWViewModeNormal::xOffset(KWPage *page, int canvasWidth /* = -1 */) { void KWViewModeNormal::drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion ) { painter->save(); - painter->setPen( TQApplication::tqpalette().active().color( TQColorGroup::Dark ) ); + painter->setPen( TQApplication::palette().active().color( TQColorGroup::Dark ) ); painter->setBrush( TQt::NoBrush ); TQRect pageRect; @@ -258,7 +258,7 @@ void KWViewModeNormal::drawPageBorders( TQPainter * painter, const TQRect & crec leftArea &= crect; if ( !leftArea.isEmpty() ) { painter->fillRect( leftArea, - TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) ); + TQApplication::palette().active().brush( TQColorGroup::Mid ) ); } // The area on the right of the page @@ -267,7 +267,7 @@ void KWViewModeNormal::drawPageBorders( TQPainter * painter, const TQRect & crec if ( !rightArea.isEmpty() ) { painter->fillRect( rightArea, - TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) ); + TQApplication::palette().active().brush( TQColorGroup::Mid ) ); // Draw a shadow int topOffset = ( page==0 ) ? s_shadowOffset : 0; // leave a few pixels on top, only for first page @@ -284,7 +284,7 @@ void KWViewModeNormal::drawPageBorders( TQPainter * painter, const TQRect & crec if ( !repaintRect.isEmpty() ) { painter->fillRect( repaintRect, - TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) ); + TQApplication::palette().active().brush( TQColorGroup::Mid ) ); // Draw a shadow drawBottomShadow( painter, crect, pageRect, s_shadowOffset ); } @@ -406,7 +406,7 @@ TQPoint KWViewModePreview::viewToNormal( const TQPoint & vPoint ) void KWViewModePreview::drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion ) { painter->save(); - painter->setPen( TQApplication::tqpalette().active().color( TQColorGroup::Dark ) ); + painter->setPen( TQApplication::palette().active().color( TQColorGroup::Dark ) ); painter->setBrush( TQt::NoBrush ); //kdDebug() << "KWViewModePreview::drawPageBorders crect=" << DEBUGRECT( crect ) << endl; TQRegion grayRegion( crect ); @@ -439,7 +439,7 @@ void KWViewModePreview::drawPageBorders( TQPainter * painter, const TQRect & cre if ( !grayRegion.isEmpty() ) { //kdDebug() << "KWViewModePreview::drawPageBorders grayRegion's bounding Rect = " << DEBUGRECT( grayRegion.boundingRect() ) << endl; - m_doc->eraseEmptySpace( painter, grayRegion, TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) ); + m_doc->eraseEmptySpace( painter, grayRegion, TQApplication::palette().active().brush( TQColorGroup::Mid ) ); } painter->restore(); } @@ -541,7 +541,7 @@ void KWViewModeText::drawPageBorders( TQPainter * painter, const TQRect & crect, painter->save(); TQRegion grayRegion( crect ); //kdDebug() << "KWViewModeText::drawPageBorders crect=" << grayRegion << endl; - painter->setPen( TQApplication::tqpalette().active().color( TQColorGroup::Dark ) ); + painter->setPen( TQApplication::palette().active().color( TQColorGroup::Dark ) ); TQSize cSize = contentsSize(); // Draw a line on the right -- ## or a shadow? // +1 to be out of the contents, and +1 for TQRect @@ -562,7 +562,7 @@ void KWViewModeText::drawPageBorders( TQPainter * painter, const TQRect & crect, } //kdDebug() << "KWViewModeText::drawPageBorders erasing grayRegion " << grayRegion << endl; if ( !grayRegion.isEmpty() ) - m_doc->eraseEmptySpace( painter, grayRegion, TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) ); + m_doc->eraseEmptySpace( painter, grayRegion, TQApplication::palette().active().brush( TQColorGroup::Mid ) ); painter->restore(); } @@ -571,24 +571,24 @@ TQRect KWViewModeText::rulerFrameRect() return TQRect( TQPoint(OFFSET, 0), contentsSize() ); } -void KWViewModeText::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& /*tqlayout*/ ) +void KWViewModeText::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& /*layout*/ ) { - // Create a dummy page-tqlayout, as if we had a single page englobing the whole text. - KoPageLayout tqlayout; - tqlayout.format = PG_CUSTOM; - tqlayout.orientation = PG_PORTRAIT; + // Create a dummy page-layout, as if we had a single page englobing the whole text. + KoPageLayout layout; + layout.format = PG_CUSTOM; + layout.orientation = PG_PORTRAIT; TQSize cSize = contentsSize(); - tqlayout.ptWidth = m_doc->unzoomItX( cSize.width() ); - tqlayout.ptHeight = m_doc->unzoomItY( cSize.height() ); - //kdDebug() << "KWViewModeText::setPageLayout tqlayout size " << tqlayout.ptWidth << "x" << tqlayout.ptHeight << endl; - tqlayout.ptLeft = OFFSET; - tqlayout.ptRight = 0; - tqlayout.ptTop = 0; - tqlayout.ptBottom = 0; - tqlayout.ptBindingSide = 0; - tqlayout.ptPageEdge = 0; - hRuler->setPageLayout( tqlayout ); - vRuler->setPageLayout( tqlayout ); + layout.ptWidth = m_doc->unzoomItX( cSize.width() ); + layout.ptHeight = m_doc->unzoomItY( cSize.height() ); + //kdDebug() << "KWViewModeText::setPageLayout layout size " << layout.ptWidth << "x" << layout.ptHeight << endl; + layout.ptLeft = OFFSET; + layout.ptRight = 0; + layout.ptTop = 0; + layout.ptBottom = 0; + layout.ptBindingSide = 0; + layout.ptPageEdge = 0; + hRuler->setPageLayout( layout ); + vRuler->setPageLayout( layout ); } bool KWViewModeText::isTextModeFrameset(KWFrameSet *fs) const { diff --git a/kword/KWViewMode.h b/kword/KWViewMode.h index fc78779a..fa0ec1d9 100644 --- a/kword/KWViewMode.h +++ b/kword/KWViewMode.h @@ -85,9 +85,9 @@ public: /** The result of this is passed to setFrameStartEnd for both rulers * (after adjustement with pageCorner()) */ virtual TQRect rulerFrameRect(); - /** Called when the page tqlayout is set, or changes. + /** Called when the page layout is set, or changes. * Usually this is directly passed to KoRuler (for page-based viewmodes) */ - virtual void setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& tqlayout ); + virtual void setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& layout ); virtual void drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion ) = 0; @@ -273,7 +273,7 @@ public: // There is no page concept. Keep everything relative to (0,0) virtual TQPoint pageCorner() { return TQPoint( 0, 0 ); } virtual TQRect rulerFrameRect(); - virtual void setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& tqlayout ); + virtual void setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& layout ); virtual void drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion ); virtual const TQString type() const { return "ModeText"; } diff --git a/kword/KWordFrameSetIface.cpp b/kword/KWordFrameSetIface.cpp index 928cddb5..e284862e 100644 --- a/kword/KWordFrameSetIface.cpp +++ b/kword/KWordFrameSetIface.cpp @@ -135,25 +135,25 @@ bool KWordFrameSetIface::isCopy()const void KWordFrameSetIface::setPtMarginLeft(double val) { m_frame->frame( 0 )->setPaddingLeft(val); - m_frame->kWordDocument()->tqlayout(); + m_frame->kWordDocument()->layout(); } void KWordFrameSetIface::setPtMarginRight(double val) { m_frame->frame( 0 )->setPaddingRight(val); - m_frame->kWordDocument()->tqlayout(); + m_frame->kWordDocument()->layout(); } void KWordFrameSetIface::setPtMarginTop(double val) { m_frame->frame( 0 )->setPaddingTop(val); - m_frame->kWordDocument()->tqlayout(); + m_frame->kWordDocument()->layout(); } void KWordFrameSetIface::setPtMarginBottom(double val) { m_frame->frame( 0 )->setPaddingBottom(val); - m_frame->kWordDocument()->tqlayout(); + m_frame->kWordDocument()->layout(); } TQColor KWordFrameSetIface::leftBorderColor() const diff --git a/kword/KWordFrameSetIface.h b/kword/KWordFrameSetIface.h index 9a5c9238..175d8fc0 100644 --- a/kword/KWordFrameSetIface.h +++ b/kword/KWordFrameSetIface.h @@ -25,7 +25,7 @@ #include <tqstring.h> #include <tqcolor.h> -#include <tqbrush.h> +#include <brush.h> class KWFrameSet; class KWordFrameSetIface : public DCOPObject diff --git a/kword/KWordViewIface.cpp b/kword/KWordViewIface.cpp index 246b92e6..a259d9e7 100644 --- a/kword/KWordViewIface.cpp +++ b/kword/KWordViewIface.cpp @@ -394,7 +394,7 @@ bool KWordViewIface::pictureKeepRatio() const return view->getGUI()->canvasWidget()->pictureKeepRatio(); } -void KWordViewIface::changeAutoSpellChecktqStatus(bool b) +void KWordViewIface::changeAutoSpellCheckStatus(bool b) { view->autoSpellCheck(b); } diff --git a/kword/KWordViewIface.h b/kword/KWordViewIface.h index ea422ad9..5181359d 100644 --- a/kword/KWordViewIface.h +++ b/kword/KWordViewIface.h @@ -126,7 +126,7 @@ k_dcop: void setPictureKeepRatio( bool _keep); bool pictureKeepRatio() const; - void changeAutoSpellChecktqStatus(bool b); + void changeAutoSpellCheckStatus(bool b); void deselectAllFrames(); int currentPage(); void convertTableToText(); diff --git a/kword/OASIS b/kword/OASIS index fdbfc016..b840b92d 100644 --- a/kword/OASIS +++ b/kword/OASIS @@ -25,7 +25,7 @@ and the page-based DTP mode (page-sequence element). * Headers and footers OpenDocument supports odd/even headers and footers using "header" and "header-left". -But for first page header/footer KWord should create a separate page tqlayout, +But for first page header/footer KWord should create a separate page layout, this is not done yet (it uses its own tag instead, as a temporary hack). Also OpenDocument doesn't allow a different style for header and header-left, so they must have the same min-size, border, margins... @@ -60,7 +60,7 @@ List of features that KWord has, but OOo doesn't have, and which are in the Open List of features that KWord doesn't have, and which OpenDocument has: (that list would be quite long, but let's list the real-life interoperability problems) - - lack of section support (changes of page tqlayout, but also changes of column settings + - lack of section support (changes of page layout, but also changes of column settings in the middle of a page) We could at least keep section styles and section markers (begin/end), so that load+save preserves it. diff --git a/kword/defs.h b/kword/defs.h index b4b60665..a1bc3677 100644 --- a/kword/defs.h +++ b/kword/defs.h @@ -20,7 +20,7 @@ #ifndef defs_h #define defs_h -#include <tqtextstream.h> +#include <textstream.h> #include <tqstring.h> #include <KoGlobal.h> #include "KWFactory.h" diff --git a/kword/demos/framestest.kwd b/kword/demos/framestest.kwd index f673d49c..c9e7fb03 100644 --- a/kword/demos/framestest.kwd +++ b/kword/demos/framestest.kwd @@ -262,7 +262,7 @@ </LAYOUT> </PARAGRAPH> <PARAGRAPH> - <TEXT>acbdefghijklmnopqrstuvwxyz. 1234567890. kofficyet sdfgsdfgsdfgsdfg(libty koffitcecore): KoMainWindow::setRootDocument this = [KoMainWindow pointer (0x813ff28) to widget kword-mainwindow#1, tqgeometry=894x723+0+0] doc = 0x8133470</TEXT> + <TEXT>acbdefghijklmnopqrstuvwxyz. 1234567890. kofficyet sdfgsdfgsdfgsdfg(libty koffitcecore): KoMainWindow::setRootDocument this = [KoMainWindow pointer (0x813ff28) to widget kword-mainwindow#1, geometry=894x723+0+0] doc = 0x8133470</TEXT> <LAYOUT> <NAME value="Standard" /> <FLOW align="left" /> diff --git a/kword/mailmerge/KWClassicSerialDataSource.cpp b/kword/mailmerge/KWClassicSerialDataSource.cpp index 1e6c20fe..57b574a5 100644 --- a/kword/mailmerge/KWClassicSerialDataSource.cpp +++ b/kword/mailmerge/KWClassicSerialDataSource.cpp @@ -24,7 +24,7 @@ #include <kinputdialog.h> #include <tqlabel.h> #include <tqhbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvbox.h> #include <tqpushbutton.h> #include <tqlineedit.h> @@ -107,7 +107,7 @@ void KWClassicSerialDataSource::removeRecord( int i ) if ( (i < 0) || (i > (int)db.count() - 1) ) return; - kdDebug()<<TQString("Removing record %1").tqarg(i)<<endl; + kdDebug()<<TQString("Removing record %1").arg(i)<<endl; Db::Iterator it = db.at( i); db.remove( it ); @@ -115,25 +115,25 @@ void KWClassicSerialDataSource::removeRecord( int i ) void KWClassicSerialDataSource::save( TQDomDocument &doc, TQDomElement &parent) { - TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION")); + TQDomElement def=doc.createElement(TQString::fromLatin1("DEFINITION")); parent.appendChild(def); for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it) { - TQDomElement defEnt=doc.createElement(TQString::tqfromLatin1("FIELD")); - defEnt.setAttribute(TQString::tqfromLatin1("name"),it.key()); + TQDomElement defEnt=doc.createElement(TQString::fromLatin1("FIELD")); + defEnt.setAttribute(TQString::fromLatin1("name"),it.key()); def.appendChild(defEnt); } - TQDomElement cont=doc.createElement(TQString::tqfromLatin1("CONTENT")); + TQDomElement cont=doc.createElement(TQString::fromLatin1("CONTENT")); parent.appendChild(cont); for (Db::Iterator dbI=db.begin();dbI!=db.end();++dbI) { - TQDomElement rec=doc.createElement(TQString::tqfromLatin1("RECORD")); + TQDomElement rec=doc.createElement(TQString::fromLatin1("RECORD")); cont.appendChild(rec); for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it) { - TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM")); - recEnt.setAttribute(TQString::tqfromLatin1("name"),it.key()); - recEnt.setAttribute(TQString::tqfromLatin1("data"),(*dbI)[it.key()]); + TQDomElement recEnt=doc.createElement(TQString::fromLatin1("ITEM")); + recEnt.setAttribute(TQString::fromLatin1("name"),it.key()); + recEnt.setAttribute(TQString::fromLatin1("data"),(*dbI)[it.key()]); rec.appendChild(recEnt); } } @@ -148,7 +148,7 @@ void KWClassicSerialDataSource::load( TQDomElement& parentElem ) TQDomElement def=defNd.toElement(); for (TQDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement()) { - sampleRecord[defEnt.attribute(TQString::tqfromLatin1("name"))]=i18n( "No Value" ); + sampleRecord[defEnt.attribute(TQString::fromLatin1("name"))]=i18n( "No Value" ); } TQDomNode contNd=parentElem.namedItem("CONTENT"); if (contNd.isNull()) return; @@ -157,8 +157,8 @@ void KWClassicSerialDataSource::load( TQDomElement& parentElem ) appendRecord(); for (TQDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement()) { - setValue(recEnt.attribute(TQString::tqfromLatin1("name")), - recEnt.attribute(TQString::tqfromLatin1("data")),db.count()-1); + setValue(recEnt.attribute(TQString::fromLatin1("name")), + recEnt.attribute(TQString::fromLatin1("data")),db.count()-1); } } } @@ -219,9 +219,9 @@ TQString KWClassicMailMergeEditorListItem::text( int i ) const void KWClassicMailMergeEditorListItem::setup() { setHeight( TQMAX( listView()->fontMetrics().height(), - editWidget->tqsizeHint().height() ) ); - if ( listView()->columnWidth( 1 ) < editWidget->tqsizeHint().width() ) - listView()->setColumnWidth( 1, editWidget->tqsizeHint().width() ); + editWidget->sizeHint().height() ) ); + if ( listView()->columnWidth( 1 ) < editWidget->sizeHint().width() ) + listView()->setColumnWidth( 1, editWidget->sizeHint().width() ); } void KWClassicMailMergeEditorListItem::update() @@ -342,27 +342,27 @@ KWClassicMailMergeEditor::KWClassicMailMergeEditor( TQWidget *parent, KWClassicS first = new TQToolButton( toolbar ); first->setIconSet( SmallIconSet( "start" ) ); - first->setFixedSize( first->tqsizeHint() ); + first->setFixedSize( first->sizeHint() ); connect(first, TQT_SIGNAL(clicked()), this, TQT_SLOT(firstRecord())); back_ = new TQToolButton( toolbar ); back_->setIconSet( SmallIconSet( "back" ) ); - back_->setFixedSize( back_->tqsizeHint() ); + back_->setFixedSize( back_->sizeHint() ); connect(back_, TQT_SIGNAL(clicked()), this, TQT_SLOT(prevRecord())); records = new TQSpinBox( 1, db->getNumRecords(), 1, toolbar ); - records->setMaximumHeight( records->tqsizeHint().height() ); + records->setMaximumHeight( records->sizeHint().height() ); connect( records, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( changeRecord( int ) ) ); forward = new TQToolButton( toolbar ); forward->setIconSet( SmallIconSet( "forward" ) ); - forward->setFixedSize( forward->tqsizeHint() ); + forward->setFixedSize( forward->sizeHint() ); connect(forward, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextRecord())); finish = new TQToolButton( toolbar ); finish->setIconSet( SmallIconSet( "finish" ) ); - finish->setFixedSize( finish->tqsizeHint() ); + finish->setFixedSize( finish->sizeHint() ); connect(finish, TQT_SIGNAL(clicked()), this, TQT_SLOT(lastRecord())); TQWidget *sep = new TQWidget( toolbar ); @@ -370,28 +370,28 @@ KWClassicMailMergeEditor::KWClassicMailMergeEditor( TQWidget *parent, KWClassicS newRecord = new TQToolButton( toolbar ); newRecord->setIconSet( SmallIconSet( "sl_addrecord" ) ); - newRecord->setFixedSize( newRecord->tqsizeHint() ); + newRecord->setFixedSize( newRecord->sizeHint() ); connect( newRecord, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addRecord() ) ); TQToolTip::add( newRecord, i18n( "Add record" ) ); newEntry = new TQToolButton( toolbar ); newEntry->setIconSet( SmallIconSet( "sl_addentry" ) ); - newEntry->setFixedSize( newEntry->tqsizeHint() ); + newEntry->setFixedSize( newEntry->sizeHint() ); connect( newEntry, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addEntry() ) ); TQToolTip::add( newEntry, i18n( "Add entry" ) ); deleteRecord = new TQToolButton( toolbar ); deleteRecord->setIconSet( SmallIconSet( "sl_delrecord" ) ); - deleteRecord->setFixedSize( deleteRecord->tqsizeHint() ); + deleteRecord->setFixedSize( deleteRecord->sizeHint() ); connect( deleteRecord, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeRecord() ) ); TQToolTip::add( deleteRecord, i18n( "Remove record" ) ); deleteEntry = new TQToolButton( toolbar ); deleteEntry->setIconSet( SmallIconSet( "sl_delentry" ) ); - deleteEntry->setFixedSize( deleteEntry->tqsizeHint() ); + deleteEntry->setFixedSize( deleteEntry->sizeHint() ); connect( deleteEntry, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeEntry() ) ); TQToolTip::add( deleteEntry, i18n( "Remove entry" ) ); diff --git a/kword/mailmerge/kabc/KWMailMergeKABC.cpp b/kword/mailmerge/kabc/KWMailMergeKABC.cpp index 411ee5e5..1886207c 100644 --- a/kword/mailmerge/kabc/KWMailMergeKABC.cpp +++ b/kword/mailmerge/kabc/KWMailMergeKABC.cpp @@ -168,7 +168,7 @@ TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const if( !uidAvailable ) { - return ( i18n ( "KAddressbook entry '%1' not available." ).tqarg( *_UIDIterator ) ); + return ( i18n ( "KAddressbook entry '%1' not available." ).arg( *_UIDIterator ) ); } @@ -350,16 +350,16 @@ TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const TQString lat; TQString longi; if( geo.latitude()<0 ) - lat = TQString( i18n("%1 South") ).tqarg( -geo.latitude() ); + lat = TQString( i18n("%1 South") ).arg( -geo.latitude() ); else - lat = TQString( i18n("%1 North") ).tqarg( geo.latitude() ); + lat = TQString( i18n("%1 North") ).arg( geo.latitude() ); if( geo.longitude()<0 ) // There is something going wrong, because "W" is replaced by "q ". // Needs fix. - longi = TQString( i18n("%1 West") ).tqarg( -geo.longitude() ); + longi = TQString( i18n("%1 West") ).arg( -geo.longitude() ); else - longi = TQString( i18n("%1 East") ).tqarg( geo.longitude() ); + longi = TQString( i18n("%1 East") ).arg( geo.longitude() ); return i18n( "Geographic coordinates", "%1, %2" ).arg ( lat, longi ); } @@ -409,7 +409,7 @@ void KWMailMergeKABC::load( TQDomElement& parentElem ) for( TQDomElement recEnt=rec.firstChild().toElement(); !recEnt.isNull(); recEnt=recEnt.nextSibling().toElement() ) { - addEntry( recEnt.attribute( TQString::tqfromLatin1("uid") ) ); + addEntry( recEnt.attribute( TQString::fromLatin1("uid") ) ); } } else if( rec.nodeName() == "LIST" ) @@ -417,7 +417,7 @@ void KWMailMergeKABC::load( TQDomElement& parentElem ) for( TQDomElement recEnt=rec.firstChild().toElement(); !recEnt.isNull(); recEnt=recEnt.nextSibling().toElement() ) { - addList( recEnt.attribute( TQString::tqfromLatin1("listid") ) ); + addList( recEnt.attribute( TQString::fromLatin1("listid") ) ); } } else @@ -482,26 +482,26 @@ void KWMailMergeKABC::refresh( bool ) void KWMailMergeKABC::save( TQDomDocument& doc, TQDomElement& parent) { - TQDomElement cont=doc.createElement(TQString::tqfromLatin1("CONTENT")); + TQDomElement cont=doc.createElement(TQString::fromLatin1("CONTENT")); parent.appendChild(cont); TQValueList<TQString>::ConstIterator it = _individualUIDs.begin(); for( ; it != _individualUIDs.end(); ++it ) { - TQDomElement rec=doc.createElement(TQString::tqfromLatin1("RECORD")); + TQDomElement rec=doc.createElement(TQString::fromLatin1("RECORD")); cont.appendChild(rec); - TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM")); - recEnt.setAttribute(TQString::tqfromLatin1("uid"),*it); + TQDomElement recEnt=doc.createElement(TQString::fromLatin1("ITEM")); + recEnt.setAttribute(TQString::fromLatin1("uid"),*it); rec.appendChild(recEnt); } it = _lists.begin(); for( ; !(it == _lists.end()); ++it ) { - TQDomElement rec=doc.createElement(TQString::tqfromLatin1("LIST")); + TQDomElement rec=doc.createElement(TQString::fromLatin1("LIST")); cont.appendChild(rec); - TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM")); - recEnt.setAttribute(TQString::tqfromLatin1("listid"),*it); + TQDomElement recEnt=doc.createElement(TQString::fromLatin1("ITEM")); + recEnt.setAttribute(TQString::fromLatin1("listid"),*it); rec.appendChild(recEnt); } } diff --git a/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp b/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp index d1c03809..d3f3a21c 100644 --- a/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp +++ b/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp @@ -20,7 +20,7 @@ #include <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <kapplication.h> @@ -376,7 +376,7 @@ void KWMailMergeKABCConfig::saveDistributionList() KMessageBox::information( 0, i18n( "<qt>Distribution list with the given name <b>%1</b> " "already exists. Please select a different name.</qt>" ) - .tqarg( listName ) ); + .arg( listName ) ); return; } KABC::DistributionList *distList = new KABC::DistributionList( &dlm, listName ); diff --git a/kword/mailmerge/kabc/addresspicker.ui b/kword/mailmerge/kabc/addresspicker.ui index c7276c9b..af8f5723 100644 --- a/kword/mailmerge/kabc/addresspicker.ui +++ b/kword/mailmerge/kabc/addresspicker.ui @@ -21,7 +21,7 @@ </property> <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>tqlayout10</cstring> + <cstring>layout10</cstring> </property> <vbox> <property name="name"> @@ -37,7 +37,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>16</height> @@ -76,7 +76,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> @@ -101,7 +101,7 @@ </widget> <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>tqlayout1</cstring> + <cstring>layout1</cstring> </property> <hbox> <property name="name"> @@ -217,7 +217,7 @@ <property name="text"> <string>&Address Book</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignCenter</set> </property> <property name="buddy" stdset="0"> @@ -236,7 +236,7 @@ <property name="text"> <string>&Selected Addresses</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignCenter</set> </property> <property name="buddy" stdset="0"> diff --git a/kword/mailmerge/kspread/kwmailmerge_kspread.cpp b/kword/mailmerge/kspread/kwmailmerge_kspread.cpp index 6801a64a..025e9a4e 100644 --- a/kword/mailmerge/kspread/kwmailmerge_kspread.cpp +++ b/kword/mailmerge/kspread/kwmailmerge_kspread.cpp @@ -53,7 +53,7 @@ TQString KWMailMergeKSpread::getValue( const TQString &name, int record ) const if ( cell ) return cellText( cell ); else - return i18n( "Unkown mail merge variable: %1" ).tqarg( name ); + return i18n( "Unkown mail merge variable: %1" ).arg( name ); } void KWMailMergeKSpread::load( TQDomElement& parentElem ) @@ -66,15 +66,15 @@ void KWMailMergeKSpread::load( TQDomElement& parentElem ) if ( element.isNull() ) return; - _url = element.attribute( TQString::tqfromLatin1( "URL" ) ); - _spreadSheetNumber = element.attribute( TQString::tqfromLatin1( "SpreadSheetNumber" ) ).toInt(); + _url = element.attribute( TQString::fromLatin1( "URL" ) ); + _spreadSheetNumber = element.attribute( TQString::fromLatin1( "SpreadSheetNumber" ) ).toInt(); initDocument(); } void KWMailMergeKSpread::save( TQDomDocument& doc, TQDomElement& parent ) { - TQDomElement content = doc.createElement( TQString::tqfromLatin1( "CONTENT" ) ); + TQDomElement content = doc.createElement( TQString::fromLatin1( "CONTENT" ) ); parent.appendChild( content ); content.setAttribute( "URL", _url.url() ); diff --git a/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp b/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp index f08ae82e..595633d9 100644 --- a/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp +++ b/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp @@ -20,7 +20,7 @@ #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kcombobox.h> #include <klineedit.h> @@ -100,20 +100,20 @@ void KWMailMergeKSpreadConfig::initGUI() { TQFrame *page = plainPage(); - TQGridLayout *tqlayout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() ); + TQGridLayout *layout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() ); TQLabel *label = new TQLabel( i18n( "URL:" ), page ); - tqlayout->addWidget( label, 0, 0 ); + layout->addWidget( label, 0, 0 ); _urlRequester = new KURLRequester( page ); - tqlayout->addWidget( _urlRequester, 0, 1 ); + layout->addWidget( _urlRequester, 0, 1 ); label = new TQLabel( i18n( "Page number:" ), page ); - tqlayout->addWidget( label, 1, 0 ); + layout->addWidget( label, 1, 0 ); _pageNumber = new KComboBox( page ); _pageNumber->setEnabled( false ); - tqlayout->addWidget( _pageNumber, 1, 1 ); + layout->addWidget( _pageNumber, 1, 1 ); connect( _urlRequester->lineEdit() , TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) ); } diff --git a/kword/mailmerge/sql/KWMySqlCursor.h b/kword/mailmerge/sql/KWMySqlCursor.h index 4a25323b..8919cc9a 100644 --- a/kword/mailmerge/sql/KWMySqlCursor.h +++ b/kword/mailmerge/sql/KWMySqlCursor.h @@ -59,9 +59,9 @@ TQSqlCursor( TQString(), autopopulate ) TQSqlIndex() ) { return exec( lastQuery() ); } TQSqlIndex primaryIndex( bool /*prime*/ = TRUE ) const { return TQSqlIndex(); } - int insert( bool /*tqinvalidate*/ = TRUE ) { return FALSE; } - int update( bool /*tqinvalidate*/ = TRUE ) { return FALSE; } - int del( bool /*tqinvalidate*/ = TRUE ) { return FALSE; } + int insert( bool /*invalidate*/ = TRUE ) { return FALSE; } + int update( bool /*invalidate*/ = TRUE ) { return FALSE; } + int del( bool /*invalidate*/ = TRUE ) { return FALSE; } void setName( const TQString& /*name*/, bool /*autopopulate*/ = TRUE ) {} }; diff --git a/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp b/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp index 3db1d9d6..b424f227 100644 --- a/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp +++ b/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp @@ -3,7 +3,7 @@ #include <tqtable.h> #include <tqscrollview.h> #include <klocale.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcheckbox.h> KWQtSqlEasyFilter::KWQtSqlEasyFilter( TQWidget *parent) @@ -33,7 +33,7 @@ KWQtSqlEasyFilter::KWQtSqlEasyFilter( TQWidget *parent) int h=m_table->rowHeight(0); for (int i=0;i<6;i++) h+=m_table->rowHeight(i); - h+=m_table->horizontalHeader()->tqsizeHint().height(); + h+=m_table->horizontalHeader()->sizeHint().height(); m_table->setMinimumHeight(h); int w=0; diff --git a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp index d3feca22..3e860d76 100644 --- a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp +++ b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp @@ -22,7 +22,7 @@ #include <kcombobox.h> #include <klineedit.h> #include <kdebug.h> -#include <tqlayout.h> +#include <layout.h> #include <kconfig.h> #include <kpushbutton.h> #include <klineeditdlg.h> diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp index 544f7990..e7671e03 100644 --- a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp +++ b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp @@ -20,7 +20,7 @@ #include "KWQtSqlPowerSerialDataSource.h" #include "KWQtSqlPowerSerialDataSource.moc" #include "KWQtSqlMailMergeOpen.h" -#include <tqlayout.h> +#include <layout.h> #include <tqdom.h> #include <kcombobox.h> #include <klineedit.h> @@ -68,7 +68,7 @@ void KWQtSqlPowerSerialDataSource::refresh(bool force) myquery=new KWMySqlCursor(query,true,database); myquery->setMode(TQSqlCursor::ReadOnly); } - kdDebug()<<TQString("There were %1 rows in the query").tqarg(myquery->size())<<endl; + kdDebug()<<TQString("There were %1 rows in the query").arg(myquery->size())<<endl; } TQString KWQtSqlPowerSerialDataSource::getValue( const TQString &name, int record ) const @@ -79,33 +79,33 @@ TQString KWQtSqlPowerSerialDataSource::getValue( const TQString &name, int recor if ( num < 0 || num > (int)myquery->size() ) return name; if (!myquery->seek(num,false)) return i18n(">>>Illegal position within datasource<<<"); - if (!myquery->contains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").tqarg(name); + if (!myquery->contains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").arg(name); return (myquery->value(name)).toString(); } void KWQtSqlPowerSerialDataSource::save( TQDomDocument &doc, TQDomElement &parent) { - TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION")); + TQDomElement def=doc.createElement(TQString::fromLatin1("DEFINITION")); parent.appendChild(def); { - TQDomElement defEnt=doc.createElement(TQString::tqfromLatin1("DATABASE")); - defEnt.setAttribute(TQString::tqfromLatin1("hostname"),hostname); - defEnt.setAttribute(TQString::tqfromLatin1("port"),port); - defEnt.setAttribute(TQString::tqfromLatin1("driver"),driver); - defEnt.setAttribute(TQString::tqfromLatin1("databasename"),databasename); - defEnt.setAttribute(TQString::tqfromLatin1("username"),username); + TQDomElement defEnt=doc.createElement(TQString::fromLatin1("DATABASE")); + defEnt.setAttribute(TQString::fromLatin1("hostname"),hostname); + defEnt.setAttribute(TQString::fromLatin1("port"),port); + defEnt.setAttribute(TQString::fromLatin1("driver"),driver); + defEnt.setAttribute(TQString::fromLatin1("databasename"),databasename); + defEnt.setAttribute(TQString::fromLatin1("username"),username); def.appendChild(defEnt); - defEnt=doc.createElement(TQString::tqfromLatin1("QUERY")); - defEnt.setAttribute(TQString::tqfromLatin1("value"),query); + defEnt=doc.createElement(TQString::fromLatin1("QUERY")); + defEnt.setAttribute(TQString::fromLatin1("value"),query); def.appendChild(defEnt); - TQDomElement sampleEnt=doc.createElement(TQString::tqfromLatin1("SAMPLERECORD")); + TQDomElement sampleEnt=doc.createElement(TQString::fromLatin1("SAMPLERECORD")); parent.appendChild(sampleEnt); for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it) { - TQDomElement fieldEnt=doc.createElement(TQString::tqfromLatin1("FIELD")); - fieldEnt.setAttribute(TQString::tqfromLatin1("name"),it.key()); + TQDomElement fieldEnt=doc.createElement(TQString::fromLatin1("FIELD")); + fieldEnt.setAttribute(TQString::fromLatin1("name"),it.key()); sampleEnt.appendChild(fieldEnt); } } @@ -122,19 +122,19 @@ void KWQtSqlPowerSerialDataSource::load( TQDomElement& parentElem ) if (!dbNd.isNull()) { TQDomElement dbEnt=dbNd.toElement(); - if (dbEnt.tagName()==TQString::tqfromLatin1("DATABASE")) + if (dbEnt.tagName()==TQString::fromLatin1("DATABASE")) { - hostname=dbEnt.attribute(TQString::tqfromLatin1("hostname")); - port=dbEnt.attribute(TQString::tqfromLatin1("port")); - driver=dbEnt.attribute(TQString::tqfromLatin1("driver")); - databasename=dbEnt.attribute(TQString::tqfromLatin1("databasename")); - username=dbEnt.attribute(TQString::tqfromLatin1("username")); + hostname=dbEnt.attribute(TQString::fromLatin1("hostname")); + port=dbEnt.attribute(TQString::fromLatin1("port")); + driver=dbEnt.attribute(TQString::fromLatin1("driver")); + databasename=dbEnt.attribute(TQString::fromLatin1("databasename")); + username=dbEnt.attribute(TQString::fromLatin1("username")); } } TQDomNode queryNd=def.namedItem("QUERY"); if (!queryNd.isNull()) { - query=queryNd.toElement().attribute(TQString::tqfromLatin1("value")); + query=queryNd.toElement().attribute(TQString::fromLatin1("value")); } } @@ -144,7 +144,7 @@ void KWQtSqlPowerSerialDataSource::load( TQDomElement& parentElem ) TQDomElement def1=defNd.toElement(); for (TQDomElement defEnt=defNd.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement()) { - addSampleRecordEntry(defEnt.attribute(TQString::tqfromLatin1("name"))); + addSampleRecordEntry(defEnt.attribute(TQString::fromLatin1("name"))); } } } @@ -203,7 +203,7 @@ void KWQtSqlPowerMailMergeEditor::slotExecute() cur->setMode(TQSqlCursor::ReadOnly); db->clearSampleRecord(); - kdDebug()<<TQString("Fieldname count %1").tqarg(cur->count())<<endl; + kdDebug()<<TQString("Fieldname count %1").arg(cur->count())<<endl; for (uint i=0;i<cur->count();i++) db->addSampleRecordEntry(cur->fieldName(i)); diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp index ec31df35..b956335b 100644 --- a/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp +++ b/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp @@ -22,7 +22,7 @@ #include "KWQtSqlEasyFilter.h" #include <klocale.h> -#include <tqlayout.h> +#include <layout.h> #include <tqsqlcursor.h> #include <tqdatatable.h> #include <tqcheckbox.h> @@ -59,32 +59,32 @@ TQString KWQtSqlSerialDataSource::getValue( const TQString &name, int record ) c if ( num < 0 || num > (int)myquery->size() ) return name; if (!myquery->seek(num,false)) return i18n(">>>Illegal position within datasource<<<"); - if (!myquery->contains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").tqarg(name); + if (!myquery->contains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").arg(name); return (myquery->value(name)).toString(); } void KWQtSqlSerialDataSource::save( TQDomDocument & /*doc*/, TQDomElement & /*parent*/) { /* - TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION")); + TQDomElement def=doc.createElement(TQString::fromLatin1("DEFINITION")); parent.appendChild(def); for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it) { - TQDomElement defEnt=doc.createElement(TQString::tqfromLatin1("FIELD")); - defEnt.setAttribute(TQString::tqfromLatin1("name"),it.key()); + TQDomElement defEnt=doc.createElement(TQString::fromLatin1("FIELD")); + defEnt.setAttribute(TQString::fromLatin1("name"),it.key()); def.appendChild(defEnt); } - TQDomElement cont=doc.createElement(TQString::tqfromLatin1("CONTENT")); + TQDomElement cont=doc.createElement(TQString::fromLatin1("CONTENT")); parent.appendChild(cont); for (Db::Iterator dbI=db.begin();dbI!=db.end();++dbI) { - TQDomElement rec=doc.createElement(TQString::tqfromLatin1("RECORD")); + TQDomElement rec=doc.createElement(TQString::fromLatin1("RECORD")); cont.appendChild(rec); for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it) { - TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM")); - recEnt.setAttribute(TQString::tqfromLatin1("name"),it.key()); - recEnt.setAttribute(TQString::tqfromLatin1("data"),(*dbI)[it.key()]); + TQDomElement recEnt=doc.createElement(TQString::fromLatin1("ITEM")); + recEnt.setAttribute(TQString::fromLatin1("name"),it.key()); + recEnt.setAttribute(TQString::fromLatin1("data"),(*dbI)[it.key()]); rec.appendChild(recEnt); } } @@ -101,7 +101,7 @@ void KWQtSqlSerialDataSource::load( TQDomElement& /*parentElem*/ ) TQDomElement def=defNd.toElement(); for (TQDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement()) { - sampleRecord[defEnt.attribute(TQString::tqfromLatin1("name"))]=defEnt.attribute(TQString::tqfromLatin1("name"));//i18n( "No Value" ); + sampleRecord[defEnt.attribute(TQString::fromLatin1("name"))]=defEnt.attribute(TQString::fromLatin1("name"));//i18n( "No Value" ); } TQDomNode contNd=parentElem.namedItem("CONTENT"); if (contNd.isNull()) return; @@ -110,8 +110,8 @@ void KWQtSqlSerialDataSource::load( TQDomElement& /*parentElem*/ ) appendRecord(); for (TQDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement()) { - setValue(recEnt.attribute(TQString::tqfromLatin1("name")), - recEnt.attribute(TQString::tqfromLatin1("data")),db.count()-1); + setValue(recEnt.attribute(TQString::fromLatin1("name")), + recEnt.attribute(TQString::fromLatin1("data")),db.count()-1); } } */ @@ -146,7 +146,7 @@ void KWQtSqlSerialDataSource::refresh(bool force) myquery->setMode(TQSqlCursor::ReadOnly); myquery->select(filter); } - kdDebug()<<TQString("There were %1 rows in the query").tqarg(myquery->size())<<endl; + kdDebug()<<TQString("There were %1 rows in the query").arg(myquery->size())<<endl; } diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp index f31a431a..0d414cdc 100644 --- a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp +++ b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp @@ -20,7 +20,7 @@ #include "KWQtSqlSerialDataSourceBase.h" #include "KWQtSqlSerialDataSourceBase.moc" #include "KWQtSqlMailMergeOpen.h" -#include <tqlayout.h> +#include <layout.h> #include <tqdom.h> #include <kcombobox.h> #include <klineedit.h> @@ -49,7 +49,7 @@ int KWQtSqlSerialDataSourceBase::connectionId=0; KWQtSqlSerialDataSourceBase::KWQtSqlSerialDataSourceBase(KInstance *inst,TQObject *parent) : KWMailMergeDataSource(inst,parent) { - DataBaseConnection=TQString("KWTQTSQLPOWER")+parent->name()+TQString("--%1").tqarg(connectionId++); + DataBaseConnection=TQString("KWTQTSQLPOWER")+parent->name()+TQString("--%1").arg(connectionId++); port=i18n("default"); } diff --git a/kword/mailmerge/sql/kwqtsqlpower.ui b/kword/mailmerge/sql/kwqtsqlpower.ui index a68b62db..afff8c7f 100644 --- a/kword/mailmerge/sql/kwqtsqlpower.ui +++ b/kword/mailmerge/sql/kwqtsqlpower.ui @@ -54,7 +54,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>0</width> <height>120</height> @@ -73,7 +73,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>0</width> <height>120</height> @@ -168,7 +168,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>300</width> <height>0</height> @@ -196,7 +196,7 @@ <property name="name"> <cstring>Line2</cstring> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>0</width> <height>0</height> diff --git a/kword/mailmerge/sql/qtsqlopenwidget.ui b/kword/mailmerge/sql/qtsqlopenwidget.ui index fc32bded..c0d2423a 100644 --- a/kword/mailmerge/sql/qtsqlopenwidget.ui +++ b/kword/mailmerge/sql/qtsqlopenwidget.ui @@ -283,7 +283,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> diff --git a/kword/tests/KWPageManagerTester.cpp b/kword/tests/KWPageManagerTester.cpp index 641e6534..9b261d90 100644 --- a/kword/tests/KWPageManagerTester.cpp +++ b/kword/tests/KWPageManagerTester.cpp @@ -200,11 +200,11 @@ void KWPageManagerTester::removePages() { void KWPageManagerTester::pageInfo() { KWPageManager *pageManager = new KWPageManager(); - KoPageLayout tqlayout; - tqlayout.ptWidth = 300; - tqlayout.ptHeight = 600; - tqlayout.format = PG_DIN_A4; - pageManager->setDefaultPage(tqlayout); + KoPageLayout layout; + layout.ptWidth = 300; + layout.ptHeight = 600; + layout.format = PG_DIN_A4; + pageManager->setDefaultPage(layout); pageManager->setStartPage(1); KWPage *page1 = pageManager->appendPage(); page1->setWidth(100); @@ -216,19 +216,19 @@ void KWPageManagerTester::pageInfo() { CHECK(pageManager->topOfPage(3), 300.0); CHECK(pageManager->bottomOfPage(3), 900.0); - tqlayout.ptHeight = 500; - pageManager->setDefaultPage(tqlayout); + layout.ptHeight = 500; + pageManager->setDefaultPage(layout); CHECK(pageManager->bottomOfPage(3), 800.0); page2->setHeight(-1); CHECK(pageManager->bottomOfPage(3), 1200.0); - tqlayout.ptTop = 5; - tqlayout.ptLeft = 6; - tqlayout.ptBottom = 7; - tqlayout.ptRight = 8; - tqlayout.ptBindingSide = -1; - tqlayout.ptPageEdge = -1; - pageManager->setDefaultPage(tqlayout); + layout.ptTop = 5; + layout.ptLeft = 6; + layout.ptBottom = 7; + layout.ptRight = 8; + layout.ptBindingSide = -1; + layout.ptPageEdge = -1; + pageManager->setDefaultPage(layout); page2->setTopMargin(9); page2->setLeftMargin(10); page2->setBottomMargin(11); |