summaryrefslogtreecommitdiffstats
path: root/kview/modules/effects/kvieweffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kview/modules/effects/kvieweffects.cpp')
-rw-r--r--kview/modules/effects/kvieweffects.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kview/modules/effects/kvieweffects.cpp b/kview/modules/effects/kvieweffects.cpp
index 9295c876..a2e57327 100644
--- a/kview/modules/effects/kvieweffects.cpp
+++ b/kview/modules/effects/kvieweffects.cpp
@@ -4,7 +4,7 @@
#include "kvieweffects.h"
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <kaction.h>
#include <klocale.h>
@@ -15,16 +15,16 @@
#include <kdialogbase.h>
#include <knuminput.h>
#include <kiconeffect.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kcolorbutton.h>
#include <kimageeffect.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <assert.h>
typedef KGenericFactory<KViewEffects> KViewEffectsFactory;
K_EXPORT_COMPONENT_FACTORY( kview_effectsplugin, KViewEffectsFactory( "kvieweffectsplugin" ) )
-KViewEffects::KViewEffects( QObject* parent, const char* name, const QStringList & )
+KViewEffects::KViewEffects( TQObject* parent, const char* name, const TQStringList & )
: Plugin( parent, name )
, m_gamma( 0.5 ), m_lastgamma( -1.0 )
, m_opacity( 50 ), m_lastopacity( -1 )
@@ -32,26 +32,26 @@ KViewEffects::KViewEffects( QObject* parent, const char* name, const QStringList
, m_color( white )
, m_image( 0 )
{
- QObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
+ TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() );
delete viewerList;
if( m_pViewer )
{
KAction * gammaaction = new KAction( i18n( "&Gamma Correction..." ), 0, 0,
- this, SLOT( gamma() ),
+ this, TQT_SLOT( gamma() ),
actionCollection(), "plugin_effects_gamma" );
KAction * blendaction = new KAction( i18n( "&Blend Color..." ), 0, 0,
- this, SLOT( blend() ),
+ this, TQT_SLOT( blend() ),
actionCollection(), "plugin_effects_blend" );
KAction * intensityaction = new KAction( i18n( "Change &Intensity (Brightness)..." ), 0, 0,
- this, SLOT( intensity() ),
+ this, TQT_SLOT( intensity() ),
actionCollection(), "plugin_effects_intensity" );
gammaaction->setEnabled( m_pViewer->canvas()->image() != 0 );
blendaction->setEnabled( m_pViewer->canvas()->image() != 0 );
intensityaction->setEnabled( m_pViewer->canvas()->image() != 0 );
- connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), gammaaction, SLOT( setEnabled( bool ) ) );
- connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), blendaction, SLOT( setEnabled( bool ) ) );
- connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), intensityaction, SLOT( setEnabled( bool ) ) );
+ connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), gammaaction, TQT_SLOT( setEnabled( bool ) ) );
+ connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), blendaction, TQT_SLOT( setEnabled( bool ) ) );
+ connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), intensityaction, TQT_SLOT( setEnabled( bool ) ) );
}
else
kdWarning( 4630 ) << "no KImageViewer interface found - the effects plugin won't work" << endl;
@@ -67,20 +67,20 @@ KViewEffects::~KViewEffects()
void KViewEffects::intensity()
{
KDialogBase dlg( m_pViewer->widget(), "Intensity Dialog", true /*modal*/, i18n( "Change Intensity" ), KDialogBase::Ok | KDialogBase::Try | KDialogBase::Cancel );
- connect( &dlg, SIGNAL( tryClicked() ), this, SLOT( applyIntensity() ) );
+ connect( &dlg, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyIntensity() ) );
- QVBox * vbox = new QVBox( &dlg );
+ TQVBox * vbox = new TQVBox( &dlg );
vbox->setSpacing( KDialog::spacingHint() );
dlg.setMainWidget( vbox );
KIntNumInput * percent = new KIntNumInput( vbox, "Intensity Input" );
percent->setRange( 0, 100, 1, true );
percent->setValue( m_intensity );
percent->setLabel( i18n( "&Intensity:" ) );
- percent->setSuffix( QString::fromAscii( "%" ) );
- connect( percent, SIGNAL( valueChanged( int ) ), this, SLOT( setIntensity( int ) ) );
+ percent->setSuffix( TQString::fromAscii( "%" ) );
+ connect( percent, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( setIntensity( int ) ) );
int result = dlg.exec();
- if( result == QDialog::Accepted )
+ if( result == TQDialog::Accepted )
{
applyIntensity();
m_pViewer->setModified( true );
@@ -104,7 +104,7 @@ void KViewEffects::applyIntensity()
if( m_intensity == m_lastintensity )
return; // nothing to do
- QImage * work = workImage();
+ TQImage * work = workImage();
if( work )
{
KImageEffect::intensity( *work, m_intensity * 0.01 );
@@ -117,24 +117,24 @@ void KViewEffects::applyIntensity()
void KViewEffects::blend()
{
KDialogBase dlg( m_pViewer->widget(), "Blend Color Dialog", true /*modal*/, i18n( "Blend Color" ), KDialogBase::Ok | KDialogBase::Try | KDialogBase::Cancel );
- connect( &dlg, SIGNAL( tryClicked() ), this, SLOT( applyBlend() ) );
+ connect( &dlg, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyBlend() ) );
- QVBox * vbox = new QVBox( &dlg );
+ TQVBox * vbox = new TQVBox( &dlg );
vbox->setSpacing( KDialog::spacingHint() );
dlg.setMainWidget( vbox );
KIntNumInput * opacity = new KIntNumInput( vbox, "Opacity Input" );
opacity->setRange( 0, 100, 1, true );
opacity->setValue( m_opacity );
opacity->setLabel( i18n( "O&pacity:" ) );
- opacity->setSuffix( QString::fromAscii( "%" ) );
- connect( opacity, SIGNAL( valueChanged( int ) ), this, SLOT( setOpacity( int ) ) );
- QLabel * label = new QLabel( i18n( "Blend c&olor:" ), vbox );
+ opacity->setSuffix( TQString::fromAscii( "%" ) );
+ connect( opacity, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( setOpacity( int ) ) );
+ TQLabel * label = new TQLabel( i18n( "Blend c&olor:" ), vbox );
KColorButton * color = new KColorButton( m_color, vbox, "Color Input Button" );
label->setBuddy( color );
- connect( color, SIGNAL( changed( const QColor & ) ), this, SLOT( setColor( const QColor & ) ) );
+ connect( color, TQT_SIGNAL( changed( const TQColor & ) ), this, TQT_SLOT( setColor( const TQColor & ) ) );
int result = dlg.exec();
- if( result == QDialog::Accepted )
+ if( result == TQDialog::Accepted )
{
applyBlend();
m_pViewer->setModified( true );
@@ -152,7 +152,7 @@ void KViewEffects::setOpacity( int opacity )
m_opacity = opacity;
}
-void KViewEffects::setColor( const QColor & color )
+void KViewEffects::setColor( const TQColor & color )
{
m_color = color;
}
@@ -162,7 +162,7 @@ void KViewEffects::applyBlend()
if( m_opacity == m_lastopacity )
return; // nothing to do
- QImage * work = workImage();
+ TQImage * work = workImage();
if( work )
{
KImageEffect::blend( m_color, *work, m_opacity * 0.01 );
@@ -175,17 +175,17 @@ void KViewEffects::applyBlend()
void KViewEffects::gamma()
{
KDialogBase dlg( m_pViewer->widget(), "Gamma Correction Dialog", true /*modal*/, i18n( "Gamma Correction" ), KDialogBase::Ok | KDialogBase::Try | KDialogBase::Cancel );
- connect( &dlg, SIGNAL( tryClicked() ), this, SLOT( applyGammaCorrection() ) );
+ connect( &dlg, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyGammaCorrection() ) );
// create dialog
KDoubleNumInput * gammavalue = new KDoubleNumInput( 0.0, 1.0, 0.5, 0.01, 4, &dlg, "Gamma value input" );
gammavalue->setRange( 0.0, 1.0, 0.01, true );
- connect( gammavalue, SIGNAL( valueChanged( double ) ), this, SLOT( setGammaValue( double ) ) );
+ connect( gammavalue, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( setGammaValue( double ) ) );
gammavalue->setLabel( i18n( "Gamma value:" ) );
dlg.setMainWidget( gammavalue );
int result = dlg.exec();
- if( result == QDialog::Accepted )
+ if( result == TQDialog::Accepted )
{
// apply gamma correction
applyGammaCorrection();
@@ -213,7 +213,7 @@ void KViewEffects::applyGammaCorrection()
if( m_gamma == m_lastgamma )
return; // nothing to do
- QImage * corrected = workImage();
+ TQImage * corrected = workImage();
if( corrected )
{
KIconEffect::toGamma( *corrected, m_gamma );
@@ -223,17 +223,17 @@ void KViewEffects::applyGammaCorrection()
}
}
-inline QImage * KViewEffects::workImage()
+inline TQImage * KViewEffects::workImage()
{
if( ! m_image )
{
- const QImage * canvasimage = m_pViewer->canvas()->image();
+ const TQImage * canvasimage = m_pViewer->canvas()->image();
if( canvasimage )
- m_image = new QImage( *canvasimage );
+ m_image = new TQImage( *canvasimage );
}
if( m_image )
{
- QImage * changed = new QImage( *m_image );
+ TQImage * changed = new TQImage( *m_image );
changed->detach();
return changed;
}