diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kpresenter/KPrBrush.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-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/KPrBrush.cpp')
-rw-r--r-- | kpresenter/KPrBrush.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kpresenter/KPrBrush.cpp b/kpresenter/KPrBrush.cpp index 6d4d1699..06954f7c 100644 --- a/kpresenter/KPrBrush.cpp +++ b/kpresenter/KPrBrush.cpp @@ -31,7 +31,7 @@ KPrBrush::KPrBrush() { } -KPrBrush::KPrBrush( const QBrush &brush, const QColor &gColor1, const QColor &gColor2, +KPrBrush::KPrBrush( const TQBrush &brush, const TQColor &gColor1, const TQColor &gColor2, BCType gType, FillType fillType, bool unbalanced, int xfactor, int yfactor ) : KoBrush( brush, gColor1,gColor2, gType, fillType, unbalanced, xfactor, yfactor ) @@ -44,7 +44,7 @@ void KPrBrush::saveOasisFillStyle( KoGenStyle &styleObjectAuto, KoGenStyles& mai { case FT_BRUSH: { - if( getBrush().style() != Qt::NoBrush ) + if( getBrush().style() != TQt::NoBrush ) { KoOasisStyles::saveOasisFillStyle( styleObjectAuto, mainStyles, getBrush() ); } @@ -62,19 +62,19 @@ void KPrBrush::saveOasisFillStyle( KoGenStyle &styleObjectAuto, KoGenStyles& mai } -QString KPrBrush::saveOasisGradientStyle( KoGenStyles& mainStyles ) const +TQString KPrBrush::saveOasisGradientStyle( KoGenStyles& mainStyles ) const { KoGenStyle gradientStyle( KPrDocument::STYLE_GRADIENT /*no family name*/); gradientStyle.addAttribute( "draw:start-color", getGColor1().name() ); gradientStyle.addAttribute( "draw:end-color", getGColor2().name() ); - QString unbalancedx( "50%" ); - QString unbalancedy( "50%" ); + TQString unbalancedx( "50%" ); + TQString unbalancedy( "50%" ); if ( getGUnbalanced() ) { - unbalancedx = QString( "%1%" ).arg( getGXFactor() / 4 + 50 ); - unbalancedy = QString( "%1%" ).arg( getGYFactor() / 4 + 50 ); + unbalancedx = TQString( "%1%" ).tqarg( getGXFactor() / 4 + 50 ); + unbalancedy = TQString( "%1%" ).tqarg( getGYFactor() / 4 + 50 ); } gradientStyle.addAttribute( "draw:cx", unbalancedx ); gradientStyle.addAttribute( "draw:cy", unbalancedy ); @@ -130,7 +130,7 @@ void KPrBrush::loadOasisFillStyle( KoOasisContext &context, const char * propert if ( styleStack.hasAttributeNS( KoXmlNS::draw, "fill" ) ) { - const QString fill = styleStack.attributeNS( KoXmlNS::draw, "fill" ); + const TQString fill = styleStack.attributeNS( KoXmlNS::draw, "fill" ); kdDebug(33001) << " load object gradient fill type :" << fill << endl; if ( fill == "solid" || fill == "hatch" ) @@ -139,19 +139,19 @@ void KPrBrush::loadOasisFillStyle( KoOasisContext &context, const char * propert } else if ( fill == "gradient" ) { - QString style = styleStack.attributeNS( KoXmlNS::draw, "fill-gradient-name" ); - QDomElement* draw = context.oasisStyles().drawStyles()[style]; + TQString style = styleStack.attributeNS( KoXmlNS::draw, "fill-gradient-name" ); + TQDomElement* draw = context.oasisStyles().drawStyles()[style]; if ( draw ) { - setGColor1( draw->attributeNS( KoXmlNS::draw, "start-color", QString::null ) ); - setGColor2( draw->attributeNS( KoXmlNS::draw, "end-color", QString::null ) ); + setGColor1( draw->attributeNS( KoXmlNS::draw, "start-color", TQString() ) ); + setGColor2( draw->attributeNS( KoXmlNS::draw, "end-color", TQString() ) ); - QString type = draw->attributeNS( KoXmlNS::draw, "style", QString::null ); + TQString type = draw->attributeNS( KoXmlNS::draw, "style", TQString() ); kdDebug()<<" type :"<<type<<endl; if ( type == "linear" ) { - int angle = draw->attributeNS( KoXmlNS::draw, "angle", QString::null ).toInt() / 10; + int angle = draw->attributeNS( KoXmlNS::draw, "angle", TQString() ).toInt() / 10; // make sure the angle is between 0 and 359 angle = abs( angle ); @@ -182,8 +182,8 @@ void KPrBrush::loadOasisFillStyle( KoOasisContext &context, const char * propert if ( nearAngle == 180 || nearAngle == 270 || nearAngle == 225 || nearAngle == 315 ) { - setGColor1( draw->attributeNS( KoXmlNS::draw, "end-color", QString::null ) ); - setGColor2( draw->attributeNS( KoXmlNS::draw, "start-color", QString::null ) ); + setGColor1( draw->attributeNS( KoXmlNS::draw, "end-color", TQString() ) ); + setGColor2( draw->attributeNS( KoXmlNS::draw, "start-color", TQString() ) ); } } else if ( type == "radial" || type == "ellipsoid" ) @@ -199,12 +199,12 @@ void KPrBrush::loadOasisFillStyle( KoOasisContext &context, const char * propert // and (un-)balanced settings of kpresenter. Let's try it. int x, y; if ( draw->hasAttributeNS( KoXmlNS::draw, "cx" ) ) - x = draw->attributeNS( KoXmlNS::draw, "cx", QString::null ).remove( '%' ).toInt(); + x = draw->attributeNS( KoXmlNS::draw, "cx", TQString() ).remove( '%' ).toInt(); else x = 50; if ( draw->hasAttributeNS( KoXmlNS::draw, "cy" ) ) - y = draw->attributeNS( KoXmlNS::draw, "cy", QString::null ).remove( '%' ).toInt(); + y = draw->attributeNS( KoXmlNS::draw, "cy", TQString() ).remove( '%' ).toInt(); else y = 50; @@ -226,7 +226,7 @@ void KPrBrush::loadOasisFillStyle( KoOasisContext &context, const char * propert // We have to set a brush with brushstyle != no background fill // otherwise the properties dialog for the object won't // display the preview for the gradient. - QBrush tmpBrush; + TQBrush tmpBrush; tmpBrush.setStyle( static_cast<Qt::BrushStyle>( 1 ) ); setBrush( tmpBrush ); setFillType( FT_GRADIENT ); @@ -240,7 +240,7 @@ void KPrBrush::loadOasisFillStyle( KoOasisContext &context, const char * propert //todo //not implementer in kpresenter... //the drawing object is filled with the bitmap specified by the draw:fill-image-name attribute. - //QBrush implement setPixmap + //TQBrush implement setPixmap //easy just add pixmap and store it. } } |