summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrDocument.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:31 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:31 -0600
commitc9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch)
tree1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /kpresenter/KPrDocument.cpp
parent94844816550ad672ccfcdc25659c625546239998 (diff)
downloadkoffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz
koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'kpresenter/KPrDocument.cpp')
-rw-r--r--kpresenter/KPrDocument.cpp128
1 files changed, 64 insertions, 64 deletions
diff --git a/kpresenter/KPrDocument.cpp b/kpresenter/KPrDocument.cpp
index 17a8f0c6..7a880406 100644
--- a/kpresenter/KPrDocument.cpp
+++ b/kpresenter/KPrDocument.cpp
@@ -43,7 +43,7 @@
#include "KPrSVGPathParser.h"
#include <tqpopupmenu.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
#include <tqregexp.h>
#include <tqfileinfo.h>
#include <tqdom.h>
@@ -272,7 +272,7 @@ KPrDocument::KPrDocument( TQWidget *parentWidget, const char *widgetName, TQObje
saveOnlyPage = -1;
m_maxRecentFiles = 10;
- connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
+ connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ),
this, TQT_SLOT( clipboardDataChanged() ) );
m_commandHistory = new KoCommandHistory( actionCollection(), true ) ;
@@ -444,9 +444,9 @@ bool KPrDocument::saveChildren( KoStore* _store )
{
int i = 0;
- TQPtrListIterator<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
TQPtrListIterator<KPrPage> pageIt( m_pageList );
for ( int pagePos = 0; pageIt.current(); ++pageIt, ++pagePos )
@@ -490,7 +490,7 @@ TQDomDocument KPrDocument::saveXML()
emit sigProgress( 0 );
}
- m_varColl->variableSetting()->setModificationDate(TQDateTime::currentDateTime());
+ m_varColl->variableSetting()->setModificationDate(TQDateTime::tqcurrentDateTime());
recalcVariables( VT_DATE );
recalcVariables( VT_TIME );
recalcVariables( VT_STATISTIC );
@@ -669,9 +669,9 @@ TQDomDocument KPrDocument::saveXML()
}
// Write "OBJECT" tag for every child
- TQPtrListIterator<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 )
@@ -735,8 +735,8 @@ void KPrDocument::saveEmbeddedObject(KPrPage *page, KoDocumentChild *chl, TQDomD
TQDomElement embedded=doc.createElement("EMBEDDED");
KPrChild* curr = (KPrChild*)chl;
- // geometry is no zoom value !
- TQRect _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() );
@@ -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" ).arg( ++i ).arg( format.lower() );
+ TQString _name = TQString( "sounds/sound%1.%2" ).tqarg( ++i ).tqarg( 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" ).arg( ++i ).arg( format.lower() );
+ TQString _storeURL = TQString( "sounds/sound%1.%2" ).tqarg( ++i ).tqarg( 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( 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
{
- TQPtrListIterator<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(TQDateTime::currentDateTime());
+ m_varColl->variableSetting()->setModificationDate(TQDateTime::tqcurrentDateTime());
recalcVariables( VT_DATE );
recalcVariables( VT_TIME );
recalcVariables( VT_STATISTIC );
@@ -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();
}
@@ -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." ).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;
}
@@ -1648,7 +1648,7 @@ bool KPrDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles&oasisStyles
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"];
@@ -1685,7 +1685,7 @@ bool KPrDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles&oasisStyles
kdDebug()<<" end load oasis master style \n";
Q_ASSERT( master );
- const TQDomElement *style = master ? oasisStyles.findStyle(master->attributeNS( KoXmlNS::style, "page-layout-name", TQString() )) : 0;
+ 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
@@ -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->geometry();
+ r = ch->tqgeometry();
if ( groupObject )
groupObject->addObjects( kppartobject );
else
@@ -1993,11 +1993,11 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, TQDomNode & drawPage, KoOa
break;
}
}
- else if ( name == "custom-shape" && isDrawNS )
+ else if ( name == "custom-tqshape" && isDrawNS )
{
fillStyleStack( o, context, "graphic" );
- TQDomElement enhancedGeometry = KoDom::namedItemNS( o, KoXmlNS::draw, "enhanced-geometry" );
+ TQDomElement enhancedGeometry = KoDom::namedItemNS( o, KoXmlNS::draw, "enhanced-tqgeometry" );
if ( !enhancedGeometry.isNull() )
{
@@ -2054,13 +2054,13 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, TQDomNode & drawPage, KoOa
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;
}
}
}
@@ -2089,7 +2089,7 @@ void KPrDocument::loadOasisObject( KPrPage * newpage, TQDomNode & drawPage, KoOa
if ( !note.isEmpty() )
note += "\n";
- //todo load layout for note.
+ //todo load tqlayout for note.
TQDomNode textBox = KoDom::namedItemNS( frameBox, KoXmlNS::draw, "text-box" );
if ( !textBox.isNull() )
@@ -2136,10 +2136,10 @@ int KPrDocument::createPresentationAnimation(const TQDomElement& element, int or
{
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" ) );
- TQString name = e.attributeNS( KoXmlNS::draw, "shape-id", TQString() );
+ 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" ) )
@@ -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-shape" )
+ if ( tagName == "show-tqshape" )
{
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" )
- .arg( errorLine ).arg( errorColumn ).arg( i18n ( errorMsg.utf8() ) ) );
+ .tqarg( errorLine ).tqarg( errorColumn ).tqarg( 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->geometry();
+ r = ch->tqgeometry();
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").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"))
@@ -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->geometry();
+ r = ch->tqgeometry();
insertChild( ch );
kppartobject = new KPrPartObject( ch );
//emit sig_insertObject( ch, kppartobject );
@@ -2514,7 +2514,7 @@ bool KPrDocument::loadXML( const TQDomDocument &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 );
@@ -3275,26 +3275,26 @@ 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();
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, TQWidget* parentWidget)
@@ -3386,7 +3386,7 @@ 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(TQDateTime::currentDateTime());
+ m_varColl->variableSetting()->setCreationDate(TQDateTime::tqcurrentDateTime());
recalcVariables( VT_DATE ); // , VST_CREATION_DATE ...
// If we then load a document, it will override that date.
}
@@ -3401,16 +3401,16 @@ void KPrDocument::setGridValue( double _x, double _y, bool _replace )
replaceObjs();
}
-void KPrDocument::repaint( bool erase )
+void KPrDocument::tqrepaint( bool erase )
{
TQPtrListIterator<KoView> it( views() );
for( ; it.current(); ++it ) {
KPrCanvas* canvas = ((KPrView*)it.current())->getCanvas();
- canvas->repaint( erase );
+ canvas->tqrepaint( erase );
}
}
-void KPrDocument::repaint( const TQRect& rect )
+void KPrDocument::tqrepaint( const TQRect& rect )
{
TQRect r;
TQPtrListIterator<KoView> it( views() );
@@ -3423,25 +3423,25 @@ void KPrDocument::repaint( const TQRect& rect )
}
}
-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()
{
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() ) );
}
TQValueList<int> KPrDocument::getPageEffectSteps( unsigned int num )
@@ -3556,7 +3556,7 @@ void KPrDocument::takePage( KPrPage *page, int pageNum )
}
}
- repaint( false );
+ tqrepaint( 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 = children().count();
+ m_childCountBeforeInsert = tqchildren().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;
- repaint( false );
+ tqrepaint( 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();
- repaint(b);
+ tqrepaint(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();
- 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,7 +3786,7 @@ void KPrDocument::setFooter( bool b )
}
m_masterPage->setFooter( b, false );
updateHeaderFooterButton();
- repaint(b);
+ tqrepaint(b);
}
void KPrDocument::updateHeaderFooterButton()
@@ -3917,7 +3917,7 @@ 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
@@ -3963,7 +3963,7 @@ void KPrDocument::copyPageToClipboard( int pgnum )
KURL url; url.setPath( tempFile.name() );
KURL::List lst;
lst.append( url );
- TQApplication::clipboard()->setData( new KURLDrag( lst ) );
+ TQApplication::tqclipboard()->setData( new KURLDrag( lst ) );
m_tempFileInClipboard = tempFile.name(); // do this last, the above calls clipboardDataChanged
}
@@ -3987,7 +3987,7 @@ void KPrDocument::clipboardDataChanged()
}
// TODO enable paste as well, when a txtobject is activated
// and there is plain text in the clipboard. Then enable this code.
- //TQMimeSource *data = TQApplication::clipboard()->data();
+ //TQMimeSource *data = TQApplication::tqclipboard()->data();
//bool canPaste = data->provides( "text/uri-list" ) || data->provides( "application/x-kpresenter-selection" );
// emit enablePaste( canPaste );
}
@@ -4145,7 +4145,7 @@ void KPrDocument::slotRepaintChanged( KPrTextObject *kptextobj )
{
//todo
//use this function for the moment
- repaint( kptextobj );
+ tqrepaint( kptextobj );
}
@@ -4156,7 +4156,7 @@ void KPrDocument::recalcVariables( int type )
if ( modifiedVariables.isEmpty() )
return;
- // TODO use the return value from recalcVariables to only repaint what has changed.
+ // 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();
@@ -4295,7 +4295,7 @@ void KPrDocument::newZoomAndResolution( bool updateViews, bool /*forPrint*/ )
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();
}
}
}
@@ -4665,7 +4665,7 @@ 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;