diff options
Diffstat (limited to 'karbon/plugins/shadoweffect')
-rw-r--r-- | karbon/plugins/shadoweffect/shadoweffectplugin.cc | 36 | ||||
-rw-r--r-- | karbon/plugins/shadoweffect/shadoweffectplugin.h | 6 | ||||
-rw-r--r-- | karbon/plugins/shadoweffect/vshadowdecorator.cc | 14 | ||||
-rw-r--r-- | karbon/plugins/shadoweffect/vshadowdecorator.h | 6 |
4 files changed, 32 insertions, 30 deletions
diff --git a/karbon/plugins/shadoweffect/shadoweffectplugin.cc b/karbon/plugins/shadoweffect/shadoweffectplugin.cc index c1a0aa33..903f0ee0 100644 --- a/karbon/plugins/shadoweffect/shadoweffectplugin.cc +++ b/karbon/plugins/shadoweffect/shadoweffectplugin.cc @@ -23,8 +23,8 @@ #include <karbon_part.h> #include <kgenericfactory.h> #include <kdebug.h> -#include <qgroupbox.h> -#include <qlabel.h> +#include <tqgroupbox.h> +#include <tqlabel.h> #include <knuminput.h> #include <core/vgroup.h> @@ -37,12 +37,12 @@ typedef KGenericFactory<ShadowEffectPlugin, KarbonView> ShadowEffectPluginFactory; K_EXPORT_COMPONENT_FACTORY( karbon_shadoweffectplugin, ShadowEffectPluginFactory( "karbonshadoweffectplugin" ) ) -ShadowEffectPlugin::ShadowEffectPlugin( KarbonView *parent, const char* name, const QStringList & ) -: Plugin( parent, name ) +ShadowEffectPlugin::ShadowEffectPlugin( KarbonView *tqparent, const char* name, const TQStringList & ) +: Plugin( tqparent, name ) { new KAction( i18n( "&Shadow Effect..." ), "shadowRB", 0, this, - SLOT( slotShadowEffect() ), actionCollection(), "object_shadow" ); + TQT_SLOT( slotShadowEffect() ), actionCollection(), "object_shadow" ); m_shadowEffectDlg = new VShadowEffectDlg(); m_shadowEffectDlg->setDistance( 2 ); @@ -52,25 +52,25 @@ ShadowEffectPlugin::ShadowEffectPlugin( KarbonView *parent, const char* name, co void ShadowEffectPlugin::slotShadowEffect() { - KarbonPart *part = ((KarbonView *)parent())->part(); + KarbonPart *part = ((KarbonView *)tqparent())->part(); if( part && m_shadowEffectDlg->exec() ) part->addCommand( new VCreateShadowCmd( &part->document(), m_shadowEffectDlg->distance(), m_shadowEffectDlg->angle(), double( m_shadowEffectDlg->opacity() ) / 255.0 ), true ); } -VShadowEffectDlg::VShadowEffectDlg( QWidget* parent, const char* name ) - : KDialogBase( parent, name, true, i18n( "Create Shadow Effect" ), Ok | Cancel ) +VShadowEffectDlg::VShadowEffectDlg( TQWidget* tqparent, const char* name ) + : KDialogBase( tqparent, name, true, i18n( "Create Shadow Effect" ), Ok | Cancel ) { // add input fields on the left: - QGroupBox* group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this ); - new QLabel( i18n( "Distance:" ), group ); + TQGroupBox* group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this ); + new TQLabel( i18n( "Distance:" ), group ); m_distance = new KIntNumInput( group ); m_distance->setRange( -1000, 1000, 1, true ); m_distance->setValue( 2 ); - new QLabel( i18n( "Angle:" ), group ); + new TQLabel( i18n( "Angle:" ), group ); m_angle = new KIntNumInput( group ); m_angle->setRange( 0, 360, 10, true ); m_angle->setValue( 0 ); - new QLabel( i18n( "Opacity:" ), group ); + new TQLabel( i18n( "Opacity:" ), group ); m_opacity = new KIntNumInput( group ); m_opacity->setRange( 0, 100, 1, true ); m_opacity->setValue( 100 ); @@ -78,8 +78,8 @@ VShadowEffectDlg::VShadowEffectDlg( QWidget* parent, const char* name ) m_opacity->setSuffix(i18n("%")); // signals and slots: - connect( this, SIGNAL( okClicked() ), this, SLOT( accept() ) ); - connect( this, SIGNAL( cancelClicked() ), this, SLOT( reject() ) ); + connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( accept() ) ); + connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( reject() ) ); setMainWidget( group ); } @@ -142,7 +142,7 @@ VCreateShadowCmd::execute() bool successful = false; - // Create new shapes if they don't exist yet. + // Create new tqshapes if they don't exist yet. if( !m_newObjects ) { m_newObjects = new VSelection(); @@ -169,11 +169,11 @@ VCreateShadowCmd::execute() if(newObject) { - // Insert new shape right before old shape. - itr.current()->parent()->insertInfrontOf( + // Insert new tqshape right before old tqshape. + itr.current()->tqparent()->insertInfrontOf( newObject, itr.current() ); - // Add new shape to list of new objects. + // Add new tqshape to list of new objects. m_newObjects->append( newObject ); } } diff --git a/karbon/plugins/shadoweffect/shadoweffectplugin.h b/karbon/plugins/shadoweffect/shadoweffectplugin.h index 9a97da98..fc500bb7 100644 --- a/karbon/plugins/shadoweffect/shadoweffectplugin.h +++ b/karbon/plugins/shadoweffect/shadoweffectplugin.h @@ -31,8 +31,9 @@ class VShadowEffectDlg; class ShadowEffectPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ShadowEffectPlugin( KarbonView *parent, const char* name, const QStringList & ); + ShadowEffectPlugin( KarbonView *tqparent, const char* name, const TQStringList & ); virtual ~ShadowEffectPlugin() {} private slots: @@ -47,9 +48,10 @@ class KIntNumInput; class VShadowEffectDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - VShadowEffectDlg( QWidget* parent = 0L, const char* name = 0L ); + VShadowEffectDlg( TQWidget* tqparent = 0L, const char* name = 0L ); void setAngle( int ); void setDistance( int ); diff --git a/karbon/plugins/shadoweffect/vshadowdecorator.cc b/karbon/plugins/shadoweffect/vshadowdecorator.cc index 238673ba..e6b2f378 100644 --- a/karbon/plugins/shadoweffect/vshadowdecorator.cc +++ b/karbon/plugins/shadoweffect/vshadowdecorator.cc @@ -26,8 +26,8 @@ #include <core/vselection.h> #include <commands/vtransformcmd.h> -VShadowDecorator::VShadowDecorator( VObject *object, VObject* parent, int distance, int angle, float opacity ) - : VObject( parent ), m_object( object ), m_distance( distance ), m_angle( angle ), m_opacity( opacity ) +VShadowDecorator::VShadowDecorator( VObject *object, VObject* tqparent, int distance, int angle, float opacity ) + : VObject( tqparent ), m_object( object ), m_distance( distance ), m_angle( angle ), m_opacity( opacity ) { } @@ -64,12 +64,12 @@ VShadowDecorator::draw( VPainter* painter, const KoRect* rect ) const VFill *fill = new VFill( *m_object->fill() ); VStroke *stroke = new VStroke( *m_object->stroke() ); - VColor black( Qt::black ); + VColor black( TQt::black ); black.setOpacity( m_opacity ); if( m_object->fill()->type() != VFill::none ) m_object->fill()->setColor( black ); m_object->stroke()->setColor( black ); - QWMatrix mat = painter->worldMatrix(); + TQWMatrix mat = painter->tqworldMatrix(); painter->setWorldMatrix( mat.translate( shadowDx * painter->zoomFactor(), -shadowDy * painter->zoomFactor()) ); m_object->draw( painter, rect ); m_object->setFill( *fill ); @@ -122,7 +122,7 @@ VShadowDecorator::setState( const VState state ) } void -VShadowDecorator::save( QDomElement& element ) const +VShadowDecorator::save( TQDomElement& element ) const { if( m_state != VObject::deleted ) { @@ -132,12 +132,12 @@ VShadowDecorator::save( QDomElement& element ) const VObject *shadow = m_object->clone(); - VColor black( Qt::black ); + VColor black( TQt::black ); black.setOpacity( m_opacity ); if( shadow->fill()->type() != VFill::none ) shadow->fill()->setColor( black ); shadow->stroke()->setColor( black ); - QWMatrix mat; + TQWMatrix mat; mat.translate( shadowDx, -shadowDy ); VTransformCmd trafo( 0L, mat ); trafo.visit( *shadow ); diff --git a/karbon/plugins/shadoweffect/vshadowdecorator.h b/karbon/plugins/shadoweffect/vshadowdecorator.h index 3ec57e88..0518baf7 100644 --- a/karbon/plugins/shadoweffect/vshadowdecorator.h +++ b/karbon/plugins/shadoweffect/vshadowdecorator.h @@ -29,7 +29,7 @@ class KARBONBASE_EXPORT VShadowDecorator : public VObject { public: - VShadowDecorator( VObject* object, VObject* parent, int distance = 2, int angle = 0, float opacity = 1.0 ); + VShadowDecorator( VObject* object, VObject* tqparent, int distance = 2, int angle = 0, float opacity = 1.0 ); VShadowDecorator( const VShadowDecorator& obj ); virtual ~VShadowDecorator(); @@ -44,8 +44,8 @@ public: virtual void accept( VVisitor& /*visitor*/ ); - virtual void save( QDomElement& ) const; - virtual void load( const QDomElement& ) {} + virtual void save( TQDomElement& ) const; + virtual void load( const TQDomElement& ) {} virtual VObject* clone() const; |