diff options
Diffstat (limited to 'kivio/kiviopart/kiviosdk')
21 files changed, 310 insertions, 310 deletions
diff --git a/kivio/kiviopart/kiviosdk/diapathparser.cpp b/kivio/kiviopart/kiviosdk/diapathparser.cpp index e071a8e6..1af85056 100644 --- a/kivio/kiviopart/kiviosdk/diapathparser.cpp +++ b/kivio/kiviopart/kiviosdk/diapathparser.cpp @@ -48,8 +48,8 @@ void DiaPointFinder::svgClosePath() { } -DiaPathParser::DiaPathParser(TQDomDocument *doc, TQDomElement *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) { @@ -72,12 +72,12 @@ void DiaPathParser::svgLineTo( double x1, double y1, bool ) 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_shape->appendChild(kivioPointElement); + m_tqshape->appendChild(kivioPointElement); kivioPointElement = m_doc->createElement("KivioPoint"); kivioPointElement.setAttribute("x", TQString::number(diaPointToKivio(currentX,true) * m_xscale)); kivioPointElement.setAttribute("y", TQString::number(diaPointToKivio(currentY, false) * m_yscale)); - m_shape->appendChild(kivioPointElement); + m_tqshape->appendChild(kivioPointElement); lastX = currentX; lastY = currentY; } @@ -99,7 +99,7 @@ void DiaPathParser::svgCurveToCubic( double x1, double y1, double x2, double y2, kivioPointElement.setAttribute("y", 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", @@ -107,7 +107,7 @@ void DiaPathParser::svgCurveToCubic( double x1, double y1, double x2, double y2, kivioPointElement.setAttribute("y", 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", @@ -115,7 +115,7 @@ void DiaPathParser::svgCurveToCubic( double x1, double y1, double x2, double y2, kivioPointElement.setAttribute("y", 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", @@ -123,7 +123,7 @@ void DiaPathParser::svgCurveToCubic( double x1, double y1, double x2, double y2, kivioPointElement.setAttribute("y", 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 5308c468..0a9439f6 100644 --- a/kivio/kiviopart/kiviosdk/diapathparser.h +++ b/kivio/kiviopart/kiviosdk/diapathparser.h @@ -41,7 +41,7 @@ class DiaPointFinder : public SVGPathParser class DiaPathParser : public SVGPathParser { public: - DiaPathParser(TQDomDocument *doc, TQDomElement *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 ); @@ -52,7 +52,7 @@ class DiaPathParser : public SVGPathParser float diaPointToKivio(float point, bool xpoint); TQDomDocument *m_doc; - TQDomElement *m_shape; + TQDomElement *m_tqshape; float lastX; float lastY; float m_xscale; diff --git a/kivio/kiviopart/kiviosdk/kivio_1d_stencil.h b/kivio/kiviopart/kiviosdk/kivio_1d_stencil.h index 8162bcd2..b42d650b 100644 --- a/kivio/kiviopart/kiviosdk/kivio_1d_stencil.h +++ b/kivio/kiviopart/kiviosdk/kivio_1d_stencil.h @@ -124,7 +124,7 @@ public: virtual void customDrag( KivioCustomDragData * ); - // geometry management + // tqgeometry management virtual void updateGeometry(); virtual void updateConnectorPoints( KivioConnectorPoint *, double, double ); diff --git a/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.h b/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.h index 1e0a76de..f7e2dddb 100644 --- a/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.h +++ b/kivio/kiviopart/kiviosdk/kivio_base_connector_stencil.h @@ -100,7 +100,7 @@ public: virtual void customDrag( KivioCustomDragData * ); - // geometry management + // tqgeometry management virtual void updateGeometry(); diff --git a/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.cpp b/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.cpp index b290fb62..e41f5788 100644 --- a/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_base_target_stencil.cpp @@ -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; diff --git a/kivio/kiviopart/kiviosdk/kivio_common.cpp b/kivio/kiviopart/kiviosdk/kivio_common.cpp index 3dd8b428..b67efc23 100644 --- a/kivio/kiviopart/kiviosdk/kivio_common.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_common.cpp @@ -330,7 +330,7 @@ void XmlWriteDouble( TQDomElement &e, const TQString &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 */ @@ -423,7 +423,7 @@ KoRect XmlReadRect( const TQDomElement &e, const TQString &att, const KoRect &de void XmlWriteRect( TQDomElement &e, const TQString &att, const KoRect &val ) { - e.setAttribute( att, TQString("[%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_connector_point.cpp b/kivio/kiviopart/kiviosdk/kivio_connector_point.cpp index d408bee6..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 ) { diff --git a/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.cpp b/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.cpp index ada33c4c..4407d2d0 100644 --- a/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_dia_stencil_spawner.cpp @@ -83,7 +83,7 @@ bool KivioDiaStencilSpawner::load(const TQString &file) return false; } dia.setContent(&f); - TQDomNode diaMain = dia.namedItem("shape"); + TQDomNode diaMain = dia.namedItem("tqshape"); // Set "creator" attribute TQDomElement firstElement = kivio.createElement("KivioShapeStencil"); @@ -250,7 +250,7 @@ bool KivioDiaStencilSpawner::load(const TQString &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); } @@ -294,7 +294,7 @@ bool KivioDiaStencilSpawner::load(const TQString &file) { TQDomElement kivioShape = kivio.createElement("KivioShape"); kivioShape.setAttribute("type", "Rectangle"); - kivioShape.setAttribute("name", TQString::fromLatin1("Element") + TQString::number(runs)); + 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)); @@ -309,7 +309,7 @@ bool KivioDiaStencilSpawner::load(const TQString &file) { TQDomElement kivioShape = kivio.createElement("KivioShape"); kivioShape.setAttribute("type", "Ellipse"); - kivioShape.setAttribute("name", TQString::fromLatin1("Element") + TQString::number(runs)); + 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)); @@ -324,7 +324,7 @@ bool KivioDiaStencilSpawner::load(const TQString &file) { TQDomElement kivioShape = kivio.createElement("KivioShape"); kivioShape.setAttribute("type", "Ellipse"); - kivioShape.setAttribute("name", TQString::fromLatin1("Element") + TQString::number(runs)); + 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)); @@ -339,7 +339,7 @@ bool KivioDiaStencilSpawner::load(const TQString &file) { TQDomElement kivioShape = kivio.createElement("KivioShape"); kivioShape.setAttribute("type", "LineArray"); - kivioShape.setAttribute("name", TQString::fromLatin1("Element") + TQString::number(runs)); + kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs)); TQDomElement lineArrayElement = kivio.createElement("Line"); lineArrayElement.setAttribute("x1", TQString::number(diaPointToKivio(svgChild.attribute("x1").toFloat(),true) * m_xscale)); @@ -358,7 +358,7 @@ bool KivioDiaStencilSpawner::load(const TQString &file) { TQDomElement kivioShape = kivio.createElement("KivioShape"); kivioShape.setAttribute("type", "Polyline"); - kivioShape.setAttribute("name", TQString::fromLatin1("Element") + TQString::number(runs)); + kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs)); TQStringList points = TQStringList::split(" ", svgChild.attribute("points")); for(TQStringList::Iterator it = points.begin(); it != points.end(); ++it) @@ -387,7 +387,7 @@ bool KivioDiaStencilSpawner::load(const TQString &file) { TQDomElement kivioShape = kivio.createElement("KivioShape"); kivioShape.setAttribute("type", "Polygon"); - kivioShape.setAttribute("name", TQString::fromLatin1("Element") + TQString::number(runs)); + kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs)); TQStringList points = TQStringList::split(" ", svgChild.attribute("points")); for(TQStringList::Iterator it = points.begin(); it != points.end(); ++it) @@ -428,7 +428,7 @@ bool KivioDiaStencilSpawner::load(const TQString &file) kivioShape.setAttribute("type", "OpenPath"); } - kivioShape.setAttribute("name", TQString::fromLatin1("Element") + TQString::number(runs)); + kivioShape.setAttribute("name", TQString::tqfromLatin1("Element") + TQString::number(runs)); DiaPathParser *dpp = new DiaPathParser(&kivio, &kivioShape, m_xscale, m_yscale, diff --git a/kivio/kiviopart/kiviosdk/kivio_fill_style.h b/kivio/kiviopart/kiviosdk/kivio_fill_style.h index ea776f20..4be7303b 100644 --- a/kivio/kiviopart/kiviosdk/kivio_fill_style.h +++ b/kivio/kiviopart/kiviosdk/kivio_fill_style.h @@ -19,7 +19,7 @@ #ifndef KIVIO_FILL_STYLE_H #define KIVIO_FILL_STYLE_H -#include <brush.h> +#include <tqbrush.h> #include <tqcolor.h> #include <tqdom.h> diff --git a/kivio/kiviopart/kiviosdk/kivio_py_stencil.cpp b/kivio/kiviopart/kiviosdk/kivio_py_stencil.cpp index f966dc07..cc8eb0e3 100644 --- a/kivio/kiviopart/kiviosdk/kivio_py_stencil.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_py_stencil.cpp @@ -25,7 +25,7 @@ KivioView *view; #include "kivio_page.h" #include <tqpainter.h> -#include <brush.h> +#include <tqbrush.h> #include <tqcolor.h> #include <kdebug.h> #include <math.h> @@ -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 = ""; } @@ -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; - TQString 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 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++ ) { @@ -470,7 +470,7 @@ void KivioPyStencil::paint( KivioIntraStencilData *d, bool outlined ) f.setPointSizeFloat(f.pointSizeFloat() * (((float)zoomHandler->zoom()) / 100.0)); d->painter->setFont( f ); - TQString text = getStringFromDict(shape,"text"); + TQString text = getStringFromDict(tqshape,"text"); if ( !text.isEmpty() ) { d->painter->drawText( int( x ), int( y ), int( w ), int( h ), tf | TQt::WordBreak, text ); @@ -478,14 +478,14 @@ void KivioPyStencil::paint( KivioIntraStencilData *d, bool outlined ) } 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 ); @@ -924,7 +924,7 @@ void KivioPyStencil::setLineWidth( double w ) 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() )); } @@ -932,7 +932,7 @@ void KivioPyStencil::setText( const TQString &s ) 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"); } diff --git a/kivio/kiviopart/kiviosdk/kivio_screen_painter.cpp b/kivio/kiviopart/kiviosdk/kivio_screen_painter.cpp index 307a86e3..07f005fa 100644 --- a/kivio/kiviopart/kiviosdk/kivio_screen_painter.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_screen_painter.cpp @@ -23,9 +23,9 @@ #include <tqimage.h> #include <tqpen.h> -#include <brush.h> +#include <tqbrush.h> #include <tqsimplerichtext.h> -#include <palette.h> +#include <tqpalette.h> #include <kdebug.h> @@ -549,7 +549,7 @@ void KivioScreenPainter::drawPolyline( TQPointArray &pArray ) m_pPainter->setPen(m_pLineStyle->pen(1.0f)); m_pPainter->setBrush( TQBrush::NoBrush ); - m_pPainter->drawPolyline( pArray, 0, pArray.size() ); + m_pPainter->tqdrawPolyline( pArray, 0, pArray.size() ); } void KivioScreenPainter::drawPolygon( TQPointArray &pArray ) @@ -586,7 +586,7 @@ void KivioScreenPainter::drawPolygon( TQPointArray &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); } diff --git a/kivio/kiviopart/kiviosdk/kivio_shape.cpp b/kivio/kiviopart/kiviosdk/kivio_shape.cpp index 302c6547..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) ); } @@ -84,13 +84,13 @@ bool KivioShape::loadXML( const TQDomElement &e ) TQDomNode node = e.firstChild(); TQString name = XmlReadString( e, "name", "" ); - m_shapeData.setName( name ); - m_shapeData.setShapeType( (KivioShapeData::KivioShapeType)XmlReadInt( e, "shapeType", -1 )); + 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; } @@ -101,7 +101,7 @@ bool KivioShape::loadXML( const TQDomElement &e ) if( nodeName == "KivioShapeData" ) { - m_shapeData.loadXML( ele ); + m_tqshapeData.loadXML( ele ); } node = node.nextSibling(); @@ -120,17 +120,17 @@ TQDomElement KivioShape::saveXML( TQDomDocument &doc ) { 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. @@ -144,7 +144,7 @@ KivioShape *KivioShape::loadShapeArc( const TQDomElement & ) /** - * 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. @@ -157,12 +157,12 @@ KivioShape *KivioShape::loadShapeClosedPath( const TQDomElement &e ) 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 TQDomElement &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,7 +196,7 @@ KivioShape *KivioShape::loadShapeClosedPath( const TQDomElement &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. @@ -209,12 +209,12 @@ KivioShape *KivioShape::loadShapeBezier( const TQDomElement &e ) 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 TQDomElement &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,7 +258,7 @@ KivioShape *KivioShape::loadShapeBezier( const TQDomElement &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. @@ -270,15 +270,15 @@ KivioShape *KivioShape::loadShapeEllipse( const TQDomElement &e ) 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 TQDomElement &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,7 +303,7 @@ KivioShape *KivioShape::loadShapeEllipse( const TQDomElement &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. @@ -317,12 +317,12 @@ KivioShape *KivioShape::loadShapeLineArray( const TQDomElement &e ) 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 TQDomElement &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,7 +355,7 @@ KivioShape *KivioShape::loadShapeLineArray( const TQDomElement &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. @@ -368,12 +368,12 @@ KivioShape *KivioShape::loadShapeOpenPath( const TQDomElement &e ) 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 TQDomElement &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,7 +403,7 @@ KivioShape *KivioShape::loadShapeOpenPath( const TQDomElement &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. @@ -417,7 +417,7 @@ KivioShape *KivioShape::loadShapePie( const TQDomElement & ) /** - * 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. @@ -430,12 +430,12 @@ KivioShape *KivioShape::loadShapePolygon( const TQDomElement &e ) 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 TQDomElement &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,7 +469,7 @@ KivioShape *KivioShape::loadShapePolygon( const TQDomElement &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. @@ -482,12 +482,12 @@ KivioShape *KivioShape::loadShapePolyline( const TQDomElement &e ) 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 TQDomElement &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,7 +517,7 @@ KivioShape *KivioShape::loadShapePolyline( const TQDomElement &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. @@ -529,15 +529,15 @@ KivioShape *KivioShape::loadShapeRectangle( const TQDomElement &e ) 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 TQDomElement &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,7 +564,7 @@ KivioShape *KivioShape::loadShapeRectangle( const TQDomElement &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. @@ -577,20 +577,20 @@ KivioShape *KivioShape::loadShapeRoundRectangle( const TQDomElement &e ) 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 TQDomElement &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,7 +616,7 @@ KivioShape *KivioShape::loadShapeRoundRectangle( const TQDomElement &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. @@ -630,17 +630,17 @@ KivioShape *KivioShape::loadShapeTextBox( const TQDomElement &e ) 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",TQColor(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 TQDomElement &e ) if( nodeName == "KivioTextStyle" ) { ts.loadXML( node.toElement() ); - pShape->m_shapeData.setTextStyle( &ts ); + pShape->m_tqshapeData.setTextStyle( &ts ); } node = node.nextSibling(); } // TQString text = XmlReadString( e, "text", "" ); -// pShape->m_shapeData.setText( 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 42adfed6..c83607d7 100644 --- a/kivio/kiviopart/kiviosdk/kivio_shape.h +++ b/kivio/kiviopart/kiviosdk/kivio_shape.h @@ -26,7 +26,7 @@ class KivioShape { protected: - KivioShapeData m_shapeData; // The data inside this shape + KivioShapeData m_tqshapeData; // The data inside this tqshape public: KivioShape(); @@ -39,9 +39,9 @@ public: bool loadXML( const TQDomElement & ); TQDomElement saveXML( TQDomDocument & ); - KivioShapeData::KivioShapeType shapeType() { return m_shapeData.shapeType(); } + KivioShapeData::KivioShapeType tqshapeType() { return m_tqshapeData.tqshapeType(); } - KivioShapeData *shapeData() { return &m_shapeData; } + KivioShapeData *tqshapeData() { return &m_tqshapeData; } static KivioShape *loadShapeArc( const TQDomElement & ); static KivioShape *loadShapeClosedPath( const TQDomElement & ); diff --git a/kivio/kiviopart/kiviosdk/kivio_shape_data.cpp b/kivio/kiviopart/kiviosdk/kivio_shape_data.cpp index 431d7987..5305fe13 100644 --- a/kivio/kiviopart/kiviosdk/kivio_shape_data.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_shape_data.cpp @@ -27,7 +27,7 @@ #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 }, @@ -84,7 +84,7 @@ KivioShapeData::KivioShapeData() m_pLineStyle = new KivioLineStyle(); // m_fgColor = TQColor( 0, 0, 0 ); - m_shapeType = kstNone; + m_tqshapeType = kstNone; m_name = ""; // m_lineWidth = 1.0f; @@ -119,7 +119,7 @@ KivioShapeData::KivioShapeData( const KivioShapeData &source ) //m_fgColor = source.m_fgColor; // Copy the rest - m_shapeType = source.m_shapeType; + m_tqshapeType = source.m_tqshapeType; m_name = TQString(source.m_name); //m_lineWidth = source.m_lineWidth; @@ -127,8 +127,8 @@ KivioShapeData::KivioShapeData( const KivioShapeData &source ) 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(); @@ -208,7 +208,7 @@ void KivioShapeData::copyInto( KivioShapeData *pTarget ) const //pTarget->m_fgColor = m_fgColor; // Copy the rest - pTarget->m_shapeType = m_shapeType; + pTarget->m_tqshapeType = m_tqshapeType; pTarget->m_name = TQString(m_name); //pTarget->m_lineWidth = m_lineWidth; @@ -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 ) { @@ -283,7 +283,7 @@ bool KivioShapeData::loadXML( const TQDomElement &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,12 +291,12 @@ bool KivioShapeData::loadXML( const TQDomElement &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; @@ -338,7 +338,7 @@ bool KivioShapeData::loadXML( const TQDomElement &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; @@ -385,7 +385,7 @@ TQDomElement KivioShapeData::saveXML( TQDomDocument &doc ) // Save if we are a text box etc... - if( m_shapeType == kstTextBox ) + if( m_tqshapeType == kstTextBox ) { if( m_pTextData ) { @@ -420,21 +420,21 @@ TQDomElement KivioShapeData::saveXML( TQDomDocument &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 TQString &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 TQStri 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 ) diff --git a/kivio/kiviopart/kiviosdk/kivio_shape_data.h b/kivio/kiviopart/kiviosdk/kivio_shape_data.h index bd89dcc8..f97e5ec9 100644 --- a/kivio/kiviopart/kiviosdk/kivio_shape_data.h +++ b/kivio/kiviopart/kiviosdk/kivio_shape_data.h @@ -36,11 +36,11 @@ class KivioTextShapeData public: KivioTextShapeData(); - TQString m_text; // The text inside this shape + 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; //Qt::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, @@ -75,7 +75,7 @@ protected: 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 @@ -83,7 +83,7 @@ protected: // float m_lineWidth; // The line width KivioLineStyle *m_pLineStyle; - TQString 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) @@ -98,10 +98,10 @@ public: virtual TQDomElement saveXML( TQDomDocument & ); - KivioShapeType shapeType() const { return m_shapeType; } + KivioShapeType tqshapeType() const { return m_tqshapeType; } void setShapeType( KivioShapeType st ); - static KivioShapeType shapeTypeFromString( const TQString & ); + static KivioShapeType tqshapeTypeFromString( const TQString & ); TQPtrList<KivioPoint> *pointList() { return m_pOriginalPointList; } diff --git a/kivio/kiviopart/kiviosdk/kivio_shape_painter.cpp b/kivio/kiviopart/kiviosdk/kivio_shape_painter.cpp index f1ca2c8f..fbdad979 100644 --- a/kivio/kiviopart/kiviosdk/kivio_shape_painter.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_shape_painter.cpp @@ -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_sml_stencil.cpp b/kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp index 035ede78..6f00df1a 100644 --- a/kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_sml_stencil.cpp @@ -37,9 +37,9 @@ #include <tqdom.h> #include <tqpainter.h> -#include <brush.h> +#include <tqbrush.h> #include <tqcolor.h> -#include <palette.h> +#include <tqpalette.h> #include <tqrect.h> #include <tqbitmap.h> #include <kdebug.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(), @@ -111,7 +111,7 @@ bool KivioSMLStencil::loadXML( const TQDomElement &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) { @@ -173,7 +173,7 @@ void KivioSMLStencil::loadConnectorTargetListXML( const TQDomElement &e ) /** - * Locates a shape in the shape list by name. + * Locates a tqshape in the tqshape list by name. */ KivioShape *KivioSMLStencil::locateShape( const TQString &name ) { @@ -185,7 +185,7 @@ KivioShape *KivioSMLStencil::locateShape( const TQString &name ) pShape = m_pShapeList->first(); while( pShape ) { - if( pShape->shapeData()->name() == name ) + if( pShape->tqshapeData()->name() == name ) { return pShape; } @@ -233,7 +233,7 @@ TQDomElement KivioSMLStencil::saveXML( TQDomDocument &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,14 +420,14 @@ 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; TQPtrList <KivioPoint> *pPointList = pShapeData->pointList(); @@ -456,7 +456,7 @@ 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(); @@ -487,7 +487,7 @@ 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(); @@ -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(); @@ -546,7 +546,7 @@ void KivioSMLStencil::drawOutlineLineArray( KivioShape *pShape, KivioIntraStenci KivioShapeData *pShapeData; TQPtrList <KivioPoint> *pList; - pShapeData = pShape->shapeData(); + pShapeData = pShape->tqshapeData(); defWidth = m_pSpawner->defWidth(); defHeight = m_pSpawner->defHeight(); @@ -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(); @@ -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(); @@ -643,7 +643,7 @@ void KivioSMLStencil::drawOutlinePolygon( KivioShape *pShape, KivioIntraStencilD KivioShapeData *pShapeData; TQPtrList <KivioPoint> *pList; - pShapeData = pShape->shapeData(); + pShapeData = pShape->tqshapeData(); defWidth = m_pSpawner->defWidth(); defHeight = m_pSpawner->defHeight(); @@ -679,7 +679,7 @@ void KivioSMLStencil::drawOutlinePolyline( KivioShape *pShape, KivioIntraStencil KivioShapeData *pShapeData; TQPtrList <KivioPoint> *pList; - pShapeData = pShape->shapeData(); + pShapeData = pShape->tqshapeData(); defWidth = m_pSpawner->defWidth(); defHeight = m_pSpawner->defHeight(); @@ -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; @@ -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 ); @@ -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,14 +915,14 @@ 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; TQPtrList <KivioPoint> *pPointList = pShapeData->pointList(); @@ -954,7 +954,7 @@ 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(); @@ -988,7 +988,7 @@ 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(); @@ -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(); @@ -1089,7 +1089,7 @@ void KivioSMLStencil::drawLineArray( KivioShape *pShape, KivioIntraStencilData * KivioShapeData *pShapeData; TQPtrList <KivioPoint> *pList; - pShapeData = pShape->shapeData(); + pShapeData = pShape->tqshapeData(); defWidth = m_pSpawner->defWidth(); defHeight = m_pSpawner->defHeight(); @@ -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(); @@ -1221,7 +1221,7 @@ void KivioSMLStencil::drawPolygon( KivioShape *pShape, KivioIntraStencilData *pD KivioShapeData *pShapeData; TQPtrList <KivioPoint> *pList; - pShapeData = pShape->shapeData(); + pShapeData = pShape->tqshapeData(); defWidth = m_pSpawner->defWidth(); defHeight = m_pSpawner->defHeight(); @@ -1280,7 +1280,7 @@ void KivioSMLStencil::drawPolyline( KivioShape *pShape, KivioIntraStencilData *p KivioShapeData *pShapeData; TQPtrList <KivioPoint> *pList; - pShapeData = pShape->shapeData(); + pShapeData = pShape->tqshapeData(); defWidth = m_pSpawner->defWidth(); defHeight = m_pSpawner->defHeight(); @@ -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; @@ -1358,7 +1358,7 @@ void KivioSMLStencil::setFGColor( TQColor c ) pShape = m_pShapeList->first(); while( pShape ) { - pShape->shapeData()->lineStyle()->setColor( c ); + pShape->tqshapeData()->lineStyle()->setColor( c ); pShape = m_pShapeList->next(); } @@ -1375,7 +1375,7 @@ void KivioSMLStencil::setBGColor( TQColor c ) 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(); } @@ -1405,7 +1405,7 @@ void KivioSMLStencil::setTextColor( TQColor c ) pShape = m_pShapeList->first(); while( pShape ) { - pShape->shapeData()->setTextColor( c ); + pShape->tqshapeData()->setTextColor( c ); pShape = m_pShapeList->next(); } @@ -1422,7 +1422,7 @@ void KivioSMLStencil::setTextFont( const TQFont &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. @@ -1590,9 +1590,9 @@ TQFont KivioSMLStencil::textFont() 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(); @@ -1609,9 +1609,9 @@ TQColor KivioSMLStencil::textColor() 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(); @@ -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(); @@ -1712,9 +1712,9 @@ TQString KivioSMLStencil::text() 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(); @@ -1734,9 +1734,9 @@ void KivioSMLStencil::setText( const TQString &t ) 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; } @@ -1777,7 +1777,7 @@ TQColor KivioSMLStencil::fgColor() pShape = m_pShapeList->first(); if( pShape ) - return pShape->shapeData()->lineStyle()->color(); + return pShape->tqshapeData()->lineStyle()->color(); return TQColor(0,0,0); } @@ -1792,7 +1792,7 @@ TQColor KivioSMLStencil::bgColor() pShape = m_pShapeList->first(); if( pShape ) - return pShape->shapeData()->fillStyle()->color(); + return pShape->tqshapeData()->fillStyle()->color(); return TQColor(0,0,0); } @@ -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; } @@ -1923,7 +1923,7 @@ bool KivioSMLStencil::checkCollisionPolygon( KivioShape *pShape, KoPoint *pCheck TQPtrList<KivioPoint> *pList; KoPoint *pPoints; - pShapeData = pShape->shapeData(); + pShapeData = pShape->tqshapeData(); defWidth = m_pSpawner->defWidth(); defHeight = m_pSpawner->defHeight(); @@ -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,7 +2012,7 @@ void KivioSMLStencil::setLineStyle(KivioLineStyle ls) while( pShape ) { - pShape->shapeData()->setLineStyle(ls);; + pShape->tqshapeData()->setLineStyle(ls);; pShape = m_pShapeList->next(); } } @@ -2032,12 +2032,12 @@ TQString 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 @@ TQString 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,7 +2063,7 @@ TQString KivioSMLStencil::getTextBoxName(const KoPoint& p) } if(first) { - return first->shapeData()->name(); + return first->tqshapeData()->name(); } return TQString(); @@ -2075,9 +2075,9 @@ void KivioSMLStencil::setText(const TQString& text, const TQString& name) while(pShape) { - if(pShape->shapeData()->name() == name) + if(pShape->tqshapeData()->name() == name) { - pShape->shapeData()->setText(text); + pShape->tqshapeData()->setText(text); return; } @@ -2091,9 +2091,9 @@ TQString KivioSMLStencil::text(const TQString& name) while(pShape) { - if(pShape->shapeData()->name() == name) + if(pShape->tqshapeData()->name() == name) { - return pShape->shapeData()->text(); + return pShape->tqshapeData()->text(); } pShape = m_pShapeList->next(); @@ -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; } @@ -2140,89 +2140,89 @@ bool KivioSMLStencil::hasTextBox() const 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 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); } 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 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 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 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 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 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 c9ebcc6c..30e53e93 100644 --- a/kivio/kiviopart/kiviosdk/kivio_sml_stencil.h +++ b/kivio/kiviopart/kiviosdk/kivio_sml_stencil.h @@ -101,7 +101,7 @@ public: virtual bool loadXML( const TQDomElement & ); virtual TQDomElement saveXML( TQDomDocument & ); - virtual TQPtrList<KivioShape> *shapeList() { return m_pShapeList; } + virtual TQPtrList<KivioShape> *tqshapeList() { return m_pShapeList; } virtual KivioShape *subSelection() { return m_pSubSelection; } virtual void paintOutline( KivioIntraStencilData * ); diff --git a/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp b/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp index d18caae8..588a468e 100644 --- a/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_sml_stencil_spawner.cpp @@ -164,15 +164,15 @@ bool KivioSMLStencilSpawner::loadXML( const TQString &file, TQDomDocument &d ) /** - * Loads a shape from an XML node. + * Loads a tqshape from an XML node. */ -void KivioSMLStencilSpawner::loadShape( TQDomNode &shapeNode ) +void KivioSMLStencilSpawner::loadShape( TQDomNode &tqshapeNode ) { KivioShapeData::KivioShapeType t; KivioShape *pShape = NULL; - TQDomElement 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( TQDomNode &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_stencil_spawner_set.cpp b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.cpp index 0fdd2ac1..c2e54a58 100644 --- a/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_stencil_spawner_set.cpp @@ -104,7 +104,7 @@ bool KivioStencilSpawnerSet::loadDir( const TQString &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; @@ -134,7 +134,7 @@ KivioStencilSpawner* KivioStencilSpawnerSet::loadFile( const TQString &fileName { pSpawner = new KivioPyStencilSpawner(this); } - else if( fileName.contains( ".shape", false ) ) + else if( fileName.contains( ".tqshape", false ) ) { pSpawner = new KivioDiaStencilSpawner(this); } diff --git a/kivio/kiviopart/kiviosdk/kivio_text_style.h b/kivio/kiviopart/kiviosdk/kivio_text_style.h index 73c13e0e..2a8ecd62 100644 --- a/kivio/kiviopart/kiviosdk/kivio_text_style.h +++ b/kivio/kiviopart/kiviosdk/kivio_text_style.h @@ -14,11 +14,11 @@ class TQPainter; class KivioTextStyle { protected: - TQString m_text; // The text inside this shape + 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; //Qt::Horizontal and vertical text alignment flags + int m_hTextAlign, m_vTextAlign; //Qt::Horizontal and vertical text tqalignment flags public: KivioTextStyle(); |