summaryrefslogtreecommitdiffstats
path: root/kivio/kiviopart/kiviosdk
diff options
context:
space:
mode:
Diffstat (limited to 'kivio/kiviopart/kiviosdk')
-rw-r--r--kivio/kiviopart/kiviosdk/diapathparser.cpp46
-rw-r--r--kivio/kiviopart/kiviosdk/diapathparser.h16
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_1d_stencil.cpp74
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_1d_stencil.h46
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_arrowhead.cpp28
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_arrowhead.h8
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.cpp44
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.h28
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_base_target_stencil.cpp80
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_base_target_stencil.h48
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_common.cpp138
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_common.h32
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_connector_point.cpp24
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_connector_point.h6
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_connector_target.cpp12
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_connector_target.h10
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.cpp210
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.h24
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_fill_style.cpp28
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_fill_style.h30
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_gradient.cpp24
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_gradient.h18
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_group_stencil.cpp86
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_group_stencil.h50
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_layer.cpp54
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_layer.h42
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_line_style.cpp26
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_line_style.h18
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_painter.cpp4
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_painter.h64
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_plugin_stencil_spawner.cpp14
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_plugin_stencil_spawner.h20
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_point.cpp16
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_point.h8
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_py_stencil.cpp178
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_py_stencil.h46
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_py_stencil_spawner.cpp46
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_py_stencil_spawner.h28
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_screen_painter.cpp204
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_screen_painter.h46
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_shape.cpp264
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_shape.h42
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_shape_data.cpp130
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_shape_data.h54
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_shape_painter.cpp8
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_shape_painter.h6
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp410
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_sml_stencil.h64
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp82
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.h30
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_stencil.cpp20
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_stencil.h68
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_stencil_spawner.cpp8
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_stencil_spawner.h30
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_stencil_spawner_info.cpp14
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_stencil_spawner_info.h26
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.cpp90
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.h50
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_text_style.cpp32
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_text_style.h30
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_wrap.cpp14
-rw-r--r--kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp60
-rw-r--r--kivio/kiviopart/kiviosdk/kiviopolylineconnector.h12
-rw-r--r--kivio/kiviopart/kiviosdk/kiviostencilfactory.h19
-rw-r--r--kivio/kiviopart/kiviosdk/polylineconnectorspawner.cpp8
-rw-r--r--kivio/kiviopart/kiviosdk/polylineconnectorspawner.h10
66 files changed, 1753 insertions, 1752 deletions
diff --git a/kivio/kiviopart/kiviosdk/diapathparser.cpp b/kivio/kiviopart/kiviosdk/diapathparser.cpp
index d0ceb271..1af85056 100644
--- a/kivio/kiviopart/kiviosdk/diapathparser.cpp
+++ b/kivio/kiviopart/kiviosdk/diapathparser.cpp
@@ -19,7 +19,7 @@
#include "diapathparser.h"
-DiaPointFinder::DiaPointFinder(QValueList<float> *xlist, QValueList<float> *ylist) :
+DiaPointFinder::DiaPointFinder(TQValueList<float> *xlist, TQValueList<float> *ylist) :
SVGPathParser(), m_xlist(xlist), m_ylist(ylist)
{
;
@@ -48,8 +48,8 @@ void DiaPointFinder::svgClosePath()
{
}
-DiaPathParser::DiaPathParser(QDomDocument *doc, QDomElement *shape, float xscale, float yscale, float lowestx, float lowesty) :
- SVGPathParser(), m_doc(doc), m_shape(shape),
+DiaPathParser::DiaPathParser(TQDomDocument *doc, TQDomElement *tqshape, float xscale, float yscale, float lowestx, float lowesty) :
+ SVGPathParser(), m_doc(doc), m_tqshape(tqshape),
m_xscale(xscale), m_yscale(yscale),
m_lowestx(lowestx), m_lowesty(lowesty)
{
@@ -69,15 +69,15 @@ void DiaPathParser::svgLineTo( double x1, double y1, bool )
float currentY = y1;
// Create the line
- QDomElement kivioPointElement = m_doc->createElement("KivioPoint");
- kivioPointElement.setAttribute("x", QString::number(diaPointToKivio(lastX,true) * m_xscale));
- kivioPointElement.setAttribute("y", QString::number(diaPointToKivio(lastY, false) * m_yscale));
- m_shape->appendChild(kivioPointElement);
+ TQDomElement kivioPointElement = m_doc->createElement("KivioPoint");
+ kivioPointElement.setAttribute("x", TQString::number(diaPointToKivio(lastX,true) * m_xscale));
+ kivioPointElement.setAttribute("y", TQString::number(diaPointToKivio(lastY, false) * m_yscale));
+ m_tqshape->appendChild(kivioPointElement);
kivioPointElement = m_doc->createElement("KivioPoint");
- kivioPointElement.setAttribute("x", QString::number(diaPointToKivio(currentX,true) * m_xscale));
- kivioPointElement.setAttribute("y", QString::number(diaPointToKivio(currentY, false) * m_yscale));
- m_shape->appendChild(kivioPointElement);
+ kivioPointElement.setAttribute("x", TQString::number(diaPointToKivio(currentX,true) * m_xscale));
+ kivioPointElement.setAttribute("y", TQString::number(diaPointToKivio(currentY, false) * m_yscale));
+ m_tqshape->appendChild(kivioPointElement);
lastX = currentX;
lastY = currentY;
}
@@ -93,37 +93,37 @@ void DiaPathParser::svgCurveToCubic( double x1, double y1, double x2, double y2,
float currentY = y3;
// Create the bezier
- QDomElement kivioPointElement = m_doc->createElement("KivioPoint");
+ TQDomElement kivioPointElement = m_doc->createElement("KivioPoint");
kivioPointElement.setAttribute("x",
- QString::number(diaPointToKivio(lastX,true) * m_xscale));
+ TQString::number(diaPointToKivio(lastX,true) * m_xscale));
kivioPointElement.setAttribute("y",
- QString::number(diaPointToKivio(lastY, false) * m_yscale));
+ TQString::number(diaPointToKivio(lastY, false) * m_yscale));
kivioPointElement.setAttribute("type", "bezier");
- m_shape->appendChild(kivioPointElement);
+ m_tqshape->appendChild(kivioPointElement);
kivioPointElement = m_doc->createElement("KivioPoint");
kivioPointElement.setAttribute("x",
- QString::number(diaPointToKivio(lastControlX,true) * m_xscale));
+ TQString::number(diaPointToKivio(lastControlX,true) * m_xscale));
kivioPointElement.setAttribute("y",
- QString::number(diaPointToKivio(lastControlY, false) * m_yscale));
+ TQString::number(diaPointToKivio(lastControlY, false) * m_yscale));
kivioPointElement.setAttribute("type", "bezier");
- m_shape->appendChild(kivioPointElement);
+ m_tqshape->appendChild(kivioPointElement);
kivioPointElement = m_doc->createElement("KivioPoint");
kivioPointElement.setAttribute("x",
- QString::number(diaPointToKivio(currentControlX,true) * m_xscale));
+ TQString::number(diaPointToKivio(currentControlX,true) * m_xscale));
kivioPointElement.setAttribute("y",
- QString::number(diaPointToKivio(currentControlY, false) * m_yscale));
+ TQString::number(diaPointToKivio(currentControlY, false) * m_yscale));
kivioPointElement.setAttribute("type", "bezier");
- m_shape->appendChild(kivioPointElement);
+ m_tqshape->appendChild(kivioPointElement);
kivioPointElement = m_doc->createElement("KivioPoint");
kivioPointElement.setAttribute("x",
- QString::number(diaPointToKivio(currentX,true) * m_xscale));
+ TQString::number(diaPointToKivio(currentX,true) * m_xscale));
kivioPointElement.setAttribute("y",
- QString::number(diaPointToKivio(currentY, false) * m_yscale));
+ TQString::number(diaPointToKivio(currentY, false) * m_yscale));
kivioPointElement.setAttribute("type", "bezier");
- m_shape->appendChild(kivioPointElement);
+ m_tqshape->appendChild(kivioPointElement);
lastX = currentX;
lastY = currentY;
}
diff --git a/kivio/kiviopart/kiviosdk/diapathparser.h b/kivio/kiviopart/kiviosdk/diapathparser.h
index b4522400..0a9439f6 100644
--- a/kivio/kiviopart/kiviosdk/diapathparser.h
+++ b/kivio/kiviopart/kiviosdk/diapathparser.h
@@ -21,27 +21,27 @@
#define __DIAPATHPARSER_H__
#include "svgpathparser.h"
-#include <qvaluelist.h>
-#include <qdom.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
class DiaPointFinder : public SVGPathParser
{
public:
- DiaPointFinder(QValueList<float> *xlist, QValueList<float> *ylist);
+ DiaPointFinder(TQValueList<float> *xlist, TQValueList<float> *ylist);
void svgMoveTo( double x1, double y1, bool abs = true );
void svgLineTo( double x1, double y1, bool abs = true );
void svgCurveToCubic( double x1, double y1, double x2, double y2, double x3, double y3, bool abs = true );
void svgClosePath();
private:
- QValueList<float> *m_xlist;
- QValueList<float> *m_ylist;
+ TQValueList<float> *m_xlist;
+ TQValueList<float> *m_ylist;
};
class DiaPathParser : public SVGPathParser
{
public:
- DiaPathParser(QDomDocument *doc, QDomElement *shape, float xscale, float yscale, float lowestx, float lowesty);
+ DiaPathParser(TQDomDocument *doc, TQDomElement *tqshape, float xscale, float yscale, float lowestx, float lowesty);
void svgMoveTo( double x1, double y1, bool abs = true );
void svgLineTo( double x1, double y1, bool abs = true );
@@ -51,8 +51,8 @@ class DiaPathParser : public SVGPathParser
private:
float diaPointToKivio(float point, bool xpoint);
- QDomDocument *m_doc;
- QDomElement *m_shape;
+ TQDomDocument *m_doc;
+ TQDomElement *m_tqshape;
float lastX;
float lastY;
float m_xscale;
diff --git a/kivio/kiviopart/kiviosdk/kivio_1d_stencil.cpp b/kivio/kiviopart/kiviosdk/kivio_1d_stencil.cpp
index 9971f5f7..23b03be6 100644
--- a/kivio/kiviopart/kiviosdk/kivio_1d_stencil.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_1d_stencil.cpp
@@ -59,8 +59,8 @@
#include <math.h>
#include <KoZoomHandler.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
/**
* Default constructor.
@@ -75,7 +75,7 @@ Kivio1DStencil::Kivio1DStencil()
m_pLineStyle = new KivioLineStyle();
m_pTextStyle = new KivioTextStyle();
- m_pConnectorPoints = new QPtrList<KivioConnectorPoint>;
+ m_pConnectorPoints = new TQPtrList<KivioConnectorPoint>;
m_pConnectorPoints->setAutoDelete(true);
m_pStart = new KivioConnectorPoint(this, true);
@@ -116,12 +116,12 @@ Kivio1DStencil::~Kivio1DStencil()
delete m_pConnectorPoints;
}
-void Kivio1DStencil::setFGColor( QColor c )
+void Kivio1DStencil::setFGColor( TQColor c )
{
m_pLineStyle->setColor(c);
}
-QColor Kivio1DStencil::fgColor()
+TQColor Kivio1DStencil::fgColor()
{
return m_pLineStyle->color();
}
@@ -156,12 +156,12 @@ int Kivio1DStencil::fillPattern()
return m_pFillStyle->brushStyle();
}
-void Kivio1DStencil::setBGColor( QColor c )
+void Kivio1DStencil::setBGColor( TQColor c )
{
m_pFillStyle->setColor(c);
}
-QColor Kivio1DStencil::bgColor()
+TQColor Kivio1DStencil::bgColor()
{
return m_pFillStyle->color();
}
@@ -413,10 +413,10 @@ void Kivio1DStencil::updateGeometry()
// file i/o routines
-bool Kivio1DStencil::loadXML( const QDomElement &e )
+bool Kivio1DStencil::loadXML( const TQDomElement &e )
{
- QDomNode node;
- QString name;
+ TQDomNode node;
+ TQString name;
node = e.firstChild();
while( !node.isNull() )
@@ -437,9 +437,9 @@ bool Kivio1DStencil::loadXML( const QDomElement &e )
}
-QDomElement Kivio1DStencil::createRootElement( QDomDocument &doc )
+TQDomElement Kivio1DStencil::createRootElement( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioPluginStencil");
+ TQDomElement e = doc.createElement("KivioPluginStencil");
XmlWriteString( e, "id", m_pSpawner->info()->id() );
XmlWriteString( e, "setId", m_pSpawner->set()->id() );
@@ -448,9 +448,9 @@ QDomElement Kivio1DStencil::createRootElement( QDomDocument &doc )
}
-QDomElement Kivio1DStencil::saveXML( QDomDocument &doc )
+TQDomElement Kivio1DStencil::saveXML( TQDomDocument &doc )
{
- QDomElement e = createRootElement(doc);
+ TQDomElement e = createRootElement(doc);
e.appendChild( saveProperties(doc) );
@@ -643,9 +643,9 @@ int Kivio1DStencil::resizeHandlePositions()
return (int)krhpNone;
}
-QDomElement Kivio1DStencil::saveConnectors( QDomDocument &doc )
+TQDomElement Kivio1DStencil::saveConnectors( TQDomDocument &doc )
{
- QDomElement eConns = doc.createElement("KivioConnectorList");
+ TQDomElement eConns = doc.createElement("KivioConnectorList");
KivioConnectorPoint *p;
p = m_pConnectorPoints->first();
@@ -659,15 +659,15 @@ QDomElement Kivio1DStencil::saveConnectors( QDomDocument &doc )
return eConns;
}
-bool Kivio1DStencil::loadConnectors( const QDomElement &e )
+bool Kivio1DStencil::loadConnectors( const TQDomElement &e )
{
m_pConnectorPoints->clear();
KivioConnectorPoint *p;
- QDomNode node = e.firstChild();
- QDomElement e2;
- QString name;
+ TQDomNode node = e.firstChild();
+ TQDomElement e2;
+ TQString name;
while( !node.isNull() )
{
@@ -715,11 +715,11 @@ bool Kivio1DStencil::loadConnectors( const QDomElement &e )
return true;
}
-QDomElement Kivio1DStencil::saveProperties( QDomDocument &doc )
+TQDomElement Kivio1DStencil::saveProperties( TQDomDocument &doc )
{
- QDomElement propE = doc.createElement("KivioStencilProperties");
+ TQDomElement propE = doc.createElement("KivioStencilProperties");
- QDomElement connE = doc.createElement("Kivio1DProperties");
+ TQDomElement connE = doc.createElement("Kivio1DProperties");
XmlWriteFloat( connE, "connectorWidth", m_connectorWidth );
XmlWriteInt( connE, "needsWidth", m_needsWidth );
propE.appendChild( connE );
@@ -732,7 +732,7 @@ QDomElement Kivio1DStencil::saveProperties( QDomDocument &doc )
propE.appendChild( saveConnectors(doc) );
- QDomElement customE = doc.createElement("CustomData");
+ TQDomElement customE = doc.createElement("CustomData");
if( saveCustom( customE, doc )==true )
{
propE.appendChild( customE );
@@ -741,11 +741,11 @@ QDomElement Kivio1DStencil::saveProperties( QDomDocument &doc )
return propE;
}
-bool Kivio1DStencil::loadProperties( const QDomElement &e )
+bool Kivio1DStencil::loadProperties( const TQDomElement &e )
{
- QDomNode node;
- QDomElement nodeE;
- QString nodeName;
+ TQDomNode node;
+ TQDomElement nodeE;
+ TQString nodeName;
node = e.firstChild();
while( !node.isNull() )
@@ -785,12 +785,12 @@ bool Kivio1DStencil::loadProperties( const QDomElement &e )
return true;
}
-bool Kivio1DStencil::loadCustom( const QDomElement & )
+bool Kivio1DStencil::loadCustom( const TQDomElement & )
{
return true;
}
-bool Kivio1DStencil::saveCustom( QDomElement &, QDomDocument & )
+bool Kivio1DStencil::saveCustom( TQDomElement &, TQDomDocument & )
{
return false;
}
@@ -849,21 +849,21 @@ void Kivio1DStencil::drawText( KivioIntraStencilData *pData )
_w = 10000000;
_h = 10000000;
- QFont f = m_pTextStyle->font();
+ TQFont f = m_pTextStyle->font();
int tf = m_pTextStyle->hTextAlign() | m_pTextStyle->vTextAlign();
f.setPointSizeFloat(f.pointSizeFloat() * (((float)zoomHandler->zoom()) / 100.0));
painter->setFont(f);
- QRect boundRect = painter->boundingRect( _x, _y, _w, _h, tf, m_pTextStyle->text() );
- QPixmap pix(boundRect.width(), boundRect.height());
+ TQRect boundRect = painter->boundingRect( _x, _y, _w, _h, tf, m_pTextStyle->text() );
+ TQPixmap pix(boundRect.width(), boundRect.height());
pix.fill();
- QPainter p(&pix);
+ TQPainter p(&pix);
p.setPen(m_pTextStyle->color());
p.setFont(f);
p.drawText( 0, 0, boundRect.width(), boundRect.height(), tf, m_pTextStyle->text() );
- QBitmap mask;
- mask = pix;
- pix.setMask(mask);
+ TQBitmap tqmask;
+ tqmask = pix;
+ pix.setMask(tqmask);
painter->drawPixmap(_x, _y, pix);
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_1d_stencil.h b/kivio/kiviopart/kiviosdk/kivio_1d_stencil.h
index a1af2086..b42d650b 100644
--- a/kivio/kiviopart/kiviosdk/kivio_1d_stencil.h
+++ b/kivio/kiviopart/kiviosdk/kivio_1d_stencil.h
@@ -5,8 +5,8 @@
#include <config.h>
#endif
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
#include <koffice_export.h>
@@ -25,7 +25,7 @@ class KivioStencil;
class KIVIO_EXPORT Kivio1DStencil : public KivioStencil
{
protected:
- QPtrList <KivioConnectorPoint> *m_pConnectorPoints;
+ TQPtrList <KivioConnectorPoint> *m_pConnectorPoints;
KivioConnectorPoint *m_pStart, *m_pEnd;
KivioConnectorPoint *m_pLeft, *m_pRight;
@@ -43,15 +43,15 @@ protected:
bool boolAllTrue( bool *, int );
bool boolContainsFalse( bool *, int );
- virtual QDomElement createRootElement( QDomDocument & );
+ virtual TQDomElement createRootElement( TQDomDocument & );
- virtual bool saveCustom( QDomElement &, QDomDocument & );
- QDomElement saveConnectors( QDomDocument &doc );
- QDomElement saveProperties( QDomDocument &doc );
+ virtual bool saveCustom( TQDomElement &, TQDomDocument & );
+ TQDomElement saveConnectors( TQDomDocument &doc );
+ TQDomElement saveProperties( TQDomDocument &doc );
- virtual bool loadCustom( const QDomElement & );
- bool loadConnectors( const QDomElement & );
- bool loadProperties( const QDomElement & );
+ virtual bool loadCustom( const TQDomElement & );
+ bool loadConnectors( const TQDomElement & );
+ bool loadProperties( const TQDomElement & );
// For easier duplication
void copyBasicInto( Kivio1DStencil * );
@@ -64,22 +64,22 @@ public:
virtual bool connected();
// fg color functions
- virtual void setFGColor( QColor c );
- virtual QColor fgColor();
+ virtual void setFGColor( TQColor c );
+ virtual TQColor fgColor();
// bg color functions
- virtual void setBGColor( QColor c );
- virtual QColor bgColor();
+ virtual void setBGColor( TQColor c );
+ virtual TQColor bgColor();
- virtual void setText( const QString & t ) { m_pTextStyle->setText(t); }
- virtual QString text() { return m_pTextStyle->text(); }
+ virtual void setText( const TQString & t ) { m_pTextStyle->setText(t); }
+ virtual TQString text() { return m_pTextStyle->text(); }
- virtual void setTextColor( QColor c ) { m_pTextStyle->setColor(c); }
- virtual QColor textColor() { return m_pTextStyle->color(); }
+ virtual void setTextColor( TQColor c ) { m_pTextStyle->setColor(c); }
+ virtual TQColor textColor() { return m_pTextStyle->color(); }
- virtual QFont textFont() { return m_pTextStyle->font(); }
- virtual void setTextFont( const QFont &f ) { m_pTextStyle->setFont(f); }
+ virtual TQFont textFont() { return m_pTextStyle->font(); }
+ virtual void setTextFont( const TQFont &f ) { m_pTextStyle->setFont(f); }
virtual int hTextAlign() { return m_pTextStyle->hTextAlign(); }
virtual int vTextAlign() { return m_pTextStyle->vTextAlign(); }
@@ -124,14 +124,14 @@ public:
virtual void customDrag( KivioCustomDragData * );
- // geometry management
+ // tqgeometry management
virtual void updateGeometry();
virtual void updateConnectorPoints( KivioConnectorPoint *, double, double );
// file i/o routines
- virtual bool loadXML( const QDomElement & );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual bool loadXML( const TQDomElement & );
+ virtual TQDomElement saveXML( TQDomDocument & );
// duplication routines
diff --git a/kivio/kiviopart/kiviosdk/kivio_arrowhead.cpp b/kivio/kiviopart/kiviosdk/kivio_arrowhead.cpp
index de464113..6728f7aa 100644
--- a/kivio/kiviopart/kiviosdk/kivio_arrowhead.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_arrowhead.cpp
@@ -39,9 +39,9 @@ KivioArrowHead::~KivioArrowHead()
{
}
-QDomElement KivioArrowHead::saveXML( QDomDocument &doc )
+TQDomElement KivioArrowHead::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioArrowHead");
+ TQDomElement e = doc.createElement("KivioArrowHead");
XmlWriteFloat( e, "cut", m_cut );
XmlWriteFloat( e, "w", m_w );
@@ -51,7 +51,7 @@ QDomElement KivioArrowHead::saveXML( QDomDocument &doc )
return e;
}
-bool KivioArrowHead::loadXML( const QDomElement &e )
+bool KivioArrowHead::loadXML( const TQDomElement &e )
{
m_cut = XmlReadFloat( e, "cut", 0.0f );
m_w = XmlReadFloat( e, "w", 10.0f );
@@ -243,7 +243,7 @@ void KivioArrowHead::paintArrowLine( KivioArrowHeadData *d )
pvecX = nvecY;
pvecY = -nvecX;
- QPtrList<KivioPoint>l;
+ TQPtrList<KivioPoint>l;
l.setAutoDelete(true);
float _x;
@@ -275,7 +275,7 @@ void KivioArrowHead::paintArrowLine( KivioArrowHeadData *d )
void KivioArrowHead::paintArrowTriangle( KivioArrowHeadData *d, bool solid )
{
KivioPainter *painter = d->painter;
- QColor cbg = painter->bgColor();
+ TQColor cbg = painter->bgColor();
if(solid) {
painter->setBGColor(painter->fgColor());
@@ -299,7 +299,7 @@ void KivioArrowHead::paintArrowTriangle( KivioArrowHeadData *d, bool solid )
pvecX = nvecY;
pvecY = -nvecX;
- QPtrList<KivioPoint>l;
+ TQPtrList<KivioPoint>l;
l.setAutoDelete(true);
float _x = zoomHandler->zoomItX(d->x);
@@ -329,7 +329,7 @@ void KivioArrowHead::paintArrowTriangle( KivioArrowHeadData *d, bool solid )
void KivioArrowHead::paintDoubleTriangle( KivioArrowHeadData *d, bool solid )
{
KivioPainter *painter = d->painter;
- QColor cbg = painter->bgColor();
+ TQColor cbg = painter->bgColor();
if(solid) {
painter->setBGColor(painter->fgColor());
@@ -353,9 +353,9 @@ void KivioArrowHead::paintDoubleTriangle( KivioArrowHeadData *d, bool solid )
pvecX = nvecY;
pvecY = -nvecX;
- QPtrList<KivioPoint> l1;
+ TQPtrList<KivioPoint> l1;
l1.setAutoDelete(true);
- QPtrList<KivioPoint> l2;
+ TQPtrList<KivioPoint> l2;
l2.setAutoDelete(true);
float _x = zoomHandler->zoomItX(d->x);
@@ -483,7 +483,7 @@ void KivioArrowHead::paintPipe( KivioArrowHeadData *d )
void KivioArrowHead::paintDiamond( KivioArrowHeadData *d, bool solid )
{
KivioPainter *painter = d->painter;
- QColor cbg = painter->bgColor();
+ TQColor cbg = painter->bgColor();
if(solid) {
painter->setBGColor(painter->fgColor());
@@ -505,7 +505,7 @@ void KivioArrowHead::paintDiamond( KivioArrowHeadData *d, bool solid )
pvecX = nvecY;
pvecY = -nvecX;
- QPtrList<KivioPoint> l;
+ TQPtrList<KivioPoint> l;
l.setAutoDelete(true);
float _x = zoomHandler->zoomItX(d->x);
@@ -535,7 +535,7 @@ void KivioArrowHead::paintDiamond( KivioArrowHeadData *d, bool solid )
void KivioArrowHead::paintCircle( KivioArrowHeadData *d, bool solid )
{
KivioPainter *painter = d->painter;
- QColor cbg = painter->bgColor();
+ TQColor cbg = painter->bgColor();
if(solid) {
painter->setBGColor(painter->fgColor());
@@ -588,7 +588,7 @@ void KivioArrowHead::paintCrowFoot( KivioArrowHeadData *d )
pvecX = nvecY;
pvecY = -nvecX;
- QPtrList<KivioPoint>l;
+ TQPtrList<KivioPoint>l;
l.setAutoDelete(true);
float _x;
@@ -639,7 +639,7 @@ void KivioArrowHead::paintFork( KivioArrowHeadData *d )
pvecX = nvecY;
pvecY = -nvecX;
- QPtrList<KivioPoint>l;
+ TQPtrList<KivioPoint>l;
l.setAutoDelete(true);
float _x;
diff --git a/kivio/kiviopart/kiviosdk/kivio_arrowhead.h b/kivio/kiviopart/kiviosdk/kivio_arrowhead.h
index e76faebf..2587d090 100644
--- a/kivio/kiviopart/kiviosdk/kivio_arrowhead.h
+++ b/kivio/kiviopart/kiviosdk/kivio_arrowhead.h
@@ -23,8 +23,8 @@
#include <config.h>
#endif
-#include <qcolor.h>
-#include <qdom.h>
+#include <tqcolor.h>
+#include <tqdom.h>
#include <koffice_export.h>
#define KIVIO_CUT_LENGTH -1.0f
#define KIVIO_CUT_HALF_LENGTH -2.0f
@@ -136,8 +136,8 @@ class KIVIO_EXPORT KivioArrowHead
void paint( KivioPainter *, float, float, float, float, KoZoomHandler* zoomHandler );
- bool loadXML( const QDomElement & );
- QDomElement saveXML( QDomDocument & );
+ bool loadXML( const TQDomElement & );
+ TQDomElement saveXML( TQDomDocument & );
};
#endif
diff --git a/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.cpp b/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.cpp
index 9073e152..a9e78928 100644
--- a/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.cpp
@@ -65,7 +65,7 @@ KivioBaseConnectorStencil::KivioBaseConnectorStencil()
m_pFillStyle = new KivioFillStyle();
m_pLineStyle = new KivioLineStyle();
- m_pConnectorPoints = new QPtrList<KivioConnectorPoint>;
+ m_pConnectorPoints = new TQPtrList<KivioConnectorPoint>;
m_pConnectorPoints->setAutoDelete(true);
}
@@ -81,12 +81,12 @@ KivioBaseConnectorStencil::~KivioBaseConnectorStencil()
delete m_pConnectorPoints;
}
-void KivioBaseConnectorStencil::setFGColor( QColor c )
+void KivioBaseConnectorStencil::setFGColor( TQColor c )
{
m_pLineStyle->setColor(c);
}
-QColor KivioBaseConnectorStencil::fgColor()
+TQColor KivioBaseConnectorStencil::fgColor()
{
return m_pLineStyle->color();
}
@@ -101,12 +101,12 @@ double KivioBaseConnectorStencil::lineWidth()
return m_pLineStyle->width();
}
-void KivioBaseConnectorStencil::setBGColor( QColor c )
+void KivioBaseConnectorStencil::setBGColor( TQColor c )
{
m_pFillStyle->setColor(c);
}
-QColor KivioBaseConnectorStencil::bgColor()
+TQColor KivioBaseConnectorStencil::bgColor()
{
return m_pFillStyle->color();
}
@@ -225,7 +225,7 @@ void KivioBaseConnectorStencil::paintSelectionHandles( KivioIntraStencilData *pD
double x1, y1;
painter->setLineWidth(1.0f);
- painter->setFGColor(QColor(0,0,0));
+ painter->setFGColor(TQColor(0,0,0));
KivioConnectorPoint *p = m_pConnectorPoints->first();
while( p )
@@ -234,9 +234,9 @@ void KivioBaseConnectorStencil::paintSelectionHandles( KivioIntraStencilData *pD
y1 = zoomHandler->zoomItY(p->y()) - HWo2;
if( p->target() )
- painter->setBGColor(QColor(200,0,0));
+ painter->setBGColor(TQColor(200,0,0));
else
- painter->setBGColor(QColor(0,200,0));
+ painter->setBGColor(TQColor(0,200,0));
painter->fillRect( x1, y1, HWP1, HWP1 );
@@ -356,14 +356,14 @@ void KivioBaseConnectorStencil::updateGeometry()
// file i/o routines
-bool KivioBaseConnectorStencil::loadXML( const QDomElement & )
+bool KivioBaseConnectorStencil::loadXML( const TQDomElement & )
{
return false;
}
-QDomElement KivioBaseConnectorStencil::saveXML( QDomDocument & )
+TQDomElement KivioBaseConnectorStencil::saveXML( TQDomDocument & )
{
- return QDomElement();
+ return TQDomElement();
}
@@ -484,9 +484,9 @@ int KivioBaseConnectorStencil::resizeHandlePositions()
return (int)krhpNone;
}
-QDomElement KivioBaseConnectorStencil::saveConnectors( QDomDocument &doc )
+TQDomElement KivioBaseConnectorStencil::saveConnectors( TQDomDocument &doc )
{
- QDomElement eConns = doc.createElement("KivioConnectors");
+ TQDomElement eConns = doc.createElement("KivioConnectors");
KivioConnectorPoint *p;
p = m_pConnectorPoints->first();
@@ -500,15 +500,15 @@ QDomElement KivioBaseConnectorStencil::saveConnectors( QDomDocument &doc )
return eConns;
}
-bool KivioBaseConnectorStencil::loadConnectors( const QDomElement &e )
+bool KivioBaseConnectorStencil::loadConnectors( const TQDomElement &e )
{
m_pConnectorPoints->clear();
KivioConnectorPoint *p;
- QDomNode node = e.firstChild();
- QDomElement e2;
- QString name;
+ TQDomNode node = e.firstChild();
+ TQDomElement e2;
+ TQString name;
while( !node.isNull() )
{
@@ -531,9 +531,9 @@ bool KivioBaseConnectorStencil::loadConnectors( const QDomElement &e )
return true;
}
-QDomElement KivioBaseConnectorStencil::saveProperties( QDomDocument &doc )
+TQDomElement KivioBaseConnectorStencil::saveProperties( TQDomDocument &doc )
{
- QDomElement propE = doc.createElement("KivioConnectorProperties");
+ TQDomElement propE = doc.createElement("KivioConnectorProperties");
propE.appendChild( m_pLineStyle->saveXML( doc ) );
@@ -542,10 +542,10 @@ QDomElement KivioBaseConnectorStencil::saveProperties( QDomDocument &doc )
return propE;
}
-bool KivioBaseConnectorStencil::loadProperties( const QDomElement &e )
+bool KivioBaseConnectorStencil::loadProperties( const TQDomElement &e )
{
- QDomNode node;
- QString nodeName;
+ TQDomNode node;
+ TQString nodeName;
node = e.firstChild();
while( !node.isNull() )
diff --git a/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.h b/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.h
index e8d621c0..f7e2dddb 100644
--- a/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.h
+++ b/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.h
@@ -23,8 +23,8 @@
#include <config.h>
#endif
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
#include "kivio_stencil.h"
@@ -39,7 +39,7 @@ class KivioStencil;
class KivioBaseConnectorStencil : public KivioStencil
{
protected:
- QPtrList <KivioConnectorPoint> *m_pConnectorPoints;
+ TQPtrList <KivioConnectorPoint> *m_pConnectorPoints;
KivioFillStyle *m_pFillStyle;
KivioLineStyle *m_pLineStyle;
@@ -49,24 +49,24 @@ protected:
bool boolAllTrue( bool *, int );
bool boolContainsFalse( bool *, int );
- QDomElement saveConnectors( QDomDocument &doc );
- bool loadConnectors( const QDomElement & );
+ TQDomElement saveConnectors( TQDomDocument &doc );
+ bool loadConnectors( const TQDomElement & );
- QDomElement saveProperties( QDomDocument &doc );
- bool loadProperties( const QDomElement & );
+ TQDomElement saveProperties( TQDomDocument &doc );
+ bool loadProperties( const TQDomElement & );
public:
KivioBaseConnectorStencil();
virtual ~KivioBaseConnectorStencil();
// fg color functions
- virtual void setFGColor( QColor c );
- virtual QColor fgColor();
+ virtual void setFGColor( TQColor c );
+ virtual TQColor fgColor();
// bg color functions
- virtual void setBGColor( QColor c );
- virtual QColor bgColor();
+ virtual void setBGColor( TQColor c );
+ virtual TQColor bgColor();
// line width functions
@@ -100,13 +100,13 @@ public:
virtual void customDrag( KivioCustomDragData * );
- // geometry management
+ // tqgeometry management
virtual void updateGeometry();
// file i/o routines
- virtual bool loadXML( const QDomElement & );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual bool loadXML( const TQDomElement & );
+ virtual TQDomElement saveXML( TQDomDocument & );
// duplication routines
diff --git a/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.cpp b/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.cpp
index 8a79c287..f3903685 100644
--- a/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.cpp
@@ -20,7 +20,7 @@ KivioBaseTargetStencil::KivioBaseTargetStencil()
m_pLineStyle = new KivioLineStyle();
m_pTextStyle = new KivioTextStyle();
- m_pTargets = new QPtrList<KivioConnectorTarget>;
+ m_pTargets = new TQPtrList<KivioConnectorTarget>;
m_pTargets->setAutoDelete(true);
}
@@ -40,12 +40,12 @@ KivioBaseTargetStencil::~KivioBaseTargetStencil()
// KivioLineStyle
//
//////////////////////////////////////////////////////////////////////////////
-QColor KivioBaseTargetStencil::fgColor()
+TQColor KivioBaseTargetStencil::fgColor()
{
return m_pLineStyle->color();
}
-void KivioBaseTargetStencil::setFGColor( QColor c )
+void KivioBaseTargetStencil::setFGColor( TQColor c )
{
m_pLineStyle->setColor(c);
}
@@ -67,12 +67,12 @@ double KivioBaseTargetStencil::lineWidth()
// KivioFillStyle
//
//////////////////////////////////////////////////////////////////////////////
-void KivioBaseTargetStencil::setBGColor( QColor c )
+void KivioBaseTargetStencil::setBGColor( TQColor c )
{
m_pFillStyle->setColor(c);
}
-QColor KivioBaseTargetStencil::bgColor()
+TQColor KivioBaseTargetStencil::bgColor()
{
return m_pFillStyle->color();
}
@@ -92,20 +92,20 @@ KivioFillStyle *KivioBaseTargetStencil::fillStyle()
// KivioTextStyle
//
//////////////////////////////////////////////////////////////////////////////
-QColor KivioBaseTargetStencil::textColor()
+TQColor KivioBaseTargetStencil::textColor()
{
return m_pTextStyle->color();
}
-void KivioBaseTargetStencil::setTextColor( QColor c )
+void KivioBaseTargetStencil::setTextColor( TQColor c )
{
m_pTextStyle->setColor(c);
}
-QFont KivioBaseTargetStencil::textFont()
+TQFont KivioBaseTargetStencil::textFont()
{
return m_pTextStyle->font();
}
-void KivioBaseTargetStencil::setTextFont( const QFont &f )
+void KivioBaseTargetStencil::setTextFont( const TQFont &f )
{
m_pTextStyle->setFont(f);
}
@@ -130,12 +130,12 @@ void KivioBaseTargetStencil::setVTextAlign(int a)
m_pTextStyle->setVTextAlign(a);
}
-void KivioBaseTargetStencil::setText( const QString &a )
+void KivioBaseTargetStencil::setText( const TQString &a )
{
m_pTextStyle->setText(a);
}
-QString KivioBaseTargetStencil::text()
+TQString KivioBaseTargetStencil::text()
{
return m_pTextStyle->text();
}
@@ -160,7 +160,7 @@ void KivioBaseTargetStencil::paintOutline( KivioIntraStencilData * )
void KivioBaseTargetStencil::paintConnectorTargets( KivioIntraStencilData *pData )
{
- QPixmap *targetPic;
+ TQPixmap *targetPic;
KivioPainter *painter;
double x, y;
@@ -197,10 +197,10 @@ void KivioBaseTargetStencil::paintConnectorTargets( KivioIntraStencilData *pData
// File I/O
//
//////////////////////////////////////////////////////////////////////////////
-bool KivioBaseTargetStencil::loadXML( const QDomElement &e )
+bool KivioBaseTargetStencil::loadXML( const TQDomElement &e )
{
- QDomNode node;
- QString name;
+ TQDomNode node;
+ TQString name;
node = e.firstChild();
while( !node.isNull() )
@@ -220,9 +220,9 @@ bool KivioBaseTargetStencil::loadXML( const QDomElement &e )
return true;
}
-QDomElement KivioBaseTargetStencil::createRootElement( QDomDocument &doc )
+TQDomElement KivioBaseTargetStencil::createRootElement( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioPluginStencil");
+ TQDomElement e = doc.createElement("KivioPluginStencil");
XmlWriteString( e, "id", m_pSpawner->info()->id() );
XmlWriteString( e, "setId", m_pSpawner->set()->id() );
@@ -230,9 +230,9 @@ QDomElement KivioBaseTargetStencil::createRootElement( QDomDocument &doc )
return e;
}
-QDomElement KivioBaseTargetStencil::saveXML( QDomDocument &doc )
+TQDomElement KivioBaseTargetStencil::saveXML( TQDomDocument &doc )
{
- QDomElement e = createRootElement( doc );
+ TQDomElement e = createRootElement( doc );
e.appendChild( saveProperties(doc) );
@@ -240,11 +240,11 @@ QDomElement KivioBaseTargetStencil::saveXML( QDomDocument &doc )
}
-QDomElement KivioBaseTargetStencil::saveProperties( QDomDocument &doc )
+TQDomElement KivioBaseTargetStencil::saveProperties( TQDomDocument &doc )
{
- QDomElement baseE = doc.createElement("KivioStencilProperties");
+ TQDomElement baseE = doc.createElement("KivioStencilProperties");
- QDomElement geoE = doc.createElement("Geometry");
+ TQDomElement geoE = doc.createElement("Geometry");
XmlWriteFloat( geoE, "x", m_x );
XmlWriteFloat( geoE, "y", m_y );
XmlWriteFloat( geoE, "w", m_w );
@@ -257,7 +257,7 @@ QDomElement KivioBaseTargetStencil::saveProperties( QDomDocument &doc )
baseE.appendChild( saveTargets(doc) );
// Only save custom data if this returns true (means there is custom data)
- QDomElement customE = doc.createElement("CustomData");
+ TQDomElement customE = doc.createElement("CustomData");
if( saveCustom( customE, doc )==true )
{
baseE.appendChild( customE );
@@ -266,11 +266,11 @@ QDomElement KivioBaseTargetStencil::saveProperties( QDomDocument &doc )
return baseE;
}
-bool KivioBaseTargetStencil::loadProperties( const QDomElement &e )
+bool KivioBaseTargetStencil::loadProperties( const TQDomElement &e )
{
- QDomNode node;
- QDomElement nodeE;
- QString nodeName;
+ TQDomNode node;
+ TQDomElement nodeE;
+ TQString nodeName;
node = e.firstChild();
while( !node.isNull() )
@@ -312,21 +312,21 @@ bool KivioBaseTargetStencil::loadProperties( const QDomElement &e )
return true;
}
-bool KivioBaseTargetStencil::saveCustom( QDomElement &, QDomDocument & )
+bool KivioBaseTargetStencil::saveCustom( TQDomElement &, TQDomDocument & )
{
return false;
}
-bool KivioBaseTargetStencil::loadCustom( const QDomElement & )
+bool KivioBaseTargetStencil::loadCustom( const TQDomElement & )
{
return true;
}
-QDomElement KivioBaseTargetStencil::saveTargets( QDomDocument &doc )
+TQDomElement KivioBaseTargetStencil::saveTargets( TQDomDocument &doc )
{
KivioConnectorTarget *p;
- QDomElement e = doc.createElement("TargetList");
+ TQDomElement e = doc.createElement("TargetList");
p = m_pTargets->first();
while( p )
@@ -339,12 +339,12 @@ QDomElement KivioBaseTargetStencil::saveTargets( QDomDocument &doc )
return e;
}
-bool KivioBaseTargetStencil::loadTargets( const QDomElement &e )
+bool KivioBaseTargetStencil::loadTargets( const TQDomElement &e )
{
KivioConnectorTarget *p;
- QDomNode node;
- QDomElement targetE;
- QString nodeName;
+ TQDomNode node;
+ TQDomElement targetE;
+ TQString nodeName;
m_pTargets->clear();
@@ -501,7 +501,7 @@ void KivioBaseTargetStencil::copyBasicInto( KivioBaseTargetStencil *pStencil )
pTgTarget = pStencil->m_pTargets->next();
}
- // Copy the geometry
+ // Copy the tqgeometry
pStencil->m_x = m_x;
pStencil->m_y = m_y;
pStencil->m_w = m_w;
@@ -514,17 +514,17 @@ void KivioBaseTargetStencil::copyBasicInto( KivioBaseTargetStencil *pStencil )
int KivioBaseTargetStencil::resizeHandlePositions()
{
// Calculate the resize handle positions
- int mask = KIVIO_RESIZE_HANDLE_POSITION_ALL;
+ int tqmask = KIVIO_RESIZE_HANDLE_POSITION_ALL;
if( m_pProtection->at( kpWidth ) )
{
- mask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpE | krhpW);
+ tqmask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpE | krhpW);
}
if( m_pProtection->at( kpHeight) )
{
- mask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpN | krhpS);
+ tqmask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpN | krhpS);
}
- return mask;
+ return tqmask;
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.h b/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.h
index 7af49718..082ffbfb 100644
--- a/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.h
+++ b/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.h
@@ -19,10 +19,10 @@
#ifndef KIVIO_BASE_TARGET_STENCIL_H
#define KIVIO_BASE_TARGET_STENCIL_H
-#include <qfont.h>
-#include <qcolor.h>
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
class KivioCustomDragData;
class KivioConnectorPoint;
@@ -44,17 +44,17 @@ protected:
KivioFillStyle *m_pFillStyle;
KivioTextStyle *m_pTextStyle;
- QPtrList<KivioConnectorTarget> *m_pTargets;
+ TQPtrList<KivioConnectorTarget> *m_pTargets;
- virtual QDomElement createRootElement( QDomDocument & );
+ virtual TQDomElement createRootElement( TQDomDocument & );
- virtual bool saveCustom( QDomElement &, QDomDocument & );
- virtual QDomElement saveProperties( QDomDocument & );
- virtual QDomElement saveTargets( QDomDocument & );
+ virtual bool saveCustom( TQDomElement &, TQDomDocument & );
+ virtual TQDomElement saveProperties( TQDomDocument & );
+ virtual TQDomElement saveTargets( TQDomDocument & );
- virtual bool loadCustom( const QDomElement & );
- virtual bool loadProperties( const QDomElement & );
- virtual bool loadTargets( const QDomElement & );
+ virtual bool loadCustom( const TQDomElement & );
+ virtual bool loadProperties( const TQDomElement & );
+ virtual bool loadTargets( const TQDomElement & );
virtual void copyBasicInto( KivioBaseTargetStencil * );
@@ -70,8 +70,8 @@ public:
// KivioLineStyle
//
//////////////////////////////
- virtual QColor fgColor();
- virtual void setFGColor( QColor c );
+ virtual TQColor fgColor();
+ virtual void setFGColor( TQColor c );
virtual void setLineWidth( double l );
virtual double lineWidth();
@@ -83,8 +83,8 @@ public:
// KivioFillStyle
//
//////////////////////////////
- virtual void setBGColor( QColor c );
- virtual QColor bgColor();
+ virtual void setBGColor( TQColor c );
+ virtual TQColor bgColor();
virtual KivioFillStyle *fillStyle();
@@ -95,11 +95,11 @@ public:
// KivioTextStyle
//
//////////////////////////////
- virtual QColor textColor();
- virtual void setTextColor( QColor c );
+ virtual TQColor textColor();
+ virtual void setTextColor( TQColor c );
- virtual QFont textFont();
- virtual void setTextFont( const QFont &f );
+ virtual TQFont textFont();
+ virtual void setTextFont( const TQFont &f );
virtual int hTextAlign();
virtual int vTextAlign();
@@ -107,8 +107,8 @@ public:
virtual void setHTextAlign(int a);
virtual void setVTextAlign(int a);
- virtual void setText( const QString &a );
- virtual QString text();
+ virtual void setText( const TQString &a );
+ virtual TQString text();
@@ -128,8 +128,8 @@ public:
// File I/O
//
///////////////////////////////
- virtual bool loadXML( const QDomElement & );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual bool loadXML( const TQDomElement & );
+ virtual TQDomElement saveXML( TQDomDocument & );
diff --git a/kivio/kiviopart/kiviosdk/kivio_common.cpp b/kivio/kiviopart/kiviosdk/kivio_common.cpp
index 8de8e1e0..e43c9fda 100644
--- a/kivio/kiviopart/kiviosdk/kivio_common.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_common.cpp
@@ -19,29 +19,29 @@
#include "kivio_common.h"
#include "kivio_connector_point.h"
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <math.h>
#include <KoPoint.h>
#include <KoRect.h>
/**
- * Read a floating point value from a @ref QDomElement.
+ * Read a floating point value from a @ref TQDomElement.
*
- * @param e The @ref QDomElement to read from
+ * @param e The @ref TQDomElement to read from
* @param att The attribute to locate
* @param def The default value to return if the attribute is not found
*
- * This will read a floating point attribute from a @ref QDomElement, and
+ * This will read a floating point attribute from a @ref TQDomElement, and
* if it is not found, return the default value.
*/
-float XmlReadFloat( const QDomElement &e, const QString &att, const float &def)
+float XmlReadFloat( const TQDomElement &e, const TQString &att, const float &def)
{
// Check if this value exists, if not, return the default
if( e.hasAttribute( att )==false )
return def;
// Read the attribute
- QString val = e.attribute( att );
+ TQString val = e.attribute( att );
bool ok=false;
// Make sure it is a floating point value. If not, return the default
@@ -58,38 +58,38 @@ float XmlReadFloat( const QDomElement &e, const QString &att, const float &def)
/**
- * Write a floating point value to a @ref QDomElement
+ * Write a floating point value to a @ref TQDomElement
*
- * @param e The @ref QDomElement to write to
+ * @param e The @ref TQDomElement to write to
* @param att The attribute to write
* @param val The value of the attribute to write
*
- * This will write a floating point value to a @ref QDomElement.
+ * This will write a floating point value to a @ref TQDomElement.
*/
-void XmlWriteFloat( QDomElement &e, const QString &att, const float &val )
+void XmlWriteFloat( TQDomElement &e, const TQString &att, const float &val )
{
e.setAttribute( att, (double)val );
}
/**
- * Read an int value from a @ref QDomElement.
+ * Read an int value from a @ref TQDomElement.
*
- * @param e The @ref QDomElement to read from
+ * @param e The @ref TQDomElement to read from
* @param att The attribute to locate
* @param def The default value to return if the attribute is not found
*
- * This will read an int attribute from a @ref QDomElement, and
+ * This will read an int attribute from a @ref TQDomElement, and
* if it is not found, return the default value.
*/
-int XmlReadInt( const QDomElement &e, const QString &att, const int &def)
+int XmlReadInt( const TQDomElement &e, const TQString &att, const int &def)
{
// Check if this value exists, if not, return the default
if( e.hasAttribute( att )==false )
return def;
// Read the attribute
- QString val = e.attribute( att, "1" );
+ TQString val = e.attribute( att, "1" );
bool ok=false;
// Make sure it is a floating point value. If not, return the default
@@ -106,38 +106,38 @@ int XmlReadInt( const QDomElement &e, const QString &att, const int &def)
/**
- * Write a int value to a @ref QDomElement
+ * Write a int value to a @ref TQDomElement
*
- * @param e The @ref QDomElement to write to
+ * @param e The @ref TQDomElement to write to
* @param att The attribute to write
* @param val The value of the attribute to write
*
- * This will write an int value to a @ref QDomElement.
+ * This will write an int value to a @ref TQDomElement.
*/
-void XmlWriteInt( QDomElement &e, const QString &att, const int &val )
+void XmlWriteInt( TQDomElement &e, const TQString &att, const int &val )
{
e.setAttribute( att, (int)val );
}
/**
- * Read an uint value from a @ref QDomElement.
+ * Read an uint value from a @ref TQDomElement.
*
- * @param e The @ref QDomElement to read from
+ * @param e The @ref TQDomElement to read from
* @param att The attribute to locate
* @param def The default value to return if the attribute is not found
*
- * This will read an uint attribute from a @ref QDomElement, and
+ * This will read an uint attribute from a @ref TQDomElement, and
* if it is not found, return the default value.
*/
-uint XmlReadUInt( const QDomElement &e, const QString &att, const uint &def)
+uint XmlReadUInt( const TQDomElement &e, const TQString &att, const uint &def)
{
// Check if this value exists, if not, return the default
if( e.hasAttribute( att )==false )
return def;
// Read the attribute
- QString val = e.attribute( att, "1" );
+ TQString val = e.attribute( att, "1" );
bool ok=false;
// Make sure it is a floating point value. If not, return the default
@@ -154,77 +154,77 @@ uint XmlReadUInt( const QDomElement &e, const QString &att, const uint &def)
/**
- * Write an uint value to a @ref QDomElement
+ * Write an uint value to a @ref TQDomElement
*
- * @param e The @ref QDomElement to write to
+ * @param e The @ref TQDomElement to write to
* @param att The attribute to write
* @param val The value of the attribute to write
*
- * This will write an uint value to a @ref QDomElement.
+ * This will write an uint value to a @ref TQDomElement.
*/
-void XmlWriteUInt( QDomElement &e, const QString &att, const uint &val )
+void XmlWriteUInt( TQDomElement &e, const TQString &att, const uint &val )
{
e.setAttribute( att, (uint)val );
}
/**
- * Read a @ref QString from a @ref QDomElement.
+ * Read a @ref TQString from a @ref TQDomElement.
*
- * @param e The @ref QDomElement to read from
+ * @param e The @ref TQDomElement to read from
* @param att The attribute to locate
* @param def The default value to return if the attribute is not found
*
- * This will read a QString attribute from a @ref QDomElement, and
+ * This will read a TQString attribute from a @ref TQDomElement, and
* if it is not found, return the default value.
*/
-QString XmlReadString( const QDomElement &e, const QString &att, const QString &def )
+TQString XmlReadString( const TQDomElement &e, const TQString &att, const TQString &def )
{
// Check if the attribute exists, if not, return the default
if( e.hasAttribute( att )==false )
- return QString(def);
+ return TQString(def);
// Otherwise return the attribute
else return e.attribute( att );
}
/**
- * Write a QString to a @ref QDomElement
+ * Write a TQString to a @ref TQDomElement
*
- * @param e The @ref QDomElement to write to
+ * @param e The @ref TQDomElement to write to
* @param att The attribute to write
* @param val The value of the attribute to write
*
- * This will write a QString to a @ref QDomElement.
+ * This will write a TQString to a @ref TQDomElement.
*/
-void XmlWriteString( QDomElement &e, const QString &att, const QString &val )
+void XmlWriteString( TQDomElement &e, const TQString &att, const TQString &val )
{
e.setAttribute( att, val );
}
/**
- * Read a QColor value from a @ref QDomElement.
+ * Read a TQColor value from a @ref TQDomElement.
*
- * @param e The @ref QDomElement to read from
+ * @param e The @ref TQDomElement to read from
* @param att The attribute to locate
* @param def The default value to return if the attribute is not found
*
- * This will read a QColor attribute from a @ref QDomElement, and
+ * This will read a TQColor attribute from a @ref TQDomElement, and
* if it is not found, return the default value.
*/
-QColor XmlReadColor( const QDomElement &e, const QString &att, const QColor &def)
+TQColor XmlReadColor( const TQDomElement &e, const TQString &att, const TQColor &def)
{
// Check if this value exists, if not, return the default
if( e.hasAttribute( att )==false )
return def;
// Read the attribute
- QString val = e.attribute( att, "1" );
+ TQString val = e.attribute( att, "1" );
bool ok=false;
- QColor newColor;
+ TQColor newColor;
- if( val.contains("#") ) // Is it #RRGGBB format?
+ if( val.tqcontains("#") ) // Is it #RRGGBB format?
{
newColor.setNamedColor(val);
return newColor;
@@ -235,25 +235,25 @@ QColor XmlReadColor( const QDomElement &e, const QString &att, const QColor &def
uint iVal = val.toUInt( &ok );
if( !ok )
{
- kdDebug(43000) << "Invalid XML-value read for " << att.ascii() << ", expected QColor" << endl;
+ kdDebug(43000) << "Invalid XML-value read for " << att.ascii() << ", expected TQColor" << endl;
return 1;
}
// Return the value
- return QColor(iVal);
+ return TQColor(iVal);
}
/**
- * Write a QColor value to a @ref QDomElement
+ * Write a TQColor value to a @ref TQDomElement
*
- * @param e The @ref QDomElement to write to
+ * @param e The @ref TQDomElement to write to
* @param att The attribute to write
* @param val The value of the attribute to write
*
- * This will write a QColor value to a @ref QDomElement.
+ * This will write a TQColor value to a @ref TQDomElement.
*/
-void XmlWriteColor( QDomElement &e, const QString &att, const QColor &val )
+void XmlWriteColor( TQDomElement &e, const TQString &att, const TQColor &val )
{
// Write it out in #RRGGBB format
e.setAttribute( att, val.name() );
@@ -261,23 +261,23 @@ void XmlWriteColor( QDomElement &e, const QString &att, const QColor &val )
/**
- * Read a double value from a @ref QDomElement.
+ * Read a double value from a @ref TQDomElement.
*
- * @param e The @ref QDomElement to read from
+ * @param e The @ref TQDomElement to read from
* @param att The attribute to locate
* @param def The default value to return if the attribute is not found
*
- * This will read a double attribute from a @ref QDomElement, and
+ * This will read a double attribute from a @ref TQDomElement, and
* if it is not found, return the default value.
*/
-double XmlReadDouble( const QDomElement &e, const QString &att, const double &def)
+double XmlReadDouble( const TQDomElement &e, const TQString &att, const double &def)
{
// Check if this value exists, if not, return the default
if( e.hasAttribute( att )==false )
return def;
// Read the attribute
- QString val = e.attribute( att, "1.0" );
+ TQString val = e.attribute( att, "1.0" );
bool ok=false;
// Make sure it is a floating point value. If not, return the default
@@ -294,21 +294,21 @@ double XmlReadDouble( const QDomElement &e, const QString &att, const double &de
/**
- * Write a double value to a @ref QDomElement
+ * Write a double value to a @ref TQDomElement
*
- * @param e The @ref QDomElement to write to
+ * @param e The @ref TQDomElement to write to
* @param att The attribute to write
* @param val The value of the attribute to write
*
- * This will write a double value to a @ref QDomElement.
+ * This will write a double value to a @ref TQDomElement.
*/
-void XmlWriteDouble( QDomElement &e, const QString &att, const double &val )
+void XmlWriteDouble( TQDomElement &e, const TQString &att, const double &val )
{
e.setAttribute( att, (double)val );
}
-#define WHICH_QUAD( vertex, hitPos ) \
+#define WHICH_TQUAD( vertex, hitPos ) \
( (vertex.x() > hitPos->x()) ? ((vertex.y() > hitPos->y()) ? 1 : 4 ) : ((vertex.y() > hitPos->y())?2:3))
#define X_INTERCEPT( point1, point2, hitY ) \
@@ -330,7 +330,7 @@ void XmlWriteDouble( QDomElement &e, const QString &att, const double &val )
* across two quadrants, you need to determine which side of the test point it crossed, and then
* either add or subtract 2.
*
- * Quad layout:
+ * Quad tqlayout:
* 1 2
* 4 3
*/
@@ -341,13 +341,13 @@ bool PointInPoly( KoPoint *points, int numPoints, KoPoint *hitPos )
edge = 0;
- quad = WHICH_QUAD( points[ edge ], hitPos );
+ quad = WHICH_TQUAD( points[ edge ], hitPos );
total = 0; // count of absolute sectors crossed
// Loop through all the vertices
do {
next = (edge + 1) % numPoints;
- next_quad = WHICH_QUAD( points[ next ], hitPos );
+ next_quad = WHICH_TQUAD( points[ next ], hitPos );
// Calculate how many quads have been crossed
delta = next_quad - quad;
@@ -384,19 +384,19 @@ bool PointInPoly( KoPoint *points, int numPoints, KoPoint *hitPos )
return false;
}
-KoRect XmlReadRect( const QDomElement &e, const QString &att, const KoRect &def )
+KoRect XmlReadRect( const TQDomElement &e, const TQString &att, const KoRect &def )
{
// Check if this value exists, if not, return the default
if( e.hasAttribute( att )==false )
return def;
// Read the attribute
- QString val = e.attribute( att );
+ TQString val = e.attribute( att );
- if (val.find("[") == 0 && val.find("]") == (int)val.length()-1) {
+ if (val.tqfind("[") == 0 && val.tqfind("]") == (int)val.length()-1) {
val.remove(0,1);
val.remove(val.length()-1,1);
- QStringList vlist = QStringList::split(",",val);
+ TQStringList vlist = TQStringList::split(",",val);
if (vlist.count() == 4) {
bool allOk = true;
bool ok = false;
@@ -421,9 +421,9 @@ KoRect XmlReadRect( const QDomElement &e, const QString &att, const KoRect &def
return def;
}
-void XmlWriteRect( QDomElement &e, const QString &att, const KoRect &val )
+void XmlWriteRect( TQDomElement &e, const TQString &att, const KoRect &val )
{
- e.setAttribute( att, QString("[%1,%2,%3,%4]").arg(val.x()).arg(val.y()).arg(val.width()).arg(val.height()) );
+ e.setAttribute( att, TQString("[%1,%2,%3,%4]").tqarg(val.x()).tqarg(val.y()).tqarg(val.width()).tqarg(val.height()) );
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_common.h b/kivio/kiviopart/kiviosdk/kivio_common.h
index 7ddb3382..44576ece 100644
--- a/kivio/kiviopart/kiviosdk/kivio_common.h
+++ b/kivio/kiviopart/kiviosdk/kivio_common.h
@@ -19,8 +19,8 @@
#ifndef KIVIO_COMMON_H
#define KIVIO_COMMON_H
-#include <qdom.h>
-#include <qcolor.h>
+#include <tqdom.h>
+#include <tqcolor.h>
class KivioConnectorPoint;
class KoPoint;
@@ -28,26 +28,26 @@ class KoRect;
extern "C" {
- KoRect XmlReadRect( const QDomElement &, const QString &, const KoRect & );
- void XmlWriteRect( QDomElement &, const QString &, const KoRect & );
+ KoRect XmlReadRect( const TQDomElement &, const TQString &, const KoRect & );
+ void XmlWriteRect( TQDomElement &, const TQString &, const KoRect & );
- QColor XmlReadColor( const QDomElement &, const QString &, const QColor & );
- void XmlWriteColor( QDomElement &, const QString &, const QColor & );
+ TQColor XmlReadColor( const TQDomElement &, const TQString &, const TQColor & );
+ void XmlWriteColor( TQDomElement &, const TQString &, const TQColor & );
- int XmlReadInt( const QDomElement &, const QString &, const int & );
- void XmlWriteInt( QDomElement &, const QString &, const int & );
+ int XmlReadInt( const TQDomElement &, const TQString &, const int & );
+ void XmlWriteInt( TQDomElement &, const TQString &, const int & );
- uint XmlReadUInt( const QDomElement &, const QString &, const uint & );
- void XmlWriteUInt( QDomElement &, const QString &, const uint & );
+ uint XmlReadUInt( const TQDomElement &, const TQString &, const uint & );
+ void XmlWriteUInt( TQDomElement &, const TQString &, const uint & );
- double XmlReadDouble( const QDomElement &, const QString &, const double & );
- void XmlWriteDouble( QDomElement &, const QString &, const double & );
+ double XmlReadDouble( const TQDomElement &, const TQString &, const double & );
+ void XmlWriteDouble( TQDomElement &, const TQString &, const double & );
- float XmlReadFloat( const QDomElement &, const QString &, const float & );
- void XmlWriteFloat( QDomElement &, const QString &, const float & );
+ float XmlReadFloat( const TQDomElement &, const TQString &, const float & );
+ void XmlWriteFloat( TQDomElement &, const TQString &, const float & );
- QString XmlReadString( const QDomElement &, const QString &, const QString & );
- void XmlWriteString( QDomElement &, const QString &, const QString & );
+ TQString XmlReadString( const TQDomElement &, const TQString &, const TQString & );
+ void XmlWriteString( TQDomElement &, const TQString &, const TQString & );
bool PointInPoly( KoPoint *points, int numPoints, KoPoint *hitPos );
diff --git a/kivio/kiviopart/kiviosdk/kivio_connector_point.cpp b/kivio/kiviopart/kiviosdk/kivio_connector_point.cpp
index d0ca6616..0208f932 100644
--- a/kivio/kiviopart/kiviosdk/kivio_connector_point.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_connector_point.cpp
@@ -83,10 +83,10 @@ void KivioConnectorPoint::setTarget( KivioConnectorTarget *pTarget )
* Sets the x coordinate.
*
* @param newX The new value
- * @param updateStencil Whether or not the stencil's geometry should be updated (def=true)
+ * @param updateStencil Whether or not the stencil's tqgeometry should be updated (def=true)
*
* Sets the X coordinate to a new value, and optionally
- * updates the stencil's geometry if updateStencil is true.
+ * updates the stencil's tqgeometry if updateStencil is true.
*/
void KivioConnectorPoint::setX( double newX, bool updateStencil )
{
@@ -102,10 +102,10 @@ void KivioConnectorPoint::setX( double newX, bool updateStencil )
* Sets the y coordinate.
*
* @param newY The new value
- * @param updateStencil Whether or not the stencil's geometry should be updated (def=true)
+ * @param updateStencil Whether or not the stencil's tqgeometry should be updated (def=true)
*
* Sets the Y coordinate to a new value, and optionally
- * updates the stencil's geometry if updateStencil is true.
+ * updates the stencil's tqgeometry if updateStencil is true.
*/
void KivioConnectorPoint::setY( double newY, bool updateStencil )
{
@@ -122,10 +122,10 @@ void KivioConnectorPoint::setY( double newY, bool updateStencil )
*
* @param newX The new x value
* @param newY The new y value
- * @param updateStencil Whether or not the stencil's geometry should be updated (def=true)
+ * @param updateStencil Whether or not the stencil's tqgeometry should be updated (def=true)
*
* Sets the X & Y coordinates to new values, and optionally
- * updates the stencil's geometry if updateStencil is true.
+ * updates the stencil's tqgeometry if updateStencil is true.
*/
void KivioConnectorPoint::setPosition( double newX, double newY, bool updateStencil )
{
@@ -165,11 +165,11 @@ void KivioConnectorPoint::disconnect( bool removeFromTargetList )
/**
* Loads this object from an XML file.
*
- * @param e The QDomElement to load from.
+ * @param e The TQDomElement to load from.
*
* This will load the necessary values from an XML file.
*/
-bool KivioConnectorPoint::loadXML( const QDomElement &e )
+bool KivioConnectorPoint::loadXML( const TQDomElement &e )
{
m_pos.setX(XmlReadFloat( e, "x", 1.0f ));
m_pos.setY(XmlReadFloat( e, "y", 1.0f ));
@@ -183,15 +183,15 @@ bool KivioConnectorPoint::loadXML( const QDomElement &e )
/**
* Saves this object to an XML file.
*
- * @param doc The QDomDocument to save to.
+ * @param doc The TQDomDocument to save to.
*
- * This creates a new QDomElement and saves its data to it.
+ * This creates a new TQDomElement and saves its data to it.
*
* @returns The new element created and saved to.
*/
-QDomElement KivioConnectorPoint::saveXML( QDomDocument &doc )
+TQDomElement KivioConnectorPoint::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioConnectorPoint");
+ TQDomElement e = doc.createElement("KivioConnectorPoint");
XmlWriteFloat( e, "x", m_pos.x() );
XmlWriteFloat( e, "y", m_pos.y() );
diff --git a/kivio/kiviopart/kiviosdk/kivio_connector_point.h b/kivio/kiviopart/kiviosdk/kivio_connector_point.h
index f5cb58c2..fa177402 100644
--- a/kivio/kiviopart/kiviosdk/kivio_connector_point.h
+++ b/kivio/kiviopart/kiviosdk/kivio_connector_point.h
@@ -19,7 +19,7 @@
#ifndef KIVIO_CONNECTOR_POINT_H
#define KIVIO_CONNECTOR_POINT_H
-#include <qdom.h>
+#include <tqdom.h>
#include <KoPoint.h>
#include <koffice_export.h>
@@ -49,8 +49,8 @@ public:
KivioConnectorPoint();
virtual ~KivioConnectorPoint();
- bool loadXML( const QDomElement & );
- QDomElement saveXML( QDomDocument & );
+ bool loadXML( const TQDomElement & );
+ TQDomElement saveXML( TQDomDocument & );
KivioConnectorTarget *target() const { return m_pTarget; }
void setTarget( KivioConnectorTarget * );
diff --git a/kivio/kiviopart/kiviosdk/kivio_connector_target.cpp b/kivio/kiviopart/kiviosdk/kivio_connector_target.cpp
index 60fe0316..deac1b4d 100644
--- a/kivio/kiviopart/kiviosdk/kivio_connector_target.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_connector_target.cpp
@@ -30,7 +30,7 @@ KivioConnectorTarget::KivioConnectorTarget()
{
m_position.setX( 0.0f );
m_position.setY( 0.0f );
- m_pConnectors = new QPtrList<KivioConnectorPoint>;
+ m_pConnectors = new TQPtrList<KivioConnectorPoint>;
m_pConnectors->setAutoDelete(false);
m_id = -1;
m_xOffset = m_yOffset = 0;
@@ -40,7 +40,7 @@ KivioConnectorTarget::KivioConnectorTarget(double x, double y)
{
m_position.setX( x );
m_position.setY( y );
- m_pConnectors = new QPtrList<KivioConnectorPoint>;
+ m_pConnectors = new TQPtrList<KivioConnectorPoint>;
m_pConnectors->setAutoDelete(false);
m_id = -1;
@@ -51,7 +51,7 @@ KivioConnectorTarget::KivioConnectorTarget(double x, double y, double xOffset, d
{
m_position.setX( x );
m_position.setY( y );
- m_pConnectors = new QPtrList<KivioConnectorPoint>;
+ m_pConnectors = new TQPtrList<KivioConnectorPoint>;
m_pConnectors->setAutoDelete(false);
m_id = -1;
@@ -109,7 +109,7 @@ KivioConnectorTarget::~KivioConnectorTarget()
/**
* Loads this object from an XML file.
*/
-bool KivioConnectorTarget::loadXML( const QDomElement &e )
+bool KivioConnectorTarget::loadXML( const TQDomElement &e )
{
if( e.tagName().compare( "KivioConnectorTarget" ) != 0 )
{
@@ -129,9 +129,9 @@ bool KivioConnectorTarget::loadXML( const QDomElement &e )
/**
* Saves this object to an XML file.
*/
-QDomElement KivioConnectorTarget::saveXML( QDomDocument &doc )
+TQDomElement KivioConnectorTarget::saveXML( TQDomDocument &doc )
{
- QDomElement e;
+ TQDomElement e;
e = doc.createElement("KivioConnectorTarget");
diff --git a/kivio/kiviopart/kiviosdk/kivio_connector_target.h b/kivio/kiviopart/kiviosdk/kivio_connector_target.h
index 533102ab..94df6e53 100644
--- a/kivio/kiviopart/kiviosdk/kivio_connector_target.h
+++ b/kivio/kiviopart/kiviosdk/kivio_connector_target.h
@@ -19,8 +19,8 @@
#ifndef KIVIO_CONNECTOR_TARGET_H
#define KIVIO_CONNECTOR_TARGET_H
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
#include <KoPoint.h>
@@ -35,7 +35,7 @@ protected:
KoPoint m_position;
double m_xOffset, m_yOffset;
int m_id;
- QPtrList<KivioConnectorPoint> *m_pConnectors;
+ TQPtrList<KivioConnectorPoint> *m_pConnectors;
public:
KivioConnectorTarget();
@@ -43,8 +43,8 @@ public:
KivioConnectorTarget( double, double, double, double );
virtual ~KivioConnectorTarget();
- bool loadXML( const QDomElement & );
- QDomElement saveXML( QDomDocument & );
+ bool loadXML( const TQDomElement & );
+ TQDomElement saveXML( TQDomDocument & );
KivioConnectorTarget *duplicate();
diff --git a/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.cpp b/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.cpp
index ba7cd9ba..e3cf726b 100644
--- a/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.cpp
@@ -17,10 +17,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <math.h>
@@ -37,7 +37,7 @@ KivioDiaStencilSpawner::~KivioDiaStencilSpawner()
{
}
-QDomElement KivioDiaStencilSpawner::saveXML(QDomDocument &d)
+TQDomElement KivioDiaStencilSpawner::saveXML(TQDomDocument &d)
{
return m_smlStencilSpawner->saveXML(d);
}
@@ -69,13 +69,13 @@ float KivioDiaStencilSpawner::diaPointToKivio(float point, bool xpoint)
return returnPoint;
}
-bool KivioDiaStencilSpawner::load(const QString &file)
+bool KivioDiaStencilSpawner::load(const TQString &file)
{
- QDomDocument dia("test");
- QDomDocument kivio("XML");
+ TQDomDocument dia("test");
+ TQDomDocument kivio("XML");
m_filename = file;
- QFile f(file);
+ TQFile f(file);
if(f.open(IO_ReadOnly) == false)
{
@@ -83,33 +83,33 @@ bool KivioDiaStencilSpawner::load(const QString &file)
return false;
}
dia.setContent(&f);
- QDomNode diaMain = dia.namedItem("shape");
+ TQDomNode diaMain = dia.namedItem("tqshape");
// Set "creator" attribute
- QDomElement firstElement = kivio.createElement("KivioShapeStencil");
+ TQDomElement firstElement = kivio.createElement("KivioShapeStencil");
firstElement.setAttribute("creator", "kiviodiafilter");
kivio.appendChild(firstElement);
// Add KivioSMLStencilSpawnerInfo
- QDomElement spawnerInfoElement = kivio.createElement("KivioSMLStencilSpawnerInfo");
- QDomElement authorInfoElement = kivio.createElement("Author");
+ TQDomElement spawnerInfoElement = kivio.createElement("KivioSMLStencilSpawnerInfo");
+ TQDomElement authorInfoElement = kivio.createElement("Author");
authorInfoElement.setAttribute("data", "n/a");
- QDomElement titleInfoElement = kivio.createElement("Title");
+ TQDomElement titleInfoElement = kivio.createElement("Title");
titleInfoElement.setAttribute("data", diaMain.namedItem("name").toElement().text());
- QDomElement idInfoElement = kivio.createElement("Id");
+ TQDomElement idInfoElement = kivio.createElement("Id");
idInfoElement.setAttribute("data", diaMain.namedItem("name").toElement().text());
- QDomElement descriptionInfoElement = kivio.createElement("Description");
+ TQDomElement descriptionInfoElement = kivio.createElement("Description");
descriptionInfoElement.setAttribute("data", diaMain.namedItem("description").toElement().text());
- QDomElement versionInfoElement = kivio.createElement("Version");
+ TQDomElement versionInfoElement = kivio.createElement("Version");
versionInfoElement.setAttribute("data", "1.0");
- QDomElement webInfoElement = kivio.createElement("Web");
+ TQDomElement webInfoElement = kivio.createElement("Web");
webInfoElement.setAttribute("data", "http://");
- QDomElement emailInfoElement = kivio.createElement("Email");
+ TQDomElement emailInfoElement = kivio.createElement("Email");
emailInfoElement.setAttribute("data", "n/a");
- QDomElement copyrightInfoElement = kivio.createElement("Copyright");
+ TQDomElement copyrightInfoElement = kivio.createElement("Copyright");
copyrightInfoElement.setAttribute("data", "n/a");
- QDomElement autoUpdateInfoElement = kivio.createElement("AutoUpdate");
+ TQDomElement autoUpdateInfoElement = kivio.createElement("AutoUpdate");
autoUpdateInfoElement.setAttribute("data", "off");
spawnerInfoElement.appendChild(authorInfoElement);
@@ -127,15 +127,15 @@ bool KivioDiaStencilSpawner::load(const QString &file)
m_xscale = m_yscale = 20.0f;
// Add Dimensions
- QDomElement dimensionsElement = kivio.createElement("Dimensions");
+ TQDomElement dimensionsElement = kivio.createElement("Dimensions");
kivio.documentElement().appendChild(dimensionsElement);
// Calculate Dimensions
- QDomElement svgElement = diaMain.namedItem("svg:svg").toElement();
- QDomNode svgNode = svgElement.firstChild();
+ TQDomElement svgElement = diaMain.namedItem("svg:svg").toElement();
+ TQDomNode svgNode = svgElement.firstChild();
while(!svgNode.isNull())
{
- QDomElement svgChild = svgNode.toElement();
+ TQDomElement svgChild = svgNode.toElement();
if(!svgChild.isNull())
{
if(svgChild.tagName() == "svg:rect")
@@ -175,13 +175,13 @@ bool KivioDiaStencilSpawner::load(const QString &file)
{
if(svgChild.hasAttribute("points"))
{
- QStringList points = QStringList::split(" ", svgChild.attribute("points"));
- for(QStringList::Iterator it = points.begin(); it != points.end(); ++it)
+ TQStringList points = TQStringList::split(" ", svgChild.attribute("points"));
+ for(TQStringList::Iterator it = points.begin(); it != points.end(); ++it)
{
- QString x, y;
+ TQString x, y;
- QStringList parsed = QStringList::split(",", (*it));
- QStringList::Iterator itp = parsed.begin();
+ TQStringList parsed = TQStringList::split(",", (*it));
+ TQStringList::Iterator itp = parsed.begin();
x = (*itp);
++itp;
y = (*itp);
@@ -194,13 +194,13 @@ bool KivioDiaStencilSpawner::load(const QString &file)
{
if(svgChild.hasAttribute("points"))
{
- QStringList points = QStringList::split(" ", svgChild.attribute("points"));
- for(QStringList::Iterator it = points.begin(); it != points.end(); ++it)
+ TQStringList points = TQStringList::split(" ", svgChild.attribute("points"));
+ for(TQStringList::Iterator it = points.begin(); it != points.end(); ++it)
{
- QString x, y;
+ TQString x, y;
- QStringList parsed = QStringList::split(",", (*it));
- QStringList::Iterator itp = parsed.begin();
+ TQStringList parsed = TQStringList::split(",", (*it));
+ TQStringList::Iterator itp = parsed.begin();
x = (*itp);
++itp;
y = (*itp);
@@ -222,8 +222,8 @@ bool KivioDiaStencilSpawner::load(const QString &file)
svgNode = svgNode.nextSibling();
}
- QValueList<float>::Iterator itx = m_xlist.begin();
- QValueList<float>::Iterator ity = m_ylist.begin();
+ TQValueList<float>::Iterator itx = m_xlist.begin();
+ TQValueList<float>::Iterator ity = m_ylist.begin();
m_highestx = *itx;
m_lowestx = *itx;
m_highesty = *ity;
@@ -233,14 +233,14 @@ bool KivioDiaStencilSpawner::load(const QString &file)
for( ; itx != m_xlist.end(); ++itx)
{
- m_highestx = QMAX(m_highestx, *itx);
- m_lowestx = QMIN(m_lowestx, *itx);
+ m_highestx = TQMAX(m_highestx, *itx);
+ m_lowestx = TQMIN(m_lowestx, *itx);
}
for( ; ity != m_ylist.end(); ++ity)
{
- m_highesty = QMAX(m_highesty, *ity);
- m_lowesty = QMIN(m_lowesty, *ity);
+ m_highesty = TQMAX(m_highesty, *ity);
+ m_lowesty = TQMIN(m_lowesty, *ity);
}
//if( svgElement.hasAttribute("width") && svgElement.hasAttribute("height"))
@@ -250,26 +250,26 @@ bool KivioDiaStencilSpawner::load(const QString &file)
//}
//else
{
- // scale the shape to be close to 30 by 30
+ // scale the tqshape to be close to 30 by 30
m_yscale = 30.0/(m_highesty - m_lowesty);
m_xscale = 30.0/(m_highestx - m_lowestx);
}
// Add KivioConnectorTarget's
- QDomElement connectionsElement = diaMain.namedItem("connections").toElement();
- QDomNode connectionsNode = connectionsElement.firstChild();
+ TQDomElement connectionsElement = diaMain.namedItem("connections").toElement();
+ TQDomNode connectionsNode = connectionsElement.firstChild();
while(!connectionsNode.isNull())
{
- QDomElement connectionChild = connectionsNode.toElement();
+ TQDomElement connectionChild = connectionsNode.toElement();
if(!connectionChild.isNull())
{
if(connectionChild.tagName() == "point")
{
if(connectionChild.hasAttribute("x") && connectionChild.hasAttribute("y"))
{
- QDomElement kivioConnectorTarget = kivio.createElement("KivioConnectorTarget");
- kivioConnectorTarget.setAttribute("x", QString::number(diaPointToKivio(connectionChild.attribute("x").toFloat(),true) * m_xscale));
- kivioConnectorTarget.setAttribute("y", QString::number(diaPointToKivio(connectionChild.attribute("y").toFloat(), false) * m_yscale));
+ TQDomElement kivioConnectorTarget = kivio.createElement("KivioConnectorTarget");
+ kivioConnectorTarget.setAttribute("x", TQString::number(diaPointToKivio(connectionChild.attribute("x").toFloat(),true) * m_xscale));
+ kivioConnectorTarget.setAttribute("y", TQString::number(diaPointToKivio(connectionChild.attribute("y").toFloat(), false) * m_yscale));
kivio.documentElement().appendChild(kivioConnectorTarget);
}
@@ -283,7 +283,7 @@ bool KivioDiaStencilSpawner::load(const QString &file)
int runs = 0;
while(!svgNode.isNull())
{
- QDomElement svgChild = svgNode.toElement();
+ TQDomElement svgChild = svgNode.toElement();
if(!svgChild.isNull())
{
if(svgChild.tagName() == "svg:rect")
@@ -292,13 +292,13 @@ bool KivioDiaStencilSpawner::load(const QString &file)
// TODO: rx and ry -> rounded rects
if(svgChild.hasAttribute("x") && svgChild.hasAttribute("y") && svgChild.hasAttribute("width") && svgChild.hasAttribute("height"))
{
- QDomElement kivioShape = kivio.createElement("KivioShape");
+ TQDomElement kivioShape = kivio.createElement("KivioShape");
kivioShape.setAttribute("type", "Rectangle");
- kivioShape.setAttribute("name", QString::fromLatin1("Element") + QString::number(runs));
- kivioShape.setAttribute("x", QString::number(diaPointToKivio(svgChild.attribute("x").toFloat(),true) * m_xscale));
- kivioShape.setAttribute("y", QString::number(diaPointToKivio(svgChild.attribute("y").toFloat(), false) * m_yscale));
- kivioShape.setAttribute("w", QString::number(svgChild.attribute("width").toFloat() * m_xscale));
- kivioShape.setAttribute("h", QString::number(svgChild.attribute("height").toFloat() * m_yscale));
+ kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs));
+ kivioShape.setAttribute("x", TQString::number(diaPointToKivio(svgChild.attribute("x").toFloat(),true) * m_xscale));
+ kivioShape.setAttribute("y", TQString::number(diaPointToKivio(svgChild.attribute("y").toFloat(), false) * m_yscale));
+ kivioShape.setAttribute("w", TQString::number(svgChild.attribute("width").toFloat() * m_xscale));
+ kivioShape.setAttribute("h", TQString::number(svgChild.attribute("height").toFloat() * m_yscale));
kivio.documentElement().appendChild(kivioShape);
}
}
@@ -307,13 +307,13 @@ bool KivioDiaStencilSpawner::load(const QString &file)
runs++;
if(svgChild.hasAttribute("cx") && svgChild.hasAttribute("cy") && svgChild.hasAttribute("r"))
{
- QDomElement kivioShape = kivio.createElement("KivioShape");
+ TQDomElement kivioShape = kivio.createElement("KivioShape");
kivioShape.setAttribute("type", "Ellipse");
- kivioShape.setAttribute("name", QString::fromLatin1("Element") + QString::number(runs));
- kivioShape.setAttribute("x", QString::number((diaPointToKivio(svgChild.attribute("cx").toFloat() - svgChild.attribute("r").toFloat(),true) * m_xscale)));
- kivioShape.setAttribute("y", QString::number((diaPointToKivio(svgChild.attribute("cy").toFloat() - svgChild.attribute("r").toFloat(), false) * m_yscale)));
- kivioShape.setAttribute("w", QString::number(svgChild.attribute("r").toFloat() * m_xscale * 2));
- kivioShape.setAttribute("h", QString::number(svgChild.attribute("r").toFloat() * m_yscale * 2));
+ kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs));
+ kivioShape.setAttribute("x", TQString::number((diaPointToKivio(svgChild.attribute("cx").toFloat() - svgChild.attribute("r").toFloat(),true) * m_xscale)));
+ kivioShape.setAttribute("y", TQString::number((diaPointToKivio(svgChild.attribute("cy").toFloat() - svgChild.attribute("r").toFloat(), false) * m_yscale)));
+ kivioShape.setAttribute("w", TQString::number(svgChild.attribute("r").toFloat() * m_xscale * 2));
+ kivioShape.setAttribute("h", TQString::number(svgChild.attribute("r").toFloat() * m_yscale * 2));
kivio.documentElement().appendChild(kivioShape);
}
}
@@ -322,13 +322,13 @@ bool KivioDiaStencilSpawner::load(const QString &file)
runs++;
if(svgChild.hasAttribute("cx") && svgChild.hasAttribute("cy") && svgChild.hasAttribute("rx") && svgChild.hasAttribute("ry"))
{
- QDomElement kivioShape = kivio.createElement("KivioShape");
+ TQDomElement kivioShape = kivio.createElement("KivioShape");
kivioShape.setAttribute("type", "Ellipse");
- kivioShape.setAttribute("name", QString::fromLatin1("Element") + QString::number(runs));
- kivioShape.setAttribute("x", QString::number((diaPointToKivio(svgChild.attribute("cx").toFloat() - svgChild.attribute("rx").toFloat(),true) * m_xscale)));
- kivioShape.setAttribute("y", QString::number((diaPointToKivio(svgChild.attribute("cy").toFloat() - svgChild.attribute("ry").toFloat(), false) * m_yscale)));
- kivioShape.setAttribute("w", QString::number(svgChild.attribute("rx").toFloat() * m_xscale * 2));
- kivioShape.setAttribute("h", QString::number(svgChild.attribute("ry").toFloat() * m_yscale * 2));
+ kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs));
+ kivioShape.setAttribute("x", TQString::number((diaPointToKivio(svgChild.attribute("cx").toFloat() - svgChild.attribute("rx").toFloat(),true) * m_xscale)));
+ kivioShape.setAttribute("y", TQString::number((diaPointToKivio(svgChild.attribute("cy").toFloat() - svgChild.attribute("ry").toFloat(), false) * m_yscale)));
+ kivioShape.setAttribute("w", TQString::number(svgChild.attribute("rx").toFloat() * m_xscale * 2));
+ kivioShape.setAttribute("h", TQString::number(svgChild.attribute("ry").toFloat() * m_yscale * 2));
kivio.documentElement().appendChild(kivioShape);
}
}
@@ -337,15 +337,15 @@ bool KivioDiaStencilSpawner::load(const QString &file)
runs++;
if(svgChild.hasAttribute("x1") && svgChild.hasAttribute("y1") && svgChild.hasAttribute("x2") && svgChild.hasAttribute("y2"))
{
- QDomElement kivioShape = kivio.createElement("KivioShape");
+ TQDomElement kivioShape = kivio.createElement("KivioShape");
kivioShape.setAttribute("type", "LineArray");
- kivioShape.setAttribute("name", QString::fromLatin1("Element") + QString::number(runs));
+ kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs));
- QDomElement lineArrayElement = kivio.createElement("Line");
- lineArrayElement.setAttribute("x1", QString::number(diaPointToKivio(svgChild.attribute("x1").toFloat(),true) * m_xscale));
- lineArrayElement.setAttribute("y1", QString::number(diaPointToKivio(svgChild.attribute("y1").toFloat(), false) * m_yscale));
- lineArrayElement.setAttribute("x2", QString::number(diaPointToKivio(svgChild.attribute("x2").toFloat(),true) * m_xscale));
- lineArrayElement.setAttribute("y2", QString::number(diaPointToKivio(svgChild.attribute("y2").toFloat(), false) * m_yscale));
+ TQDomElement lineArrayElement = kivio.createElement("Line");
+ lineArrayElement.setAttribute("x1", TQString::number(diaPointToKivio(svgChild.attribute("x1").toFloat(),true) * m_xscale));
+ lineArrayElement.setAttribute("y1", TQString::number(diaPointToKivio(svgChild.attribute("y1").toFloat(), false) * m_yscale));
+ lineArrayElement.setAttribute("x2", TQString::number(diaPointToKivio(svgChild.attribute("x2").toFloat(),true) * m_xscale));
+ lineArrayElement.setAttribute("y2", TQString::number(diaPointToKivio(svgChild.attribute("y2").toFloat(), false) * m_yscale));
kivioShape.appendChild(lineArrayElement);
kivio.documentElement().appendChild(kivioShape);
@@ -356,24 +356,24 @@ bool KivioDiaStencilSpawner::load(const QString &file)
runs++;
if(svgChild.hasAttribute("points"))
{
- QDomElement kivioShape = kivio.createElement("KivioShape");
+ TQDomElement kivioShape = kivio.createElement("KivioShape");
kivioShape.setAttribute("type", "Polyline");
- kivioShape.setAttribute("name", QString::fromLatin1("Element") + QString::number(runs));
+ kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs));
- QStringList points = QStringList::split(" ", svgChild.attribute("points"));
- for(QStringList::Iterator it = points.begin(); it != points.end(); ++it)
+ TQStringList points = TQStringList::split(" ", svgChild.attribute("points"));
+ for(TQStringList::Iterator it = points.begin(); it != points.end(); ++it)
{
- QString x, y;
+ TQString x, y;
- QStringList parsed = QStringList::split(",", (*it));
- QStringList::Iterator itp = parsed.begin();
+ TQStringList parsed = TQStringList::split(",", (*it));
+ TQStringList::Iterator itp = parsed.begin();
x = (*itp);
++itp;
y = (*itp);
- QDomElement kivioPointElement = kivio.createElement("KivioPoint");
- kivioPointElement.setAttribute("x", QString::number(diaPointToKivio(x.toFloat(),true) * m_xscale));
- kivioPointElement.setAttribute("y", QString::number(diaPointToKivio(y.toFloat(), false) * m_yscale));
+ TQDomElement kivioPointElement = kivio.createElement("KivioPoint");
+ kivioPointElement.setAttribute("x", TQString::number(diaPointToKivio(x.toFloat(),true) * m_xscale));
+ kivioPointElement.setAttribute("y", TQString::number(diaPointToKivio(y.toFloat(), false) * m_yscale));
kivioShape.appendChild(kivioPointElement);
}
@@ -385,24 +385,24 @@ bool KivioDiaStencilSpawner::load(const QString &file)
runs++;
if(svgChild.hasAttribute("points"))
{
- QDomElement kivioShape = kivio.createElement("KivioShape");
+ TQDomElement kivioShape = kivio.createElement("KivioShape");
kivioShape.setAttribute("type", "Polygon");
- kivioShape.setAttribute("name", QString::fromLatin1("Element") + QString::number(runs));
+ kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs));
- QStringList points = QStringList::split(" ", svgChild.attribute("points"));
- for(QStringList::Iterator it = points.begin(); it != points.end(); ++it)
+ TQStringList points = TQStringList::split(" ", svgChild.attribute("points"));
+ for(TQStringList::Iterator it = points.begin(); it != points.end(); ++it)
{
- QString x, y;
+ TQString x, y;
- QStringList parsed = QStringList::split(",", (*it));
- QStringList::Iterator itp = parsed.begin();
+ TQStringList parsed = TQStringList::split(",", (*it));
+ TQStringList::Iterator itp = parsed.begin();
x = (*itp);
++itp;
y = (*itp);
- QDomElement kivioPointElement = kivio.createElement("KivioPoint");
- kivioPointElement.setAttribute("x", QString::number(diaPointToKivio(x.toFloat(),true) * m_xscale));
- kivioPointElement.setAttribute("y", QString::number(diaPointToKivio(y.toFloat(), false) * m_yscale));
+ TQDomElement kivioPointElement = kivio.createElement("KivioPoint");
+ kivioPointElement.setAttribute("x", TQString::number(diaPointToKivio(x.toFloat(),true) * m_xscale));
+ kivioPointElement.setAttribute("y", TQString::number(diaPointToKivio(y.toFloat(), false) * m_yscale));
kivioShape.appendChild(kivioPointElement);
}
@@ -413,11 +413,11 @@ bool KivioDiaStencilSpawner::load(const QString &file)
{
runs++;
bool isClosed;
- QDomElement kivioShape = kivio.createElement("KivioShape");
+ TQDomElement kivioShape = kivio.createElement("KivioShape");
if(svgChild.hasAttribute("d"))
{
- if(svgChild.attribute("d").contains('z') || svgChild.attribute("d").contains('Z'))
+ if(svgChild.attribute("d").tqcontains('z') || svgChild.attribute("d").tqcontains('Z'))
{
isClosed = true;
kivioShape.setAttribute("type", "ClosedPath");
@@ -428,7 +428,7 @@ bool KivioDiaStencilSpawner::load(const QString &file)
kivioShape.setAttribute("type", "OpenPath");
}
- kivioShape.setAttribute("name", QString::fromLatin1("Element") + QString::number(runs));
+ kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs));
DiaPathParser *dpp = new DiaPathParser(&kivio,
&kivioShape, m_xscale, m_yscale,
@@ -447,16 +447,16 @@ bool KivioDiaStencilSpawner::load(const QString &file)
// stroke-linejoin: milter, bevel, round
// stroke-linecap: round, square, flat
// fill: ?
- QStringList styles = QStringList::split(";", svgChild.attribute("style"));
+ TQStringList styles = TQStringList::split(";", svgChild.attribute("style"));
for( uint idx = 0; idx < styles.count(); idx++)
{
//kdDebug(43000) << "Style: " << styles[idx] << endl;
- if( isClosed && styles[idx].contains("fill:"))
+ if( isClosed && styles[idx].tqcontains("fill:"))
{
- QDomElement fillStyle = kivio.createElement("KivioFillStyle");
- if( styles[idx].contains("forground"))
+ TQDomElement fillStyle = kivio.createElement("KivioFillStyle");
+ if( styles[idx].tqcontains("forground"))
fillStyle.setAttribute("color", "#0000");
- else if (styles[idx].contains("background"))
+ else if (styles[idx].tqcontains("background"))
fillStyle.setAttribute("color", "#ffff");
fillStyle.setAttribute("colorStyle", "1");
@@ -472,8 +472,8 @@ bool KivioDiaStencilSpawner::load(const QString &file)
// Apply width and height
- dimensionsElement.setAttribute("w", QString::number((fabs(m_highestx - m_lowestx)) * m_xscale));
- dimensionsElement.setAttribute("h", QString::number((fabs(m_highesty - m_lowesty)) * m_yscale));
+ dimensionsElement.setAttribute("w", TQString::number((fabs(m_highestx - m_lowestx)) * m_xscale));
+ dimensionsElement.setAttribute("h", TQString::number((fabs(m_highesty - m_lowesty)) * m_yscale));
m_xlist.clear();
m_ylist.clear();
@@ -481,7 +481,7 @@ bool KivioDiaStencilSpawner::load(const QString &file)
return loadXML(file, kivio);
}
-bool KivioDiaStencilSpawner::loadXML(const QString &file, QDomDocument &d)
+bool KivioDiaStencilSpawner::loadXML(const TQString &file, TQDomDocument &d)
{
bool ret = m_smlStencilSpawner->loadXML(file, d);
diff --git a/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.h b/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.h
index 2ae8ef47..9d3977de 100644
--- a/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.h
+++ b/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.h
@@ -19,10 +19,10 @@
#ifndef KIVIO_DIA_STENCIL_SPAWNER_H
#define KIVIO_DIA_STENCIL_SPAWNER_H
-#include <qdom.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "kivio_connector_target.h"
//#define protected public // ewww... what a gory hack
@@ -36,26 +36,26 @@ class KivioDiaStencilSpawner : public KivioStencilSpawner
KivioDiaStencilSpawner(KivioStencilSpawnerSet *);
virtual ~KivioDiaStencilSpawner();
- virtual bool load(const QString &file);
- virtual bool loadXML(const QString &file, QDomDocument &d);
+ virtual bool load(const TQString &file);
+ virtual bool loadXML(const TQString &file, TQDomDocument &d);
- virtual QDomElement saveXML(QDomDocument &d);
+ virtual TQDomElement saveXML(TQDomDocument &d);
- virtual QString &filename() { return m_filename; }
+ virtual TQString &filename() { return m_filename; }
virtual KivioStencil *newStencil();
- QPtrList<KivioConnectorTarget> *targets() { return m_smlStencilSpawner->targets(); }
+ TQPtrList<KivioConnectorTarget> *targets() { return m_smlStencilSpawner->targets(); }
protected:
void calculateDimensions(float x, float y);
float diaPointToKivio(float point, bool xpoint);
KivioSMLStencilSpawner *m_smlStencilSpawner;
- QString m_filename;
+ TQString m_filename;
- QValueList<float> m_xlist;
- QValueList<float> m_ylist;
+ TQValueList<float> m_xlist;
+ TQValueList<float> m_ylist;
float m_lowestx;
float m_lowesty;
float m_highestx;
diff --git a/kivio/kiviopart/kiviosdk/kivio_fill_style.cpp b/kivio/kiviopart/kiviosdk/kivio_fill_style.cpp
index 893dd6fc..29f0f1f5 100644
--- a/kivio/kiviopart/kiviosdk/kivio_fill_style.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_fill_style.cpp
@@ -30,9 +30,9 @@
KivioFillStyle::KivioFillStyle()
{
m_colorStyle = kcsSolid;
- m_color = QColor(255,255,255);
- m_color2 = QColor(255,255,255);
- m_brushStyle = QBrush::SolidPattern;
+ m_color = TQColor(255,255,255);
+ m_color2 = TQColor(255,255,255);
+ m_brushStyle = Qt::SolidPattern;
m_gradientType = KImageEffect::VerticalGradient;
}
@@ -81,13 +81,13 @@ void KivioFillStyle::copyInto( KivioFillStyle *pTarget ) const
*
* @param e The element to load from
*/
-bool KivioFillStyle::loadXML( const QDomElement &e )
+bool KivioFillStyle::loadXML( const TQDomElement &e )
{
- QDomElement ele;
- QDomNode node;
+ TQDomElement ele;
+ TQDomNode node;
- m_color = XmlReadColor( e, "color", QColor(255,255,255).rgb() );
- m_color2 = XmlReadColor( e, "gradientColor", QColor(255,255,255).rgb() );
+ m_color = XmlReadColor( e, "color", TQColor(255,255,255).rgb() );
+ m_color2 = XmlReadColor( e, "gradientColor", TQColor(255,255,255).rgb() );
m_colorStyle = static_cast<KivioColorStyle>(XmlReadInt( e, "colorStyle", kcsSolid ));
@@ -103,11 +103,11 @@ bool KivioFillStyle::loadXML( const QDomElement &e )
*
* @param doc The document to create nodes for.
*
- * @returns QDomElement is returned.
+ * @returns TQDomElement is returned.
*/
-QDomElement KivioFillStyle::saveXML( QDomDocument &doc )
+TQDomElement KivioFillStyle::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioFillStyle");
+ TQDomElement e = doc.createElement("KivioFillStyle");
XmlWriteColor( e, "color", m_color );
XmlWriteColor( e, "gradientColor", m_color2 );
@@ -119,9 +119,9 @@ QDomElement KivioFillStyle::saveXML( QDomDocument &doc )
return e;
}
-QBrush KivioFillStyle::brush()
+TQBrush KivioFillStyle::brush()
{
- QBrush b;
+ TQBrush b;
b.setColor(m_color);
switch(m_colorStyle) {
@@ -130,7 +130,7 @@ QBrush KivioFillStyle::brush()
break;
case kcsNone:
- b.setStyle(QBrush::NoBrush);
+ b.setStyle(Qt::NoBrush);
break;
case kcsGradient:
diff --git a/kivio/kiviopart/kiviosdk/kivio_fill_style.h b/kivio/kiviopart/kiviosdk/kivio_fill_style.h
index e6f96eb8..4be7303b 100644
--- a/kivio/kiviopart/kiviosdk/kivio_fill_style.h
+++ b/kivio/kiviopart/kiviosdk/kivio_fill_style.h
@@ -19,9 +19,9 @@
#ifndef KIVIO_FILL_STYLE_H
#define KIVIO_FILL_STYLE_H
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qdom.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqdom.h>
#include <kimageeffect.h>
@@ -43,9 +43,9 @@ public:
protected:
KivioColorStyle m_colorStyle; // The color style to use when filling
- QColor m_color; // The color to use when solid filling
- QColor m_color2; // The second color to use when using a gradient
- QBrush::BrushStyle m_brushStyle; // The brush pattern to use when solid filling (maybe gradient too?)
+ TQColor m_color; // The color to use when solid filling
+ TQColor m_color2; // The second color to use when using a gradient
+ Qt::BrushStyle m_brushStyle; // The brush pattern to use when solid filling (maybe gradient too?)
KImageEffect::GradientType m_gradientType; //Which type of gradient to use
public:
@@ -55,26 +55,26 @@ public:
void copyInto( KivioFillStyle *pTarget ) const;
- bool loadXML( const QDomElement & );
- QDomElement saveXML( QDomDocument & );
+ bool loadXML( const TQDomElement & );
+ TQDomElement saveXML( TQDomDocument & );
inline KivioColorStyle colorStyle() const { return m_colorStyle; }
inline void setKivioColorStyle( KivioColorStyle k ) { m_colorStyle = k; }
- inline QColor color() const { return m_color; }
- inline void setColor( const QColor& c ) { m_color = c; }
- inline QColor color2() const { return m_color2; }
- inline void setColor2( const QColor& c ) { m_color2 = c; }
+ inline TQColor color() const { return m_color; }
+ inline void setColor( const TQColor& c ) { m_color = c; }
+ inline TQColor color2() const { return m_color2; }
+ inline void setColor2( const TQColor& c ) { m_color2 = c; }
- inline QBrush::BrushStyle brushStyle() const { return m_brushStyle; }
- inline void setBrushStyle( QBrush::BrushStyle b ) { m_brushStyle = b; }
+ inline Qt::BrushStyle brushStyle() const { return m_brushStyle; }
+ inline void setBrushStyle( Qt::BrushStyle b ) { m_brushStyle = b; }
inline KImageEffect::GradientType gradientType() const { return m_gradientType; }
inline void setGradientType(KImageEffect::GradientType t) { m_gradientType = t; }
- QBrush brush();
+ TQBrush brush();
};
#endif
diff --git a/kivio/kiviopart/kiviosdk/kivio_gradient.cpp b/kivio/kiviopart/kiviosdk/kivio_gradient.cpp
index 0cae5d5e..eaa35c3c 100644
--- a/kivio/kiviopart/kiviosdk/kivio_gradient.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_gradient.cpp
@@ -29,11 +29,11 @@ KivioGradient::KivioGradient()
m_pPoints(NULL)
{
// Allocate the color list
- m_pColors = new QPtrList<QColor>;
+ m_pColors = new TQPtrList<TQColor>;
m_pColors->setAutoDelete(true);
// Allocate the point list
- m_pPoints = new QPtrList<KivioPoint>;
+ m_pPoints = new TQPtrList<KivioPoint>;
m_pPoints->setAutoDelete(true);
m_gradientType = kgtNone;
@@ -77,12 +77,12 @@ KivioGradient::KivioGradient( const KivioGradient &source )
m_gradientType = source.m_gradientType;
// Duplicate the colors list
- QColor *pColor;
- m_pColors = new QPtrList<QColor>;
+ TQColor *pColor;
+ m_pColors = new TQPtrList<TQColor>;
pColor = source.m_pColors->first();
while( pColor )
{
- m_pColors->append( new QColor(*pColor) );
+ m_pColors->append( new TQColor(*pColor) );
pColor = source.m_pColors->next();
}
@@ -90,7 +90,7 @@ KivioGradient::KivioGradient( const KivioGradient &source )
// Duplicate the point list
KivioPoint *pPoint;
- m_pPoints = new QPtrList<KivioPoint>;
+ m_pPoints = new TQPtrList<KivioPoint>;
pPoint = source.m_pPoints->first();
while( pPoint )
{
@@ -124,16 +124,16 @@ void KivioGradient::copyInto( KivioGradient *pTarget ) const
}
// Allocate a new color array
- pTarget->m_pColors = new QPtrList<QColor>;
+ pTarget->m_pColors = new TQPtrList<TQColor>;
pTarget->m_pColors->setAutoDelete(true);
// Copy the colors
- QColor *pColor;
+ TQColor *pColor;
pColor = m_pColors->first();
while( pColor )
{
- pTarget->m_pColors->append( new QColor(*pColor) );
+ pTarget->m_pColors->append( new TQColor(*pColor) );
pColor = m_pColors->next();
}
@@ -144,7 +144,7 @@ void KivioGradient::copyInto( KivioGradient *pTarget ) const
pTarget->m_pPoints = NULL;
}
- pTarget->m_pPoints = new QPtrList<KivioPoint>;
+ pTarget->m_pPoints = new TQPtrList<KivioPoint>;
pTarget->m_pPoints->setAutoDelete(true);
KivioPoint *pPoint;
@@ -163,7 +163,7 @@ void KivioGradient::copyInto( KivioGradient *pTarget ) const
*
* FIXME: Implement this
*/
-bool KivioGradient::loadXML( const QDomElement & )
+bool KivioGradient::loadXML( const TQDomElement & )
{
return false;
}
@@ -174,7 +174,7 @@ bool KivioGradient::loadXML( const QDomElement & )
*
* FIXME: Implement this
*/
-QDomElement KivioGradient::saveXML( QDomDocument &doc )
+TQDomElement KivioGradient::saveXML( TQDomDocument &doc )
{
return doc.createElement("KivioGradient");
diff --git a/kivio/kiviopart/kiviosdk/kivio_gradient.h b/kivio/kiviopart/kiviosdk/kivio_gradient.h
index 0d9acfee..3e854e2e 100644
--- a/kivio/kiviopart/kiviosdk/kivio_gradient.h
+++ b/kivio/kiviopart/kiviosdk/kivio_gradient.h
@@ -19,9 +19,9 @@
#ifndef KIVIO_GRADIENT_H
#define KIVIO_GRADIENT_H
-#include <qptrlist.h>
-#include <qcolor.h>
-#include <qdom.h>
+#include <tqptrlist.h>
+#include <tqcolor.h>
+#include <tqdom.h>
class KivioPoint;
class KivioGradient
@@ -40,8 +40,8 @@ public:
} KivioGradientType;
protected:
- QPtrList <QColor> *m_pColors; // A list of the colors in the gradient
- QPtrList <KivioPoint> *m_pPoints; // A list of the points for each color
+ TQPtrList <TQColor> *m_pColors; // A list of the colors in the gradient
+ TQPtrList <KivioPoint> *m_pPoints; // A list of the points for each color
KivioGradientType m_gradientType; // The type of gradient
@@ -52,13 +52,13 @@ public:
void copyInto( KivioGradient *pTarget ) const;
- bool loadXML( const QDomElement & );
- QDomElement saveXML( QDomDocument & );
+ bool loadXML( const TQDomElement & );
+ TQDomElement saveXML( TQDomDocument & );
- QPtrList<QColor> *colors() const { return m_pColors; }
+ TQPtrList<TQColor> *colors() const { return m_pColors; }
- QPtrList<KivioPoint> *points() const { return m_pPoints; }
+ TQPtrList<KivioPoint> *points() const { return m_pPoints; }
KivioGradientType gradientType() const { return m_gradientType; }
void setGradientType( KivioGradientType t ) { m_gradientType=t; }
diff --git a/kivio/kiviopart/kiviosdk/kivio_group_stencil.cpp b/kivio/kiviopart/kiviosdk/kivio_group_stencil.cpp
index f29fee68..2965ee74 100644
--- a/kivio/kiviopart/kiviosdk/kivio_group_stencil.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_group_stencil.cpp
@@ -29,7 +29,7 @@ KivioGroupStencil::KivioGroupStencil()
: KivioStencil(),
m_pGroupList(NULL)
{
- m_pGroupList = new QPtrList<KivioStencil>;
+ m_pGroupList = new TQPtrList<KivioStencil>;
m_pGroupList->setAutoDelete(true);
m_x = m_y = 1000000000000.0f;
@@ -83,7 +83,7 @@ void KivioGroupStencil::paintConnectorTargets( KivioIntraStencilData *pData )
}
}
-void KivioGroupStencil::setFGColor( QColor c )
+void KivioGroupStencil::setFGColor( TQColor c )
{
// Draw the group in outline mode
KivioStencil *pStencil = m_pGroupList->first();
@@ -95,7 +95,7 @@ void KivioGroupStencil::setFGColor( QColor c )
}
}
-void KivioGroupStencil::setBGColor( QColor c )
+void KivioGroupStencil::setBGColor( TQColor c )
{
// Draw the group in outline mode
KivioStencil *pStencil = m_pGroupList->first();
@@ -202,15 +202,15 @@ KivioStencil *KivioGroupStencil::duplicate()
return pGroup;
}
-bool KivioGroupStencil::loadXML( const QDomElement &e, KivioLayer *pLayer )
+bool KivioGroupStencil::loadXML( const TQDomElement &e, KivioLayer *pLayer )
{
- QDomNode node;
+ TQDomNode node;
KivioStencil *pStencil;
node = e.firstChild();
while( !node.isNull() )
{
- QString name = node.nodeName();
+ TQString name = node.nodeName();
if( name == "KivioGroupStencil" )
{
@@ -255,11 +255,11 @@ bool KivioGroupStencil::loadXML( const QDomElement &e, KivioLayer *pLayer )
return true;
}
-QDomElement KivioGroupStencil::saveXML( QDomDocument &doc )
+TQDomElement KivioGroupStencil::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioGroupStencil");
+ TQDomElement e = doc.createElement("KivioGroupStencil");
- QDomElement stencilE;
+ TQDomElement stencilE;
KivioStencil *pStencil = m_pGroupList->first();
while( pStencil )
{
@@ -503,13 +503,13 @@ void KivioGroupStencil::searchForConnections( KivioPage *p )
pStencil->searchForConnections( p );
// Restore it
- m_pGroupList->find( pCur );
+ m_pGroupList->tqfind( pCur );
pStencil = m_pGroupList->next();
}
}
-void KivioGroupStencil::setTextColor( QColor c )
+void KivioGroupStencil::setTextColor( TQColor c )
{
KivioStencil *pStencil = m_pGroupList->first();
while( pStencil )
@@ -520,7 +520,7 @@ void KivioGroupStencil::setTextColor( QColor c )
}
}
-void KivioGroupStencil::setText( const QString &text )
+void KivioGroupStencil::setText( const TQString &text )
{
KivioStencil *pStencil = m_pGroupList->first();
while( pStencil )
@@ -531,12 +531,12 @@ void KivioGroupStencil::setText( const QString &text )
}
}
-QString KivioGroupStencil::text()
+TQString KivioGroupStencil::text()
{
KivioStencil *pStencil = m_pGroupList->first();
if( !pStencil )
- return QString("");
+ return TQString("");
return pStencil->text();
}
@@ -557,7 +557,7 @@ int KivioGroupStencil::hTextAlign()
KivioStencil *pStencil = m_pGroupList->first();
if( !pStencil )
- return Qt::AlignHCenter;
+ return TQt::AlignHCenter;
return pStencil->hTextAlign();
}
@@ -578,12 +578,12 @@ int KivioGroupStencil::vTextAlign()
KivioStencil *pStencil = m_pGroupList->first();
if( !pStencil )
- return Qt::AlignVCenter;
+ return TQt::AlignVCenter;
return pStencil->vTextAlign();
}
-void KivioGroupStencil::setTextFont( const QFont &f )
+void KivioGroupStencil::setTextFont( const TQFont &f )
{
KivioStencil *pStencil = m_pGroupList->first();
while( pStencil )
@@ -594,7 +594,7 @@ void KivioGroupStencil::setTextFont( const QFont &f )
}
}
-QFont KivioGroupStencil::textFont()
+TQFont KivioGroupStencil::textFont()
{
KivioStencil *pStencil = m_pGroupList->first();
@@ -604,12 +604,12 @@ QFont KivioGroupStencil::textFont()
return pStencil->textFont();
}
-QColor KivioGroupStencil::textColor()
+TQColor KivioGroupStencil::textColor()
{
KivioStencil *pStencil = m_pGroupList->first();
if( !pStencil )
- return QColor(0, 0, 0);
+ return TQColor(0, 0, 0);
return pStencil->textColor();
}
@@ -619,31 +619,31 @@ int KivioGroupStencil::resizeHandlePositions()
return KIVIO_RESIZE_HANDLE_POSITION_ALL;
}
-QString KivioGroupStencil::getTextBoxName(const KoPoint& p)
+TQString KivioGroupStencil::getTextBoxName(const KoPoint& p)
{
int id = checkForCollision(p);
if(id < 0) {
- return QString::null;
+ return TQString();
}
KivioStencil* pStencil = m_pGroupList->at(id);
- QString name = QString::number(id) + "-" + pStencil->getTextBoxName(p);
+ TQString name = TQString::number(id) + "-" + pStencil->getTextBoxName(p);
return name;
}
-void KivioGroupStencil::setText(const QString& text, const QString& name)
+void KivioGroupStencil::setText(const TQString& text, const TQString& name)
{
int id = name.section("-", 0, 0).toInt();
- QString n = name.section("-", 1);
+ TQString n = name.section("-", 1);
m_pGroupList->at(id)->setText(text, n);
}
-QString KivioGroupStencil::text(const QString& name)
+TQString KivioGroupStencil::text(const TQString& name)
{
int id = name.section("-", 0, 0).toInt();
- QString n = name.section("-", 1);
+ TQString n = name.section("-", 1);
return m_pGroupList->at(id)->text(n);
}
@@ -683,66 +683,66 @@ bool KivioGroupStencil::hasTextBox() const
return false;
}
-QColor KivioGroupStencil::textColor(const QString& textBoxName)
+TQColor KivioGroupStencil::textColor(const TQString& textBoxName)
{
int id = textBoxName.section("-", 0, 0).toInt();
- QString n = textBoxName.section("-", 1);
+ TQString n = textBoxName.section("-", 1);
return m_pGroupList->at(id)->textColor(n);
}
-void KivioGroupStencil::setTextColor(const QString& textBoxName, const QColor& color)
+void KivioGroupStencil::setTextColor(const TQString& textBoxName, const TQColor& color)
{
int id = textBoxName.section("-", 0, 0).toInt();
- QString n = textBoxName.section("-", 1);
+ TQString n = textBoxName.section("-", 1);
m_pGroupList->at(id)->setTextColor(n, color);
}
-QFont KivioGroupStencil::textFont(const QString& textBoxName)
+TQFont KivioGroupStencil::textFont(const TQString& textBoxName)
{
int id = textBoxName.section("-", 0, 0).toInt();
- QString n = textBoxName.section("-", 1);
+ TQString n = textBoxName.section("-", 1);
return m_pGroupList->at(id)->textFont(n);
}
-void KivioGroupStencil::setTextFont(const QString& textBoxName, const QFont& font)
+void KivioGroupStencil::setTextFont(const TQString& textBoxName, const TQFont& font)
{
int id = textBoxName.section("-", 0, 0).toInt();
- QString n = textBoxName.section("-", 1);
+ TQString n = textBoxName.section("-", 1);
m_pGroupList->at(id)->setTextFont(n, font);
}
-int KivioGroupStencil::hTextAlign(const QString& textBoxName)
+int KivioGroupStencil::hTextAlign(const TQString& textBoxName)
{
int id = textBoxName.section("-", 0, 0).toInt();
- QString n = textBoxName.section("-", 1);
+ TQString n = textBoxName.section("-", 1);
return m_pGroupList->at(id)->hTextAlign(n);
}
-int KivioGroupStencil::vTextAlign(const QString& textBoxName)
+int KivioGroupStencil::vTextAlign(const TQString& textBoxName)
{
int id = textBoxName.section("-", 0, 0).toInt();
- QString n = textBoxName.section("-", 1);
+ TQString n = textBoxName.section("-", 1);
return m_pGroupList->at(id)->vTextAlign(n);
}
-void KivioGroupStencil::setHTextAlign(const QString& textBoxName, int align)
+void KivioGroupStencil::setHTextAlign(const TQString& textBoxName, int align)
{
int id = textBoxName.section("-", 0, 0).toInt();
- QString n = textBoxName.section("-", 1);
+ TQString n = textBoxName.section("-", 1);
m_pGroupList->at(id)->setHTextAlign(n, align);
}
-void KivioGroupStencil::setVTextAlign(const QString& textBoxName, int align)
+void KivioGroupStencil::setVTextAlign(const TQString& textBoxName, int align)
{
int id = textBoxName.section("-", 0, 0).toInt();
- QString n = textBoxName.section("-", 1);
+ TQString n = textBoxName.section("-", 1);
m_pGroupList->at(id)->setVTextAlign(n, align);
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_group_stencil.h b/kivio/kiviopart/kiviosdk/kivio_group_stencil.h
index e2ae148f..a9084dde 100644
--- a/kivio/kiviopart/kiviosdk/kivio_group_stencil.h
+++ b/kivio/kiviopart/kiviosdk/kivio_group_stencil.h
@@ -22,7 +22,7 @@
#include "kivio_stencil.h"
-#include <qdom.h>
+#include <tqdom.h>
class KivioIntraStencilData;
class KivioLayer;
@@ -33,7 +33,7 @@ class KivioGroupStencil : public KivioStencil
{
protected:
// The list of child stencils
- QPtrList<KivioStencil> *m_pGroupList;
+ TQPtrList<KivioStencil> *m_pGroupList;
int checkForCollision(const KoPoint& p);
public:
@@ -42,8 +42,8 @@ class KivioGroupStencil : public KivioStencil
// File I/O routines
- virtual bool loadXML( const QDomElement &, KivioLayer * );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual bool loadXML( const TQDomElement &, KivioLayer * );
+ virtual TQDomElement saveXML( TQDomDocument & );
// Painting routines
@@ -57,17 +57,17 @@ class KivioGroupStencil : public KivioStencil
// FG/Color operations
- virtual void setFGColor( QColor );
- virtual void setBGColor( QColor );
+ virtual void setFGColor( TQColor );
+ virtual void setBGColor( TQColor );
// Text operations
- virtual QColor textColor();
- virtual void setTextColor( QColor );
+ virtual TQColor textColor();
+ virtual void setTextColor( TQColor );
- virtual QFont textFont();
- virtual void setTextFont( const QFont & );
+ virtual TQFont textFont();
+ virtual void setTextFont( const TQFont & );
virtual int hTextAlign();
virtual int vTextAlign();
@@ -75,8 +75,8 @@ class KivioGroupStencil : public KivioStencil
virtual void setHTextAlign(int);
virtual void setVTextAlign(int);
- virtual void setText( const QString & );
- virtual QString text();
+ virtual void setText( const TQString & );
+ virtual TQString text();
// Line width
@@ -89,7 +89,7 @@ class KivioGroupStencil : public KivioStencil
// Group operations
virtual void addToGroup( KivioStencil * );
- virtual QPtrList<KivioStencil> *groupList() { return m_pGroupList; }
+ virtual TQPtrList<KivioStencil> *groupList() { return m_pGroupList; }
// Position / Dimension operations
@@ -115,26 +115,26 @@ class KivioGroupStencil : public KivioStencil
/**
Returns the name of the text box that is at @param p.
- If there exist no text box at @param p then it returns QString::null.
+ If there exist no text box at @param p then it returns TQString().
*/
- virtual QString getTextBoxName(const KoPoint& p);
+ virtual TQString getTextBoxName(const KoPoint& p);
- virtual void setText(const QString& text, const QString& name);
- virtual QString text(const QString& name);
+ virtual void setText(const TQString& text, const TQString& name);
+ virtual TQString text(const TQString& name);
virtual bool hasTextBox() const;
- virtual QColor textColor(const QString& textBoxName);
- virtual void setTextColor(const QString& textBoxName, const QColor& color);
+ virtual TQColor textColor(const TQString& textBoxName);
+ virtual void setTextColor(const TQString& textBoxName, const TQColor& color);
- virtual QFont textFont(const QString& textBoxName);
- virtual void setTextFont(const QString& textBoxName, const QFont& font);
+ virtual TQFont textFont(const TQString& textBoxName);
+ virtual void setTextFont(const TQString& textBoxName, const TQFont& font);
- virtual int hTextAlign(const QString& textBoxName);
- virtual int vTextAlign(const QString& textBoxName);
+ virtual int hTextAlign(const TQString& textBoxName);
+ virtual int vTextAlign(const TQString& textBoxName);
- virtual void setHTextAlign(const QString& textBoxName, int align);
- virtual void setVTextAlign(const QString& textBoxName, int align);
+ virtual void setHTextAlign(const TQString& textBoxName, int align);
+ virtual void setVTextAlign(const TQString& textBoxName, int align);
};
#endif
diff --git a/kivio/kiviopart/kiviosdk/kivio_layer.cpp b/kivio/kiviopart/kiviosdk/kivio_layer.cpp
index 4c567f00..999d053d 100644
--- a/kivio/kiviopart/kiviosdk/kivio_layer.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_layer.cpp
@@ -31,7 +31,7 @@
#include "kivio_doc.h"
#include "kivio_page.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <klocale.h>
#include <kdebug.h>
@@ -46,10 +46,10 @@ KivioLayer::KivioLayer( KivioPage *pPage )
m_pPage = pPage;
m_name = i18n("Untitled Layer");
- m_pStencilList = new QPtrList<KivioStencil>;
+ m_pStencilList = new TQPtrList<KivioStencil>;
m_pStencilList->setAutoDelete(true);
- m_pDeletedStencilList = new QPtrList<KivioStencil>;
+ m_pDeletedStencilList = new TQPtrList<KivioStencil>;
m_pDeletedStencilList->setAutoDelete(true);
m_flags = 0;
@@ -81,7 +81,7 @@ KivioLayer::~KivioLayer()
bool KivioLayer::addStencil( KivioStencil *pStencil )
{
- int pos = m_pDeletedStencilList->findRef(pStencil);
+ int pos = m_pDeletedStencilList->tqfindRef(pStencil);
if ( pos != -1 )
m_pDeletedStencilList->take( pos);
@@ -92,14 +92,14 @@ bool KivioLayer::addStencil( KivioStencil *pStencil )
void KivioLayer::takeStencilFromList( KivioStencil *pStencil )
{
- int pos=m_pStencilList->findRef(pStencil);
+ int pos=m_pStencilList->tqfindRef(pStencil);
m_pStencilList->take( pos );
m_pDeletedStencilList->append( pStencil );
}
void KivioLayer::insertStencil( KivioStencil *pStencil )
{
- int pos=m_pDeletedStencilList->findRef(pStencil);
+ int pos=m_pDeletedStencilList->tqfindRef(pStencil);
if ( pos != -1 )
m_pDeletedStencilList->take( pos);
@@ -124,9 +124,9 @@ bool KivioLayer::removeStencil( KivioStencil *pStencil )
*
* @returns A new, loaded stencil.
*/
-KivioStencil *KivioLayer::loadSMLStencil( const QDomElement &stencilE )
+KivioStencil *KivioLayer::loadSMLStencil( const TQDomElement &stencilE )
{
- QString setId, _id;
+ TQString setId, _id;
kdDebug(43000) << "KivioLayer::loadSMLStencil() " << setId << " " << _id << endl;
@@ -166,7 +166,7 @@ KivioStencil *KivioLayer::loadSMLStencil( const QDomElement &stencilE )
*
* @returns A new, loaded stencil.
*/
-KivioStencil *KivioLayer::loadGroupStencil( const QDomElement &stencilE )
+KivioStencil *KivioLayer::loadGroupStencil( const TQDomElement &stencilE )
{
kdDebug(43000) << "KivioLayer::loadGroupStencil()" << endl;
@@ -181,9 +181,9 @@ KivioStencil *KivioLayer::loadGroupStencil( const QDomElement &stencilE )
return pStencil;
}
-KivioStencil *KivioLayer::loadPluginStencil( const QDomElement &stencilE )
+KivioStencil *KivioLayer::loadPluginStencil( const TQDomElement &stencilE )
{
- QString setId, _id;
+ TQString setId, _id;
kdDebug(43000) << "KivioLayer::loadPluginStencil() " << setId.ascii() << " / " << _id << endl;
@@ -210,17 +210,17 @@ KivioStencil *KivioLayer::loadPluginStencil( const QDomElement &stencilE )
return NULL;
}
-bool KivioLayer::loadXML( const QDomElement &layerE )
+bool KivioLayer::loadXML( const TQDomElement &layerE )
{
m_flags = XmlReadInt( layerE, "flags", 1 );
kdDebug(43000) << "Flags: " << m_flags << endl;
m_name = XmlReadString( layerE, "name", "layerX" );
- QDomNode node;
+ TQDomNode node;
node = layerE.firstChild();
while( !node.isNull() )
{
- QString name = node.nodeName();
+ TQString name = node.nodeName();
if( name == "KivioSMLStencil" || name == "KivioPyStencil" )
{
KivioStencil *pStencil = loadSMLStencil( node.toElement() );
@@ -270,16 +270,16 @@ bool KivioLayer::loadXML( const QDomElement &layerE )
return true;
}
-void KivioLayer::loadOasis(const QDomElement& layer)
+void KivioLayer::loadOasis(const TQDomElement& layer)
{
m_name = layer.attribute("draw:name");
// TODO OASIS Load flags
}
-QDomElement KivioLayer::saveXML( QDomDocument &doc )
+TQDomElement KivioLayer::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioLayer");
+ TQDomElement e = doc.createElement("KivioLayer");
XmlWriteInt( e, "flags", m_flags );
XmlWriteString( e, "name", m_name );
@@ -303,7 +303,7 @@ void KivioLayer::saveOasis(KoXmlWriter* layerWriter)
layerWriter->endElement(); // draw:layer
}
-void KivioLayer::paintContent( KivioPainter& painter, const QRect&, bool, QPoint,
+void KivioLayer::paintContent( KivioPainter& painter, const TQRect&, bool, TQPoint,
KoZoomHandler* zoom )
{
if(!visible()) {
@@ -313,7 +313,7 @@ void KivioLayer::paintContent( KivioPainter& painter, const QRect&, bool, QPoint
KivioStencil *pStencil = m_pStencilList->first();
KivioIntraStencilData data;
- painter.setFGColor( QColor(0,0,0) );
+ painter.setFGColor( TQColor(0,0,0) );
data.painter = &painter;
data.zoomHandler = zoom;
@@ -346,7 +346,7 @@ void KivioLayer::printContent( KivioPainter& painter, int xdpi, int ydpi )
KoZoomHandler zoomHandler;
zoomHandler.setZoomAndResolution(100, xdpi, ydpi);
- painter.setFGColor( QColor(0,0,0) );
+ painter.setFGColor( TQColor(0,0,0) );
data.painter = &painter;
data.zoomHandler = &zoomHandler;
@@ -368,7 +368,7 @@ void KivioLayer::printContent(KivioPainter& painter, KoZoomHandler* zoomHandler)
KivioStencil *pStencil = m_pStencilList->first();
KivioIntraStencilData data;
- painter.setFGColor( QColor(0,0,0) );
+ painter.setFGColor( TQColor(0,0,0) );
data.painter = &painter;
data.zoomHandler = zoomHandler;
@@ -382,7 +382,7 @@ void KivioLayer::printContent(KivioPainter& painter, KoZoomHandler* zoomHandler)
}
}
-void KivioLayer::paintConnectorTargets( KivioPainter& painter, const QRect&, bool, QPoint,
+void KivioLayer::paintConnectorTargets( KivioPainter& painter, const TQRect&, bool, TQPoint,
KoZoomHandler* zoom )
{
if(!visible()) {
@@ -391,7 +391,7 @@ void KivioLayer::paintConnectorTargets( KivioPainter& painter, const QRect&, boo
KivioIntraStencilData data;
- painter.setFGColor( QColor(0,0,0) );
+ painter.setFGColor( TQColor(0,0,0) );
data.painter = &painter;
data.zoomHandler = zoom;
@@ -407,7 +407,7 @@ void KivioLayer::paintConnectorTargets( KivioPainter& painter, const QRect&, boo
}
}
-void KivioLayer::paintSelectionHandles( KivioPainter& painter, const QRect&, bool, QPoint, KoZoomHandler* zoom )
+void KivioLayer::paintSelectionHandles( KivioPainter& painter, const TQRect&, bool, TQPoint, KoZoomHandler* zoom )
{
if(!visible()) {
return;
@@ -415,7 +415,7 @@ void KivioLayer::paintSelectionHandles( KivioPainter& painter, const QRect&, boo
KivioIntraStencilData data;
- painter.setFGColor( QColor(0,0,0) );
+ painter.setFGColor( TQColor(0,0,0) );
data.painter = &painter;
data.zoomHandler = zoom;
@@ -532,7 +532,7 @@ void KivioLayer::searchForConnections( KivioPage *p )
pStencil->searchForConnections( p );
// Restore it
- m_pStencilList->find( pCur );
+ m_pStencilList->tqfind( pCur );
pStencil = m_pStencilList->next();
}
@@ -540,7 +540,7 @@ void KivioLayer::searchForConnections( KivioPage *p )
KivioStencil *KivioLayer::takeStencil( KivioStencil *p )
{
- m_pStencilList->find( p );
+ m_pStencilList->tqfind( p );
return m_pStencilList->take();
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_layer.h b/kivio/kiviopart/kiviosdk/kivio_layer.h
index 88cbe2e0..957f5d26 100644
--- a/kivio/kiviopart/kiviosdk/kivio_layer.h
+++ b/kivio/kiviopart/kiviosdk/kivio_layer.h
@@ -19,9 +19,9 @@
#ifndef KIVIO_LAYER_H
#define KIVIO_LAYER_H
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qobject.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
#include <KoPoint.h>
class KivioConnectorPoint;
class KivioConnectorTarget;
@@ -30,7 +30,7 @@ class KivioPainter;
class KoPoint;
class DCOPObject;
class KoZoomHandler;
-class QDomElement;
+class TQDomElement;
class KoStore;
class KoXmlWriter;
@@ -47,15 +47,15 @@ protected:
friend class KivioGroupStencil;
int m_flags;
- QPtrList <KivioStencil> *m_pStencilList;
- QPtrList <KivioStencil> *m_pDeletedStencilList;
- QString m_name;
+ TQPtrList <KivioStencil> *m_pStencilList;
+ TQPtrList <KivioStencil> *m_pDeletedStencilList;
+ TQString m_name;
KivioPage *m_pPage;
DCOPObject* m_dcop;
- KivioStencil *loadSMLStencil( const QDomElement & );
- KivioStencil *loadGroupStencil( const QDomElement & );
- KivioStencil *loadPluginStencil( const QDomElement & );
+ KivioStencil *loadSMLStencil( const TQDomElement & );
+ KivioStencil *loadGroupStencil( const TQDomElement & );
+ KivioStencil *loadPluginStencil( const TQDomElement & );
public:
@@ -66,7 +66,7 @@ public:
virtual DCOPObject* dcopObject();
- QPtrList<KivioStencil> *stencilList() { return m_pStencilList; }
+ TQPtrList<KivioStencil> *stencilList() { return m_pStencilList; }
bool visible() { return (m_flags & FLOW_LAYER_VISIBLE); }
void setVisible( bool f );
@@ -80,27 +80,27 @@ public:
void setPrintable(bool f);
bool printable() { return !(m_flags & FLOW_LAYER_NOT_PRINTABLE); }
- QString name() const { return m_name; }
- void setName( const QString &n ) { m_name = QString(n); }
+ TQString name() const { return m_name; }
+ void setName( const TQString &n ) { m_name = TQString(n); }
bool addStencil( KivioStencil * );
bool removeStencil( KivioStencil * );
- bool loadXML( const QDomElement & );
- void loadOasis(const QDomElement& layer);
- QDomElement saveXML( QDomDocument & );
+ bool loadXML( const TQDomElement & );
+ void loadOasis(const TQDomElement& layer);
+ TQDomElement saveXML( TQDomDocument & );
void saveOasis(KoXmlWriter* layerWriter);
KivioStencil *checkForStencil( KoPoint *, int *, float, bool );
void printContent( KivioPainter& painter, int xdpi = 0, int ydpi = 0 );
void printContent(KivioPainter& painter, KoZoomHandler* zoomHandler);
- void paintContent( KivioPainter& painter, const QRect& rect, bool transparent, QPoint p0,
+ void paintContent( KivioPainter& painter, const TQRect& rect, bool transparent, TQPoint p0,
KoZoomHandler* zoom );
- void paintConnectorTargets( KivioPainter& painter, const QRect& rect, bool transparent,
- QPoint p0, KoZoomHandler* zoom );
- void paintSelectionHandles( KivioPainter& painter, const QRect& rect, bool transparent,
- QPoint p0, KoZoomHandler* zoom );
+ void paintConnectorTargets( KivioPainter& painter, const TQRect& rect, bool transparent,
+ TQPoint p0, KoZoomHandler* zoom );
+ void paintSelectionHandles( KivioPainter& painter, const TQRect& rect, bool transparent,
+ TQPoint p0, KoZoomHandler* zoom );
KivioStencil *firstStencil() { return m_pStencilList->first(); }
KivioStencil *nextStencil() { return m_pStencilList->next(); }
diff --git a/kivio/kiviopart/kiviosdk/kivio_line_style.cpp b/kivio/kiviopart/kiviosdk/kivio_line_style.cpp
index f321a60f..7622a289 100644
--- a/kivio/kiviopart/kiviosdk/kivio_line_style.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_line_style.cpp
@@ -21,11 +21,11 @@
KivioLineStyle::KivioLineStyle()
{
- m_color = QColor(0,0,0);
+ m_color = TQColor(0,0,0);
m_width = 1.0f;
- m_capStyle = Qt::FlatCap;
- m_joinStyle = Qt::RoundJoin;
- m_style = Qt::SolidLine;
+ m_capStyle = TQt::FlatCap;
+ m_joinStyle = TQt::RoundJoin;
+ m_style = TQt::SolidLine;
}
KivioLineStyle::KivioLineStyle( const KivioLineStyle &ls )
@@ -50,9 +50,9 @@ void KivioLineStyle::copyInto( KivioLineStyle *pTarget )
pTarget->m_style = m_style;
}
-QDomElement KivioLineStyle::saveXML( QDomDocument &doc )
+TQDomElement KivioLineStyle::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioLineStyle");
+ TQDomElement e = doc.createElement("KivioLineStyle");
XmlWriteColor( e, "color", m_color );
XmlWriteFloat( e, "width", m_width );
@@ -62,19 +62,19 @@ QDomElement KivioLineStyle::saveXML( QDomDocument &doc )
return e;
}
-bool KivioLineStyle::loadXML( const QDomElement &e )
+bool KivioLineStyle::loadXML( const TQDomElement &e )
{
- m_color = XmlReadColor( e, "color", QColor(0,0,0) );
+ m_color = XmlReadColor( e, "color", TQColor(0,0,0) );
m_width = XmlReadFloat( e, "width", 1.0f );
- m_capStyle = XmlReadInt( e, "capStyle", Qt::RoundCap );
- m_joinStyle = XmlReadInt( e, "joinStyle", Qt::RoundJoin );
- m_style = XmlReadInt( e, "pattern", Qt::SolidLine );
+ m_capStyle = XmlReadInt( e, "capStyle", TQt::RoundCap );
+ m_joinStyle = XmlReadInt( e, "joinStyle", TQt::RoundJoin );
+ m_style = XmlReadInt( e, "pattern", TQt::SolidLine );
return true;
}
-QPen KivioLineStyle::pen( float scale ) const
+TQPen KivioLineStyle::pen( float scale ) const
{
- QPen p;
+ TQPen p;
float s = m_width * scale;
p.setColor( m_color );
diff --git a/kivio/kiviopart/kiviosdk/kivio_line_style.h b/kivio/kiviopart/kiviosdk/kivio_line_style.h
index 4126324b..8ba812e3 100644
--- a/kivio/kiviopart/kiviosdk/kivio_line_style.h
+++ b/kivio/kiviopart/kiviosdk/kivio_line_style.h
@@ -23,15 +23,15 @@
#include <config.h>
#endif
-#include <qcolor.h>
-#include <qdom.h>
-#include <qpen.h>
+#include <tqcolor.h>
+#include <tqdom.h>
+#include <tqpen.h>
class KivioLineStyle
{
protected:
- QColor m_color;
+ TQColor m_color;
float m_width;
int m_capStyle;
int m_joinStyle;
@@ -45,13 +45,13 @@ public:
void copyInto( KivioLineStyle * );
- QDomElement saveXML( QDomDocument & );
- bool loadXML( const QDomElement & );
+ TQDomElement saveXML( TQDomDocument & );
+ bool loadXML( const TQDomElement & );
- QPen pen( float ) const;
+ TQPen pen( float ) const;
- QColor color() const { return m_color; }
- void setColor( QColor c ){ m_color=c; }
+ TQColor color() const { return m_color; }
+ void setColor( TQColor c ){ m_color=c; }
float width() const { return m_width; }
void setWidth( float f ){ m_width=f; }
diff --git a/kivio/kiviopart/kiviosdk/kivio_painter.cpp b/kivio/kiviopart/kiviosdk/kivio_painter.cpp
index 33f5eb6d..2550fa52 100644
--- a/kivio/kiviopart/kiviosdk/kivio_painter.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_painter.cpp
@@ -44,12 +44,12 @@ KivioPainter::~KivioPainter()
}
-void KivioPainter::setFGColor( const QColor &c )
+void KivioPainter::setFGColor( const TQColor &c )
{
m_pLineStyle->setColor(c);
}
-QColor KivioPainter::fgColor() const
+TQColor KivioPainter::fgColor() const
{
return m_pLineStyle->color();
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_painter.h b/kivio/kiviopart/kiviosdk/kivio_painter.h
index 6e0869fd..4cea0a16 100644
--- a/kivio/kiviopart/kiviosdk/kivio_painter.h
+++ b/kivio/kiviopart/kiviosdk/kivio_painter.h
@@ -19,12 +19,12 @@
#ifndef KIVIO_PAINTER_H
#define KIVIO_PAINTER_H
-#include <qfont.h>
-#include <qptrlist.h>
-#include <qpaintdevice.h>
-#include <qpixmap.h>
-#include <qpointarray.h>
-#include <qwmatrix.h>
+#include <tqfont.h>
+#include <tqptrlist.h>
+#include <tqpaintdevice.h>
+#include <tqpixmap.h>
+#include <tqpointarray.h>
+#include <tqwmatrix.h>
#include "kivio_fill_style.h"
@@ -38,13 +38,13 @@ protected:
KivioFillStyle *m_pFillStyle;
KivioLineStyle *m_pLineStyle;
- QColor m_textColor;
+ TQColor m_textColor;
public:
KivioPainter();
virtual ~KivioPainter();
- virtual bool start( QPaintDevice * ) { return false;}
+ virtual bool start( TQPaintDevice * ) { return false;}
virtual bool stop() { return false;}
@@ -58,17 +58,17 @@ public:
virtual float lineWidth() const;
virtual void setLineWidth( const float &f );
- // virtual void setClipRect( QRect * );
- // virtual QRect *clipRect();
+ // virtual void setClipRect( TQRect * );
+ // virtual TQRect *clipRect();
- virtual QColor fgColor() const;
- virtual void setFGColor( const QColor &c );
+ virtual TQColor fgColor() const;
+ virtual void setFGColor( const TQColor &c );
- virtual QColor bgColor() const { return m_pFillStyle->color(); }
- virtual void setBGColor( const QColor &c ) { m_pFillStyle->setColor(c); }
+ virtual TQColor bgColor() const { return m_pFillStyle->color(); }
+ virtual void setBGColor( const TQColor &c ) { m_pFillStyle->setColor(c); }
- virtual QColor textColor() const { return m_textColor; }
- virtual void setTextColor( const QColor &c ) { m_textColor = c; }
+ virtual TQColor textColor() const { return m_textColor; }
+ virtual void setTextColor( const TQColor &c ) { m_textColor = c; }
virtual KivioFillStyle *fillStyle() { return m_pFillStyle; }
@@ -85,8 +85,8 @@ public:
virtual void drawLine( float, float, float, float ) {;}
virtual void drawArc( float, float, float, float, float, float ) {;}
- virtual void drawBezier( QPtrList<KivioPoint> * ) {;}
- virtual void drawBezier( QPointArray & ) {;}
+ virtual void drawBezier( TQPtrList<KivioPoint> * ) {;}
+ virtual void drawBezier( TQPointArray & ) {;}
virtual void drawRect( float, float, float, float ) {;}
virtual void fillRect( float, float, float, float ) {;}
@@ -103,24 +103,24 @@ public:
virtual void drawChord( float, float, float, float, float, float ) {;}
virtual void fillChord( float, float, float, float, float, float ) {;}
- virtual void drawOpenPath( QPtrList<KivioPoint> * ) {;}
- virtual void drawClosedPath( QPtrList<KivioPoint> * ) {;}
+ virtual void drawOpenPath( TQPtrList<KivioPoint> * ) {;}
+ virtual void drawClosedPath( TQPtrList<KivioPoint> * ) {;}
- virtual void drawLineArray( QPtrList<KivioPoint> * ) {;}
- virtual void drawPolyline( QPtrList<KivioPoint> * ) {;}
- virtual void drawPolygon( QPtrList<KivioPoint> * ) {;}
+ virtual void drawLineArray( TQPtrList<KivioPoint> * ) {;}
+ virtual void drawPolyline( TQPtrList<KivioPoint> * ) {;}
+ virtual void drawPolygon( TQPtrList<KivioPoint> * ) {;}
- virtual void drawLineArray( QPointArray & ) {;}
- virtual void drawPolyline( QPointArray & ) {;}
- virtual void drawPolygon( QPointArray & ) {;}
+ virtual void drawLineArray( TQPointArray & ) {;}
+ virtual void drawPolyline( TQPointArray & ) {;}
+ virtual void drawPolygon( TQPointArray & ) {;}
- virtual void setFont( const QFont & ) {;}
- virtual void drawText( int, int, int, int, int, const QString & ) {;}
- virtual QRect boundingRect( int, int, int, int, int, const QString & ) { return QRect(0,0,100,100); }
+ virtual void setFont( const TQFont & ) {;}
+ virtual void drawText( int, int, int, int, int, const TQString & ) {;}
+ virtual TQRect boundingRect( int, int, int, int, int, const TQString & ) { return TQRect(0,0,100,100); }
// These shouldn't be used for anything except the screen painter right now...
- virtual void drawPixmap( float, float, const QPixmap & ) {;}
+ virtual void drawPixmap( float, float, const TQPixmap & ) {;}
/*\
|*| Miscellaneous Functions
@@ -135,7 +135,7 @@ public:
cpfLock=0x10
};
virtual void drawHandle( float, float, int ) { ; }
- virtual void drawSelectionBox( const QRect& ) { ; }
+ virtual void drawSelectionBox( const TQRect& ) { ; }
virtual void saveState() {;}
virtual void restoreState() {;}
@@ -145,7 +145,7 @@ public:
virtual void rotateBy(int) {;}
virtual int rotation() { return 0; }
- virtual void setWorldMatrix(QWMatrix, bool) {;}
+ virtual void setWorldMatrix(TQWMatrix, bool) {;}
};
#endif
diff --git a/kivio/kiviopart/kiviosdk/kivio_plugin_stencil_spawner.cpp b/kivio/kiviopart/kiviosdk/kivio_plugin_stencil_spawner.cpp
index be4ce300..a70227c1 100644
--- a/kivio/kiviopart/kiviosdk/kivio_plugin_stencil_spawner.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_plugin_stencil_spawner.cpp
@@ -26,8 +26,8 @@
#include "kivio_common.h"
#include "kivio_stencil.h"
-#include <qdom.h>
-#include <qfileinfo.h>
+#include <tqdom.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
KivioPluginStencilSpawner::KivioPluginStencilSpawner( KivioStencilSpawnerSet *pSet )
@@ -41,9 +41,9 @@ KivioPluginStencilSpawner::~KivioPluginStencilSpawner()
{
}
-bool KivioPluginStencilSpawner::load( const QString &f )
+bool KivioPluginStencilSpawner::load( const TQString &f )
{
- QFileInfo lib(f);
+ TQFileInfo lib(f);
if( lib.exists())
{
@@ -69,9 +69,9 @@ bool KivioPluginStencilSpawner::load( const QString &f )
return true;
}
-QDomElement KivioPluginStencilSpawner::saveXML( QDomDocument &doc )
+TQDomElement KivioPluginStencilSpawner::saveXML( TQDomDocument &doc )
{
- QDomElement spawnE = doc.createElement("KivioPluginStencilSpawner");
+ TQDomElement spawnE = doc.createElement("KivioPluginStencilSpawner");
XmlWriteString( spawnE, "id", m_pInfo->id() );
@@ -87,7 +87,7 @@ KivioStencil *KivioPluginStencilSpawner::newStencil()
}
-KivioStencil *KivioPluginStencilSpawner::newStencil(const QString& arg)
+KivioStencil *KivioPluginStencilSpawner::newStencil(const TQString& arg)
{
KivioStencil *pStencil = fac->NewStencil(arg);
diff --git a/kivio/kiviopart/kiviosdk/kivio_plugin_stencil_spawner.h b/kivio/kiviopart/kiviosdk/kivio_plugin_stencil_spawner.h
index da4cb932..06ba844f 100644
--- a/kivio/kiviopart/kiviosdk/kivio_plugin_stencil_spawner.h
+++ b/kivio/kiviopart/kiviosdk/kivio_plugin_stencil_spawner.h
@@ -22,14 +22,14 @@
class KivioIntraStencilData;
class KivioStencil;
class KivioStencilFactory;
-class QDomDocument;
+class TQDomDocument;
#include "kivio_stencil_spawner.h"
#include "kivio_stencil_spawner_info.h"
-#include <qpixmap.h>
+#include <tqpixmap.h>
//typedef KivioStencil *(*NewStencilFunc)();
-//typedef QPixmap *(*GetIconFunc)();
+//typedef TQPixmap *(*GetIconFunc)();
//typedef KivioStencilSpawnerInfo *(*GetSpawnerInfoFunc)();
@@ -38,26 +38,26 @@ class KivioPluginStencilSpawner : public KivioStencilSpawner
protected:
KivioStencilFactory *fac;
void *m_handle;
- QPixmap *m_pIcon;
- QString m_filename;
+ TQPixmap *m_pIcon;
+ TQString m_filename;
KivioStencilSpawnerInfo *m_pSInfo;
KivioStencil *(*pNewStencil)();
- QPixmap *(*pGetIcon)();
+ TQPixmap *(*pGetIcon)();
KivioStencilSpawnerInfo *(*pGetSpawnerInfo)();
public:
KivioPluginStencilSpawner( KivioStencilSpawnerSet * );
virtual ~KivioPluginStencilSpawner();
- virtual bool load( const QString & );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual bool load( const TQString & );
+ virtual TQDomElement saveXML( TQDomDocument & );
virtual KivioStencil *newStencil();
- virtual KivioStencil *newStencil(const QString &arg);
+ virtual KivioStencil *newStencil(const TQString &arg);
virtual KivioStencilSpawnerInfo *info();
- virtual QPixmap *icon() { return m_pIcon; }
+ virtual TQPixmap *icon() { return m_pIcon; }
};
#endif
diff --git a/kivio/kiviopart/kiviosdk/kivio_point.cpp b/kivio/kiviopart/kiviosdk/kivio_point.cpp
index a18a4176..b3afae70 100644
--- a/kivio/kiviopart/kiviosdk/kivio_point.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_point.cpp
@@ -109,7 +109,7 @@ void KivioPoint::copyInto( KivioPoint *pTarget ) const
* This will figure out the KivioPointType from a string. For example,
* "normal" will return kptNormal.
*/
-KivioPoint::KivioPointType KivioPoint::pointTypeFromString( const QString &str )
+KivioPoint::KivioPointType KivioPoint::pointTypeFromString( const TQString &str )
{
int i;
@@ -135,7 +135,7 @@ KivioPoint::KivioPointType KivioPoint::pointTypeFromString( const QString &str )
* @param e The element to load from
* @returns true on success, false on failure.
*/
-bool KivioPoint::loadXML( const QDomElement &e )
+bool KivioPoint::loadXML( const TQDomElement &e )
{
if( e.tagName().compare( "KivioPoint" ) != 0 )
{
@@ -157,15 +157,15 @@ bool KivioPoint::loadXML( const QDomElement &e )
* Save this object to an XML element
*
* @param doc The document we are saving to
- * @returns QDomElement
+ * @returns TQDomElement
*/
-QDomElement KivioPoint::saveXML( QDomDocument &doc )
+TQDomElement KivioPoint::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioPoint");
+ TQDomElement e = doc.createElement("KivioPoint");
- XmlWriteFloat( e, QString("x"), m_x );
- XmlWriteFloat( e, QString("y"), m_y );
- XmlWriteString( e, QString("type"), QString(KivioPointTypeNames[m_pointType]) );
+ XmlWriteFloat( e, TQString("x"), m_x );
+ XmlWriteFloat( e, TQString("y"), m_y );
+ XmlWriteString( e, TQString("type"), TQString(KivioPointTypeNames[m_pointType]) );
return e;
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_point.h b/kivio/kiviopart/kiviosdk/kivio_point.h
index 52158c92..2a04bbf2 100644
--- a/kivio/kiviopart/kiviosdk/kivio_point.h
+++ b/kivio/kiviopart/kiviosdk/kivio_point.h
@@ -19,7 +19,7 @@
#ifndef KIVIO_POINT_H
#define KIVIO_POINT_H
-#include <qdom.h>
+#include <tqdom.h>
class KivioPoint
{
@@ -45,10 +45,10 @@ public:
void copyInto( KivioPoint * ) const;
- bool loadXML( const QDomElement & );
- QDomElement saveXML( QDomDocument & );
+ bool loadXML( const TQDomElement & );
+ TQDomElement saveXML( TQDomDocument & );
- static KivioPoint::KivioPointType pointTypeFromString( const QString & );
+ static KivioPoint::KivioPointType pointTypeFromString( const TQString & );
inline double x() const { return m_x; }
inline double y() const { return m_y; }
diff --git a/kivio/kiviopart/kiviosdk/kivio_py_stencil.cpp b/kivio/kiviopart/kiviosdk/kivio_py_stencil.cpp
index 0b34f46d..46526892 100644
--- a/kivio/kiviopart/kiviosdk/kivio_py_stencil.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_py_stencil.cpp
@@ -24,9 +24,9 @@ KivioView *view;
#include "kivio_page.h"
-#include <qpainter.h>
-#include <qbrush.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <math.h>
#include <KoZoomHandler.h>
@@ -40,7 +40,7 @@ extern "C" {
KivioPyStencil::KivioPyStencil()
: KivioStencil()
{
- m_pConnectorTargets = new QPtrList<KivioConnectorTarget>;
+ m_pConnectorTargets = new TQPtrList<KivioConnectorTarget>;
m_pConnectorTargets->setAutoDelete(true);
static bool first_time = true;
@@ -63,7 +63,7 @@ KivioPyStencil::KivioPyStencil()
vars = Py_BuildValue( "{s:d,s:d,s:d,s:d,s:d,s:d,s:{},s:[],s:[],s:{}}",
- "x", m_x, "y", m_y, "w", m_w, "h", m_h, "x2", x2, "y2", y2 , "style","connectors","connector_targets","shapes");
+ "x", m_x, "y", m_y, "w", m_w, "h", m_h, "x2", x2, "y2", y2 , "style","connectors","connector_targets","tqshapes");
resizeCode = "";
}
@@ -74,7 +74,7 @@ KivioPyStencil::~KivioPyStencil()
}
-int KivioPyStencil::init( QString initCode )
+int KivioPyStencil::init( TQString initCode )
{
runPython(kivio_module);
if ( !runPython( initCode ) )
@@ -93,16 +93,16 @@ int KivioPyStencil::init( QString initCode )
}
-bool KivioPyStencil::loadXML( const QDomElement &e )
+bool KivioPyStencil::loadXML( const TQDomElement &e )
{
- QDomNode node;
- QDomElement ele;
+ TQDomNode node;
+ TQDomElement ele;
node = e.firstChild();
while( !node.isNull() )
{
- QString nodeName = node.nodeName();
+ TQString nodeName = node.nodeName();
ele = node.toElement();
@@ -110,7 +110,7 @@ bool KivioPyStencil::loadXML( const QDomElement &e )
{
resizeCode = XmlReadString( ele, "resizeCode", "" );
- QString sVars = XmlReadString( ele, "vars", "" );
+ TQString sVars = XmlReadString( ele, "vars", "" );
PyObject* mainmod = PyImport_AddModule("__main__");
PyObject* gdic = PyModule_GetDict(mainmod);
@@ -150,11 +150,11 @@ bool KivioPyStencil::loadXML( const QDomElement &e )
/**
* Help function for loading from an XML node.
*/
-void KivioPyStencil::loadConnectorTargetListXML( const QDomElement &e )
+void KivioPyStencil::loadConnectorTargetListXML( const TQDomElement &e )
{
- QDomNode node;
- QDomElement ele;
- QString nodeName;
+ TQDomNode node;
+ TQDomElement ele;
+ TQString nodeName;
KivioConnectorTarget *pTarget;
pTarget = m_pConnectorTargets->first();
@@ -175,15 +175,15 @@ void KivioPyStencil::loadConnectorTargetListXML( const QDomElement &e )
}
-QDomElement KivioPyStencil::saveXML( QDomDocument &doc )
+TQDomElement KivioPyStencil::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioPyStencil");
+ TQDomElement e = doc.createElement("KivioPyStencil");
XmlWriteString( e, "id", m_pSpawner->info()->id() );
XmlWriteString( e, "setId", m_pSpawner->set()->id() );
- QDomElement dE = doc.createElement("PyData");
+ TQDomElement dE = doc.createElement("PyData");
// The python variables
PyObject* mainmod = PyImport_AddModule("__main__");
@@ -203,7 +203,7 @@ QDomElement KivioPyStencil::saveXML( QDomDocument &doc )
if ( !PyRun_String(dump_code, Py_file_input, gdic, ldic) )
PyErr_Print();
- QString sVars = PyString_AsString( PyDict_GetItemString( ldic, "res") );
+ TQString sVars = PyString_AsString( PyDict_GetItemString( ldic, "res") );
XmlWriteString( dE, "vars", sVars );
XmlWriteString( dE, "resizeCode", resizeCode );
@@ -212,8 +212,8 @@ QDomElement KivioPyStencil::saveXML( QDomDocument &doc )
// Save the target list
- QDomElement clE = doc.createElement("KivioConnectorTargetList");
- QDomElement targetE;
+ TQDomElement clE = doc.createElement("KivioConnectorTargetList");
+ TQDomElement targetE;
KivioConnectorTarget *pTarget = m_pConnectorTargets->first();
while( pTarget )
{
@@ -247,7 +247,7 @@ void KivioPyStencil::updateGeometry()
KivioConnectorTarget *pTarget, *pOriginal;
- QPtrList<KivioConnectorTarget> *pOriginalTargets = ((KivioPyStencilSpawner*)m_pSpawner)->targets();
+ TQPtrList<KivioConnectorTarget> *pOriginalTargets = ((KivioPyStencilSpawner*)m_pSpawner)->targets();
pTarget = m_pConnectorTargets->first();
pOriginal = pOriginalTargets->first();
@@ -406,45 +406,45 @@ void KivioPyStencil::paint( KivioIntraStencilData *d, bool outlined )
{
KoZoomHandler* zoomHandler = d->zoomHandler;
- PyObject *shapes = PyDict_Values( PyDict_GetItemString( vars, "shapes" ) );
+ PyObject *tqshapes = PyDict_Values( PyDict_GetItemString( vars, "tqshapes" ) );
- if ( !shapes ) {
+ if ( !tqshapes ) {
return;
}
- int size = PyList_Size( shapes );
+ int size = PyList_Size( tqshapes );
for ( int i=0; i<size; i++ ) {
- PyObject *shape = PyList_GetItem( shapes, i );
- if ( !PyDict_Check(shape) )
+ PyObject *tqshape = PyList_GetItem( tqshapes, i );
+ if ( !PyDict_Check(tqshape) )
continue;
int fill = KivioFillStyle::kcsNone;
- // if style dosn't defined for shape, applay default for stencil
+ // if style dosn't defined for tqshape, applay default for stencil
setStyle( d, PyDict_GetItemString( vars, "style" ) , fill );
- setStyle( d, shape, fill );
+ setStyle( d, tqshape, fill );
if ( isSelected() )
- setStyle( d, PyDict_GetItemString( shape, "selected" ) , fill );
+ setStyle( d, PyDict_GetItemString( tqshape, "selected" ) , fill );
if ( outlined )
fill = KivioFillStyle::kcsNone;
- QString stype = getStringFromDict( shape, "type" );
+ TQString stype = getStringFromDict( tqshape, "type" );
stype = stype.lower();
- double x = zoomHandler->zoomItX(getDoubleFromDict(shape,"x"));
- double y = zoomHandler->zoomItY(getDoubleFromDict(shape,"y"));
- double w = zoomHandler->zoomItX(getDoubleFromDict(shape,"w"));
- double h = zoomHandler->zoomItY(getDoubleFromDict(shape,"h"));
- //double x2 = zoomHandler->zoomItX(getDoubleFromDict(shape,"x2"));
- //double y2 = zoomHandler->zoomItY(getDoubleFromDict(shape,"y2"));
+ double x = zoomHandler->zoomItX(getDoubleFromDict(tqshape,"x"));
+ double y = zoomHandler->zoomItY(getDoubleFromDict(tqshape,"y"));
+ double w = zoomHandler->zoomItX(getDoubleFromDict(tqshape,"w"));
+ double h = zoomHandler->zoomItY(getDoubleFromDict(tqshape,"h"));
+ //double x2 = zoomHandler->zoomItX(getDoubleFromDict(tqshape,"x2"));
+ //double y2 = zoomHandler->zoomItY(getDoubleFromDict(tqshape,"y2"));
// get points list
- QPtrList<KivioPoint> points;
+ TQPtrList<KivioPoint> points;
points.setAutoDelete(true);
- PyObject *pyPoints = PyDict_GetItemString( shape, "points" );
+ PyObject *pyPoints = PyDict_GetItemString( tqshape, "points" );
if ( pyPoints && PyList_Check(pyPoints) ) {
int size = PyList_Size(pyPoints);
for ( int i=0; i<size; i++ ) {
@@ -466,26 +466,26 @@ void KivioPyStencil::paint( KivioIntraStencilData *d, bool outlined )
if ( stype == "textbox" ) {
int tf = vTextAlign() | hTextAlign();
- QFont f = textFont();
+ TQFont f = textFont();
f.setPointSizeFloat(f.pointSizeFloat() * (((float)zoomHandler->zoom()) / 100.0));
d->painter->setFont( f );
- QString text = getStringFromDict(shape,"text");
+ TQString text = getStringFromDict(tqshape,"text");
if ( !text.isEmpty() ) {
- d->painter->drawText( int( x ), int( y ), int( w ), int( h ), tf | Qt::WordBreak, text );
+ d->painter->drawText( int( x ), int( y ), int( w ), int( h ), tf | TQt::WordBreak, text );
}
}
if ( stype == "arc" ) {
- double a1 = getDoubleFromDict(shape,"a1");
- double a2 = getDoubleFromDict(shape,"a2");
+ double a1 = getDoubleFromDict(tqshape,"a1");
+ double a2 = getDoubleFromDict(tqshape,"a2");
d->painter->drawArc(x,y,w,h,a1,a2);
}
if ( stype == "roundrect" ) {
- double rx = zoomHandler->zoomItX(getDoubleFromDict(shape,"rx"));
- double ry = zoomHandler->zoomItY(getDoubleFromDict(shape,"ry"));
+ double rx = zoomHandler->zoomItX(getDoubleFromDict(tqshape,"rx"));
+ double ry = zoomHandler->zoomItY(getDoubleFromDict(tqshape,"ry"));
if (fill) {
d->painter->fillRoundRect( x, y, w, h, rx, ry );
@@ -526,7 +526,7 @@ void KivioPyStencil::paint( KivioIntraStencilData *d, bool outlined )
-int KivioPyStencil::runPython(QString code)
+int KivioPyStencil::runPython(TQString code)
{
view = dynamic_cast<KivioView*>(KoDocument::documentList()->first()->views().getFirst());
@@ -572,13 +572,13 @@ double KivioPyStencil::getDoubleFromDict( PyObject *dict, const char *key )
return 0.0;
}
-QString KivioPyStencil::getStringFromDict( PyObject *dict, const char *key )
+TQString KivioPyStencil::getStringFromDict( PyObject *dict, const char *key )
{
PyObject *val = PyDict_GetItemString(dict,const_cast<char*>(key));
if ( val && PyString_Check(val) )
- return QString( PyString_AsString(val) );
+ return TQString( PyString_AsString(val) );
- return QString("");
+ return TQString("");
}
@@ -606,19 +606,19 @@ KivioCollisionType KivioPyStencil::checkForCollision( KoPoint *pPoint, double )
int KivioPyStencil::resizeHandlePositions()
{
// Calculate the resize handle positions
- int mask = KIVIO_RESIZE_HANDLE_POSITION_ALL;
+ int tqmask = KIVIO_RESIZE_HANDLE_POSITION_ALL;
if( m_pProtection->at( kpWidth ) )
{
- mask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpE | krhpW);
+ tqmask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpE | krhpW);
}
if( m_pProtection->at( kpHeight) )
{
- mask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpN | krhpS);
+ tqmask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpN | krhpS);
}
- return mask;
+ return tqmask;
}
@@ -627,7 +627,7 @@ int KivioPyStencil::resizeHandlePositions()
*/
void KivioPyStencil::paintConnectorTargets( KivioIntraStencilData *pData )
{
- QPixmap targetPic;
+ TQPixmap targetPic;
KivioPainter *painter;
double x, y;
@@ -756,7 +756,7 @@ void KivioPyStencil::setStyle( KivioIntraStencilData *d, PyObject *s, int &fillS
PyObject *color = PyDict_GetItemString(s,"color");
if ( color ) {
- QColor c = readColor(color);
+ TQColor c = readColor(color);
if ( c.isValid() ) {
p->setFGColor(c);
@@ -766,7 +766,7 @@ void KivioPyStencil::setStyle( KivioIntraStencilData *d, PyObject *s, int &fillS
color = PyDict_GetItemString(s,"bgcolor");
if ( color ) {
- QColor c = readColor(color);
+ TQColor c = readColor(color);
if ( c.isValid() ) {
p->setBGColor(c);
@@ -776,7 +776,7 @@ void KivioPyStencil::setStyle( KivioIntraStencilData *d, PyObject *s, int &fillS
color = PyDict_GetItemString(s,"textcolor");
if ( color ) {
- QColor c = readColor(color);
+ TQColor c = readColor(color);
if ( c.isValid() ) {
p->setTextColor(c);
@@ -793,7 +793,7 @@ void KivioPyStencil::setStyle( KivioIntraStencilData *d, PyObject *s, int &fillS
PyObject *o_fillStyle = PyDict_GetItemString(s,"fillstyle");
if ( o_fillStyle ) {
- QString sfill = getStringFromDict(s,"fillstyle");
+ TQString sfill = getStringFromDict(s,"fillstyle");
if ( sfill == "solid" ) {
fillStyle = KivioFillStyle::kcsSolid;
@@ -804,8 +804,8 @@ void KivioPyStencil::setStyle( KivioIntraStencilData *d, PyObject *s, int &fillS
}
}
- QString sfont = getStringFromDict(s,"font");
- QFont f;
+ TQString sfont = getStringFromDict(s,"font");
+ TQFont f;
int fontSize = (int)getDoubleFromDict(s,"fontsize");
if(!fontSize) {
@@ -824,13 +824,13 @@ void KivioPyStencil::setStyle( KivioIntraStencilData *d, PyObject *s, int &fillS
p->setFont(f);
}
-QColor KivioPyStencil::readColor( PyObject *color )
+TQColor KivioPyStencil::readColor( PyObject *color )
{
if ( !color )
- return QColor();
+ return TQColor();
if ( PyString_Check(color) ) {
- return QColor( PyString_AsString(color) );
+ return TQColor( PyString_AsString(color) );
}
if ( PyList_Check(color) ) {
@@ -847,12 +847,12 @@ QColor KivioPyStencil::readColor( PyObject *color )
if ( PyNumber_Check(bo) )
b = PyInt_AsLong( PyNumber_Int(bo));
- return QColor(r,g,b);
+ return TQColor(r,g,b);
}
}
- return QColor();
+ return TQColor();
}
@@ -862,46 +862,46 @@ void KivioPyStencil::PyDebug( PyObject * o )
}
-QColor KivioPyStencil::fgColor()
+TQColor KivioPyStencil::fgColor()
{
- QColor color = readColor( PyDict_GetItemString( PyDict_GetItemString(vars,"style"), "color" ) );
+ TQColor color = readColor( PyDict_GetItemString( PyDict_GetItemString(vars,"style"), "color" ) );
if ( color.isValid() )
return color;
else
- return QColor(0,0,0);
+ return TQColor(0,0,0);
}
-void KivioPyStencil::setFGColor( QColor c )
+void KivioPyStencil::setFGColor( TQColor c )
{
PyDict_SetItemString( PyDict_GetItemString(vars,"style") , "color" , Py_BuildValue("[i,i,i]", c.red(), c.green(), c.blue() ) ) ;
}
-QColor KivioPyStencil::bgColor()
+TQColor KivioPyStencil::bgColor()
{
- QColor color = readColor( PyDict_GetItemString( PyDict_GetItemString(vars,"style"), "bgcolor" ) );
+ TQColor color = readColor( PyDict_GetItemString( PyDict_GetItemString(vars,"style"), "bgcolor" ) );
if ( color.isValid() )
return color;
else
- return QColor(0,0,0);
+ return TQColor(0,0,0);
}
-void KivioPyStencil::setBGColor( QColor c )
+void KivioPyStencil::setBGColor( TQColor c )
{
PyDict_SetItemString( PyDict_GetItemString(vars,"style") , "bgcolor" , Py_BuildValue("[i,i,i]", c.red(), c.green(), c.blue() ) ) ;
}
-QColor KivioPyStencil::textColor()
+TQColor KivioPyStencil::textColor()
{
- QColor color = readColor( PyDict_GetItemString( PyDict_GetItemString(vars,"style"), "textcolor" ) );
+ TQColor color = readColor( PyDict_GetItemString( PyDict_GetItemString(vars,"style"), "textcolor" ) );
if ( color.isValid() )
return color;
else
- return QColor(0,0,0);
+ return TQColor(0,0,0);
}
-void KivioPyStencil::setTextColor( QColor c )
+void KivioPyStencil::setTextColor( TQColor c )
{
PyDict_SetItemString( PyDict_GetItemString(vars,"style") , "textcolor" , Py_BuildValue("[i,i,i]", c.red(), c.green(), c.blue() ) ) ;
}
@@ -922,27 +922,27 @@ void KivioPyStencil::setLineWidth( double w )
}
-void KivioPyStencil::setText( const QString &s )
+void KivioPyStencil::setText( const TQString &s )
{
- PyObject *to = PyDict_GetItemString( PyDict_GetItemString(vars,"shapes"), "text" );
+ PyObject *to = PyDict_GetItemString( PyDict_GetItemString(vars,"tqshapes"), "text" );
if ( to )
PyDict_SetItemString(to, "text", Py_BuildValue("s", s.latin1() ));
}
-QString KivioPyStencil::text()
+TQString KivioPyStencil::text()
{
- PyObject *to = PyDict_GetItemString( PyDict_GetItemString(vars,"shapes"), "text" );
+ PyObject *to = PyDict_GetItemString( PyDict_GetItemString(vars,"tqshapes"), "text" );
if ( to ) {
return getStringFromDict(to, "text");
}
- return QString("");
+ return TQString("");
}
-void KivioPyStencil::setTextFont( const QFont &f )
+void KivioPyStencil::setTextFont( const TQFont &f )
{
double fs = f.pointSizeFloat();
- QString family = f.family();
+ TQString family = f.family();
int bold = f.bold();
int italic = f.italic();
@@ -955,7 +955,7 @@ void KivioPyStencil::setTextFont( const QFont &f )
PyDict_SetItemString( PyDict_GetItemString(vars,"style") , "underline" , Py_BuildValue("i",underline ) ) ;
}
-QFont KivioPyStencil::textFont()
+TQFont KivioPyStencil::textFont()
{
PyObject *fn = PyDict_GetItemString( PyDict_GetItemString(vars,"style"), "font" );
PyObject *fs = PyDict_GetItemString( PyDict_GetItemString(vars,"style"), "fontsize" );
@@ -963,7 +963,7 @@ QFont KivioPyStencil::textFont()
PyObject *it = PyDict_GetItemString( PyDict_GetItemString(vars,"style"), "italic" );
PyObject *ul = PyDict_GetItemString( PyDict_GetItemString(vars,"style"), "underline" );
- QFont f;
+ TQFont f;
if ( fs )
if ( PyNumber_Check(fs))
@@ -996,7 +996,7 @@ int KivioPyStencil::hTextAlign()
if ( PyNumber_Check(hta) )
return ( PyInt_AsLong( PyNumber_Int(hta)));
- return Qt::AlignHCenter;
+ return TQt::AlignHCenter;
}
int KivioPyStencil::vTextAlign()
@@ -1007,7 +1007,7 @@ int KivioPyStencil::vTextAlign()
if ( PyNumber_Check(vta) )
return ( PyInt_AsLong( PyNumber_Int(vta)));
- return Qt::AlignVCenter;
+ return TQt::AlignVCenter;
}
void KivioPyStencil::setHTextAlign(int hta)
diff --git a/kivio/kiviopart/kiviosdk/kivio_py_stencil.h b/kivio/kiviopart/kiviosdk/kivio_py_stencil.h
index 0ee18a5c..44905922 100644
--- a/kivio/kiviopart/kiviosdk/kivio_py_stencil.h
+++ b/kivio/kiviopart/kiviosdk/kivio_py_stencil.h
@@ -28,11 +28,11 @@
#ifdef HAVE_PYTHON
-#include <qptrlist.h>
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqptrlist.h>
+#include <tqcolor.h>
+#include <tqfont.h>
-/* slots gets defined in Qt 3.2 and conflicts with python 2.3 headers */
+/* slots gets defined in TQt 3.2 and conflicts with python 2.3 headers */
#undef slots
#include <Python.h>
#define slots
@@ -52,9 +52,9 @@ public:
virtual ~KivioPyStencil();
- virtual bool loadXML( const QDomElement & );
- virtual QDomElement saveXML( QDomDocument & );
- virtual void loadConnectorTargetListXML( const QDomElement & );
+ virtual bool loadXML( const TQDomElement & );
+ virtual TQDomElement saveXML( TQDomDocument & );
+ virtual void loadConnectorTargetListXML( const TQDomElement & );
virtual void updateGeometry();
virtual KivioStencil *duplicate();
@@ -70,21 +70,21 @@ public:
virtual int generateIds( int );
- virtual QColor fgColor();
- virtual void setFGColor( QColor );
+ virtual TQColor fgColor();
+ virtual void setFGColor( TQColor );
- virtual void setBGColor( QColor );
- virtual QColor bgColor();
+ virtual void setBGColor( TQColor );
+ virtual TQColor bgColor();
virtual void setLineWidth( double );
virtual double lineWidth();
// FOnt stuff
- virtual QColor textColor();
- virtual void setTextColor( QColor );
+ virtual TQColor textColor();
+ virtual void setTextColor( TQColor );
- virtual QFont textFont();
- virtual void setTextFont( const QFont & );
+ virtual TQFont textFont();
+ virtual void setTextFont( const TQFont & );
virtual int hTextAlign();
virtual int vTextAlign();
@@ -92,13 +92,13 @@ public:
virtual void setHTextAlign(int);
virtual void setVTextAlign(int);
- virtual void setText( const QString & );
- virtual QString text();
+ virtual void setText( const TQString & );
+ virtual TQString text();
protected:
PyObject *vars, *globals;
- QString resizeCode; // python code to be runed when resize
+ TQString resizeCode; // python code to be runed when resize
double old_x, old_y, old_w, old_h;
virtual void rescaleShapes( PyObject * ); // find recursive for x,y,w,h in object( dict or list ) and update them
@@ -107,19 +107,19 @@ protected:
* set style settings from dict, return tru if need to use fill... methods or false if draw...
*/
virtual void setStyle( KivioIntraStencilData *d, PyObject *style, int &fillStyle );
- QColor readColor( PyObject *color ); // used by setStyle
+ TQColor readColor( PyObject *color ); // used by setStyle
- QPtrList<KivioConnectorTarget> *m_pConnectorTargets;
+ TQPtrList<KivioConnectorTarget> *m_pConnectorTargets;
/**
* init stencil using initCode, return 1, if ok, or 0 if was some error ( maybe python syntax error )
*/
- int init( QString initCode);
+ int init( TQString initCode);
- int runPython(QString code);
+ int runPython(TQString code);
double getDoubleFromDict( PyObject *dict, const char* key );
- QString getStringFromDict( PyObject *dict, const char* key );
+ TQString getStringFromDict( PyObject *dict, const char* key );
void PyDebug( PyObject * ); // show var
};
diff --git a/kivio/kiviopart/kiviosdk/kivio_py_stencil_spawner.cpp b/kivio/kiviopart/kiviosdk/kivio_py_stencil_spawner.cpp
index e8713917..8c4279e1 100644
--- a/kivio/kiviopart/kiviosdk/kivio_py_stencil_spawner.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_py_stencil_spawner.cpp
@@ -29,14 +29,14 @@
#include "kivio_stencil_spawner_info.h"
#include <iostream>
-#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>
@@ -47,7 +47,7 @@ KivioPyStencilSpawner::KivioPyStencilSpawner( KivioStencilSpawnerSet *p )
m_pStencil = new KivioPyStencil();
m_pStencil->setSpawner(this);
- m_pTargets = new QPtrList<KivioConnectorTarget>;
+ m_pTargets = new TQPtrList<KivioConnectorTarget>;
m_pTargets->setAutoDelete(true);
}
@@ -68,22 +68,22 @@ KivioPyStencilSpawner::~KivioPyStencilSpawner()
kdDebug(43000) << "* PyStencilSpawner "<< m_pInfo->id() << " deleted" << endl;
}
-QDomElement KivioPyStencilSpawner::saveXML( QDomDocument &doc )
+TQDomElement KivioPyStencilSpawner::saveXML( TQDomDocument &doc )
{
- QDomElement spawnE = doc.createElement("KivioPyStencilSpawner");
+ TQDomElement spawnE = doc.createElement("KivioPyStencilSpawner");
XmlWriteString( spawnE, "id", m_pInfo->id() );
return spawnE;
}
-bool KivioPyStencilSpawner::load( const QString &file )
+bool KivioPyStencilSpawner::load( const TQString &file )
{
KivioConnectorTarget *pTarget;
- 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 )
{
@@ -93,10 +93,10 @@ bool KivioPyStencilSpawner::load( const QString &file )
d.setContent(&f);
- 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() )
{
@@ -104,7 +104,7 @@ bool KivioPyStencilSpawner::load( const QString &file )
if( nodeName.compare("KivioPyStencilSpawnerInfo")==0 )
{
- m_pInfo->loadXML( (const QDomElement)node.toElement() );
+ m_pInfo->loadXML( (const TQDomElement)node.toElement() );
}
else if( nodeName.compare("init")==0 )
{
@@ -143,11 +143,11 @@ bool KivioPyStencilSpawner::load( const QString &file )
}
// 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 );
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_py_stencil_spawner.h b/kivio/kiviopart/kiviosdk/kivio_py_stencil_spawner.h
index 75b4dcb2..ab4697b3 100644
--- a/kivio/kiviopart/kiviosdk/kivio_py_stencil_spawner.h
+++ b/kivio/kiviopart/kiviosdk/kivio_py_stencil_spawner.h
@@ -19,9 +19,9 @@
#ifndef KIVIO_PY_STENCIL_SPAWNER_H
#define KIVIO_PY_STENCIL_SPAWNER_H
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "kivio_stencil_spawner.h"
#include <config.h>
@@ -32,36 +32,36 @@ class KivioStencilSpawnerSet;
class KivioStencil;
class KivioPyStencil;
class KivioConnectorTarget;
-class QPainter;
-class QPixmap;
-class QRect;
+class TQPainter;
+class TQPixmap;
+class TQRect;
class KivioPyStencilSpawner : public KivioStencilSpawner
{
protected:
KivioPyStencil *m_pStencil;
- QString m_filename;
+ TQString m_filename;
// Target list
- QPtrList<KivioConnectorTarget>*m_pTargets;
+ TQPtrList<KivioConnectorTarget>*m_pTargets;
protected:
- void loadShape( QDomNode & );
- QString readDesc( const QString & );
+ void loadShape( TQDomNode & );
+ TQString readDesc( const TQString & );
public:
KivioPyStencilSpawner( KivioStencilSpawnerSet * );
virtual ~KivioPyStencilSpawner();
- virtual bool load( const QString & );
+ virtual bool load( const TQString & );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual TQDomElement saveXML( TQDomDocument & );
- virtual QString &filename() { return m_filename; }
+ virtual TQString &filename() { return m_filename; }
virtual KivioStencil *newStencil();
- QPtrList <KivioConnectorTarget> *targets() { return m_pTargets; }
+ TQPtrList <KivioConnectorTarget> *targets() { return m_pTargets; }
};
#else // HAVE_PYTHON
diff --git a/kivio/kiviopart/kiviosdk/kivio_screen_painter.cpp b/kivio/kiviopart/kiviosdk/kivio_screen_painter.cpp
index 0e1beb3e..07f005fa 100644
--- a/kivio/kiviopart/kiviosdk/kivio_screen_painter.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_screen_painter.cpp
@@ -21,15 +21,15 @@
#include "kivio_point.h"
#include "kivio_screen_painter.h"
-#include <qimage.h>
-#include <qpen.h>
-#include <qbrush.h>
-#include <qsimplerichtext.h>
-#include <qpalette.h>
+#include <tqimage.h>
+#include <tqpen.h>
+#include <tqbrush.h>
+#include <tqsimplerichtext.h>
+#include <tqpalette.h>
#include <kdebug.h>
-#define PAINTER_CHECK() { if(!m_pPainter) { kdDebug(43000) << "KivioScreenPainter::PAINTER_CHECK() - no QPainter exists." << endl; } }
+#define PAINTER_CHECK() { if(!m_pPainter) { kdDebug(43000) << "KivioScreenPainter::PAINTER_CHECK() - no TQPainter exists." << endl; } }
KivioScreenPainter::KivioScreenPainter()
@@ -40,7 +40,7 @@ KivioScreenPainter::KivioScreenPainter()
m_rotation = 0;
}
-KivioScreenPainter::KivioScreenPainter(QPainter* painter)
+KivioScreenPainter::KivioScreenPainter(TQPainter* painter)
: m_pPainter(painter)
{
m_transX = 0.0f;
@@ -52,32 +52,32 @@ KivioScreenPainter::~KivioScreenPainter()
{
if( m_pPainter )
{
- kdDebug(43000) << "KivioScreenPainter::~KivioScreenPainter - A QPainter slipped through the cracks" << endl;
+ kdDebug(43000) << "KivioScreenPainter::~KivioScreenPainter - A TQPainter slipped through the cracks" << endl;
delete m_pPainter;
m_pPainter = NULL;
}
}
/**
- * Starts the drawing on a @ref QPaintDevice
+ * Starts the drawing on a @ref TQPaintDevice
*
* @param dev The device to paint on
*
* Call this function before you call any other @ref KivioScreenPainter
- * functions. This will create an internal QPainter object for drawing
+ * functions. This will create an internal TQPainter object for drawing
* with. If you fail to call this function, nothing will work.
*/
-bool KivioScreenPainter::start( QPaintDevice *dev )
+bool KivioScreenPainter::start( TQPaintDevice *dev )
{
// Bomb out if one exists already
if( m_pPainter )
{
- kdDebug(43000) << "KivioScreenPainter::start() - A QPainter already exists" << endl;
+ kdDebug(43000) << "KivioScreenPainter::start() - A TQPainter already exists" << endl;
return false;
}
// Allocate a new drawing thingy
- m_pPainter = new QPainter(dev);
+ m_pPainter = new TQPainter(dev);
return true;
}
@@ -160,7 +160,7 @@ void KivioScreenPainter::drawArc( float x1, float y1, float w1, float h1, float
* This will draw a quad-bezier curve in the current fgColor
* and lineWidth. @ref pArray must have 4 points.
*/
-void KivioScreenPainter::drawBezier( QPointArray &pArray )
+void KivioScreenPainter::drawBezier( TQPointArray &pArray )
{
PAINTER_CHECK();
@@ -183,7 +183,7 @@ void KivioScreenPainter::drawRect( float x1, float y1, float w1, float h1 )
PAINTER_CHECK();
m_pPainter->setPen(m_pLineStyle->pen(1.0f));
- m_pPainter->setBrush(QBrush::NoBrush);
+ m_pPainter->setBrush(TQBrush::NoBrush);
m_pPainter->drawRect( int(x1), int(y1), int(w1), int(h1) );
}
@@ -203,12 +203,12 @@ void KivioScreenPainter::fillRect( float x1, float y1, float w1, float h1 )
{
PAINTER_CHECK();
- QBrush b;
+ TQBrush b;
b = m_pFillStyle->brush();
if(m_pFillStyle->colorStyle() == KivioFillStyle::kcsGradient) {
- QPixmap pix((int)w1, (int)h1);
- QImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(), m_pFillStyle->color2(),
+ TQPixmap pix((int)w1, (int)h1);
+ TQImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(), m_pFillStyle->color2(),
(KImageEffect::GradientType) m_pFillStyle->gradientType());
pix.convertFromImage(image);
b.setPixmap(pix);
@@ -240,7 +240,7 @@ void KivioScreenPainter::drawRoundRect( float x1, float y1, float w1, float h1,
PAINTER_CHECK();
m_pPainter->setPen(m_pLineStyle->pen(1.0f));
- m_pPainter->setBrush(QBrush::NoBrush);
+ m_pPainter->setBrush(TQBrush::NoBrush);
m_pPainter->drawRoundRect( int(x1), int(y1), int(w1), int(h1), int(a1), int(a2) );
}
@@ -263,12 +263,12 @@ void KivioScreenPainter::fillRoundRect( float x1, float y1, float w1, float h1,
{
PAINTER_CHECK();
- QBrush b;
+ TQBrush b;
b = m_pFillStyle->brush();
if(m_pFillStyle->colorStyle() == KivioFillStyle::kcsGradient) {
- QPixmap pix((int)w1, (int)h1);
- QImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(), m_pFillStyle->color2(),
+ TQPixmap pix((int)w1, (int)h1);
+ TQImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(), m_pFillStyle->color2(),
(KImageEffect::GradientType) m_pFillStyle->gradientType());
pix.convertFromImage(image);
b.setPixmap(pix);
@@ -300,7 +300,7 @@ void KivioScreenPainter::drawPie( float x1, float y1, float w1, float h1, float
PAINTER_CHECK();
m_pPainter->setPen(m_pLineStyle->pen(1.0f));
- m_pPainter->setBrush(QBrush::NoBrush);
+ m_pPainter->setBrush(TQBrush::NoBrush);
m_pPainter->drawPie( int(x1), int(y1), int(w1), int(h1), int(a1), int(a2) );
}
@@ -322,12 +322,12 @@ void KivioScreenPainter::fillPie( float x1, float y1, float w1, float h1, float
{
PAINTER_CHECK();
- QBrush b;
+ TQBrush b;
b = m_pFillStyle->brush();
if(m_pFillStyle->colorStyle() == KivioFillStyle::kcsGradient) {
- QPixmap pix((int)w1, (int)h1);
- QImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(), m_pFillStyle->color2(),
+ TQPixmap pix((int)w1, (int)h1);
+ TQImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(), m_pFillStyle->color2(),
(KImageEffect::GradientType) m_pFillStyle->gradientType());
pix.convertFromImage(image);
b.setPixmap(pix);
@@ -359,7 +359,7 @@ void KivioScreenPainter::drawChord( float x1, float y1, float w1, float h1, floa
PAINTER_CHECK();
m_pPainter->setPen(m_pLineStyle->pen(1.0f));
- m_pPainter->setBrush(QBrush::NoBrush);
+ m_pPainter->setBrush(TQBrush::NoBrush);
m_pPainter->drawChord( int(x1), int(y1), int(w1), int(h1), int(a1), int(a2) );
}
@@ -381,12 +381,12 @@ void KivioScreenPainter::fillChord( float x1, float y1, float w1, float h1, floa
{
PAINTER_CHECK();
- QBrush b;
+ TQBrush b;
b = m_pFillStyle->brush();
if(m_pFillStyle->colorStyle() == KivioFillStyle::kcsGradient) {
- QPixmap pix((int)w1, (int)h1);
- QImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(),
+ TQPixmap pix((int)w1, (int)h1);
+ TQImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(),
m_pFillStyle->color2(), m_pFillStyle->gradientType());
pix.convertFromImage(image);
b.setPixmap(pix);
@@ -416,7 +416,7 @@ void KivioScreenPainter::drawEllipse( float x1, float y1, float w1, float h1 )
PAINTER_CHECK();
m_pPainter->setPen(m_pLineStyle->pen(1.0f));
- m_pPainter->setBrush(QBrush::NoBrush);
+ m_pPainter->setBrush(TQBrush::NoBrush);
m_pPainter->drawEllipse( int(x1), int(y1), int(w1), int(h1) );
}
@@ -436,12 +436,12 @@ void KivioScreenPainter::fillEllipse( float x1, float y1, float w1, float h1 )
{
PAINTER_CHECK();
- QBrush b;
+ TQBrush b;
b = m_pFillStyle->brush();
if(m_pFillStyle->colorStyle() == KivioFillStyle::kcsGradient) {
- QPixmap pix((int)w1, (int)h1);
- QImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(), m_pFillStyle->color2(),
+ TQPixmap pix((int)w1, (int)h1);
+ TQImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(), m_pFillStyle->color2(),
(KImageEffect::GradientType) m_pFillStyle->gradientType());
pix.convertFromImage(image);
b.setPixmap(pix);
@@ -463,16 +463,16 @@ void KivioScreenPainter::fillEllipse( float x1, float y1, float w1, float h1 )
* The list of points should contain a list of points in
* pairs. Lines are drawn from p1->p2 p3->p4 p5->p6, etc...
*/
-void KivioScreenPainter::drawLineArray( QPtrList<KivioPoint> *pList )
+void KivioScreenPainter::drawLineArray( TQPtrList<KivioPoint> *pList )
{
PAINTER_CHECK();
KivioPoint *pPoint;
- QPointArray points(pList->count());
+ TQPointArray points(pList->count());
int i;
- QBrush b;
+ TQBrush b;
- b.setStyle( QBrush::NoBrush );
+ b.setStyle( Qt::NoBrush );
i=0;
pPoint = pList->first();
@@ -497,12 +497,12 @@ void KivioScreenPainter::drawLineArray( QPtrList<KivioPoint> *pList )
*
* Draws a polyline (hollow) from p1->p2->p3->pn
*/
-void KivioScreenPainter::drawPolyline( QPtrList<KivioPoint> *pList )
+void KivioScreenPainter::drawPolyline( TQPtrList<KivioPoint> *pList )
{
PAINTER_CHECK();
KivioPoint *pPoint;
- QPointArray points( pList->count() );
+ TQPointArray points( pList->count() );
int i = 0;
pPoint = pList->first();
@@ -524,12 +524,12 @@ void KivioScreenPainter::drawPolyline( QPtrList<KivioPoint> *pList )
*
* Draws a filled (if set) polygon from p1->p2->p3->pn->p1
*/
-void KivioScreenPainter::drawPolygon( QPtrList<KivioPoint> *pList )
+void KivioScreenPainter::drawPolygon( TQPtrList<KivioPoint> *pList )
{
PAINTER_CHECK();
KivioPoint *pPoint;
- QPointArray points( pList->count() );
+ TQPointArray points( pList->count() );
int i = 0;
pPoint = pList->first();
@@ -542,21 +542,21 @@ void KivioScreenPainter::drawPolygon( QPtrList<KivioPoint> *pList )
drawPolygon(points);
}
-void KivioScreenPainter::drawPolyline( QPointArray &pArray )
+void KivioScreenPainter::drawPolyline( TQPointArray &pArray )
{
PAINTER_CHECK();
m_pPainter->setPen(m_pLineStyle->pen(1.0f));
- m_pPainter->setBrush( QBrush::NoBrush );
+ m_pPainter->setBrush( TQBrush::NoBrush );
- m_pPainter->drawPolyline( pArray, 0, pArray.size() );
+ m_pPainter->tqdrawPolyline( pArray, 0, pArray.size() );
}
-void KivioScreenPainter::drawPolygon( QPointArray &pArray )
+void KivioScreenPainter::drawPolygon( TQPointArray &pArray )
{
PAINTER_CHECK();
- QBrush b;
+ TQBrush b;
b = m_pFillStyle->brush();
if(m_pFillStyle->colorStyle() == KivioFillStyle::kcsGradient) {
@@ -566,17 +566,17 @@ void KivioScreenPainter::drawPolygon( QPointArray &pArray )
w1 = h1 = 0;
for(unsigned int i = 0; i < pArray.count(); i++) {
- x1 = QMIN(x1, pArray[i].x());
- y1 = QMIN(y1, pArray[i].y());
- w1 = QMAX(w1, pArray[i].x());
- h1 = QMAX(h1, pArray[i].y());
+ x1 = TQMIN(x1, pArray[i].x());
+ y1 = TQMIN(y1, pArray[i].y());
+ w1 = TQMAX(w1, pArray[i].x());
+ h1 = TQMAX(h1, pArray[i].y());
}
w1 = w1 - x1;
h1 = h1 - y1;
- QPixmap pix(w1, h1);
- QImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(), m_pFillStyle->color2(),
+ TQPixmap pix(w1, h1);
+ TQImage image = KImageEffect::gradient(pix.size(), m_pFillStyle->color(), m_pFillStyle->color2(),
(KImageEffect::GradientType) m_pFillStyle->gradientType());
pix.convertFromImage(image);
b.setPixmap(pix);
@@ -586,16 +586,16 @@ void KivioScreenPainter::drawPolygon( QPointArray &pArray )
m_pPainter->setPen(m_pLineStyle->pen(1.0f));
m_pPainter->setBrush(b);
- m_pPainter->drawPolygon( pArray, true );
+ m_pPainter->tqdrawPolygon( pArray, true );
m_pPainter->setBrushOrigin(0, 0);
}
-void KivioScreenPainter::drawLineArray( QPointArray &pArray )
+void KivioScreenPainter::drawLineArray( TQPointArray &pArray )
{
PAINTER_CHECK();
m_pPainter->setPen(m_pLineStyle->pen(1.0f));
- m_pPainter->setBrush(QBrush::NoBrush);
+ m_pPainter->setBrush(TQBrush::NoBrush);
m_pPainter->drawLineSegments(pArray);
}
@@ -609,15 +609,15 @@ void KivioScreenPainter::drawLineArray( QPointArray &pArray )
* Draws a filled (if set) curve with the points stored
* in pPoints. They can be made up of bezier, arc, and normal points.
*/
-void KivioScreenPainter::drawClosedPath( QPtrList<KivioPoint> *pPoints )
+void KivioScreenPainter::drawClosedPath( TQPtrList<KivioPoint> *pPoints )
{
PAINTER_CHECK();
- QBrush brush;
+ TQBrush brush;
KivioPoint *pPoint, *pPoint2, *pPoint3, *pPoint4;
- QPtrList <KivioPoint> *pPointList = pPoints;
- QPointArray controlPoints(4), bPoints(0), tmpPoints;
+ TQPtrList <KivioPoint> *pPointList = pPoints;
+ TQPointArray controlPoints(4), bPoints(0), tmpPoints;
int pointIndex=0;
pPoint = pPointList->first();
@@ -648,10 +648,10 @@ void KivioScreenPainter::drawClosedPath( QPtrList<KivioPoint> *pPoints )
return;
}
- controlPoints.setPoint( 0, qRound(pPoint->x()), qRound(pPoint->y()) );
- controlPoints.setPoint( 1, qRound(pPoint2->x()), qRound(pPoint2->y()) );
- controlPoints.setPoint( 2, qRound(pPoint3->x()), qRound(pPoint3->y()) );
- controlPoints.setPoint( 3, qRound(pPoint4->x()), qRound(pPoint4->y()) );
+ controlPoints.setPoint( 0, tqRound(pPoint->x()), tqRound(pPoint->y()) );
+ controlPoints.setPoint( 1, tqRound(pPoint2->x()), tqRound(pPoint2->y()) );
+ controlPoints.setPoint( 2, tqRound(pPoint3->x()), tqRound(pPoint3->y()) );
+ controlPoints.setPoint( 3, tqRound(pPoint4->x()), tqRound(pPoint4->y()) );
tmpPoints = controlPoints.cubicBezier();
@@ -678,8 +678,8 @@ void KivioScreenPainter::drawClosedPath( QPtrList<KivioPoint> *pPoints )
return;
}
- tmpPoints.makeArc( qRound(pPoint->x()), qRound(pPoint->y()), qRound(pPoint2->x()), qRound(pPoint2->y()),
- qRound(pPoint3->x()), qRound(pPoint3->y()) );
+ tmpPoints.makeArc( tqRound(pPoint->x()), tqRound(pPoint->y()), tqRound(pPoint2->x()), tqRound(pPoint2->y()),
+ tqRound(pPoint3->x()), tqRound(pPoint3->y()) );
for( int j=0; j<int(tmpPoints.size()); j++ )
{
@@ -716,15 +716,15 @@ void KivioScreenPainter::drawClosedPath( QPtrList<KivioPoint> *pPoints )
}
}
-void KivioScreenPainter::drawOpenPath( QPtrList<KivioPoint> *pPoints )
+void KivioScreenPainter::drawOpenPath( TQPtrList<KivioPoint> *pPoints )
{
PAINTER_CHECK();
- QBrush brush;
+ TQBrush brush;
KivioPoint *pPoint, *pPoint2, *pPoint3, *pPoint4;
- QPtrList <KivioPoint> *pPointList = pPoints;
- QPointArray controlPoints(4), bPoints(0), tmpPoints;
+ TQPtrList <KivioPoint> *pPointList = pPoints;
+ TQPointArray controlPoints(4), bPoints(0), tmpPoints;
int pointIndex=0;
pPoint = pPointList->first();
@@ -755,10 +755,10 @@ void KivioScreenPainter::drawOpenPath( QPtrList<KivioPoint> *pPoints )
return;
}
- controlPoints.setPoint( 0, qRound(pPoint->x()), qRound(pPoint->y()) );
- controlPoints.setPoint( 1, qRound(pPoint2->x()), qRound(pPoint2->y()) );
- controlPoints.setPoint( 2, qRound(pPoint3->x()), qRound(pPoint3->y()) );
- controlPoints.setPoint( 3, qRound(pPoint4->x()), qRound(pPoint4->y()) );
+ controlPoints.setPoint( 0, tqRound(pPoint->x()), tqRound(pPoint->y()) );
+ controlPoints.setPoint( 1, tqRound(pPoint2->x()), tqRound(pPoint2->y()) );
+ controlPoints.setPoint( 2, tqRound(pPoint3->x()), tqRound(pPoint3->y()) );
+ controlPoints.setPoint( 3, tqRound(pPoint4->x()), tqRound(pPoint4->y()) );
tmpPoints = controlPoints.cubicBezier();
@@ -785,8 +785,8 @@ void KivioScreenPainter::drawOpenPath( QPtrList<KivioPoint> *pPoints )
return;
}
- tmpPoints.makeArc( qRound(pPoint->x()), qRound(pPoint->y()), qRound(pPoint2->x()), qRound(pPoint2->y()),
- qRound(pPoint3->x()), qRound(pPoint3->y()) );
+ tmpPoints.makeArc( tqRound(pPoint->x()), tqRound(pPoint->y()), tqRound(pPoint2->x()), tqRound(pPoint2->y()),
+ tqRound(pPoint3->x()), tqRound(pPoint3->y()) );
for( int j=0; j<int(tmpPoints.size()); j++ )
{
@@ -803,41 +803,41 @@ void KivioScreenPainter::drawOpenPath( QPtrList<KivioPoint> *pPoints )
}
m_pPainter->setPen(m_pLineStyle->pen(1.0f));
- m_pPainter->setBrush( QBrush::NoBrush );
+ m_pPainter->setBrush( TQBrush::NoBrush );
m_pPainter->drawPolyline( bPoints );
}
-void KivioScreenPainter::setFont( const QFont &f )
+void KivioScreenPainter::setFont( const TQFont &f )
{
PAINTER_CHECK();
m_pPainter->setFont( f );
}
-void KivioScreenPainter::drawText( int x, int y, int w, int h, int tf, const QString &str )
+void KivioScreenPainter::drawText( int x, int y, int w, int h, int tf, const TQString &str )
{
PAINTER_CHECK();
m_pPainter->setPen( m_textColor );
m_pPainter->drawText( x, y, w, h, tf, str );
-/* QSimpleRichText textArea(str, m_pPainter->font());
+/* TQSimpleRichText textArea(str, m_pPainter->font());
textArea.setWidth(w);
- QColorGroup cg;
- cg.setColor(QColorGroup::Base, m_pFillStyle->color());
- cg.setColor(QColorGroup::Text, m_textColor);
- QBrush b = m_pFillStyle->brush();
- textArea.draw(m_pPainter, x, y, QRect(0, 0, 0, 0), cg, &b);*/
+ TQColorGroup cg;
+ cg.setColor(TQColorGroup::Base, m_pFillStyle->color());
+ cg.setColor(TQColorGroup::Text, m_textColor);
+ TQBrush b = m_pFillStyle->brush();
+ textArea.draw(m_pPainter, x, y, TQRect(0, 0, 0, 0), cg, &b);*/
}
-QRect KivioScreenPainter::boundingRect( int x, int y, int w, int h, int tf, const QString &str )
+TQRect KivioScreenPainter::boundingRect( int x, int y, int w, int h, int tf, const TQString &str )
{
PAINTER_CHECK();
return m_pPainter->boundingRect( x,y,w,h, tf, str );
}
-void KivioScreenPainter::drawPixmap( float x, float y, const QPixmap &pix )
+void KivioScreenPainter::drawPixmap( float x, float y, const TQPixmap &pix )
{
PAINTER_CHECK();
m_pPainter->drawPixmap( (int)x, (int)y, pix );
@@ -846,9 +846,9 @@ void KivioScreenPainter::drawPixmap( float x, float y, const QPixmap &pix )
void KivioScreenPainter::drawHandle( float x, float y, int flags )
{
PAINTER_CHECK();
- QColor fillColor, penColor;
- QBrush b;
- QPen p;
+ TQColor fillColor, penColor;
+ TQBrush b;
+ TQPen p;
const float HW = 6.0f;
const float HWP1 = HW+1.0f;
@@ -862,17 +862,17 @@ void KivioScreenPainter::drawHandle( float x, float y, int flags )
x1 = x - 4;
y1 = y - 4;
- m_pPainter->drawPixmap( qRound(x1), qRound(y1), Kivio::lockPixmap() );
+ m_pPainter->drawPixmap( tqRound(x1), tqRound(y1), Kivio::lockPixmap() );
return;
}
if( flags & cpfConnected )
{
- fillColor = QColor(200,0,0);
+ fillColor = TQColor(200,0,0);
}
else
{
- fillColor = QColor(0,200,0);
+ fillColor = TQColor(0,200,0);
}
penColor.setRgb(0, 0, 0);
@@ -891,27 +891,27 @@ void KivioScreenPainter::drawHandle( float x, float y, int flags )
// m_pPainter->fillRect( x1, y1, HWP1, HWP1, b );
if(flags & cpfEnd) {
- m_pPainter->drawEllipse( qRound(x1), qRound(y1), qRound(HWP1), qRound(HWP1) );
+ m_pPainter->drawEllipse( tqRound(x1), tqRound(y1), tqRound(HWP1), tqRound(HWP1) );
} else {
- m_pPainter->drawRect( qRound(x1), qRound(y1), qRound(HWP1), qRound(HWP1) );
+ m_pPainter->drawRect( tqRound(x1), tqRound(y1), tqRound(HWP1), tqRound(HWP1) );
}
// Now put something in it if needed
if( flags & cpfConnectable )
{
- b.setColor(QColor(0,0,0));
+ b.setColor(TQColor(0,0,0));
- m_pPainter->fillRect(qRound(x-1),qRound(y-1),3,3, b);
+ m_pPainter->fillRect(tqRound(x-1),tqRound(y-1),3,3, b);
}
}
-void KivioScreenPainter::drawSelectionBox( const QRect& r )
+void KivioScreenPainter::drawSelectionBox( const TQRect& r )
{
PAINTER_CHECK();
- QPen p;
- p.setColor(QColor(0,200,0));
+ TQPen p;
+ p.setColor(TQColor(0,200,0));
p.setStyle(Qt::DashLine);
- m_pPainter->setBrush(Qt::NoBrush);
+ m_pPainter->setBrush(TQt::NoBrush);
m_pPainter->setPen(p);
m_pPainter->drawRect(r);
}
@@ -973,7 +973,7 @@ int KivioScreenPainter::rotation()
return m_rotation;
}
-void KivioScreenPainter::setWorldMatrix(QWMatrix m, bool c)
+void KivioScreenPainter::setWorldMatrix(TQWMatrix m, bool c)
{
PAINTER_CHECK();
m_pPainter->setWorldMatrix(m, c);
diff --git a/kivio/kiviopart/kiviosdk/kivio_screen_painter.h b/kivio/kiviopart/kiviosdk/kivio_screen_painter.h
index 8d76061d..3e569eba 100644
--- a/kivio/kiviopart/kiviosdk/kivio_screen_painter.h
+++ b/kivio/kiviopart/kiviosdk/kivio_screen_painter.h
@@ -21,9 +21,9 @@
#include "kivio_painter.h"
-#include <qfont.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqfont.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
class KivioPoint;
@@ -31,20 +31,20 @@ class KivioPoint;
class KivioScreenPainter : public KivioPainter
{
protected:
- QPainter *m_pPainter;
+ TQPainter *m_pPainter;
float m_transX, m_transY;
int m_rotation;
public:
KivioScreenPainter();
- KivioScreenPainter(QPainter* painter);
+ KivioScreenPainter(TQPainter* painter);
virtual ~KivioScreenPainter();
- virtual bool start( QPaintDevice * );
+ virtual bool start( TQPaintDevice * );
virtual bool stop();
- QPainter *painter() { return m_pPainter; }
- void setPainter(QPainter* p) { m_pPainter = p; }
+ TQPainter *painter() { return m_pPainter; }
+ void setPainter(TQPainter* p) { m_pPainter = p; }
/*\
|*|
@@ -55,7 +55,7 @@ public:
void drawLine( float, float, float, float );
void drawArc( float, float, float, float, float, float );
- void drawBezier( QPointArray & );
+ void drawBezier( TQPointArray & );
void drawRect( float, float, float, float );
void fillRect( float, float, float, float );
@@ -72,28 +72,28 @@ public:
void drawEllipse( float, float, float, float );
void fillEllipse( float, float, float, float );
- void drawLineArray( QPtrList<KivioPoint> * );
+ void drawLineArray( TQPtrList<KivioPoint> * );
- void drawPolyline( QPtrList<KivioPoint> * );
- void drawPolygon( QPtrList<KivioPoint> * );
+ void drawPolyline( TQPtrList<KivioPoint> * );
+ void drawPolygon( TQPtrList<KivioPoint> * );
- void drawPolyline( QPointArray & );
- void drawPolygon( QPointArray & );
- void drawLineArray( QPointArray & );
+ void drawPolyline( TQPointArray & );
+ void drawPolygon( TQPointArray & );
+ void drawLineArray( TQPointArray & );
- void drawClosedPath( QPtrList<KivioPoint> * );
- void drawOpenPath( QPtrList<KivioPoint> * );
+ void drawClosedPath( TQPtrList<KivioPoint> * );
+ void drawOpenPath( TQPtrList<KivioPoint> * );
- void setFont( const QFont & );
+ void setFont( const TQFont & );
void drawText( int x, int y, int w, int h, int tf,
- const QString &str );
- virtual QRect boundingRect( int, int, int, int, int, const QString & );
+ const TQString &str );
+ virtual TQRect boundingRect( int, int, int, int, int, const TQString & );
- void drawPixmap( float, float, const QPixmap & );
+ void drawPixmap( float, float, const TQPixmap & );
void drawHandle( float, float, int );
- virtual void drawSelectionBox( const QRect& );
+ virtual void drawSelectionBox( const TQRect& );
virtual void saveState();
virtual void restoreState();
@@ -103,7 +103,7 @@ public:
virtual void rotateBy(int);
virtual int rotation();
- virtual void setWorldMatrix(QWMatrix, bool);
+ virtual void setWorldMatrix(TQWMatrix, bool);
};
#endif
diff --git a/kivio/kiviopart/kiviosdk/kivio_shape.cpp b/kivio/kiviopart/kiviosdk/kivio_shape.cpp
index da023415..dad8459a 100644
--- a/kivio/kiviopart/kiviosdk/kivio_shape.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_shape.cpp
@@ -44,7 +44,7 @@ KivioShape::KivioShape()
*/
KivioShape::KivioShape( const KivioShape &source )
{
- source.m_shapeData.copyInto( &m_shapeData );
+ source.m_tqshapeData.copyInto( &m_tqshapeData );
}
@@ -68,7 +68,7 @@ void KivioShape::copyInto( KivioShape *pTarget ) const
if( !pTarget )
return;
- m_shapeData.copyInto( &(pTarget->m_shapeData) );
+ m_tqshapeData.copyInto( &(pTarget->m_tqshapeData) );
}
@@ -78,30 +78,30 @@ void KivioShape::copyInto( KivioShape *pTarget ) const
* @param e The element to load from
* @returns true on success, false on failure.
*/
-bool KivioShape::loadXML( const QDomElement &e )
+bool KivioShape::loadXML( const TQDomElement &e )
{
- QDomElement ele;
- QDomNode node = e.firstChild();
+ TQDomElement ele;
+ TQDomNode node = e.firstChild();
- QString name = XmlReadString( e, "name", "" );
- m_shapeData.setName( name );
- m_shapeData.setShapeType( (KivioShapeData::KivioShapeType)XmlReadInt( e, "shapeType", -1 ));
+ TQString name = XmlReadString( e, "name", "" );
+ m_tqshapeData.setName( name );
+ m_tqshapeData.setShapeType( (KivioShapeData::KivioShapeType)XmlReadInt( e, "tqshapeType", -1 ));
- if( m_shapeData.name().isEmpty() ||
- m_shapeData.shapeType() == -1 )
+ if( m_tqshapeData.name().isEmpty() ||
+ m_tqshapeData.tqshapeType() == -1 )
{
- kdWarning(43000) << "-LOAD KivioShape::loadXML() - Unknown shape or bad name read. Shape load aborted." << endl;
+ kdWarning(43000) << "-LOAD KivioShape::loadXML() - Unknown tqshape or bad name read. Shape load aborted." << endl;
return false;
}
while( !node.isNull() )
{
- QString nodeName = node.nodeName();
+ TQString nodeName = node.nodeName();
ele = node.toElement();
if( nodeName == "KivioShapeData" )
{
- m_shapeData.loadXML( ele );
+ m_tqshapeData.loadXML( ele );
}
node = node.nextSibling();
@@ -114,55 +114,55 @@ bool KivioShape::loadXML( const QDomElement &e )
* Save this object to an XML element
*
* @param doc The document to save to
- * @returns QDomElement representing this object.
+ * @returns TQDomElement representing this object.
*/
-QDomElement KivioShape::saveXML( QDomDocument &doc )
+TQDomElement KivioShape::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioShape");
+ TQDomElement e = doc.createElement("KivioShape");
- XmlWriteString( e, "name", m_shapeData.m_name );
- XmlWriteInt( e, "shapeType", m_shapeData.m_shapeType );
+ XmlWriteString( e, "name", m_tqshapeData.m_name );
+ XmlWriteInt( e, "tqshapeType", m_tqshapeData.m_tqshapeType );
- e.appendChild( m_shapeData.saveXML( doc ) );
+ e.appendChild( m_tqshapeData.saveXML( doc ) );
return e;
}
/**
- * Loads a shape of type arc
+ * Loads a tqshape of type arc
*
* @param e The element to load from
* @returns A newly allocated KivioShape, or NULL on error.
*
* FIXME: implement this
*/
-KivioShape *KivioShape::loadShapeArc( const QDomElement & )
+KivioShape *KivioShape::loadShapeArc( const TQDomElement & )
{
return NULL;
}
/**
- * Loads a shape of type closed-path.
+ * Loads a tqshape of type closed-path.
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*/
-KivioShape *KivioShape::loadShapeClosedPath( const QDomElement &e )
+KivioShape *KivioShape::loadShapeClosedPath( const TQDomElement &e )
{
KivioShape *pShape = NULL;
KivioPoint *pPoint = NULL;
- QDomNode node;
- QString nodeName;
+ TQDomNode node;
+ TQString nodeName;
- // Create the new shape to load into
+ // Create the new tqshape to load into
pShape = new KivioShape();
// Load the type, name, and lineWidth properties
- pShape->m_shapeData.m_shapeType = KivioShapeData::kstClosedPath;
- pShape->m_shapeData.m_name = XmlReadString( e, "name", "" );
+ pShape->m_tqshapeData.m_tqshapeType = KivioShapeData::kstClosedPath;
+ pShape->m_tqshapeData.m_name = XmlReadString( e, "name", "" );
// Iterate through the nodes loading the various items
node = e.firstChild();
@@ -176,16 +176,16 @@ KivioShape *KivioShape::loadShapeClosedPath( const QDomElement &e )
// Allocate a new point, load it, and store it in the list
pPoint = new KivioPoint(0.0f, 0.0f, KivioPoint::kptBezier);
pPoint->loadXML( node.toElement() );
- pShape->m_shapeData.m_pOriginalPointList->append( pPoint );
+ pShape->m_tqshapeData.m_pOriginalPointList->append( pPoint );
pPoint = NULL;
}
else if( nodeName == "KivioFillStyle" )
{
- pShape->m_shapeData.m_pFillStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pFillStyle->loadXML( node.toElement() );
}
else if( nodeName == "KivioLineStyle" )
{
- pShape->m_shapeData.m_pLineStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pLineStyle->loadXML( node.toElement() );
}
node = node.nextSibling();
@@ -196,25 +196,25 @@ KivioShape *KivioShape::loadShapeClosedPath( const QDomElement &e )
/**
- * Loads a shape of type bezier
+ * Loads a tqshape of type bezier
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*/
-KivioShape *KivioShape::loadShapeBezier( const QDomElement &e )
+KivioShape *KivioShape::loadShapeBezier( const TQDomElement &e )
{
KivioShape *pShape = NULL;
KivioPoint *pPoint = NULL;
- QDomNode node;
- QString nodeName;
+ TQDomNode node;
+ TQString nodeName;
- // Create the new shape to load into
+ // Create the new tqshape to load into
pShape = new KivioShape();
// Load the type, name, and lineWidth properties
- pShape->m_shapeData.m_shapeType = KivioShapeData::kstBezier;
- pShape->m_shapeData.m_name = XmlReadString( e, "name", "" );
+ pShape->m_tqshapeData.m_tqshapeType = KivioShapeData::kstBezier;
+ pShape->m_tqshapeData.m_name = XmlReadString( e, "name", "" );
// Iterate through the nodes loading the various items
node = e.firstChild();
@@ -230,25 +230,25 @@ KivioShape *KivioShape::loadShapeBezier( const QDomElement &e )
pPoint->loadXML( node.toElement() );
if( pPoint->pointType() != KivioPoint::kptBezier )
{
- kdDebug(43000) << "KivioShape::loadShapeBezier() - Non-bezier point found. Aborting shape." << endl;
+ kdDebug(43000) << "KivioShape::loadShapeBezier() - Non-bezier point found. Aborting tqshape." << endl;
delete pPoint;
delete pShape;
return NULL;
}
- pShape->m_shapeData.m_pOriginalPointList->append( pPoint );
+ pShape->m_tqshapeData.m_pOriginalPointList->append( pPoint );
pPoint = NULL;
}
else if( nodeName == "KivioLineStyle" )
{
- pShape->m_shapeData.m_pLineStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pLineStyle->loadXML( node.toElement() );
}
node = node.nextSibling();
}
- if( pShape->m_shapeData.m_pOriginalPointList->count() != 4 )
+ if( pShape->m_tqshapeData.m_pOriginalPointList->count() != 4 )
{
- kdDebug(43000) << "KivioShape::loadShapeBezier() - Wrong number of points loaded, should be 4, shape aborted" << endl;
+ kdDebug(43000) << "KivioShape::loadShapeBezier() - Wrong number of points loaded, should be 4, tqshape aborted" << endl;
delete pShape;
return NULL;
}
@@ -258,27 +258,27 @@ KivioShape *KivioShape::loadShapeBezier( const QDomElement &e )
/**
- * Loads a shape of type ellipse.
+ * Loads a tqshape of type ellipse.
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*/
-KivioShape *KivioShape::loadShapeEllipse( const QDomElement &e )
+KivioShape *KivioShape::loadShapeEllipse( const TQDomElement &e )
{
KivioShape *pShape = NULL;
- QDomNode node;
- QString nodeName;
+ TQDomNode node;
+ TQString nodeName;
- // Create the new shape to load into
+ // Create the new tqshape to load into
pShape = new KivioShape();
// Load the type, name, and lineWidth properties
- pShape->m_shapeData.m_shapeType = KivioShapeData::kstEllipse;
- pShape->m_shapeData.m_name = XmlReadString( e, "name", "" );
+ pShape->m_tqshapeData.m_tqshapeType = KivioShapeData::kstEllipse;
+ pShape->m_tqshapeData.m_name = XmlReadString( e, "name", "" );
- pShape->m_shapeData.m_position.set( XmlReadFloat( e, "x", 0.0f ), XmlReadFloat( e, "y", 0.0f ) );
- pShape->m_shapeData.m_dimensions.set( XmlReadFloat( e, "w", 0.0f ), XmlReadFloat( e, "h", 0.0f ) );
+ pShape->m_tqshapeData.m_position.set( XmlReadFloat( e, "x", 0.0f ), XmlReadFloat( e, "y", 0.0f ) );
+ pShape->m_tqshapeData.m_dimensions.set( XmlReadFloat( e, "w", 0.0f ), XmlReadFloat( e, "h", 0.0f ) );
// Iterate through the nodes loading the various items
node = e.firstChild();
@@ -288,11 +288,11 @@ KivioShape *KivioShape::loadShapeEllipse( const QDomElement &e )
if( nodeName == "KivioFillStyle" )
{
- pShape->m_shapeData.m_pFillStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pFillStyle->loadXML( node.toElement() );
}
else if( nodeName == "KivioLineStyle" )
{
- pShape->m_shapeData.m_pLineStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pLineStyle->loadXML( node.toElement() );
}
node = node.nextSibling();
@@ -303,26 +303,26 @@ KivioShape *KivioShape::loadShapeEllipse( const QDomElement &e )
/**
- * Loads a shape of type line-array.
+ * Loads a tqshape of type line-array.
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*/
-KivioShape *KivioShape::loadShapeLineArray( const QDomElement &e )
+KivioShape *KivioShape::loadShapeLineArray( const TQDomElement &e )
{
KivioShape *pShape = NULL;
KivioPoint *pPoint = NULL;
- QDomNode node;
- QString nodeName;
- QDomElement lineElement;
+ TQDomNode node;
+ TQString nodeName;
+ TQDomElement lineElement;
- // Create the new shape to load into
+ // Create the new tqshape to load into
pShape = new KivioShape();
// Load the type, name, and lineWidth properties
- pShape->m_shapeData.m_shapeType = KivioShapeData::kstLineArray;
- pShape->m_shapeData.m_name = XmlReadString( e, "name", "" );
+ pShape->m_tqshapeData.m_tqshapeType = KivioShapeData::kstLineArray;
+ pShape->m_tqshapeData.m_name = XmlReadString( e, "name", "" );
// Iterate through the nodes loading the various items
node = e.firstChild();
@@ -337,14 +337,14 @@ KivioShape *KivioShape::loadShapeLineArray( const QDomElement &e )
// Allocate a new point, load it, and store it in the list
pPoint = new KivioPoint( XmlReadFloat( lineElement, "x1", 0.0f ), XmlReadFloat( lineElement, "y1", 0.0f ) );
- pShape->m_shapeData.m_pOriginalPointList->append( pPoint );
+ pShape->m_tqshapeData.m_pOriginalPointList->append( pPoint );
pPoint = new KivioPoint( XmlReadFloat( lineElement, "x2", 0.0f ), XmlReadFloat( lineElement, "y2", 0.0f ) );
- pShape->m_shapeData.m_pOriginalPointList->append( pPoint );
+ pShape->m_tqshapeData.m_pOriginalPointList->append( pPoint );
pPoint = NULL;
}
else if( nodeName == "KivioLineStyle" )
{
- pShape->m_shapeData.m_pLineStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pLineStyle->loadXML( node.toElement() );
}
node = node.nextSibling();
@@ -355,25 +355,25 @@ KivioShape *KivioShape::loadShapeLineArray( const QDomElement &e )
/**
- * Loads a shape of type open-path.
+ * Loads a tqshape of type open-path.
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*/
-KivioShape *KivioShape::loadShapeOpenPath( const QDomElement &e )
+KivioShape *KivioShape::loadShapeOpenPath( const TQDomElement &e )
{
KivioShape *pShape = NULL;
KivioPoint *pPoint = NULL;
- QDomNode node;
- QString nodeName;
+ TQDomNode node;
+ TQString nodeName;
- // Create the new shape to load into
+ // Create the new tqshape to load into
pShape = new KivioShape();
// Load the type, name, and lineWidth properties
- pShape->m_shapeData.m_shapeType = KivioShapeData::kstOpenPath;
- pShape->m_shapeData.m_name = XmlReadString( e, "name", "" );
+ pShape->m_tqshapeData.m_tqshapeType = KivioShapeData::kstOpenPath;
+ pShape->m_tqshapeData.m_name = XmlReadString( e, "name", "" );
// Iterate through the nodes loading the various items
node = e.firstChild();
@@ -387,12 +387,12 @@ KivioShape *KivioShape::loadShapeOpenPath( const QDomElement &e )
// Allocate a new point, load it, and store it in the list
pPoint = new KivioPoint(0.0f, 0.0f, KivioPoint::kptBezier);
pPoint->loadXML( node.toElement() );
- pShape->m_shapeData.m_pOriginalPointList->append( pPoint );
+ pShape->m_tqshapeData.m_pOriginalPointList->append( pPoint );
pPoint = NULL;
}
else if( nodeName == "KivioLineStyle" )
{
- pShape->m_shapeData.m_pLineStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pLineStyle->loadXML( node.toElement() );
}
node = node.nextSibling();
@@ -403,39 +403,39 @@ KivioShape *KivioShape::loadShapeOpenPath( const QDomElement &e )
/**
- * Loads a shape of type pie.
+ * Loads a tqshape of type pie.
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*
* FIXME: Implement this
*/
-KivioShape *KivioShape::loadShapePie( const QDomElement & )
+KivioShape *KivioShape::loadShapePie( const TQDomElement & )
{
return NULL;
}
/**
- * Loads a shape of type polygon.
+ * Loads a tqshape of type polygon.
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*/
-KivioShape *KivioShape::loadShapePolygon( const QDomElement &e )
+KivioShape *KivioShape::loadShapePolygon( const TQDomElement &e )
{
KivioShape *pShape = NULL;
KivioPoint *pPoint = NULL;
- QDomNode node;
- QString nodeName;
+ TQDomNode node;
+ TQString nodeName;
- // Create the new shape to load into
+ // Create the new tqshape to load into
pShape = new KivioShape();
// Load the type, name, and lineWidth properties
- pShape->m_shapeData.m_shapeType = KivioShapeData::kstPolygon;
- pShape->m_shapeData.m_name = XmlReadString( e, "name", "" );
+ pShape->m_tqshapeData.m_tqshapeType = KivioShapeData::kstPolygon;
+ pShape->m_tqshapeData.m_name = XmlReadString( e, "name", "" );
// Iterate through the nodes loading the various items
node = e.firstChild();
@@ -449,16 +449,16 @@ KivioShape *KivioShape::loadShapePolygon( const QDomElement &e )
// Allocate a new point, load it, and store it in the list
pPoint = new KivioPoint();
pPoint->loadXML( node.toElement() );
- pShape->m_shapeData.m_pOriginalPointList->append( pPoint );
+ pShape->m_tqshapeData.m_pOriginalPointList->append( pPoint );
pPoint = NULL;
}
else if( nodeName == "KivioFillStyle" )
{
- pShape->m_shapeData.m_pFillStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pFillStyle->loadXML( node.toElement() );
}
else if( nodeName == "KivioLineStyle" )
{
- pShape->m_shapeData.m_pLineStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pLineStyle->loadXML( node.toElement() );
}
node = node.nextSibling();
@@ -469,25 +469,25 @@ KivioShape *KivioShape::loadShapePolygon( const QDomElement &e )
/**
- * Loads a shape of type polyline.
+ * Loads a tqshape of type polyline.
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*/
-KivioShape *KivioShape::loadShapePolyline( const QDomElement &e )
+KivioShape *KivioShape::loadShapePolyline( const TQDomElement &e )
{
KivioShape *pShape = NULL;
KivioPoint *pPoint = NULL;
- QDomNode node;
- QString nodeName;
+ TQDomNode node;
+ TQString nodeName;
- // Create the new shape to load into
+ // Create the new tqshape to load into
pShape = new KivioShape();
// Load the type, name, and lineWidth properties
- pShape->m_shapeData.m_shapeType = KivioShapeData::kstPolyline;
- pShape->m_shapeData.m_name = XmlReadString( e, "name", "" );
+ pShape->m_tqshapeData.m_tqshapeType = KivioShapeData::kstPolyline;
+ pShape->m_tqshapeData.m_name = XmlReadString( e, "name", "" );
// Iterate through the nodes loading the various items
node = e.firstChild();
@@ -501,12 +501,12 @@ KivioShape *KivioShape::loadShapePolyline( const QDomElement &e )
// Allocate a new point, load it, and store it in the list
pPoint = new KivioPoint();
pPoint->loadXML( node.toElement() );
- pShape->m_shapeData.m_pOriginalPointList->append( pPoint );
+ pShape->m_tqshapeData.m_pOriginalPointList->append( pPoint );
pPoint = NULL;
}
else if( nodeName == "KivioLineStyle" )
{
- pShape->m_shapeData.m_pLineStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pLineStyle->loadXML( node.toElement() );
}
node = node.nextSibling();
@@ -517,27 +517,27 @@ KivioShape *KivioShape::loadShapePolyline( const QDomElement &e )
/**
- * Loads a shape of type rectangle.
+ * Loads a tqshape of type rectangle.
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*/
-KivioShape *KivioShape::loadShapeRectangle( const QDomElement &e )
+KivioShape *KivioShape::loadShapeRectangle( const TQDomElement &e )
{
KivioShape *pShape = NULL;
- QDomNode node;
- QString nodeName;
+ TQDomNode node;
+ TQString nodeName;
- // Create the new shape to load into
+ // Create the new tqshape to load into
pShape = new KivioShape();
// Load the type, name, and lineWidth properties
- pShape->m_shapeData.m_shapeType = KivioShapeData::kstRectangle;
- pShape->m_shapeData.m_name = XmlReadString( e, "name", "" );
+ pShape->m_tqshapeData.m_tqshapeType = KivioShapeData::kstRectangle;
+ pShape->m_tqshapeData.m_name = XmlReadString( e, "name", "" );
- pShape->m_shapeData.m_position.set( XmlReadFloat( e, "x", 0.0f ), XmlReadFloat( e, "y", 0.0f ) );
- pShape->m_shapeData.m_dimensions.set( XmlReadFloat( e, "w", 72.0f ), XmlReadFloat( e, "h", 72.0f ) );
+ pShape->m_tqshapeData.m_position.set( XmlReadFloat( e, "x", 0.0f ), XmlReadFloat( e, "y", 0.0f ) );
+ pShape->m_tqshapeData.m_dimensions.set( XmlReadFloat( e, "w", 72.0f ), XmlReadFloat( e, "h", 72.0f ) );
// Iterate through the nodes loading the various items
node = e.firstChild();
@@ -548,11 +548,11 @@ KivioShape *KivioShape::loadShapeRectangle( const QDomElement &e )
// Read the fill style
if( nodeName == "KivioFillStyle" )
{
- pShape->m_shapeData.m_pFillStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pFillStyle->loadXML( node.toElement() );
}
else if( nodeName == "KivioLineStyle" )
{
- pShape->m_shapeData.m_pLineStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pLineStyle->loadXML( node.toElement() );
}
node = node.nextSibling();
@@ -564,33 +564,33 @@ KivioShape *KivioShape::loadShapeRectangle( const QDomElement &e )
/**
- * Loads a shape of type round rectangle.
+ * Loads a tqshape of type round rectangle.
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*/
-KivioShape *KivioShape::loadShapeRoundRectangle( const QDomElement &e )
+KivioShape *KivioShape::loadShapeRoundRectangle( const TQDomElement &e )
{
KivioShape *pShape = NULL;
KivioPoint *pPoint = NULL;
- QDomNode node;
- QString nodeName;
+ TQDomNode node;
+ TQString nodeName;
- // Create the new shape to load into
+ // Create the new tqshape to load into
pShape = new KivioShape();
// Load the type, name, and lineWidth properties
- pShape->m_shapeData.m_shapeType = KivioShapeData::kstRoundRectangle;
- pShape->m_shapeData.m_name = XmlReadString( e, "name", "" );
+ pShape->m_tqshapeData.m_tqshapeType = KivioShapeData::kstRoundRectangle;
+ pShape->m_tqshapeData.m_name = XmlReadString( e, "name", "" );
- pShape->m_shapeData.m_position.set( XmlReadFloat( e, "x", 0.0f ), XmlReadFloat( e, "y", 0.0f ) );
- pShape->m_shapeData.m_dimensions.set( XmlReadFloat( e, "w", 72.0f ), XmlReadFloat( e, "h", 72.0f ) );
+ pShape->m_tqshapeData.m_position.set( XmlReadFloat( e, "x", 0.0f ), XmlReadFloat( e, "y", 0.0f ) );
+ pShape->m_tqshapeData.m_dimensions.set( XmlReadFloat( e, "w", 72.0f ), XmlReadFloat( e, "h", 72.0f ) );
// Read and store the radii of the curves
pPoint = new KivioPoint(0.0f, 0.0f);
pPoint->set( XmlReadFloat( e, "r1", 1.0f ), XmlReadFloat( e, "r2", 1.0f ) );
- pShape->m_shapeData.m_pOriginalPointList->append( pPoint );
+ pShape->m_tqshapeData.m_pOriginalPointList->append( pPoint );
// Iterate through the nodes loading the various items
node = e.firstChild();
@@ -601,11 +601,11 @@ KivioShape *KivioShape::loadShapeRoundRectangle( const QDomElement &e )
// Read the fill style
if( nodeName == "KivioFillStyle" )
{
- pShape->m_shapeData.m_pFillStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pFillStyle->loadXML( node.toElement() );
}
else if( nodeName == "KivioLineStyle" )
{
- pShape->m_shapeData.m_pLineStyle->loadXML( node.toElement() );
+ pShape->m_tqshapeData.m_pLineStyle->loadXML( node.toElement() );
}
node = node.nextSibling();
@@ -616,31 +616,31 @@ KivioShape *KivioShape::loadShapeRoundRectangle( const QDomElement &e )
/**
- * Loads a shape of type textbox.
+ * Loads a tqshape of type textbox.
*
* @param e The element to load from.
* @returns A newly allocated KivioShape, or NULL on error.
*/
-KivioShape *KivioShape::loadShapeTextBox( const QDomElement &e )
+KivioShape *KivioShape::loadShapeTextBox( const TQDomElement &e )
{
KivioShape *pShape = NULL;
- QDomNode node;
- QString nodeName;
+ TQDomNode node;
+ TQString nodeName;
KivioTextStyle ts;
- QString name;
+ TQString name;
- // Create the new shape to load into
+ // Create the new tqshape to load into
pShape = new KivioShape();
// Load the type and name
- pShape->m_shapeData.setShapeType(KivioShapeData::kstTextBox);
- pShape->m_shapeData.setName( XmlReadString( e, "name", "" ) );
- pShape->m_shapeData.setTextColor(XmlReadColor(e,"color",QColor(0,0,0)));
+ pShape->m_tqshapeData.setShapeType(KivioShapeData::kstTextBox);
+ pShape->m_tqshapeData.setName( XmlReadString( e, "name", "" ) );
+ pShape->m_tqshapeData.setTextColor(XmlReadColor(e,"color",TQColor(0,0,0)));
- pShape->m_shapeData.m_position.set(
+ pShape->m_tqshapeData.m_position.set(
XmlReadFloat( e, "x", 0.0f ), XmlReadFloat( e, "y", 0.0f ) );
- pShape->m_shapeData.m_dimensions.set(
+ pShape->m_tqshapeData.m_dimensions.set(
XmlReadFloat( e, "w", 72.0f ), XmlReadFloat( e, "h", 72.0f ) );
// Now look for the KivioTextStyle
@@ -651,13 +651,13 @@ KivioShape *KivioShape::loadShapeTextBox( const QDomElement &e )
if( nodeName == "KivioTextStyle" )
{
ts.loadXML( node.toElement() );
- pShape->m_shapeData.setTextStyle( &ts );
+ pShape->m_tqshapeData.setTextStyle( &ts );
}
node = node.nextSibling();
}
-// QString text = XmlReadString( e, "text", "" );
-// pShape->m_shapeData.setText( text );
+// TQString text = XmlReadString( e, "text", "" );
+// pShape->m_tqshapeData.setText( text );
return pShape;
diff --git a/kivio/kiviopart/kiviosdk/kivio_shape.h b/kivio/kiviopart/kiviosdk/kivio_shape.h
index 6ade18e8..c83607d7 100644
--- a/kivio/kiviopart/kiviosdk/kivio_shape.h
+++ b/kivio/kiviopart/kiviosdk/kivio_shape.h
@@ -20,13 +20,13 @@
#define KIVIO_SHAPE_H
#include "kivio_shape_data.h"
-#include <qdom.h>
+#include <tqdom.h>
class KivioShape
{
protected:
- KivioShapeData m_shapeData; // The data inside this shape
+ KivioShapeData m_tqshapeData; // The data inside this tqshape
public:
KivioShape();
@@ -36,25 +36,25 @@ public:
void copyInto( KivioShape * ) const;
- bool loadXML( const QDomElement & );
- QDomElement saveXML( QDomDocument & );
-
- KivioShapeData::KivioShapeType shapeType() { return m_shapeData.shapeType(); }
-
- KivioShapeData *shapeData() { return &m_shapeData; }
-
- static KivioShape *loadShapeArc( const QDomElement & );
- static KivioShape *loadShapeClosedPath( const QDomElement & );
- static KivioShape *loadShapeBezier( const QDomElement & );
- static KivioShape *loadShapeEllipse( const QDomElement & );
- static KivioShape *loadShapeLineArray( const QDomElement & );
- static KivioShape *loadShapeOpenPath( const QDomElement & );
- static KivioShape *loadShapePie( const QDomElement & );
- static KivioShape *loadShapePolygon( const QDomElement & );
- static KivioShape *loadShapePolyline( const QDomElement & );
- static KivioShape *loadShapeRectangle( const QDomElement & );
- static KivioShape *loadShapeRoundRectangle( const QDomElement & );
- static KivioShape *loadShapeTextBox( const QDomElement & );
+ bool loadXML( const TQDomElement & );
+ TQDomElement saveXML( TQDomDocument & );
+
+ KivioShapeData::KivioShapeType tqshapeType() { return m_tqshapeData.tqshapeType(); }
+
+ KivioShapeData *tqshapeData() { return &m_tqshapeData; }
+
+ static KivioShape *loadShapeArc( const TQDomElement & );
+ static KivioShape *loadShapeClosedPath( const TQDomElement & );
+ static KivioShape *loadShapeBezier( const TQDomElement & );
+ static KivioShape *loadShapeEllipse( const TQDomElement & );
+ static KivioShape *loadShapeLineArray( const TQDomElement & );
+ static KivioShape *loadShapeOpenPath( const TQDomElement & );
+ static KivioShape *loadShapePie( const TQDomElement & );
+ static KivioShape *loadShapePolygon( const TQDomElement & );
+ static KivioShape *loadShapePolyline( const TQDomElement & );
+ static KivioShape *loadShapeRectangle( const TQDomElement & );
+ static KivioShape *loadShapeRoundRectangle( const TQDomElement & );
+ static KivioShape *loadShapeTextBox( const TQDomElement & );
};
#endif
diff --git a/kivio/kiviopart/kiviosdk/kivio_shape_data.cpp b/kivio/kiviopart/kiviosdk/kivio_shape_data.cpp
index ed974871..5305fe13 100644
--- a/kivio/kiviopart/kiviosdk/kivio_shape_data.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_shape_data.cpp
@@ -23,11 +23,11 @@
#include "kivio_shape_data.h"
#include "kivio_text_style.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
/*
- * Struct for holding information about a shape type
+ * Struct for holding information about a tqshape type
*/
struct KivioShapeTypeInfo
{
@@ -36,10 +36,10 @@ struct KivioShapeTypeInfo
};
/*
- * Array of shape info used for loading/saving.
+ * Array of tqshape info used for loading/saving.
*/
static const int numShapeInfo = 12;
-static struct KivioShapeTypeInfo shapeInfo[] = {
+static struct KivioShapeTypeInfo tqshapeInfo[] = {
{ "Arc", KivioShapeData::kstArc },
{ "Pie", KivioShapeData::kstPie },
{ "LineArray", KivioShapeData::kstLineArray },
@@ -65,11 +65,11 @@ static struct KivioShapeTypeInfo shapeInfo[] = {
KivioTextShapeData::KivioTextShapeData()
{
m_text = "";
- m_textFont = QFont("Times");
- m_textColor = QColor(0,0,0);
+ m_textFont = TQFont("Times");
+ m_textColor = TQColor(0,0,0);
m_isHtml = false;
- m_hTextAlign = Qt::AlignHCenter;
- m_vTextAlign = Qt::AlignVCenter;
+ m_hTextAlign = TQt::AlignHCenter;
+ m_vTextAlign = TQt::AlignVCenter;
}
@@ -77,14 +77,14 @@ KivioShapeData::KivioShapeData()
: m_pOriginalPointList(NULL),
m_pFillStyle(NULL)
{
- m_pOriginalPointList = new QPtrList<KivioPoint>;
+ m_pOriginalPointList = new TQPtrList<KivioPoint>;
m_pOriginalPointList->setAutoDelete(true);
m_pFillStyle = new KivioFillStyle();
m_pLineStyle = new KivioLineStyle();
-// m_fgColor = QColor( 0, 0, 0 );
+// m_fgColor = TQColor( 0, 0, 0 );
- m_shapeType = kstNone;
+ m_tqshapeType = kstNone;
m_name = "";
// m_lineWidth = 1.0f;
@@ -100,7 +100,7 @@ KivioShapeData::KivioShapeData( const KivioShapeData &source )
{
// Allocate a new point list
KivioPoint *pPoint;
- m_pOriginalPointList = new QPtrList<KivioPoint>;
+ m_pOriginalPointList = new TQPtrList<KivioPoint>;
m_pOriginalPointList->setAutoDelete(true);
// Copy over the point list
@@ -119,16 +119,16 @@ KivioShapeData::KivioShapeData( const KivioShapeData &source )
//m_fgColor = source.m_fgColor;
// Copy the rest
- m_shapeType = source.m_shapeType;
- m_name = QString(source.m_name);
+ m_tqshapeType = source.m_tqshapeType;
+ m_name = TQString(source.m_name);
//m_lineWidth = source.m_lineWidth;
// Copy the position and size
source.m_position.copyInto( &m_position );
source.m_dimensions.copyInto( &m_dimensions );
- // If this is a text shape, allocate a text data struct and copy the info
- if( m_shapeType == kstTextBox )
+ // If this is a text tqshape, allocate a text data struct and copy the info
+ if( m_tqshapeType == kstTextBox )
{
m_pTextData = new KivioTextStyle();
@@ -191,7 +191,7 @@ void KivioShapeData::copyInto( KivioShapeData *pTarget ) const
}
// Create a new point list and copy it over
- pTarget->m_pOriginalPointList = new QPtrList<KivioPoint>;
+ pTarget->m_pOriginalPointList = new TQPtrList<KivioPoint>;
pTarget->m_pOriginalPointList->setAutoDelete(true);
pPoint = m_pOriginalPointList->first();
while( pPoint )
@@ -208,8 +208,8 @@ void KivioShapeData::copyInto( KivioShapeData *pTarget ) const
//pTarget->m_fgColor = m_fgColor;
// Copy the rest
- pTarget->m_shapeType = m_shapeType;
- pTarget->m_name = QString(m_name);
+ pTarget->m_tqshapeType = m_tqshapeType;
+ pTarget->m_name = TQString(m_name);
//pTarget->m_lineWidth = m_lineWidth;
m_position.copyInto( &(pTarget->m_position) );
@@ -217,7 +217,7 @@ void KivioShapeData::copyInto( KivioShapeData *pTarget ) const
// If this is a textbox, allocate & copy
- if( m_shapeType == kstTextBox )
+ if( m_tqshapeType == kstTextBox )
{
if( !pTarget->m_pTextData )
{
@@ -233,10 +233,10 @@ void KivioShapeData::copyInto( KivioShapeData *pTarget ) const
kdWarning(43000) << "KivioShapeData::copyInto() - Shape is of type text-box, but our text data doens't exist." << endl;
pTarget->m_pTextData->setText("");
pTarget->m_pTextData->setIsHtml(false);
- pTarget->m_pTextData->setHTextAlign(Qt::AlignHCenter);
- pTarget->m_pTextData->setVTextAlign(Qt::AlignVCenter);
- pTarget->m_pTextData->setFont( QFont("Times",12) );
- pTarget->m_pTextData->setColor( QColor(0,0,0) );
+ pTarget->m_pTextData->setHTextAlign(TQt::AlignHCenter);
+ pTarget->m_pTextData->setVTextAlign(TQt::AlignVCenter);
+ pTarget->m_pTextData->setFont( TQFont("Times",12) );
+ pTarget->m_pTextData->setColor( TQColor(0,0,0) );
}
}
else
@@ -254,21 +254,21 @@ void KivioShapeData::copyInto( KivioShapeData *pTarget ) const
* Load this object from an XML element
*
*/
-bool KivioShapeData::loadXML( const QDomElement &e )
+bool KivioShapeData::loadXML( const TQDomElement &e )
{
- QDomNode node;
- QDomElement ele;
+ TQDomNode node;
+ TQDomElement ele;
// Maintain backwards compatibility with the eariler betas. They saved
// fg color and line style in this node.
- m_pLineStyle->setColor( XmlReadColor( e, "fgColor", QColor(0,0,0) ) );
+ m_pLineStyle->setColor( XmlReadColor( e, "fgColor", TQColor(0,0,0) ) );
m_pLineStyle->setWidth( XmlReadFloat( e, "lineWidth", 1.0f ) );
node = e.firstChild();
while( !node.isNull() )
{
- QString nodeName = node.nodeName();
+ TQString nodeName = node.nodeName();
ele = node.toElement();
if( nodeName == "KivioLineStyle" )
@@ -283,7 +283,7 @@ bool KivioShapeData::loadXML( const QDomElement &e )
{
// First make sure we are a text box
- if( m_shapeType == kstTextBox )
+ if( m_tqshapeType == kstTextBox )
{
// If we don't have text data, allocate it
if( !m_pTextData )
@@ -291,27 +291,27 @@ bool KivioShapeData::loadXML( const QDomElement &e )
m_pTextData->loadXML( ele );
- } // end if m_shapeType==kstTextBox
+ } // end if m_tqshapeType==kstTextBox
}
else if( nodeName == "KivioText" )
{
// First make sure we are a text box
- if( m_shapeType == kstTextBox )
+ if( m_tqshapeType == kstTextBox )
{
KivioTextShapeData *pData = new KivioTextShapeData;
pData->m_text = XmlReadString( ele, "text", "" );
pData->m_isHtml = (bool)XmlReadInt( ele, "isHtml", (int)false );
- pData->m_hTextAlign = XmlReadInt( ele, "hTextAlign", Qt::AlignHCenter );
- pData->m_vTextAlign = XmlReadInt( ele, "vTextAlign", Qt::AlignVCenter );
+ pData->m_hTextAlign = XmlReadInt( ele, "hTextAlign", TQt::AlignHCenter );
+ pData->m_vTextAlign = XmlReadInt( ele, "vTextAlign", TQt::AlignVCenter );
// Search for the font
- QDomNode innerNode = ele.firstChild();
+ TQDomNode innerNode = ele.firstChild();
while( !innerNode.isNull() )
{
- QString innerName = innerNode.nodeName();
- QDomElement innerE = innerNode.toElement();
+ TQString innerName = innerNode.nodeName();
+ TQDomElement innerE = innerNode.toElement();
if( innerName == "TextFont" )
{
@@ -322,7 +322,7 @@ bool KivioShapeData::loadXML( const QDomElement &e )
pData->m_textFont.setUnderline( (bool)XmlReadInt( innerE, "underline", 12 ) );
pData->m_textFont.setStrikeOut( (bool)XmlReadInt( innerE, "strikeOut", 12 ) );
pData->m_textFont.setFixedPitch( (bool)XmlReadInt( innerE, "fixedPitch", false ) );
- pData->m_textColor = XmlReadColor( innerE, "color", QColor(0,0,0) );
+ pData->m_textColor = XmlReadColor( innerE, "color", TQColor(0,0,0) );
}
innerNode = innerNode.nextSibling();
@@ -338,7 +338,7 @@ bool KivioShapeData::loadXML( const QDomElement &e )
m_pTextData->setFont( pData->m_textFont );
m_pTextData->setColor( pData->m_textColor );
- } // end if m_shapeType==kstTextBox
+ } // end if m_tqshapeType==kstTextBox
else
{
kdDebug(43000) << "KivioShapeData::loadXML() - Loading KivioText, but this is not a textbox!" << endl;
@@ -355,51 +355,51 @@ bool KivioShapeData::loadXML( const QDomElement &e )
* Save this object to an XML element
*
*/
-QDomElement KivioShapeData::saveXML( QDomDocument &doc )
+TQDomElement KivioShapeData::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioShapeData");
+ TQDomElement e = doc.createElement("KivioShapeData");
// FIXME: Do we need to save m_pOriginalPointList
// We save all this, but we won't necessarily load it back.
// The positions
- QDomElement posE = doc.createElement("Position");
+ TQDomElement posE = doc.createElement("Position");
XmlWriteFloat( posE, "x", m_position.x() );
XmlWriteFloat( posE, "y", m_position.y() );
e.appendChild( posE );
// The dimensions
- QDomElement dimE = doc.createElement("Dimension");
+ TQDomElement dimE = doc.createElement("Dimension");
XmlWriteFloat( dimE, "w", m_dimensions.x() );
XmlWriteFloat( dimE, "h", m_dimensions.y() );
e.appendChild( dimE );
// The FGColor
-// QDomElement foreE = doc.createElement("Foreground");
+// TQDomElement foreE = doc.createElement("Foreground");
// XmlWriteUInt( foreE, "color", m_fgColor.rgb() );
// XmlWriteFloat( foreE, "lineWidth", m_lineWidth );
// e.appendChild( foreE );
- QDomElement foreE = m_pLineStyle->saveXML( doc );
+ TQDomElement foreE = m_pLineStyle->saveXML( doc );
e.appendChild( foreE );
// Save if we are a text box etc...
- if( m_shapeType == kstTextBox )
+ if( m_tqshapeType == kstTextBox )
{
if( m_pTextData )
{
e.appendChild( m_pTextData->saveXML(doc) );
/*
// The text & formatting
- QDomElement textE = doc.createElement("KivioText");
+ TQDomElement textE = doc.createElement("KivioText");
XmlWriteString( textE, "text", m_pTextData->m_text );
XmlWriteInt( textE, "isHtml", m_pTextData->m_isHtml );
XmlWriteInt( textE, "hTextAlign", m_pTextData->m_hTextAlign );
XmlWriteInt( textE, "vTextAlign", m_pTextData->m_vTextAlign );
// Text font & color
- QDomElement innerTextE = doc.createElement("TextFont");
+ TQDomElement innerTextE = doc.createElement("TextFont");
XmlWriteString( innerTextE, "family", m_pTextData->m_textFont.family() );
XmlWriteColor( innerTextE, "color", m_pTextData->m_textColor );
XmlWriteInt( innerTextE, "size", m_pTextData->m_textFont.pointSize() );
@@ -420,21 +420,21 @@ QDomElement KivioShapeData::saveXML( QDomDocument &doc )
// The BGFillStyle
e.appendChild( m_pFillStyle->saveXML( doc ) );
- // Shape type & name are stored in the shape node
- //XmlWriteInt( e, "shapeType", m_shapeType );
+ // Shape type & name are stored in the tqshape node
+ //XmlWriteInt( e, "tqshapeType", m_tqshapeType );
//XmlWriteString( e, "name", m_name );
return e;
}
-KivioShapeData::KivioShapeType KivioShapeData::shapeTypeFromString( const QString &str )
+KivioShapeData::KivioShapeType KivioShapeData::tqshapeTypeFromString( const TQString &str )
{
for( int i=0; i<numShapeInfo; i++ )
{
- if( str.compare( shapeInfo[i].name )==0 )
- return shapeInfo[i].type;
+ if( str.compare( tqshapeInfo[i].name )==0 )
+ return tqshapeInfo[i].type;
}
return kstNone;
@@ -442,7 +442,7 @@ KivioShapeData::KivioShapeType KivioShapeData::shapeTypeFromString( const QStrin
void KivioShapeData::setShapeType( KivioShapeType st )
{
- m_shapeType = st;
+ m_tqshapeType = st;
// If it is a text box, make sure we have text data
if( st == kstTextBox )
@@ -461,15 +461,15 @@ void KivioShapeData::setShapeType( KivioShapeType st )
}
-QString KivioShapeData::text()
+TQString KivioShapeData::text()
{
if( m_pTextData )
return m_pTextData->text();
- return QString("");
+ return TQString("");
}
-void KivioShapeData::setText( const QString &newText )
+void KivioShapeData::setText( const TQString &newText )
{
if( m_pTextData )
{
@@ -496,7 +496,7 @@ int KivioShapeData::hTextAlign() const
if( m_pTextData )
return m_pTextData->hTextAlign();
- return Qt::AlignHCenter;
+ return TQt::AlignHCenter;
}
void KivioShapeData::setHTextAlign( int i )
@@ -510,7 +510,7 @@ int KivioShapeData::vTextAlign() const
if( m_pTextData )
return m_pTextData->vTextAlign();
- return Qt::AlignVCenter;
+ return TQt::AlignVCenter;
}
void KivioShapeData::setVTextAlign( int i )
@@ -519,29 +519,29 @@ void KivioShapeData::setVTextAlign( int i )
m_pTextData->setVTextAlign(i);
}
-QFont KivioShapeData::textFont()
+TQFont KivioShapeData::textFont()
{
if( m_pTextData )
return m_pTextData->font();
- return QFont("Times");
+ return TQFont("Times");
}
-void KivioShapeData::setTextFont( const QFont &f )
+void KivioShapeData::setTextFont( const TQFont &f )
{
if( m_pTextData )
m_pTextData->setFont(f);
}
-QColor KivioShapeData::textColor()
+TQColor KivioShapeData::textColor()
{
if( m_pTextData )
return m_pTextData->color();
- return QColor(0,0,0);
+ return TQColor(0,0,0);
}
-void KivioShapeData::setTextColor( QColor c )
+void KivioShapeData::setTextColor( TQColor c )
{
if( m_pTextData )
m_pTextData->setColor(c);
diff --git a/kivio/kiviopart/kiviosdk/kivio_shape_data.h b/kivio/kiviopart/kiviosdk/kivio_shape_data.h
index 1c386055..f97e5ec9 100644
--- a/kivio/kiviopart/kiviosdk/kivio_shape_data.h
+++ b/kivio/kiviopart/kiviosdk/kivio_shape_data.h
@@ -19,11 +19,11 @@
#ifndef KIVIO_SHAPE_DATA_H
#define KIVIO_SHAPE_DATA_H
-#include <qfont.h>
-#include <qcolor.h>
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "kivio_point.h"
@@ -36,11 +36,11 @@ class KivioTextShapeData
public:
KivioTextShapeData();
- QString m_text; // The text inside this shape
- QColor m_textColor; // The text color
- QFont m_textFont; // The text font
+ TQString m_text; // The text inside this tqshape
+ TQColor m_textColor; // The text color
+ TQFont m_textFont; // The text font
bool m_isHtml; // Is the text HTML formatted?
- int m_hTextAlign, m_vTextAlign; // Horizontal and vertical text alignment flags
+ int m_hTextAlign, m_vTextAlign; //Qt::Horizontal and vertical text tqalignment flags
};
/**
@@ -52,7 +52,7 @@ class KivioShapeData
{
public:
/**
- * The possible shape types.
+ * The possible tqshape types.
*/
typedef enum {
kstNone = 0,
@@ -73,17 +73,17 @@ public:
protected:
friend class KivioShape;
- QPtrList <KivioPoint> *m_pOriginalPointList; // Original point list loaded from an SML file
+ TQPtrList <KivioPoint> *m_pOriginalPointList; // Original point list loaded from an SML file
- KivioShapeType m_shapeType; // The shape type
+ KivioShapeType m_tqshapeType; // The tqshape type
KivioPoint m_position, m_dimensions; // The position and dimensions
KivioFillStyle *m_pFillStyle; // The fill style
-// QColor m_fgColor; // The foreground color
+// TQColor m_fgColor; // The foreground color
// float m_lineWidth; // The line width
KivioLineStyle *m_pLineStyle;
- QString m_name; // The name of this shape
+ TQString m_name; // The name of this tqshape
KivioTextStyle *m_pTextData; // A pointer to text data (if applicable, e.g. TextBox)
@@ -94,24 +94,24 @@ public:
virtual void copyInto( KivioShapeData *pTarget ) const;
- virtual bool loadXML( const QDomElement & );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual bool loadXML( const TQDomElement & );
+ virtual TQDomElement saveXML( TQDomDocument & );
- KivioShapeType shapeType() const { return m_shapeType; }
+ KivioShapeType tqshapeType() const { return m_tqshapeType; }
void setShapeType( KivioShapeType st );
- static KivioShapeType shapeTypeFromString( const QString & );
+ static KivioShapeType tqshapeTypeFromString( const TQString & );
- QPtrList<KivioPoint> *pointList() { return m_pOriginalPointList; }
+ TQPtrList<KivioPoint> *pointList() { return m_pOriginalPointList; }
KivioFillStyle *fillStyle() const { return m_pFillStyle; }
KivioLineStyle *lineStyle() const { return m_pLineStyle; }
void setLineStyle(KivioLineStyle ls);
- const QString &name() const { return m_name; }
- void setName( const QString &newName ) { m_name=newName; }
+ const TQString &name() const { return m_name; }
+ void setName( const TQString &newName ) { m_name=newName; }
// Dimensions / Position
@@ -126,8 +126,8 @@ public:
// Text functions
- QString text();
- void setText( const QString &newText );
+ TQString text();
+ void setText( const TQString &newText );
bool isHtml() const;
void setIsHtml( bool b );
@@ -138,11 +138,11 @@ public:
int vTextAlign() const;
void setVTextAlign( int i );
- QFont textFont();
- void setTextFont( const QFont &f );
+ TQFont textFont();
+ void setTextFont( const TQFont &f );
- QColor textColor();
- void setTextColor( QColor c );
+ TQColor textColor();
+ void setTextColor( TQColor c );
void setTextStyle( KivioTextStyle * );
};
diff --git a/kivio/kiviopart/kiviosdk/kivio_shape_painter.cpp b/kivio/kiviopart/kiviosdk/kivio_shape_painter.cpp
index f0d446cc..fbdad979 100644
--- a/kivio/kiviopart/kiviosdk/kivio_shape_painter.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_shape_painter.cpp
@@ -8,13 +8,13 @@
#include "kivio_shape_data.h"
#include "kivio_shape_painter.h"
-#include <qcolor.h>
+#include <tqcolor.h>
KivioShapePainter::KivioShapePainter( KivioPainter *p )
{
m_pPainter = p;
- m_fgColor = QColor(255,255,255);
+ m_fgColor = TQColor(255,255,255);
m_lineWidth = 1.0f;
m_pShape = NULL;
@@ -37,9 +37,9 @@ void KivioShapePainter::drawShape( KivioShape *pShape, float x, float y, float w
m_pShape = pShape;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
- switch( pShapeData->shapeType() )
+ switch( pShapeData->tqshapeType() )
{
case KivioShapeData::kstArc:
drawArc();
diff --git a/kivio/kiviopart/kiviosdk/kivio_shape_painter.h b/kivio/kiviopart/kiviosdk/kivio_shape_painter.h
index 5de938a9..a3947e04 100644
--- a/kivio/kiviopart/kiviosdk/kivio_shape_painter.h
+++ b/kivio/kiviopart/kiviosdk/kivio_shape_painter.h
@@ -16,7 +16,7 @@ protected:
KivioFillStyle m_fillStyle;
KivioPainter *m_pPainter;
KivioShape *m_pShape;
- QColor m_fgColor;
+ TQColor m_fgColor;
float m_lineWidth;
float m_x, m_y, m_w, m_h;
@@ -39,8 +39,8 @@ public:
virtual ~KivioShapePainter();
- void setFGColor( const QColor &c ) { m_fgColor = c; }
- void setBGColor( const QColor &c ) { m_fillStyle.setColor(c); }
+ void setFGColor( const TQColor &c ) { m_fgColor = c; }
+ void setBGColor( const TQColor &c ) { m_fillStyle.setColor(c); }
void setLineWidth( const float &f ) { m_lineWidth = f; }
void drawShape( KivioShape *, float, float, float, float );
diff --git a/kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp b/kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp
index b81ce81b..1046e9d8 100644
--- a/kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp
@@ -35,13 +35,13 @@
#include "kivio_stencil_spawner_info.h"
#include "kivio_stencil_spawner_set.h"
-#include <qdom.h>
-#include <qpainter.h>
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qpalette.h>
-#include <qrect.h>
-#include <qbitmap.h>
+#include <tqdom.h>
+#include <tqpainter.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqpalette.h>
+#include <tqrect.h>
+#include <tqbitmap.h>
#include <kdebug.h>
#include <KoGlobal.h>
#include <math.h>
@@ -50,7 +50,7 @@
/**
* Default constructor
*
- * Allocates a new shape list, connector targets, and original connector targets.
+ * Allocates a new tqshape list, connector targets, and original connector targets.
*/
KivioSMLStencil::KivioSMLStencil()
: KivioStencil(),
@@ -58,10 +58,10 @@ KivioSMLStencil::KivioSMLStencil()
m_pSubSelection(NULL),
m_pConnectorTargets(NULL)
{
- m_pShapeList = new QPtrList<KivioShape>;
+ m_pShapeList = new TQPtrList<KivioShape>;
m_pShapeList->setAutoDelete(true);
- m_pConnectorTargets = new QPtrList<KivioConnectorTarget>;
+ m_pConnectorTargets = new TQPtrList<KivioConnectorTarget>;
m_pConnectorTargets->setAutoDelete(true);
}
@@ -86,16 +86,16 @@ KivioSMLStencil::~KivioSMLStencil()
/**
* Loads a KivioSMLStencil from an XML node.
*/
-bool KivioSMLStencil::loadXML( const QDomElement &e )
+bool KivioSMLStencil::loadXML( const TQDomElement &e )
{
- QDomNode node;
- QDomElement ele;
+ TQDomNode node;
+ TQDomElement ele;
node = e.firstChild();
while( !node.isNull() )
{
- QString nodeName = node.nodeName();
+ TQString nodeName = node.nodeName();
ele = node.toElement();
@@ -111,7 +111,7 @@ bool KivioSMLStencil::loadXML( const QDomElement &e )
}
else if( nodeName == "KivioShape" )
{
- // Locate the shape we are supposed to load into
+ // Locate the tqshape we are supposed to load into
KivioShape *pShape = locateShape( XmlReadString( ele, "name", "" ) );
if(pShape) {
@@ -131,11 +131,11 @@ bool KivioSMLStencil::loadXML( const QDomElement &e )
/**
* Help function for loading from an XML node.
*/
-void KivioSMLStencil::loadConnectorTargetListXML( const QDomElement &e )
+void KivioSMLStencil::loadConnectorTargetListXML( const TQDomElement &e )
{
- QDomNode node;
- QDomElement ele;
- QString nodeName;
+ TQDomNode node;
+ TQDomElement ele;
+ TQString nodeName;
KivioConnectorTarget *pTarget;
pTarget = m_pConnectorTargets->first();
@@ -173,9 +173,9 @@ void KivioSMLStencil::loadConnectorTargetListXML( const QDomElement &e )
/**
- * Locates a shape in the shape list by name.
+ * Locates a tqshape in the tqshape list by name.
*/
-KivioShape *KivioSMLStencil::locateShape( const QString &name )
+KivioShape *KivioSMLStencil::locateShape( const TQString &name )
{
KivioShape *pShape;
@@ -185,7 +185,7 @@ KivioShape *KivioSMLStencil::locateShape( const QString &name )
pShape = m_pShapeList->first();
while( pShape )
{
- if( pShape->shapeData()->name() == name )
+ if( pShape->tqshapeData()->name() == name )
{
return pShape;
}
@@ -200,29 +200,29 @@ KivioShape *KivioSMLStencil::locateShape( const QString &name )
/**
* Saves this object to an XMLELement
*/
-QDomElement KivioSMLStencil::saveXML( QDomDocument &doc )
+TQDomElement KivioSMLStencil::saveXML( TQDomDocument &doc )
{
- QDomElement e = doc.createElement("KivioSMLStencil");
+ TQDomElement e = doc.createElement("KivioSMLStencil");
XmlWriteString( e, "id", m_pSpawner->info()->id() );
XmlWriteString( e, "setId", m_pSpawner->set()->id() );
// The positions
- QDomElement posE = doc.createElement("Position");
+ TQDomElement posE = doc.createElement("Position");
XmlWriteFloat( posE, "x", m_x );
XmlWriteFloat( posE, "y", m_y );
e.appendChild( posE );
// The dimensions
- QDomElement dimE = doc.createElement("Dimension");
+ TQDomElement dimE = doc.createElement("Dimension");
XmlWriteFloat( dimE, "w", m_w );
XmlWriteFloat( dimE, "h", m_h );
e.appendChild( dimE );
// Save the target list
- QDomElement clE = doc.createElement("KivioConnectorTargetList");
- QDomElement targetE;
+ TQDomElement clE = doc.createElement("KivioConnectorTargetList");
+ TQDomElement targetE;
KivioConnectorTarget *pTarget = m_pConnectorTargets->first();
while( pTarget )
{
@@ -233,7 +233,7 @@ QDomElement KivioSMLStencil::saveXML( QDomDocument &doc )
}
e.appendChild( clE );
- // The shape list
+ // The tqshape list
KivioShape *pShape = m_pShapeList->first();
while( pShape )
{
@@ -268,7 +268,7 @@ KivioStencil *KivioSMLStencil::duplicate()
pNewStencil->m_pSpawner = m_pSpawner;
- // Copy the shape list
+ // Copy the tqshape list
pShape = m_pShapeList->first();
while( pShape )
{
@@ -313,9 +313,9 @@ void KivioSMLStencil::paintOutline( KivioIntraStencilData *pData )
pShape = m_pShapeList->first();
while( pShape )
{
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
- switch( pShapeData->shapeType() )
+ switch( pShapeData->tqshapeType() )
{
case KivioShapeData::kstArc:
drawOutlineArc( pShape, pData );
@@ -396,7 +396,7 @@ void KivioSMLStencil::drawOutlineArc( KivioShape *pShape, KivioIntraStencilData
KivioPoint *pPosition, *pDimensions;
KivioPoint *pPoint;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
pPosition = pShapeData->position();
pDimensions = pShapeData->dimensions();
@@ -420,18 +420,18 @@ void KivioSMLStencil::drawOutlineArc( KivioShape *pShape, KivioIntraStencilData
void KivioSMLStencil::drawOutlineBezier( KivioShape *pShape, KivioIntraStencilData *pData )
{
KivioPainter *painter;
- KivioShapeData *pShapeData = pShape->shapeData();
+ KivioShapeData *pShapeData = pShape->tqshapeData();
double defWidth = m_pSpawner->defWidth();
double defHeight = m_pSpawner->defHeight();
painter = pData->painter;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
KivioPoint *pPoint, *pPoint2, *pPoint3, *pPoint4;
- QPtrList <KivioPoint> *pPointList = pShapeData->pointList();
- QPointArray controlPoints( 4 );
+ TQPtrList <KivioPoint> *pPointList = pShapeData->pointList();
+ TQPointArray controlPoints( 4 );
pPoint = pPointList->first();
@@ -456,14 +456,14 @@ void KivioSMLStencil::drawOutlineBezier( KivioShape *pShape, KivioIntraStencilDa
void KivioSMLStencil::drawOutlineOpenPath( KivioShape *pShape, KivioIntraStencilData *pData )
{
KivioPainter *painter;
- KivioShapeData *pShapeData = pShape->shapeData();
+ KivioShapeData *pShapeData = pShape->tqshapeData();
KivioPoint *pPoint, *pNewPoint;
double defWidth = m_pSpawner->defWidth();
double defHeight = m_pSpawner->defHeight();
- QPtrList <KivioPoint> *pPointList = pShapeData->pointList();
- QPtrList <KivioPoint> *pNewPoints = new QPtrList<KivioPoint>;
+ TQPtrList <KivioPoint> *pPointList = pShapeData->pointList();
+ TQPtrList <KivioPoint> *pNewPoints = new TQPtrList<KivioPoint>;
pNewPoints->setAutoDelete(true);
pPoint = pPointList->first();
@@ -487,14 +487,14 @@ void KivioSMLStencil::drawOutlineOpenPath( KivioShape *pShape, KivioIntraStencil
void KivioSMLStencil::drawOutlineClosedPath( KivioShape *pShape, KivioIntraStencilData *pData )
{
KivioPainter *painter;
- KivioShapeData *pShapeData = pShape->shapeData();
+ KivioShapeData *pShapeData = pShape->tqshapeData();
KivioPoint *pPoint, *pNewPoint;
double defWidth = m_pSpawner->defWidth();
double defHeight = m_pSpawner->defHeight();
- QPtrList <KivioPoint> *pPointList = pShapeData->pointList();
- QPtrList <KivioPoint> *pNewPoints = new QPtrList<KivioPoint>;
+ TQPtrList <KivioPoint> *pPointList = pShapeData->pointList();
+ TQPtrList <KivioPoint> *pNewPoints = new TQPtrList<KivioPoint>;
pNewPoints->setAutoDelete(true);
pPoint = pPointList->first();
@@ -521,7 +521,7 @@ void KivioSMLStencil::drawOutlineEllipse( KivioShape *pShape, KivioIntraStencilD
KivioShapeData *pShapeData;
KivioPoint *pPosition, *pDimensions;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
pPosition = pShapeData->position();
pDimensions = pShapeData->dimensions();
@@ -535,7 +535,7 @@ void KivioSMLStencil::drawOutlineEllipse( KivioShape *pShape, KivioIntraStencilD
painter = pData->painter;
- painter->setFGColor( QColor(0, 0, 0) );
+ painter->setFGColor( TQColor(0, 0, 0) );
painter->drawEllipse( _x, _y, _w, _h );
}
@@ -544,9 +544,9 @@ void KivioSMLStencil::drawOutlineLineArray( KivioShape *pShape, KivioIntraStenci
double _x, _y, defWidth, defHeight;
KivioPainter *painter;
KivioShapeData *pShapeData;
- QPtrList <KivioPoint> *pList;
+ TQPtrList <KivioPoint> *pList;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
defWidth = m_pSpawner->defWidth();
defHeight = m_pSpawner->defHeight();
@@ -554,7 +554,7 @@ void KivioSMLStencil::drawOutlineLineArray( KivioShape *pShape, KivioIntraStenci
pList = pShapeData->pointList();
- QPointArray arr( pList->count() );
+ TQPointArray arr( pList->count() );
KivioPoint *pPoint;
int i=0;
@@ -582,7 +582,7 @@ void KivioSMLStencil::drawOutlineRectangle( KivioShape *pShape, KivioIntraStenci
KivioShapeData *pShapeData;
KivioPoint *pPosition, *pDimensions;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
pPosition = pShapeData->position();
pDimensions = pShapeData->dimensions();
@@ -595,7 +595,7 @@ void KivioSMLStencil::drawOutlineRectangle( KivioShape *pShape, KivioIntraStenci
_h = m_zoomHandler->zoomItY((pDimensions->y() / defHeight) * m_h) + 1;
painter = pData->painter;
- painter->setFGColor( QColor(0, 0, 0) );
+ painter->setFGColor( TQColor(0, 0, 0) );
painter->drawRect( _x, _y, _w, _h );
}
@@ -606,7 +606,7 @@ void KivioSMLStencil::drawOutlineRoundRectangle( KivioShape *pShape, KivioIntraS
KivioShapeData *pShapeData;
KivioPoint *pPosition, *pDimensions;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
pPosition = pShapeData->position();
pDimensions = pShapeData->dimensions();
@@ -627,7 +627,7 @@ void KivioSMLStencil::drawOutlineRoundRectangle( KivioShape *pShape, KivioIntraS
painter = pData->painter;
- painter->setFGColor( QColor(0, 0, 0) );
+ painter->setFGColor( TQColor(0, 0, 0) );
painter->drawRoundRect( _x, _y, _w, _h, _rx, _ry );
}
@@ -641,9 +641,9 @@ void KivioSMLStencil::drawOutlinePolygon( KivioShape *pShape, KivioIntraStencilD
double _x, _y, defWidth, defHeight;
KivioPainter *painter;
KivioShapeData *pShapeData;
- QPtrList <KivioPoint> *pList;
+ TQPtrList <KivioPoint> *pList;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
defWidth = m_pSpawner->defWidth();
defHeight = m_pSpawner->defHeight();
@@ -651,7 +651,7 @@ void KivioSMLStencil::drawOutlinePolygon( KivioShape *pShape, KivioIntraStencilD
pList = pShapeData->pointList();
- QPointArray arr( pList->count() );
+ TQPointArray arr( pList->count() );
KivioPoint *pPoint;
int i=0;
@@ -677,9 +677,9 @@ void KivioSMLStencil::drawOutlinePolyline( KivioShape *pShape, KivioIntraStencil
double _x, _y, defWidth, defHeight;
KivioPainter *painter;
KivioShapeData *pShapeData;
- QPtrList <KivioPoint> *pList;
+ TQPtrList <KivioPoint> *pList;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
defWidth = m_pSpawner->defWidth();
defHeight = m_pSpawner->defHeight();
@@ -687,7 +687,7 @@ void KivioSMLStencil::drawOutlinePolyline( KivioShape *pShape, KivioIntraStencil
pList = pShapeData->pointList();
- QPointArray arr( pList->count() );
+ TQPointArray arr( pList->count() );
KivioPoint *pPoint;
int i=0;
@@ -714,7 +714,7 @@ void KivioSMLStencil::drawOutlineTextBox( KivioShape *pShape, KivioIntraStencilD
double defWidth = m_pSpawner->defWidth();
double defHeight = m_pSpawner->defHeight();
int _x, _y, _w, _h;
- KivioShapeData *pShapeData = pShape->shapeData();
+ KivioShapeData *pShapeData = pShape->tqshapeData();
KivioPoint *pPosition = pShapeData->position();
KivioPoint *pDimensions = pShapeData->dimensions();
KivioPainter *painter = pData->painter;
@@ -731,19 +731,19 @@ void KivioSMLStencil::drawOutlineTextBox( KivioShape *pShape, KivioIntraStencilD
_h = zoomHandler->zoomItY((pDimensions->y() / defHeight) * m_h) + 1;
- QPixmap pix(_w, _h);
+ TQPixmap pix(_w, _h);
pix.fill();
- QPainter p(&pix);
+ TQPainter p(&pix);
- QFont f = pShapeData->textFont();
+ TQFont f = pShapeData->textFont();
f.setPointSizeFloat(f.pointSizeFloat() * (((float)zoomHandler->zoom()) / 100.0));
p.setFont( f );
- p.setPen( QColor(0, 0, 0) );
+ p.setPen( TQColor(0, 0, 0) );
int tf = pShapeData->vTextAlign() | pShapeData->hTextAlign();
- p.drawText( 0, 0, _w, _h, tf | Qt::WordBreak, pShapeData->text() );
- QBitmap mask;
- mask = pix;
- pix.setMask(mask);
+ p.drawText( 0, 0, _w, _h, tf | TQt::WordBreak, pShapeData->text() );
+ TQBitmap tqmask;
+ tqmask = pix;
+ pix.setMask(tqmask);
painter->drawPixmap(_x, _y, pix);
}
@@ -765,9 +765,9 @@ void KivioSMLStencil::paint( KivioIntraStencilData *pData )
pShape = m_pShapeList->first();
while( pShape )
{
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
- switch( pShapeData->shapeType() )
+ switch( pShapeData->tqshapeType() )
{
case KivioShapeData::kstArc:
drawArc( pShape, pData );
@@ -839,7 +839,7 @@ void KivioSMLStencil::paintConnectorTargets( KivioIntraStencilData *pData )
// return;
//}
- QPixmap targetPic;
+ TQPixmap targetPic;
KivioPainter *painter;
int x, y;
@@ -873,7 +873,7 @@ void KivioSMLStencil::drawArc( KivioShape *pShape, KivioIntraStencilData *pData
KivioPoint *pPosition, *pDimensions;
KivioPoint *pPoint;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
pPosition = pShapeData->position();
pDimensions = pShapeData->dimensions();
@@ -915,18 +915,18 @@ void KivioSMLStencil::drawArc( KivioShape *pShape, KivioIntraStencilData *pData
void KivioSMLStencil::drawBezier( KivioShape *pShape, KivioIntraStencilData *pData )
{
KivioPainter *painter;
- KivioShapeData *pShapeData = pShape->shapeData();
+ KivioShapeData *pShapeData = pShape->tqshapeData();
double defWidth = m_pSpawner->defWidth();
double defHeight = m_pSpawner->defHeight();
painter = pData->painter;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
KivioPoint *pPoint, *pPoint2, *pPoint3, *pPoint4;
- QPtrList <KivioPoint> *pPointList = pShapeData->pointList();
- QPointArray controlPoints( 4 );
+ TQPtrList <KivioPoint> *pPointList = pShapeData->pointList();
+ TQPointArray controlPoints( 4 );
pPoint = pPointList->first();
@@ -954,14 +954,14 @@ void KivioSMLStencil::drawBezier( KivioShape *pShape, KivioIntraStencilData *pDa
void KivioSMLStencil::drawOpenPath( KivioShape *pShape, KivioIntraStencilData *pData )
{
KivioPainter *painter;
- KivioShapeData *pShapeData = pShape->shapeData();
+ KivioShapeData *pShapeData = pShape->tqshapeData();
KivioPoint *pPoint, *pNewPoint;
double defWidth = m_pSpawner->defWidth();
double defHeight = m_pSpawner->defHeight();
- QPtrList <KivioPoint> *pPointList = pShapeData->pointList();
- QPtrList <KivioPoint> *pNewPoints = new QPtrList<KivioPoint>;
+ TQPtrList <KivioPoint> *pPointList = pShapeData->pointList();
+ TQPtrList <KivioPoint> *pNewPoints = new TQPtrList<KivioPoint>;
pNewPoints->setAutoDelete(true);
pPoint = pPointList->first();
@@ -988,14 +988,14 @@ void KivioSMLStencil::drawOpenPath( KivioShape *pShape, KivioIntraStencilData *p
void KivioSMLStencil::drawClosedPath( KivioShape *pShape, KivioIntraStencilData *pData )
{
KivioPainter *painter;
- KivioShapeData *pShapeData = pShape->shapeData();
+ KivioShapeData *pShapeData = pShape->tqshapeData();
KivioPoint *pPoint, *pNewPoint;
double defWidth = m_pSpawner->defWidth();
double defHeight = m_pSpawner->defHeight();
- QPtrList <KivioPoint> *pPointList = pShapeData->pointList();
- QPtrList <KivioPoint> *pNewPoints = new QPtrList<KivioPoint>;
+ TQPtrList <KivioPoint> *pPointList = pShapeData->pointList();
+ TQPtrList <KivioPoint> *pNewPoints = new TQPtrList<KivioPoint>;
pNewPoints->setAutoDelete(true);
pPoint = pPointList->first();
@@ -1046,7 +1046,7 @@ void KivioSMLStencil::drawEllipse( KivioShape *pShape, KivioIntraStencilData *pD
KivioShapeData *pShapeData;
KivioPoint *pPosition, *pDimensions;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
pPosition = pShapeData->position();
pDimensions = pShapeData->dimensions();
@@ -1087,9 +1087,9 @@ void KivioSMLStencil::drawLineArray( KivioShape *pShape, KivioIntraStencilData *
int _x, _y;
KivioPainter *painter;
KivioShapeData *pShapeData;
- QPtrList <KivioPoint> *pList;
+ TQPtrList <KivioPoint> *pList;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
defWidth = m_pSpawner->defWidth();
defHeight = m_pSpawner->defHeight();
@@ -1097,7 +1097,7 @@ void KivioSMLStencil::drawLineArray( KivioShape *pShape, KivioIntraStencilData *
pList = pShapeData->pointList();
- QPointArray arr( pList->count() );
+ TQPointArray arr( pList->count() );
KivioPoint *pPoint;
int i=0;
@@ -1130,7 +1130,7 @@ void KivioSMLStencil::drawRectangle( KivioShape *pShape, KivioIntraStencilData *
KivioShapeData *pShapeData;
KivioPoint *pPosition, *pDimensions;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
pPosition = pShapeData->position();
pDimensions = pShapeData->dimensions();
@@ -1174,7 +1174,7 @@ void KivioSMLStencil::drawRoundRectangle( KivioShape *pShape, KivioIntraStencilD
KivioPoint *pPosition, *pDimensions;
KivioPoint *pPoint;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
pPosition = pShapeData->position();
pDimensions = pShapeData->dimensions();
@@ -1219,9 +1219,9 @@ void KivioSMLStencil::drawPolygon( KivioShape *pShape, KivioIntraStencilData *pD
int _x, _y;
KivioPainter *painter;
KivioShapeData *pShapeData;
- QPtrList <KivioPoint> *pList;
+ TQPtrList <KivioPoint> *pList;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
defWidth = m_pSpawner->defWidth();
defHeight = m_pSpawner->defHeight();
@@ -1229,7 +1229,7 @@ void KivioSMLStencil::drawPolygon( KivioShape *pShape, KivioIntraStencilData *pD
pList = pShapeData->pointList();
- QPointArray arr( pList->count() );
+ TQPointArray arr( pList->count() );
KivioPoint *pPoint;
@@ -1278,9 +1278,9 @@ void KivioSMLStencil::drawPolyline( KivioShape *pShape, KivioIntraStencilData *p
int _x, _y;
KivioPainter *painter;
KivioShapeData *pShapeData;
- QPtrList <KivioPoint> *pList;
+ TQPtrList <KivioPoint> *pList;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
defWidth = m_pSpawner->defWidth();
defHeight = m_pSpawner->defHeight();
@@ -1288,7 +1288,7 @@ void KivioSMLStencil::drawPolyline( KivioShape *pShape, KivioIntraStencilData *p
pList = pShapeData->pointList();
- QPointArray arr( pList->count() );
+ TQPointArray arr( pList->count() );
KivioPoint *pPoint;
int i=0;
@@ -1317,7 +1317,7 @@ void KivioSMLStencil::drawTextBox( KivioShape *pShape, KivioIntraStencilData *pD
{
double defWidth = m_pSpawner->defWidth();
double defHeight = m_pSpawner->defHeight();
- KivioShapeData *pShapeData = pShape->shapeData();
+ KivioShapeData *pShapeData = pShape->tqshapeData();
KivioPoint *pPosition = pShapeData->position();
KivioPoint *pDimensions = pShapeData->dimensions();
KivioPainter *painter = pData->painter;
@@ -1334,13 +1334,13 @@ void KivioSMLStencil::drawTextBox( KivioShape *pShape, KivioIntraStencilData *pD
int _h = zoomHandler->zoomItY((pDimensions->y() / defHeight) * m_h) + 1;
- QFont f = pShapeData->textFont();
+ TQFont f = pShapeData->textFont();
f.setPointSizeFloat(f.pointSizeFloat() * (((float)zoomHandler->zoom()) / 100.0));
painter->setFont( f );
painter->setTextColor( pShapeData->textColor() );
int tf = pShapeData->vTextAlign() | pShapeData->hTextAlign();
- painter->drawText( _x, _y, _w, _h, tf | Qt::WordBreak, pShapeData->text() );
+ painter->drawText( _x, _y, _w, _h, tf | TQt::WordBreak, pShapeData->text() );
// TODO Implement richtext support
}
@@ -1350,7 +1350,7 @@ void KivioSMLStencil::drawTextBox( KivioShape *pShape, KivioIntraStencilData *pD
/**
* Set the fg color of this stencil.
*/
-void KivioSMLStencil::setFGColor( QColor c )
+void KivioSMLStencil::setFGColor( TQColor c )
{
KivioShape *pShape;
@@ -1358,7 +1358,7 @@ void KivioSMLStencil::setFGColor( QColor c )
pShape = m_pShapeList->first();
while( pShape )
{
- pShape->shapeData()->lineStyle()->setColor( c );
+ pShape->tqshapeData()->lineStyle()->setColor( c );
pShape = m_pShapeList->next();
}
@@ -1368,14 +1368,14 @@ void KivioSMLStencil::setFGColor( QColor c )
/**
* Set the bg color of this stencil.
*/
-void KivioSMLStencil::setBGColor( QColor c )
+void KivioSMLStencil::setBGColor( TQColor c )
{
KivioShape *pShape;
pShape = m_pShapeList->first();
while( pShape )
{
- pShape->shapeData()->fillStyle()->setColor( c );
+ pShape->tqshapeData()->fillStyle()->setColor( c );
pShape = m_pShapeList->next();
}
@@ -1388,7 +1388,7 @@ void KivioSMLStencil::setFillPattern(int p)
pShape = m_pShapeList->first();
while( pShape )
{
- pShape->shapeData()->fillStyle()->setBrushStyle( static_cast<Qt::BrushStyle>(p) );
+ pShape->tqshapeData()->fillStyle()->setBrushStyle( static_cast<Qt::BrushStyle>(p) );
pShape = m_pShapeList->next();
}
@@ -1397,7 +1397,7 @@ void KivioSMLStencil::setFillPattern(int p)
/**
* Set the text color of this stencil.
*/
-void KivioSMLStencil::setTextColor( QColor c )
+void KivioSMLStencil::setTextColor( TQColor c )
{
KivioShape *pShape;
@@ -1405,7 +1405,7 @@ void KivioSMLStencil::setTextColor( QColor c )
pShape = m_pShapeList->first();
while( pShape )
{
- pShape->shapeData()->setTextColor( c );
+ pShape->tqshapeData()->setTextColor( c );
pShape = m_pShapeList->next();
}
@@ -1414,7 +1414,7 @@ void KivioSMLStencil::setTextColor( QColor c )
/**
* Set the text font of this stencil
*/
-void KivioSMLStencil::setTextFont( const QFont &f )
+void KivioSMLStencil::setTextFont( const TQFont &f )
{
KivioShape *pShape;
@@ -1422,7 +1422,7 @@ void KivioSMLStencil::setTextFont( const QFont &f )
pShape = m_pShapeList->first();
while( pShape )
{
- pShape->shapeData()->setTextFont( f );
+ pShape->tqshapeData()->setTextFont( f );
pShape = m_pShapeList->next();
}
@@ -1439,7 +1439,7 @@ void KivioSMLStencil::setLineWidth( double f )
pShape = m_pShapeList->first();
while( pShape )
{
- pShape->shapeData()->lineStyle()->setWidth( f );
+ pShape->tqshapeData()->lineStyle()->setWidth( f );
pShape = m_pShapeList->next();
}
@@ -1451,7 +1451,7 @@ void KivioSMLStencil::setLinePattern(int p)
while( pShape )
{
- pShape->shapeData()->lineStyle()->setStyle( p );
+ pShape->tqshapeData()->lineStyle()->setStyle( p );
pShape = m_pShapeList->next();
}
}
@@ -1550,7 +1550,7 @@ KivioConnectorTarget *KivioSMLStencil::connectToTarget( KivioConnectorPoint *p,
/**
- * Updates the geometry of this stencil.
+ * Updates the tqgeometry of this stencil.
*
* This function rearranges the KivioConnectorTargets to reflect
* that of the width/height/position.
@@ -1559,7 +1559,7 @@ void KivioSMLStencil::updateGeometry()
{
//kdDebug(43000) << "m_x = " << m_x << " m_y = " << m_y << endl;
- QWMatrix m;
+ TQWMatrix m;
m.translate(m_x, m_y);
m.translate(m_w / 2.0, m_h / 2.0);
m.rotate(m_rotation);
@@ -1583,41 +1583,41 @@ void KivioSMLStencil::updateGeometry()
/**
* Gets the font of this stencil
*/
-QFont KivioSMLStencil::textFont()
+TQFont KivioSMLStencil::textFont()
{
KivioShape *pShape;
pShape = m_pShapeList->first();
while( pShape )
{
- if( pShape->shapeData()->shapeType() == KivioShapeData::kstTextBox )
+ if( pShape->tqshapeData()->tqshapeType() == KivioShapeData::kstTextBox )
{
- return pShape->shapeData()->textFont();
+ return pShape->tqshapeData()->textFont();
}
pShape = m_pShapeList->next();
}
- //return QFont("times",12);
+ //return TQFont("times",12);
return KoGlobal::defaultFont();
}
-QColor KivioSMLStencil::textColor()
+TQColor KivioSMLStencil::textColor()
{
KivioShape *pShape;
pShape = m_pShapeList->first();
while( pShape )
{
- if( pShape->shapeData()->shapeType() == KivioShapeData::kstTextBox )
+ if( pShape->tqshapeData()->tqshapeType() == KivioShapeData::kstTextBox )
{
- return pShape->shapeData()->textColor();
+ return pShape->tqshapeData()->textColor();
}
pShape = m_pShapeList->next();
}
- return QColor(0, 0, 0);
+ return TQColor(0, 0, 0);
}
/**
@@ -1631,8 +1631,8 @@ void KivioSMLStencil::setHTextAlign(int i)
pShape = m_pShapeList->first();
while( pShape )
{
- if( pShape->shapeData()->shapeType() == KivioShapeData::kstTextBox )
- pShape->shapeData()->setHTextAlign( i );
+ if( pShape->tqshapeData()->tqshapeType() == KivioShapeData::kstTextBox )
+ pShape->tqshapeData()->setHTextAlign( i );
pShape = m_pShapeList->next();
}
@@ -1640,7 +1640,7 @@ void KivioSMLStencil::setHTextAlign(int i)
/**
- * Set the vertical alignment of this stencil
+ * Set the vertical tqalignment of this stencil
*/
void KivioSMLStencil::setVTextAlign(int i)
{
@@ -1650,8 +1650,8 @@ void KivioSMLStencil::setVTextAlign(int i)
pShape = m_pShapeList->first();
while( pShape )
{
- if( pShape->shapeData()->shapeType() == KivioShapeData::kstTextBox )
- pShape->shapeData()->setVTextAlign( i );
+ if( pShape->tqshapeData()->tqshapeType() == KivioShapeData::kstTextBox )
+ pShape->tqshapeData()->setVTextAlign( i );
pShape = m_pShapeList->next();
}
@@ -1659,7 +1659,7 @@ void KivioSMLStencil::setVTextAlign(int i)
/**
- * Get the horizontal alignment of this stencil.
+ * Get the horizontal tqalignment of this stencil.
*/
int KivioSMLStencil::hTextAlign()
{
@@ -1668,9 +1668,9 @@ int KivioSMLStencil::hTextAlign()
pShape = m_pShapeList->first();
while( pShape )
{
- if( pShape->shapeData()->shapeType() == KivioShapeData::kstTextBox )
+ if( pShape->tqshapeData()->tqshapeType() == KivioShapeData::kstTextBox )
{
- return pShape->shapeData()->hTextAlign();
+ return pShape->tqshapeData()->hTextAlign();
}
pShape = m_pShapeList->next();
@@ -1681,7 +1681,7 @@ int KivioSMLStencil::hTextAlign()
/**
- * Get the vertical text alignment of this stencil.
+ * Get the vertical text tqalignment of this stencil.
*/
int KivioSMLStencil::vTextAlign()
{
@@ -1690,9 +1690,9 @@ int KivioSMLStencil::vTextAlign()
pShape = m_pShapeList->first();
while( pShape )
{
- if( pShape->shapeData()->shapeType() == KivioShapeData::kstTextBox )
+ if( pShape->tqshapeData()->tqshapeType() == KivioShapeData::kstTextBox )
{
- return pShape->shapeData()->vTextAlign();
+ return pShape->tqshapeData()->vTextAlign();
}
pShape = m_pShapeList->next();
@@ -1705,38 +1705,38 @@ int KivioSMLStencil::vTextAlign()
/**
* Get the text of this stencil
*/
-QString KivioSMLStencil::text()
+TQString KivioSMLStencil::text()
{
KivioShape *pShape;
pShape = m_pShapeList->first();
while( pShape )
{
- if( pShape->shapeData()->shapeType() == KivioShapeData::kstTextBox )
+ if( pShape->tqshapeData()->tqshapeType() == KivioShapeData::kstTextBox )
{
- return pShape->shapeData()->text();
+ return pShape->tqshapeData()->text();
}
pShape = m_pShapeList->next();
}
- return QString("");
+ return TQString("");
}
/**
* Set the text of this stencil
*/
-void KivioSMLStencil::setText( const QString &t )
+void KivioSMLStencil::setText( const TQString &t )
{
KivioShape *pShape;
pShape = m_pShapeList->first();
while( pShape )
{
- if( pShape->shapeData()->shapeType() == KivioShapeData::kstTextBox )
+ if( pShape->tqshapeData()->tqshapeType() == KivioShapeData::kstTextBox )
{
- pShape->shapeData()->setText(t);
+ pShape->tqshapeData()->setText(t);
}
pShape = m_pShapeList->next();
@@ -1753,7 +1753,7 @@ double KivioSMLStencil::lineWidth()
pShape = m_pShapeList->first();
if( pShape )
- return pShape->shapeData()->lineStyle()->width();
+ return pShape->tqshapeData()->lineStyle()->width();
return 1.0f;
}
@@ -1763,7 +1763,7 @@ int KivioSMLStencil::linePattern()
KivioShape *pShape = m_pShapeList->first();
if( pShape )
- return pShape->shapeData()->lineStyle()->style();
+ return pShape->tqshapeData()->lineStyle()->style();
return 1;
}
@@ -1771,30 +1771,30 @@ int KivioSMLStencil::linePattern()
/**
* Get the Fg color of a stencil
*/
-QColor KivioSMLStencil::fgColor()
+TQColor KivioSMLStencil::fgColor()
{
KivioShape *pShape;
pShape = m_pShapeList->first();
if( pShape )
- return pShape->shapeData()->lineStyle()->color();
+ return pShape->tqshapeData()->lineStyle()->color();
- return QColor(0,0,0);
+ return TQColor(0,0,0);
}
/**
* Get the bg color of this stencil.
*/
-QColor KivioSMLStencil::bgColor()
+TQColor KivioSMLStencil::bgColor()
{
KivioShape *pShape;
pShape = m_pShapeList->first();
if( pShape )
- return pShape->shapeData()->fillStyle()->color();
+ return pShape->tqshapeData()->fillStyle()->color();
- return QColor(0,0,0);
+ return TQColor(0,0,0);
}
int KivioSMLStencil::fillPattern()
@@ -1803,7 +1803,7 @@ int KivioSMLStencil::fillPattern()
pShape = m_pShapeList->first();
if( pShape )
- return pShape->shapeData()->fillStyle()->brushStyle();
+ return pShape->tqshapeData()->fillStyle()->brushStyle();
return 1;
}
@@ -1847,7 +1847,7 @@ KivioCollisionType KivioSMLStencil::checkForCollision( KoPoint *pPoint, double )
{
KivioCollisionType type = kctNone;
- QWMatrix m;
+ TQWMatrix m;
m.translate(m_x, m_y);
m.translate(m_w / 2.0, m_h / 2.0);
m.rotate(m_rotation);
@@ -1920,10 +1920,10 @@ bool KivioSMLStencil::checkCollisionPolygon( KivioShape *pShape, KoPoint *pCheck
{
double _x, _y, defWidth, defHeight;
KivioShapeData *pShapeData;
- QPtrList<KivioPoint> *pList;
+ TQPtrList<KivioPoint> *pList;
KoPoint *pPoints;
- pShapeData = pShape->shapeData();
+ pShapeData = pShape->tqshapeData();
defWidth = m_pSpawner->defWidth();
defHeight = m_pSpawner->defHeight();
@@ -1976,24 +1976,24 @@ bool KivioSMLStencil::checkCollisionTextBox( KivioShape *, KoPoint * )
int KivioSMLStencil::resizeHandlePositions()
{
// Calculate the resize handle positions
- int mask = KIVIO_RESIZE_HANDLE_POSITION_ALL;
+ int tqmask = KIVIO_RESIZE_HANDLE_POSITION_ALL;
if( m_pProtection->at( kpWidth ) )
{
- mask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpE | krhpW);
+ tqmask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpE | krhpW);
}
if( m_pProtection->at( kpHeight ) )
{
- mask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpN | krhpS);
+ tqmask &= ~(krhpNE | krhpNW | krhpSW | krhpSE | krhpN | krhpS);
}
if( m_pProtection->at( kpAspect ) )
{
- mask = KIVIO_RESIZE_HANDLE_POSITION_CORNERS;
+ tqmask = KIVIO_RESIZE_HANDLE_POSITION_CORNERS;
}
- return mask;
+ return tqmask;
}
KivioLineStyle KivioSMLStencil::lineStyle()
@@ -2001,7 +2001,7 @@ KivioLineStyle KivioSMLStencil::lineStyle()
KivioShape *pShape = m_pShapeList->first();
if( pShape )
- return *(pShape->shapeData()->lineStyle());
+ return *(pShape->tqshapeData()->lineStyle());
return KivioLineStyle();
}
@@ -2012,19 +2012,19 @@ void KivioSMLStencil::setLineStyle(KivioLineStyle ls)
while( pShape )
{
- pShape->shapeData()->setLineStyle(ls);;
+ pShape->tqshapeData()->setLineStyle(ls);;
pShape = m_pShapeList->next();
}
}
-QString KivioSMLStencil::getTextBoxName(const KoPoint& p)
+TQString KivioSMLStencil::getTextBoxName(const KoPoint& p)
{
KivioShape* pShape = m_pShapeList->first();
KivioShape* first = 0;
KoPoint pos = p;
// Calculate the rotation...
- QWMatrix m;
+ TQWMatrix m;
m.translate(m_x, m_y);
m.translate(m_w / 2.0, m_h / 2.0);
m.rotate(m_rotation);
@@ -2032,12 +2032,12 @@ QString KivioSMLStencil::getTextBoxName(const KoPoint& p)
while(pShape)
{
- if(pShape->shapeData()->shapeType() == KivioShapeData::kstTextBox)
+ if(pShape->tqshapeData()->tqshapeType() == KivioShapeData::kstTextBox)
{
- double x = pShape->shapeData()->x();
- double y = pShape->shapeData()->y();
- double x2 = pShape->shapeData()->w() + x;
- double y2 = pShape->shapeData()->h() + y;
+ double x = pShape->tqshapeData()->x();
+ double y = pShape->tqshapeData()->y();
+ double x2 = pShape->tqshapeData()->w() + x;
+ double y2 = pShape->tqshapeData()->h() + y;
// Create the rotated rectangle
KoPoint pPoints[4];
@@ -2051,7 +2051,7 @@ QString KivioSMLStencil::getTextBoxName(const KoPoint& p)
pPoints[3].setY(x * m.m12() + y2 * m.m22() + m.dy());
if(PointInPoly(pPoints, 4, &pos)) {
- return pShape->shapeData()->name();
+ return pShape->tqshapeData()->name();
}
if(!first) {
@@ -2063,21 +2063,21 @@ QString KivioSMLStencil::getTextBoxName(const KoPoint& p)
}
if(first) {
- return first->shapeData()->name();
+ return first->tqshapeData()->name();
}
- return QString::null;
+ return TQString();
}
-void KivioSMLStencil::setText(const QString& text, const QString& name)
+void KivioSMLStencil::setText(const TQString& text, const TQString& name)
{
KivioShape* pShape = m_pShapeList->first();
while(pShape)
{
- if(pShape->shapeData()->name() == name)
+ if(pShape->tqshapeData()->name() == name)
{
- pShape->shapeData()->setText(text);
+ pShape->tqshapeData()->setText(text);
return;
}
@@ -2085,21 +2085,21 @@ void KivioSMLStencil::setText(const QString& text, const QString& name)
}
}
-QString KivioSMLStencil::text(const QString& name)
+TQString KivioSMLStencil::text(const TQString& name)
{
KivioShape* pShape = m_pShapeList->first();
while(pShape)
{
- if(pShape->shapeData()->name() == name)
+ if(pShape->tqshapeData()->name() == name)
{
- return pShape->shapeData()->text();
+ return pShape->tqshapeData()->text();
}
pShape = m_pShapeList->next();
}
- return QString::null;
+ return TQString();
}
void KivioSMLStencil::addConnectorTarget(const KoPoint& p)
@@ -2128,7 +2128,7 @@ bool KivioSMLStencil::hasTextBox() const
{
KivioShape* pShape = m_pShapeList->first();
while(pShape) {
- if(pShape->shapeData()->shapeType() == KivioShapeData::kstTextBox) {
+ if(pShape->tqshapeData()->tqshapeType() == KivioShapeData::kstTextBox) {
return true;
}
@@ -2138,91 +2138,91 @@ bool KivioSMLStencil::hasTextBox() const
return false;
}
-QColor KivioSMLStencil::textColor(const QString& textBoxName)
+TQColor KivioSMLStencil::textColor(const TQString& textBoxName)
{
- KivioShape* shape = locateShape(textBoxName);
+ KivioShape* tqshape = locateShape(textBoxName);
- if(!shape)
+ if(!tqshape)
return textColor();
- return shape->shapeData()->textColor();
+ return tqshape->tqshapeData()->textColor();
}
-void KivioSMLStencil::setTextColor(const QString& textBoxName, const QColor& color)
+void KivioSMLStencil::setTextColor(const TQString& textBoxName, const TQColor& color)
{
- KivioShape* shape = locateShape(textBoxName);
+ KivioShape* tqshape = locateShape(textBoxName);
- // If we didn't find the shape set the color stencil wide
- if(!shape) {
+ // If we didn't find the tqshape set the color stencil wide
+ if(!tqshape) {
setTextColor(color);
return;
}
- shape->shapeData()->setTextColor(color);
+ tqshape->tqshapeData()->setTextColor(color);
}
-QFont KivioSMLStencil::textFont(const QString& textBoxName)
+TQFont KivioSMLStencil::textFont(const TQString& textBoxName)
{
- KivioShape* shape = locateShape(textBoxName);
+ KivioShape* tqshape = locateShape(textBoxName);
- if(!shape)
+ if(!tqshape)
return textFont();
- return shape->shapeData()->textFont();
+ return tqshape->tqshapeData()->textFont();
}
-void KivioSMLStencil::setTextFont(const QString& textBoxName, const QFont& font)
+void KivioSMLStencil::setTextFont(const TQString& textBoxName, const TQFont& font)
{
- KivioShape* shape = locateShape(textBoxName);
+ KivioShape* tqshape = locateShape(textBoxName);
- if(!shape) {
+ if(!tqshape) {
setTextFont(font);
return;
}
- shape->shapeData()->setTextFont(font);
+ tqshape->tqshapeData()->setTextFont(font);
}
-int KivioSMLStencil::hTextAlign(const QString& textBoxName)
+int KivioSMLStencil::hTextAlign(const TQString& textBoxName)
{
- KivioShape* shape = locateShape(textBoxName);
+ KivioShape* tqshape = locateShape(textBoxName);
- if(!shape)
+ if(!tqshape)
return hTextAlign();
- return shape->shapeData()->hTextAlign();
+ return tqshape->tqshapeData()->hTextAlign();
}
-int KivioSMLStencil::vTextAlign(const QString& textBoxName)
+int KivioSMLStencil::vTextAlign(const TQString& textBoxName)
{
- KivioShape* shape = locateShape(textBoxName);
+ KivioShape* tqshape = locateShape(textBoxName);
- if(!shape)
+ if(!tqshape)
return vTextAlign();
- return shape->shapeData()->vTextAlign();
+ return tqshape->tqshapeData()->vTextAlign();
}
-void KivioSMLStencil::setHTextAlign(const QString& textBoxName, int align)
+void KivioSMLStencil::setHTextAlign(const TQString& textBoxName, int align)
{
- KivioShape* shape = locateShape(textBoxName);
+ KivioShape* tqshape = locateShape(textBoxName);
- if(!shape) {
+ if(!tqshape) {
setHTextAlign(align);
return;
}
- shape->shapeData()->setHTextAlign(align);
+ tqshape->tqshapeData()->setHTextAlign(align);
}
-void KivioSMLStencil::setVTextAlign(const QString& textBoxName, int align)
+void KivioSMLStencil::setVTextAlign(const TQString& textBoxName, int align)
{
- KivioShape* shape = locateShape(textBoxName);
+ KivioShape* tqshape = locateShape(textBoxName);
- if(!shape) {
+ if(!tqshape) {
setVTextAlign(align);
return;
}
- shape->shapeData()->setVTextAlign(align);
+ tqshape->tqshapeData()->setVTextAlign(align);
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_sml_stencil.h b/kivio/kiviopart/kiviosdk/kivio_sml_stencil.h
index 240c99f6..30e53e93 100644
--- a/kivio/kiviopart/kiviosdk/kivio_sml_stencil.h
+++ b/kivio/kiviopart/kiviosdk/kivio_sml_stencil.h
@@ -20,11 +20,11 @@
#ifndef KIVIO_SML_STENCIL_H
#define KIVIO_SML_STENCIL_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "kivio_stencil.h"
-class QDomElement;
-class QColor;
+class TQDomElement;
+class TQColor;
class KivioConnectorTarget;
class KivioFillStyle;
class KivioIntraStencilData;
@@ -38,9 +38,9 @@ class KivioSMLStencil : public KivioStencil
protected:
friend class KivioSMLStencilSpawner;
- QPtrList<KivioShape> *m_pShapeList;
+ TQPtrList<KivioShape> *m_pShapeList;
KivioShape *m_pSubSelection;
- QPtrList<KivioConnectorTarget> *m_pConnectorTargets;
+ TQPtrList<KivioConnectorTarget> *m_pConnectorTargets;
// Offsets and scale which get reused in between
// various drawing routines. To save time and
@@ -90,18 +90,18 @@ protected:
bool checkCollisionTextBox( KivioShape *, KoPoint * );
- KivioShape *locateShape( const QString & );
- void loadConnectorTargetListXML( const QDomElement & );
+ KivioShape *locateShape( const TQString & );
+ void loadConnectorTargetListXML( const TQDomElement & );
public:
KivioSMLStencil();
virtual ~KivioSMLStencil();
- virtual bool loadXML( const QDomElement & );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual bool loadXML( const TQDomElement & );
+ virtual TQDomElement saveXML( TQDomDocument & );
- virtual QPtrList<KivioShape> *shapeList() { return m_pShapeList; }
+ virtual TQPtrList<KivioShape> *tqshapeList() { return m_pShapeList; }
virtual KivioShape *subSelection() { return m_pSubSelection; }
virtual void paintOutline( KivioIntraStencilData * );
@@ -110,10 +110,10 @@ public:
virtual KivioStencil *duplicate();
- virtual QColor fgColor();
- virtual QColor bgColor();
- virtual void setFGColor(QColor);
- virtual void setBGColor(QColor);
+ virtual TQColor fgColor();
+ virtual TQColor bgColor();
+ virtual void setFGColor(TQColor);
+ virtual void setBGColor(TQColor);
virtual void setLineWidth(double);
virtual double lineWidth();
virtual void setLinePattern(int p);
@@ -121,8 +121,8 @@ public:
virtual void setFillPattern(int p);
virtual int fillPattern();
- virtual void setTextColor( QColor );
- virtual void setTextFont( const QFont & );
+ virtual void setTextColor( TQColor );
+ virtual void setTextFont( const TQFont & );
virtual void setHTextAlign(int);
virtual void setVTextAlign(int);
@@ -130,11 +130,11 @@ public:
virtual int hTextAlign();
virtual int vTextAlign();
- virtual QString text();
- virtual void setText( const QString & );
+ virtual TQString text();
+ virtual void setText( const TQString & );
- virtual QFont textFont();
- virtual QColor textColor();
+ virtual TQFont textFont();
+ virtual TQColor textColor();
virtual KivioCollisionType checkForCollision( KoPoint *, double );
@@ -154,29 +154,29 @@ public:
/**
Returns the name of the text box that is at @param p.
- If there exist no text box at @param p then it returns QString::null.
+ If there exist no text box at @param p then it returns TQString().
*/
- virtual QString getTextBoxName(const KoPoint& p);
+ virtual TQString getTextBoxName(const KoPoint& p);
- virtual void setText(const QString& text, const QString& name);
- virtual QString text(const QString& name);
+ virtual void setText(const TQString& text, const TQString& name);
+ virtual TQString text(const TQString& name);
virtual void addConnectorTarget(const KoPoint&);
virtual void removeConnectorTarget(const KoPoint&);
virtual bool hasTextBox() const;
- virtual QColor textColor(const QString& textBoxName);
- virtual void setTextColor(const QString& textBoxName, const QColor& color);
+ virtual TQColor textColor(const TQString& textBoxName);
+ virtual void setTextColor(const TQString& textBoxName, const TQColor& color);
- virtual QFont textFont(const QString& textBoxName);
- virtual void setTextFont(const QString& textBoxName, const QFont& font);
+ virtual TQFont textFont(const TQString& textBoxName);
+ virtual void setTextFont(const TQString& textBoxName, const TQFont& font);
- virtual int hTextAlign(const QString& textBoxName);
- virtual int vTextAlign(const QString& textBoxName);
+ virtual int hTextAlign(const TQString& textBoxName);
+ virtual int vTextAlign(const TQString& textBoxName);
- virtual void setHTextAlign(const QString& textBoxName, int align);
- virtual void setVTextAlign(const QString& textBoxName, int align);
+ virtual void setHTextAlign(const TQString& textBoxName, int align);
+ virtual void setVTextAlign(const TQString& textBoxName, int align);
};
#endif
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:
diff --git a/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.h b/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.h
index bcc8024e..7dd09137 100644
--- a/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.h
+++ b/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.h
@@ -19,9 +19,9 @@
#ifndef KIVIO_SML_STENCIL_SPAWNER_H
#define KIVIO_SML_STENCIL_SPAWNER_H
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "kivio_stencil_spawner.h"
@@ -29,37 +29,37 @@ class KivioStencilSpawnerSet;
class KivioStencil;
class KivioSMLStencil;
class KivioConnectorTarget;
-class QPainter;
-class QPixmap;
-class QRect;
+class TQPainter;
+class TQPixmap;
+class TQRect;
class KivioSMLStencilSpawner : public KivioStencilSpawner
{
protected:
KivioSMLStencil *m_pStencil;
- QString m_filename;
+ TQString m_filename;
// Target list
- QPtrList<KivioConnectorTarget>*m_pTargets;
+ TQPtrList<KivioConnectorTarget>*m_pTargets;
protected:
- void loadShape( QDomNode & );
- QString readDesc( const QString & );
+ void loadShape( TQDomNode & );
+ TQString readDesc( const TQString & );
public:
KivioSMLStencilSpawner( KivioStencilSpawnerSet * );
virtual ~KivioSMLStencilSpawner();
- virtual bool load( const QString & );
- virtual bool loadXML( const QString &, QDomDocument & );
+ virtual bool load( const TQString & );
+ virtual bool loadXML( const TQString &, TQDomDocument & );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual TQDomElement saveXML( TQDomDocument & );
- virtual QString &filename() { return m_filename; }
+ virtual TQString &filename() { return m_filename; }
virtual KivioStencil *newStencil();
- QPtrList <KivioConnectorTarget> *targets() { return m_pTargets; }
+ TQPtrList <KivioConnectorTarget> *targets() { return m_pTargets; }
};
#endif
diff --git a/kivio/kiviopart/kiviosdk/kivio_stencil.cpp b/kivio/kiviopart/kiviosdk/kivio_stencil.cpp
index e94a9ea2..915df3bb 100644
--- a/kivio/kiviopart/kiviosdk/kivio_stencil.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_stencil.cpp
@@ -40,8 +40,8 @@ KivioStencil::KivioStencil()
m_selected = false;
- m_pProtection = new QBitArray(NUM_PROTECTIONS);
- m_pCanProtect = new QBitArray(NUM_PROTECTIONS);
+ m_pProtection = new TQBitArray(NUM_PROTECTIONS);
+ m_pCanProtect = new TQBitArray(NUM_PROTECTIONS);
for( int i = 0; i < NUM_PROTECTIONS; i++ )
{
@@ -73,12 +73,12 @@ KoRect KivioStencil::rect()
}
-bool KivioStencil::loadXML( const QDomElement & )
+bool KivioStencil::loadXML( const TQDomElement & )
{
return false;
}
-QDomElement KivioStencil::saveXML( QDomDocument &doc )
+TQDomElement KivioStencil::saveXML( TQDomDocument &doc )
{
return doc.createElement("");
}
@@ -113,8 +113,8 @@ void KivioStencil::paintSelectionHandles( KivioIntraStencilData *pData )
KivioPainter *painter = pData->painter;
- newX = zoomHandler->zoomItX(m_x - qRound(lineWidth() / 2));
- newY = zoomHandler->zoomItY(m_y - qRound(lineWidth() / 2));
+ newX = zoomHandler->zoomItX(m_x - tqRound(lineWidth() / 2));
+ newY = zoomHandler->zoomItY(m_y - tqRound(lineWidth() / 2));
newW = zoomHandler->zoomItX(m_w + lineWidth() + 1);
newH = zoomHandler->zoomItY(m_h + lineWidth() + 1);
@@ -122,7 +122,7 @@ void KivioStencil::paintSelectionHandles( KivioIntraStencilData *pData )
painter->setTranslation(newX, newY);
rotatePainter(pData); // Rotate the painter if needed
- painter->drawSelectionBox(QRect(0, 0, newW, newH));
+ painter->drawSelectionBox(TQRect(0, 0, newW, newH));
// top left, top right, bottom left, bottom right
if( m_pProtection->at( kpWidth ) ||
@@ -226,7 +226,7 @@ void KivioStencil::updateConnectorPoints(KivioConnectorPoint *, double, double)
void KivioStencil::rotatePainter(KivioIntraStencilData *pData)
{
if(m_rotation != 0) {
- QWMatrix m;
+ TQWMatrix m;
m.translate(pData->zoomHandler->zoomItX(m_pinPoint.x()), pData->zoomHandler->zoomItY(m_pinPoint.y()));
m.rotate(m_rotation);
m.translate(pData->zoomHandler->zoomItX(-m_pinPoint.x()), pData->zoomHandler->zoomItY(-m_pinPoint.y()));
@@ -256,8 +256,8 @@ void KivioStencil::move(double xOffset, double yOffset)
bool KivioStencil::isInRect(const KoRect& rect)
{
bool retVal;
- retVal = rect.contains(m_x, m_y);
- retVal = retVal && rect.contains(m_x + m_w, m_y + m_h);
+ retVal = rect.tqcontains(m_x, m_y);
+ retVal = retVal && rect.tqcontains(m_x + m_w, m_y + m_h);
return retVal;
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_stencil.h b/kivio/kiviopart/kiviosdk/kivio_stencil.h
index 926993f8..ef056c3d 100644
--- a/kivio/kiviopart/kiviosdk/kivio_stencil.h
+++ b/kivio/kiviopart/kiviosdk/kivio_stencil.h
@@ -20,11 +20,11 @@
#ifndef KIVIO_STENCIL_H
#define KIVIO_STENCIL_H
-#include <qfont.h>
-#include <qcolor.h>
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qbitarray.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqbitarray.h>
#include <KoPoint.h>
#include <kglobalsettings.h>
#include <KoRect.h>
@@ -128,8 +128,8 @@ class KIVIO_EXPORT KivioStencil
KivioStencilSpawner *m_pSpawner;
// The protection bits of the stencil
- QBitArray *m_pProtection;
- QBitArray *m_pCanProtect;
+ TQBitArray *m_pProtection;
+ TQBitArray *m_pCanProtect;
// The stemcil type
KivioStencilType m_type;
@@ -175,11 +175,11 @@ class KIVIO_EXPORT KivioStencil
virtual void setPosition( double f1, double f2 ) { m_x=f1; m_y=f2; updateGeometry(); }
virtual void setDimensions( double f1, double f2 ) { m_w=f1; m_h=f2; updateGeometry(); }
- virtual QColor fgColor() { return QColor(0,0,0); }
- virtual void setFGColor( QColor ) { ; }
+ virtual TQColor fgColor() { return TQColor(0,0,0); }
+ virtual void setFGColor( TQColor ) { ; }
- virtual void setBGColor( QColor ) { ; }
- virtual QColor bgColor() { return QColor(0,0,0); }
+ virtual void setBGColor( TQColor ) { ; }
+ virtual TQColor bgColor() { return TQColor(0,0,0); }
virtual void setFillPattern(int) { ; }
virtual int fillPattern() { return 1; }
@@ -194,11 +194,11 @@ class KIVIO_EXPORT KivioStencil
virtual int linePattern() { return 1; }
// FOnt stuff
- virtual QColor textColor() { return QColor(0,0,0); }
- virtual void setTextColor( QColor ) {;}
+ virtual TQColor textColor() { return TQColor(0,0,0); }
+ virtual void setTextColor( TQColor ) {;}
- virtual QFont textFont() { return KGlobalSettings::generalFont(); }
- virtual void setTextFont( const QFont & ) {;}
+ virtual TQFont textFont() { return KGlobalSettings::generalFont(); }
+ virtual void setTextFont( const TQFont & ) {;}
virtual int hTextAlign() { return -1; }
virtual int vTextAlign() { return -1; }
@@ -206,8 +206,8 @@ class KIVIO_EXPORT KivioStencil
virtual void setHTextAlign(int) { ; }
virtual void setVTextAlign(int) { ; }
- virtual void setText( const QString & ) { ; }
- virtual QString text() { return QString(""); }
+ virtual void setText( const TQString & ) { ; }
+ virtual TQString text() { return TQString(""); }
virtual void setRotation(int d);
virtual int rotation() { return m_rotation; }
@@ -224,19 +224,19 @@ class KIVIO_EXPORT KivioStencil
virtual void customDrag( KivioCustomDragData * );
- virtual bool loadXML( const QDomElement & );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual bool loadXML( const TQDomElement & );
+ virtual TQDomElement saveXML( TQDomDocument & );
virtual bool isSelected() { return m_selected; }
virtual void select() { m_selected = true; }
virtual void unselect() { m_selected = false; }
virtual void subSelect( const double &, const double & ) { ; }
- virtual QBitArray *protection() { return m_pProtection; }
- virtual QBitArray *canProtect() { return m_pCanProtect; }
+ virtual TQBitArray *protection() { return m_pProtection; }
+ virtual TQBitArray *canProtect() { return m_pCanProtect; }
virtual void addToGroup( KivioStencil * );
- virtual QPtrList<KivioStencil>* groupList() { return NULL; }
+ virtual TQPtrList<KivioStencil>* groupList() { return NULL; }
virtual void updateGeometry();
virtual void updateConnectorPoints(KivioConnectorPoint *, double oldX, double oldY);
@@ -259,27 +259,27 @@ class KIVIO_EXPORT KivioStencil
/**
Returns the name of the text box that is at the specified point.
- If there exist no text box at the specified point then it returns QString::null.
+ If there exist no text box at the specified point then it returns TQString().
*/
- virtual QString getTextBoxName(const KoPoint& /*p*/) { return QString::null; }
+ virtual TQString getTextBoxName(const KoPoint& /*p*/) { return TQString(); }
- virtual void setText(const QString& /*text*/, const QString& /*name*/) { ; }
- virtual QString text(const QString& /*name*/) { return QString(""); }
+ virtual void setText(const TQString& /*text*/, const TQString& /*name*/) { ; }
+ virtual TQString text(const TQString& /*name*/) { return TQString(""); }
/// Returns true if the stencil has a text box
virtual bool hasTextBox() const { return false; }
- virtual QColor textColor(const QString& /*textBoxName*/) { return QColor(); }
- virtual void setTextColor(const QString& /*textBoxName*/, const QColor& /*color*/) {}
+ virtual TQColor textColor(const TQString& /*textBoxName*/) { return TQColor(); }
+ virtual void setTextColor(const TQString& /*textBoxName*/, const TQColor& /*color*/) {}
- virtual QFont textFont(const QString& /*textBoxName*/) { return KGlobalSettings::generalFont(); }
- virtual void setTextFont(const QString& /*textBoxName*/, const QFont& /*font*/) {}
+ virtual TQFont textFont(const TQString& /*textBoxName*/) { return KGlobalSettings::generalFont(); }
+ virtual void setTextFont(const TQString& /*textBoxName*/, const TQFont& /*font*/) {}
- virtual int hTextAlign(const QString& /*textBoxName*/) { return -1; }
- virtual int vTextAlign(const QString& /*textBoxName*/) { return -1; }
+ virtual int hTextAlign(const TQString& /*textBoxName*/) { return -1; }
+ virtual int vTextAlign(const TQString& /*textBoxName*/) { return -1; }
- virtual void setHTextAlign(const QString& /*textBoxName*/, int /*align*/) {}
- virtual void setVTextAlign(const QString& /*textBoxName*/, int /*align*/) {}
+ virtual void setHTextAlign(const TQString& /*textBoxName*/, int /*align*/) {}
+ virtual void setVTextAlign(const TQString& /*textBoxName*/, int /*align*/) {}
virtual void setPinPoint(const KoPoint& p) { m_pinPoint = p; }
virtual KoPoint pinPoint() const { return m_pinPoint; }
diff --git a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner.cpp b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner.cpp
index 70f5ff08..8c6f6ed4 100644
--- a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner.cpp
@@ -45,12 +45,12 @@ KivioStencilSpawner::~KivioStencilSpawner()
}
-bool KivioStencilSpawner::load( const QString & )
+bool KivioStencilSpawner::load( const TQString & )
{
return false;
}
-bool KivioStencilSpawner::loadXML( const QString &, QDomDocument & )
+bool KivioStencilSpawner::loadXML( const TQString &, TQDomDocument & )
{
return false;
}
@@ -61,12 +61,12 @@ KivioStencil *KivioStencilSpawner::newStencil()
return NULL;
}
-KivioStencil *KivioStencilSpawner::newStencil(const QString& /*name*/)
+KivioStencil *KivioStencilSpawner::newStencil(const TQString& /*name*/)
{
return NULL;
}
-QDomElement KivioStencilSpawner::saveXML( QDomDocument &doc )
+TQDomElement KivioStencilSpawner::saveXML( TQDomDocument &doc )
{
return doc.createElement("KivioStencilSpawner");
}
diff --git a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner.h b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner.h
index 7ef99993..436ffb2b 100644
--- a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner.h
+++ b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner.h
@@ -19,13 +19,13 @@
#ifndef KIVIO_STENCIL_SPAWNER_H
#define KIVIO_STENCIL_SPAWNER_H
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qdom.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqdom.h>
+#include <tqobject.h>
-class QPainter;
-class QRect;
+class TQPainter;
+class TQRect;
class KivioStencilSpawnerInfo;
class KivioStencilSpawnerSet;
class KivioStencil;
@@ -33,8 +33,8 @@ class KivioStencil;
class KivioStencilSpawner
{
protected:
- QString m_fileName;
- QPixmap m_icon;
+ TQString m_fileName;
+ TQPixmap m_icon;
KivioStencilSpawnerSet *m_pSet;
KivioStencilSpawnerInfo *m_pInfo;
@@ -45,24 +45,24 @@ public:
KivioStencilSpawner( KivioStencilSpawnerSet * );
virtual ~KivioStencilSpawner();
- virtual bool load( const QString & );
- virtual bool loadXML( const QString &, QDomDocument & );
- virtual QDomElement saveXML( QDomDocument & );
+ virtual bool load( const TQString & );
+ virtual bool loadXML( const TQString &, TQDomDocument & );
+ virtual TQDomElement saveXML( TQDomDocument & );
virtual KivioStencil *newStencil();
- virtual KivioStencil *newStencil(const QString& args);
+ virtual KivioStencil *newStencil(const TQString& args);
- virtual QString fileName() { return m_fileName; }
+ virtual TQString fileName() { return m_fileName; }
virtual KivioStencilSpawnerSet *set() { return m_pSet; }
virtual KivioStencilSpawnerInfo *info() { return m_pInfo; }
virtual float defWidth() { return m_defWidth; }
virtual float defHeight() { return m_defHeight; }
- virtual QPixmap *icon() { return &m_icon; }
+ virtual TQPixmap *icon() { return &m_icon; }
-// virtual void drawIcon( QPainter *, QRect *, bool );
+// virtual void drawIcon( TQPainter *, TQRect *, bool );
};
#endif
diff --git a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_info.cpp b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_info.cpp
index 12a17919..730e07ca 100644
--- a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_info.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_info.cpp
@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "kivio_stencil_spawner_info.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kglobal.h>
#include <klocale.h>
@@ -38,8 +38,8 @@ KivioStencilSpawnerInfo::~KivioStencilSpawnerInfo()
{
}
-KivioStencilSpawnerInfo::KivioStencilSpawnerInfo( const QString &auth, const QString &tit, const QString &_id, const QString &des, const QString &ver, const QString &wb,
- const QString &em, const QString &au )
+KivioStencilSpawnerInfo::KivioStencilSpawnerInfo( const TQString &auth, const TQString &tit, const TQString &_id, const TQString &des, const TQString &ver, const TQString &wb,
+ const TQString &em, const TQString &au )
{
m_author = auth;
m_title = tit;
@@ -51,11 +51,11 @@ KivioStencilSpawnerInfo::KivioStencilSpawnerInfo( const QString &auth, const QSt
m_autoUpdate = au;
}
-bool KivioStencilSpawnerInfo::loadXML( const QDomElement &e )
+bool KivioStencilSpawnerInfo::loadXML( const TQDomElement &e )
{
- QDomNode node;
- QDomElement nodeElement;
- QString nodeName, origTitle, origDesc;
+ TQDomNode node;
+ TQDomElement nodeElement;
+ TQString nodeName, origTitle, origDesc;
m_title = "";
m_desc = "";
diff --git a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_info.h b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_info.h
index 9c676d66..501d47bb 100644
--- a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_info.h
+++ b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_info.h
@@ -19,13 +19,13 @@
#ifndef KIVIO_STENCIL_SPAWNER_INFO_H
#define KIVIO_STENCIL_SPAWNER_INFO_H
-#include <qstring.h>
+#include <tqstring.h>
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
class KIVIO_EXPORT KivioStencilSpawnerInfo
{
protected:
- QString m_author,
+ TQString m_author,
m_title,
m_id,
m_desc,
@@ -36,20 +36,20 @@ protected:
public:
KivioStencilSpawnerInfo();
- KivioStencilSpawnerInfo( const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString & );
+ KivioStencilSpawnerInfo( const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString & );
virtual ~KivioStencilSpawnerInfo();
- bool loadXML( const QDomElement & );
+ bool loadXML( const TQDomElement & );
- QString author() { return m_author; }
- QString title() { return m_title; }
- QString id() { return m_id; }
- QString desc() { return m_desc; }
- QString version() { return m_version; }
- QString web() { return m_web; }
- QString email() { return m_email; }
- QString autoUpdate() { return m_autoUpdate; }
+ TQString author() { return m_author; }
+ TQString title() { return m_title; }
+ TQString id() { return m_id; }
+ TQString desc() { return m_desc; }
+ TQString version() { return m_version; }
+ TQString web() { return m_web; }
+ TQString email() { return m_email; }
+ TQString autoUpdate() { return m_autoUpdate; }
};
diff --git a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.cpp b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.cpp
index 66339a0e..64d5a7c9 100644
--- a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.cpp
@@ -24,22 +24,22 @@
#include "kivio_stencil_spawner.h"
#include "kivio_stencil_spawner_set.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qstring.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
-KivioStencilSpawnerSet::KivioStencilSpawnerSet(const QString& name)
+KivioStencilSpawnerSet::KivioStencilSpawnerSet(const TQString& name)
: m_pSpawners(NULL),
m_pSelected(NULL)
{
m_hidden = false;
m_dir = "";
- m_name = name.isEmpty() ? QString("Untitled") : name;
+ m_name = name.isEmpty() ? TQString("Untitled") : name;
- m_pSpawners = new QPtrList<KivioStencilSpawner>;
+ m_pSpawners = new TQPtrList<KivioStencilSpawner>;
m_pSpawners->setAutoDelete(true);
}
@@ -54,31 +54,31 @@ KivioStencilSpawnerSet::~KivioStencilSpawnerSet()
/**
* Loads a stencil spawners from data defined in an XML file
*
- * @param e The @ref QDomElement to load from
+ * @param e The @ref TQDomElement to load from
*
* This is a function that needs to be implemented by all descendant
* classes. It should search the known stencil-paths for the spawner
* specified, and load it.
*/
-bool KivioStencilSpawnerSet::loadXML( const QDomElement & )
+bool KivioStencilSpawnerSet::loadXML( const TQDomElement & )
{
return false;
}
/**
- * Saves a spawner to a @ref QDomElement
+ * Saves a spawner to a @ref TQDomElement
*
* @param doc The document to save to
*
* All descendant classes should implement this function. It should
- * save the necessary data to a @ref QDomElement such that when
+ * save the necessary data to a @ref TQDomElement such that when
* it is loaded again, it can find the spawner and load it from
* the local filesystem.
*/
-QDomElement KivioStencilSpawnerSet::saveXML( QDomDocument &doc )
+TQDomElement KivioStencilSpawnerSet::saveXML( TQDomDocument &doc )
{
- QDomElement spawnE = doc.createElement("KivioStencilSpawnerSet");
+ TQDomElement spawnE = doc.createElement("KivioStencilSpawnerSet");
XmlWriteString( spawnE, "id", m_id );
XmlWriteString(spawnE, "hidden", (m_hidden ? "true" : "false"));
@@ -95,22 +95,22 @@ QDomElement KivioStencilSpawnerSet::saveXML( QDomDocument &doc )
return spawnE;
}
-bool KivioStencilSpawnerSet::loadDir( const QString &dirName )
+bool KivioStencilSpawnerSet::loadDir( const TQString &dirName )
{
- QDir d(dirName);
- QString fileName;
+ TQDir d(dirName);
+ TQString fileName;
m_dir = dirName;
m_name = readTitle( dirName );
m_id = readId( dirName );
- d.setNameFilter("*.so *.sml *.ksp *.spy *.shape");
+ d.setNameFilter("*.so *.sml *.ksp *.spy *.tqshape");
m_files = d.entryList();
return true;
}
-KivioStencilSpawner* KivioStencilSpawnerSet::loadFile( const QString &fileName )
+KivioStencilSpawner* KivioStencilSpawnerSet::loadFile( const TQString &fileName )
{
for (KivioStencilSpawner* ss = m_pSpawners->first(); ss; ss = m_pSpawners->next() )
if (ss->fileName() == fileName)
@@ -118,23 +118,23 @@ KivioStencilSpawner* KivioStencilSpawnerSet::loadFile( const QString &fileName )
KivioStencilSpawner *pSpawner;
- if( fileName.contains( ".sml", false ) )
+ if( fileName.tqcontains( ".sml", false ) )
{
pSpawner = new KivioSMLStencilSpawner(this);
}
- else if( fileName.contains( ".ksp", false ) )
+ else if( fileName.tqcontains( ".ksp", false ) )
{
pSpawner = new KivioPluginStencilSpawner(this);
}
- else if( fileName.contains( ".so", false ) )
+ else if( fileName.tqcontains( ".so", false ) )
{
pSpawner = new KivioPluginStencilSpawner(this);
}
- else if( fileName.contains( ".spy", false ) )
+ else if( fileName.tqcontains( ".spy", false ) )
{
pSpawner = new KivioPyStencilSpawner(this);
}
- else if( fileName.contains( ".shape", false ) )
+ else if( fileName.tqcontains( ".tqshape", false ) )
{
pSpawner = new KivioDiaStencilSpawner(this);
}
@@ -154,20 +154,20 @@ KivioStencilSpawner* KivioStencilSpawnerSet::loadFile( const QString &fileName )
return pSpawner;
}
-QString KivioStencilSpawnerSet::readTitle( const QString &dir )
+TQString KivioStencilSpawnerSet::readTitle( const TQString &dir )
{
- QDomDocument d("StencilSPawnerSet");
- QDomElement root, nodeElement;
- QDomNode node;
- QString nodeName;
- QString title, origTitle;
- QFile f(dir+"/desc");
+ TQDomDocument d("StencilSPawnerSet");
+ TQDomElement root, nodeElement;
+ TQDomNode node;
+ TQString nodeName;
+ TQString title, origTitle;
+ TQFile f(dir+"/desc");
if( f.open( IO_ReadOnly )==false )
{
kdDebug(43000) << "KivioStencilSpawnerSet::readTitle() - Error opening stencil set title: " <<
dir << "/desc" << endl;
- return dir.right(dir.length() - dir.findRev('/')-1);
+ return dir.right(dir.length() - dir.tqfindRev('/')-1);
}
d.setContent(&f);
@@ -201,14 +201,14 @@ QString KivioStencilSpawnerSet::readTitle( const QString &dir )
return title;
}
-QString KivioStencilSpawnerSet::readId( const QString &dir )
+TQString KivioStencilSpawnerSet::readId( const TQString &dir )
{
- QDomDocument d("StencilSPawnerSet");
- QDomElement root;
- QDomNode node;
- QString nodeName;
- QString theid;
- QFile f(dir+"/desc");
+ TQDomDocument d("StencilSPawnerSet");
+ TQDomElement root;
+ TQDomNode node;
+ TQString nodeName;
+ TQString theid;
+ TQFile f(dir+"/desc");
if( f.open( IO_ReadOnly )==false )
{
@@ -241,13 +241,13 @@ QString KivioStencilSpawnerSet::readId( const QString &dir )
return "";
}
-QString KivioStencilSpawnerSet::readDescription(const QString& dir)
+TQString KivioStencilSpawnerSet::readDescription(const TQString& dir)
{
- QDomDocument d("StencilSPawnerSet");
- QDomElement root, nodeElement;
- QDomNode node;
- QString nodeName;
- QFile f(dir + "/desc");
+ TQDomDocument d("StencilSPawnerSet");
+ TQDomElement root, nodeElement;
+ TQDomNode node;
+ TQString nodeName;
+ TQFile f(dir + "/desc");
if( f.open( IO_ReadOnly )==false )
{
@@ -260,7 +260,7 @@ QString KivioStencilSpawnerSet::readDescription(const QString& dir)
root = d.documentElement();
node = root.firstChild();
- QString description, origDesc;
+ TQString description, origDesc;
while( !node.isNull() )
{
@@ -289,7 +289,7 @@ QString KivioStencilSpawnerSet::readDescription(const QString& dir)
}
-KivioStencilSpawner* KivioStencilSpawnerSet::find( const QString& id)
+KivioStencilSpawner* KivioStencilSpawnerSet::tqfind( const TQString& id)
{
if(!m_pSpawners || m_pSpawners->isEmpty()) {
return 0;
diff --git a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.h b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.h
index 717fdd72..9b215560 100644
--- a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.h
+++ b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.h
@@ -19,57 +19,57 @@
#ifndef KIVIO_STENCIL_SPAWNER_SET_H
#define KIVIO_STENCIL_SPAWNER_SET_H
-#include <qptrlist.h>
-#include <qdom.h>
+#include <tqptrlist.h>
+#include <tqdom.h>
class KivioStencilSpawner;
-class QStringList;
+class TQStringList;
class KivioStencilSpawnerSet
{
protected:
- QString m_dir;
- QString m_name;
- QString m_id;
+ TQString m_dir;
+ TQString m_name;
+ TQString m_id;
- QStringList m_files;
+ TQStringList m_files;
- QPtrList<KivioStencilSpawner> *m_pSpawners;
+ TQPtrList<KivioStencilSpawner> *m_pSpawners;
KivioStencilSpawner *m_pSelected;
bool m_hidden;
public:
- KivioStencilSpawnerSet(const QString& name=QString::null);
+ KivioStencilSpawnerSet(const TQString& name=TQString());
virtual ~KivioStencilSpawnerSet();
- bool loadDir( const QString & );
- KivioStencilSpawner* loadFile( const QString & );
+ bool loadDir( const TQString & );
+ KivioStencilSpawner* loadFile( const TQString & );
- bool loadXML( const QDomElement & );
- QDomElement saveXML( QDomDocument & );
+ bool loadXML( const TQDomElement & );
+ TQDomElement saveXML( TQDomDocument & );
- QPtrList<KivioStencilSpawner> *spawners() { return m_pSpawners; }
+ TQPtrList<KivioStencilSpawner> *spawners() { return m_pSpawners; }
KivioStencilSpawner *selected() { return m_pSelected; }
- QString dir() { return m_dir; }
- QString name() { return m_name; }
- QString id() { return m_id; }
+ TQString dir() { return m_dir; }
+ TQString name() { return m_name; }
+ TQString id() { return m_id; }
- void setDir( const QString &s ) { m_dir=s; }
- void setName( const QString &s ) { m_name=s; }
- void setId( const QString &s ) { m_id=s; }
+ void setDir( const TQString &s ) { m_dir=s; }
+ void setName( const TQString &s ) { m_name=s; }
+ void setId( const TQString &s ) { m_id=s; }
KivioStencilSpawner *spawnerAt( int i ) { return m_pSpawners->at(i); }
- KivioStencilSpawner *find( const QString& );
+ KivioStencilSpawner *tqfind( const TQString& );
int count() { return m_pSpawners->count(); }
- static QString readTitle( const QString & );
- static QString readId( const QString & );
- static QString readDescription(const QString&);
+ static TQString readTitle( const TQString & );
+ static TQString readId( const TQString & );
+ static TQString readDescription(const TQString&);
- QStringList files() const { return m_files; }
+ TQStringList files() const { return m_files; }
void addSpawner(KivioStencilSpawner* spawner);
diff --git a/kivio/kiviopart/kiviosdk/kivio_text_style.cpp b/kivio/kiviopart/kiviosdk/kivio_text_style.cpp
index 75d975d5..28044f39 100644
--- a/kivio/kiviopart/kiviosdk/kivio_text_style.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_text_style.cpp
@@ -1,17 +1,17 @@
#include "kivio_common.h"
#include "kivio_text_style.h"
-#include <qdom.h>
-#include <qpainter.h>
+#include <tqdom.h>
+#include <tqpainter.h>
#include <KoGlobal.h>
KivioTextStyle::KivioTextStyle()
{
m_text = "";
- m_color = QColor(0,0,0);
- m_hTextAlign = Qt::AlignHCenter;
- m_vTextAlign = Qt::AlignVCenter;
+ m_color = TQColor(0,0,0);
+ m_hTextAlign = TQt::AlignHCenter;
+ m_vTextAlign = TQt::AlignVCenter;
m_isHtml = false;
- //m_font = QFont("times",12);
+ //m_font = TQFont("times",12);
m_font = KoGlobal::defaultFont();
}
@@ -29,9 +29,9 @@ void KivioTextStyle::copyInto( KivioTextStyle *pTarget )
pTarget->m_font = m_font;
}
-QDomElement KivioTextStyle::saveXML( QDomDocument &doc )
+TQDomElement KivioTextStyle::saveXML( TQDomDocument &doc )
{
- QDomElement textE = doc.createElement("KivioTextStyle");
+ TQDomElement textE = doc.createElement("KivioTextStyle");
XmlWriteString( textE, "text", m_text );
XmlWriteInt( textE, "isHtml", m_isHtml );
@@ -39,7 +39,7 @@ QDomElement KivioTextStyle::saveXML( QDomDocument &doc )
XmlWriteInt( textE, "vTextAlign", m_vTextAlign );
// Text font & color
- QDomElement innerTextE = doc.createElement("Font");
+ TQDomElement innerTextE = doc.createElement("Font");
XmlWriteColor( innerTextE, "color", m_color );
XmlWriteString( innerTextE, "family", m_font.family() );
XmlWriteInt( innerTextE, "size", m_font.pointSize() );
@@ -54,20 +54,20 @@ QDomElement KivioTextStyle::saveXML( QDomDocument &doc )
return textE;
}
-bool KivioTextStyle::loadXML( const QDomElement &e )
+bool KivioTextStyle::loadXML( const TQDomElement &e )
{
m_text = XmlReadString( e, "text", "" );
m_isHtml = (bool)XmlReadInt( e, "isHtml", (int)false );
- m_hTextAlign = XmlReadInt( e, "hTextAlign", Qt::AlignHCenter );
- m_vTextAlign = XmlReadInt( e, "vTextAlign", Qt::AlignVCenter );
+ m_hTextAlign = XmlReadInt( e, "hTextAlign", TQt::AlignHCenter );
+ m_vTextAlign = XmlReadInt( e, "vTextAlign", TQt::AlignVCenter );
// Search for the font
- QDomNode innerNode = e.firstChild();
+ TQDomNode innerNode = e.firstChild();
while( !innerNode.isNull() )
{
- QString innerName = innerNode.nodeName();
- QDomElement innerE = innerNode.toElement();
+ TQString innerName = innerNode.nodeName();
+ TQDomElement innerE = innerNode.toElement();
if( innerName == "Font" )
{
@@ -78,7 +78,7 @@ bool KivioTextStyle::loadXML( const QDomElement &e )
m_font.setUnderline( (bool)XmlReadInt( innerE, "underline", 12 ) );
m_font.setStrikeOut( (bool)XmlReadInt( innerE, "strikeOut", 12 ) );
m_font.setFixedPitch( (bool)XmlReadInt( innerE, "fixedPitch", false ) );
- m_color = XmlReadColor( innerE, "color", QColor(0,0,0) );
+ m_color = XmlReadColor( innerE, "color", TQColor(0,0,0) );
}
innerNode = innerNode.nextSibling();
diff --git a/kivio/kiviopart/kiviosdk/kivio_text_style.h b/kivio/kiviopart/kiviosdk/kivio_text_style.h
index 5ce3afe9..2a8ecd62 100644
--- a/kivio/kiviopart/kiviosdk/kivio_text_style.h
+++ b/kivio/kiviopart/kiviosdk/kivio_text_style.h
@@ -5,41 +5,41 @@
#include <config.h>
#endif
-#include <qfont.h>
+#include <tqfont.h>
-class QDomDocument;
-class QPainter;
+class TQDomDocument;
+class TQPainter;
class KivioTextStyle
{
protected:
- QString m_text; // The text inside this shape
- QColor m_color; // The text color
- QFont m_font; // The text font
+ TQString m_text; // The text inside this tqshape
+ TQColor m_color; // The text color
+ TQFont m_font; // The text font
bool m_isHtml; // Is the text HTML formatted?
- int m_hTextAlign, m_vTextAlign; // Horizontal and vertical text alignment flags
+ int m_hTextAlign, m_vTextAlign; //Qt::Horizontal and vertical text tqalignment flags
public:
KivioTextStyle();
virtual ~KivioTextStyle();
- QDomElement saveXML( QDomDocument & );
- bool loadXML( const QDomElement & );
+ TQDomElement saveXML( TQDomDocument & );
+ bool loadXML( const TQDomElement & );
void copyInto( KivioTextStyle * );
- inline QString text() { return m_text; }
- inline void setText( QString s ) { m_text=s; }
+ inline TQString text() { return m_text; }
+ inline void setText( TQString s ) { m_text=s; }
- inline QColor color() { return m_color; }
- inline void setColor( QColor c ) { m_color=c; }
+ inline TQColor color() { return m_color; }
+ inline void setColor( TQColor c ) { m_color=c; }
- inline QFont font() { return m_font; }
- inline void setFont( QFont f ) { m_font=f; }
+ inline TQFont font() { return m_font; }
+ inline void setFont( TQFont f ) { m_font=f; }
inline bool isHtml() { return m_isHtml; }
inline void setIsHtml( bool b ) { m_isHtml=b; }
diff --git a/kivio/kiviopart/kiviosdk/kivio_wrap.cpp b/kivio/kiviopart/kiviosdk/kivio_wrap.cpp
index ede8a889..1dae0b53 100644
--- a/kivio/kiviopart/kiviosdk/kivio_wrap.cpp
+++ b/kivio/kiviopart/kiviosdk/kivio_wrap.cpp
@@ -1051,7 +1051,7 @@ static PyObject *_wrap_KivioStencil_setVTextAlign(PyObject *self, PyObject *args
return _resultobj;
}
-static void KivioStencil_setText(KivioStencil *self,char * s) { self->setText( QString(s)); }
+static void KivioStencil_setText(KivioStencil *self,char * s) { self->setText( TQString(s)); }
static PyObject *_wrap_KivioStencil_setText(PyObject *self, PyObject *args) {
PyObject *_resultobj,*_argo0=0;
KivioStencil *_arg0;
@@ -1080,7 +1080,7 @@ static PyObject *_wrap_KivioStencil_text(PyObject *self, PyObject *args) {
return _resultobj;
}
-static char * KivioStencil_textColor(KivioStencil *self) { return (char*) self->textColor().name().latin1(); }
+static char * KivioStencil_textColor(KivioStencil *self) { return (char*) TQString(self->textColor().name()).latin1(); }
static PyObject *_wrap_KivioStencil_textColor(PyObject *self, PyObject *args) {
PyObject *_resultobj,*_argo0=0;
char *_result;
@@ -1094,7 +1094,7 @@ static PyObject *_wrap_KivioStencil_textColor(PyObject *self, PyObject *args) {
return _resultobj;
}
-static void KivioStencil_setTextColor(KivioStencil *self,char * color) { self->setTextColor(QColor(color)); }
+static void KivioStencil_setTextColor(KivioStencil *self,char * color) { self->setTextColor(TQColor(color)); }
static PyObject *_wrap_KivioStencil_setTextColor(PyObject *self, PyObject *args) {
PyObject *_resultobj,*_argo0=0;
KivioStencil *_arg0;
@@ -1109,7 +1109,7 @@ static PyObject *_wrap_KivioStencil_setTextColor(PyObject *self, PyObject *args)
return _resultobj;
}
-static char * KivioStencil_fgColor(KivioStencil *self) { return (char*) self->fgColor().name().latin1(); }
+static char * KivioStencil_fgColor(KivioStencil *self) { return (char*) TQString(self->fgColor().name()).latin1(); }
static PyObject *_wrap_KivioStencil_fgColor(PyObject *self, PyObject *args) {
PyObject *_resultobj,*_argo0=0;
char *_result;
@@ -1123,7 +1123,7 @@ static PyObject *_wrap_KivioStencil_fgColor(PyObject *self, PyObject *args) {
return _resultobj;
}
-static void KivioStencil_setFGColor(KivioStencil *self,char * color) { self->setFGColor(QColor(color)); }
+static void KivioStencil_setFGColor(KivioStencil *self,char * color) { self->setFGColor(TQColor(color)); }
static PyObject *_wrap_KivioStencil_setFGColor(PyObject *self, PyObject *args) {
PyObject *_resultobj,*_argo0=0;
KivioStencil *_arg0;
@@ -1138,7 +1138,7 @@ static PyObject *_wrap_KivioStencil_setFGColor(PyObject *self, PyObject *args) {
return _resultobj;
}
-static char * KivioStencil_bgColor(KivioStencil *self) { return (char*) self->bgColor().name().latin1(); }
+static char * KivioStencil_bgColor(KivioStencil *self) { return (char*) TQString(self->bgColor().name()).latin1(); }
static PyObject *_wrap_KivioStencil_bgColor(PyObject *self, PyObject *args) {
PyObject *_resultobj,*_argo0=0;
char *_result;
@@ -1152,7 +1152,7 @@ static PyObject *_wrap_KivioStencil_bgColor(PyObject *self, PyObject *args) {
return _resultobj;
}
-static void KivioStencil_setBGColor(KivioStencil *self,char * color) { self->setBGColor(QColor(color)); }
+static void KivioStencil_setBGColor(KivioStencil *self,char * color) { self->setBGColor(TQColor(color)); }
static PyObject *_wrap_KivioStencil_setBGColor(PyObject *self, PyObject *args) {
PyObject *_resultobj,*_argo0=0;
KivioStencil *_arg0;
diff --git a/kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp b/kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp
index 9afe2f9e..71910eff 100644
--- a/kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp
+++ b/kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp
@@ -79,10 +79,10 @@ namespace Kivio {
return connector;
}
- bool PolyLineConnector::loadCustom(const QDomElement& e)
+ bool PolyLineConnector::loadCustom(const TQDomElement& e)
{
- QDomNode node = e.firstChild();
- QString nodeName;
+ TQDomNode node = e.firstChild();
+ TQString nodeName;
m_points.clear();
while(!node.isNull()) {
@@ -91,8 +91,8 @@ namespace Kivio {
if(nodeName == "KivioArrowHeads") {
loadArrowHeads(node.toElement());
} else if(nodeName == "KivioGeometryPoints") {
- QDomNode pointsNode = node.firstChild();
- QDomElement el;
+ TQDomNode pointsNode = node.firstChild();
+ TQDomElement el;
while(!pointsNode.isNull()) {
if(pointsNode.nodeName() == "KivioPoint") {
@@ -113,14 +113,14 @@ namespace Kivio {
return true;
}
- bool PolyLineConnector::saveCustom(QDomElement& e, QDomDocument& doc)
+ bool PolyLineConnector::saveCustom(TQDomElement& e, TQDomDocument& doc)
{
e.appendChild(saveArrowHeads(doc));
- QDomElement pointsElement = doc.createElement("KivioGeometryPoints");
+ TQDomElement pointsElement = doc.createElement("KivioGeometryPoints");
- for(QValueList<KoPoint>::iterator it = m_points.begin(); it != m_points.end(); ++it) {
+ for(TQValueList<KoPoint>::iterator it = m_points.begin(); it != m_points.end(); ++it) {
KoPoint p = (*it);
- QDomElement el = doc.createElement("KivioPoint");
+ TQDomElement el = doc.createElement("KivioPoint");
XmlWriteFloat(el, "x", p.x());
XmlWriteFloat(el, "y", p.y());
pointsElement.appendChild(el);
@@ -182,8 +182,8 @@ namespace Kivio {
painter->setLineStyle(m_pLineStyle);
painter->setLineWidth(zoom->zoomItY(m_pLineStyle->width()));
- QPointArray pa(m_points.count());
- QValueList<KoPoint>::iterator it;
+ TQPointArray pa(m_points.count());
+ TQValueList<KoPoint>::iterator it;
int i = 0;
for(it = m_points.begin(); it != m_points.end(); ++it) {
@@ -199,17 +199,17 @@ namespace Kivio {
if(startLen) {
startVec.setX(startVec.x() / startLen);
startVec.setY(startVec.y() / startLen);
- QPoint p = pa[0];
- p.setX(p.x() + qRound(startVec.x() * zoom->zoomItX(m_startArrow->cut())));
- p.setY(p.y() + qRound(startVec.y() * zoom->zoomItY(m_startArrow->cut())));
+ TQPoint p = pa[0];
+ p.setX(p.x() + tqRound(startVec.x() * zoom->zoomItX(m_startArrow->cut())));
+ p.setY(p.y() + tqRound(startVec.y() * zoom->zoomItY(m_startArrow->cut())));
}
if(endLen) {
endVec.setX(endVec.x() / endLen);
endVec.setY(endVec.y() / endLen);
- QPoint p = pa[m_points.count() - 1];
- p.setX(p.x() + qRound(endVec.x() * zoom->zoomItX(m_endArrow->cut())));
- p.setY(p.y() + qRound(endVec.y() * zoom->zoomItY(m_endArrow->cut())));
+ TQPoint p = pa[m_points.count() - 1];
+ p.setX(p.x() + tqRound(endVec.x() * zoom->zoomItX(m_endArrow->cut())));
+ p.setY(p.y() + tqRound(endVec.y() * zoom->zoomItY(m_endArrow->cut())));
}
painter->drawPolyline(pa);
@@ -233,7 +233,7 @@ namespace Kivio {
{
KivioPainter* painter = data->painter;
KoZoomHandler* zoomHandler = data->zoomHandler;
- QValueList<KoPoint>::Iterator it;
+ TQValueList<KoPoint>::Iterator it;
int x, y, flag;
x = y = flag = 0;
@@ -384,15 +384,15 @@ namespace Kivio {
{
KoPoint p = m_points.first();
KoPoint topLeft(p.x(), p.y()), bottomRight;
- QValueList<KoPoint>::iterator it;
- QValueList<KoPoint>::iterator itEnd = m_points.end();
+ TQValueList<KoPoint>::iterator it;
+ TQValueList<KoPoint>::iterator itEnd = m_points.end();
for(it = m_points.begin(); it != itEnd; ++it) {
p = (*it);
- topLeft.setX(QMIN(p.x(), topLeft.x()));
- topLeft.setY(QMIN(p.y(), topLeft.y()));
- bottomRight.setX(QMAX(p.x(), bottomRight.x()));
- bottomRight.setY(QMAX(p.y(), bottomRight.y()));
+ topLeft.setX(TQMIN(p.x(), topLeft.x()));
+ topLeft.setY(TQMIN(p.y(), topLeft.y()));
+ bottomRight.setX(TQMAX(p.x(), bottomRight.x()));
+ bottomRight.setY(TQMAX(p.y(), bottomRight.y()));
}
KoRect rect;
@@ -404,20 +404,20 @@ namespace Kivio {
bool PolyLineConnector::isInRect(const KoRect& rect)
{
- QValueList<KoPoint>::Iterator it;
+ TQValueList<KoPoint>::Iterator it;
bool retVal = true;
for(it = m_points.begin(); it != m_points.end(); ++it) {
- retVal = retVal && rect.contains((*it));
+ retVal = retVal && rect.tqcontains((*it));
}
return retVal;
}
- bool PolyLineConnector::loadArrowHeads(const QDomElement& e)
+ bool PolyLineConnector::loadArrowHeads(const TQDomElement& e)
{
bool first = true;
- QDomNode node = e.firstChild();
+ TQDomNode node = e.firstChild();
while(!node.isNull()) {
if(node.nodeName() == "KivioArrowHead") {
@@ -435,9 +435,9 @@ namespace Kivio {
return true;
}
- QDomElement PolyLineConnector::saveArrowHeads(QDomDocument& doc)
+ TQDomElement PolyLineConnector::saveArrowHeads(TQDomDocument& doc)
{
- QDomElement e = doc.createElement("KivioArrowHeads");
+ TQDomElement e = doc.createElement("KivioArrowHeads");
e.appendChild( m_startArrow->saveXML(doc) );
e.appendChild( m_endArrow->saveXML(doc) );
diff --git a/kivio/kiviopart/kiviosdk/kiviopolylineconnector.h b/kivio/kiviopart/kiviosdk/kiviopolylineconnector.h
index 26878690..fcae1841 100644
--- a/kivio/kiviopart/kiviosdk/kiviopolylineconnector.h
+++ b/kivio/kiviopart/kiviosdk/kiviopolylineconnector.h
@@ -20,7 +20,7 @@
#ifndef KIVIOKIVIOPOLYLINECONNECTOR_H
#define KIVIOKIVIOPOLYLINECONNECTOR_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <KoPoint.h>
#include <KoRect.h>
@@ -41,8 +41,8 @@ namespace Kivio {
virtual KivioStencil* duplicate();
- virtual bool loadCustom(const QDomElement& e);
- virtual bool saveCustom(QDomElement& e, QDomDocument& doc);
+ virtual bool loadCustom(const TQDomElement& e);
+ virtual bool saveCustom(TQDomElement& e, TQDomDocument& doc);
virtual KivioCollisionType checkForCollision(KoPoint* p, double threshold);
@@ -112,14 +112,14 @@ namespace Kivio {
protected:
void checkForConnection(KivioConnectorPoint* cp, KivioPage* page);
- bool loadArrowHeads(const QDomElement& e);
- QDomElement saveArrowHeads(QDomDocument& doc);
+ bool loadArrowHeads(const TQDomElement& e);
+ TQDomElement saveArrowHeads(TQDomDocument& doc);
private:
KivioArrowHead* m_startArrow; // Arrow head for the first point.
KivioArrowHead* m_endArrow; // Arrow head for the last point.
- QValueList<KoPoint> m_points;
+ TQValueList<KoPoint> m_points;
};
}
diff --git a/kivio/kiviopart/kiviosdk/kiviostencilfactory.h b/kivio/kiviopart/kiviosdk/kiviostencilfactory.h
index b037c1bf..5a00560c 100644
--- a/kivio/kiviopart/kiviosdk/kiviostencilfactory.h
+++ b/kivio/kiviopart/kiviosdk/kiviostencilfactory.h
@@ -21,21 +21,22 @@
class KivioStencil;
class KivioStencilSpawnerInfo;
-class QPixmap;
+class TQPixmap;
-#include <qstring.h>
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <koffice_export.h>
-class KIVIO_EXPORT KivioStencilFactory : public QObject
+class KIVIO_EXPORT KivioStencilFactory : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KivioStencilFactory(QObject *parent=0, const char*name=0, const QStringList& args = QStringList())
- : QObject(parent, name) { Q_UNUSED(args) }
- virtual KivioStencil *NewStencil(const QString& name) =0;
+ KivioStencilFactory(TQObject *tqparent=0, const char*name=0, const TQStringList& args = TQStringList())
+ : TQObject(tqparent, name) { Q_UNUSED(args) }
+ virtual KivioStencil *NewStencil(const TQString& name) =0;
virtual KivioStencil *NewStencil()=0;
- virtual QPixmap *GetIcon()=0;
+ virtual TQPixmap *GetIcon()=0;
virtual KivioStencilSpawnerInfo *GetSpawnerInfo()=0;
};
#endif
diff --git a/kivio/kiviopart/kiviosdk/polylineconnectorspawner.cpp b/kivio/kiviopart/kiviosdk/polylineconnectorspawner.cpp
index f8563b5e..241b8278 100644
--- a/kivio/kiviopart/kiviosdk/polylineconnectorspawner.cpp
+++ b/kivio/kiviopart/kiviosdk/polylineconnectorspawner.cpp
@@ -33,14 +33,14 @@ PolyLineConnectorSpawner::~PolyLineConnectorSpawner()
{
}
-bool PolyLineConnectorSpawner::load(const QString&)
+bool PolyLineConnectorSpawner::load(const TQString&)
{
return true;
}
-QDomElement PolyLineConnectorSpawner::saveXML(QDomDocument& /*doc*/)
+TQDomElement PolyLineConnectorSpawner::saveXML(TQDomDocument& /*doc*/)
{
- return QDomElement();
+ return TQDomElement();
}
KivioStencil* PolyLineConnectorSpawner::newStencil()
@@ -51,7 +51,7 @@ KivioStencil* PolyLineConnectorSpawner::newStencil()
return connector;
}
-KivioStencil* PolyLineConnectorSpawner::newStencil(const QString& /*arg*/)
+KivioStencil* PolyLineConnectorSpawner::newStencil(const TQString& /*arg*/)
{
PolyLineConnector* connector = new PolyLineConnector();
connector->setSpawner(this);
diff --git a/kivio/kiviopart/kiviosdk/polylineconnectorspawner.h b/kivio/kiviopart/kiviosdk/polylineconnectorspawner.h
index 85160387..12436d6c 100644
--- a/kivio/kiviopart/kiviosdk/polylineconnectorspawner.h
+++ b/kivio/kiviopart/kiviosdk/polylineconnectorspawner.h
@@ -30,17 +30,17 @@ class PolyLineConnectorSpawner : public KivioStencilSpawner
PolyLineConnectorSpawner(KivioStencilSpawnerSet* spawnerSet);
~PolyLineConnectorSpawner();
- virtual bool load(const QString& );
- virtual QDomElement saveXML(QDomDocument& doc);
+ virtual bool load(const TQString& );
+ virtual TQDomElement saveXML(TQDomDocument& doc);
virtual KivioStencil* newStencil();
- virtual KivioStencil* newStencil(const QString& arg);
+ virtual KivioStencil* newStencil(const TQString& arg);
virtual KivioStencilSpawnerInfo* info() { return &m_info; }
- virtual QPixmap* icon() { return &m_icon; }
+ virtual TQPixmap* icon() { return &m_icon; }
private:
- QPixmap m_icon;
+ TQPixmap m_icon;
KivioStencilSpawnerInfo m_info;
};