diff options
Diffstat (limited to 'kpresenter/KPrDocument.cpp')
-rw-r--r-- | kpresenter/KPrDocument.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/kpresenter/KPrDocument.cpp b/kpresenter/KPrDocument.cpp index d7cb13cf..fca675d5 100644 --- a/kpresenter/KPrDocument.cpp +++ b/kpresenter/KPrDocument.cpp @@ -444,9 +444,9 @@ bool KPrDocument::saveChildren( KoStore* _store ) { int i = 0; - TQPtrListIterator<KoDocumentChild> it( tqchildren() ); + TQPtrListIterator<KoDocumentChild> it( children() ); for( ; it.current(); ++it ) { - // Don't save tqchildren that are only in the undo/redo history + // Don't save children that are only in the undo/redo history // but not anymore in the presentation TQPtrListIterator<KPrPage> pageIt( m_pageList ); for ( int pagePos = 0; pageIt.current(); ++pageIt, ++pagePos ) @@ -669,9 +669,9 @@ TQDomDocument KPrDocument::saveXML() } // Write "OBJECT" tag for every child - TQPtrListIterator<KoDocumentChild> chl( tqchildren() ); + TQPtrListIterator<KoDocumentChild> chl( children() ); for( ; chl.current(); ++chl ) { - // Don't save tqchildren that are only in the undo/redo history + // Don't save children 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 ) @@ -735,8 +735,8 @@ void KPrDocument::saveEmbeddedObject(KPrPage *page, KoDocumentChild *chl, TQDomD TQDomElement embedded=doc.createElement("EMBEDDED"); KPrChild* curr = (KPrChild*)chl; - // tqgeometry is no zoom value ! - TQRect _rect = curr->tqgeometry(); + // geometry is no zoom value ! + TQRect _rect = curr->geometry(); int tmpX = (int)zoomHandler()->unzoomItX( _rect.x() ); int tmpY = (int)zoomHandler()->unzoomItY( _rect.y() ); int tmpWidth = (int)zoomHandler()->unzoomItX( _rect.width() ); @@ -909,7 +909,7 @@ TQDomElement KPrDocument::saveUsedSoundFileToXML( TQDomDocument &_doc, TQStringL TQString soundFileName = *it; int position = soundFileName.findRev( '.' ); TQString format = soundFileName.right( soundFileName.length() - position - 1 ); - TQString _name = TQString( "sounds/sound%1.%2" ).tqarg( ++i ).tqarg( format.lower() ); + TQString _name = TQString( "sounds/sound%1.%2" ).arg( ++i ).arg( format.lower() ); TQDomElement fileElem = _doc.createElement( "FILE" ); soundFiles.appendChild( fileElem ); @@ -955,7 +955,7 @@ void KPrDocument::saveUsedSoundFileToStore( KoStore *_store, TQStringList _list TQString soundFileName = *it; int position = soundFileName.findRev( '.' ); TQString format = soundFileName.right( soundFileName.length() - position - 1 ); - TQString _storeURL = TQString( "sounds/sound%1.%2" ).tqarg( ++i ).tqarg( format.lower() ); + TQString _storeURL = TQString( "sounds/sound%1.%2" ).arg( ++i ).arg( format.lower() ); if ( _store->open( _storeURL ) ) { KoStoreDevice dev( _store ); @@ -973,7 +973,7 @@ bool KPrDocument::loadChildren( KoStore* _store ) { if ( objStartY == 0 && _clean) // Don't do this when inserting a template or a page... { - TQPtrListIterator<KoDocumentChild> it( tqchildren() ); + TQPtrListIterator<KoDocumentChild> it( children() ); 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 { - TQPtrListIterator<KoDocumentChild> it( tqchildren() ); + TQPtrListIterator<KoDocumentChild> it( children() ); for( int i = 0; it.current(); ++it, ++i ) { if ( i < m_childCountBeforeInsert ) continue; @@ -1614,7 +1614,7 @@ bool KPrDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles&oasisStyles if ( localName.isEmpty() ) setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No tag found inside office:body." ) ); else - setErrorMessage( i18n( "This document is not a presentation, but a %1. Please try opening it with the appropriate application." ).tqarg( KoDocument::tagNameToDocumentType( localName ) ) ); + setErrorMessage( i18n( "This document is not a presentation, but a %1. Please try opening it with the appropriate application." ).arg( KoDocument::tagNameToDocumentType( localName ) ) ); return false; } @@ -1857,7 +1857,7 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, TQDomNode & drawPage, KoOa TQRect r; KPrPartObject *kppartobject = new KPrPartObject( ch ); kppartobject->loadOasis( o, context, m_loadingInfo ); - r = ch->tqgeometry(); + r = ch->geometry(); if ( groupObject ) groupObject->addObjects( kppartobject ); else @@ -1993,11 +1993,11 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, TQDomNode & drawPage, KoOa break; } } - else if ( name == "custom-tqshape" && isDrawNS ) + else if ( name == "custom-shape" && isDrawNS ) { fillStyleStack( o, context, "graphic" ); - TQDomElement enhancedGeometry = KoDom::namedItemNS( o, KoXmlNS::draw, "enhanced-tqgeometry" ); + TQDomElement enhancedGeometry = KoDom::namedItemNS( o, KoXmlNS::draw, "enhanced-geometry" ); if ( !enhancedGeometry.isNull() ) { @@ -2054,13 +2054,13 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, TQDomNode & drawPage, KoOa newpage->appendObject( kpClosedObject ); } break; default: - kdDebug(33001) << "draw:custom-tqshape found unsupported object type " << objType << " in draw:enhanced-path " << d << endl; + kdDebug(33001) << "draw:custom-shape found unsupported object type " << objType << " in draw:enhanced-path " << d << endl; break; } } else { - kdDebug(33001) << "draw:custom-tqshape not supported" << endl; + kdDebug(33001) << "draw:custom-shape not supported" << endl; } } } @@ -2136,10 +2136,10 @@ int KPrDocument::createPresentationAnimation(const TQDomElement& element, int or { const bool isPresentationNS = e.namespaceURI() == KoXmlNS::presentation; if ( isPresentationNS && - ( tagName == "show-tqshape" || tagName == "hide-tqshape" ) ) + ( tagName == "show-shape" || tagName == "hide-shape" ) ) { - Q_ASSERT( e.hasAttributeNS( KoXmlNS::draw, "tqshape-id" ) ); - TQString name = e.attributeNS( KoXmlNS::draw, "tqshape-id", TQString() ); + Q_ASSERT( e.hasAttributeNS( KoXmlNS::draw, "shape-id" ) ); + TQString name = e.attributeNS( KoXmlNS::draw, "shape-id", TQString() ); kdDebug()<<" insert animation " << tagName << " name :" << name << endl; if ( e.hasAttributeNS( KoXmlNS::koffice, "order-id" ) ) @@ -2150,7 +2150,7 @@ int KPrDocument::createPresentationAnimation(const TQDomElement& element, int or lstAnimation *tmp = new lstAnimation; tmp->element = new TQDomElement( e ); tmp->order = orderAnimation; - if ( tagName == "show-tqshape" ) + if ( tagName == "show-shape" ) { m_loadingInfo->storePresentationShowAnimation( tmp, name ); } @@ -2246,7 +2246,7 @@ bool KPrDocument::loadXML( TQIODevice * dev, const TQDomDocument& doc ) << " 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" ) - .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( errorMsg.utf8() ) ) ); + .arg( errorLine ).arg( errorColumn ).arg( i18n ( errorMsg.utf8() ) ) ); return false; } b = loadXML( newdoc ); @@ -2294,7 +2294,7 @@ void KPrDocument::insertEmbedded( KoStore *store, TQDomElement topElem, KMacroCo TQDomElement object=elem.namedItem("OBJECT").toElement(); if(!object.isNull()) { ch->load(object, true); // true == uppercase - r = ch->tqgeometry(); + r = ch->geometry(); ch->loadDocument( store ); insertChild( ch ); kppartobject = new KPrPartObject( ch ); @@ -2376,7 +2376,7 @@ bool KPrDocument::loadXML( const TQDomDocument &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").tqarg(document.attribute("mime")) ); + setErrorMessage( i18n("Invalid document, expected mimetype application/x-kpresenter or application/vnd.kde.kpresenter, got %1").arg(document.attribute("mime")) ); return false; } if(document.hasAttribute("url")) @@ -2401,7 +2401,7 @@ bool KPrDocument::loadXML( const TQDomDocument &doc ) TQDomElement object=elem.namedItem("OBJECT").toElement(); if(!object.isNull()) { ch->load(object, true); // true == uppercase - r = ch->tqgeometry(); + r = ch->geometry(); insertChild( ch ); kppartobject = new KPrPartObject( ch ); //emit sig_insertObject( ch, kppartobject ); @@ -3275,7 +3275,7 @@ void KPrDocument::setPageLayout( const KoPageLayout &pgLayout ) //for ( int i = 0; i < static_cast<int>( m_pageList.count() ); i++ ) // m_pageList.at( i )->updateBackgroundSize(); - tqrepaint( false ); + repaint( false ); tqlayout(); // don't setModified(true) here, since this is called on startup } @@ -3287,14 +3287,14 @@ void KPrDocument::updateHeaderFooterPosition( ) TQRect oldBoundingRect = zoomHandler()->zoomRect( _header->getRepaintRect() ); _header->setOrig(pageRect.topLeft ()); _header->setSize(pageRect.width(),_header->getSize().height()); - tqrepaint( oldBoundingRect ); - tqrepaint(_header); + repaint( oldBoundingRect ); + repaint(_header); oldBoundingRect = zoomHandler()->zoomRect( _footer->getRepaintRect() ); _footer->setOrig(pageRect.left(),pageRect.bottom()-_footer->getSize().height()); _footer->setSize(pageRect.width(),_footer->getSize().height()); - tqrepaint(oldBoundingRect); - tqrepaint(_footer); + repaint(oldBoundingRect); + repaint(_footer); } bool KPrDocument::initDoc(InitDocFlags flags, TQWidget* parentWidget) @@ -3401,16 +3401,16 @@ void KPrDocument::setGridValue( double _x, double _y, bool _replace ) replaceObjs(); } -void KPrDocument::tqrepaint( bool erase ) +void KPrDocument::repaint( bool erase ) { TQPtrListIterator<KoView> it( views() ); for( ; it.current(); ++it ) { KPrCanvas* canvas = ((KPrView*)it.current())->getCanvas(); - canvas->tqrepaint( erase ); + canvas->repaint( erase ); } } -void KPrDocument::tqrepaint( const TQRect& rect ) +void KPrDocument::repaint( const TQRect& rect ) { TQRect r; TQPtrListIterator<KoView> it( views() ); @@ -3439,9 +3439,9 @@ void KPrDocument::tqlayout() } } -void KPrDocument::tqrepaint( KPrObject *kpobject ) +void KPrDocument::repaint( KPrObject *kpobject ) { - tqrepaint( m_zoomHandler->zoomRect( kpobject->getRepaintRect() ) ); + repaint( m_zoomHandler->zoomRect( kpobject->getRepaintRect() ) ); } TQValueList<int> KPrDocument::getPageEffectSteps( unsigned int num ) @@ -3556,7 +3556,7 @@ void KPrDocument::takePage( KPrPage *page, int pageNum ) } } - tqrepaint( false ); + repaint( false ); } void KPrDocument::pageOrderChanged() @@ -3646,7 +3646,7 @@ int KPrDocument::insertNewPage( const TQString &cmdName, int _page, InsertPos _i KPrPage *newpage = new KPrPage( this, m_masterPage ); m_pageWhereLoadObject=newpage; - m_childCountBeforeInsert = tqchildren().count(); + m_childCountBeforeInsert = children().count(); bool ok = loadNativeFormat( fileName ); if ( !ok ) @@ -3726,7 +3726,7 @@ KCommand * KPrDocument::loadPastedObjs( const TQString &in, KPrPage* _page ) KCommand *cmd = loadObjects(document,true); m_pageWhereLoadObject=0L; - tqrepaint( false ); + repaint( false ); setModified( true ); return cmd; } @@ -3750,7 +3750,7 @@ void KPrDocument::setDisplayObjectMasterPage( bool b ) TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->updateDisplayObjectMasterPageButton(); - tqrepaint(b); + repaint(b); } void KPrDocument::setDisplayBackground( bool b ) @@ -3758,7 +3758,7 @@ void KPrDocument::setDisplayBackground( bool b ) TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KPrView*)it.current())->updateDisplayBackgroundButton(); - tqrepaint(b); + repaint(b); } void KPrDocument::setHeader( bool b ) @@ -3772,7 +3772,7 @@ void KPrDocument::setHeader( bool b ) } m_masterPage->setHeader( b, false ); updateHeaderFooterButton(); - tqrepaint(b); + repaint(b); } void KPrDocument::setFooter( bool b ) @@ -3786,7 +3786,7 @@ void KPrDocument::setFooter( bool b ) } m_masterPage->setFooter( b, false ); updateHeaderFooterButton(); - tqrepaint(b); + repaint(b); } void KPrDocument::updateHeaderFooterButton() @@ -3917,7 +3917,7 @@ void KPrDocument::movePage( int from, int to ) void KPrDocument::copyPage( int from ) { _clean = false; - m_childCountBeforeInsert = tqchildren().count(); + m_childCountBeforeInsert = children().count(); _duplicatePage=true; // ### now also set via savePage() parameter below @@ -4145,7 +4145,7 @@ void KPrDocument::slotRepaintChanged( KPrTextObject *kptextobj ) { //todo //use this function for the moment - tqrepaint( kptextobj ); + repaint( kptextobj ); } @@ -4156,7 +4156,7 @@ void KPrDocument::recalcVariables( int type ) if ( modifiedVariables.isEmpty() ) return; - // TODO use the return value from recalcVariables to only tqrepaint what has changed. + // TODO use the return value from recalcVariables to only repaint what has changed. TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) it.current()->slotRepaintVariable(); @@ -4665,7 +4665,7 @@ void KPrDocument::insertFile(const TQString & file ) { m_insertFilePage = m_pageList.count(); - m_childCountBeforeInsert = tqchildren().count(); + m_childCountBeforeInsert = children().count(); objStartY = 0; bool clean = _clean; _clean = false; |