summaryrefslogtreecommitdiffstats
path: root/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp')
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp b/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp
index e410d851..588a468e 100644
--- a/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp
@@ -26,14 +26,14 @@
#include "kivio_stencil_spawner.h"
#include "kivio_stencil_spawner_info.h"
-#include <qdom.h>
-#include <qfile.h>
-#include <qiodevice.h>
-#include <qpainter.h>
-#include <qpoint.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qfileinfo.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqiodevice.h>
+#include <tqpainter.h>
+#include <tqpoint.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
@@ -43,7 +43,7 @@ KivioSMLStencilSpawner::KivioSMLStencilSpawner( KivioStencilSpawnerSet *p )
{
m_pStencil = new KivioSMLStencil();
- m_pTargets = new QPtrList<KivioConnectorTarget>;
+ m_pTargets = new TQPtrList<KivioConnectorTarget>;
m_pTargets->setAutoDelete(true);
}
@@ -64,21 +64,21 @@ KivioSMLStencilSpawner::~KivioSMLStencilSpawner()
kdDebug(43000) << "* SMLStencilSpawner "<< m_pInfo->id() << " deleted" << endl;
}
-QDomElement KivioSMLStencilSpawner::saveXML( QDomDocument &doc )
+TQDomElement KivioSMLStencilSpawner::saveXML( TQDomDocument &doc )
{
- QDomElement spawnE = doc.createElement("KivioSMLStencilSpawner");
+ TQDomElement spawnE = doc.createElement("KivioSMLStencilSpawner");
XmlWriteString( spawnE, "id", m_pInfo->id() );
return spawnE;
}
-bool KivioSMLStencilSpawner::load( const QString &file )
+bool KivioSMLStencilSpawner::load( const TQString &file )
{
- QDomDocument d("test");
+ TQDomDocument d("test");
- m_filename = QString(file);
- QFile f(file);
+ m_filename = TQString(file);
+ TQFile f(file);
if( f.open( IO_ReadOnly )==false )
{
@@ -99,14 +99,14 @@ bool KivioSMLStencilSpawner::load( const QString &file )
}
}
-bool KivioSMLStencilSpawner::loadXML( const QString &file, QDomDocument &d )
+bool KivioSMLStencilSpawner::loadXML( const TQString &file, TQDomDocument &d )
{
KivioConnectorTarget *pTarget;
- QDomElement root = d.documentElement();
- QDomElement e;
- QDomNode node = root.firstChild();
- QString nodeName;
+ TQDomElement root = d.documentElement();
+ TQDomElement e;
+ TQDomNode node = root.firstChild();
+ TQString nodeName;
while( !node.isNull() )
{
@@ -114,7 +114,7 @@ bool KivioSMLStencilSpawner::loadXML( const QString &file, QDomDocument &d )
if( nodeName.compare("KivioSMLStencilSpawnerInfo")==0 )
{
- m_pInfo->loadXML( (const QDomElement)node.toElement() );
+ m_pInfo->loadXML( (const TQDomElement)node.toElement() );
}
else if( nodeName.compare("KivioShape")==0 )
{
@@ -130,7 +130,7 @@ bool KivioSMLStencilSpawner::loadXML( const QString &file, QDomDocument &d )
else if( nodeName.compare("KivioConnectorTarget")==0 )
{
pTarget = new KivioConnectorTarget();
- pTarget->loadXML( (const QDomElement)node.toElement() );
+ pTarget->loadXML( (const TQDomElement)node.toElement() );
m_pStencil->m_pConnectorTargets->append( pTarget );
}
@@ -151,11 +151,11 @@ bool KivioSMLStencilSpawner::loadXML( const QString &file, QDomDocument &d )
}
// Now load the xpm
- QFileInfo finfo(file);
- QString pixFile = finfo.dirPath(true) + "/" + finfo.baseName() + ".xpm";
+ TQFileInfo finfo(file);
+ TQString pixFile = finfo.dirPath(true) + "/" + finfo.baseName() + ".xpm";
if(!m_icon.load( pixFile )) {
- QString pixFile = finfo.dirPath(true) + "/" + finfo.baseName() + ".png";
+ TQString pixFile = finfo.dirPath(true) + "/" + finfo.baseName() + ".png";
m_icon.load( pixFile );
}
@@ -164,15 +164,15 @@ bool KivioSMLStencilSpawner::loadXML( const QString &file, QDomDocument &d )
/**
- * Loads a shape from an XML node.
+ * Loads a tqshape from an XML node.
*/
-void KivioSMLStencilSpawner::loadShape( QDomNode &shapeNode )
+void KivioSMLStencilSpawner::loadShape( TQDomNode &tqshapeNode )
{
KivioShapeData::KivioShapeType t;
KivioShape *pShape = NULL;
- QDomElement shapeElement = shapeNode.toElement();
+ TQDomElement tqshapeElement = tqshapeNode.toElement();
- t = KivioShapeData::shapeTypeFromString( XmlReadString( shapeElement, "type", "None" ) );
+ t = KivioShapeData::tqshapeTypeFromString( XmlReadString( tqshapeElement, "type", "None" ) );
switch( t )
{
@@ -180,51 +180,51 @@ void KivioSMLStencilSpawner::loadShape( QDomNode &shapeNode )
break;
case KivioShapeData::kstArc:
- pShape = KivioShape::loadShapeArc( shapeElement );
+ pShape = KivioShape::loadShapeArc( tqshapeElement );
break;
case KivioShapeData::kstPie:
- pShape = KivioShape::loadShapePie( shapeElement );
+ pShape = KivioShape::loadShapePie( tqshapeElement );
break;
case KivioShapeData::kstLineArray:
- pShape = KivioShape::loadShapeLineArray( shapeElement );
+ pShape = KivioShape::loadShapeLineArray( tqshapeElement );
break;
case KivioShapeData::kstPolyline:
- pShape = KivioShape::loadShapePolyline( shapeElement );
+ pShape = KivioShape::loadShapePolyline( tqshapeElement );
break;
case KivioShapeData::kstPolygon:
- pShape = KivioShape::loadShapePolygon( shapeElement );
+ pShape = KivioShape::loadShapePolygon( tqshapeElement );
break;
case KivioShapeData::kstBezier:
- pShape = KivioShape::loadShapeBezier( shapeElement );
+ pShape = KivioShape::loadShapeBezier( tqshapeElement );
break;
case KivioShapeData::kstRectangle:
- pShape = KivioShape::loadShapeRectangle( shapeElement );
+ pShape = KivioShape::loadShapeRectangle( tqshapeElement );
break;
case KivioShapeData::kstRoundRectangle:
- pShape = KivioShape::loadShapeRoundRectangle( shapeElement );
+ pShape = KivioShape::loadShapeRoundRectangle( tqshapeElement );
break;
case KivioShapeData::kstEllipse:
- pShape = KivioShape::loadShapeEllipse( shapeElement );
+ pShape = KivioShape::loadShapeEllipse( tqshapeElement );
break;
case KivioShapeData::kstOpenPath:
- pShape = KivioShape::loadShapeOpenPath( shapeElement );
+ pShape = KivioShape::loadShapeOpenPath( tqshapeElement );
break;
case KivioShapeData::kstClosedPath:
- pShape = KivioShape::loadShapeClosedPath( shapeElement );
+ pShape = KivioShape::loadShapeClosedPath( tqshapeElement );
break;
case KivioShapeData::kstTextBox:
- pShape = KivioShape::loadShapeTextBox( shapeElement );
+ pShape = KivioShape::loadShapeTextBox( tqshapeElement );
break;
default: