summaryrefslogtreecommitdiffstats
path: root/karbon/core/vfill.cc
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 /karbon/core/vfill.cc
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 'karbon/core/vfill.cc')
-rw-r--r--karbon/core/vfill.cc40
1 files changed, 20 insertions, 20 deletions
diff --git a/karbon/core/vfill.cc b/karbon/core/vfill.cc
index 44f69f75..549045ae 100644
--- a/karbon/core/vfill.cc
+++ b/karbon/core/vfill.cc
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <KoGenStyles.h>
@@ -31,8 +31,8 @@
VFill::VFill()
: m_type( none )
{
- /*m_gradient.addStop( VColor( Qt::red.rgb() ), 0.0 );
- m_gradient.addStop( VColor( Qt::yellow.rgb() ), 1.0 );
+ /*m_gradient.addStop( VColor( TQt::red.rgb() ), 0.0 );
+ m_gradient.addStop( VColor( TQt::yellow.rgb() ), 1.0 );
m_gradient.setOrigin( KoPoint( 0, 0 ) );
m_gradient.setVector( KoPoint( 0, 50 ) );
m_gradient.setSpreadMethod( gradient_spread_reflect );*/
@@ -48,14 +48,14 @@ VFill::VFill( const VColor &c )
VFill::VFill( const VFill& fill )
{
- // doesn't copy parent:
+ // doesn't copy tqparent:
*this = fill;
}
void
-VFill::save( QDomElement& element ) const
+VFill::save( TQDomElement& element ) const
{
- QDomElement me = element.ownerDocument().createElement( "FILL" );
+ TQDomElement me = element.ownerDocument().createElement( "FILL" );
element.appendChild( me );
if( !( m_type == none ) )
@@ -81,17 +81,17 @@ VFill::saveOasis( KoGenStyles &mainStyles, KoGenStyle &style ) const
if( m_type == solid )
{
style.addProperty( "draw:fill", "solid" );
- style.addProperty( "draw:fill-color", QColor( m_color ).name() );
+ style.addProperty( "draw:fill-color", TQColor( m_color ).name() );
if( m_color.opacity() < 1 )
- style.addProperty( "draw:opacity", QString( "%1%" ).arg( m_color.opacity() * 100. ) );
+ style.addProperty( "draw:opacity", TQString( "%1%" ).tqarg( m_color.opacity() * 100. ) );
}
else if( m_type == grad )
{
style.addProperty( "draw:fill", "gradient" );
- QString grad = m_gradient.saveOasis( mainStyles );
+ TQString grad = m_gradient.saveOasis( mainStyles );
style.addProperty( "draw:fill-gradient-name", grad );
if( m_color.opacity() < 1 )
- style.addProperty( "draw:opacity", QString( "%1%" ).arg( m_color.opacity() * 100. ) );
+ style.addProperty( "draw:opacity", TQString( "%1%" ).tqarg( m_color.opacity() * 100. ) );
}
else if( m_type == patt )
style.addProperty( "draw:fill", "hatch" );
@@ -100,7 +100,7 @@ VFill::saveOasis( KoGenStyles &mainStyles, KoGenStyle &style ) const
}
void
-VFill::loadOasis( const QDomElement &/*object*/, KoOasisLoadingContext &context, VObject* parent )
+VFill::loadOasis( const TQDomElement &/*object*/, KoOasisLoadingContext &context, VObject* tqparent )
{
KoStyleStack &stack = context.styleStack();
if( stack.hasAttributeNS( KoXmlNS::draw, "fill" ) )
@@ -108,17 +108,17 @@ VFill::loadOasis( const QDomElement &/*object*/, KoOasisLoadingContext &context,
if( stack.attributeNS( KoXmlNS::draw, "fill" ) == "solid" )
{
setType( VFill::solid );
- setColor( QColor( stack.attributeNS( KoXmlNS::draw, "fill-color" ) ) );
+ setColor( TQColor( stack.attributeNS( KoXmlNS::draw, "fill-color" ) ) );
}
else if( stack.attributeNS( KoXmlNS::draw, "fill" ) == "gradient" )
{
setType( VFill::grad );
- QString style = stack.attributeNS( KoXmlNS::draw, "fill-gradient-name" );
+ TQString style = stack.attributeNS( KoXmlNS::draw, "fill-gradient-name" );
kdDebug()<<" style gradient name :"<<style<<endl;
- QDomElement *grad = context.oasisStyles().drawStyles()[ style ];
+ TQDomElement *grad = context.oasisStyles().drawStyles()[ style ];
kdDebug()<<" style gradient name :"<< grad <<endl;
if( grad )
- m_gradient.loadOasis( *grad, stack, parent );
+ m_gradient.loadOasis( *grad, stack, tqparent );
}
if( stack.hasAttributeNS( KoXmlNS::draw, "opacity" ) )
m_color.setOpacity( stack.attributeNS( KoXmlNS::draw, "opacity" ).remove( '%' ).toFloat() / 100. );
@@ -126,17 +126,17 @@ VFill::loadOasis( const QDomElement &/*object*/, KoOasisLoadingContext &context,
}
void
-VFill::load( const QDomElement& element )
+VFill::load( const TQDomElement& element )
{
m_type = none;
// load color:
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement e = list.item( i ).toElement();
+ TQDomElement e = list.item( i ).toElement();
if( e.tagName() == "COLOR" )
{
m_type = solid;
@@ -161,7 +161,7 @@ VFill::operator=( const VFill& fill )
{
if( this != &fill )
{
- // dont copy the parent!
+ // dont copy the tqparent!
m_type = fill.m_type;
m_color = fill.m_color;
m_gradient = fill.m_gradient;
@@ -172,7 +172,7 @@ VFill::operator=( const VFill& fill )
}
void
-VFill::transform( const QWMatrix& m )
+VFill::transform( const TQWMatrix& m )
{
if( type() == VFill::grad )
gradient().transform( m );