summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrPartObject.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kpresenter/KPrPartObject.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpresenter/KPrPartObject.cpp')
-rw-r--r--kpresenter/KPrPartObject.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kpresenter/KPrPartObject.cpp b/kpresenter/KPrPartObject.cpp
index f4bbd3d2..e2c24e1a 100644
--- a/kpresenter/KPrPartObject.cpp
+++ b/kpresenter/KPrPartObject.cpp
@@ -28,7 +28,7 @@
#include "KoOasisContext.h"
#include <kparts/partmanager.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
using namespace std;
@@ -36,7 +36,7 @@ KPrPartObject::KPrPartObject( KPrChild *_child )
: KPr2DObject()
{
child = _child;
- pen = KoPen( Qt::black, 1.0, Qt::NoPen );
+ pen = KoPen( TQt::black, 1.0, Qt::NoPen );
_enableDrawing = true;
}
@@ -47,9 +47,9 @@ KPrPartObject &KPrPartObject::operator=( const KPrPartObject & )
void KPrPartObject::updateChildGeometry()
{
- KoTextZoomHandler* zh = child->parent()->zoomHandler();
+ KoTextZoomHandler* zh = child->tqparent()->zoomHandler();
child->setGeometry( zh->zoomRect( getRect() ), true );
- child->setRotationPoint( QPoint( zh->zoomItX( getOrig().x() + getSize().width() / 2 ),
+ child->setRotationPoint( TQPoint( zh->zoomItX( getOrig().x() + getSize().width() / 2 ),
zh->zoomItY( getOrig().y() + getSize().height() / 2 ) ) );
}
@@ -58,8 +58,8 @@ void KPrPartObject::rotate( float _angle )
KPrObject::rotate( _angle );
child->setRotation( _angle );
- KoTextZoomHandler* zh = child->parent()->zoomHandler();
- child->setRotationPoint( QPoint( zh->zoomItX( getOrig().x() + getSize().width() / 2 ),
+ KoTextZoomHandler* zh = child->tqparent()->zoomHandler();
+ child->setRotationPoint( TQPoint( zh->zoomItX( getOrig().x() + getSize().width() / 2 ),
zh->zoomItY( getOrig().y() + getSize().height() / 2 ) ) );
}
@@ -68,7 +68,7 @@ bool KPrPartObject::saveOasisObjectAttributes( KPOasisSaveContext &sc ) const
kdDebug() << "KPrPartObject::saveOasisPart " << sc.partIndexObj << endl;
sc.xmlWriter.startElement( "draw:object" );
- const QString name = QString( "Object_%1" ).arg( sc.partIndexObj + 1 );
+ const TQString name = TQString( "Object_%1" ).tqarg( sc.partIndexObj + 1 );
++sc.partIndexObj;
child->saveOasisAttributes( sc.xmlWriter, name );
@@ -82,36 +82,36 @@ const char * KPrPartObject::getOasisElementName() const
}
-void KPrPartObject::loadOasis(const QDomElement &element, KoOasisContext&context, KPrLoadingInfo */*info*/)
+void KPrPartObject::loadOasis(const TQDomElement &element, KoOasisContext&context, KPrLoadingInfo */*info*/)
{
- kdDebug()<<"void KPrPartObject::loadOasis(const QDomElement &element)******************\n";
+ kdDebug()<<"void KPrPartObject::loadOasis(const TQDomElement &element)******************\n";
- QDomElement objectElement = KoDom::namedItemNS( element, KoXmlNS::draw, "object" );
+ TQDomElement objectElement = KoDom::namedItemNS( element, KoXmlNS::draw, "object" );
child->loadOasis( element, objectElement );
if(element.hasAttributeNS( KoXmlNS::draw, "name" ))
- objectName = element.attributeNS( KoXmlNS::draw, "name", QString::null);
+ KPrObject::objectName = element.attributeNS( KoXmlNS::draw, "name", TQString());
(void)child->loadOasisDocument( context.store(), context.manifestDocument() );
}
-void KPrPartObject::draw( QPainter *_painter, KoTextZoomHandler *_zoomhandler,
+void KPrPartObject::draw( TQPainter *_painter, KoTextZoomHandler *_zoomhandler,
int pageNum, SelectionMode selectionMode, bool drawContour )
{
updateChildGeometry();
double ow = ext.width();
double oh = ext.height();
- QSize size( _zoomhandler->zoomSize( ext ) );
- int penw = ( ( pen.style() == Qt::NoPen ) ? 1 : int( pen.pointWidth() ) ) / 2;
+ TQSize size( _zoomhandler->zoomSize( ext ) );
+ int penw = ( ( pen.style() == TQt::NoPen ) ? 1 : int( pen.pointWidth() ) ) / 2;
- QPen pen2;
+ TQPen pen2;
if ( drawContour )
- pen2 = QPen( Qt::black, 1, Qt::NoPen );
+ pen2 = TQPen( TQt::black, 1, TQt::NoPen );
else {
pen2 = pen.zoomedPen( _zoomhandler );
}
_painter->save();
child->transform( *_painter );
- _painter->setPen( Qt::NoPen );
+ _painter->setPen( TQt::NoPen );
_painter->setBrush( getBrush() );
if ( angle == 0 ) {
@@ -140,7 +140,7 @@ void KPrPartObject::draw( QPainter *_painter, KoTextZoomHandler *_zoomhandler,
}
_painter->setPen( pen2 );
- _painter->setBrush( Qt::NoBrush );
+ _painter->setBrush( TQt::NoBrush );
_painter->drawRect( _zoomhandler->zoomItX( penw ), _zoomhandler->zoomItY( penw ),
_zoomhandler->zoomItX( ow - 2 * penw ), _zoomhandler->zoomItY( oh - 2 * penw ) );
paint( _painter, _zoomhandler, pageNum, selectionMode, drawContour );
@@ -151,21 +151,21 @@ void KPrPartObject::draw( QPainter *_painter, KoTextZoomHandler *_zoomhandler,
void KPrPartObject::slot_changed( KoChild *_koChild )
{
- KoTextZoomHandler* zh = child->parent()->zoomHandler();
- KoRect g = zh->unzoomRect( _koChild->geometry() );
+ KoTextZoomHandler* zh = child->tqparent()->zoomHandler();
+ KoRect g = zh->unzoomRect( _koChild->tqgeometry() );
KPrObject::setOrig( g.x(), g.y() );
KPrObject::setSize( g.width(), g.height() );
}
-void KPrPartObject::paint( QPainter *_painter, KoTextZoomHandler *_zoomHandler,
+void KPrPartObject::paint( TQPainter *_painter, KoTextZoomHandler *_zoomHandler,
int /* pageNum */, bool /*drawingShadow*/, bool drawContour )
{
if ( !_enableDrawing ) return;
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 );
_painter->drawRect( _zoomHandler->zoomRect( KoRect( KoPoint( 0.0, 0.0 ), getSize() ) ) );
return;
}
@@ -173,7 +173,7 @@ void KPrPartObject::paint( QPainter *_painter, KoTextZoomHandler *_zoomHandler,
if ( !child || !child->document() )
return;
- int penw = ( pen.style() == Qt::NoPen ) ? 0 : int( pen.pointWidth() );
+ int penw = ( pen.style() == TQt::NoPen ) ? 0 : int( pen.pointWidth() );
KoRect r( KoPoint( penw, penw ), KoPoint( getSize().width() - ( penw * 2.0 ),
getSize().height() - ( penw * 2.0 ) ) );
double zoomX = static_cast<double>( _zoomHandler->zoom() ) / 100;
@@ -186,7 +186,7 @@ void KPrPartObject::paint( QPainter *_painter, KoTextZoomHandler *_zoomHandler,
zoomY );
}
-void KPrPartObject::activate( QWidget *_widget )
+void KPrPartObject::activate( TQWidget *_widget )
{
KPrView *view = dynamic_cast<KPrView*>( _widget );
KoDocument* part = child->document();