summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrLineObject.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/KPrLineObject.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/KPrLineObject.cpp')
-rw-r--r--kpresenter/KPrLineObject.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/kpresenter/KPrLineObject.cpp b/kpresenter/KPrLineObject.cpp
index f0ac86bc..1cd98819 100644
--- a/kpresenter/KPrLineObject.cpp
+++ b/kpresenter/KPrLineObject.cpp
@@ -27,9 +27,9 @@
#include <KoStyleStack.h>
#include <KoOasisContext.h>
-#include <qpainter.h>
-#include <qwmatrix.h>
-#include <qdom.h>
+#include <tqpainter.h>
+#include <tqwmatrix.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <KoUnit.h>
#include <KoTextZoomHandler.h>
@@ -80,7 +80,7 @@ bool KPrLineObject::saveOasisObjectAttributes( KPOasisSaveContext &/*sc*/ ) cons
void KPrLineObject::saveOasisPosObject( KoXmlWriter &xmlWriter, int indexObj ) const
{
- xmlWriter.addAttribute( "draw:id", "object" + QString::number( indexObj ) );
+ xmlWriter.addAttribute( "draw:id", "object" + TQString::number( indexObj ) );
double x1 = 0.0;
double y1 = 0.0;
@@ -114,7 +114,7 @@ void KPrLineObject::saveOasisPosObject( KoXmlWriter &xmlWriter, int indexObj ) c
if ( kAbs( angle ) > 1E-6 )
{
double angInRad = -angle * M_PI / 180.0;
- QWMatrix m( cos( angInRad ), -sin( angInRad ), sin( angInRad ), cos( angInRad ), 0, 0 );
+ TQWMatrix m( cos( angInRad ), -sin( angInRad ), sin( angInRad ), cos( angInRad ), 0, 0 );
double transX1 = 0.0;
double transY1 = 0.0;
double transX2 = 0.0;
@@ -144,27 +144,27 @@ const char * KPrLineObject::getOasisElementName() const
return "draw:line";
}
-QDomDocumentFragment KPrLineObject::save( QDomDocument& doc, double offset )
+TQDomDocumentFragment KPrLineObject::save( TQDomDocument& doc, double offset )
{
- QDomDocumentFragment fragment=KPrShadowObject::save(doc, offset);
+ TQDomDocumentFragment fragment=KPrShadowObject::save(doc, offset);
if (lineType!=LT_HORZ)
fragment.appendChild(KPrObject::createValueElement("LINETYPE", static_cast<int>(lineType), doc));
KPrStartEndLine::save( fragment, doc );
return fragment;
}
-void KPrLineObject::loadOasis(const QDomElement &element, KoOasisContext & context, KPrLoadingInfo *info)
+void KPrLineObject::loadOasis(const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info)
{
KPrShadowObject::loadOasis(element, context, info);
- double x1 = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x1", QString::null ) );
- double y1 = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y1", QString::null ) );
- double x2 = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x2", QString::null ) );
- double y2 = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y2", QString::null ) );
+ double x1 = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x1", TQString() ) );
+ double y1 = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y1", TQString() ) );
+ double x2 = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x2", TQString() ) );
+ double y2 = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y2", TQString() ) );
- kdDebug()<<" KPrLineObject::loadOasis(const QDomElement &element) : x1 "<< x1 <<" y1 : "<<y1<<" x2 :"<<x2 <<" y2 "<<y2<<endl;
- double x = QMIN( x1, x2 );
- double y = QMIN( y1, y2 );
+ kdDebug()<<" KPrLineObject::loadOasis(const TQDomElement &element) : x1 "<< x1 <<" y1 : "<<y1<<" x2 :"<<x2 <<" y2 "<<y2<<endl;
+ double x = TQMIN( x1, x2 );
+ double y = TQMIN( y1, y2 );
orig.setX( x );
orig.setY( y );
@@ -191,19 +191,19 @@ void KPrLineObject::loadOasis(const QDomElement &element, KoOasisContext & conte
else
lineType=LT_LD_RU;
- kdDebug()<<"KPrLineObject::loadOasis(const QDomElement &element) : real position x :"<<orig.x()<<" y "<<orig.y()<< " width :"<<ext.width()<<" height :"<<ext.height()<<endl;
+ kdDebug()<<"KPrLineObject::loadOasis(const TQDomElement &element) : real position x :"<<orig.x()<<" y "<<orig.y()<< " width :"<<ext.width()<<" height :"<<ext.height()<<endl;
- QString attr = (x1 <= x2) ? "marker-start" : "marker-end";
+ TQString attr = (x1 <= x2) ? "marker-start" : "marker-end";
loadOasisMarkerElement( context, attr, lineBegin );
attr = (x1 <= x2) ? "marker-end" : "marker-start";
loadOasisMarkerElement( context, attr, lineEnd );
}
-double KPrLineObject::load(const QDomElement &element)
+double KPrLineObject::load(const TQDomElement &element)
{
double offset=KPrShadowObject::load(element);
- QDomElement e=element.namedItem("LINETYPE").toElement();
+ TQDomElement e=element.namedItem("LINETYPE").toElement();
if(!e.isNull()) {
int tmp=0;
if(e.hasAttribute("value"))
@@ -214,17 +214,17 @@ double KPrLineObject::load(const QDomElement &element)
return offset;
}
-void KPrLineObject::paint( QPainter* _painter, KoTextZoomHandler*_zoomHandler,
+void KPrLineObject::paint( TQPainter* _painter, KoTextZoomHandler*_zoomHandler,
int /* pageNum */, bool /*drawingShadow*/, bool drawContour )
{
double ow = ext.width();
double oh = ext.height();
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 );