summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrImageEffectDia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpresenter/KPrImageEffectDia.cpp')
-rw-r--r--kpresenter/KPrImageEffectDia.cpp200
1 files changed, 100 insertions, 100 deletions
diff --git a/kpresenter/KPrImageEffectDia.cpp b/kpresenter/KPrImageEffectDia.cpp
index 0e62e7ea..a0354850 100644
--- a/kpresenter/KPrImageEffectDia.cpp
+++ b/kpresenter/KPrImageEffectDia.cpp
@@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qwidgetstack.h>
-#include <qcheckbox.h>
-#include <qimage.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqwidgetstack.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
#include <kimageeffect.h>
#include <klocale.h>
@@ -32,15 +32,15 @@
#include "KPrImageEffectDia.h"
-KPrImageEffectDia::KPrImageEffectDia(QWidget * parent, const char * name):
- KDialogBase(parent, name, true, i18n("Image Effect"), Ok|Cancel, Ok)
+KPrImageEffectDia::KPrImageEffectDia(TQWidget * tqparent, const char * name):
+ KDialogBase(tqparent, name, true, i18n("Image Effect"), Ok|Cancel, Ok)
{
- m_pix = QPixmap();
+ m_pix = TQPixmap();
m_effect = IE_NONE;
- m_param1 = QVariant();
- m_param2 = QVariant();
- m_param3 = QVariant();
+ m_param1 = TQVariant();
+ m_param2 = TQVariant();
+ m_param3 = TQVariant();
base = new EffectBrowserBase(this, "effect_base");
@@ -48,11 +48,11 @@ KPrImageEffectDia::KPrImageEffectDia(QWidget * parent, const char * name):
setupSignals();
- connect((QWidget *)base->m_effectCombo, SIGNAL(activated(int)),
- this, SLOT(effectChanged(int)));
+ connect((TQWidget *)base->m_effectCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(effectChanged(int)));
- connect(this, SIGNAL(okClicked()),
- this, SLOT(okClicked()));
+ connect(this, TQT_SIGNAL(okClicked()),
+ this, TQT_SLOT(okClicked()));
}
KPrImageEffectDia::~KPrImageEffectDia()
@@ -62,47 +62,47 @@ KPrImageEffectDia::~KPrImageEffectDia()
void KPrImageEffectDia::effectChanged(int eff)
{
- QImage _tmpImage = m_origpix.convertToImage();
+ TQImage _tmpImage = m_origpix.convertToImage();
//clear the (unused) params
- m_param1 = QVariant();
- m_param2 = QVariant();
- m_param3 = QVariant();
+ m_param1 = TQVariant();
+ m_param2 = TQVariant();
+ m_param3 = TQVariant();
m_effect = static_cast<ImageEffect>(eff);
switch (m_effect) {
case IE_CHANNEL_INTENSITY: {
- m_param1 = QVariant(base->chanInt_value->value());
- m_param2 = QVariant(base->chanInt_component->currentItem());
+ m_param1 = TQVariant(base->chanInt_value->value());
+ m_param2 = TQVariant(base->chanInt_component->currentItem());
_tmpImage = KImageEffect::channelIntensity(_tmpImage, m_param1.toDouble()/100.0,
static_cast<KImageEffect::RGBComponent>(m_param2.toInt()));
break;
}
case IE_FADE: {
- m_param1 = QVariant(base->fade_value->value());
- m_param2 = QVariant(base->fade_color->color());
+ m_param1 = TQVariant(base->fade_value->value());
+ m_param2 = TQVariant(base->fade_color->color());
_tmpImage = KImageEffect::fade(_tmpImage, m_param1.toDouble(), m_param2.toColor());
break;
}
case IE_FLATTEN: {
- m_param1 = QVariant(base->flatten_color1->color());
- m_param2 = QVariant(base->flatten_color2->color());
+ m_param1 = TQVariant(base->flatten_color1->color());
+ m_param2 = TQVariant(base->flatten_color2->color());
_tmpImage = KImageEffect::flatten(_tmpImage, m_param1.toColor(), m_param2.toColor());
break;
}
case IE_INTENSITY: {
- m_param1 = QVariant(base->intensity_value->value());
+ m_param1 = TQVariant(base->intensity_value->value());
_tmpImage = KImageEffect::intensity(_tmpImage, m_param1.toDouble()/100.0);
break;
}
case IE_DESATURATE: {
- m_param1 = QVariant(base->desaturate_value->value());
+ m_param1 = TQVariant(base->desaturate_value->value());
_tmpImage = KImageEffect::desaturate(_tmpImage, m_param1.toDouble());
break;
}
case IE_CONTRAST: {
- m_param1 = QVariant(base->contrast_value->value());
+ m_param1 = TQVariant(base->contrast_value->value());
_tmpImage = KImageEffect::contrast(_tmpImage, m_param1.toInt());
break;
}
@@ -115,12 +115,12 @@ void KPrImageEffectDia::effectChanged(int eff)
break;
}
case IE_THRESHOLD: {
- m_param1 = QVariant(base->threshold_value->value());
+ m_param1 = TQVariant(base->threshold_value->value());
KImageEffect::threshold(_tmpImage, m_param1.toInt());
break;
}
case IE_SOLARIZE: {
- m_param1 = QVariant(base->solarize_value->value());
+ m_param1 = TQVariant(base->solarize_value->value());
KImageEffect::solarize(_tmpImage, m_param1.toDouble());
break;
}
@@ -133,60 +133,60 @@ void KPrImageEffectDia::effectChanged(int eff)
break;
}
case IE_CHARCOAL: {
- m_param1 = QVariant(base->charcoal_value->value());
+ m_param1 = TQVariant(base->charcoal_value->value());
_tmpImage = KImageEffect::charcoal(_tmpImage, m_param1.toDouble());
break;
}
case IE_NOISE: {
- m_param1 = QVariant(base->noise_type->currentItem());
+ m_param1 = TQVariant(base->noise_type->currentItem());
_tmpImage = KImageEffect::addNoise(_tmpImage, static_cast<KImageEffect::NoiseType>(m_param1.toInt()));
break;
}
case IE_BLUR: {
- m_param1 = QVariant(base->blur_value->value());
+ m_param1 = TQVariant(base->blur_value->value());
_tmpImage = KImageEffect::blur(_tmpImage, m_param1.toDouble());
break;
}
case IE_EDGE: {
- m_param1 = QVariant(base->edge_value->value());
+ m_param1 = TQVariant(base->edge_value->value());
_tmpImage = KImageEffect::edge(_tmpImage, m_param1.toDouble());
break;
}
case IE_IMPLODE: {
- m_param1 = QVariant(base->implode_value->value());
+ m_param1 = TQVariant(base->implode_value->value());
_tmpImage = KImageEffect::implode(_tmpImage, m_param1.toDouble());
break;
}
case IE_OIL_PAINT: {
- m_param1 = QVariant(base->oilPaint_radius->value());
+ m_param1 = TQVariant(base->oilPaint_radius->value());
_tmpImage = KImageEffect::oilPaint(_tmpImage, m_param1.toInt());
break;
}
case IE_SHARPEN: {
- m_param1 = QVariant(base->sharpen_value->value());
+ m_param1 = TQVariant(base->sharpen_value->value());
_tmpImage = KImageEffect::sharpen(_tmpImage, m_param1.toDouble());
break;
}
case IE_SPREAD: {
- m_param1 = QVariant(base->spread_value->value());
+ m_param1 = TQVariant(base->spread_value->value());
_tmpImage = KImageEffect::spread(_tmpImage, m_param1.toInt());
break;
}
case IE_SHADE: {
- m_param1 = QVariant(base->shade_color->isChecked());
- m_param2 = QVariant(base->shade_azimuth->value());
- m_param3 = QVariant(base->shade_elevation->value());
+ m_param1 = TQVariant(base->shade_color->isChecked());
+ m_param2 = TQVariant(base->shade_azimuth->value());
+ m_param3 = TQVariant(base->shade_elevation->value());
_tmpImage = KImageEffect::shade(_tmpImage, m_param1.toBool(), m_param2.toDouble(), m_param3.toDouble());
break;
}
case IE_SWIRL: {
- m_param1 = QVariant(base->swirl_value->value());
+ m_param1 = TQVariant(base->swirl_value->value());
_tmpImage = KImageEffect::swirl(_tmpImage, m_param1.toDouble());
break;
}
case IE_WAVE: {
- m_param1 = QVariant(base->wave_amplitude->value());
- m_param2 = QVariant(base->wave_length->value());
+ m_param1 = TQVariant(base->wave_amplitude->value());
+ m_param2 = TQVariant(base->wave_length->value());
_tmpImage = KImageEffect::wave(_tmpImage, m_param1.toDouble(), m_param2.toDouble());
break;
}
@@ -206,7 +206,7 @@ void KPrImageEffectDia::okClicked()
}
-void KPrImageEffectDia::setPixmap(QPixmap pix)
+void KPrImageEffectDia::setPixmap(TQPixmap pix)
{
m_pix = pix;
m_origpix = pix;
@@ -217,10 +217,10 @@ void KPrImageEffectDia::setPixmap(QPixmap pix)
void KPrImageEffectDia::updatePreview()
{
base->m_previewLabel->setPixmap(m_pix);
- base->m_previewLabel->repaint(false);
+ base->m_previewLabel->tqrepaint(false);
}
-void KPrImageEffectDia::setEffect(ImageEffect eff, QVariant p1, QVariant p2, QVariant p3)
+void KPrImageEffectDia::setEffect(ImageEffect eff, TQVariant p1, TQVariant p2, TQVariant p3)
{
m_effect = eff;
m_param1 = p1;
@@ -323,10 +323,10 @@ void KPrImageEffectDia::setEffect(ImageEffect eff, QVariant p1, QVariant p2, QVa
}
base->m_effectCombo->setCurrentItem(static_cast<int>(m_effect));
- base->m_widgetStack->raiseWidget(static_cast<int>(m_effect)); //bug in Qt? the above doesn't emit this :(
+ base->m_widgetStack->raiseWidget(static_cast<int>(m_effect)); //bug in TQt? the above doesn't emit this :(
}
-void KPrImageEffectDia::showEvent(QShowEvent * e)
+void KPrImageEffectDia::showEvent(TQShowEvent * e)
{
KDialogBase::showEvent(e);
effectChanged((int)m_effect);
@@ -334,74 +334,74 @@ void KPrImageEffectDia::showEvent(QShowEvent * e)
void KPrImageEffectDia::setupSignals()
{
- connect((QWidget *)base->chanInt_value, SIGNAL(valueChanged(int)),
- this, SLOT(effectParamChanged()));
- connect((QWidget *)base->chanInt_component, SIGNAL(activated(int)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->chanInt_value, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(effectParamChanged()));
+ connect((TQWidget *)base->chanInt_component, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->fade_value, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
- connect((QWidget *)base->fade_color, SIGNAL(changed(const QColor&)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->fade_value, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
+ connect((TQWidget *)base->fade_color, TQT_SIGNAL(changed(const TQColor&)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->flatten_color1, SIGNAL(changed(const QColor&)),
- this, SLOT(effectParamChanged()));
- connect((QWidget *)base->flatten_color2, SIGNAL(changed(const QColor&)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->flatten_color1, TQT_SIGNAL(changed(const TQColor&)),
+ this, TQT_SLOT(effectParamChanged()));
+ connect((TQWidget *)base->flatten_color2, TQT_SIGNAL(changed(const TQColor&)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->intensity_value, SIGNAL(valueChanged(int)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->intensity_value, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->desaturate_value, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->desaturate_value, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->contrast_value, SIGNAL(valueChanged(int)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->contrast_value, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->threshold_value, SIGNAL(valueChanged(int)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->threshold_value, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->solarize_value, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->solarize_value, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->charcoal_value, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->charcoal_value, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->noise_type, SIGNAL(activated(int)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->noise_type, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->blur_value, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->blur_value, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->edge_value, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->edge_value, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->implode_value, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->implode_value, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->oilPaint_radius, SIGNAL(valueChanged(int)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->oilPaint_radius, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->sharpen_value, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->sharpen_value, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->spread_value, SIGNAL(valueChanged(int)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->spread_value, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->shade_color, SIGNAL(toggled(bool)),
- this, SLOT(effectParamChanged()));
- connect((QWidget *)base->shade_elevation, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
- connect((QWidget *)base->shade_azimuth, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->shade_color, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(effectParamChanged()));
+ connect((TQWidget *)base->shade_elevation, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
+ connect((TQWidget *)base->shade_azimuth, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->swirl_value, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->swirl_value, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
- connect((QWidget *)base->wave_amplitude, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
- connect((QWidget *)base->wave_length, SIGNAL(valueChanged(double)),
- this, SLOT(effectParamChanged()));
+ connect((TQWidget *)base->wave_amplitude, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
+ connect((TQWidget *)base->wave_length, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(effectParamChanged()));
}
void KPrImageEffectDia::effectParamChanged()