summaryrefslogtreecommitdiffstats
path: root/kivio/plugins/kiviosmlconnector/sml_connector
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kivio/plugins/kiviosmlconnector/sml_connector
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kivio/plugins/kiviosmlconnector/sml_connector')
-rw-r--r--kivio/plugins/kiviosmlconnector/sml_connector/sml_connector.cpp62
-rw-r--r--kivio/plugins/kiviosmlconnector/sml_connector/sml_connector.h31
2 files changed, 47 insertions, 46 deletions
diff --git a/kivio/plugins/kiviosmlconnector/sml_connector/sml_connector.cpp b/kivio/plugins/kiviosmlconnector/sml_connector/sml_connector.cpp
index b6770700..3ab38fa4 100644
--- a/kivio/plugins/kiviosmlconnector/sml_connector/sml_connector.cpp
+++ b/kivio/plugins/kiviosmlconnector/sml_connector/sml_connector.cpp
@@ -32,13 +32,13 @@
#include "kivio_stencil_spawner_set.h"
#include "kivio_text_style.h"
#include "kivio_shape.h"
-#include "kivio_shape_data.h"
+#include "kivio_tqshape_data.h"
#include "kivio_point.h"
#include "tkmath.h"
-#include <qcolor.h>
-#include <qpixmap.h>
+#include <tqcolor.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <KoZoomHandler.h>
#include <kiconloader.h>
@@ -48,13 +48,13 @@ static KivioStencilSpawnerInfo sinfo = KivioStencilSpawnerInfo( "Ian Reinhart Ge
K_EXPORT_COMPONENT_FACTORY( sml_connector, KGenericFactory<KivioSMLConnectorFactory>( "KivioSMLConnectorFactory" ) )
-KivioSMLConnectorFactory::KivioSMLConnectorFactory( QObject *parent, const char* name, const QStringList& args ) :
- KivioStencilFactory( parent, name, args )
+KivioSMLConnectorFactory::KivioSMLConnectorFactory( TQObject *tqparent, const char* name, const TQStringList& args ) :
+ KivioStencilFactory( tqparent, name, args )
{
kdDebug(43000) << "new sml stencil factory: " << endl;
}
-KivioStencil *KivioSMLConnectorFactory::NewStencil( const QString& name )
+KivioStencil *KivioSMLConnectorFactory::NewStencil( const TQString& name )
{
return new KivioSMLConnector( name );
}
@@ -65,7 +65,7 @@ KivioStencil *KivioSMLConnectorFactory::NewStencil()
}
-QPixmap *KivioSMLConnectorFactory::GetIcon()
+TQPixmap *KivioSMLConnectorFactory::GetIcon()
{
return & BarIcon( "SML_conn" );
}
@@ -75,7 +75,7 @@ KivioStencilSpawnerInfo *KivioSMLConnectorFactory::GetSpawnerInfo()
return & sinfo;
}
-KivioSMLConnector::KivioSMLConnector( const QString &name )
+KivioSMLConnector::KivioSMLConnector( const TQString &name )
: Kivio1DStencil(), m_name( name )
{
@@ -96,9 +96,9 @@ KivioSMLConnector::KivioSMLConnector( const QString &name )
// This is a stencil of type connector
setType( kstConnector );
- // We only have one shape, an open path.
- //m_shape = new KivioShape();
- //m_shape->shapeData() ->setShapeType( KivioShapeData::kstOpenPath );
+ // We only have one tqshape, an open path.
+ //m_tqshape = new KivioShape();
+ //m_tqshape->tqshapeData() ->setShapeType( KivioShapeData::kstOpenPath );
loadPath( name );
}
@@ -196,11 +196,11 @@ KivioStencil *KivioSMLConnector::duplicate()
void KivioSMLConnector::drawOpenPath( KivioShape *pShape, KivioIntraStencilData *pData )
{
KivioPainter * painter;
- KivioShapeData *pShapeData = pShape->shapeData();
+ KivioShapeData *pShapeData = pShape->tqshapeData();
KivioPoint *pPoint, *pNewPoint;
- QPtrList <KivioPoint> *pPointList = pShapeData->pointList();
+ TQPtrList <KivioPoint> *pPointList = pShapeData->pointList();
- QPtrList <KivioPoint> *pNewPoints = new QPtrList<KivioPoint>;
+ TQPtrList <KivioPoint> *pNewPoints = new TQPtrList<KivioPoint>;
pNewPoints->setAutoDelete( true );
pPoint = pPointList->first();
@@ -262,10 +262,10 @@ void KivioSMLConnector::paint( KivioIntraStencilData *pData )
}
- // Build shape up from m_pConnectorPoints
+ // Build tqshape up from m_pConnectorPoints
- QPtrList <KivioPoint> *pNewPoints = new QPtrList<KivioPoint>;
+ TQPtrList <KivioPoint> *pNewPoints = new TQPtrList<KivioPoint>;
pNewPoints->setAutoDelete( true );
pNewPoints->append(new KivioPoint( zoomHandler->zoomItX( m_pStart->x() ),
@@ -309,27 +309,27 @@ void KivioSMLConnector::paintOutline( KivioIntraStencilData *pData )
paint( pData );
}
-bool KivioSMLConnector::saveCustom( QDomElement &e, QDomDocument &doc )
+bool KivioSMLConnector::saveCustom( TQDomElement &e, TQDomDocument &doc )
{
kdDebug(43000) << "Save custom " << endl;
e.appendChild( saveArrowHeads( doc ) );
- //QDomElement type = m_shape->saveXML(doc);
+ //TQDomElement type = m_tqshape->saveXML(doc);
KivioConnectorPoint *p = m_PointList.first();
while ( p )
{
- QDomElement pt = p->saveXML( doc );
+ TQDomElement pt = p->saveXML( doc );
e.appendChild( pt );
p = m_PointList.next();
}
return true;
}
-bool KivioSMLConnector::loadCustom( const QDomElement &e )
+bool KivioSMLConnector::loadCustom( const TQDomElement &e )
{
kdDebug(43000) << "Load custom " << endl;
- QDomNode node;
- QString name;
+ TQDomNode node;
+ TQString name;
node = e.firstChild();
while ( !node.isNull() )
@@ -341,8 +341,8 @@ bool KivioSMLConnector::loadCustom( const QDomElement &e )
}
else if ( name == "KivioShape" )
{
- //m_shape->loadXML(node.toElement());
- QDomNode pts = node.firstChild();
+ //m_tqshape->loadXML(node.toElement());
+ TQDomNode pts = node.firstChild();
while ( !pts.isNull() )
{
KivioConnectorPoint * pt = new KivioConnectorPoint();
@@ -360,9 +360,9 @@ bool KivioSMLConnector::loadCustom( const QDomElement &e )
return true;
}
-QDomElement KivioSMLConnector::saveArrowHeads( QDomDocument &doc )
+TQDomElement KivioSMLConnector::saveArrowHeads( TQDomDocument &doc )
{
- QDomElement e = doc.createElement( "KivioArrowHeads" );
+ TQDomElement e = doc.createElement( "KivioArrowHeads" );
e.appendChild( m_startAH->saveXML( doc ) );
e.appendChild( m_endAH->saveXML( doc ) );
@@ -370,11 +370,11 @@ QDomElement KivioSMLConnector::saveArrowHeads( QDomDocument &doc )
return e;
}
-bool KivioSMLConnector::loadArrowHeads( const QDomElement &e )
+bool KivioSMLConnector::loadArrowHeads( const TQDomElement &e )
{
- QDomNode node;
- QString nodeName;
- QDomElement arrowE;
+ TQDomNode node;
+ TQString nodeName;
+ TQDomElement arrowE;
bool first = true;
node = e.firstChild();
@@ -404,7 +404,7 @@ bool KivioSMLConnector::loadArrowHeads( const QDomElement &e )
}
-bool KivioSMLConnector::loadPath( const QString &file )
+bool KivioSMLConnector::loadPath( const TQString &file )
{
kdDebug(43000) << "Loading :" << file << endl;
diff --git a/kivio/plugins/kiviosmlconnector/sml_connector/sml_connector.h b/kivio/plugins/kiviosmlconnector/sml_connector/sml_connector.h
index 4371ff8a..0be46d46 100644
--- a/kivio/plugins/kiviosmlconnector/sml_connector/sml_connector.h
+++ b/kivio/plugins/kiviosmlconnector/sml_connector/sml_connector.h
@@ -31,9 +31,9 @@
class KivioPage;
class KivioShape;
-#include <qstringlist.h>
-#include <qcolor.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqcolor.h>
+#include <tqdom.h>
#include "kivio_1d_stencil.h"
@@ -41,24 +41,24 @@ class KivioShape;
class KivioSMLConnector : public Kivio1DStencil
{
private:
- bool loadPath(const QString &file);
+ bool loadPath(const TQString &file);
//void drawOpenPath( KivioShape *, KivioIntraStencilData * );
- KivioShape *m_shape;
- QPtrList<KivioConnectorPoint> m_PointList;
+ KivioShape *m_tqshape;
+ TQPtrList<KivioConnectorPoint> m_PointList;
- QString m_name;
+ TQString m_name;
protected:
KivioArrowHead *m_startAH;
KivioArrowHead *m_endAH;
- bool loadArrowHeads( const QDomElement & );
- QDomElement saveArrowHeads( QDomDocument & );
- virtual bool loadCustom( const QDomElement & );
- virtual bool saveCustom( QDomElement &, QDomDocument & );
+ bool loadArrowHeads( const TQDomElement & );
+ TQDomElement saveArrowHeads( TQDomDocument & );
+ virtual bool loadCustom( const TQDomElement & );
+ virtual bool saveCustom( TQDomElement &, TQDomDocument & );
public:
- KivioSMLConnector(const QString& name);
+ KivioSMLConnector(const TQString& name);
virtual ~KivioSMLConnector();
virtual void setStartPoint( double, double );
@@ -93,11 +93,12 @@ public:
class KivioSMLConnectorFactory : public KivioStencilFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KivioSMLConnectorFactory(QObject *parent=0, const char* name=0, const QStringList& args = QStringList());
- KivioStencil *NewStencil(const QString& name);
+ KivioSMLConnectorFactory(TQObject *tqparent=0, const char* name=0, const TQStringList& args = TQStringList());
+ KivioStencil *NewStencil(const TQString& name);
KivioStencil *NewStencil();
- QPixmap *GetIcon();
+ TQPixmap *GetIcon();
KivioStencilSpawnerInfo *GetSpawnerInfo();
};
#endif