diff options
Diffstat (limited to 'kivio/kiviopart/kivio_doc.cpp')
-rw-r--r-- | kivio/kiviopart/kivio_doc.cpp | 236 |
1 files changed, 118 insertions, 118 deletions
diff --git a/kivio/kiviopart/kivio_doc.cpp b/kivio/kiviopart/kivio_doc.cpp index aa7724d1..cf0327ab 100644 --- a/kivio/kiviopart/kivio_doc.cpp +++ b/kivio/kiviopart/kivio_doc.cpp @@ -16,11 +16,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qdom.h> -#include <qtextstream.h> -#include <qbuffer.h> -#include <qtabwidget.h> -#include <qpaintdevicemetrics.h> +#include <tqdom.h> +#include <tqtextstream.h> +#include <tqbuffer.h> +#include <tqtabwidget.h> +#include <tqpaintdevicemetrics.h> #include "kivio_doc.h" #include "kivio_page.h" @@ -51,20 +51,20 @@ #include <kurl.h> #include <kapplication.h> #include <assert.h> -#include <qdatetime.h> +#include <tqdatetime.h> #include <sys/types.h> #include <dirent.h> #include <sys/stat.h> #include <pwd.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qfile.h> -#include <qpixmap.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqfile.h> +#include <tqpixmap.h> -#include <qpainter.h> -#include <qpen.h> -#include <qfont.h> -#include <qvaluelist.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqfont.h> +#include <tqvaluelist.h> #include <kstandarddirs.h> @@ -96,19 +96,19 @@ * *****************************************************************************/ -QPtrList<KivioDoc>* KivioDoc::s_docs = 0; +TQPtrList<KivioDoc>* KivioDoc::s_docs = 0; int KivioDoc::s_docId = 0; -KivioDoc::KivioDoc( QWidget *parentWidget, const char* widgetName, QObject* parent, const char* name, bool singleViewMode ) -: KoDocument( parentWidget, widgetName, parent, name, singleViewMode ) +KivioDoc::KivioDoc( TQWidget *tqparentWidget, const char* widgetName, TQObject* tqparent, const char* name, bool singleViewMode ) +: KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode ) { dcop = 0; if (!s_docs) - s_docs = new QPtrList<KivioDoc>; + s_docs = new TQPtrList<KivioDoc>; s_docs->append(this); - m_pLstSpawnerSets = new QPtrList<KivioStencilSpawnerSet>; + m_pLstSpawnerSets = new TQPtrList<KivioStencilSpawnerSet>; m_pLstSpawnerSets->setAutoDelete(true); m_loadTimer = 0; m_currentFile = 0; @@ -118,8 +118,8 @@ KivioDoc::KivioDoc( QWidget *parentWidget, const char* widgetName, QObject* pare if ( !name ) { - QString tmp( "Document%1" ); //lukas: FIXME - tmp = tmp.arg( s_docId++ ); + TQString tmp( "Document%1" ); //lukas: FIXME + tmp = tmp.tqarg( s_docId++ ); setName( tmp.latin1() ); } @@ -130,9 +130,9 @@ KivioDoc::KivioDoc( QWidget *parentWidget, const char* widgetName, QObject* pare // Load autoLoadStencils in internal StencilSpawnerSet m_pInternalSet = new KivioStencilSpawnerSet("Kivio_Internal"); m_pInternalSet->setId("Kivio - Internal - Do Not Touch"); - QStringList list = instance()->dirs()->findAllResources("data",instance()->instanceName()+"/autoloadStencils/*",true,false); - QStringList::ConstIterator pIt = list.begin(); - QStringList::ConstIterator pEnd = list.end(); + TQStringList list = instance()->dirs()->findAllResources("data",instance()->instanceName()+"/autoloadStencils/*",true,false); + TQStringList::ConstIterator pIt = list.begin(); + TQStringList::ConstIterator pEnd = list.end(); for (; pIt != pEnd; ++pIt ) { @@ -146,8 +146,8 @@ KivioDoc::KivioDoc( QWidget *parentWidget, const char* widgetName, QObject* pare //laurent: Why don't use menu history for undo/redo command ? sync with other koffice application m_commandHistory = new KoCommandHistory( actionCollection(), /*false*/true ) ; - 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() ) ); if ( name ) @@ -163,16 +163,16 @@ DCOPObject* KivioDoc::dcopObject() return dcop; } -QPtrList<KivioDoc>& KivioDoc::documents() +TQPtrList<KivioDoc>& KivioDoc::documents() { if ( s_docs == 0 ) { - s_docs = new QPtrList<KivioDoc>; + s_docs = new TQPtrList<KivioDoc>; } return *s_docs; } -bool KivioDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) +bool KivioDoc::initDoc(InitDocFlags flags, TQWidget* tqparentWidget) { KivioPage *t = createPage(); m_pMap->addPage( t ); @@ -184,7 +184,7 @@ bool KivioDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) return true; } - QString f; + TQString f; KoTemplateChooseDia::ReturnType ret; KoTemplateChooseDia::DialogType dlgtype; @@ -196,7 +196,7 @@ bool KivioDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) } ret = KoTemplateChooseDia::choose( KivioFactory::global(), f, - dlgtype, "kivio_template", parentWidget ); + dlgtype, "kivio_template", tqparentWidget ); if( ret == KoTemplateChooseDia::File ) { KURL url(f); @@ -204,8 +204,8 @@ bool KivioDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) m_docOpened = ok; // Used to for a hack that make kivio not crash if you cancel startup dialog. return ok; } else if ( ret == KoTemplateChooseDia::Template ) { - QFileInfo fileInfo( f ); - QString fileName( fileInfo.dirPath(true) + "/" + fileInfo.baseName() + ".kft" ); + TQFileInfo fileInfo( f ); + TQString fileName( fileInfo.dirPath(true) + "/" + fileInfo.baseName() + ".kft" ); resetURL(); bool ok = loadNativeFormat( fileName ); if ( !ok ) @@ -222,7 +222,7 @@ bool KivioDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) } } -void KivioDoc::openExistingFile( const QString& file ) +void KivioDoc::openExistingFile( const TQString& file ) { KivioPage* t = createPage(); m_pMap->addPage(t); @@ -230,7 +230,7 @@ void KivioDoc::openExistingFile( const QString& file ) KoDocument::openExistingFile(file); } -void KivioDoc::openTemplate( const QString& file ) +void KivioDoc::openTemplate( const TQString& file ) { KivioPage* t = createPage(); m_pMap->addPage(t); @@ -245,27 +245,27 @@ void KivioDoc::initEmpty() KoDocument::initEmpty(); } -KoView* KivioDoc::createViewInstance( QWidget* parent, const char* name ) +KoView* KivioDoc::createViewInstance( TQWidget* tqparent, const char* name ) { if (!name) { name = "View"; } - return new KivioView( parent, name, this ); + return new KivioView( tqparent, name, this ); } -QDomDocument KivioDoc::saveXML() +TQDomDocument KivioDoc::saveXML() { - QDomDocument doc( "kiviodoc" ); + TQDomDocument doc( "kiviodoc" ); doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement kivio = doc.createElement( "kiviosheet" ); + TQDomElement kivio = doc.createElement( "kiviosheet" ); kivio.setAttribute( "editor", "Kivio" ); kivio.setAttribute( "mime", MIME_TYPE ); kivio.setAttribute( "units", unitName() ); gridData.save(kivio,"grid"); - QDomElement viewItemsElement = doc.createElement("ViewItems"); + TQDomElement viewItemsElement = doc.createElement("ViewItems"); kivio.appendChild(viewItemsElement); doc.appendChild(kivio); @@ -292,7 +292,7 @@ QDomDocument KivioDoc::saveXML() } - QDomElement e = m_pMap->save(doc); + TQDomElement e = m_pMap->save(doc); kivio.appendChild(e); setModified(false); @@ -305,9 +305,9 @@ bool KivioDoc::saveOasis(KoStore* store, KoXmlWriter* manifestWriter) KoGenStyles styles; KoGenStyle pageLayout = Kivio::Config::defaultPageLayout().saveOasis(); - QString layoutName = styles.lookup(pageLayout, "PL"); + TQString tqlayoutName = styles.lookup(pageLayout, "PL"); KoGenStyle masterPage(KoGenStyle::STYLE_MASTER); - masterPage.addAttribute("style:page-layout-name", layoutName); + masterPage.addAttribute("style:page-tqlayout-name", tqlayoutName); styles.lookup(masterPage, "Standard", false); if(!store->open("content.xml")) { @@ -341,11 +341,11 @@ bool KivioDoc::saveOasis(KoStore* store, KoXmlWriter* manifestWriter) styleWriter->startElement("office:automatic-styles"); - QValueList<KoGenStyles::NamedStyle> styleList = styles.styles(KoGenStyle::STYLE_PAGELAYOUT); - QValueList<KoGenStyles::NamedStyle>::const_iterator it = styleList.begin(); + TQValueList<KoGenStyles::NamedStyle> styleList = styles.styles(KoGenStyle::STYLE_PAGELAYOUT); + TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styleList.begin(); for ( ; it != styleList.end(); ++it) { - (*it).style->writeStyle(styleWriter, styles, "style:page-layout", (*it).name, "style:page-layout-properties"); + (*it).style->writeStyle(styleWriter, styles, "style:page-tqlayout", (*it).name, "style:page-tqlayout-properties"); } styleList = styles.styles(Kivio::STYLE_PAGE); @@ -411,13 +411,13 @@ void KivioDoc::saveOasisSettings( KoXmlWriter &/*settingsWriter*/ ) //todo } -bool KivioDoc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const QDomDocument& settings, KoStore* ) +bool KivioDoc::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* ) { kdDebug(43000) << "Start loading OASIS document..." << endl; m_bLoading = true; - QDomElement contents = doc.documentElement(); - QDomElement body(KoDom::namedItemNS( contents, KoXmlNS::office, "body")); + TQDomElement contents = doc.documentElement(); + TQDomElement body(KoDom::namedItemNS( contents, KoXmlNS::office, "body")); if(body.isNull()) { kdDebug(43000) << "No office:body found!" << endl; @@ -435,8 +435,8 @@ bool KivioDoc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, c return false; } - QDomNode node = body.firstChild(); - QString localName; + TQDomNode node = body.firstChild(); + TQString localName; m_pMap->clear(); // TODO: port to forEachElement @@ -463,7 +463,7 @@ bool KivioDoc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, c } -void KivioDoc::loadOasisSettings( const QDomDocument&settingsDoc ) +void KivioDoc::loadOasisSettings( const TQDomDocument&settingsDoc ) { if ( settingsDoc.isNull() ) return ; //not a error some file doesn't have settings.xml @@ -476,7 +476,7 @@ void KivioDoc::loadOasisSettings( const QDomDocument&settingsDoc ) } } -bool KivioDoc::loadXML( QIODevice *, const QDomDocument& doc ) +bool KivioDoc::loadXML( TQIODevice *, const TQDomDocument& doc ) { m_bLoading = true; @@ -485,7 +485,7 @@ bool KivioDoc::loadXML( QIODevice *, const QDomDocument& doc ) return false; } - QDomElement kivio = doc.documentElement(); + TQDomElement kivio = doc.documentElement(); if ( kivio.attribute( "mime" ) != "application/x-kivio" && kivio.attribute( "mime" ) != "application/vnd.kde.kivio" ) { @@ -494,10 +494,10 @@ bool KivioDoc::loadXML( QIODevice *, const QDomDocument& doc ) return false; } - QDomNode node = kivio.firstChild(); + TQDomNode node = kivio.firstChild(); while( !node.isNull() ) { - QString name = node.nodeName(); + TQString name = node.nodeName(); if( name == "KivioMap" ) { if( !m_pMap->loadXML( node.toElement() ) ) @@ -508,7 +508,7 @@ bool KivioDoc::loadXML( QIODevice *, const QDomDocument& doc ) } else if( name == "KivioStencilSpawnerSet" ) { - QString id = XmlReadString( node.toElement(), "id", "" ); + TQString id = XmlReadString( node.toElement(), "id", "" ); bool hidden = (XmlReadString(node.toElement(), "hidden", "false") == "true"); if( id.isEmpty() ) @@ -532,7 +532,7 @@ bool KivioDoc::loadXML( QIODevice *, const QDomDocument& doc ) node = node.nextSibling(); } - QString us = kivio.attribute("units", Kivio::Config::unit()); + TQString us = kivio.attribute("units", Kivio::Config::unit()); bool isInt = false; int u = us.toInt(&isInt); @@ -550,26 +550,26 @@ bool KivioDoc::loadXML( QIODevice *, const QDomDocument& doc ) return true; } -bool KivioDoc::loadStencilSpawnerSet(const QString &id, bool hidden) +bool KivioDoc::loadStencilSpawnerSet(const TQString &id, bool hidden) { KStandardDirs *dirs = KGlobal::dirs(); - QStringList dirList = dirs->findDirs("data", "kivio/stencils"); - QString rootDir; + TQStringList dirList = dirs->findDirs("data", "kivio/stencils"); + TQString rootDir; // Iterate through all data directories - for( QStringList::Iterator it = dirList.begin(); it != dirList.end(); ++it ) + for( TQStringList::Iterator it = dirList.begin(); it != dirList.end(); ++it ) { rootDir = (*it); // Within each data directory, iterate through all directories looking // for a filename (dir) that matches the parameter - QDir d(rootDir); - d.setFilter( QDir::Dirs ); - d.setSorting( QDir::Name ); + TQDir d(rootDir); + d.setFilter( TQDir::Dirs ); + d.setSorting( TQDir::Name ); - const QFileInfoList *list = d.entryInfoList(); - QFileInfoListIterator listIT( *list ); - QFileInfo *fi; + const TQFileInfoList *list = d.entryInfoList(); + TQFileInfoListIterator listIT( *list ); + TQFileInfo *fi; // Loop through the outer directories (like BasicFlowcharting) while( (fi=listIT.current()) ) @@ -577,13 +577,13 @@ bool KivioDoc::loadStencilSpawnerSet(const QString &id, bool hidden) if( fi->fileName() != "." && fi->fileName() != ".." ) { - QDir innerD(fi->absFilePath() ); - innerD.setFilter( QDir::Dirs ); - innerD.setSorting( QDir::Name ); + TQDir innerD(fi->absFilePath() ); + innerD.setFilter( TQDir::Dirs ); + innerD.setSorting( TQDir::Name ); - const QFileInfoList *innerList = innerD.entryInfoList(); - QFileInfoListIterator innerIT( *innerList ); - QFileInfo *innerFI; + const TQFileInfoList *innerList = innerD.entryInfoList(); + TQFileInfoListIterator innerIT( *innerList ); + TQFileInfo *innerFI; // Loop through the inner directories (like FlowChartingShapes1) while( (innerFI = innerIT.current()) ) @@ -592,7 +592,7 @@ bool KivioDoc::loadStencilSpawnerSet(const QString &id, bool hidden) innerFI->fileName() != "." ) { // Compare the descriptions - QString foundId; + TQString foundId; // TODO: use ID system here for loading foundId = KivioStencilSpawnerSet::readId(innerFI->absFilePath()); @@ -626,8 +626,8 @@ bool KivioDoc::completeLoading( KoStore* ) KivioPage* KivioDoc::createPage() { - QString s( i18n("Page%1") ); - s = s.arg( m_iPageId++ ); + TQString s( i18n("Page%1") ); + s = s.tqarg( m_iPageId++ ); KivioPage* t = new KivioPage(m_pMap, s); t->setPageName(s,true); @@ -644,20 +644,20 @@ void KivioDoc::addPage( KivioPage* page ) void KivioDoc::insertPage( KivioPage * page ) { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KivioView*)it.current())->insertPage( page ); } void KivioDoc::takePage( KivioPage * page ) { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KivioView*)it.current())->removePage( page ); } -void KivioDoc::paintContent( QPainter& painter, const QRect& rect, bool transparent, double /*zoomX*/, double /*zoomY*/ ) +void KivioDoc::paintContent( TQPainter& painter, const TQRect& rect, bool transparent, double /*zoomX*/, double /*zoomY*/ ) { KivioPage* page = m_pMap->firstPage(); if ( !page ) @@ -670,18 +670,18 @@ void KivioDoc::paintContent( QPainter& painter, const QRect& rect, bool transpar float zw = (float) rect.width() / (float)zoom.zoomItX(r.width()); float zh = (float) rect.height() / (float)zoom.zoomItY(r.height()); - float z = QMIN(zw, zh); + float z = TQMIN(zw, zh); //kdDebug(43000) << "paintContent: w = " << rect.width() << " h = " << rect.height() << endl; - zoom.setZoomAndResolution(qRound(z * 100), KoGlobal::dpiX(), + zoom.setZoomAndResolution(tqRound(z * 100), KoGlobal::dpiX(), KoGlobal::dpiY()); KivioScreenPainter ksp(&painter); ksp.painter()->translate( - zoom.zoomItX(r.x()), - zoom.zoomItY(r.y()) ); - paintContent(ksp,rect,transparent,page, QPoint(zoom.zoomItX(r.x()), zoom.zoomItY(r.y())), &zoom, false, false); - ksp.setPainter(0L); // Important! Don't delete the QPainter!!! + paintContent(ksp,rect,transparent,page, TQPoint(zoom.zoomItX(r.x()), zoom.zoomItY(r.y())), &zoom, false, false); + ksp.setPainter(0L); // Important! Don't delete the TQPainter!!! } -void KivioDoc::paintContent( KivioPainter& painter, const QRect& rect, bool transparent, KivioPage* page, QPoint p0, KoZoomHandler* zoom, bool drawConnectorTargets, bool drawSelection ) +void KivioDoc::paintContent( KivioPainter& painter, const TQRect& rect, bool transparent, KivioPage* page, TQPoint p0, KoZoomHandler* zoom, bool drawConnectorTargets, bool drawSelection ) { if ( isLoading() ) return; @@ -692,7 +692,7 @@ void KivioDoc::paintContent( KivioPainter& painter, const QRect& rect, bool tran void KivioDoc::printContent( KPrinter &prn ) { KivioScreenPainter p; - QValueList<int> pages = prn.pageList(); + TQValueList<int> pages = prn.pageList(); KivioPage *pPage; // ### HACK: disable zooming-when-printing if embedded parts are used. @@ -704,11 +704,11 @@ void KivioDoc::printContent( KPrinter &prn ) p.start(&prn); - QPaintDeviceMetrics metrics( &prn ); + TQPaintDeviceMetrics metrics( &prn ); p.painter()->scale( (double)metrics.logicalDpiX() / (double)dpiX, (double)metrics.logicalDpiY() / (double)dpiY ); - QValueList<int>::iterator it; + TQValueList<int>::iterator it; for(it = pages.begin(); it != pages.end(); ++it) { pPage = m_pMap->pageList().at((*it)-1); @@ -723,7 +723,7 @@ void KivioDoc::printContent( KPrinter &prn ) } // TODO: Fix for id system -KivioStencilSpawnerSet* KivioDoc::findSpawnerSet(const QString& dirName, const QString& id) +KivioStencilSpawnerSet* KivioDoc::findSpawnerSet(const TQString& dirName, const TQString& id) { KivioStencilSpawnerSet *pSet = m_pLstSpawnerSets->first(); while(pSet) @@ -739,9 +739,9 @@ KivioStencilSpawnerSet* KivioDoc::findSpawnerSet(const QString& dirName, const Q return 0; } -void KivioDoc::addSpawnerSet( const QString &dirName ) +void KivioDoc::addSpawnerSet( const TQString &dirName ) { - QString id = KivioStencilSpawnerSet::readId( dirName ); + TQString id = KivioStencilSpawnerSet::readId( dirName ); KivioStencilSpawnerSet* set = findSpawnerSet(dirName, id); if(set) @@ -769,8 +769,8 @@ void KivioDoc::addSpawnerSet( const QString &dirName ) m_stencilSetLoadQueue.append(set); if(!m_loadTimer) { - m_loadTimer = new QTimer(this); - connect(m_loadTimer, SIGNAL(timeout()), this, SLOT(loadStencil())); + m_loadTimer = new TQTimer(this); + connect(m_loadTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(loadStencil())); } if(!m_loadTimer->isActive()) { @@ -779,7 +779,7 @@ void KivioDoc::addSpawnerSet( const QString &dirName ) } } -void KivioDoc::addSpawnerSetDuringLoad(const QString& dirName, bool hidden) +void KivioDoc::addSpawnerSetDuringLoad(const TQString& dirName, bool hidden) { KivioStencilSpawnerSet *set; @@ -793,11 +793,11 @@ void KivioDoc::addSpawnerSetDuringLoad(const QString& dirName, bool hidden) return; } - QStringList::iterator it; - QStringList files = set->files(); + TQStringList::iterator it; + TQStringList files = set->files(); for(it = files.begin(); it != files.end(); ++it) { - QString fileName = set->dir() + "/" + (*it); + TQString fileName = set->dir() + "/" + (*it); set->loadFile(fileName); } @@ -845,7 +845,7 @@ bool KivioDoc::removeSpawnerSet( KivioStencilSpawnerSet *pSet ) * Iterates through all spawner objects in the stencil set checking if * they exist in any of the pages. */ -void KivioDoc::slotDeleteStencilSet( DragBarButton *pBtn, QWidget *w, KivioStackBar *pBar ) +void KivioDoc::slotDeleteStencilSet( DragBarButton *pBtn, TQWidget *w, KivioStackBar *pBar ) { KivioIconView* pIconView = static_cast<KivioIconView*>(w); KivioStencilSpawnerSet* pSet = pIconView->spawnerSet(); @@ -922,30 +922,30 @@ void KivioDoc::slotSelectionChanged() emit sig_selectionChanged(); } -KivioStencilSpawner* KivioDoc::findStencilSpawner( const QString& setId, const QString& stencilId ) +KivioStencilSpawner* KivioDoc::findStencilSpawner( const TQString& setId, const TQString& stencilId ) { KivioStencilSpawnerSet *pSpawnerSet = m_pLstSpawnerSets->first(); while( pSpawnerSet ) { - if( pSpawnerSet->id() == setId && pSpawnerSet->find(stencilId) ) + if( pSpawnerSet->id() == setId && pSpawnerSet->tqfind(stencilId) ) { - return pSpawnerSet->find(stencilId); - // return pSpawnerSet->find(name) + return pSpawnerSet->tqfind(stencilId); + // return pSpawnerSet->tqfind(name) } pSpawnerSet = m_pLstSpawnerSets->next(); } - if( m_pInternalSet->id() == setId && m_pInternalSet->find(stencilId) ) + if( m_pInternalSet->id() == setId && m_pInternalSet->tqfind(stencilId) ) { - return m_pInternalSet->find(stencilId); + return m_pInternalSet->tqfind(stencilId); } return NULL; } -KivioStencilSpawner* KivioDoc::findInternalStencilSpawner( const QString& stencilId ) +KivioStencilSpawner* KivioDoc::findInternalStencilSpawner( const TQString& stencilId ) { - return m_pInternalSet->find(stencilId); + return m_pInternalSet->tqfind(stencilId); } void KivioDoc::addInternalStencilSpawner(KivioStencilSpawner* spawner) @@ -960,14 +960,14 @@ void KivioDoc::updateView(KivioPage* page) void KivioDoc::updateButton() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KivioView*)it.current())->updateButton(); } void KivioDoc::resetLayerPanel() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KivioView*)it.current())->resetLayerPanel(); } @@ -1002,7 +1002,7 @@ void KivioDoc::slotCommandExecuted() void KivioDoc::updateProtectPanelCheckBox() { - QPtrListIterator<KoView> it( views() ); + TQPtrListIterator<KoView> it( views() ); for (; it.current(); ++it ) ((KivioView*)it.current())->updateProtectPanelCheckBox(); } @@ -1010,10 +1010,10 @@ void KivioDoc::updateProtectPanelCheckBox() void KivioDoc::loadStencil() { KivioStencilSpawnerSet* set = m_stencilSetLoadQueue.first(); - QString fileName = set->dir() + "/" + set->files()[m_currentFile]; + TQString fileName = set->dir() + "/" + set->files()[m_currentFile]; set->loadFile(fileName); m_currentFile++; - emit progress(qRound(((float)m_currentFile / (float)set->files().count()) * 100.0)); + emit progress(tqRound(((float)m_currentFile / (float)set->files().count()) * 100.0)); if(m_currentFile >= set->files().count()) { m_pLstSpawnerSets->append(set); @@ -1038,13 +1038,13 @@ void KivioDoc::loadStencil() void KivioDoc::updateGuideLines(KoView* sender) { - QValueList<double> hGuideLines; - QValueList<double> vGuideLines; + TQValueList<double> hGuideLines; + TQValueList<double> vGuideLines; KivioView* view = static_cast<KivioView*>(sender); view->canvasWidget()->guideLines().getGuideLines(hGuideLines, vGuideLines); view->activePage()->setGuideLines(hGuideLines, vGuideLines); - QPtrListIterator<KoView> it(views()); + TQPtrListIterator<KoView> it(views()); KivioView* itView = 0; for (; it.current(); ++it ) { @@ -1057,9 +1057,9 @@ void KivioDoc::updateGuideLines(KoView* sender) void KivioDoc::updateGuideLines(KivioPage* page) { - QValueList<double> hGuideLines = page->horizontalGuideLines(); - QValueList<double> vGuideLines = page->verticalGuideLines(); - QPtrListIterator<KoView> it(views()); + TQValueList<double> hGuideLines = page->horizontalGuideLines(); + TQValueList<double> vGuideLines = page->verticalGuideLines(); + TQPtrListIterator<KoView> it(views()); KivioView* itView = 0; for (; it.current(); ++it ) { |