diff options
Diffstat (limited to 'kpresenter/KPrDocument.cpp')
-rw-r--r-- | kpresenter/KPrDocument.cpp | 1016 |
1 files changed, 508 insertions, 508 deletions
diff --git a/kpresenter/KPrDocument.cpp b/kpresenter/KPrDocument.cpp index 595f4981..88f0fd3a 100644 --- a/kpresenter/KPrDocument.cpp +++ b/kpresenter/KPrDocument.cpp @@ -42,12 +42,12 @@ #include "KPrClosedLineObject.h" #include "KPrSVGPathParser.h" -#include <qpopupmenu.h> -#include <qclipboard.h> -#include <qregexp.h> -#include <qfileinfo.h> -#include <qdom.h> -#include <qdict.h> +#include <tqpopupmenu.h> +#include <tqclipboard.h> +#include <tqregexp.h> +#include <tqfileinfo.h> +#include <tqdom.h> +#include <tqdict.h> #include <KoDom.h> #include <KoXmlNS.h> @@ -113,7 +113,7 @@ static const int CURRENT_SYNTAX_VERSION = 2; // Make sure an appropriate DTD is available in www/koffice/DTD if changing this value static const char * CURRENT_DTD_VERSION = "1.2"; -KPrChild::KPrChild( KPrDocument *_kpr, KoDocument* _doc, const QRect& _rect ) +KPrChild::KPrChild( KPrDocument *_kpr, KoDocument* _doc, const TQRect& _rect ) : KoDocumentChild( _kpr, _doc, _rect ) { m_parent = _kpr; @@ -129,16 +129,16 @@ KPrChild::~KPrChild() { } -KoDocument *KPrChild::hitTest( const QPoint &, const QWMatrix & ) +KoDocument *KPrChild::hitTest( const TQPoint &, const TQWMatrix & ) { // hitTest functionality is disabled because kpresenter handles activation // of embedded parts by itself. See KPrPartObject::activate(). return 0; } -KPrDocument::KPrDocument( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, +KPrDocument::KPrDocument( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode ) - : KoDocument( parentWidget,widgetName, parent, name, singleViewMode ), + : KoDocument( tqparentWidget,widgetName, tqparent, name, singleViewMode ), _gradientCollection(), m_customListTest( 0L ), m_childCountBeforeInsert( 0 ) { @@ -160,27 +160,27 @@ KPrDocument::KPrDocument( QWidget *parentWidget, const char *widgetName, QObject KConfig *config = KPrFactory::global()->config(); config->setGroup("Document defaults" ); - QString defaultFontname=config->readEntry("DefaultFont"); + TQString defaultFontname=config->readEntry("DefaultFont"); if ( !defaultFontname.isEmpty() ) m_defaultFont.fromString( defaultFontname ); // If not found, we automatically fallback to the application font (the one from KControl's font module) // Try to force a scalable font. - m_defaultFont.setStyleStrategy( QFont::ForceOutline ); + m_defaultFont.setStyleStrategy( TQFont::ForceOutline ); //kdDebug(33001) << "Default font: requested family: " << m_defaultFont.family() << endl; - //kdDebug(33001) << "Default font: real family: " << QFontInfo(m_defaultFont).family() << endl; + //kdDebug(33001) << "Default font: real family: " << TQFontInfo(m_defaultFont).family() << endl; int ptSize = m_defaultFont.pointSize(); if ( ptSize == -1 ) // specified with a pixel size ? - ptSize = QFontInfo(m_defaultFont).pointSize(); + ptSize = TQFontInfo(m_defaultFont).pointSize(); //kdDebug(33001) << "KPrDocument::KPrDocument[2] ptSize=" << ptSize << endl; // Ok, this is KPresenter. A default font of 10 makes no sense. Let's go for 20. - ptSize = QMAX( 20, ptSize ); + ptSize = TQMAX( 20, ptSize ); m_standardStyle->format().setFont( m_defaultFont ); /// KPresenter isn't color-scheme aware, it defaults to black on white. - m_standardStyle->format().setColor( Qt::black ); + m_standardStyle->format().setColor( TQt::black ); if( config->hasGroup("Interface") ) { config->setGroup( "Interface" ); @@ -204,7 +204,7 @@ KPrDocument::KPrDocument( QWidget *parentWidget, const char *widgetName, QObject _spShowEndOfPresentationSlide = true; _spManualSwitch = true; _showPresentationDuration = false; - tmpSoundFileList = QPtrList<KTempFile>(); + tmpSoundFileList = TQPtrList<KTempFile>(); _xRnd = 20; _yRnd = 20; _txtBackCol = lightGray; @@ -222,8 +222,8 @@ KPrDocument::KPrDocument( QWidget *parentWidget, const char *widgetName, QObject m_cursorInProtectectedArea=true; - usedSoundFile = QStringList(); - haveNotOwnDiskSoundFile = QStringList(); + usedSoundFile = TQStringList(); + haveNotOwnDiskSoundFile = TQStringList(); m_zoomHandler->setZoomAndResolution( 100, KoGlobal::dpiX(), KoGlobal::dpiY() ); newZoomAndResolution(false,false); @@ -256,10 +256,10 @@ KPrDocument::KPrDocument( QWidget *parentWidget, const char *widgetName, QObject m_bInsertDirectCursor = false; objStartY = 0; - _presPen = QPen( red, 3, SolidLine ); + _presPen = TQPen( red, 3, SolidLine ); ignoreSticky = TRUE; - m_gridColor=Qt::black; + m_gridColor=TQt::black; _header = new KPrTextObject( this ); _header->setDrawEditRect( false ); @@ -272,14 +272,14 @@ KPrDocument::KPrDocument( QWidget *parentWidget, const char *widgetName, QObject saveOnlyPage = -1; m_maxRecentFiles = 10; - connect( QApplication::clipboard(), SIGNAL( dataChanged() ), - this, SLOT( clipboardDataChanged() ) ); + connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), + this, TQT_SLOT( clipboardDataChanged() ) ); m_commandHistory = new KoCommandHistory( actionCollection(), true ) ; initConfig(); - connect( m_commandHistory, SIGNAL( documentRestored() ), this, SLOT( slotDocumentRestored() ) ); - connect( m_commandHistory, SIGNAL( commandExecuted() ), this, SLOT( slotCommandExecuted() ) ); + connect( m_commandHistory, TQT_SIGNAL( documentRestored() ), this, TQT_SLOT( slotDocumentRestored() ) ); + connect( m_commandHistory, TQT_SIGNAL( commandExecuted() ), this, TQT_SLOT( slotCommandExecuted() ) ); dcopObject(); } @@ -350,8 +350,8 @@ void KPrDocument::initConfig() else zoom=100; - QColor oldBgColor = Qt::white; - QColor oldGridColor = Qt::black; + TQColor oldBgColor = TQt::white; + TQColor oldGridColor = TQt::black; if ( config->hasGroup( "KPresenter Color" ) ) { config->setGroup( "KPresenter Color" ); setTxtBackCol(config->readColorEntry( "BackgroundColor", &oldBgColor )); @@ -444,23 +444,23 @@ bool KPrDocument::saveChildren( KoStore* _store ) { int i = 0; - QPtrListIterator<KoDocumentChild> it( children() ); + TQPtrListIterator<KoDocumentChild> it( tqchildren() ); for( ; it.current(); ++it ) { - // Don't save children that are only in the undo/redo history + // Don't save tqchildren that are only in the undo/redo history // but not anymore in the presentation - QPtrListIterator<KPrPage> pageIt( m_pageList ); + TQPtrListIterator<KPrPage> pageIt( m_pageList ); for ( int pagePos = 0; pageIt.current(); ++pageIt, ++pagePos ) { if ( saveOnlyPage == -1 || pagePos == saveOnlyPage ) { - QPtrListIterator<KPrObject> oIt(pageIt.current()->objectList()); + TQPtrListIterator<KPrObject> oIt(pageIt.current()->objectList()); for (; oIt.current(); ++oIt ) { if ( oIt.current()->getType() == OT_PART && dynamic_cast<KPrPartObject*>( oIt.current() )->getChild() == it.current() ) { if (((KoDocumentChild*)(it.current()))->document()!=0) - if ( !((KoDocumentChild*)(it.current()))->document()->saveToStore( _store, QString::number( i++ ) ) ) + if ( !((KoDocumentChild*)(it.current()))->document()->saveToStore( _store, TQString::number( i++ ) ) ) return false; } } @@ -468,14 +468,14 @@ bool KPrDocument::saveChildren( KoStore* _store ) } if ( saveOnlyPage == -1 ) { - QPtrListIterator<KPrObject> oIt(m_masterPage->objectList()); + TQPtrListIterator<KPrObject> oIt(m_masterPage->objectList()); for (; oIt.current(); ++oIt ) { if ( oIt.current()->getType() == OT_PART && dynamic_cast<KPrPartObject*>( oIt.current() )->getChild() == it.current() ) { if (((KoDocumentChild*)(it.current()))->document()!=0) - if ( !((KoDocumentChild*)(it.current()))->document()->saveToStore( _store, QString::number( i++ ) ) ) + if ( !((KoDocumentChild*)(it.current()))->document()->saveToStore( _store, TQString::number( i++ ) ) ) return false; } } @@ -484,31 +484,31 @@ bool KPrDocument::saveChildren( KoStore* _store ) return true; } -QDomDocument KPrDocument::saveXML() +TQDomDocument KPrDocument::saveXML() { if ( saveOnlyPage == -1 ) { emit sigProgress( 0 ); } - m_varColl->variableSetting()->setModificationDate(QDateTime::currentDateTime()); + m_varColl->variableSetting()->setModificationDate(TQDateTime::tqcurrentDateTime()); recalcVariables( VT_DATE ); recalcVariables( VT_TIME ); recalcVariables( VT_STATISTIC ); - QDomDocument doc = createDomDocument( "DOC", CURRENT_DTD_VERSION ); - QDomElement presenter=doc.documentElement(); + TQDomDocument doc = createDomDocument( "DOC", CURRENT_DTD_VERSION ); + TQDomElement presenter=doc.documentElement(); presenter.setAttribute("editor", "KPresenter"); presenter.setAttribute("mime", "application/x-kpresenter"); presenter.setAttribute("syntaxVersion", CURRENT_SYNTAX_VERSION); - QDomElement paper=doc.createElement("PAPER"); + TQDomElement paper=doc.createElement("PAPER"); paper.setAttribute("format", static_cast<int>( m_pageLayout.format )); - paper.setAttribute("ptWidth", QString::number( m_pageLayout.ptWidth, 'g', 10 )); - paper.setAttribute("ptHeight", QString::number( m_pageLayout.ptHeight, 'g', 10 )); + paper.setAttribute("ptWidth", TQString::number( m_pageLayout.ptWidth, 'g', 10 )); + paper.setAttribute("ptHeight", TQString::number( m_pageLayout.ptHeight, 'g', 10 )); paper.setAttribute("orientation", static_cast<int>( m_pageLayout.orientation )); paper.setAttribute("unit", unit() ); paper.setAttribute("tabStopValue", m_tabStop ); - QDomElement paperBorders=doc.createElement("PAPERBORDERS"); + TQDomElement paperBorders=doc.createElement("PAPERBORDERS"); paperBorders.setAttribute("ptLeft", m_pageLayout.ptLeft); paperBorders.setAttribute("ptTop", m_pageLayout.ptTop); @@ -524,7 +524,7 @@ QDomDocument KPrDocument::saveXML() if ( saveOnlyPage == -1 ) emit sigProgress( 5 ); - QDomElement element=doc.createElement("BACKGROUND"); + TQDomElement element=doc.createElement("BACKGROUND"); element.appendChild(saveBackground( doc )); presenter.appendChild(element); @@ -555,11 +555,11 @@ QDomDocument KPrDocument::saveXML() { if( !m_spellCheckIgnoreList.isEmpty() ) { - QDomElement spellCheckIgnore = doc.createElement( "SPELLCHECKIGNORELIST" ); + TQDomElement spellCheckIgnore = doc.createElement( "SPELLCHECKIGNORELIST" ); presenter.appendChild( spellCheckIgnore ); - for ( QStringList::Iterator it = m_spellCheckIgnoreList.begin(); it != m_spellCheckIgnoreList.end(); ++it ) + for ( TQStringList::Iterator it = m_spellCheckIgnoreList.begin(); it != m_spellCheckIgnoreList.end(); ++it ) { - QDomElement spellElem = doc.createElement( "SPELLCHECKIGNOREWORD" ); + TQDomElement spellElem = doc.createElement( "SPELLCHECKIGNOREWORD" ); spellCheckIgnore.appendChild( spellElem ); spellElem.setAttribute( "word", *it ); } @@ -599,24 +599,24 @@ QDomDocument KPrDocument::saveXML() { if ( !m_customListSlideShow.isEmpty() ) { - QMap<KPrPage *, QString> page2name; + TQMap<KPrPage *, TQString> page2name; int pos = 1; - for ( QPtrListIterator<KPrPage> it( m_pageList ); it.current(); ++it ) + for ( TQPtrListIterator<KPrPage> it( m_pageList ); it.current(); ++it ) { - page2name.insert( it.current(), "page" + QString::number( pos++ ) ) ; + page2name.insert( it.current(), "page" + TQString::number( pos++ ) ) ; } element = doc.createElement( "CUSTOMSLIDESHOWCONFIG" ); CustomSlideShowMap::Iterator it; for ( it = m_customListSlideShow.begin(); it != m_customListSlideShow.end(); ++it ) { - QDomElement slide=doc.createElement("CUSTOMSLIDESHOW"); + TQDomElement slide=doc.createElement("CUSTOMSLIDESHOW"); slide.setAttribute("name", it.key() ); - QString tmp; - QValueListIterator<KPrPage*> itPage ; + TQString tmp; + TQValueListIterator<KPrPage*> itPage ; for( itPage = ( *it ).begin(); itPage != ( *it ).end(); ++itPage ) { - int posPage = m_pageList.find( *itPage ); + int posPage = m_pageList.tqfind( *itPage ); if ( posPage != -1 ) { if ( itPage != ( *it ).begin() ) @@ -646,7 +646,7 @@ QDomDocument KPrDocument::saveXML() { element=doc.createElement("SELSLIDES"); for ( uint i = 0; i < m_pageList.count(); i++ ) { - QDomElement slide=doc.createElement("SLIDE"); + TQDomElement slide=doc.createElement("SLIDE"); slide.setAttribute("nr", i); slide.setAttribute("show", m_pageList.at(i)->isSlideSelected()); element.appendChild(slide); @@ -658,10 +658,10 @@ QDomDocument KPrDocument::saveXML() if ( saveOnlyPage == -1 ) { - QDomElement styles = doc.createElement( "STYLES" ); + TQDomElement styles = doc.createElement( "STYLES" ); presenter.appendChild( styles ); - QValueList<KoUserStyle *> styleList(m_styleColl->styleList()); - for ( QValueList<KoUserStyle *>::const_iterator it = styleList.begin(), end = styleList.end(); + TQValueList<KoUserStyle *> styleList(m_styleColl->styleList()); + for ( TQValueList<KoUserStyle *>::const_iterator it = styleList.begin(), end = styleList.end(); it != end ; ++it ) saveStyle( static_cast<KoParagStyle *>( *it ), styles ); @@ -669,9 +669,9 @@ QDomDocument KPrDocument::saveXML() } // Write "OBJECT" tag for every child - QPtrListIterator<KoDocumentChild> chl( children() ); + TQPtrListIterator<KoDocumentChild> chl( tqchildren() ); for( ; chl.current(); ++chl ) { - // Don't save children that are only in the undo/redo history + // Don't save tqchildren that are only in the undo/redo history // but not anymore in the presentation for ( int i = 0; i < static_cast<int>( m_pageList.count() ); i++ ) { if ( saveOnlyPage != -1 && i != saveOnlyPage ) @@ -693,7 +693,7 @@ QDomDocument KPrDocument::saveXML() emit sigProgress( 70 ); makeUsedPixmapList(); - QDomElement pictures = m_pictureCollection.saveXML( KoPictureCollection::CollectionPicture, doc, usedPictures ); + TQDomElement pictures = m_pictureCollection.saveXML( KoPictureCollection::CollectionPicture, doc, usedPictures ); presenter.appendChild( pictures ); if ( saveOnlyPage == -1 ) @@ -701,7 +701,7 @@ QDomDocument KPrDocument::saveXML() // Save sound file list. makeUsedSoundFileList(); - QDomElement soundFiles = saveUsedSoundFileToXML( doc, usedSoundFile ); + TQDomElement soundFiles = saveUsedSoundFileToXML( doc, usedSoundFile ); presenter.appendChild( soundFiles ); if ( saveOnlyPage == -1 ) @@ -709,49 +709,49 @@ QDomDocument KPrDocument::saveXML() return doc; } -void KPrDocument::saveEmbeddedObject(KPrPage *page, const QPtrList<KoDocumentChild>& childList, - QDomDocument &doc,QDomElement &presenter ) +void KPrDocument::saveEmbeddedObject(KPrPage *page, const TQPtrList<KoDocumentChild>& childList, + TQDomDocument &doc,TQDomElement &presenter ) { - QPtrListIterator<KoDocumentChild> chl( childList ); + TQPtrListIterator<KoDocumentChild> chl( childList ); double offset = 0.0; // we need no offset for objects on the master page and when we copy a page - if ( m_pageList.findRef( page ) ) + if ( m_pageList.tqfindRef( page ) ) { - offset=m_pageList.findRef(page)*page->getPageRect().height(); + offset=m_pageList.tqfindRef(page)*page->getPageRect().height(); } for( ; chl.current(); ++chl ) saveEmbeddedObject(page, chl.current(),doc,presenter, offset ); } -void KPrDocument::saveEmbeddedObject(KPrPage *page, KoDocumentChild *chl, QDomDocument &doc, - QDomElement &presenter, double offset ) +void KPrDocument::saveEmbeddedObject(KPrPage *page, KoDocumentChild *chl, TQDomDocument &doc, + TQDomElement &presenter, double offset ) { - QPtrListIterator<KPrObject> oIt(page->objectList()); + TQPtrListIterator<KPrObject> oIt(page->objectList()); for ( int pos = 0; oIt.current(); ++oIt, ++pos ) { if ( oIt.current()->getType() == OT_PART && static_cast<KPrPartObject*>( oIt.current() )->getChild() == chl ) { - QDomElement embedded=doc.createElement("EMBEDDED"); + TQDomElement embedded=doc.createElement("EMBEDDED"); KPrChild* curr = (KPrChild*)chl; - // geometry is no zoom value ! - QRect _rect = curr->geometry(); + // tqgeometry is no zoom value ! + TQRect _rect = curr->tqgeometry(); int tmpX = (int)zoomHandler()->unzoomItX( _rect.x() ); int tmpY = (int)zoomHandler()->unzoomItY( _rect.y() ); int tmpWidth = (int)zoomHandler()->unzoomItX( _rect.width() ); int tmpHeight = (int)zoomHandler()->unzoomItY( _rect.height() ); - curr->setGeometry( QRect( tmpX, tmpY, tmpWidth, tmpHeight ) ); + curr->setGeometry( TQRect( tmpX, tmpY, tmpWidth, tmpHeight ) ); embedded.appendChild(curr->save(doc, true)); curr->setGeometry( _rect ); // replace zoom value - QDomElement settings=doc.createElement("SETTINGS"); + TQDomElement settings=doc.createElement("SETTINGS"); settings.setAttribute( "z-index", pos ); if ( page == m_masterPage ) settings.setAttribute("sticky", 1 ); - QPtrListIterator<KPrObject> setOIt(page->objectList()); + TQPtrListIterator<KPrObject> setOIt(page->objectList()); for (; setOIt.current(); ++setOIt ) { if ( setOIt.current()->getType() == OT_PART && @@ -800,14 +800,14 @@ void KPrDocument::compatibilityFromOldFileFormat() void KPrDocument::enableEmbeddedParts( bool f ) { - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) it.current()->enableEmbeddedParts(f); } -QDomDocumentFragment KPrDocument::saveBackground( QDomDocument &doc ) +TQDomDocumentFragment KPrDocument::saveBackground( TQDomDocument &doc ) { - QDomDocumentFragment fragment=doc.createDocumentFragment(); + TQDomDocumentFragment fragment=doc.createDocumentFragment(); for ( int i = 0; i < static_cast<int>( m_pageList.count() ); i++ ) { if ( saveOnlyPage != -1 && i != saveOnlyPage ) continue; @@ -821,9 +821,9 @@ QDomDocumentFragment KPrDocument::saveBackground( QDomDocument &doc ) return fragment; } -QDomElement KPrDocument::saveObjects( QDomDocument &doc ) +TQDomElement KPrDocument::saveObjects( TQDomDocument &doc ) { - QDomElement objects=doc.createElement("OBJECTS"); + TQDomElement objects=doc.createElement("OBJECTS"); double yoffset=0.0; for ( int i = 0; i < static_cast<int>( m_pageList.count() ); i++ ) { if ( saveOnlyPage != -1 && saveOnlyPage!=i) @@ -840,42 +840,42 @@ QDomElement KPrDocument::saveObjects( QDomDocument &doc ) return objects; } -QDomElement KPrDocument::saveTitle( QDomDocument &doc ) +TQDomElement KPrDocument::saveTitle( TQDomDocument &doc ) { - QDomElement titles=doc.createElement("PAGETITLES"); + TQDomElement titles=doc.createElement("PAGETITLES"); if ( saveOnlyPage == -1 ) { // All page titles. for ( int i = 0; i < static_cast<int>( m_pageList.count() ); i++ ) { - QDomElement title=doc.createElement("Title"); + TQDomElement title=doc.createElement("Title"); title.setAttribute("title", m_pageList.at(i)->manualTitle()); titles.appendChild(title); } } else { // Only current page title. - QDomElement title=doc.createElement("Title"); + TQDomElement title=doc.createElement("Title"); title.setAttribute("title", m_pageList.at(saveOnlyPage)->manualTitle()); titles.appendChild(title); } return titles; } -QDomElement KPrDocument::saveNote( QDomDocument &doc ) +TQDomElement KPrDocument::saveNote( TQDomDocument &doc ) { - QDomElement notes=doc.createElement("PAGENOTES"); + TQDomElement notes=doc.createElement("PAGENOTES"); if ( saveOnlyPage == -1 ) { // All page notes. for ( int i = 0; i < static_cast<int>( m_pageList.count() ); i++ ) { - QDomElement note=doc.createElement("Note"); + TQDomElement note=doc.createElement("Note"); note.setAttribute("note", m_pageList.at(i)->noteText( )); notes.appendChild(note); } } else { // Only current page note. - QDomElement note=doc.createElement("Note"); + TQDomElement note=doc.createElement("Note"); note.setAttribute("note", m_pageList.at(saveOnlyPage)->noteText( )); notes.appendChild(note); } @@ -883,15 +883,15 @@ QDomElement KPrDocument::saveNote( QDomDocument &doc ) return notes; } -QDomElement KPrDocument::saveAttribute( QDomDocument &doc ) +TQDomElement KPrDocument::saveAttribute( TQDomDocument &doc ) { - QDomElement attributes=doc.createElement("ATTRIBUTES"); + TQDomElement attributes=doc.createElement("ATTRIBUTES"); //store first view parameter. int activePage=0; if ( m_initialActivePage ) - activePage=m_pageList.findRef(m_initialActivePage); - activePage = QMAX( activePage, 0); + activePage=m_pageList.tqfindRef(m_initialActivePage); + activePage = TQMAX( activePage, 0); attributes.setAttribute("activePage",activePage ); attributes.setAttribute("gridx", m_gridX ); attributes.setAttribute("gridy", m_gridY ); @@ -899,19 +899,19 @@ QDomElement KPrDocument::saveAttribute( QDomDocument &doc ) return attributes; } -QDomElement KPrDocument::saveUsedSoundFileToXML( QDomDocument &_doc, QStringList _list ) +TQDomElement KPrDocument::saveUsedSoundFileToXML( TQDomDocument &_doc, TQStringList _list ) { - QDomElement soundFiles = _doc.createElement( "SOUNDS" ); + TQDomElement soundFiles = _doc.createElement( "SOUNDS" ); unsigned int i = 0; - QStringList::Iterator it = _list.begin(); + TQStringList::Iterator it = _list.begin(); for ( ; it != _list.end(); ++it ) { - QString soundFileName = *it; - int position = soundFileName.findRev( '.' ); - QString format = soundFileName.right( soundFileName.length() - position - 1 ); - QString _name = QString( "sounds/sound%1.%2" ).arg( ++i ).arg( format.lower() ); + TQString soundFileName = *it; + int position = soundFileName.tqfindRev( '.' ); + TQString format = soundFileName.right( soundFileName.length() - position - 1 ); + TQString _name = TQString( "sounds/sound%1.%2" ).tqarg( ++i ).tqarg( format.lower() ); - QDomElement fileElem = _doc.createElement( "FILE" ); + TQDomElement fileElem = _doc.createElement( "FILE" ); soundFiles.appendChild( fileElem ); fileElem.setAttribute( "filename", soundFileName ); fileElem.setAttribute( "name", _name ); @@ -947,19 +947,19 @@ int KPrDocument::supportedSpecialFormats() const return KoDocument::supportedSpecialFormats(); } -void KPrDocument::saveUsedSoundFileToStore( KoStore *_store, QStringList _list ) +void KPrDocument::saveUsedSoundFileToStore( KoStore *_store, TQStringList _list ) { unsigned int i = 0; - QStringList::Iterator it = _list.begin(); + TQStringList::Iterator it = _list.begin(); for ( ; it != _list.end(); ++it ) { - QString soundFileName = *it; - int position = soundFileName.findRev( '.' ); - QString format = soundFileName.right( soundFileName.length() - position - 1 ); - QString _storeURL = QString( "sounds/sound%1.%2" ).arg( ++i ).arg( format.lower() ); + TQString soundFileName = *it; + int position = soundFileName.tqfindRev( '.' ); + TQString format = soundFileName.right( soundFileName.length() - position - 1 ); + TQString _storeURL = TQString( "sounds/sound%1.%2" ).tqarg( ++i ).tqarg( format.lower() ); if ( _store->open( _storeURL ) ) { KoStoreDevice dev( _store ); - QFile _file( soundFileName ); + TQFile _file( soundFileName ); if ( _file.open( IO_ReadOnly ) ) { dev.writeBlock( ( _file.readAll() ).data(), _file.size() ); _file.close(); @@ -973,7 +973,7 @@ bool KPrDocument::loadChildren( KoStore* _store ) { if ( objStartY == 0 && _clean) // Don't do this when inserting a template or a page... { - QPtrListIterator<KoDocumentChild> it( children() ); + TQPtrListIterator<KoDocumentChild> it( tqchildren() ); for( ; it.current(); ++it ) { if ( !((KoDocumentChild*)it.current())->loadDocument( _store ) ) return false; @@ -981,7 +981,7 @@ bool KPrDocument::loadChildren( KoStore* _store ) } else // instead load form the correct child on, m_childCountBeforeInsert has the be set { - QPtrListIterator<KoDocumentChild> it( children() ); + TQPtrListIterator<KoDocumentChild> it( tqchildren() ); for( int i = 0; it.current(); ++it, ++i ) { if ( i < m_childCountBeforeInsert ) continue; @@ -1006,7 +1006,7 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) KoXmlWriter* contentWriter = createOasisXmlWriter( &contentDev, "office:document-content" ); - m_varColl->variableSetting()->setModificationDate(QDateTime::currentDateTime()); + m_varColl->variableSetting()->setModificationDate(TQDateTime::tqcurrentDateTime()); recalcVariables( VT_DATE ); recalcVariables( VT_TIME ); recalcVariables( VT_STATISTIC ); @@ -1018,15 +1018,15 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) KTempFile contentTmpFile; contentTmpFile.setAutoDelete( true ); - QFile* tmpFile = contentTmpFile.file(); - KoXmlWriter contentTmpWriter( tmpFile, 1 ); + TQFile* tmpFile = contentTmpFile.file(); + KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 ); //For sticky objects KTempFile stickyTmpFile; stickyTmpFile.setAutoDelete( true ); - QFile* masterStyles = stickyTmpFile.file(); - KoXmlWriter stickyTmpWriter( masterStyles, 1 ); + TQFile* masterStyles = stickyTmpFile.file(); + KoXmlWriter stickyTmpWriter( TQT_TQIODEVICE(masterStyles), 1 ); contentTmpWriter.startElement( "office:body" ); @@ -1038,15 +1038,15 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) int partIndexObj = 0; //save page - QMap<QString, int> pageNames; + TQMap<TQString, int> pageNames; if ( !_duplicatePage ) { m_masterPage->saveOasisPage( store, stickyTmpWriter, 0, savingContext, indexObj, partIndexObj, manifestWriter, pageNames ); // Now mark all autostyles as "for styles.xml" since headers/footers need them - QValueList<KoGenStyles::NamedStyle> autoStyles = mainStyles.styles( KoGenStyle::STYLE_AUTO ); - for ( QValueList<KoGenStyles::NamedStyle>::const_iterator it = autoStyles.begin(); + TQValueList<KoGenStyles::NamedStyle> autoStyles = mainStyles.styles( KoGenStyle::STYLE_AUTO ); + for ( TQValueList<KoGenStyles::NamedStyle>::const_iterator it = autoStyles.begin(); it != autoStyles.end(); ++it ) { kdDebug() << "marking for styles.xml:" << ( *it ).name << endl; mainStyles.markStyleForStylesXml( ( *it ).name ); @@ -1067,8 +1067,8 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) } if ( saveOnlyPage == -1 ) //don't save setting when we save on page { - QMap<int, QString> page2name; - QMap<QString, int>::ConstIterator it( pageNames.begin() ); + TQMap<int, TQString> page2name; + TQMap<TQString, int>::ConstIterator it( pageNames.begin() ); for ( ; it != pageNames.end(); ++it ) { page2name.insert( it.data(), it.key() ); @@ -1083,7 +1083,7 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) // And now we can copy over the contents from the tempfile to the real one tmpFile->close(); - contentWriter->addCompleteElement( tmpFile ); + contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); contentTmpFile.close(); contentWriter->endElement(); // root element @@ -1165,7 +1165,7 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) void KPrDocument::saveOasisCustomFied( KoXmlWriter &writer )const { bool customVariableFound = false; - QPtrListIterator<KoVariable> it( m_varColl->getVariables() ); + TQPtrListIterator<KoVariable> it( m_varColl->getVariables() ); for ( ; it.current() ; ++it ) { if ( it.current()->type() == VT_CUSTOM ) @@ -1193,8 +1193,8 @@ void KPrDocument::loadOasisIgnoreList( const KoOasisSettings& settings ) if ( !configurationSettings.isNull() ) { _showPresentationDuration = configurationSettings.parseConfigItemBool( "ShowPresentationDuration", false ); - const QString ignorelist = configurationSettings.parseConfigItemString( "SpellCheckerIgnoreList" ); - m_spellCheckIgnoreList = QStringList::split( ',', ignorelist ); + const TQString ignorelist = configurationSettings.parseConfigItemString( "SpellCheckerIgnoreList" ); + m_spellCheckIgnoreList = TQStringList::split( ',', ignorelist ); } } @@ -1205,8 +1205,8 @@ void KPrDocument::writeAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyles& context.writeFontFaces( contentWriter ); contentWriter.startElement( "office:automatic-styles" ); } - QValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_AUTO, stylesDotXml ); - QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin(); + TQValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_AUTO, stylesDotXml ); + TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin(); for ( ; it != styles.end() ; ++it ) { (*it).style->writeStyle( &contentWriter, mainStyles, "style:style", (*it).name, "style:paragraph-properties" ); } @@ -1246,9 +1246,9 @@ void KPrDocument::writeAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyles& } } -void KPrDocument::loadOasisHeaderFooter(QDomNode & drawPage, KoOasisContext & context) +void KPrDocument::loadOasisHeaderFooter(TQDomNode & drawPage, KoOasisContext & context) { - QDomNode tmp = KoDom::namedItemNS( drawPage, KoXmlNS::style, "header" ); + TQDomNode tmp = KoDom::namedItemNS( drawPage, KoXmlNS::style, "header" ); if ( !tmp.isNull() ) { //kdDebug()<<" there is a header \n"; @@ -1270,18 +1270,18 @@ void KPrDocument::saveOasisSettings( KoXmlWriter &settingsWriter ) //ooimpress save it as this line. //<config:config-item config:name="SnapLinesDrawing" config:type="string">H2260V14397H7693H12415H15345H1424</config:config-item> - QString guideLinesOasis; + TQString guideLinesOasis; //save in mm as in oo - for( QValueList<double>::Iterator it = m_vGuideLines.begin(); it != m_vGuideLines.end(); ++it ) + for( TQValueList<double>::Iterator it = m_vGuideLines.begin(); it != m_vGuideLines.end(); ++it ) { int tmpX = ( int ) ( KoUnit::toMM( *it )*100 ); - guideLinesOasis += "V" + QString::number( tmpX ); + guideLinesOasis += "V" + TQString::number( tmpX ); } - for( QValueList<double>::Iterator it = m_hGuideLines.begin(); it != m_hGuideLines.end(); ++it ) + for( TQValueList<double>::Iterator it = m_hGuideLines.begin(); it != m_hGuideLines.end(); ++it ) { int tmpY = ( int ) ( KoUnit::toMM( *it )*100 ); - guideLinesOasis += "H" + QString::number( tmpY ); + guideLinesOasis += "H" + TQString::number( tmpY ); } if ( !guideLinesOasis.isEmpty() ) { @@ -1301,8 +1301,8 @@ void KPrDocument::saveOasisSettings( KoXmlWriter &settingsWriter ) //store first view parameter. int activePage=0; if ( m_initialActivePage ) - activePage=m_pageList.findRef(m_initialActivePage); - activePage = QMAX( activePage, 0); + activePage=m_pageList.tqfindRef(m_initialActivePage); + activePage = TQMAX( activePage, 0); settingsWriter.addConfigItem( "SelectedPage", activePage ); //not define into oo spec @@ -1311,9 +1311,9 @@ void KPrDocument::saveOasisSettings( KoXmlWriter &settingsWriter ) settingsWriter.endElement(); } -void KPrDocument::loadOasisSettings(const QDomDocument&settingsDoc) +void KPrDocument::loadOasisSettings(const TQDomDocument&settingsDoc) { - kdDebug(33001)<<"void KPrDocument::loadOasisSettings(const QDomDocument&settingsDoc)**********\n"; + kdDebug(33001)<<"void KPrDocument::loadOasisSettings(const TQDomDocument&settingsDoc)**********\n"; KoOasisSettings settings( settingsDoc ); KoOasisSettings::Items viewSettings = settings.itemSet( "view-settings" ); setUnit(KoUnit::unit(viewSettings.parseConfigItemString("unit"))); @@ -1339,9 +1339,9 @@ void KPrDocument::loadOasisSettings(const QDomDocument&settingsDoc) m_varColl->variableSetting()->loadOasis( settings ); } -void KPrDocument::parseOasisGuideLines( const QString &text ) +void KPrDocument::parseOasisGuideLines( const TQString &text ) { - QString str; + TQString str; int newPos = text.length()-1; //start to element = 1 for ( int pos = text.length()-1; pos >=0;--pos ) { @@ -1366,47 +1366,47 @@ void KPrDocument::parseOasisGuideLines( const QString &text ) } } -void KPrDocument::loadOasisPresentationSettings( QDomNode &settingsDoc ) +void KPrDocument::loadOasisPresentationSettings( TQDomNode &settingsDoc ) { //kdDebug()<<"presentation:settings ********************************************* \n"; - QDomElement settings( settingsDoc.toElement() ); - //kdDebug()<<"settings.attribute(presentation:endless) :"<<settings.attributeNS( KoXmlNS::presentation, "endless", QString::null)<<endl; - if (settings.attributeNS( KoXmlNS::presentation, "endless", QString::null)=="true") + TQDomElement settings( settingsDoc.toElement() ); + //kdDebug()<<"settings.attribute(presentation:endless) :"<<settings.attributeNS( KoXmlNS::presentation, "endless", TQString())<<endl; + if (settings.attributeNS( KoXmlNS::presentation, "endless", TQString())=="true") _spInfiniteLoop = true; - if (settings.attributeNS( KoXmlNS::presentation, "show-end-of-presentation-slide", QString::null)=="true") + if (settings.attributeNS( KoXmlNS::presentation, "show-end-of-presentation-slide", TQString())=="true") _spShowEndOfPresentationSlide = true; - if (settings.attributeNS( KoXmlNS::presentation, "force-manual", QString::null)=="true") + if (settings.attributeNS( KoXmlNS::presentation, "force-manual", TQString())=="true") _spManualSwitch = true; if ( settings.hasAttributeNS( KoXmlNS::presentation, "start-page" ) ) { //TODO allow to start presentation to specific page - //???? = settings.attributeNS( KoXmlNS::presentation, "start-page", QString::null ); + //???? = settings.attributeNS( KoXmlNS::presentation, "start-page", TQString() ); } if ( settings.hasAttributeNS( KoXmlNS::presentation, "show" ) ) { - m_presentationName = settings.attributeNS( KoXmlNS::presentation, "show", QString::null ); + m_presentationName = settings.attributeNS( KoXmlNS::presentation, "show", TQString() ); kdDebug()<<" default presentation name :"<<m_presentationName<<endl; } loadOasisPresentationCustomSlideShow( settingsDoc ); } -void KPrDocument::loadOasisPresentationCustomSlideShow( QDomNode &settingsDoc ) +void KPrDocument::loadOasisPresentationCustomSlideShow( TQDomNode &settingsDoc ) { - //kdDebug()<<"void KPrDocument::loadOasisPresentationCustomSlideShow( QDomNode &settingsDoc )**********\n"; - for ( QDomNode element = settingsDoc.firstChild(); !element.isNull(); element = element.nextSibling() ) + //kdDebug()<<"void KPrDocument::loadOasisPresentationCustomSlideShow( TQDomNode &settingsDoc )**********\n"; + for ( TQDomNode element = settingsDoc.firstChild(); !element.isNull(); element = element.nextSibling() ) { - QDomElement e = element.toElement(); - QCString tagName = e.tagName().latin1(); + TQDomElement e = element.toElement(); + TQCString tagName = e.tagName().latin1(); //kdDebug()<<" tagName :"<<tagName<<endl; if ( tagName == "show" && e.namespaceURI() == KoXmlNS::presentation ) { - //kdDebug()<<" e.attribute(presentation:name) :"<<e.attributeNS( KoXmlNS::presentation, "name", QString::null)<< " e.attribute(presentation:pages) :"<<e.attributeNS( KoXmlNS::presentation, "pages", QString::null)<<endl; - QString name = e.attributeNS( KoXmlNS::presentation, "name", QString::null ); - QStringList tmp = QStringList::split( ",", e.attributeNS( KoXmlNS::presentation, "pages", QString::null) ); - QValueList<KPrPage *> pageList; - for ( QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) + //kdDebug()<<" e.attribute(presentation:name) :"<<e.attributeNS( KoXmlNS::presentation, "name", TQString())<< " e.attribute(presentation:pages) :"<<e.attributeNS( KoXmlNS::presentation, "pages", TQString())<<endl; + TQString name = e.attributeNS( KoXmlNS::presentation, "name", TQString() ); + TQStringList tmp = TQStringList::split( ",", e.attributeNS( KoXmlNS::presentation, "pages", TQString()) ); + TQValueList<KPrPage *> pageList; + for ( TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) { - if ( m_loadingInfo->m_name2page.contains( *it ) ) + if ( m_loadingInfo->m_name2page.tqcontains( *it ) ) { kdDebug(33001) << "slide show " << name << " page = " << *it << endl; pageList.push_back( m_loadingInfo->m_name2page[*it] ); @@ -1420,7 +1420,7 @@ void KPrDocument::loadOasisPresentationCustomSlideShow( QDomNode &settingsDoc ) } } -void KPrDocument::saveOasisPresentationSettings( KoXmlWriter &contentTmpWriter, QMap<int, QString> &page2name ) +void KPrDocument::saveOasisPresentationSettings( KoXmlWriter &contentTmpWriter, TQMap<int, TQString> &page2name ) { //todo don't save when is not value by default (check with oo) //FIXME @@ -1436,7 +1436,7 @@ void KPrDocument::saveOasisPresentationSettings( KoXmlWriter &contentTmpWriter, contentTmpWriter.endElement(); } -void KPrDocument::saveOasisPresentationCustomSlideShow( KoXmlWriter &contentTmpWriter, QMap<int, QString> &page2name ) +void KPrDocument::saveOasisPresentationCustomSlideShow( KoXmlWriter &contentTmpWriter, TQMap<int, TQString> &page2name ) { if ( m_customListSlideShow.isEmpty() ) return; @@ -1446,11 +1446,11 @@ void KPrDocument::saveOasisPresentationCustomSlideShow( KoXmlWriter &contentTmpW { contentTmpWriter.startElement( "presentation:show" ); contentTmpWriter.addAttribute( "presentation:name", it.key() ); - QString tmp; - QValueListIterator<KPrPage*> itPage ; + TQString tmp; + TQValueListIterator<KPrPage*> itPage ; for( itPage = ( *it ).begin(); itPage != ( *it ).end(); ++itPage ) { - int posPage = m_pageList.find(*itPage ); + int posPage = m_pageList.tqfind(*itPage ); if ( posPage != -1 ) { if ( itPage != ( *it ).begin() ) @@ -1465,7 +1465,7 @@ void KPrDocument::saveOasisPresentationCustomSlideShow( KoXmlWriter &contentTmpW //<presentation:show presentation:name="New Custom Slide Show" presentation:pages="page1,page1,page1,page1,page1"/> } -void KPrDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, QFile* masterStyles, +void KPrDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, TQFile* masterStyles, KoSavingContext & savingContext, SaveFlag saveFlag ) const { KoStoreDevice stylesDev( store ); @@ -1475,8 +1475,8 @@ void KPrDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyl savingContext.writeFontFaces( *stylesWriter ); stylesWriter->startElement( "office:styles" ); - QValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_USER ); - QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin(); + TQValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_USER ); + TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin(); for ( ; it != styles.end() ; ++it ) { (*it).style->writeStyle( stylesWriter, mainStyles, "style:style", (*it).name, "style:paragraph-properties" ); } @@ -1535,7 +1535,7 @@ void KPrDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyl Q_ASSERT( styles.count() == 1 ); it = styles.begin(); for ( ; it != styles.end() ; ++it ) { - (*it).style->writeStyle( stylesWriter, mainStyles, "style:page-layout", (*it).name, "style:page-layout-properties", false /*don't close*/ ); + (*it).style->writeStyle( stylesWriter, mainStyles, "style:page-tqlayout", (*it).name, "style:page-tqlayout-properties", false /*don't close*/ ); stylesWriter->endElement(); } @@ -1552,7 +1552,7 @@ void KPrDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyl if ( masterStyles ) { stylesWriter->startElement( "office:master-styles" ); - stylesWriter->addCompleteElement( masterStyles ); + stylesWriter->addCompleteElement( TQT_TQIODEVICE(masterStyles) ); stylesWriter->endElement(); } } @@ -1562,9 +1562,9 @@ void KPrDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyl delete stylesWriter; } -bool KPrDocument::loadOasis( const QDomDocument& doc, KoOasisStyles&oasisStyles, const QDomDocument&settingsDoc, KoStore*store ) +bool KPrDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles&oasisStyles, const TQDomDocument&settingsDoc, KoStore*store ) { - QTime dt; + TQTime dt; dt.start(); m_loadingInfo = new KPrLoadingInfo; ignoreSticky = FALSE; @@ -1594,36 +1594,36 @@ bool KPrDocument::loadOasis( const QDomDocument& doc, KoOasisStyles&oasisStyles, m_spellCheckIgnoreList.clear(); emit sigProgress( 5 ); - QDomElement content = doc.documentElement(); - QDomElement realBody (KoDom::namedItemNS( content, KoXmlNS::office, "body" ) ); + TQDomElement content = doc.documentElement(); + TQDomElement realBody (KoDom::namedItemNS( content, KoXmlNS::office, "body" ) ); if ( realBody.isNull() ) { kdError(33001) << "No office:body found!" << endl; setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No office:body tag found." ) ); return false; } - QDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "presentation" ); + TQDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "presentation" ); if ( body.isNull() ) { kdError(33001) << "No office:presentation found!" << endl; - QDomElement childElem; - QString localName; + TQDomElement childElem; + TQString localName; forEachElement( childElem, realBody ) { localName = childElem.localName(); } if ( localName.isEmpty() ) setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No tag found inside office:body." ) ); else - setErrorMessage( i18n( "This document is not a presentation, but a %1. Please try opening it with the appropriate application." ).arg( KoDocument::tagNameToDocumentType( localName ) ) ); + setErrorMessage( i18n( "This document is not a presentation, but a %1. Please try opening it with the appropriate application." ).tqarg( KoDocument::tagNameToDocumentType( localName ) ) ); return false; } // it seems that ooimpress has different paper-settings for every slide. // we take the settings of the first slide for the whole document. - QDomNode drawPage = KoDom::namedItemNS( body, KoXmlNS::draw, "page" ); + TQDomNode drawPage = KoDom::namedItemNS( body, KoXmlNS::draw, "page" ); if ( drawPage.isNull() ) // no slides? give up. return false; - QDomElement dp = drawPage.toElement(); + TQDomElement dp = drawPage.toElement(); //code from kword // TODO variable settings @@ -1641,14 +1641,14 @@ bool KPrDocument::loadOasis( const QDomDocument& doc, KoOasisStyles&oasisStyles, // also don't copy master when you insert file as long as we don't have multiple masters if ( !m_pageWhereLoadObject && _clean ) { - QString masterPageName = drawPage.toElement().attributeNS( KoXmlNS::draw, "master-page-name", QString::null ); - QDomElement *master = oasisStyles.masterPages()[ masterPageName]; + TQString masterPageName = drawPage.toElement().attributeNS( KoXmlNS::draw, "master-page-name", TQString() ); + TQDomElement *master = oasisStyles.masterPages()[ masterPageName]; kdDebug()<<" master :"<<master<<endl; kdDebug()<<" masterPageName:"<<masterPageName<<endl; if ( ! master ) { - masterPageName = "Standard"; // use default layout as fallback (default in kpresenter) + masterPageName = "Standard"; // use default tqlayout as fallback (default in kpresenter) master = oasisStyles.masterPages()[ masterPageName]; if ( !master ) //last test... master = oasisStyles.masterPages()["Default"]; @@ -1661,11 +1661,11 @@ bool KPrDocument::loadOasis( const QDomDocument& doc, KoOasisStyles&oasisStyles, } kdDebug()<<" load oasis master styles\n"; - QDomNode node = *master; - QDomElement masterElement = node.toElement(); - kdDebug()<<" node.isNull() :"<<node.isNull()<< ", " << masterElement.attributeNS( KoXmlNS::draw, "style-name", QString::null ) << endl; + TQDomNode node = *master; + TQDomElement masterElement = node.toElement(); + kdDebug()<<" node.isNull() :"<<node.isNull()<< ", " << masterElement.attributeNS( KoXmlNS::draw, "style-name", TQString() ) << endl; // add the correct styles - const QDomElement* masterPageStyle = context.oasisStyles().findStyleAutoStyle( masterElement.attributeNS( KoXmlNS::draw, "style-name", QString::null ), "drawing-page" ); + const TQDomElement* masterPageStyle = context.oasisStyles().findStyleAutoStyle( masterElement.attributeNS( KoXmlNS::draw, "style-name", TQString() ), "drawing-page" ); if (masterPageStyle) context.styleStack().push( *masterPageStyle ); @@ -1685,8 +1685,8 @@ bool KPrDocument::loadOasis( const QDomDocument& doc, KoOasisStyles&oasisStyles, kdDebug()<<" end load oasis master style \n"; Q_ASSERT( master ); - const QDomElement *style = master ? oasisStyles.findStyle(master->attributeNS( KoXmlNS::style, "page-layout-name", QString::null )) : 0; - const QDomElement *backgroundStyle = oasisStyles.findStyle( "Standard-background", "presentation" ); + const TQDomElement *style = master ? oasisStyles.findStyle(master->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() )) : 0; + const TQDomElement *backgroundStyle = oasisStyles.findStyle( "Standard-background", "presentation" ); kdDebug()<<"Standard background "<<backgroundStyle<<endl; // parse all pages Q_ASSERT( style ); @@ -1734,19 +1734,19 @@ bool KPrDocument::loadOasis( const QDomDocument& doc, KoOasisStyles&oasisStyles, } } //only set the manual title if it is different to the draw:id. Only in this case it had one. - QString str = dp.attributeNS( KoXmlNS::draw, "name", QString::null ); + TQString str = dp.attributeNS( KoXmlNS::draw, "name", TQString() ); m_loadingInfo->m_name2page.insert( str, newpage ); - QString idPage = dp.attributeNS( KoXmlNS::draw, "id", QString::null ); + TQString idPage = dp.attributeNS( KoXmlNS::draw, "id", TQString() ); if ( dp.hasAttributeNS( KoXmlNS::koffice, "name" ) ) { - str = dp.attributeNS( KoXmlNS::koffice, "name", QString::null ); + str = dp.attributeNS( KoXmlNS::koffice, "name", TQString() ); newpage->insertManualTitle(str); } else { // OO uses /page[0-9]+$/ as default for no name set - QRegExp rx( "^page[0-9]+$" ); + TQRegExp rx( "^page[0-9]+$" ); if ( rx.search( str ) == -1 ) newpage->insertManualTitle(str); } @@ -1767,7 +1767,7 @@ bool KPrDocument::loadOasis( const QDomDocument& doc, KoOasisStyles&oasisStyles, } //load settings at the end as we need to know what the draw:name of a page is - QDomNode settings = KoDom::namedItemNS( body, KoXmlNS::presentation, "settings" ); + TQDomNode settings = KoDom::namedItemNS( body, KoXmlNS::presentation, "settings" ); kdDebug()<<"settings :"<<settings.isNull()<<endl; if (!settings.isNull() && _clean /*don't load settings when we copy/paste a page*/) loadOasisPresentationSettings( settings ); @@ -1804,17 +1804,17 @@ bool KPrDocument::loadOasis( const QDomDocument& doc, KoOasisStyles&oasisStyles, } -void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOasisContext & context, KPrGroupObject *groupObject ) +void KPrDocument::loadOasisObject( KPrPage * newpage, TQDomNode & drawPage, KoOasisContext & context, KPrGroupObject *groupObject ) { - for ( QDomNode object = drawPage.firstChild(); !object.isNull(); object = object.nextSibling() ) + for ( TQDomNode object = drawPage.firstChild(); !object.isNull(); object = object.nextSibling() ) { - QDomElement o = object.toElement(); - QString name = o.tagName(); + TQDomElement o = object.toElement(); + TQString name = o.tagName(); if ( !name.isEmpty() ) { kdDebug()<<" name :"<<name<<endl; if ( o.hasAttributeNS( KoXmlNS::presentation, "placeholder" ) && - o.attributeNS( KoXmlNS::presentation, "placeholder", QString::null ) == "true" ) + o.attributeNS( KoXmlNS::presentation, "placeholder", TQString() ) == "true" ) { kdDebug(33001) << "Placeholder" << endl; continue; @@ -1825,12 +1825,12 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas if ( name == "frame" && isDrawNS ) { fillStyleStack( o, context, "graphic" ); - QDomElement elem; + TQDomElement elem; forEachElement( elem, o ) { if ( elem.namespaceURI() != KoXmlNS::draw ) continue; - const QString localName = elem.localName(); + const TQString localName = elem.localName(); if ( localName == "text-box" ) { KPrTextObject *kptextobject = new KPrTextObject( this ); @@ -1854,10 +1854,10 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas else if ( localName == "object" ) { KPrChild *ch = new KPrChild( this ); - QRect r; + TQRect r; KPrPartObject *kppartobject = new KPrPartObject( ch ); kppartobject->loadOasis( o, context, m_loadingInfo ); - r = ch->geometry(); + r = ch->tqgeometry(); if ( groupObject ) groupObject->addObjects( kppartobject ); else @@ -1941,7 +1941,7 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas else if ( name == "path" && isDrawNS) { fillStyleStack( o, context, "graphic" ); - QString d = o.attributeNS( KoXmlNS::svg, "d", QString::null); + TQString d = o.attributeNS( KoXmlNS::svg, "d", TQString()); KPrSVGPathParser parser; ObjType objType = parser.getType( d ); @@ -1958,7 +1958,7 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas else newpage->appendObject( kpCurveObject ); } break; - case OT_QUADRICBEZIERCURVE: + case OT_TQUADRICBEZIERCURVE: { kdDebug(33001) << "Quadricbeziercurve" << endl; KPrQuadricBezierCurveObject *kpQuadricObject = new KPrQuadricBezierCurveObject(); @@ -1993,16 +1993,16 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas break; } } - else if ( name == "custom-shape" && isDrawNS ) + else if ( name == "custom-tqshape" && isDrawNS ) { fillStyleStack( o, context, "graphic" ); - QDomElement enhancedGeometry = KoDom::namedItemNS( o, KoXmlNS::draw, "enhanced-geometry" ); + TQDomElement enhancedGeometry = KoDom::namedItemNS( o, KoXmlNS::draw, "enhanced-tqgeometry" ); if ( !enhancedGeometry.isNull() ) { - QString d = enhancedGeometry.attributeNS( KoXmlNS::draw, "enhanced-path", QString::null ); - QRegExp rx( "^([0-9 ML]+Z) N$" ); + TQString d = enhancedGeometry.attributeNS( KoXmlNS::draw, "enhanced-path", TQString() ); + TQRegExp rx( "^([0-9 ML]+Z) N$" ); if ( rx.search( d ) != -1 ) { d = rx.cap( 1 ); @@ -2022,7 +2022,7 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas else newpage->appendObject( kpCurveObject ); } break; - case OT_QUADRICBEZIERCURVE: + case OT_TQUADRICBEZIERCURVE: { kdDebug(33001) << "Quadricbeziercurve" << endl; KPrQuadricBezierCurveObject *kpQuadricObject = new KPrQuadricBezierCurveObject(); @@ -2054,13 +2054,13 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas newpage->appendObject( kpClosedObject ); } break; default: - kdDebug(33001) << "draw:custom-shape found unsupported object type " << objType << " in draw:enhanced-path " << d << endl; + kdDebug(33001) << "draw:custom-tqshape found unsupported object type " << objType << " in draw:enhanced-path " << d << endl; break; } } else { - kdDebug(33001) << "draw:custom-shape not supported" << endl; + kdDebug(33001) << "draw:custom-tqshape not supported" << endl; } } } @@ -2068,7 +2068,7 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas { fillStyleStack( o, context, "graphic" ); KPrGroupObject *kpgroupobject = new KPrGroupObject(); - QDomNode nodegroup = object.firstChild(); + TQDomNode nodegroup = object.firstChild(); kpgroupobject->loadOasisGroupObject( this, newpage, object, context, m_loadingInfo); if ( groupObject ) @@ -2080,8 +2080,8 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas { //we must extend note attribute //kdDebug()<<"presentation:notes----------------------------------\n"; - QDomNode frameBox = KoDom::namedItemNS( o, KoXmlNS::draw, "frame" ); - QString note; + TQDomNode frameBox = KoDom::namedItemNS( o, KoXmlNS::draw, "frame" ); + TQString note; while ( !frameBox.isNull() ) { @@ -2089,16 +2089,16 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas if ( !note.isEmpty() ) note += "\n"; - //todo load layout for note. - QDomNode textBox = KoDom::namedItemNS( frameBox, KoXmlNS::draw, "text-box" ); + //todo load tqlayout for note. + TQDomNode textBox = KoDom::namedItemNS( frameBox, KoXmlNS::draw, "text-box" ); if ( !textBox.isNull() ) { - for ( QDomNode text = textBox.firstChild(); !text.isNull(); text = text.nextSibling() ) + for ( TQDomNode text = textBox.firstChild(); !text.isNull(); text = text.nextSibling() ) { // We don't care about styles as they are not supported in kpresenter. // Only add a linebreak for every child. - QDomElement t = text.toElement(); + TQDomElement t = text.toElement(); if ( t.tagName() == "p" ) { note += t.text() + "\n"; @@ -2124,33 +2124,33 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, QDomNode & drawPage, KoOas } -int KPrDocument::createPresentationAnimation(const QDomElement& element, int order, bool increaseOrder) +int KPrDocument::createPresentationAnimation(const TQDomElement& element, int order, bool increaseOrder) { - kdDebug()<<"void KPrDocument::createPresentationAnimation(const QDomElement& element)\n"; + kdDebug()<<"void KPrDocument::createPresentationAnimation(const TQDomElement& element)\n"; int orderAnimation = increaseOrder ? 0 : order; - for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); - QCString tagName = e.tagName().latin1(); + TQDomElement e = n.toElement(); + TQCString tagName = e.tagName().latin1(); if ( ! tagName.isEmpty() ) // only tags that open { const bool isPresentationNS = e.namespaceURI() == KoXmlNS::presentation; if ( isPresentationNS && - ( tagName == "show-shape" || tagName == "hide-shape" ) ) + ( tagName == "show-tqshape" || tagName == "hide-tqshape" ) ) { - Q_ASSERT( e.hasAttributeNS( KoXmlNS::draw, "shape-id" ) ); - QString name = e.attributeNS( KoXmlNS::draw, "shape-id", QString::null ); + Q_ASSERT( e.hasAttributeNS( KoXmlNS::draw, "tqshape-id" ) ); + TQString name = e.attributeNS( KoXmlNS::draw, "tqshape-id", TQString() ); kdDebug()<<" insert animation " << tagName << " name :" << name << endl; if ( e.hasAttributeNS( KoXmlNS::koffice, "order-id" ) ) { - orderAnimation = e.attributeNS( KoXmlNS::koffice, "order-id", QString::null ).toInt(); + orderAnimation = e.attributeNS( KoXmlNS::koffice, "order-id", TQString() ).toInt(); } lstAnimation *tmp = new lstAnimation; - tmp->element = new QDomElement( e ); + tmp->element = new TQDomElement( e ); tmp->order = orderAnimation; - if ( tagName == "show-shape" ) + if ( tagName == "show-tqshape" ) { m_loadingInfo->storePresentationShowAnimation( tmp, name ); } @@ -2172,7 +2172,7 @@ int KPrDocument::createPresentationAnimation(const QDomElement& element, int ord return orderAnimation; } -void KPrDocument::fillStyleStack( const QDomElement& object, KoOasisContext & context, const char* family ) +void KPrDocument::fillStyleStack( const TQDomElement& object, KoOasisContext & context, const char* family ) { // See OpenDoc 9.2.15 Common Drawing Shape Attributes // presentation:style-name is allways family presentation @@ -2195,15 +2195,15 @@ void KPrDocument::fillStyleStack( const QDomElement& object, KoOasisContext & co } } -bool KPrDocument::loadXML( QIODevice * dev, const QDomDocument& doc ) +bool KPrDocument::loadXML( TQIODevice * dev, const TQDomDocument& doc ) { - QTime dt; + TQTime dt; dt.start(); m_loadingInfo = new KPrLoadingInfo( true ); ignoreSticky = FALSE; bool b=false; - QDomElement docelem = doc.documentElement(); + TQDomElement docelem = doc.documentElement(); const int syntaxVersion = docelem.attribute( "syntaxVersion" ).toInt(); if ( syntaxVersion < 2 ) { @@ -2221,7 +2221,7 @@ bool KPrDocument::loadXML( QIODevice * dev, const QDomDocument& doc ) // Launch the perl script on it KTempFile tmpFileOut; tmpFileOut.setAutoDelete( true ); - QString cmd = KGlobal::dirs()->findExe("perl"); + TQString cmd = KGlobal::dirs()->findExe("perl"); if (cmd.isEmpty()) { setErrorMessage( i18n("You don't appear to have PERL installed.\nIt is needed to convert this document.\nPlease install PERL and try again.")); @@ -2233,20 +2233,20 @@ bool KPrDocument::loadXML( QIODevice * dev, const QDomDocument& doc ) cmd += KProcess::quote( tmpFileIn.name() ); cmd += " "; cmd += KProcess::quote( tmpFileOut.name() ); - system( QFile::encodeName(cmd) ); + system( TQFile::encodeName(cmd) ); - // Build a new QDomDocument from the result - QString errorMsg; + // Build a new TQDomDocument from the result + TQString errorMsg; int errorLine; int errorColumn; - QDomDocument newdoc; + TQDomDocument newdoc; if ( ! newdoc.setContent( tmpFileOut.file(), &errorMsg, &errorLine, &errorColumn ) ) { kdError (33001) << "Parsing Error! Aborting! (in KPrDocument::loadXML)" << endl << " Line: " << errorLine << " Column: " << errorColumn << endl << " Message: " << errorMsg << endl; setErrorMessage( i18n( "parsing error in the main document (converted from an old KPresenter format) at line %1, column %2\nError message: %3" ) - .arg( errorLine ).arg( errorColumn ).arg( i18n ( errorMsg.utf8() ) ) ); + .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( errorMsg.utf8() ) ) ); return false; } b = loadXML( newdoc ); @@ -2280,26 +2280,26 @@ void KPrDocument::createHeaderFooter() m_masterPage->appendObject(_footer); } -void KPrDocument::insertEmbedded( KoStore *store, QDomElement topElem, KMacroCommand * macroCmd, KPrPage *page, int pos ) +void KPrDocument::insertEmbedded( KoStore *store, TQDomElement topElem, KMacroCommand * macroCmd, KPrPage *page, int pos ) { - QDomElement elem = topElem.firstChild().toElement(); + TQDomElement elem = topElem.firstChild().toElement(); for ( ; !elem.isNull() ; elem = elem.nextSibling().toElement() ) { kdDebug(33001) << "Element name: " << elem.tagName() << endl; if(elem.tagName()=="EMBEDDED") { KPrChild *ch = new KPrChild( this ); KPrPartObject *kppartobject = 0L; - QRect r; + TQRect r; - QDomElement object=elem.namedItem("OBJECT").toElement(); + TQDomElement object=elem.namedItem("OBJECT").toElement(); if(!object.isNull()) { ch->load(object, true); // true == uppercase - r = ch->geometry(); + r = ch->tqgeometry(); ch->loadDocument( store ); insertChild( ch ); kppartobject = new KPrPartObject( ch ); } - QDomElement settings=elem.namedItem("SETTINGS").toElement(); + TQDomElement settings=elem.namedItem("SETTINGS").toElement(); int zIndex = 0; if ( settings.hasAttribute( "z-index" ) ) { @@ -2314,7 +2314,7 @@ void KPrDocument::insertEmbedded( KoStore *store, QDomElement topElem, KMacroCom kppartobject = 0L; return; } - int index = m_pageList.findRef(page); + int index = m_pageList.tqfindRef(page); int pageIndex = (int)(offset/__pgLayout.ptHeight)+index; int newPos=(int)((offset+index*__pgLayout.ptHeight)-pageIndex*__pgLayout.ptHeight); kppartobject->setOrig(kppartobject->getOrig().x(),newPos); @@ -2326,7 +2326,7 @@ void KPrDocument::insertEmbedded( KoStore *store, QDomElement topElem, KMacroCom macroCmd->addCommand( insertCmd ); if ( pos != 0 ) { - const QPtrList<KPrObject>& oldList( page->objectList() ); + const TQPtrList<KPrObject>& oldList( page->objectList() ); // tz TODO this is not 100% correct if ( static_cast<int>( oldList.count() ) > pos + zIndex ) { @@ -2342,7 +2342,7 @@ void KPrDocument::insertEmbedded( KoStore *store, QDomElement topElem, KMacroCom } } -bool KPrDocument::loadXML( const QDomDocument &doc ) +bool KPrDocument::loadXML( const TQDomDocument &doc ) { emit sigProgress( 0 ); int activePage=0; @@ -2364,7 +2364,7 @@ bool KPrDocument::loadXML( const QDomDocument &doc ) m_spellCheckIgnoreList.clear(); emit sigProgress( 5 ); - QDomElement document=doc.documentElement(); + TQDomElement document=doc.documentElement(); // DOC if(document.tagName()!="DOC") { kdWarning(33001) << "Missing DOC" << endl; @@ -2376,7 +2376,7 @@ bool KPrDocument::loadXML( const QDomDocument &doc ) document.attribute("mime")!="application/x-kpresenter" && document.attribute("mime")!="application/vnd.kde.kpresenter" ) ) { kdError(33001) << "Unknown mime type " << document.attribute("mime") << endl; - setErrorMessage( i18n("Invalid document, expected mimetype application/x-kpresenter or application/vnd.kde.kpresenter, got %1").arg(document.attribute("mime")) ); + setErrorMessage( i18n("Invalid document, expected mimetype application/x-kpresenter or application/vnd.kde.kpresenter, got %1").tqarg(document.attribute("mime")) ); return false; } if(document.hasAttribute("url")) @@ -2384,7 +2384,7 @@ bool KPrDocument::loadXML( const QDomDocument &doc ) emit sigProgress( 10 ); - QDomElement elem=document.firstChild().toElement(); + TQDomElement elem=document.firstChild().toElement(); uint childTotalCount=document.childNodes().count(); uint childCount = 0; @@ -2396,17 +2396,17 @@ bool KPrDocument::loadXML( const QDomDocument &doc ) if(elem.tagName()=="EMBEDDED") { KPrChild *ch = new KPrChild( this ); KPrPartObject *kppartobject = 0L; - QRect r; + TQRect r; - QDomElement object=elem.namedItem("OBJECT").toElement(); + TQDomElement object=elem.namedItem("OBJECT").toElement(); if(!object.isNull()) { ch->load(object, true); // true == uppercase - r = ch->geometry(); + r = ch->tqgeometry(); insertChild( ch ); kppartobject = new KPrPartObject( ch ); //emit sig_insertObject( ch, kppartobject ); } - QDomElement settings=elem.namedItem("SETTINGS").toElement(); + TQDomElement settings=elem.namedItem("SETTINGS").toElement(); int tmp=0; int pos = -1; if ( settings.hasAttribute( "z-index" ) ) @@ -2479,7 +2479,7 @@ bool KPrDocument::loadXML( const QDomDocument &doc ) if(elem.hasAttribute("height")) __pgLayout.ptHeight = MM_TO_POINT( elem.attribute("height").toDouble() ); - QDomElement borders=elem.namedItem("PAPERBORDERS").toElement(); + TQDomElement borders=elem.namedItem("PAPERBORDERS").toElement(); if(!borders.isNull()) { if(borders.hasAttribute("left")) __pgLayout.ptLeft = MM_TO_POINT( borders.attribute("left").toDouble() ); @@ -2514,7 +2514,7 @@ bool KPrDocument::loadXML( const QDomDocument &doc ) else if(borders.hasAttribute("mmBottom")) //compatibility __pgLayout.ptBottom = MM_TO_POINT( borders.attribute("inchBottom").toDouble() ); } - // PAPER found and parsed -> apply page layout + // PAPER found and parsed -> apply page tqlayout // e.g. the text objects need it if ( _clean ) setPageLayout( __pgLayout ); @@ -2565,7 +2565,7 @@ bool KPrDocument::loadXML( const QDomDocument &doc ) loadGuideLines( elem ); } }else if( elem.tagName()=="SPELLCHECKIGNORELIST"){ - QDomElement spellWord=elem.toElement(); + TQDomElement spellWord=elem.toElement(); spellWord=spellWord.firstChild().toElement(); while ( !spellWord.isNull() ) { @@ -2630,21 +2630,21 @@ bool KPrDocument::loadXML( const QDomDocument &doc ) m_presentationName=elem.attribute( "name" ); } else if ( elem.tagName()=="CUSTOMSLIDESHOWCONFIG" ) { if ( _clean ) { - QMap<QString, KPrPage *> name2page; + TQMap<TQString, KPrPage *> name2page; int pos = 1; - for ( QPtrListIterator<KPrPage> it( m_pageList ); it.current(); ++it ) + for ( TQPtrListIterator<KPrPage> it( m_pageList ); it.current(); ++it ) { - name2page.insert( "page" + QString::number( pos++ ), it.current() ) ; + name2page.insert( "page" + TQString::number( pos++ ), it.current() ) ; } - QDomElement slide=elem.firstChild().toElement(); + TQDomElement slide=elem.firstChild().toElement(); while(!slide.isNull()) { if(slide.tagName()=="CUSTOMSLIDESHOW") { - QStringList tmp = QStringList::split( ",", slide.attribute( "pages" ) ); - QValueList<KPrPage *> pageList; - for ( QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) + TQStringList tmp = TQStringList::split( ",", slide.attribute( "pages" ) ); + TQValueList<KPrPage *> pageList; + for ( TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) { - if ( name2page.contains( *it ) ) + if ( name2page.tqcontains( *it ) ) { kdDebug(33001) << "slide show " << slide.attribute( "name" ) << " page = " << *it << endl; pageList.push_back( name2page[*it] ); @@ -2660,7 +2660,7 @@ bool KPrDocument::loadXML( const QDomDocument &doc ) } } else if(elem.tagName()=="SELSLIDES") { if( _clean ) { // Skip this when loading a single page - QDomElement slide=elem.firstChild().toElement(); + TQDomElement slide=elem.firstChild().toElement(); while(!slide.isNull()) { if(slide.tagName()=="SLIDE") { int nr = -1; @@ -2702,37 +2702,37 @@ bool KPrDocument::loadXML( const QDomDocument &doc ) return true; } -void KPrDocument::loadTextStyle( const QDomElement& domElement ) +void KPrDocument::loadTextStyle( const TQDomElement& domElement ) { - QDomElement style = domElement.namedItem( "STYLES" ).toElement(); + TQDomElement style = domElement.namedItem( "STYLES" ).toElement(); if ( _clean && ! style.isNull() ) loadStyleTemplates( style ); } -void KPrDocument::loadPictureMap ( const QDomElement& domElement ) +void KPrDocument::loadPictureMap ( const TQDomElement& domElement ) { m_pictureMap.clear(); // <PICTURES> - QDomElement picturesElem = domElement.namedItem( "PICTURES" ).toElement(); + TQDomElement picturesElem = domElement.namedItem( "PICTURES" ).toElement(); if ( !picturesElem.isNull() ) m_pictureCollection.readXML( picturesElem, m_pictureMap ); // <PIXMAPS> - QDomElement pixmapsElem = domElement.namedItem( "PIXMAPS" ).toElement(); + TQDomElement pixmapsElem = domElement.namedItem( "PIXMAPS" ).toElement(); if ( !pixmapsElem.isNull() ) m_pictureCollection.readXML( pixmapsElem, m_pictureMap ); // <CLIPARTS> - QDomElement clipartsElem = domElement.namedItem( "CLIPARTS" ).toElement(); + TQDomElement clipartsElem = domElement.namedItem( "CLIPARTS" ).toElement(); if ( !clipartsElem.isNull() ) m_pictureCollection.readXML( pixmapsElem, m_pictureMap ); } -void KPrDocument::loadBackground( const QDomElement &element ) +void KPrDocument::loadBackground( const TQDomElement &element ) { kdDebug(33001) << "KPrDocument::loadBackground" << endl; - QDomElement page=element.firstChild().toElement(); + TQDomElement page=element.firstChild().toElement(); int i=m_insertFilePage; while(!page.isNull()) { if(m_pageWhereLoadObject) @@ -2761,11 +2761,11 @@ void KPrDocument::loadBackground( const QDomElement &element ) } } -KCommand *KPrDocument::loadObjects( const QDomElement &element, bool paste ) +KCommand *KPrDocument::loadObjects( const TQDomElement &element, bool paste ) { ObjType t = OT_LINE; - QDomElement obj=element.firstChild().toElement(); - QValueList<KPrObject *> pasteObjects; + TQDomElement obj=element.firstChild().toElement(); + TQValueList<KPrObject *> pasteObjects; while(!obj.isNull()) { if(obj.tagName()=="OBJECT" ) { bool sticky=false; @@ -2963,7 +2963,7 @@ KCommand *KPrDocument::loadObjects( const QDomElement &element, bool paste ) else insertObjectInPage(offset, kppolylineobject); } break; - case OT_QUADRICBEZIERCURVE: { + case OT_TQUADRICBEZIERCURVE: { KPrQuadricBezierCurveObject *kpQuadricBezierCurveObject = new KPrQuadricBezierCurveObject(); offset=kpQuadricBezierCurveObject->load(obj); if ( sticky && !ignoreSticky) @@ -3078,9 +3078,9 @@ KCommand *KPrDocument::loadObjects( const QDomElement &element, bool paste ) return insertCmd; } -void KPrDocument::loadTitle( const QDomElement &element ) +void KPrDocument::loadTitle( const TQDomElement &element ) { - QDomElement title=element.firstChild().toElement(); + TQDomElement title=element.firstChild().toElement(); int i=m_insertFilePage; while ( !title.isNull() ) { if ( title.tagName()=="Title" ) @@ -3101,9 +3101,9 @@ void KPrDocument::loadTitle( const QDomElement &element ) } } -void KPrDocument::loadNote( const QDomElement &element ) +void KPrDocument::loadNote( const TQDomElement &element ) { - QDomElement note=element.firstChild().toElement(); + TQDomElement note=element.firstChild().toElement(); int i=m_insertFilePage; while ( !note.isNull() ) { if ( note.tagName()=="Note" ) @@ -3124,20 +3124,20 @@ void KPrDocument::loadNote( const QDomElement &element ) } } -void KPrDocument::loadUsedSoundFileFromXML( const QDomElement &element ) +void KPrDocument::loadUsedSoundFileFromXML( const TQDomElement &element ) { - usedSoundFile = QStringList(); - haveNotOwnDiskSoundFile = QStringList(); - QDomElement fileElement = element.firstChild().toElement(); + usedSoundFile = TQStringList(); + haveNotOwnDiskSoundFile = TQStringList(); + TQDomElement fileElement = element.firstChild().toElement(); while ( !fileElement.isNull() ) { if ( fileElement.tagName() == "FILE" ) { - QString fileName; + TQString fileName; if ( fileElement.hasAttribute( "name" ) ) fileName = fileElement.attribute( "name" ); if ( fileElement.hasAttribute( "filename" ) ) { - QString name = fileElement.attribute( "filename" ); - QFile _file( name ); + TQString name = fileElement.attribute( "filename" ); + TQFile _file( name ); if ( _file.open( IO_ReadOnly ) ) { fileName = name; _file.close(); @@ -3183,7 +3183,7 @@ bool KPrDocument::completeLoading( KoStore* _store ) if ( saveOnlyPage == -1 ) { // ### following call independant of saveOnlyPage's value? m_masterPage->completeLoading( _clean, lastObj ); - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) it.current()->completeLoading( _clean, lastObj ); } @@ -3203,7 +3203,7 @@ bool KPrDocument::completeLoading( KoStore* _store ) recalcVariables( VT_FIELD ); emit sigProgress( -1 ); - connect( documentInfo(), SIGNAL( sigDocumentInfoModifed()),this,SLOT(slotDocumentInfoModifed() ) ); + connect( documentInfo(), TQT_SIGNAL( sigDocumentInfoModifed()),this,TQT_SLOT(slotDocumentInfoModifed() ) ); //desactivate bgspellchecking //attributes isReadWrite is not placed at the beginning ! if ( !isReadWrite()) @@ -3211,12 +3211,12 @@ bool KPrDocument::completeLoading( KoStore* _store ) return true; } -void KPrDocument::loadUsedSoundFileFromStore( KoStore *_store, QStringList _list ) +void KPrDocument::loadUsedSoundFileFromStore( KoStore *_store, TQStringList _list ) { int i = m_insertFilePage; - QStringList::Iterator it = _list.begin(); + TQStringList::Iterator it = _list.begin(); for ( ; it != _list.end(); ++it ) { - QString soundFile = *it; + TQString soundFile = *it; if ( _store->open( soundFile ) ) { kdDebug( 33001 ) << "Not found file on disk. Use this( " << soundFile << " ) file." << endl; @@ -3225,26 +3225,26 @@ void KPrDocument::loadUsedSoundFileFromStore( KoStore *_store, QStringList _list char *data = new char[size]; dev.readBlock( data, size ); - int position = soundFile.findRev( '.' ); - QString format = soundFile.right( soundFile.length() - position ); - KTempFile *tmpFile = new KTempFile( QString::null, format ); + int position = soundFile.tqfindRev( '.' ); + TQString format = soundFile.right( soundFile.length() - position ); + KTempFile *tmpFile = new KTempFile( TQString(), format ); tmpFile->setAutoDelete( true ); tmpFile->file()->writeBlock( data, size ); tmpFile->close(); - QString tmpFileName = tmpFile->name(); + TQString tmpFileName = tmpFile->name(); tmpSoundFileList.append( tmpFile ); - QString _fileName = *haveNotOwnDiskSoundFile.at( i ); + TQString _fileName = *haveNotOwnDiskSoundFile.at( i ); ++i; - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) { - QString _file = it.current()->getPageSoundFileName(); + TQString _file = it.current()->getPageSoundFileName(); if ( !_file.isEmpty() && _file == _fileName ) it.current()->setPageSoundFileName( tmpFileName ); - QPtrListIterator<KPrObject> oIt( it.current()->objectList() ); + TQPtrListIterator<KPrObject> oIt( it.current()->objectList() ); for ( ; oIt.current(); ++oIt ) { _file = oIt.current()->getAppearSoundEffectFileName(); if ( !_file.isEmpty() && _file == _fileName ) @@ -3275,34 +3275,34 @@ void KPrDocument::setPageLayout( const KoPageLayout &pgLayout ) //for ( int i = 0; i < static_cast<int>( m_pageList.count() ); i++ ) // m_pageList.at( i )->updateBackgroundSize(); - repaint( false ); - layout(); + tqrepaint( false ); + tqlayout(); // don't setModified(true) here, since this is called on startup } -//when we change pagelayout we must re-position header/footer +//when we change pagetqlayout we must re-position header/footer void KPrDocument::updateHeaderFooterPosition( ) { KoRect pageRect=m_masterPage->getPageRect(); - QRect oldBoundingRect = zoomHandler()->zoomRect( _header->getRepaintRect() ); + TQRect oldBoundingRect = zoomHandler()->zoomRect( _header->getRepaintRect() ); _header->setOrig(pageRect.topLeft ()); _header->setSize(pageRect.width(),_header->getSize().height()); - repaint( oldBoundingRect ); - repaint(_header); + tqrepaint( oldBoundingRect ); + tqrepaint(_header); oldBoundingRect = zoomHandler()->zoomRect( _footer->getRepaintRect() ); _footer->setOrig(pageRect.left(),pageRect.bottom()-_footer->getSize().height()); _footer->setSize(pageRect.width(),_footer->getSize().height()); - repaint(oldBoundingRect); - repaint(_footer); + tqrepaint(oldBoundingRect); + tqrepaint(_footer); } -bool KPrDocument::initDoc(InitDocFlags flags, QWidget* parentWidget) +bool KPrDocument::initDoc(InitDocFlags flags, TQWidget* tqparentWidget) { if (flags==KoDocument::InitDocEmpty) { - QString fileName( locate("kpresenter_template", "Screenpresentations/.source/Plain.kpt", + TQString fileName( locate("kpresenter_template", "Screenpresentations/.source/Plain.kpt", KPrFactory::global() ) ); objStartY = 0; _clean = true; @@ -3314,7 +3314,7 @@ bool KPrDocument::initDoc(InitDocFlags flags, QWidget* parentWidget) return ok; } - QString file; + TQString file; KoTemplateChooseDia::ReturnType ret; KoTemplateChooseDia::DialogType dlgtype; if (flags != InitDocFileNew) @@ -3323,7 +3323,7 @@ bool KPrDocument::initDoc(InitDocFlags flags, QWidget* parentWidget) dlgtype = KoTemplateChooseDia::OnlyTemplates; ret = KoTemplateChooseDia::choose( KPrFactory::global(), file, - dlgtype, "kpresenter_template", parentWidget ); + dlgtype, "kpresenter_template", tqparentWidget ); if ( ret == KoTemplateChooseDia::Template ) { _clean = true; //was a parameter called "clean", but unused bool ok = loadNativeFormat( file ); @@ -3341,7 +3341,7 @@ bool KPrDocument::initDoc(InitDocFlags flags, QWidget* parentWidget) bool ok = openURL( url ); return ok; } else if ( ret == KoTemplateChooseDia::Empty ) { - QString fileName( locate("kpresenter_template", "Screenpresentations/.source/Plain.kpt", + TQString fileName( locate("kpresenter_template", "Screenpresentations/.source/Plain.kpt", KPrFactory::global() ) ); objStartY = 0; _clean = true; @@ -3355,14 +3355,14 @@ bool KPrDocument::initDoc(InitDocFlags flags, QWidget* parentWidget) return false; } -void KPrDocument::openExistingFile( const QString& file ) +void KPrDocument::openExistingFile( const TQString& file ) { objStartY = 0; _clean = true; KoDocument::openExistingFile( file ); } -void KPrDocument::openTemplate( const QString& file ) +void KPrDocument::openTemplate( const TQString& file ) { KoDocument::openTemplate( file ); objStartY = 0; @@ -3371,7 +3371,7 @@ void KPrDocument::openTemplate( const QString& file ) void KPrDocument::initEmpty() { - QString fileName( locate("kpresenter_template", "Screenpresentations/.source/Plain.kpt", + TQString fileName( locate("kpresenter_template", "Screenpresentations/.source/Plain.kpt", KPrFactory::global() ) ); objStartY = 0; _clean = true; @@ -3386,70 +3386,70 @@ void KPrDocument::setEmpty() { KoDocument::setEmpty(); // Whether loaded from template or from empty doc: this is a new one -> set creation date - m_varColl->variableSetting()->setCreationDate(QDateTime::currentDateTime()); + m_varColl->variableSetting()->setCreationDate(TQDateTime::tqcurrentDateTime()); recalcVariables( VT_DATE ); // , VST_CREATION_DATE ... // If we then load a document, it will override that date. } -void KPrDocument::setGridValue( double _x, double _y, bool _replace ) +void KPrDocument::setGridValue( double _x, double _y, bool _tqreplace ) { oldGridX = m_gridX; oldGridY = m_gridY; m_gridX=_x; m_gridY=_y; - if ( _replace ) + if ( _tqreplace ) replaceObjs(); } -void KPrDocument::repaint( bool erase ) +void KPrDocument::tqrepaint( bool erase ) { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for( ; it.current(); ++it ) { KPrCanvas* canvas = ((KPrView*)it.current())->getCanvas(); - canvas->repaint( erase ); + canvas->tqrepaint( erase ); } } -void KPrDocument::repaint( const QRect& rect ) +void KPrDocument::tqrepaint( const TQRect& rect ) { - QRect r; - QPtrListIterator<KoView> it( views() ); + TQRect r; + TQPtrListIterator<KoView> it( views() ); for( ; it.current(); ++it ) { r = rect; KPrCanvas* canvas = ((KPrView*)it.current())->getCanvas(); - r.moveTopLeft( QPoint( r.x() - canvas->diffx(), + r.moveTopLeft( TQPoint( r.x() - canvas->diffx(), r.y() - canvas->diffy() ) ); canvas->update( r ); } } -void KPrDocument::layout(KPrObject *kpobject) +void KPrDocument::tqlayout(KPrObject *kpobject) { KPrTextObject * obj = dynamic_cast<KPrTextObject *>( kpobject ); if (obj) - obj->layout(); + obj->tqlayout(); } -void KPrDocument::layout() +void KPrDocument::tqlayout() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for( ; it.current(); ++it ) { KPrCanvas* canvas = ((KPrView*)it.current())->getCanvas(); - canvas->layout(); + canvas->tqlayout(); } } -void KPrDocument::repaint( KPrObject *kpobject ) +void KPrDocument::tqrepaint( KPrObject *kpobject ) { - repaint( m_zoomHandler->zoomRect( kpobject->getRepaintRect() ) ); + tqrepaint( m_zoomHandler->zoomRect( kpobject->getRepaintRect() ) ); } -QValueList<int> KPrDocument::getPageEffectSteps( unsigned int num ) +TQValueList<int> KPrDocument::getPageEffectSteps( unsigned int num ) { return m_pageList.at(num)->getEffectSteps(); } -QRect KPrDocument::getPageRect( bool decBorders ) const +TQRect KPrDocument::getPageRect( bool decBorders ) const { int pw, ph, bl = static_cast<int>(m_pageLayout.ptLeft); int br = static_cast<int>(m_pageLayout.ptRight); @@ -3468,7 +3468,7 @@ QRect KPrDocument::getPageRect( bool decBorders ) const pw = wid - ( bl + br ); ph = hei - ( bt + bb ); - return QRect( bl, bt, pw, ph ); + return TQRect( bl, bt, pw, ph ); } int KPrDocument::getLeftBorder() const @@ -3505,7 +3505,7 @@ void KPrDocument::deletePage( int _page ) void KPrDocument::insertPage( KPrPage *page, int currentPageNum, int insertPageNum ) { // check if page was allready deleted - int pos = m_deletedPageList.findRef( page ); + int pos = m_deletedPageList.tqfindRef( page ); if ( pos != -1 ) m_deletedPageList.take( pos ); @@ -3513,7 +3513,7 @@ void KPrDocument::insertPage( KPrPage *page, int currentPageNum, int insertPageN pageOrderChanged(); //activate this page in all views which on slide currentPageNum - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) { KPrView *view = static_cast<KPrView*>( it.current() ); @@ -3533,13 +3533,13 @@ void KPrDocument::insertPage( KPrPage *page, int currentPageNum, int insertPageN void KPrDocument::takePage( KPrPage *page, int pageNum ) { - int pos = m_pageList.findRef( page ); + int pos = m_pageList.tqfindRef( page ); m_pageList.take( pos ); m_deletedPageList.append( page ); pageOrderChanged(); - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) { KPrView *view = static_cast<KPrView*>( it.current() ); @@ -3556,7 +3556,7 @@ void KPrDocument::takePage( KPrPage *page, int pageNum ) } } - repaint( false ); + tqrepaint( false ); } void KPrDocument::pageOrderChanged() @@ -3578,7 +3578,7 @@ void KPrDocument::movePageTo( int oldPos, int newPos ) pageOrderChanged(); // Update the sidebars - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) { KPrView *view = static_cast<KPrView*>( it.current() ); @@ -3596,23 +3596,23 @@ void KPrDocument::movePageTo( int oldPos, int newPos ) } } -QString KPrDocument::templateFileName( bool chooseTemplate, const QString &theFile ) +TQString KPrDocument::templateFileName( bool chooseTemplate, const TQString &theFile ) { - QString fileName; + TQString fileName; if ( !chooseTemplate ) { if ( theFile.isEmpty() ) fileName = locateLocal( "appdata", "default.kpr" ); else fileName = theFile; } else { - // TODO: pass parentWidget as parameter to this method - QWidget* parentWidget = 0; - QString _template; + // TODO: pass tqparentWidget as parameter to this method + TQWidget* tqparentWidget = 0; + TQString _template; if ( KoTemplateChooseDia::choose( KPrFactory::global(), _template, KoTemplateChooseDia::OnlyTemplates, - "kpresenter_template", parentWidget ) == KoTemplateChooseDia::Cancel ) - return QString::null; - QFileInfo fileInfo( _template ); + "kpresenter_template", tqparentWidget ) == KoTemplateChooseDia::Cancel ) + return TQString(); + TQFileInfo fileInfo( _template ); fileName = fileInfo.dirPath( true ) + "/" + fileInfo.baseName() + ".kpt"; KURL src, dest; @@ -3629,12 +3629,12 @@ QString KPrDocument::templateFileName( bool chooseTemplate, const QString &theFi return fileName; } -int KPrDocument::insertNewPage( const QString &cmdName, int _page, InsertPos _insPos, - bool chooseTemplate, const QString &theFile ) +int KPrDocument::insertNewPage( const TQString &cmdName, int _page, InsertPos _insPos, + bool chooseTemplate, const TQString &theFile ) { kdDebug(33001) << "KPrDocument::insertNewPage " << _page << endl; - QString fileName=templateFileName(chooseTemplate, theFile); + TQString fileName=templateFileName(chooseTemplate, theFile); if(fileName.isEmpty()) return -1; @@ -3646,7 +3646,7 @@ int KPrDocument::insertNewPage( const QString &cmdName, int _page, InsertPos _in KPrPage *newpage = new KPrPage( this, m_masterPage ); m_pageWhereLoadObject=newpage; - m_childCountBeforeInsert = children().count(); + m_childCountBeforeInsert = tqchildren().count(); bool ok = loadNativeFormat( fileName ); if ( !ok ) @@ -3664,7 +3664,7 @@ int KPrDocument::insertNewPage( const QString &cmdName, int _page, InsertPos _in return _page; } -void KPrDocument::savePage( const QString &file, int pgnum, bool ignore ) +void KPrDocument::savePage( const TQString &file, int pgnum, bool ignore ) { saveOnlyPage = pgnum; _duplicatePage=ignore; @@ -3676,7 +3676,7 @@ void KPrDocument::savePage( const QString &file, int pgnum, bool ignore ) void KPrDocument::replaceObjs( bool createUndoRedo ) { KMacroCommand * macroCmd = 0L; - QPtrListIterator<KPrPage> oIt(m_pageList); + TQPtrListIterator<KPrPage> oIt(m_pageList); for (; oIt.current(); ++oIt ) { KCommand *cmd=oIt.current()->replaceObjs( createUndoRedo, oldGridX,oldGridY,_txtBackCol, _otxtBackCol); @@ -3702,12 +3702,12 @@ void KPrDocument::restoreBackground( KPrPage *page ) page->background()->reload(); } -KCommand * KPrDocument::loadPastedObjs( const QString &in, KPrPage* _page ) +KCommand * KPrDocument::loadPastedObjs( const TQString &in, KPrPage* _page ) { - QDomDocument doc; + TQDomDocument doc; doc.setContent( in ); - QDomElement document=doc.documentElement(); + TQDomElement document=doc.documentElement(); // DOC if (document.tagName()!="DOC") { @@ -3726,39 +3726,39 @@ KCommand * KPrDocument::loadPastedObjs( const QString &in, KPrPage* _page ) KCommand *cmd = loadObjects(document,true); m_pageWhereLoadObject=0L; - repaint( false ); + tqrepaint( false ); setModified( true ); return cmd; } void KPrDocument::deSelectAllObj() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->getCanvas()->deSelectAllObj(); } void KPrDocument::deSelectObj(KPrObject *obj) { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->getCanvas()->deSelectObj( obj ); } void KPrDocument::setDisplayObjectMasterPage( bool b ) { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->updateDisplayObjectMasterPageButton(); - repaint(b); + tqrepaint(b); } void KPrDocument::setDisplayBackground( bool b ) { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->updateDisplayBackgroundButton(); - repaint(b); + tqrepaint(b); } void KPrDocument::setHeader( bool b ) @@ -3772,7 +3772,7 @@ void KPrDocument::setHeader( bool b ) } m_masterPage->setHeader( b, false ); updateHeaderFooterButton(); - repaint(b); + tqrepaint(b); } void KPrDocument::setFooter( bool b ) @@ -3786,12 +3786,12 @@ void KPrDocument::setFooter( bool b ) } m_masterPage->setFooter( b, false ); updateHeaderFooterButton(); - repaint(b); + tqrepaint(b); } void KPrDocument::updateHeaderFooterButton() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->updateHeaderFooterButton(); } @@ -3818,42 +3818,42 @@ void KPrDocument::makeUsedSoundFileList() usedSoundFile.clear(); - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) { - QString _file = it.current()->getPageSoundFileName(); - if ( !_file.isEmpty() && usedSoundFile.findIndex( _file ) == -1 ) + TQString _file = it.current()->getPageSoundFileName(); + if ( !_file.isEmpty() && usedSoundFile.tqfindIndex( _file ) == -1 ) usedSoundFile.append( _file ); - QPtrListIterator<KPrObject> oIt( it.current()->objectList() ); + TQPtrListIterator<KPrObject> oIt( it.current()->objectList() ); for ( ; oIt.current(); ++oIt ) { _file = oIt.current()->getAppearSoundEffectFileName(); - if ( !_file.isEmpty() && usedSoundFile.findIndex( _file ) == -1 ) + if ( !_file.isEmpty() && usedSoundFile.tqfindIndex( _file ) == -1 ) usedSoundFile.append( _file ); _file = oIt.current()->getDisappearSoundEffectFileName(); - if ( !_file.isEmpty() && usedSoundFile.findIndex( _file ) == -1 ) + if ( !_file.isEmpty() && usedSoundFile.tqfindIndex( _file ) == -1 ) usedSoundFile.append( _file ); } } } -KoView* KPrDocument::createViewInstance( QWidget* parent, const char* name ) +KoView* KPrDocument::createViewInstance( TQWidget* tqparent, const char* name ) { //the page numbers have to be recalced for the sticky objects //as it could not be done during the constructor of KPrView recalcPageNum(); - return new KPrView( this, parent, name ); + return new KPrView( this, tqparent, name ); } -void KPrDocument::paintContent( QPainter& painter, const QRect& rect, +void KPrDocument::paintContent( TQPainter& painter, const TQRect& rect, bool /*transparent*/, double zoomX, double zoomY ) { m_zoomHandler->setZoom( 100 ); if ( zoomHandler()->zoomedResolutionX() != zoomX || zoomHandler()->zoomedResolutionY() != zoomY ) { - int zoomLevel = qRound( 100 * zoomY / zoomHandler()->zoomedResolutionY() ); // ## ignores the case where the x and y scaling differs + int zoomLevel = tqRound( 100 * zoomY / zoomHandler()->zoomedResolutionY() ); // ## ignores the case where the x and y scaling differs zoomHandler()->setZoom( zoomLevel ); - bool forPrint = painter.device() && painter.device()->devType() == QInternal::Printer; + bool forPrint = painter.device() && painter.device()->devType() == TQInternal::Printer; newZoomAndResolution( false, forPrint ); } //for the moment draw first page. @@ -3861,7 +3861,7 @@ void KPrDocument::paintContent( QPainter& painter, const QRect& rect, if( m_initialActivePage ) page = m_initialActivePage; - int pageNum = m_pageList.findRef( page ); + int pageNum = m_pageList.tqfindRef( page ); if ( page->displayBackground() ) page->background()->drawBackground( &painter, zoomHandler(), rect, false ); @@ -3870,7 +3870,7 @@ void KPrDocument::paintContent( QPainter& painter, const QRect& rect, KPrPage *masterPage = page->masterPage(); if ( masterPage ) { - QPtrListIterator<KPrObject> it( masterPage->objectList() ); + TQPtrListIterator<KPrObject> it( masterPage->objectList() ); //draw objects on master slide for ( ; it.current() ; ++it ) { @@ -3880,18 +3880,18 @@ void KPrDocument::paintContent( QPainter& painter, const QRect& rect, } } } - QPtrListIterator<KPrObject> it( page->objectList() ); + TQPtrListIterator<KPrObject> it( page->objectList() ); for ( ; it.current() ; ++it ) it.current()->draw( &painter, zoomHandler(), pageNum, SM_NONE ); } -QPixmap KPrDocument::generatePreview( const QSize& size ) +TQPixmap KPrDocument::generatePreview( const TQSize& size ) { int oldZoom = zoomHandler()->zoom(); double oldResolutionX = zoomHandler()->resolutionX(); double oldResolutionY = zoomHandler()->resolutionY(); - QPixmap pix = KoDocument::generatePreview(size); + TQPixmap pix = KoDocument::generatePreview(size); zoomHandler()->setResolution( oldResolutionX, oldResolutionY ); zoomHandler()->setZoom(oldZoom); @@ -3902,7 +3902,7 @@ QPixmap KPrDocument::generatePreview( const QSize& size ) void KPrDocument::addShell( KoMainWindow *shell ) { - connect( shell, SIGNAL( documentSaved() ), m_commandHistory, SLOT( documentSaved() ) ); + connect( shell, TQT_SIGNAL( documentSaved() ), m_commandHistory, TQT_SLOT( documentSaved() ) ); KoDocument::addShell( shell ); } @@ -3917,14 +3917,14 @@ void KPrDocument::movePage( int from, int to ) void KPrDocument::copyPage( int from ) { _clean = false; - m_childCountBeforeInsert = children().count(); + m_childCountBeforeInsert = tqchildren().count(); _duplicatePage=true; // ### now also set via savePage() parameter below kdDebug(33001) << "KPrDocument::copyPage from=" << from << " to=" << from + 1 << endl; kdDebug(33001) << "mimeType = " << mimeType() << ", outputMimeType = " << outputMimeType() << endl; bool wasSelected = isSlideSelected( from ); - KTempFile tempFile( QString::null, mimeType() == nativeOasisMimeType() ? ".oop": ".kpr" ); + KTempFile tempFile( TQString(), mimeType() == nativeOasisMimeType() ? ".oop": ".kpr" ); tempFile.setAutoDelete( true ); savePage( tempFile.name(), from, true ); @@ -3958,16 +3958,16 @@ void KPrDocument::copyPageToClipboard( int pgnum ) // In fact it even allows copying a [1-page] kpr in konq and pasting it in kpresenter :)) kdDebug(33001) << "KPrDocument::copyPageToClipboard pgnum=" << pgnum << endl; kdDebug(33001) << "mimeType = " << mimeType() << ", outputMimeType = " << outputMimeType() << endl; - KTempFile tempFile( QString::null, mimeType() == nativeOasisMimeType() ? ".oop": ".kpr" ); + KTempFile tempFile( TQString(), mimeType() == nativeOasisMimeType() ? ".oop": ".kpr" ); savePage( tempFile.name(), pgnum, true ); KURL url; url.setPath( tempFile.name() ); KURL::List lst; lst.append( url ); - QApplication::clipboard()->setData( new KURLDrag( lst ) ); + TQApplication::tqclipboard()->setData( new KURLDrag( lst ) ); m_tempFileInClipboard = tempFile.name(); // do this last, the above calls clipboardDataChanged } -void KPrDocument::pastePage( const QMimeSource * data, int pgnum ) +void KPrDocument::pastePage( const TQMimeSource * data, int pgnum ) { KURL::List lst; if ( KURLDrag::decode( data, lst ) && !lst.isEmpty() ) @@ -3982,12 +3982,12 @@ void KPrDocument::clipboardDataChanged() if ( !m_tempFileInClipboard.isEmpty() ) { kdDebug(33001) << "KPrDocument::clipboardDataChanged, deleting temp file " << m_tempFileInClipboard << endl; - unlink( QFile::encodeName( m_tempFileInClipboard ) ); - m_tempFileInClipboard = QString::null; + unlink( TQFile::encodeName( m_tempFileInClipboard ) ); + m_tempFileInClipboard = TQString(); } // TODO enable paste as well, when a txtobject is activated // and there is plain text in the clipboard. Then enable this code. - //QMimeSource *data = QApplication::clipboard()->data(); + //TQMimeSource *data = TQApplication::tqclipboard()->data(); //bool canPaste = data->provides( "text/uri-list" ) || data->provides( "application/x-kpresenter-selection" ); // emit enablePaste( canPaste ); } @@ -4008,17 +4008,17 @@ void KPrDocument::selectPage( int pgNum /* 0-based */, bool select ) KPrPage * KPrDocument::findPage(KPrObject *object) { - QPtrList<KPrObject> masterObjects( m_masterPage->objectList() ); - if ( masterObjects.findRef( object ) != -1 ) + TQPtrList<KPrObject> masterObjects( m_masterPage->objectList() ); + if ( masterObjects.tqfindRef( object ) != -1 ) { //kdDebug(33001) << "Object is on the master page" << endl; return m_masterPage; } - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) { - QPtrList<KPrObject> list( it.current()->objectList() ); - if ( list.findRef( object ) != -1 ) { - //kdDebug(33001) << "Object is on page " << m_pageList.findRef(it.current()) + 1 << endl; + TQPtrList<KPrObject> list( it.current()->objectList() ); + if ( list.tqfindRef( object ) != -1 ) { + //kdDebug(33001) << "Object is on page " << m_pageList.tqfindRef(it.current()) + 1 << endl; return it.current(); } } @@ -4026,12 +4026,12 @@ KPrPage * KPrDocument::findPage(KPrObject *object) return 0L; } -KPrPage * KPrDocument::findPage(QPtrList<KPrObject> &objects) +KPrPage * KPrDocument::findPage(TQPtrList<KPrObject> &objects) { KPrObject *object; for ( object = objects.first(); object; object=objects.next() ) { - QPtrList<KPrObject> list( m_masterPage->objectList() ); - if ( list.findRef( object ) != -1 ) + TQPtrList<KPrObject> list( m_masterPage->objectList() ); + if ( list.tqfindRef( object ) != -1 ) { //kdDebug(33001) << "Object is on the master page" << endl; return m_masterPage; @@ -4039,9 +4039,9 @@ KPrPage * KPrDocument::findPage(QPtrList<KPrObject> &objects) } object = objects.first(); for ( KPrPage *page=m_pageList.first(); page; page=m_pageList.next() ) { - QPtrList<KPrObject> list( page->objectList() ); - if ( list.findRef( object ) != -1 ) { - //kdDebug(33001) << "The Objects are on page " << m_pageList.findRef(page) + 1 << endl; + TQPtrList<KPrObject> list( page->objectList() ); + if ( list.tqfindRef( object ) != -1 ) { + //kdDebug(33001) << "The Objects are on page " << m_pageList.tqfindRef(page) + 1 << endl; return page; } } @@ -4052,7 +4052,7 @@ KPrPage * KPrDocument::findPage(QPtrList<KPrObject> &objects) void KPrDocument::updateSideBarItem( KPrPage * page ) { // Update the views - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) static_cast<KPrView*>( it.current() )->updateSideBarItem( page ); } @@ -4063,14 +4063,14 @@ bool KPrDocument::isSlideSelected( int pgNum /* 0-based */ ) return m_pageList.at(pgNum)->isSlideSelected(); } -QValueList<int> KPrDocument::listOfDisplaySelectedSlides( const QValueList<KPrPage*> & lst) /* returned list is 0-based */ +TQValueList<int> KPrDocument::listOfDisplaySelectedSlides( const TQValueList<KPrPage*> & lst) /* returned list is 0-based */ { - QValueList<int> result; - QValueListConstIterator<KPrPage*> itPage; - QValueListConstIterator<KPrPage*> itPageEnd = lst.end(); + TQValueList<int> result; + TQValueListConstIterator<KPrPage*> itPage; + TQValueListConstIterator<KPrPage*> itPageEnd = lst.end(); for( itPage = lst.begin() ; itPage != itPageEnd; ++itPage ) { - int pageNum = m_pageList.find(*itPage ); + int pageNum = m_pageList.tqfind(*itPage ); if ( pageNum != -1 ) { kdDebug()<<" KPrDocument::displaySelectedSlide : add slide number :"<<pageNum<<endl; @@ -4081,9 +4081,9 @@ QValueList<int> KPrDocument::listOfDisplaySelectedSlides( const QValueList<KPrPa } -QValueList<int> KPrDocument::displaySelectedSlides() /* returned list is 0-based */ +TQValueList<int> KPrDocument::displaySelectedSlides() /* returned list is 0-based */ { - QValueList<int> result; + TQValueList<int> result; if ( m_customListTest ) return *m_customListTest; if ( m_presentationName.isEmpty() ) @@ -4096,9 +4096,9 @@ QValueList<int> KPrDocument::displaySelectedSlides() /* returned list is 0-base return result; } -QValueList<int> KPrDocument::selectedSlides() /* returned list is 0-based */ +TQValueList<int> KPrDocument::selectedSlides() /* returned list is 0-based */ { - QValueList<int> result; + TQValueList<int> result; for ( int i = 0; i < static_cast<int>( m_pageList.count() ); i++ ) { if(m_pageList.at(i)->isSlideSelected()) result <<i; @@ -4106,8 +4106,8 @@ QValueList<int> KPrDocument::selectedSlides() /* returned list is 0-based */ return result; } -QString KPrDocument::selectedForPrinting() { - QString ret; +TQString KPrDocument::selectedForPrinting() { + TQString ret; int start=-1, end=-1; bool continuous=false; for ( int i = 0; i < static_cast<int>( m_pageList.count() ); i++ ) { @@ -4123,18 +4123,18 @@ QString KPrDocument::selectedForPrinting() { else { if(continuous) { if(start==end) - ret+=QString::number(start+1)+","; + ret+=TQString::number(start+1)+","; else - ret+=QString::number(start+1)+"-"+QString::number(end+1)+","; + ret+=TQString::number(start+1)+"-"+TQString::number(end+1)+","; continuous=false; } } } if(continuous) { if(start==end) - ret+=QString::number(start+1); + ret+=TQString::number(start+1); else - ret+=QString::number(start+1)+"-"+QString::number(end+1); + ret+=TQString::number(start+1)+"-"+TQString::number(end+1); } if(','==ret[ret.length()-1]) ret.truncate(ret.length()-1); @@ -4145,19 +4145,19 @@ void KPrDocument::slotRepaintChanged( KPrTextObject *kptextobj ) { //todo //use this function for the moment - repaint( kptextobj ); + tqrepaint( kptextobj ); } void KPrDocument::recalcVariables( int type ) { recalcPageNum(); - QValueList<KoVariable* > modifiedVariables = m_varColl->recalcVariables(type); + TQValueList<KoVariable* > modifiedVariables = m_varColl->recalcVariables(type); if ( modifiedVariables.isEmpty() ) return; - // TODO use the return value from recalcVariables to only repaint what has changed. - QPtrListIterator<KPrPage> it( m_pageList ); + // TODO use the return value from recalcVariables to only tqrepaint what has changed. + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) it.current()->slotRepaintVariable(); m_masterPage->slotRepaintVariable(); @@ -4166,7 +4166,7 @@ void KPrDocument::recalcVariables( int type ) void KPrDocument::slotGuideLinesChanged( KoView *view ) { ( (KPrView*)view )->getCanvas()->guideLines().getGuideLines( m_hGuideLines, m_vGuideLines ); - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) { if ( it.current() != view ) @@ -4184,7 +4184,7 @@ void KPrDocument::slotDocumentInfoModifed() void KPrDocument::reorganizeGUI() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->reorganize(); } @@ -4207,7 +4207,7 @@ void KPrDocument::updateRuler() void KPrDocument::recalcPageNum() { - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) it.current()->recalcPageNum(); m_masterPage->recalcPageNum(); @@ -4254,7 +4254,7 @@ void KPrDocument::insertObjectInPage(double offset, KPrObject *_obj, int pos) void KPrDocument::insertPixmapKey( KoPictureKey key ) { - if ( !usedPictures.contains( key ) ) + if ( !usedPictures.tqcontains( key ) ) usedPictures.append( key ); } @@ -4270,7 +4270,7 @@ void KPrDocument::displayActivePage(KPrPage * _page) void KPrDocument::updateZoomRuler() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) { ((KPrView*)it.current())->getHRuler()->setZoom( m_zoomHandler->zoomedResolutionX() ); @@ -4281,9 +4281,9 @@ void KPrDocument::updateZoomRuler() void KPrDocument::newZoomAndResolution( bool updateViews, bool /*forPrint*/ ) { - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) { - QPtrListIterator<KPrObject> oit(it.current()->objectList()); + TQPtrListIterator<KPrObject> oit(it.current()->objectList()); for ( ; oit.current(); ++oit ) { if ( oit.current()->getType() == OT_TEXT ) static_cast<KPrTextObject *>( oit.current() )->textDocument()->formatCollection()->zoomChanged(); @@ -4291,11 +4291,11 @@ void KPrDocument::newZoomAndResolution( bool updateViews, bool /*forPrint*/ ) } if ( updateViews ) { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) { static_cast<KPrView *>( it.current() )->getCanvas()->update(); - static_cast<KPrView *>( it.current() )->getCanvas()->layout(); + static_cast<KPrView *>( it.current() )->getCanvas()->tqlayout(); } } } @@ -4317,7 +4317,7 @@ bool KPrDocument::isHeaderFooter(const KPrObject *obj) const void KPrDocument::updateRulerPageLayout() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) { ((KPrView*)it.current())->getHRuler()->setPageLayout(m_pageLayout ); @@ -4326,10 +4326,10 @@ void KPrDocument::updateRulerPageLayout() } } -void KPrDocument::refreshAllNoteBarMasterPage(const QString &text, KPrView *exceptView) +void KPrDocument::refreshAllNoteBarMasterPage(const TQString &text, KPrView *exceptView) { m_masterPage->setNoteText(text ); - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) { KPrView* view=(KPrView*)it.current(); @@ -4338,10 +4338,10 @@ void KPrDocument::refreshAllNoteBarMasterPage(const QString &text, KPrView *exce } } -void KPrDocument::refreshAllNoteBar(int page, const QString &text, KPrView *exceptView) +void KPrDocument::refreshAllNoteBar(int page, const TQString &text, KPrView *exceptView) { m_pageList.at(page)->setNoteText(text ); - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) { KPrView* view=(KPrView*)it.current(); @@ -4350,11 +4350,11 @@ void KPrDocument::refreshAllNoteBar(int page, const QString &text, KPrView *exce } } -void KPrDocument::loadStyleTemplates( const QDomElement &stylesElem ) +void KPrDocument::loadStyleTemplates( const TQDomElement &stylesElem ) { - QValueList<QString> followingStyles; + TQValueList<TQString> followingStyles; - QDomNodeList listStyles = stylesElem.elementsByTagName( "STYLE" ); + TQDomNodeList listStyles = stylesElem.elementsByTagName( "STYLE" ); if( listStyles.count() > 0) { // we are going to import at least one style. KoParagStyle *s = m_styleColl->findStyle("Standard"); kdDebug(32001) << "KPrDocument::loadStyleTemplates looking for Standard, to delete it. Found " << s << endl; @@ -4362,13 +4362,13 @@ void KPrDocument::loadStyleTemplates( const QDomElement &stylesElem ) m_styleColl->removeStyle(s); } for (unsigned int item = 0; item < listStyles.count(); item++) { - QDomElement styleElem = listStyles.item( item ).toElement(); + TQDomElement styleElem = listStyles.item( item ).toElement(); - KoParagStyle *sty = new KoParagStyle( QString::null ); + KoParagStyle *sty = new KoParagStyle( TQString() ); // Load the style from the <STYLE> element sty->loadStyle( styleElem ); - QDomElement formatElem = styleElem.namedItem( "FORMAT" ).toElement(); + TQDomElement formatElem = styleElem.namedItem( "FORMAT" ).toElement(); if ( !formatElem.isNull() ) sty->format() = KPrTextObject::loadFormat( formatElem, 0L, defaultFont(), globalLanguage(), globalHyphenation() ); else @@ -4379,7 +4379,7 @@ void KPrDocument::loadStyleTemplates( const QDomElement &stylesElem ) kdDebug() << k_funcinfo << m_styleColl->styleList().count() << " styles, " << followingStyles.count() << " following styles" << endl; if(m_styleColl->styleList().count() > followingStyles.count() ) { - QString following = styleElem.namedItem("FOLLOWING").toElement().attribute("name"); + TQString following = styleElem.namedItem("FOLLOWING").toElement().attribute("name"); followingStyles.append( following ); } else @@ -4388,7 +4388,7 @@ void KPrDocument::loadStyleTemplates( const QDomElement &stylesElem ) Q_ASSERT( followingStyles.count() == m_styleColl->styleList().count() ); unsigned int i=0; - for( QValueList<QString>::Iterator it = followingStyles.begin(); it != followingStyles.end(); ++it ) { + for( TQValueList<TQString>::Iterator it = followingStyles.begin(); it != followingStyles.end(); ++it ) { KoParagStyle * style = m_styleColl->findStyle(*it); m_styleColl->styleAt( i++)->setFollowingStyle( style ); } @@ -4397,27 +4397,27 @@ void KPrDocument::loadStyleTemplates( const QDomElement &stylesElem ) void KPrDocument::updateAllStyleLists() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->updateStyleList(); } void KPrDocument::applyStyleChange( KoStyleChangeDefMap changed ) { - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) it.current()->applyStyleChange( changed ); m_masterPage->applyStyleChange( changed ); } -void KPrDocument::saveStyle( KoParagStyle *sty, QDomElement parentElem ) +void KPrDocument::saveStyle( KoParagStyle *sty, TQDomElement tqparentElem ) { - QDomDocument doc = parentElem.ownerDocument(); - QDomElement styleElem = doc.createElement( "STYLE" ); - parentElem.appendChild( styleElem ); + TQDomDocument doc = tqparentElem.ownerDocument(); + TQDomElement styleElem = doc.createElement( "STYLE" ); + tqparentElem.appendChild( styleElem ); sty->saveStyle( styleElem ); - QDomElement formatElem = doc.createElement("FORMAT"); + TQDomElement formatElem = doc.createElement("FORMAT"); KPrTextObject::saveFormat( formatElem, &sty->format() ); styleElem.appendChild( formatElem ); } @@ -4438,7 +4438,7 @@ void KPrDocument::enableBackgroundSpellCheck( bool b ) { //m_bgSpellCheck->enableBackgroundSpellCheck(b); m_bgSpellCheck->setEnabled(b); - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for( ; it.current(); ++it ) ((KPrView*)it.current())->updateBgSpellCheckingState(); } @@ -4450,7 +4450,7 @@ bool KPrDocument::backgroundSpellCheckEnabled() const void KPrDocument::reactivateBgSpellChecking(bool refreshTextObj) { - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrListIterator<KPrPage> it( m_pageList ); #if 0 if(m_kpresenterView && m_kpresenterView->getCanvas()) activePage=m_kpresenterView->getCanvas()->activePage(); @@ -4467,31 +4467,31 @@ void KPrDocument::reactivateBgSpellChecking(bool refreshTextObj) startBackgroundSpellCheck(); } -QPtrList<KoTextObject> KPrDocument::allTextObjects() const +TQPtrList<KoTextObject> KPrDocument::allTextObjects() const { - QPtrList<KoTextObject> lst; - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrList<KoTextObject> lst; + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) it.current()->addTextObjects( lst ); m_masterPage->addTextObjects( lst ); return lst; } -QValueList<KoTextDocument *> KPrDocument::allTextDocuments() const +TQValueList<KoTextDocument *> KPrDocument::allTextDocuments() const { - QValueList<KoTextDocument *> lst; - const QPtrList<KoTextObject> textObjects = allTextObjects(); - QPtrListIterator<KoTextObject> it( textObjects ); + TQValueList<KoTextDocument *> lst; + const TQPtrList<KoTextObject> textObjects = allTextObjects(); + TQPtrListIterator<KoTextObject> it( textObjects ); for ( ; it.current() ; ++it ) { lst.append( it.current()->textDocument() ); } return lst; } -QValueList<KoTextObject *> KPrDocument::visibleTextObjects( ) const +TQValueList<KoTextObject *> KPrDocument::visibleTextObjects( ) const { - QValueList<KoTextObject *> lst; - QPtrList<KoTextObject> textFramesets = allTextObjects( ); + TQValueList<KoTextObject *> lst; + TQPtrList<KoTextObject> textFramesets = allTextObjects( ); KoTextObject *frm; for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ) { @@ -4509,12 +4509,12 @@ void KPrDocument::setShowGuideLines( bool b ) setModified( true ); } -void KPrDocument::horizontalGuideLines( const QValueList<double> &lines ) +void KPrDocument::horizontalGuideLines( const TQValueList<double> &lines ) { m_hGuideLines = lines; } -void KPrDocument::verticalGuideLines( const QValueList<double> &lines ) +void KPrDocument::verticalGuideLines( const TQValueList<double> &lines ) { m_vGuideLines = lines; } @@ -4531,7 +4531,7 @@ void KPrDocument::addGuideLine( Qt::Orientation o, double pos ) m_vGuideLines.append( pos ); } - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) { ( (KPrView*)it.current() )->getCanvas()->guideLines().setGuideLines( m_hGuideLines, m_vGuideLines ); @@ -4541,17 +4541,17 @@ void KPrDocument::addGuideLine( Qt::Orientation o, double pos ) void KPrDocument::updateGuideLineButton() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->updateGuideLineButton(); } -void KPrDocument::loadGuideLines( const QDomElement &element ) +void KPrDocument::loadGuideLines( const TQDomElement &element ) { // In early versions of KPresenter 1.2 (up to Beta 2), there is child also naed <HELPLINES> // Before KPresenter 1.5 the guide lines where named helplines that is why they are still // named like this in the fileformat - QDomElement guidelines = element.namedItem( "HELPLINES" ).toElement(); + TQDomElement guidelines = element.namedItem( "HELPLINES" ).toElement(); if ( guidelines.isNull() ) guidelines = element; @@ -4566,18 +4566,18 @@ void KPrDocument::loadGuideLines( const QDomElement &element ) } } -void KPrDocument::saveGuideLines( QDomDocument &doc, QDomElement& element ) +void KPrDocument::saveGuideLines( TQDomDocument &doc, TQDomElement& element ) { - for(QValueList<double>::Iterator it = m_vGuideLines.begin(); it != m_vGuideLines.end(); ++it) + for(TQValueList<double>::Iterator it = m_vGuideLines.begin(); it != m_vGuideLines.end(); ++it) { - QDomElement lines=doc.createElement("Vertical"); + TQDomElement lines=doc.createElement("Vertical"); lines.setAttribute("value", (double)*it); element.appendChild( lines ); } - for(QValueList<double>::Iterator it = m_hGuideLines.begin(); it != m_hGuideLines.end(); ++it) + for(TQValueList<double>::Iterator it = m_hGuideLines.begin(); it != m_hGuideLines.end(); ++it) { - QDomElement lines=doc.createElement("Horizontal"); + TQDomElement lines=doc.createElement("Horizontal"); lines.setAttribute("value", *it); element.appendChild( lines ); } @@ -4585,37 +4585,37 @@ void KPrDocument::saveGuideLines( QDomDocument &doc, QDomElement& element ) void KPrDocument::updateGridButton() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->updateGridButton(); } -void KPrDocument::setSpellCheckIgnoreList( const QStringList& lst ) +void KPrDocument::setSpellCheckIgnoreList( const TQStringList& lst ) { m_spellCheckIgnoreList = lst; m_bgSpellCheck->settings()->setCurrentIgnoreList( m_spellCheckIgnoreList + m_spellCheckPersonalDict ); setModified( true ); } -void KPrDocument::addSpellCheckIgnoreWord( const QString & word ) +void KPrDocument::addSpellCheckIgnoreWord( const TQString & word ) { // ### missing: undo/redo support - if( m_spellCheckIgnoreList.findIndex( word ) == -1 ) + if( m_spellCheckIgnoreList.tqfindIndex( word ) == -1 ) m_spellCheckIgnoreList.append( word ); setSpellCheckIgnoreList( m_spellCheckIgnoreList ); } void KPrDocument::updateObjectStatusBarItem() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->updateObjectStatusBarItem(); } void KPrDocument::updateObjectSelected() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->objectSelectedChanged(); } @@ -4623,7 +4623,7 @@ void KPrDocument::updateObjectSelected() void KPrDocument::setTabStopValue ( double _tabStop ) { m_tabStop = _tabStop; - QPtrListIterator<KPrPage> it( m_pageList ); + TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) it.current()->changeTabStopValue( m_tabStop ); //styckypage @@ -4655,17 +4655,17 @@ void KPrDocument::testAndCloseAllTextObjectProtectedContent() { if ( !m_cursorInProtectectedArea ) { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) static_cast<KPrView*>(it.current())->testAndCloseAllTextObjectProtectedContent(); } } -void KPrDocument::insertFile(const QString & file ) +void KPrDocument::insertFile(const TQString & file ) { m_insertFilePage = m_pageList.count(); - m_childCountBeforeInsert = children().count(); + m_childCountBeforeInsert = tqchildren().count(); objStartY = 0; bool clean = _clean; _clean = false; @@ -4690,14 +4690,14 @@ void KPrDocument::insertFile(const QString & file ) m_childCountBeforeInsert = 0; // Update the views int newPos = m_pageList.count()-1; - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) static_cast<KPrView*>(it.current())->updateSideBar(); _clean = clean; updatePresentationButton(); //activate this page in all views (...) - QPtrListIterator<KoView>it2( views() ); + TQPtrListIterator<KoView>it2( views() ); for (; it2.current(); ++it2 ) static_cast<KPrView*>(it2.current())->skipToPage(newPos); } @@ -4709,21 +4709,21 @@ void KPrDocument::spellCheckParagraphDeleted( KoTextParag * /* _parag */, KPrTe void KPrDocument::updateRulerInProtectContentMode() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) static_cast<KPrView*>(it.current())->updateRulerInProtectContentMode(); } void KPrDocument::updatePresentationButton() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) static_cast<KPrView*>(it.current())->updatePresentationButton((selectedSlides().count()>0)); } void KPrDocument::refreshGroupButton() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) static_cast<KPrView*>(it.current())->refreshGroupButton(); } @@ -4731,7 +4731,7 @@ void KPrDocument::refreshGroupButton() void KPrDocument::addView( KoView *_view ) { KoDocument::addView( _view ); - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) static_cast<KPrView*>(it.current())->closeTextObject(); } @@ -4739,19 +4739,19 @@ void KPrDocument::addView( KoView *_view ) void KPrDocument::removeView( KoView *_view ) { KoDocument::removeView( _view ); - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) static_cast<KPrView*>(it.current())->deSelectAllObjects(); } -void KPrDocument::updateStyleListOrder( const QStringList &list ) +void KPrDocument::updateStyleListOrder( const TQStringList &list ) { styleCollection()->updateStyleListOrder( list ); } void KPrDocument::updateDirectCursorButton() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) static_cast<KPrView*>(it.current())->updateDirectCursorButton(); } @@ -4773,11 +4773,11 @@ KPrView *KPrDocument::firstView() const return 0L; } -void KPrDocument::addWordToDictionary( const QString & word) +void KPrDocument::addWordToDictionary( const TQString & word) { if ( m_bgSpellCheck ) { - if( m_spellCheckPersonalDict.findIndex( word ) == -1 ) + if( m_spellCheckPersonalDict.tqfindIndex( word ) == -1 ) m_spellCheckPersonalDict.append( word ); m_bgSpellCheck->settings()->setCurrentIgnoreList( m_spellCheckIgnoreList + m_spellCheckPersonalDict ); if ( backgroundSpellCheckEnabled() ) @@ -4786,11 +4786,11 @@ void KPrDocument::addWordToDictionary( const QString & word) } } -QValueList <KPrPage *> KPrDocument::customListPage( const QStringList & lst, bool loadOasis ) +TQValueList <KPrPage *> KPrDocument::customListPage( const TQStringList & lst, bool loadOasis ) { - QStringList tmp( lst ); - QValueList <KPrPage *> tmpValueList; - for ( QStringList::Iterator itList = tmp.begin(); itList != tmp.end(); ++itList ) + TQStringList tmp( lst ); + TQValueList <KPrPage *> tmpValueList; + for ( TQStringList::Iterator itList = tmp.begin(); itList != tmp.end(); ++itList ) { for ( int i = 0; i < static_cast<int>( m_pageList.count() ); i++ ) { @@ -4826,9 +4826,9 @@ void KPrDocument::setCustomSlideShows( const CustomSlideShowMap & customSlideSho setModified( true ); } -QStringList KPrDocument::presentationList() +TQStringList KPrDocument::presentationList() { - QStringList lst; + TQStringList lst; if ( !m_customListSlideShow.isEmpty() ) { CustomSlideShowMap::Iterator it; @@ -4838,10 +4838,10 @@ QStringList KPrDocument::presentationList() return lst; } -void KPrDocument::testCustomSlideShow( const QValueList<KPrPage *> &pages, KPrView *view ) +void KPrDocument::testCustomSlideShow( const TQValueList<KPrPage *> &pages, KPrView *view ) { delete m_customListTest; - m_customListTest = new QValueList<int>( listOfDisplaySelectedSlides( pages ) ); + m_customListTest = new TQValueList<int>( listOfDisplaySelectedSlides( pages ) ); if ( view ) view->screenStartFromFirst(); |