summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrPieObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpresenter/KPrPieObject.cpp')
-rw-r--r--kpresenter/KPrPieObject.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kpresenter/KPrPieObject.cpp b/kpresenter/KPrPieObject.cpp
index 9ed851096..efbe69534 100644
--- a/kpresenter/KPrPieObject.cpp
+++ b/kpresenter/KPrPieObject.cpp
@@ -30,11 +30,11 @@
#include <kdebug.h>
-#include <qregion.h>
-#include <qpicture.h>
-#include <qdom.h>
-#include <qpainter.h>
-#include <qbitmap.h>
+#include <tqregion.h>
+#include <tqpicture.h>
+#include <tqdom.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
using namespace std;
KPrPieObject::KPrPieObject()
@@ -46,8 +46,8 @@ KPrPieObject::KPrPieObject()
p_len = 270 * 16;
}
-KPrPieObject::KPrPieObject( const KoPen &_pen, const QBrush &_brush, FillType _fillType,
- const QColor &_gColor1, const QColor &_gColor2, BCType _gType,
+KPrPieObject::KPrPieObject( const KoPen &_pen, const TQBrush &_brush, FillType _fillType,
+ const TQColor &_gColor1, const TQColor &_gColor2, BCType _gType,
PieType _pieType, int _p_angle, int _p_len,
LineEnd _lineBegin, LineEnd _lineEnd,
bool _unbalanced, int _xfactor, int _yfactor )
@@ -71,9 +71,9 @@ KPrPieObject &KPrPieObject::operator=( const KPrPieObject & )
return *this;
}
-QDomDocumentFragment KPrPieObject::save( QDomDocument& doc, double offset )
+TQDomDocumentFragment KPrPieObject::save( TQDomDocument& doc, double offset )
{
- QDomDocumentFragment fragment=KPr2DObject::save(doc, offset);
+ TQDomDocumentFragment fragment=KPr2DObject::save(doc, offset);
KPrStartEndLine::save( fragment, doc );
if (p_angle!=720)
fragment.appendChild(KPrObject::createValueElement("PIEANGLE", p_angle, doc));
@@ -129,11 +129,11 @@ const char * KPrPieObject::getOasisElementName() const
}
-void KPrPieObject::loadOasis(const QDomElement &element, KoOasisContext & context, KPrLoadingInfo *info)
+void KPrPieObject::loadOasis(const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info)
{
- kdDebug()<<"void KPrPieObject::loadOasis(const QDomElement &element) ***************\n";
+ kdDebug()<<"void KPrPieObject::loadOasis(const TQDomElement &element) ***************\n";
KPr2DObject::loadOasis(element, context, info);
- QString kind = element.attributeNS( KoXmlNS::draw, "kind", QString::null );
+ TQString kind = element.attributeNS( KoXmlNS::draw, "kind", TQString() );
if ( kind == "section" )
pieType = PT_PIE;
else if ( kind == "cut" )
@@ -142,21 +142,21 @@ void KPrPieObject::loadOasis(const QDomElement &element, KoOasisContext & contex
pieType =PT_ARC;
else
{
- kdDebug()<<" KPrPieObject::loadOasis(const QDomElement &element) type indefined :"<<kind<<endl;
+ kdDebug()<<" KPrPieObject::loadOasis(const TQDomElement &element) type indefined :"<<kind<<endl;
pieType = PT_PIE;
}
kdDebug()<<" type of pie object :"<<( ( pieType == PT_PIE ) ? "pie" : ( pieType == PT_CHORD )?"cut" : "arc" )<<endl;
- int start = (int) ( element.attributeNS( KoXmlNS::draw, "start-angle", QString::null ).toDouble() );
+ int start = (int) ( element.attributeNS( KoXmlNS::draw, "start-angle", TQString() ).toDouble() );
p_angle=start*16;
- int end = (int) ( element.attributeNS( KoXmlNS::draw, "end-angle", QString::null ).toDouble() );
+ int end = (int) ( element.attributeNS( KoXmlNS::draw, "end-angle", TQString() ).toDouble() );
if ( end < start )
p_len = ( ( 360 - start + end ) * 16 );
else
p_len = ( ( end - start ) * 16 );
- kdDebug()<<"KPrPieObject::loadOasis(const QDomElement &element) : p_angle :"<<p_angle<<" p_len :"<<p_len<<endl;
+ kdDebug()<<"KPrPieObject::loadOasis(const TQDomElement &element) : p_angle :"<<p_angle<<" p_len :"<<p_len<<endl;
if ( pieType == PT_ARC )
{
loadOasisMarkerElement( context, "marker-start", lineBegin );
@@ -164,11 +164,11 @@ void KPrPieObject::loadOasis(const QDomElement &element, KoOasisContext & contex
}
}
-double KPrPieObject::load(const QDomElement &element)
+double KPrPieObject::load(const TQDomElement &element)
{
double offset=KPr2DObject::load(element);
KPrStartEndLine::load( element );
- QDomElement e=element.namedItem("PIEANGLE").toElement();
+ TQDomElement e=element.namedItem("PIEANGLE").toElement();
if(!e.isNull()) {
int tmp=0;
if(e.hasAttribute("value"))
@@ -195,20 +195,20 @@ double KPrPieObject::load(const QDomElement &element)
return offset;
}
-void KPrPieObject::paint( QPainter* _painter, KoTextZoomHandler*_zoomHandler,
+void KPrPieObject::paint( TQPainter* _painter, KoTextZoomHandler*_zoomHandler,
int /* pageNum */, bool drawingShadow, bool drawContour )
{
double ow = ext.width();
double oh = ext.height();
- double pw = ( ( pen.style() == Qt::NoPen ) ? 1 : pen.pointWidth() ) / 2.0;
+ double pw = ( ( pen.style() == TQt::NoPen ) ? 1 : pen.pointWidth() ) / 2.0;
if ( drawContour ) {
- QPen pen3( Qt::black, 1, Qt::DotLine );
+ TQPen pen3( TQt::black, 1, TQt::DotLine );
_painter->setPen( pen3 );
- _painter->setRasterOp( Qt::NotXorROP );
+ _painter->setRasterOp( TQt::NotXorROP );
}
else {
- QPen pen2 = pen.zoomedPen( _zoomHandler );
+ TQPen pen2 = pen.zoomedPen( _zoomHandler );
_painter->setPen( pen2 );
if ( drawingShadow || getFillType() == FT_BRUSH || !gradient )
{
@@ -218,7 +218,7 @@ void KPrPieObject::paint( QPainter* _painter, KoTextZoomHandler*_zoomHandler,
{
if ( pieType != PT_ARC )
{
- QSize size( _zoomHandler->zoomSize( ext ) );
+ TQSize size( _zoomHandler->zoomSize( ext ) );
if ( m_redrawGradientPix || gradient->size() != size )
{
@@ -226,16 +226,16 @@ void KPrPieObject::paint( QPainter* _painter, KoTextZoomHandler*_zoomHandler,
gradient->setSize( size );
m_gradientPix.resize ( size );
- m_gradientPix.fill( Qt::white );
- QPainter p;
+ m_gradientPix.fill( TQt::white );
+ TQPainter p;
p.begin( &m_gradientPix );
p.drawPixmap( 0, 0, gradient->pixmap() );
p.end();
- QBitmap mask( size, true );
- p.begin( &mask );
- p.setPen( QPen( Qt::color1 ) );
- p.setBrush( QBrush( Qt::color1 ) );
+ TQBitmap tqmask( size, true );
+ p.begin( &tqmask );
+ p.setPen( TQPen( TQt::color1 ) );
+ p.setBrush( TQBrush( TQt::color1 ) );
if ( pieType == PT_CHORD )
{
p.drawChord( _zoomHandler->zoomItX(pw), _zoomHandler->zoomItY(pw),
@@ -249,10 +249,10 @@ void KPrPieObject::paint( QPainter* _painter, KoTextZoomHandler*_zoomHandler,
_zoomHandler->zoomItY( oh - 2 * pw), p_angle, p_len );
}
p.end();
- m_gradientPix.setMask( mask );
+ m_gradientPix.setMask( tqmask );
}
_painter->drawPixmap( 0, 0, m_gradientPix, 0, 0, size.width(), size.height() );
- _painter->setBrush( Qt::NoBrush );
+ _painter->setBrush( TQt::NoBrush );
}
}
if ( pieType == PT_ARC )