diff options
Diffstat (limited to 'kword/KWDocStruct.cpp')
-rw-r--r-- | kword/KWDocStruct.cpp | 232 |
1 files changed, 116 insertions, 116 deletions
diff --git a/kword/KWDocStruct.cpp b/kword/KWDocStruct.cpp index f32e4181..62925918 100644 --- a/kword/KWDocStruct.cpp +++ b/kword/KWDocStruct.cpp @@ -44,7 +44,7 @@ #include <ktoolbar.h> #include <ktoolbarbutton.h> -#include <qlayout.h> +#include <tqlayout.h> /******************************************************************/ /* Class: KWOrderedFrameSet */ @@ -74,18 +74,18 @@ bool KWOrderedFrameSet::operator<( KWOrderedFrameSet ofs ) /* Class: KWDocDocListViewItem */ /******************************************************************/ -KWDocListViewItem::KWDocListViewItem(QListViewItem* parent, const QString& text) - : KListViewItem(parent, text) +KWDocListViewItem::KWDocListViewItem(TQListViewItem* tqparent, const TQString& text) + : KListViewItem(tqparent, text) { } -KWDocListViewItem::KWDocListViewItem(QListViewItem* parent, QListViewItem* after, const QString& text ) - :KListViewItem(parent, after, text) +KWDocListViewItem::KWDocListViewItem(TQListViewItem* tqparent, TQListViewItem* after, const TQString& text ) + :KListViewItem(tqparent, after, text) { } -KWDocListViewItem::KWDocListViewItem(QListView* parent, const QString& text) - :KListViewItem(parent, text) +KWDocListViewItem::KWDocListViewItem(TQListView* tqparent, const TQString& text) + :KListViewItem(tqparent, text) { } @@ -93,8 +93,8 @@ void KWDocListViewItem::deleteAllChildren() { if ( childCount() > 0 ) { - QListViewItem *child = firstChild(); - QListViewItem *delChild; + TQListViewItem *child = firstChild(); + TQListViewItem *delChild; while( child ) { @@ -120,18 +120,18 @@ KWGUI* KWDocListViewItem::gui() /* Class: KWDocStructParagItem */ /******************************************************************/ -KWDocStructParagItem::KWDocStructParagItem(QListViewItem* parent, const QString& text, KWTextParag* parag ) - : KWDocListViewItem(parent, text), m_parag(parag) +KWDocStructParagItem::KWDocStructParagItem(TQListViewItem* tqparent, const TQString& text, KWTextParag* parag ) + : KWDocListViewItem(tqparent, text), m_parag(parag) { } -KWDocStructParagItem::KWDocStructParagItem(QListViewItem* parent, QListViewItem* after, - const QString& text, KWTextParag* parag ) - : KWDocListViewItem(parent, after, text), m_parag(parag) +KWDocStructParagItem::KWDocStructParagItem(TQListViewItem* tqparent, TQListViewItem* after, + const TQString& text, KWTextParag* parag ) + : KWDocListViewItem(tqparent, after, text), m_parag(parag) { } -void KWDocStructParagItem::contextMenu(QListViewItem* item, const QPoint& p, int ) +void KWDocStructParagItem::contextMenu(TQListViewItem* item, const TQPoint& p, int ) { if (item == this) { @@ -143,10 +143,10 @@ void KWDocStructParagItem::contextMenu(QListViewItem* item, const QPoint& p, int void KWDocStructParagItem::selectItem() { KWTextFrameSet* fs = m_parag->kwTextDocument()->textFrameSet(); - QPoint iPoint = m_parag->rect().topLeft(); // small bug if a paragraph is cut between two pages. + TQPoint iPoint = m_parag->rect().topLeft(); // small bug if a paragraph is cut between two pages. KoPoint dPoint; fs->internalToDocument(iPoint, dPoint); - QPoint nPoint = fs->kWordDocument()->zoomPoint(dPoint); + TQPoint nPoint = fs->kWordDocument()->zoomPoint(dPoint); gui()->canvasWidget()->scrollToOffset(fs->kWordDocument()->unzoomPoint(nPoint)); } @@ -169,7 +169,7 @@ void KWDocStructParagItem::editProperties() void KWDocStructParagItem::speakItem() { - QString text; + TQString text; KoParagCounter* tmpCounter = m_parag->counter(); if (tmpCounter) text = tmpCounter->text(m_parag) + " "; @@ -185,22 +185,22 @@ void KWDocStructParagItem::speakItem() /* Class: KWDocStructTextFrameItem */ /******************************************************************/ -KWDocStructTextFrameItem::KWDocStructTextFrameItem(QListViewItem* parent, const QString& text, +KWDocStructTextFrameItem::KWDocStructTextFrameItem(TQListViewItem* tqparent, const TQString& text, KWTextFrameSet* frameset, KWFrame* frame) - : KWDocListViewItem(parent, text), m_frame(frame), m_frameset(frameset) + : KWDocListViewItem(tqparent, text), m_frame(frame), m_frameset(frameset) { } -KWDocStructTextFrameItem::KWDocStructTextFrameItem(QListViewItem* parent, QListViewItem* after, - const QString& text, KWTextFrameSet* frameset, KWFrame* frame) - : KWDocListViewItem(parent, after, text), m_frame(frame), m_frameset(frameset) +KWDocStructTextFrameItem::KWDocStructTextFrameItem(TQListViewItem* tqparent, TQListViewItem* after, + const TQString& text, KWTextFrameSet* frameset, KWFrame* frame) + : KWDocListViewItem(tqparent, after, text), m_frame(frame), m_frameset(frameset) { } void KWDocStructTextFrameItem::setupTextParags() { // Build a list of pointers to paragraphs. - QPtrList<KWTextParag> paragPtrs; + TQPtrList<KWTextParag> paragPtrs; paragPtrs.setAutoDelete(false); KoTextParag* textParag = 0; KoTextParag* lastParag = 0; @@ -218,7 +218,7 @@ void KWDocStructTextFrameItem::setupTextParags() KWTextParag* parag = dynamic_cast<KWTextParag *>(textParag); if (parag) { // Don't display an empty paragraph. - QString text = parag->toString().stripWhiteSpace(); + TQString text = parag->toString().stripWhiteSpace(); if ( text.length() > 0) paragPtrs.append(parag); } @@ -235,15 +235,15 @@ void KWDocStructTextFrameItem::setupTextParags() while (item) { delItem = item; item = dynamic_cast<KWDocStructParagItem *>(item->nextSibling()); - if (paragPtrs.containsRef(delItem->parag()) == 0) delete delItem; + if (paragPtrs.tqcontainsRef(delItem->parag()) == 0) delete delItem; } // Add new paragraphs to the list or update existing ones. KWDocStructParagItem* after = 0; for (uint j = 0; j < paragPtrs.count(); j++) { KWTextParag* parag = paragPtrs.at(j); - QString text = parag->toString().stripWhiteSpace(); - QString name = text.left(20); + TQString text = parag->toString().stripWhiteSpace(); + TQString name = text.left(20); KoParagCounter* tmpCounter = parag->counter(); if (tmpCounter) name.prepend(tmpCounter->text(parag) + " "); @@ -260,7 +260,7 @@ void KWDocStructTextFrameItem::setupTextParags() } } -void KWDocStructTextFrameItem::contextMenu(QListViewItem* item, const QPoint& p, int ) +void KWDocStructTextFrameItem::contextMenu(TQListViewItem* item, const TQPoint& p, int ) { if (item == this) gui()->getView()->openDocStructurePopupMenu(p, m_frameset, 0); @@ -310,7 +310,7 @@ void KWDocStructTextFrameItem::speakItem() KWTextParag* parag = dynamic_cast<KWTextParag *>(textParag); if (parag) { // Don't speak an empty paragraph. - QString text = parag->toString().stripWhiteSpace(); + TQString text = parag->toString().stripWhiteSpace(); if ( text.length() > 0) { kospeaker->queueSpeech(text, parag->paragraphFormat()->language(), first); first = false; @@ -329,7 +329,7 @@ KWDocStructParagItem* KWDocStructTextFrameItem::findTextParagItem(const KWTextPa { if ( childCount() > 0 ) { - QListViewItem *child = firstChild(); + TQListViewItem *child = firstChild(); while( child ) { if (dynamic_cast<KWDocStructParagItem *>(child)->parag() == parag) @@ -345,15 +345,15 @@ KWDocStructParagItem* KWDocStructTextFrameItem::findTextParagItem(const KWTextPa /* Class: KWDocStructTextFrameSetItem */ /******************************************************************/ -KWDocStructTextFrameSetItem::KWDocStructTextFrameSetItem(QListViewItem* parent, const QString& text, +KWDocStructTextFrameSetItem::KWDocStructTextFrameSetItem(TQListViewItem* tqparent, const TQString& text, KWTextFrameSet* frameset) - : KWDocListViewItem(parent, text ), m_frameset(frameset) + : KWDocListViewItem(tqparent, text ), m_frameset(frameset) { } -KWDocStructTextFrameSetItem::KWDocStructTextFrameSetItem(QListViewItem* parent, QListViewItem* after, - const QString& text, KWTextFrameSet* frameset) - : KWDocListViewItem(parent, after, text), m_frameset(frameset) +KWDocStructTextFrameSetItem::KWDocStructTextFrameSetItem(TQListViewItem* tqparent, TQListViewItem* after, + const TQString& text, KWTextFrameSet* frameset) + : KWDocListViewItem(tqparent, after, text), m_frameset(frameset) { } @@ -361,7 +361,7 @@ void KWDocStructTextFrameSetItem::setupTextFrames() { // TODO: KWTextFrameSet::frame() method returns frames in screen order? // Build a list of frame pointers. - QPtrList<KWFrame> framePtrs; + TQPtrList<KWFrame> framePtrs; framePtrs.setAutoDelete(false); for (uint j = 0; j < m_frameset->frameCount(); j++) framePtrs.append(m_frameset->frame(j)); @@ -372,7 +372,7 @@ void KWDocStructTextFrameSetItem::setupTextFrames() while (item) { delItem = item; item = dynamic_cast<KWDocStructTextFrameItem *>(item->nextSibling()); - if (framePtrs.containsRef(delItem->frame()) == 0) delete delItem; + if (framePtrs.tqcontainsRef(delItem->frame()) == 0) delete delItem; } // Add new frames to the list or update existing ones. @@ -381,16 +381,16 @@ void KWDocStructTextFrameSetItem::setupTextFrames() for (uint j = 0; j < framePtrs.count(); j++) { KWFrame* frame = framePtrs.at(j); - QString name; - if ( KListViewItem::parent()->firstChild() == this && dok->processingType() == KWDocument::WP ) + TQString name; + if ( KListViewItem::tqparent()->firstChild() == this && dok->processingType() == KWDocument::WP ) { if ( dok->numColumns() == 1 ) - name=i18n( "Page %1" ).arg(QString::number(j + 1)); + name=i18n( "Page %1" ).tqarg(TQString::number(j + 1)); else - name=i18n( "Column %1" ).arg(QString::number(j + 1)); + name=i18n( "Column %1" ).tqarg(TQString::number(j + 1)); } else - name=i18n( "Text Frame %1" ).arg(QString::number(j + 1)); + name=i18n( "Text Frame %1" ).tqarg(TQString::number(j + 1)); KWDocStructTextFrameItem* child = findTextFrameItem(frame); if (child) child->setText(0, name); @@ -405,7 +405,7 @@ void KWDocStructTextFrameSetItem::setupTextFrames() } } -void KWDocStructTextFrameSetItem::contextMenu(QListViewItem* item, const QPoint& p, int ) +void KWDocStructTextFrameSetItem::contextMenu(TQListViewItem* item, const TQPoint& p, int ) { if (item == this) gui()->getView()->openDocStructurePopupMenu(p, m_frameset, 0); @@ -447,7 +447,7 @@ KWDocStructTextFrameItem* KWDocStructTextFrameSetItem::findTextFrameItem(const K { if ( childCount() > 0 ) { - QListViewItem *child = firstChild(); + TQListViewItem *child = firstChild(); while( child ) { if (dynamic_cast<KWDocStructTextFrameItem *>(child)->frame() == frame) @@ -463,15 +463,15 @@ KWDocStructTextFrameItem* KWDocStructTextFrameSetItem::findTextFrameItem(const K /* Class: KWDocStructTableItem */ /******************************************************************/ -KWDocStructTableItem::KWDocStructTableItem(QListViewItem* parent, const QString& text, +KWDocStructTableItem::KWDocStructTableItem(TQListViewItem* tqparent, const TQString& text, KWTableFrameSet* table) - :KWDocListViewItem(parent, text), m_table(table) + :KWDocListViewItem(tqparent, text), m_table(table) { } -KWDocStructTableItem::KWDocStructTableItem(QListViewItem* parent, QListViewItem* after, - const QString& text, KWTableFrameSet* table) - :KWDocListViewItem(parent, after, text), m_table(table) +KWDocStructTableItem::KWDocStructTableItem(TQListViewItem* tqparent, TQListViewItem* after, + const TQString& text, KWTableFrameSet* table) + :KWDocListViewItem(tqparent, after, text), m_table(table) { } @@ -479,7 +479,7 @@ void KWDocStructTableItem::setupCells() { // TODO: KWTableFrameSet::cell() method returns cells in screen order? // Build a list of cell pointers. - QPtrList<KWTextFrameSet> cellPtrs; + TQPtrList<KWTextFrameSet> cellPtrs; cellPtrs.setAutoDelete(false); for (uint row = 0; row < m_table->getRows(); ++row) for (uint col = 0; col < m_table->getColumns(); ++ col) { @@ -494,7 +494,7 @@ void KWDocStructTableItem::setupCells() while (item) { delItem = item; item = dynamic_cast<KWDocStructTextFrameItem *>(item->nextSibling()); - if (cellPtrs.containsRef(delItem->frameSet()) == 0) delete delItem; + if (cellPtrs.tqcontainsRef(delItem->frameSet()) == 0) delete delItem; } // Add new cells to the list or update existing ones. @@ -507,7 +507,7 @@ void KWDocStructTableItem::setupCells() KWTextFrameSet* cell = cellPtrs.at(j); KWFrame* frame = cell->frame(0); if (frame) { - QString name = cell->name(); + TQString name = cell->name(); child = findCellItem(cell); if (child) child->setText(0, name); @@ -523,7 +523,7 @@ void KWDocStructTableItem::setupCells() } } -void KWDocStructTableItem::contextMenu(QListViewItem* item, const QPoint& p, int ) +void KWDocStructTableItem::contextMenu(TQListViewItem* item, const TQPoint& p, int ) { if (item == this) gui()->getView()->openDocStructurePopupMenu(p, m_table, 0); @@ -573,7 +573,7 @@ KWDocStructTextFrameItem* KWDocStructTableItem::findCellItem(const KWTextFrameSe { if ( childCount() > 0 ) { - QListViewItem *child = firstChild(); + TQListViewItem *child = firstChild(); while( child ) { if (dynamic_cast<KWDocStructTextFrameItem *>(child)->frameSet() == cell) @@ -589,13 +589,13 @@ KWDocStructTextFrameItem* KWDocStructTableItem::findCellItem(const KWTextFrameSe /* Class: KWDocStructPictureItem */ /******************************************************************/ -KWDocStructPictureItem::KWDocStructPictureItem(QListViewItem* parent, const QString& text, +KWDocStructPictureItem::KWDocStructPictureItem(TQListViewItem* tqparent, const TQString& text, KWPictureFrameSet* pic) - : KWDocListViewItem(parent, text), m_pic(pic) + : KWDocListViewItem(tqparent, text), m_pic(pic) { } -void KWDocStructPictureItem::contextMenu(QListViewItem* item, const QPoint& p, int ) +void KWDocStructPictureItem::contextMenu(TQListViewItem* item, const TQPoint& p, int ) { if (item == this) gui()->getView()->openDocStructurePopupMenu(p, m_pic, 0); @@ -629,13 +629,13 @@ void KWDocStructPictureItem::editProperties() /* Class: KWDocStructFormulaItem */ /******************************************************************/ -KWDocStructFormulaItem::KWDocStructFormulaItem(QListViewItem* parent, const QString& text, +KWDocStructFormulaItem::KWDocStructFormulaItem(TQListViewItem* tqparent, const TQString& text, KWFormulaFrameSet* form) - : KWDocListViewItem(parent, text), m_form(form) + : KWDocListViewItem(tqparent, text), m_form(form) { } -void KWDocStructFormulaItem::contextMenu(QListViewItem* item, const QPoint& p, int ) +void KWDocStructFormulaItem::contextMenu(TQListViewItem* item, const TQPoint& p, int ) { if (item == this) gui()->getView()->openDocStructurePopupMenu(p, m_form, 0); @@ -675,13 +675,13 @@ void KWDocStructFormulaItem::speakItem() /* Class: KWDocStructPartItem */ /******************************************************************/ -KWDocStructPartItem::KWDocStructPartItem(QListViewItem* parent, const QString& text, +KWDocStructPartItem::KWDocStructPartItem(TQListViewItem* tqparent, const TQString& text, KWPartFrameSet* part) - : KWDocListViewItem(parent, text), m_part(part) + : KWDocListViewItem(tqparent, text), m_part(part) { } -void KWDocStructPartItem::contextMenu(QListViewItem* item, const QPoint& p, int ) +void KWDocStructPartItem::contextMenu(TQListViewItem* item, const TQPoint& p, int ) { if (item == this) gui()->getView()->openDocStructurePopupMenu(p, m_part, 0); @@ -715,9 +715,9 @@ void KWDocStructPartItem::editProperties() /* Class: KWDocStructRootItem */ /******************************************************************/ -KWDocStructRootItem::KWDocStructRootItem(QListView* parent, const QString& text, +KWDocStructRootItem::KWDocStructRootItem(TQListView* tqparent, const TQString& text, TypeStructDocItem type ) - : KWDocListViewItem(parent, text), m_type(type) + : KWDocListViewItem(tqparent, text), m_type(type) { switch ( type ) { case Arrangement: { @@ -767,14 +767,14 @@ void KWDocStructRootItem::setOpen(bool o) break; } } - QListViewItem::setOpen(o); + TQListViewItem::setOpen(o); } void KWDocStructRootItem::setupArrangement() { deleteAllChildren(); - QIntDict<KWDocStructParagItem> parags; + TQIntDict<KWDocStructParagItem> parags; parags.setAutoDelete( false ); KWFrameSet* frameset = 0L; @@ -783,7 +783,7 @@ void KWDocStructRootItem::setupArrangement() KWDocument* dok = doc(); KWDocStructTextFrameSetItem *item = 0L; - QString _name; + TQString _name; for ( int i = dok->frameSetCount() - 1; i >= 0; i-- ) { @@ -803,18 +803,18 @@ void KWDocStructRootItem::setupArrangement() if ( _depth == 0 ) { if ( item->childCount() == 0 ) - parags.replace( _depth, new KWDocStructParagItem( item,QString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ),parag) ); + parags.tqreplace( _depth, new KWDocStructParagItem( item,TQString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ),parag) ); else - parags.replace( _depth, new KWDocStructParagItem( item, parags[ _depth ],QString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ),parag) ); + parags.tqreplace( _depth, new KWDocStructParagItem( item, parags[ _depth ],TQString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ),parag) ); } else { if (parags[ _depth - 1 ]==0) - parags.replace( _depth, new KWDocStructParagItem( item,QString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) ); + parags.tqreplace( _depth, new KWDocStructParagItem( item,TQString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) ); else if ( parags[ _depth - 1 ]->childCount() == 0 ) - parags.replace( _depth, new KWDocStructParagItem( parags[ _depth - 1 ],QString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) ); + parags.tqreplace( _depth, new KWDocStructParagItem( parags[ _depth - 1 ],TQString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) ); else - parags.replace( _depth, new KWDocStructParagItem( parags[ _depth - 1 ], parags[ _depth ],QString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) ); + parags.tqreplace( _depth, new KWDocStructParagItem( parags[ _depth - 1 ], parags[ _depth ],TQString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) ); } } parag = static_cast<KWTextParag *>(parag->next()); @@ -831,12 +831,12 @@ void KWDocStructRootItem::setupTextFrameSets() { // Delete Empty item from list. - QListViewItem* lvItem = firstChild(); + TQListViewItem* lvItem = firstChild(); if (lvItem && (lvItem->text(0) == i18n("Empty"))) delete lvItem; // Build a list of framesets ordered by their screen position (top left corner). KWDocument* dok = doc(); - QValueList<KWOrderedFrameSet> orderedFrameSets; + TQValueList<KWOrderedFrameSet> orderedFrameSets; for ( int i = dok->frameSetCount() - 1; i >= 0; i-- ) { KWFrameSet* frameset = dok->frameSet(i); if ( frameset->type() == FT_TEXT && frameset->frameSetInfo() == KWFrameSet::FI_BODY && @@ -847,7 +847,7 @@ void KWDocStructRootItem::setupTextFrameSets() qHeapSort(orderedFrameSets); // Build a list of frameset pointers from the sorted list. - QPtrList<KWTextFrameSet> frameSetPtrs; + TQPtrList<KWTextFrameSet> frameSetPtrs; frameSetPtrs.setAutoDelete(false); for ( uint i = 0; i < orderedFrameSets.count(); i++ ) frameSetPtrs.append(dynamic_cast<KWTextFrameSet *>(orderedFrameSets[i].frameSet())); @@ -858,7 +858,7 @@ void KWDocStructRootItem::setupTextFrameSets() while (item) { delItem = item; item = dynamic_cast<KWDocStructTextFrameSetItem *>(item->nextSibling()); - if (frameSetPtrs.containsRef(delItem->frameSet()) == 0) delete delItem; + if (frameSetPtrs.tqcontainsRef(delItem->frameSet()) == 0) delete delItem; } // Add new framesets to the list or update existing ones. @@ -889,7 +889,7 @@ void KWDocStructRootItem::setupFormulaFrames() deleteAllChildren(); KWFrameSet* frameset = 0L; - QString _name; + TQString _name; KWDocStructFormulaItem* child; KWDocument* dok = doc(); @@ -899,7 +899,7 @@ void KWDocStructRootItem::setupFormulaFrames() if ( frameset->type() == FT_FORMULA && frameset->frameCount()>0 ) { - _name=i18n("Formula Frame %1").arg(QString::number(i+1)); + _name=i18n("Formula Frame %1").tqarg(TQString::number(i+1)); child = new KWDocStructFormulaItem(this, _name, dynamic_cast<KWFormulaFrameSet*>( frameset )); } } @@ -911,12 +911,12 @@ void KWDocStructRootItem::setupFormulaFrames() void KWDocStructRootItem::setupTables() { // Delete Empty item from list. - QListViewItem* lvItem = firstChild(); + TQListViewItem* lvItem = firstChild(); if (lvItem && (lvItem->text(0) == i18n("Empty"))) delete lvItem; // Build a list of framesets ordered by their screen position (top left corner). KWDocument* dok = doc(); - QValueList<KWOrderedFrameSet> orderedFrameSets; + TQValueList<KWOrderedFrameSet> orderedFrameSets; for ( int i = dok->frameSetCount() - 1; i >= 0; i-- ) { KWFrameSet* frameset = dok->frameSet(i); if ( frameset->type() == FT_TABLE) @@ -925,7 +925,7 @@ void KWDocStructRootItem::setupTables() qHeapSort(orderedFrameSets); // Build a list of table pointers from the sorted list. - QPtrList<KWTableFrameSet> frameSetPtrs; + TQPtrList<KWTableFrameSet> frameSetPtrs; frameSetPtrs.setAutoDelete(false); for ( uint i = 0; i < orderedFrameSets.count(); i++ ) frameSetPtrs.append(dynamic_cast<KWTableFrameSet *>(orderedFrameSets[i].frameSet())); @@ -936,7 +936,7 @@ void KWDocStructRootItem::setupTables() while (item) { delItem = item; item = dynamic_cast<KWDocStructTableItem *>(item->nextSibling()); - if (frameSetPtrs.containsRef(delItem->table()) == 0) delete delItem; + if (frameSetPtrs.tqcontainsRef(delItem->table()) == 0) delete delItem; } // Add new framesets to the list or update existing ones. @@ -967,7 +967,7 @@ void KWDocStructRootItem::setupPictures() deleteAllChildren(); KWFrameSet* frameset = 0L; - QString _name; + TQString _name; KWDocStructPictureItem* child; KWDocument* dok = doc(); @@ -977,7 +977,7 @@ void KWDocStructRootItem::setupPictures() frameset = dok->frameSet( i ); if ( frameset->type() == FT_PICTURE && frameset->frameCount()>0) { - _name=i18n("Picture (%1) %2").arg(dynamic_cast<KWPictureFrameSet*>( frameset )->key().filename()).arg(++j); + _name=i18n("Picture (%1) %2").tqarg(dynamic_cast<KWPictureFrameSet*>( frameset )->key().filename()).tqarg(++j); child = new KWDocStructPictureItem(this, _name, dynamic_cast<KWPictureFrameSet*>( frameset )); } } @@ -991,7 +991,7 @@ void KWDocStructRootItem::setupEmbedded() deleteAllChildren(); KWFrameSet* frameset = 0L; - QString _name; + TQString _name; KWDocStructPartItem* child; KWDocument* dok = doc(); @@ -1014,7 +1014,7 @@ KWDocStructTextFrameSetItem* KWDocStructRootItem::findTextFrameSetItem(const KWF { if ( childCount() > 0 ) { - QListViewItem *child = firstChild(); + TQListViewItem *child = firstChild(); while( child ) { if (dynamic_cast<KWDocStructTextFrameSetItem *>(child)->frameSet() == frameset) @@ -1029,7 +1029,7 @@ KWDocStructTableItem* KWDocStructRootItem::findTableItem(const KWFrameSet* frame { if ( childCount() > 0 ) { - QListViewItem *child = firstChild(); + TQListViewItem *child = firstChild(); while( child ) { if (dynamic_cast<KWDocStructTableItem *>(child)->table() == frameset) @@ -1046,8 +1046,8 @@ KWDocStructTableItem* KWDocStructRootItem::findTableItem(const KWFrameSet* frame /* Class: KWDocStructTree */ /******************************************************************/ -KWDocStructTree::KWDocStructTree(QWidget* parent, KWDocument* doc, KWGUI* gui) - : KListView(parent), m_doc(doc), m_gui(gui) +KWDocStructTree::KWDocStructTree(TQWidget* tqparent, KWDocument* doc, KWGUI* gui) + : KListView(tqparent), m_doc(doc), m_gui(gui) { embedded = new KWDocStructRootItem( this, i18n( "Embedded Objects" ), Embedded); formulafrms = new KWDocStructRootItem( this, i18n( "Formula Frames" ), FormulaFrames); @@ -1059,14 +1059,14 @@ KWDocStructTree::KWDocStructTree(QWidget* parent, KWDocument* doc, KWGUI* gui) addColumn( i18n( "Document Structure" ) ); setFullWidth( true ); - connect( this, SIGNAL( doubleClicked(QListViewItem*) ), - this, SLOT( slotDoubleClicked(QListViewItem*)) ); - connect( this, SIGNAL( returnPressed(QListViewItem*) ), - this, SLOT( slotReturnPressed(QListViewItem* )) ); - connect( this, SIGNAL(rightButtonClicked(QListViewItem*, const QPoint&,int)), - this, SLOT( slotRightButtonClicked(QListViewItem *, const QPoint&, int))); - connect( this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) ); + connect( this, TQT_SIGNAL( doubleClicked(TQListViewItem*) ), + this, TQT_SLOT( slotDoubleClicked(TQListViewItem*)) ); + connect( this, TQT_SIGNAL( returnPressed(TQListViewItem*) ), + this, TQT_SLOT( slotReturnPressed(TQListViewItem* )) ); + connect( this, TQT_SIGNAL(rightButtonClicked(TQListViewItem*, const TQPoint&,int)), + this, TQT_SLOT( slotRightButtonClicked(TQListViewItem *, const TQPoint&, int))); + connect( this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) ); } KWDocStructTree::~KWDocStructTree() @@ -1089,7 +1089,7 @@ void KWDocStructTree::setup() void KWDocStructTree::refreshTree(int type) { // TODO: Saving current position by listview item text doesn't work if an item is renamed. - QString curItemText; + TQString curItemText; if (currentItem()) curItemText = currentItem()->text(0); // if(((int)Arrangement) & type) // arrangement->setupArrangement(); @@ -1104,14 +1104,14 @@ void KWDocStructTree::refreshTree(int type) if(((int)Embedded) & type) embedded->setupEmbedded(); if (!curItemText.isEmpty()) { - QListViewItem* item = findItem(curItemText, 0); + TQListViewItem* item = tqfindItem(curItemText, 0); if (item) setCurrentItem(item); } } void KWDocStructTree::selectItem() { - QListViewItem* select = currentItem (); + TQListViewItem* select = currentItem (); KWDocListViewItem* tmp = dynamic_cast<KWDocListViewItem *>(select); if ( tmp ) tmp->selectItem(); @@ -1119,7 +1119,7 @@ void KWDocStructTree::selectItem() void KWDocStructTree::editItem() { - QListViewItem* select = currentItem(); + TQListViewItem* select = currentItem(); KWDocListViewItem* tmp = dynamic_cast<KWDocListViewItem *>(select); if ( tmp ) tmp->editItem(); @@ -1128,7 +1128,7 @@ void KWDocStructTree::editItem() void KWDocStructTree::deleteItem() { - QListViewItem* select = currentItem(); + TQListViewItem* select = currentItem(); KWDocListViewItem *tmp = dynamic_cast<KWDocListViewItem *>(select); if ( tmp ) tmp->deleteItem(); @@ -1136,7 +1136,7 @@ void KWDocStructTree::deleteItem() void KWDocStructTree::editProperties() { - QListViewItem* select = currentItem(); + TQListViewItem* select = currentItem(); KWDocListViewItem* tmp = dynamic_cast<KWDocListViewItem *>(select); if ( tmp ) tmp->editProperties(); @@ -1144,13 +1144,13 @@ void KWDocStructTree::editProperties() void KWDocStructTree::speakItem() { - QListViewItem* select = currentItem(); + TQListViewItem* select = currentItem(); KWDocListViewItem* tmp = dynamic_cast<KWDocListViewItem *>(select); if ( tmp ) tmp->speakItem(); } -void KWDocStructTree::slotContextMenu(KListView* lv, QListViewItem* i, const QPoint& p) +void KWDocStructTree::slotContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p) { if (lv != this) return; @@ -1159,21 +1159,21 @@ void KWDocStructTree::slotContextMenu(KListView* lv, QListViewItem* i, const QPo item->contextMenu(item, p, 0); } -void KWDocStructTree::slotRightButtonClicked(QListViewItem* i, const QPoint& p, int) +void KWDocStructTree::slotRightButtonClicked(TQListViewItem* i, const TQPoint& p, int) { KWDocListViewItem* item = dynamic_cast<KWDocListViewItem *>(i); if (item) item->contextMenu(item, p, 0); } -void KWDocStructTree::slotDoubleClicked(QListViewItem* i) +void KWDocStructTree::slotDoubleClicked(TQListViewItem* i) { KWDocListViewItem* item = dynamic_cast<KWDocListViewItem *>(i); if (item) item->selectItem(); } -void KWDocStructTree::slotReturnPressed(QListViewItem* i) +void KWDocStructTree::slotReturnPressed(TQListViewItem* i) { KWDocListViewItem* item = dynamic_cast<KWDocListViewItem *>(i); if (item) { @@ -1188,10 +1188,10 @@ void KWDocStructTree::slotReturnPressed(QListViewItem* i) /* Class: KWDocStruct */ /******************************************************************/ -KWDocStruct::KWDocStruct(QWidget* parent, KWDocument* doc, KWGUI* gui) - : QWidget(parent), m_doc(doc), m_gui(gui) +KWDocStruct::KWDocStruct(TQWidget* tqparent, KWDocument* doc, KWGUI* gui) + : TQWidget(tqparent), m_doc(doc), m_gui(gui) { - m_layout = new QVBoxLayout( this ); + m_layout = new TQVBoxLayout( this ); KToolBar* searchBar = new KToolBar( this ); searchBar->setFlat( true ); @@ -1202,7 +1202,7 @@ KWDocStruct::KWDocStruct(QWidget* parent, KWDocument* doc, KWGUI* gui) m_tree->setAlternateBackground( KGlobalSettings::alternateBackgroundColor() ); KListViewSearchLine* searchLine = new KListViewSearchLine( searchBar, m_tree ); searchBar->setStretchableWidget( searchLine ); - connect( eraseButton, SIGNAL( clicked() ), searchLine, SLOT( clear() ) ); + connect( eraseButton, TQT_SIGNAL( clicked() ), searchLine, TQT_SLOT( clear() ) ); m_layout->addWidget(searchBar); m_layout->addWidget(m_tree); @@ -1210,13 +1210,13 @@ KWDocStruct::KWDocStruct(QWidget* parent, KWDocument* doc, KWGUI* gui) dirtyTreeTypes = 0; } -void KWDocStruct::paintEvent (QPaintEvent* ev) +void KWDocStruct::paintEvent (TQPaintEvent* ev) { if (dirtyTreeTypes) { m_tree->refreshTree(dirtyTreeTypes); dirtyTreeTypes = 0; } - QWidget::paintEvent(ev); + TQWidget::paintEvent(ev); } void KWDocStruct::refreshTree(int type) |