summaryrefslogtreecommitdiffstats
path: root/digikam/imageplugins/noisereduction/imageeffect_noisereduction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'digikam/imageplugins/noisereduction/imageeffect_noisereduction.cpp')
-rw-r--r--digikam/imageplugins/noisereduction/imageeffect_noisereduction.cpp138
1 files changed, 69 insertions, 69 deletions
diff --git a/digikam/imageplugins/noisereduction/imageeffect_noisereduction.cpp b/digikam/imageplugins/noisereduction/imageeffect_noisereduction.cpp
index aed84cde..fd0d0a23 100644
--- a/digikam/imageplugins/noisereduction/imageeffect_noisereduction.cpp
+++ b/digikam/imageplugins/noisereduction/imageeffect_noisereduction.cpp
@@ -21,18 +21,18 @@
*
* ============================================================ */
-// Qt includes.
-
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qstring.h>
-#include <qtabwidget.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qtextstream.h>
+// TQt includes.
+
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
+#include <tqstring.h>
+#include <tqtabwidget.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
// KDE includes.
@@ -61,12 +61,12 @@
namespace DigikamNoiseReductionImagesPlugin
{
-ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
- : Digikam::CtrlPanelDlg(parent, i18n("Noise Reduction"),
+ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(TQWidget* tqparent)
+ : Digikam::CtrlPanelDlg(tqparent, i18n("Noise Reduction"),
"noisereduction", true, true, true,
Digikam::ImagePannelWidget::SeparateViewAll)
{
- QString whatsThis;
+ TQString whatsThis;
KAboutData* about = new KAboutData("digikam",
I18N_NOOP("Noise Reduction"),
@@ -87,18 +87,18 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
- QTabWidget *mainTab = new QTabWidget(m_imagePreviewWidget);
+ TQTabWidget *mainTab = new TQTabWidget(m_imagePreviewWidget);
- QWidget* firstPage = new QWidget( mainTab );
- QGridLayout* gridSettings = new QGridLayout( firstPage, 6, 1, spacingHint());
+ TQWidget* firstPage = new TQWidget( mainTab );
+ TQGridLayout* gridSettings = new TQGridLayout( firstPage, 6, 1, spacingHint());
mainTab->addTab( firstPage, i18n("Details") );
- QLabel *label1 = new QLabel(i18n("Radius:"), firstPage);
+ TQLabel *label1 = new TQLabel(i18n("Radius:"), firstPage);
m_radiusInput = new KDoubleNumInput(firstPage);
m_radiusInput->setPrecision(1);
m_radiusInput->setRange(0.0, 10.0, 0.1, true);
- QWhatsThis::add( m_radiusInput, i18n("<p><b>Radius</b>: this control selects the "
+ TQWhatsThis::add( m_radiusInput, i18n("<p><b>Radius</b>: this control selects the "
"gliding window size used for the filter. Larger values do not increase "
"the amount of time needed to filter each pixel in the image but "
"can cause blurring. This window moves across the image, and the "
@@ -112,12 +112,12 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
- QLabel *label3 = new QLabel(i18n("Threshold:"), firstPage);
+ TQLabel *label3 = new TQLabel(i18n("Threshold:"), firstPage);
m_thresholdInput = new KDoubleNumInput(firstPage);
m_thresholdInput->setPrecision(2);
m_thresholdInput->setRange(0.0, 1.0, 0.01, true);
- QWhatsThis::add( m_thresholdInput, i18n("<p><b>Threshold</b>: use the slider for coarse adjustment, "
+ TQWhatsThis::add( m_thresholdInput, i18n("<p><b>Threshold</b>: use the slider for coarse adjustment, "
"and the spin control for fine adjustment to control edge detection sensitivity. "
"This value should be set so that edges and details are clearly visible "
"and noise is smoothed out. "
@@ -130,12 +130,12 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
- QLabel *label4 = new QLabel(i18n("Texture:"), firstPage);
+ TQLabel *label4 = new TQLabel(i18n("Texture:"), firstPage);
m_textureInput = new KDoubleNumInput(firstPage);
m_textureInput->setPrecision(2);
m_textureInput->setRange(-0.99, 0.99, 0.01, true);
- QWhatsThis::add( m_textureInput, i18n("<p><b>Texture</b>: this control sets the texture accuracy. "
+ TQWhatsThis::add( m_textureInput, i18n("<p><b>Texture</b>: this control sets the texture accuracy. "
"This value can be used, to get more or less texture accuracy. When decreased, "
"then noise and texture are blurred out, when increased then texture is "
"amplified, but also noise will increase. It has almost no effect on image edges."));
@@ -145,12 +145,12 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
- QLabel *label7 = new QLabel(i18n("Sharpness:"), firstPage); // Filter setting "Lookahead".
+ TQLabel *label7 = new TQLabel(i18n("Sharpness:"), firstPage); // Filter setting "Lookahead".
m_sharpnessInput = new KDoubleNumInput(firstPage);
m_sharpnessInput->setPrecision(2);
m_sharpnessInput->setRange(0.0, 1.0, 0.1, true);
- QWhatsThis::add( m_sharpnessInput, i18n("<p><b>Sharpness</b>: "
+ TQWhatsThis::add( m_sharpnessInput, i18n("<p><b>Sharpness</b>: "
"This value improves the frequency response for the filter. "
"When it is too strong then not all noise can be removed, or spike noise may appear. "
"Set it near to maximum, if you want to remove very weak noise or JPEG-artifacts, "
@@ -161,12 +161,12 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
- QLabel *label5 = new QLabel(i18n("Edge Lookahead:"), firstPage); // Filter setting "Sharp".
+ TQLabel *label5 = new TQLabel(i18n("Edge Lookahead:"), firstPage); // Filter setting "Sharp".
m_lookaheadInput = new KDoubleNumInput(firstPage);
m_lookaheadInput->setPrecision(2);
m_lookaheadInput->setRange(0.01, 20.0, 0.01, true);
- QWhatsThis::add( m_lookaheadInput, i18n("<p><b>Edge</b>: "
+ TQWhatsThis::add( m_lookaheadInput, i18n("<p><b>Edge</b>: "
"This value defines the pixel distance to which the filter looks ahead for edges. "
"When this value is increased, then spike noise is erased. "
"You can eventually re-adjust the <b>Edge</b> filter, when you have changed this setting. "
@@ -178,12 +178,12 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
- QLabel *label10 = new QLabel(i18n("Erosion:"), firstPage);
+ TQLabel *label10 = new TQLabel(i18n("Erosion:"), firstPage);
m_phaseInput = new KDoubleNumInput(firstPage);
m_phaseInput->setPrecision(1);
m_phaseInput->setRange(0.5, 20.0, 0.5, true);
- QWhatsThis::add( m_phaseInput, i18n("<p><b>Erosion</b>: "
+ TQWhatsThis::add( m_phaseInput, i18n("<p><b>Erosion</b>: "
"Use this to increase edge noise erosion and spike noise erosion "
"(noise is removed by erosion)."));
@@ -194,16 +194,16 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
- QWidget* secondPage = new QWidget( mainTab );
- QGridLayout* gridSettings2 = new QGridLayout( secondPage, 4, 1, spacingHint());
+ TQWidget* secondPage = new TQWidget( mainTab );
+ TQGridLayout* gridSettings2 = new TQGridLayout( secondPage, 4, 1, spacingHint());
mainTab->addTab( secondPage, i18n("Advanced") );
- QLabel *label2 = new QLabel(i18n("Luminance:"), secondPage);
+ TQLabel *label2 = new TQLabel(i18n("Luminance:"), secondPage);
m_lumToleranceInput = new KDoubleNumInput(secondPage);
m_lumToleranceInput->setPrecision(1);
m_lumToleranceInput->setRange(0.0, 1.0, 0.1, true);
- QWhatsThis::add( m_lumToleranceInput, i18n("<p><b>Luminance</b>: this control sets the luminance tolerance of the image."
+ TQWhatsThis::add( m_lumToleranceInput, i18n("<p><b>Luminance</b>: this control sets the luminance tolerance of the image."
"We recommend using either the <b>Color</b> or the <b>Luminance</b> tolerance settings "
"to make an image correction, not both at the same time. These settings "
"do not influence the main smoothing process controlled by the <b>Details</b> "
@@ -214,12 +214,12 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
- QLabel *label6 = new QLabel(i18n("Color:"), secondPage);
+ TQLabel *label6 = new TQLabel(i18n("Color:"), secondPage);
m_csmoothInput = new KDoubleNumInput(secondPage);
m_csmoothInput->setPrecision(1);
m_csmoothInput->setRange(0.0, 1.0, 0.1, true);
- QWhatsThis::add( m_csmoothInput, i18n("<p><b>Color</b>: this control sets the color tolerance of the image. It is "
+ TQWhatsThis::add( m_csmoothInput, i18n("<p><b>Color</b>: this control sets the color tolerance of the image. It is "
"recommended using either the <b>Color</b> or the <b>Luminance</b> tolerance "
"to make image correction, not both at the same time. These settings "
"do not influence the main smoothing process controlled by the <b>Details</b> "
@@ -230,12 +230,12 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
- QLabel *label8 = new QLabel(i18n("Gamma:"), secondPage);
+ TQLabel *label8 = new TQLabel(i18n("Gamma:"), secondPage);
m_gammaInput = new KDoubleNumInput(secondPage);
m_gammaInput->setPrecision(1);
m_gammaInput->setRange(0.3, 3.0, 0.1, true);
- QWhatsThis::add( m_gammaInput, i18n("<p><b>Gamma</b>: this control sets the gamma tolerance of the image. This value "
+ TQWhatsThis::add( m_gammaInput, i18n("<p><b>Gamma</b>: this control sets the gamma tolerance of the image. This value "
"can be used to increase the tolerance values for darker areas (which commonly "
"are noisier). This results in more blur for shadow areas."));
@@ -244,12 +244,12 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
- QLabel *label9 = new QLabel(i18n("Damping:"), secondPage);
+ TQLabel *label9 = new TQLabel(i18n("Damping:"), secondPage);
m_dampingInput = new KDoubleNumInput(secondPage);
m_dampingInput->setPrecision(1);
m_dampingInput->setRange(0.5, 20.0, 0.5, true);
- QWhatsThis::add( m_dampingInput, i18n("<p><b>Damping</b>: this control sets the phase-jitter damping adjustment. "
+ TQWhatsThis::add( m_dampingInput, i18n("<p><b>Damping</b>: this control sets the phase-jitter damping adjustment. "
"This value defines how fast the adaptive filter-radius reacts to luminance "
"variations. If increased, then edges appear smoother; if too high, then blur "
"may occur. If at minimum, then noise and phase jitter at the edges can occur. It "
@@ -265,35 +265,35 @@ ImageEffect_NoiseReduction::ImageEffect_NoiseReduction(QWidget* parent)
// -------------------------------------------------------------
-// connect(m_radiusInput, SIGNAL(valueChanged(double)),
-// this, SLOT(slotTimer()));
+// connect(m_radiusInput, TQT_SIGNAL(valueChanged(double)),
+// this, TQT_SLOT(slotTimer()));
//
-// connect(m_lumToleranceInput, SIGNAL(valueChanged(double)),
-// this, SLOT(slotTimer()));
+// connect(m_lumToleranceInput, TQT_SIGNAL(valueChanged(double)),
+// this, TQT_SLOT(slotTimer()));
//
-// connect(m_thresholdInput, SIGNAL(valueChanged(double)),
-// this, SLOT(slotTimer()));
+// connect(m_thresholdInput, TQT_SIGNAL(valueChanged(double)),
+// this, TQT_SLOT(slotTimer()));
//
-// connect(m_textureInput, SIGNAL(valueChanged(double)),
-// this, SLOT(slotTimer()));
+// connect(m_textureInput, TQT_SIGNAL(valueChanged(double)),
+// this, TQT_SLOT(slotTimer()));
//
-// connect(m_sharpnessInput, SIGNAL(valueChanged(double)),
-// this, SLOT(slotTimer()));
+// connect(m_sharpnessInput, TQT_SIGNAL(valueChanged(double)),
+// this, TQT_SLOT(slotTimer()));
//
-// connect(m_csmoothInput, SIGNAL(valueChanged(double)),
-// this, SLOT(slotTimer()));
+// connect(m_csmoothInput, TQT_SIGNAL(valueChanged(double)),
+// this, TQT_SLOT(slotTimer()));
//
-// connect(m_lookaheadInput, SIGNAL(valueChanged(double)),
-// this, SLOT(slotTimer()));
+// connect(m_lookaheadInput, TQT_SIGNAL(valueChanged(double)),
+// this, TQT_SLOT(slotTimer()));
//
-// connect(m_gammaInput, SIGNAL(valueChanged(double)),
-// this, SLOT(slotTimer()));
+// connect(m_gammaInput, TQT_SIGNAL(valueChanged(double)),
+// this, TQT_SLOT(slotTimer()));
//
-// connect(m_dampingInput, SIGNAL(valueChanged(double)),
-// this, SLOT(slotTimer()));
+// connect(m_dampingInput, TQT_SIGNAL(valueChanged(double)),
+// this, TQT_SLOT(slotTimer()));
//
-// connect(m_phaseInput, SIGNAL(valueChanged(double)),
-// this, SLOT(slotTimer()));
+// connect(m_phaseInput, TQT_SIGNAL(valueChanged(double)),
+// this, TQT_SLOT(slotTimer()));
}
ImageEffect_NoiseReduction::~ImageEffect_NoiseReduction()
@@ -478,21 +478,21 @@ void ImageEffect_NoiseReduction::putFinalData(void)
void ImageEffect_NoiseReduction::slotUser3()
{
KURL loadRestorationFile = KFileDialog::getOpenURL(KGlobalSettings::documentPath(),
- QString( "*" ), this,
- QString( i18n("Photograph Noise Reduction Settings File to Load")) );
+ TQString( "*" ), this,
+ TQString( i18n("Photograph Noise Reduction Settings File to Load")) );
if ( loadRestorationFile.isEmpty() )
return;
- QFile file(loadRestorationFile.path());
+ TQFile file(loadRestorationFile.path());
if ( file.open(IO_ReadOnly) )
{
- QTextStream stream( &file );
+ TQTextStream stream( &file );
if ( stream.readLine() != "# Photograph Noise Reduction Configuration File" )
{
KMessageBox::error(this,
i18n("\"%1\" is not a Photograph Noise Reduction settings text file.")
- .arg(loadRestorationFile.fileName()));
+ .tqarg(loadRestorationFile.fileName()));
file.close();
return;
}
@@ -520,16 +520,16 @@ void ImageEffect_NoiseReduction::slotUser3()
void ImageEffect_NoiseReduction::slotUser2()
{
KURL saveRestorationFile = KFileDialog::getSaveURL(KGlobalSettings::documentPath(),
- QString( "*" ), this,
- QString( i18n("Photograph Noise Reduction Settings File to Save")) );
+ TQString( "*" ), this,
+ TQString( i18n("Photograph Noise Reduction Settings File to Save")) );
if ( saveRestorationFile.isEmpty() )
return;
- QFile file(saveRestorationFile.path());
+ TQFile file(saveRestorationFile.path());
if ( file.open(IO_WriteOnly) )
{
- QTextStream stream( &file );
+ TQTextStream stream( &file );
stream << "# Photograph Noise Reduction Configuration File\n";
stream << m_radiusInput->value() << "\n";
stream << m_lumToleranceInput->value() << "\n";