diff options
Diffstat (limited to 'kpresenter/KPrPointObject.cpp')
-rw-r--r-- | kpresenter/KPrPointObject.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/kpresenter/KPrPointObject.cpp b/kpresenter/KPrPointObject.cpp index 5295228b..a1fb0564 100644 --- a/kpresenter/KPrPointObject.cpp +++ b/kpresenter/KPrPointObject.cpp @@ -24,8 +24,8 @@ #include "KPrSVGPathParser.h" #include <KoTextZoomHandler.h> #include <KoUnit.h> -#include <qdom.h> -#include <qpainter.h> +#include <tqdom.h> +#include <tqpainter.h> #include <KoStyleStack.h> #include <KoOasisContext.h> #include <KoXmlNS.h> @@ -62,12 +62,12 @@ KoPoint KPrPointObject::getRealOrig() const } -void KPrPointObject::loadOasis( const QDomElement &element, KoOasisContext & context, KPrLoadingInfo* info ) +void KPrPointObject::loadOasis( const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo* info ) { kdDebug(33001) << "KPrPointObject::loadOasis" << endl; KPrShadowObject::loadOasis( element, context, info ); - QString d = element.attributeNS( KoXmlNS::svg, "d", QString::null); + TQString d = element.attributeNS( KoXmlNS::svg, "d", TQString()); kdDebug(33001) << "path d: " << d << endl; KPrSVGPathParser parser; @@ -76,14 +76,14 @@ void KPrPointObject::loadOasis( const QDomElement &element, KoOasisContext & con } -QDomDocumentFragment KPrPointObject::save( QDomDocument& doc, double offset ) +TQDomDocumentFragment KPrPointObject::save( TQDomDocument& doc, double offset ) { - QDomDocumentFragment fragment = KPrShadowObject::save( doc, offset ); + TQDomDocumentFragment fragment = KPrShadowObject::save( doc, offset ); if ( !points.isNull() ) { - QDomElement elemPoints = doc.createElement( "POINTS" ); + TQDomElement elemPoints = doc.createElement( "POINTS" ); KoPointArray::ConstIterator it; for ( it = points.begin(); it != points.end(); ++it ) { - QDomElement elemPoint = doc.createElement( "Point" ); + TQDomElement elemPoint = doc.createElement( "Point" ); KoPoint point = (*it); elemPoint.setAttribute( "point_x", point.x() ); elemPoint.setAttribute( "point_y", point.y() ); @@ -100,7 +100,7 @@ QDomDocumentFragment KPrPointObject::save( QDomDocument& doc, double offset ) const char * KPrPointObject::getOasisElementName() const { - return "draw:custom-shape"; + return "draw:custom-tqshape"; } void KPrPointObject::loadOasisMarker( KoOasisContext & context ) @@ -116,13 +116,13 @@ void KPrPointObject::fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainSt } -double KPrPointObject::load( const QDomElement &element ) +double KPrPointObject::load( const TQDomElement &element ) { double offset = KPrShadowObject::load( element ); - QDomElement e = element.namedItem( "POINTS" ).toElement(); + TQDomElement e = element.namedItem( "POINTS" ).toElement(); if ( !e.isNull() ) { - QDomElement elemPoint = e.firstChild().toElement(); + TQDomElement elemPoint = e.firstChild().toElement(); unsigned int index = 0; while ( !elemPoint.isNull() ) { if ( elemPoint.tagName() == "Point" ) { @@ -193,35 +193,35 @@ void KPrPointObject::flip( bool horizontal ) } -void KPrPointObject::paint( QPainter* _painter, KoTextZoomHandler*_zoomHandler, +void KPrPointObject::paint( TQPainter* _painter, KoTextZoomHandler*_zoomHandler, int /* pageNum */, bool /*drawingShadow*/, bool drawContour ) { int _w = int( pen.pointWidth() ); - QPen pen2; + TQPen pen2; if ( drawContour ) { - pen2 = QPen( Qt::black, 1, Qt::DotLine ); - _painter->setRasterOp( Qt::NotXorROP ); + pen2 = TQPen( TQt::black, 1, TQt::DotLine ); + _painter->setRasterOp( TQt::NotXorROP ); } else { pen2 = pen.zoomedPen( _zoomHandler ); } _painter->setPen( pen2 ); - QPointArray pointArray = getDrawingPoints().zoomPointArray( _zoomHandler, _w ); + TQPointArray pointArray = getDrawingPoints().zoomPointArray( _zoomHandler, _w ); _painter->drawPolyline( pointArray ); if ( lineBegin != L_NORMAL && !drawContour ) { - QPoint startPoint; + TQPoint startPoint; bool first = true; - QPointArray::ConstIterator it1; + TQPointArray::ConstIterator it1; for ( it1 = pointArray.begin(); it1 != pointArray.end(); ++it1 ) { if ( first ) { startPoint = (*it1); first = false; } - QPoint point = (*it1); + TQPoint point = (*it1); if ( startPoint != point ) { float angle = KoPoint::getAngle( KoPoint( startPoint ), KoPoint( point ) ); drawFigureWithOffset( lineBegin, _painter, startPoint, pen2.color(), _w, angle,_zoomHandler ); @@ -232,16 +232,16 @@ void KPrPointObject::paint( QPainter* _painter, KoTextZoomHandler*_zoomHandler, } if ( lineEnd != L_NORMAL && !drawContour ) { - QPoint endPoint; + TQPoint endPoint; bool last = true; - QPointArray::ConstIterator it2 = pointArray.end(); + TQPointArray::ConstIterator it2 = pointArray.end(); for ( it2 = it2 - 1; it2 != pointArray.begin(); --it2 ) { if ( last ) { endPoint = (*it2); last = false; } - QPoint point = (*it2); + TQPoint point = (*it2); if ( endPoint != point ) { float angle = KoPoint::getAngle( KoPoint( endPoint ), KoPoint( point ) ); drawFigureWithOffset( lineEnd, _painter, endPoint, pen2.color(), _w, angle,_zoomHandler ); |