summaryrefslogtreecommitdiffstats
path: root/kivio/kiviopart/kiviosdk/kivio_shape.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_shape.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_shape.cpp')
-rw-r--r--kivio/kiviopart/kiviosdk/kivio_shape.cpp264
1 files changed, 132 insertions, 132 deletions
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;