summaryrefslogtreecommitdiffstats
path: root/kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp')
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp410
1 files changed, 205 insertions, 205 deletions
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);
}