diff options
Diffstat (limited to 'kspread/kspread_brush.cc')
-rw-r--r-- | kspread/kspread_brush.cc | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kspread/kspread_brush.cc b/kspread/kspread_brush.cc index 5d3aa9c5..3a66549b 100644 --- a/kspread/kspread_brush.cc +++ b/kspread/kspread_brush.cc @@ -26,8 +26,8 @@ #include <KoXmlNS.h> KSpreadBrush::KSpreadBrush() -: m_gColor1( Qt::red ) -, m_gColor2( Qt::green ) +: m_gColor1( TQt::red ) +, m_gColor2( TQt::green ) , m_gType( BCT_GHORZ ) , m_fillType( FT_BRUSH ) , m_unbalanced( false ) @@ -37,7 +37,7 @@ KSpreadBrush::KSpreadBrush() } -KSpreadBrush::KSpreadBrush( const QBrush &brush, const QColor &gColor1, const QColor &gColor2, +KSpreadBrush::KSpreadBrush( const TQBrush &brush, const TQColor &gColor1, const TQColor &gColor2, BCType gType, FillType fillType, bool unbalanced, int xfactor, int yfactor ) : m_brush( brush ) @@ -72,7 +72,7 @@ void KSpreadBrush::saveOasisFillStyle( KoGenStyle &styleObjectAuto, KoGenStyles& { case FT_BRUSH: { - if( m_brush.style() != Qt::NoBrush ) + if( m_brush.style() != TQt::NoBrush ) { KoOasisStyles::saveOasisFillStyle( styleObjectAuto, mainStyles, m_brush ); } @@ -92,19 +92,19 @@ void KSpreadBrush::saveOasisFillStyle( KoGenStyle &styleObjectAuto, KoGenStyles& } -/*QString KSpreadBrush::saveOasisGradientStyle( KoGenStyles& mainStyles ) const +/*TQString KSpreadBrush::saveOasisGradientStyle( KoGenStyles& mainStyles ) const { KoGenStyle gradientStyle( KPrDocument::STYLE_GRADIENT no family name); gradientStyle.addAttribute( "draw:start-color", m_gColor1.name() ); gradientStyle.addAttribute( "draw:end-color", m_gColor2.name() ); - QString unbalancedx( "50%" ); - QString unbalancedy( "50%" ); + TQString unbalancedx( "50%" ); + TQString unbalancedy( "50%" ); if ( m_unbalanced ) { - unbalancedx = QString( "%1%" ).arg( m_xfactor / 4 + 50 ); - unbalancedy = QString( "%1%" ).arg( m_yfactor / 4 + 50 ); + unbalancedx = TQString( "%1%" ).tqarg( m_xfactor / 4 + 50 ); + unbalancedy = TQString( "%1%" ).tqarg( m_yfactor / 4 + 50 ); } gradientStyle.addAttribute( "draw:cx", unbalancedx ); gradientStyle.addAttribute( "draw:cy", unbalancedy ); @@ -160,7 +160,7 @@ void KSpreadBrush::loadOasisFillStyle( KoOasisContext &context, const char * pro 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" ) @@ -169,19 +169,19 @@ void KSpreadBrush::loadOasisFillStyle( KoOasisContext &context, const char * pro } 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 ); @@ -223,12 +223,12 @@ void KSpreadBrush::loadOasisFillStyle( KoOasisContext &context, const char * pro // 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; @@ -250,8 +250,8 @@ void KSpreadBrush::loadOasisFillStyle( KoOasisContext &context, const char * pro // 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; - tmpBrush.setStyle( static_cast<Qt::BrushStyle>( 1 ) ); + TQBrush tmpBrush; + tmpBrush.setStyle( static_cast<TQt::BrushStyle>( 1 ) ); setBrush( tmpBrush ); setFillType( FT_GRADIENT ); } @@ -264,7 +264,7 @@ void KSpreadBrush::loadOasisFillStyle( KoOasisContext &context, const char * pro //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. } } |