summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrClosedLineObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpresenter/KPrClosedLineObject.cpp')
-rw-r--r--kpresenter/KPrClosedLineObject.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/kpresenter/KPrClosedLineObject.cpp b/kpresenter/KPrClosedLineObject.cpp
index 4e11006a..be409183 100644
--- a/kpresenter/KPrClosedLineObject.cpp
+++ b/kpresenter/KPrClosedLineObject.cpp
@@ -25,12 +25,12 @@
#include "KPrSVGPathParser.h"
#include <KoTextZoomHandler.h>
#include <kdebug.h>
-#include <qbitmap.h>
-#include <qregion.h>
-#include <qregexp.h>
-#include <qdom.h>
-#include <qpicture.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqregion.h>
+#include <tqregexp.h>
+#include <tqdom.h>
+#include <tqpicture.h>
+#include <tqpainter.h>
#include <KoOasisContext.h>
#include <math.h>
#include <KoUnit.h>
@@ -44,9 +44,9 @@ KPrClosedLineObject::KPrClosedLineObject()
{
}
-KPrClosedLineObject::KPrClosedLineObject( const KoPointArray &_points, const KoSize &_size, const KoPen &_pen, const QBrush &_brush,
- FillType _fillType, const QColor &_gColor1, const QColor &_gColor2, BCType _gType,
- bool _unbalanced, int _xfactor, int _yfactor, const QString _typeString )
+KPrClosedLineObject::KPrClosedLineObject( const KoPointArray &_points, const KoSize &_size, const KoPen &_pen, const TQBrush &_brush,
+ FillType _fillType, const TQColor &_gColor1, const TQColor &_gColor2, BCType _gType,
+ bool _unbalanced, int _xfactor, int _yfactor, const TQString _typeString )
: KPr2DObject( _pen, _brush, _fillType, _gColor1, _gColor2, _gType, _unbalanced, _xfactor, _yfactor )
{
points = KoPointArray( _points );
@@ -55,7 +55,7 @@ KPrClosedLineObject::KPrClosedLineObject( const KoPointArray &_points, const KoS
}
KPrClosedLineObject::KPrClosedLineObject( const KPrPointObject &object )
-: KPr2DObject( object.getPen(), QBrush::NoBrush, FT_BRUSH, QColor(), QColor(), BCT_PLAIN, false, 0, 0 )
+: KPr2DObject( object.getPen(), Qt::NoBrush, FT_BRUSH, TQColor(), TQColor(), BCT_PLAIN, false, 0, 0 )
{
ext = object.getSize();
orig = object.getOrig();
@@ -73,7 +73,7 @@ KPrClosedLineObject::KPrClosedLineObject( const KPrPointObject &object )
case OT_CUBICBEZIERCURVE:
typeString = i18n( "Closed Cubic Bezier Curve" );
break;
- case OT_QUADRICBEZIERCURVE:
+ case OT_TQUADRICBEZIERCURVE:
typeString = i18n( "Closed Quadric Bezier Curve" );
break;
default:
@@ -96,21 +96,21 @@ DCOPObject* KPrClosedLineObject::dcopObject()
}
#endif
-QDomDocumentFragment KPrClosedLineObject::save( QDomDocument& doc, double offset )
+TQDomDocumentFragment KPrClosedLineObject::save( TQDomDocument& doc, double offset )
{
- QDomDocumentFragment fragment = KPr2DObject::save( doc, offset );
+ TQDomDocumentFragment fragment = KPr2DObject::save( doc, offset );
- QDomElement elemObjectsName = doc.createElement( "OBJECTSNAME" );
+ TQDomElement elemObjectsName = doc.createElement( "OBJECTSNAME" );
elemObjectsName.setAttribute( "NAME", typeString );
fragment.appendChild( elemObjectsName );
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() );
@@ -135,11 +135,11 @@ const char * KPrClosedLineObject::getOasisElementName() const
}
-double KPrClosedLineObject::load( const QDomElement &element )
+double KPrClosedLineObject::load( const TQDomElement &element )
{
double offset = KPr2DObject::load( element );
- QDomElement e = element.namedItem( "OBJECTSNAME" ).toElement();
+ TQDomElement e = element.namedItem( "OBJECTSNAME" ).toElement();
if ( !e.isNull() ) {
if ( e.hasAttribute( "NAME" ) )
typeString = e.attribute( "NAME" );
@@ -147,7 +147,7 @@ double KPrClosedLineObject::load( const QDomElement &element )
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" ) {
@@ -194,22 +194,22 @@ void KPrClosedLineObject::updatePoints( double _fx, double _fy )
points = tmpPoints;
}
-void KPrClosedLineObject::paint( QPainter* _painter,KoTextZoomHandler*_zoomHandler,
+void KPrClosedLineObject::paint( TQPainter* _painter,KoTextZoomHandler*_zoomHandler,
int /* pageNum */, bool drawingShadow, bool drawContour )
{
- int _w = ( pen.style() == Qt::NoPen ) ? 1 : int( pen.pointWidth() );
+ int _w = ( pen.style() == TQt::NoPen ) ? 1 : int( pen.pointWidth() );
if ( drawContour ) {
- QPointArray pointArray2 = points.zoomPointArray( _zoomHandler );
- QPen pen3( Qt::black, 1, Qt::DotLine );
+ TQPointArray pointArray2 = points.zoomPointArray( _zoomHandler );
+ TQPen pen3( TQt::black, 1, TQt::DotLine );
_painter->setPen( pen3 );
- _painter->setRasterOp( Qt::NotXorROP );
+ _painter->setRasterOp( TQt::NotXorROP );
_painter->drawPolygon( pointArray2 );
return;
}
- QPointArray pointArray = points.zoomPointArray( _zoomHandler, _w );
- QPen pen2 = pen.zoomedPen( _zoomHandler );
+ TQPointArray pointArray = points.zoomPointArray( _zoomHandler, _w );
+ TQPen pen2 = pen.zoomedPen( _zoomHandler );
if ( drawingShadow || getFillType() == FT_BRUSH || !gradient ) {
_painter->setPen( pen2 );
@@ -217,16 +217,16 @@ void KPrClosedLineObject::paint( QPainter* _painter,KoTextZoomHandler*_zoomHandl
_painter->drawPolygon( pointArray );
}
else {
- QSize size( _zoomHandler->zoomSize( ext ) );
+ TQSize size( _zoomHandler->zoomSize( ext ) );
if ( m_redrawGradientPix || gradient->size() != size )
{
m_redrawGradientPix = false;
gradient->setSize( size );
- QRegion clipregion( pointArray );
+ TQRegion clipregion( pointArray );
m_gradientPix.resize( size );
- m_gradientPix.fill( Qt::white );
+ m_gradientPix.fill( TQt::white );
- QPainter p;
+ TQPainter p;
p.begin( &m_gradientPix );
p.setClipRegion( clipregion );
p.drawPixmap( 0, 0, gradient->pixmap() );
@@ -235,11 +235,11 @@ void KPrClosedLineObject::paint( QPainter* _painter,KoTextZoomHandler*_zoomHandl
m_gradientPix.setMask( m_gradientPix.createHeuristicMask() );
}
- QRect _rect = pointArray.boundingRect();
+ TQRect _rect = pointArray.boundingRect();
_painter->drawPixmap( 0, 0, m_gradientPix, 0, 0, _rect.width(), _rect.height() );
_painter->setPen( pen2 );
- _painter->setBrush( Qt::NoBrush );
+ _painter->setBrush( TQt::NoBrush );
_painter->drawPolygon( pointArray );
}
}
@@ -279,32 +279,32 @@ void KPrClosedLineObject::flip( bool horizontal )
points = tmpPoints;
}
-void KPrClosedLineObject::loadOasis( const QDomElement &element, KoOasisContext & context, KPrLoadingInfo *info )
+void KPrClosedLineObject::loadOasis( const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info )
{
- kdDebug()<<"void KPrClosedLineObject::loadOasis( const QDomElement &element )***********\n";
+ kdDebug()<<"void KPrClosedLineObject::loadOasis( const TQDomElement &element )***********\n";
KPr2DObject::loadOasis( element,context, info );
- QString tag( element.tagName() );
+ TQString tag( element.tagName() );
if ( tag == "polygon" )
{
KPrShadowObject::loadOasisDrawPoints( points, element, context, info );
}
else if ( tag == "path" ) // this is used to load closed draw:path objects
{
- 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;
points = parser.getPoints( d, true );
loadOasisApplyViewBox( element, points );
}
- else if ( tag == "custom-shape" )
+ else if ( tag == "custom-tqshape" )
{
- QDomElement enhancedGeometry = KoDom::namedItemNS( element, KoXmlNS::draw, "enhanced-geometry" );
+ TQDomElement enhancedGeometry = KoDom::namedItemNS( element, KoXmlNS::draw, "enhanced-tqgeometry" );
if ( !enhancedGeometry.isNull() )
{
- QString d = enhancedGeometry.attributeNS( KoXmlNS::draw, "enhanced-path", QString::null );
- QRegExp rx( "^([0-9 MLZ]+)N$" );
+ TQString d = enhancedGeometry.attributeNS( KoXmlNS::draw, "enhanced-path", TQString() );
+ TQRegExp rx( "^([0-9 MLZ]+)N$" );
if ( rx.search( d ) != -1 )
{
d = rx.cap( 1 );