summaryrefslogtreecommitdiffstats
path: root/kolourpaint/pixmapfx
diff options
context:
space:
mode:
Diffstat (limited to 'kolourpaint/pixmapfx')
-rw-r--r--kolourpaint/pixmapfx/kpcoloreffect.cpp32
-rw-r--r--kolourpaint/pixmapfx/kpcoloreffect.h22
-rw-r--r--kolourpaint/pixmapfx/kpeffectbalance.cpp90
-rw-r--r--kolourpaint/pixmapfx/kpeffectbalance.h14
-rw-r--r--kolourpaint/pixmapfx/kpeffectblursharpen.cpp48
-rw-r--r--kolourpaint/pixmapfx/kpeffectblursharpen.h14
-rw-r--r--kolourpaint/pixmapfx/kpeffectemboss.cpp44
-rw-r--r--kolourpaint/pixmapfx/kpeffectemboss.h14
-rw-r--r--kolourpaint/pixmapfx/kpeffectflatten.cpp70
-rw-r--r--kolourpaint/pixmapfx/kpeffectflatten.h42
-rw-r--r--kolourpaint/pixmapfx/kpeffectinvert.cpp64
-rw-r--r--kolourpaint/pixmapfx/kpeffectinvert.h24
-rw-r--r--kolourpaint/pixmapfx/kpeffectreducecolors.cpp82
-rw-r--r--kolourpaint/pixmapfx/kpeffectreducecolors.h24
-rw-r--r--kolourpaint/pixmapfx/kpeffectsdialog.cpp68
-rw-r--r--kolourpaint/pixmapfx/kpeffectsdialog.h18
-rw-r--r--kolourpaint/pixmapfx/kpfloodfill.cpp48
-rw-r--r--kolourpaint/pixmapfx/kpfloodfill.h24
-rw-r--r--kolourpaint/pixmapfx/kppixmapfx.cpp352
-rw-r--r--kolourpaint/pixmapfx/kppixmapfx.h194
20 files changed, 644 insertions, 644 deletions
diff --git a/kolourpaint/pixmapfx/kpcoloreffect.cpp b/kolourpaint/pixmapfx/kpcoloreffect.cpp
index 1660c1fa..b0e04496 100644
--- a/kolourpaint/pixmapfx/kpcoloreffect.cpp
+++ b/kolourpaint/pixmapfx/kpcoloreffect.cpp
@@ -28,8 +28,8 @@
#include <kpcoloreffect.h>
-#include <qapplication.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
#include <kdialog.h>
#include <klocale.h>
@@ -40,7 +40,7 @@
#include <kpselection.h>
-kpColorEffectCommand::kpColorEffectCommand (const QString &name,
+kpColorEffectCommand::kpColorEffectCommand (const TQString &name,
bool actOnSelection,
kpMainWindow *mainWindow)
: kpCommand (mainWindow),
@@ -57,7 +57,7 @@ kpColorEffectCommand::~kpColorEffectCommand ()
// public virtual [base kpCommand]
-QString kpColorEffectCommand::name () const
+TQString kpColorEffectCommand::name () const
{
if (m_actOnSelection)
return i18n ("Selection: %1").arg (m_name);
@@ -80,24 +80,24 @@ void kpColorEffectCommand::execute ()
if (!doc)
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- const QPixmap oldPixmap = *doc->pixmap (m_actOnSelection);
+ const TQPixmap oldPixmap = *doc->pixmap (m_actOnSelection);
if (!isInvertible ())
{
- m_oldPixmapPtr = new QPixmap ();
+ m_oldPixmapPtr = new TQPixmap ();
*m_oldPixmapPtr = oldPixmap;
}
- QPixmap newPixmap = /*pure virtual*/applyColorEffect (oldPixmap);
+ TQPixmap newPixmap = /*pure virtual*/applyColorEffect (oldPixmap);
doc->setPixmap (m_actOnSelection, newPixmap);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public virtual [base kpCommand]
@@ -107,10 +107,10 @@ void kpColorEffectCommand::unexecute ()
if (!doc)
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- QPixmap newPixmap;
+ TQPixmap newPixmap;
if (!isInvertible ())
{
@@ -127,14 +127,14 @@ void kpColorEffectCommand::unexecute ()
delete m_oldPixmapPtr; m_oldPixmapPtr = 0;
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
kpColorEffectWidget::kpColorEffectWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name)
- : QWidget (parent, name),
+ TQWidget *parent, const char *name)
+ : TQWidget (parent, name),
m_actOnSelection (actOnSelection),
m_mainWindow (mainWindow)
{
@@ -146,9 +146,9 @@ kpColorEffectWidget::~kpColorEffectWidget ()
// public
-QString kpColorEffectWidget::caption () const
+TQString kpColorEffectWidget::caption () const
{
- return QString::null;
+ return TQString::null;
}
diff --git a/kolourpaint/pixmapfx/kpcoloreffect.h b/kolourpaint/pixmapfx/kpcoloreffect.h
index 8b3dfd09..afd60a5e 100644
--- a/kolourpaint/pixmapfx/kpcoloreffect.h
+++ b/kolourpaint/pixmapfx/kpcoloreffect.h
@@ -29,12 +29,12 @@
#ifndef KP_COLOR_EFFECT_H
#define KP_COLOR_EFFECT_H
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kpcommandhistory.h>
-class QPixmap;
+class TQPixmap;
class kpDocument;
class kpMainWindow;
@@ -43,12 +43,12 @@ class kpMainWindow;
class kpColorEffectCommand : public kpCommand
{
public:
- kpColorEffectCommand (const QString &name,
+ kpColorEffectCommand (const TQString &name,
bool actOnSelection,
kpMainWindow *mainWindow);
virtual ~kpColorEffectCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
public:
@@ -61,13 +61,13 @@ public:
virtual bool isInvertible () const { return false; }
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap) = 0;
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap) = 0;
private:
- QString m_name;
+ TQString m_name;
bool m_actOnSelection;
- QPixmap *m_oldPixmapPtr;
+ TQPixmap *m_oldPixmapPtr;
};
@@ -78,7 +78,7 @@ Q_OBJECT
public:
kpColorEffectWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpColorEffectWidget ();
signals:
@@ -91,10 +91,10 @@ signals:
void settingsChangedDelayed ();
public:
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const = 0;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap) = 0;
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap) = 0;
virtual kpColorEffectCommand *createCommand () const = 0;
diff --git a/kolourpaint/pixmapfx/kpeffectbalance.cpp b/kolourpaint/pixmapfx/kpeffectbalance.cpp
index f4494d29..d4e26a9c 100644
--- a/kolourpaint/pixmapfx/kpeffectbalance.cpp
+++ b/kolourpaint/pixmapfx/kpeffectbalance.cpp
@@ -32,12 +32,12 @@
#include <math.h>
-#include <qfontmetrics.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
+#include <tqfontmetrics.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -49,7 +49,7 @@
#if DEBUG_KP_EFFECT_BALANCE
- #include <qdatetime.h>
+ #include <tqdatetime.h>
#endif
@@ -127,7 +127,7 @@ static inline QRgb brightnessContrastGammaForRGB (QRgb rgb,
// public static
-QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap,
+TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap,
int channels,
int brightness, int contrast, int gamma)
{
@@ -138,10 +138,10 @@ QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap,
<< ",contrast=" << contrast
<< ",gamma=" << gamma
<< ")" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
#endif
- QImage image = kpPixmapFX::convertToImage (pixmap);
+ TQImage image = kpPixmapFX::convertToImage (pixmap);
#if DEBUG_KP_EFFECT_BALANCE
kdDebug () << "\tconvertToImage=" << timer.restart () << endl;
#endif
@@ -234,7 +234,7 @@ QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap,
kdDebug () << "\teffect=" << timer.restart () << endl;
#endif
- const QPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
+ const TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
#if DEBUG_KP_EFFECT_BALANCE
kdDebug () << "\tconvertToPixmap=" << timer.restart () << endl;
#endif
@@ -243,7 +243,7 @@ QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap,
}
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap)
{
return applyColorEffect (pixmap, m_channels,
m_brightness, m_contrast, m_gamma);
@@ -253,39 +253,39 @@ QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap)
kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
- QGridLayout *lay = new QGridLayout (this, 5, 5, marginHint (), spacingHint ());
+ TQGridLayout *lay = new TQGridLayout (this, 5, 5, marginHint (), spacingHint ());
- QLabel *brightnessLabel = new QLabel (i18n ("&Brightness:"), this);
+ TQLabel *brightnessLabel = new TQLabel (i18n ("&Brightness:"), this);
m_brightnessInput = new KIntNumInput (0/*value*/, this);
m_brightnessInput->setRange (-50, 50, 1/*step*/, true/*slider*/);
- QPushButton *brightnessResetPushButton = new QPushButton (i18n ("Re&set"), this);
+ TQPushButton *brightnessResetPushButton = new TQPushButton (i18n ("Re&set"), this);
- QLabel *contrastLabel = new QLabel (i18n ("Co&ntrast:"), this);
+ TQLabel *contrastLabel = new TQLabel (i18n ("Co&ntrast:"), this);
m_contrastInput = new KIntNumInput (0/*value*/, this);
m_contrastInput->setRange (-50, 50, 1/*step*/, true/*slider*/);
- QPushButton *contrastResetPushButton = new QPushButton (i18n ("&Reset"), this);
+ TQPushButton *contrastResetPushButton = new TQPushButton (i18n ("&Reset"), this);
- QLabel *gammaLabel = new QLabel (i18n ("&Gamma:"), this);
+ TQLabel *gammaLabel = new TQLabel (i18n ("&Gamma:"), this);
m_gammaInput = new KIntNumInput (0/*value*/, this);
m_gammaInput->setRange (-50, 50, 1/*step*/, true/*slider*/);
// TODO: This is what should be shown in the m_gammaInput spinbox
- m_gammaLabel = new QLabel (this);
+ m_gammaLabel = new TQLabel (this);
// TODO: This doesn't seem to be wide enough with some fonts so the
// whole layout moves when we drag the gamma slider.
m_gammaLabel->setMinimumWidth (m_gammaLabel->fontMetrics ().width (" 10.00 "));
m_gammaLabel->setAlignment (m_gammaLabel->alignment () | Qt::AlignRight);
- QPushButton *gammaResetPushButton = new QPushButton (i18n ("Rese&t"), this);
+ TQPushButton *gammaResetPushButton = new TQPushButton (i18n ("Rese&t"), this);
- QWidget *spaceWidget = new QLabel (this);
+ TQWidget *spaceWidget = new TQLabel (this);
spaceWidget->setFixedSize (1, spacingHint ());
- QLabel *channelLabel = new QLabel (i18n ("C&hannels:"), this);
+ TQLabel *channelLabel = new TQLabel (i18n ("C&hannels:"), this);
m_channelsComboBox = new KComboBox (this);
m_channelsComboBox->insertItem (i18n ("All"));
m_channelsComboBox->insertItem (i18n ("Red"));
@@ -293,7 +293,7 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection,
m_channelsComboBox->insertItem (i18n ("Blue"));
- QPushButton *resetPushButton = new QPushButton (i18n ("Reset &All Values"), this);
+ TQPushButton *resetPushButton = new TQPushButton (i18n ("Reset &All Values"), this);
brightnessLabel->setBuddy (m_brightnessInput);
@@ -327,28 +327,28 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection,
// (no need for settingsChangedDelayed() since BCG effect is so fast :))
- connect (m_brightnessInput, SIGNAL (valueChanged (int)),
- this, SIGNAL (settingsChangedNoWaitCursor ()));
- connect (m_contrastInput, SIGNAL (valueChanged (int)),
- this, SIGNAL (settingsChangedNoWaitCursor ()));
+ connect (m_brightnessInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SIGNAL (settingsChangedNoWaitCursor ()));
+ connect (m_contrastInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SIGNAL (settingsChangedNoWaitCursor ()));
- connect (m_gammaInput, SIGNAL (valueChanged (int)),
- this, SLOT (recalculateGammaLabel ()));
- connect (m_gammaInput, SIGNAL (valueChanged (int)),
- this, SIGNAL (settingsChangedNoWaitCursor ()));
+ connect (m_gammaInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (recalculateGammaLabel ()));
+ connect (m_gammaInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SIGNAL (settingsChangedNoWaitCursor ()));
- connect (m_channelsComboBox, SIGNAL (activated (int)),
- this, SIGNAL (settingsChanged ()));
+ connect (m_channelsComboBox, TQT_SIGNAL (activated (int)),
+ this, TQT_SIGNAL (settingsChanged ()));
- connect (brightnessResetPushButton, SIGNAL (clicked ()),
- this, SLOT (resetBrightness ()));
- connect (contrastResetPushButton, SIGNAL (clicked ()),
- this, SLOT (resetContrast ()));
- connect (gammaResetPushButton, SIGNAL (clicked ()),
- this, SLOT (resetGamma ()));
+ connect (brightnessResetPushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (resetBrightness ()));
+ connect (contrastResetPushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (resetContrast ()));
+ connect (gammaResetPushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (resetGamma ()));
- connect (resetPushButton, SIGNAL (clicked ()),
- this, SLOT (resetAll ()));
+ connect (resetPushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (resetAll ()));
recalculateGammaLabel ();
@@ -360,7 +360,7 @@ kpEffectBalanceWidget::~kpEffectBalanceWidget ()
// public virtual [base kpColorEffectWidget]
-QString kpEffectBalanceWidget::caption () const
+TQString kpEffectBalanceWidget::caption () const
{
return i18n ("Settings");
}
@@ -373,7 +373,7 @@ bool kpEffectBalanceWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectBalanceWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectBalanceWidget::applyColorEffect (const TQPixmap &pixmap)
{
return kpEffectBalanceCommand::applyColorEffect (pixmap,
channels (), brightness (), contrast (), gamma ());
@@ -434,7 +434,7 @@ void kpEffectBalanceWidget::recalculateGammaLabel ()
{
m_gammaLabel->setText (
" " +
- QString::number (pow (10, gamma () / 50.0),
+ TQString::number (pow (10, gamma () / 50.0),
'f'/*[-]9.9*/,
2/*precision*/) +
" ");
diff --git a/kolourpaint/pixmapfx/kpeffectbalance.h b/kolourpaint/pixmapfx/kpeffectbalance.h
index b045159f..e80bb7a6 100644
--- a/kolourpaint/pixmapfx/kpeffectbalance.h
+++ b/kolourpaint/pixmapfx/kpeffectbalance.h
@@ -32,7 +32,7 @@
#include <kpcoloreffect.h>
-class QLabel;
+class TQLabel;
class KComboBox;
class KIntNumInput;
@@ -58,12 +58,12 @@ public:
kpMainWindow *mainWindow);
virtual ~kpEffectBalanceCommand ();
- static QPixmap applyColorEffect (const QPixmap &pixmap,
+ static TQPixmap applyColorEffect (const TQPixmap &pixmap,
int channels,
int brightness, int contrast, int gamma);
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
protected:
int m_channels;
@@ -78,13 +78,13 @@ Q_OBJECT
public:
kpEffectBalanceWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectBalanceWidget ();
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
@@ -108,7 +108,7 @@ protected:
KIntNumInput *m_brightnessInput,
*m_contrastInput,
*m_gammaInput;
- QLabel *m_gammaLabel;
+ TQLabel *m_gammaLabel;
KComboBox *m_channelsComboBox;
};
diff --git a/kolourpaint/pixmapfx/kpeffectblursharpen.cpp b/kolourpaint/pixmapfx/kpeffectblursharpen.cpp
index 50c0b27d..9986df4f 100644
--- a/kolourpaint/pixmapfx/kpeffectblursharpen.cpp
+++ b/kolourpaint/pixmapfx/kpeffectblursharpen.cpp
@@ -30,11 +30,11 @@
#include <kpeffectblursharpen.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kimageeffect.h>
@@ -45,14 +45,14 @@
#include <kppixmapfx.h>
-static QString nameForType (kpEffectBlurSharpenCommand::Type type)
+static TQString nameForType (kpEffectBlurSharpenCommand::Type type)
{
if (type == kpEffectBlurSharpenCommand::Blur)
return i18n ("Soften");
else if (type == kpEffectBlurSharpenCommand::Sharpen)
return i18n ("Sharpen");
else
- return QString::null;
+ return TQString::null;
}
@@ -74,7 +74,7 @@ kpEffectBlurSharpenCommand::~kpEffectBlurSharpenCommand ()
// public static
-QPixmap kpEffectBlurSharpenCommand::apply (const QPixmap &pixmap,
+TQPixmap kpEffectBlurSharpenCommand::apply (const TQPixmap &pixmap,
Type type, double radius, double sigma,
int repeat)
{
@@ -89,12 +89,12 @@ QPixmap kpEffectBlurSharpenCommand::apply (const QPixmap &pixmap,
#endif
// (KImageEffect::(blur|sharpen)() ignores mask)
- QPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels (
+ TQPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels (
pixmap,
Qt::white/*arbitrarily chosen*/);
- QImage image = kpPixmapFX::convertToImage (usePixmap);
+ TQImage image = kpPixmapFX::convertToImage (usePixmap);
for (int i = 0; i < repeat; i++)
{
@@ -104,7 +104,7 @@ QPixmap kpEffectBlurSharpenCommand::apply (const QPixmap &pixmap,
image = KImageEffect::sharpen (image, radius, sigma);
}
- QPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
+ TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
// KImageEffect::(blur|sharpen)() nukes mask - restore it
@@ -116,7 +116,7 @@ QPixmap kpEffectBlurSharpenCommand::apply (const QPixmap &pixmap,
}
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectBlurSharpenCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectBlurSharpenCommand::applyColorEffect (const TQPixmap &pixmap)
{
return apply (pixmap, m_type, m_radius, m_sigma, m_repeat);
}
@@ -125,17 +125,17 @@ QPixmap kpEffectBlurSharpenCommand::applyColorEffect (const QPixmap &pixmap)
kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
- QGridLayout *lay = new QGridLayout (this, 4, 2, marginHint (), spacingHint ());
+ TQGridLayout *lay = new TQGridLayout (this, 4, 2, marginHint (), spacingHint ());
- QLabel *amountLabel = new QLabel (i18n ("&Amount:"), this);
+ TQLabel *amountLabel = new TQLabel (i18n ("&Amount:"), this);
m_amountInput = new KIntNumInput (this);
m_amountInput->setRange (-10, 10, 1/*step*/, true/*slider*/);
- m_typeLabel = new QLabel (this);
+ m_typeLabel = new TQLabel (this);
amountLabel->setBuddy (m_amountInput);
@@ -149,11 +149,11 @@ kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection,
lay->setColStretch (1, 1);
- connect (m_amountInput, SIGNAL (valueChanged (int)),
- this, SIGNAL (settingsChangedDelayed ()));
+ connect (m_amountInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SIGNAL (settingsChangedDelayed ()));
- connect (m_amountInput, SIGNAL (valueChanged (int)),
- this, SLOT (slotUpdateTypeLabel ()));
+ connect (m_amountInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (slotUpdateTypeLabel ()));
}
kpEffectBlurSharpenWidget::~kpEffectBlurSharpenWidget ()
@@ -162,9 +162,9 @@ kpEffectBlurSharpenWidget::~kpEffectBlurSharpenWidget ()
// public virtual [base kpColorEffectWidget]
-QString kpEffectBlurSharpenWidget::caption () const
+TQString kpEffectBlurSharpenWidget::caption () const
{
- return QString::null;
+ return TQString::null;
}
@@ -175,7 +175,7 @@ bool kpEffectBlurSharpenWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectBlurSharpenWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectBlurSharpenWidget::applyColorEffect (const TQPixmap &pixmap)
{
return kpEffectBlurSharpenCommand::apply (pixmap,
type (), radius (), sigma (), repeat ());
@@ -193,7 +193,7 @@ kpColorEffectCommand *kpEffectBlurSharpenWidget::createCommand () const
// protected slot
void kpEffectBlurSharpenWidget::slotUpdateTypeLabel ()
{
- QString text = ::nameForType (type ());
+ TQString text = ::nameForType (type ());
#if DEBUG_KP_EFFECT_BLUR_SHARPEN
kdDebug () << "kpEffectBlurSharpenWidget::slotUpdateTypeLabel() text="
diff --git a/kolourpaint/pixmapfx/kpeffectblursharpen.h b/kolourpaint/pixmapfx/kpeffectblursharpen.h
index 3b12def1..54b9c993 100644
--- a/kolourpaint/pixmapfx/kpeffectblursharpen.h
+++ b/kolourpaint/pixmapfx/kpeffectblursharpen.h
@@ -35,7 +35,7 @@
#include <kpcoloreffect.h>
-class QLabel;
+class TQLabel;
class KIntNumInput;
@@ -57,12 +57,12 @@ public:
kpMainWindow *mainWindow);
virtual ~kpEffectBlurSharpenCommand ();
- static QPixmap apply (const QPixmap &pixmap,
+ static TQPixmap apply (const TQPixmap &pixmap,
Type type, double radius, double sigma,
int repeat);
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
protected:
Type m_type;
@@ -78,13 +78,13 @@ Q_OBJECT
public:
kpEffectBlurSharpenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectBlurSharpenWidget ();
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
@@ -98,7 +98,7 @@ protected:
int repeat () const;
KIntNumInput *m_amountInput;
- QLabel *m_typeLabel;
+ TQLabel *m_typeLabel;
};
diff --git a/kolourpaint/pixmapfx/kpeffectemboss.cpp b/kolourpaint/pixmapfx/kpeffectemboss.cpp
index e33f3a42..f58f248a 100644
--- a/kolourpaint/pixmapfx/kpeffectemboss.cpp
+++ b/kolourpaint/pixmapfx/kpeffectemboss.cpp
@@ -30,12 +30,12 @@
#include <kpeffectemboss.h>
-#include <qcheckbox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kimageeffect.h>
@@ -62,7 +62,7 @@ kpEffectEmbossCommand::~kpEffectEmbossCommand ()
// public static
-QPixmap kpEffectEmbossCommand::apply (const QPixmap &pixmap,
+TQPixmap kpEffectEmbossCommand::apply (const TQPixmap &pixmap,
double radius, double sigma,
int repeat)
{
@@ -76,19 +76,19 @@ QPixmap kpEffectEmbossCommand::apply (const QPixmap &pixmap,
#endif
// (KImageEffect::emboss() ignores mask)
- QPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels (
+ TQPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels (
pixmap,
Qt::white/*arbitrarily chosen*/);
- QImage image = kpPixmapFX::convertToImage (usePixmap);
+ TQImage image = kpPixmapFX::convertToImage (usePixmap);
for (int i = 0; i < repeat; i++)
{
image = KImageEffect::emboss (image, radius, sigma);
}
- QPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
+ TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
// KImageEffect::emboss() nukes mask - restore it
@@ -100,7 +100,7 @@ QPixmap kpEffectEmbossCommand::apply (const QPixmap &pixmap,
}
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectEmbossCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectEmbossCommand::applyColorEffect (const TQPixmap &pixmap)
{
return apply (pixmap, m_radius, m_sigma, m_repeat);
}
@@ -109,14 +109,14 @@ QPixmap kpEffectEmbossCommand::applyColorEffect (const QPixmap &pixmap)
kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
- QGridLayout *lay = new QGridLayout (this, 4, 2, marginHint (), spacingHint ());
+ TQGridLayout *lay = new TQGridLayout (this, 4, 2, marginHint (), spacingHint ());
#if 0
- QLabel *amountLabel = new QLabel (i18n ("&Amount:"), this);
+ TQLabel *amountLabel = new TQLabel (i18n ("&Amount:"), this);
m_amountInput = new KIntNumInput (this);
m_amountInput->setRange (0, 10, 1/*step*/, true/*slider*/);
m_amountInput->setSpecialValueText (i18n ("None"));
@@ -131,11 +131,11 @@ kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection,
lay->setColStretch (1, 1);
- connect (m_amountInput, SIGNAL (valueChanged (int)),
- this, SIGNAL (settingsChanged ()));
+ connect (m_amountInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SIGNAL (settingsChanged ()));
#endif
- m_enableCheckBox = new QCheckBox (i18n ("E&nable"), this);
+ m_enableCheckBox = new TQCheckBox (i18n ("E&nable"), this);
lay->addMultiCellWidget (m_enableCheckBox, 0, 0, 0, 1, Qt::AlignCenter);
@@ -144,8 +144,8 @@ kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection,
// (settingsChangedDelayed() instead of settingsChanged() so that the
// user can quickly press OK to apply effect to document directly and
// not have to wait for the also slow preview)
- connect (m_enableCheckBox, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChangedDelayed ()));
+ connect (m_enableCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChangedDelayed ()));
}
kpEffectEmbossWidget::~kpEffectEmbossWidget ()
@@ -154,9 +154,9 @@ kpEffectEmbossWidget::~kpEffectEmbossWidget ()
// public virtual [base kpColorEffectWidget]
-QString kpEffectEmbossWidget::caption () const
+TQString kpEffectEmbossWidget::caption () const
{
- return QString::null;
+ return TQString::null;
}
@@ -168,7 +168,7 @@ bool kpEffectEmbossWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectEmbossWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectEmbossWidget::applyColorEffect (const TQPixmap &pixmap)
{
if (isNoOp ())
return pixmap;
diff --git a/kolourpaint/pixmapfx/kpeffectemboss.h b/kolourpaint/pixmapfx/kpeffectemboss.h
index 0234627f..b77f69e7 100644
--- a/kolourpaint/pixmapfx/kpeffectemboss.h
+++ b/kolourpaint/pixmapfx/kpeffectemboss.h
@@ -35,7 +35,7 @@
#include <kpcoloreffect.h>
-class QCheckBox;
+class TQCheckBox;
class KIntNumInput;
class kpMainWindow;
@@ -50,12 +50,12 @@ public:
kpMainWindow *mainWindow);
virtual ~kpEffectEmbossCommand ();
- static QPixmap apply (const QPixmap &pixmap,
+ static TQPixmap apply (const TQPixmap &pixmap,
double radius, double sigma,
int repeat);
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
protected:
double m_radius, m_sigma;
@@ -70,13 +70,13 @@ Q_OBJECT
public:
kpEffectEmbossWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectEmbossWidget ();
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
@@ -86,7 +86,7 @@ protected:
int repeat () const;
//KIntNumInput *m_amountInput;
- QCheckBox *m_enableCheckBox;
+ TQCheckBox *m_enableCheckBox;
};
diff --git a/kolourpaint/pixmapfx/kpeffectflatten.cpp b/kolourpaint/pixmapfx/kpeffectflatten.cpp
index 6a81bca0..b8dee16c 100644
--- a/kolourpaint/pixmapfx/kpeffectflatten.cpp
+++ b/kolourpaint/pixmapfx/kpeffectflatten.cpp
@@ -30,11 +30,11 @@
#include <kpeffectflatten.h>
-#include <qcheckbox.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqvbox.h>
#include <kcolorbutton.h>
#include <kconfig.h>
@@ -52,8 +52,8 @@
// kpEffectFlattenCommand
//
-kpEffectFlattenCommand::kpEffectFlattenCommand (const QColor &color1,
- const QColor &color2,
+kpEffectFlattenCommand::kpEffectFlattenCommand (const TQColor &color1,
+ const TQColor &color2,
bool actOnSelection,
kpMainWindow *mainWindow)
: kpColorEffectCommand (i18n ("Flatten"), actOnSelection, mainWindow),
@@ -67,29 +67,29 @@ kpEffectFlattenCommand::~kpEffectFlattenCommand ()
// public static
-void kpEffectFlattenCommand::apply (QPixmap *destPixmapPtr,
- const QColor &color1, const QColor &color2)
+void kpEffectFlattenCommand::apply (TQPixmap *destPixmapPtr,
+ const TQColor &color1, const TQColor &color2)
{
if (!destPixmapPtr)
return;
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
apply (&image, color1, color2);
*destPixmapPtr = kpPixmapFX::convertToPixmap (image);
}
// public static
-QPixmap kpEffectFlattenCommand::apply (const QPixmap &pm,
- const QColor &color1, const QColor &color2)
+TQPixmap kpEffectFlattenCommand::apply (const TQPixmap &pm,
+ const TQColor &color1, const TQColor &color2)
{
- QImage image = kpPixmapFX::convertToImage (pm);
+ TQImage image = kpPixmapFX::convertToImage (pm);
apply (&image, color1, color2);
return kpPixmapFX::convertToPixmap (image);
}
// public static
-void kpEffectFlattenCommand::apply (QImage *destImagePtr,
- const QColor &color1, const QColor &color2)
+void kpEffectFlattenCommand::apply (TQImage *destImagePtr,
+ const TQColor &color1, const TQColor &color2)
{
if (!destImagePtr)
return;
@@ -98,10 +98,10 @@ void kpEffectFlattenCommand::apply (QImage *destImagePtr,
}
// public static
-QImage kpEffectFlattenCommand::apply (const QImage &img,
- const QColor &color1, const QColor &color2)
+TQImage kpEffectFlattenCommand::apply (const TQImage &img,
+ const TQColor &color1, const TQColor &color2)
{
- QImage retImage = img;
+ TQImage retImage = img;
apply (&retImage, color1, color2);
return retImage;
}
@@ -112,7 +112,7 @@ QImage kpEffectFlattenCommand::apply (const QImage &img,
//
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectFlattenCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectFlattenCommand::applyColorEffect (const TQPixmap &pixmap)
{
return apply (pixmap, m_color1, m_color2);
}
@@ -126,12 +126,12 @@ QPixmap kpEffectFlattenCommand::applyColorEffect (const QPixmap &pixmap)
// Don't initialise globally when we probably don't have a colour
// allocation context. This way, the colours aren't sometimes invalid
// (e.g. at 8-bit).
-QColor kpEffectFlattenWidget::s_lastColor1;
-QColor kpEffectFlattenWidget::s_lastColor2;
+TQColor kpEffectFlattenWidget::s_lastColor1;
+TQColor kpEffectFlattenWidget::s_lastColor2;
kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
@@ -150,9 +150,9 @@ kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection,
}
- m_enableCheckBox = new QCheckBox (i18n ("E&nable"), this);
+ m_enableCheckBox = new TQCheckBox (i18n ("E&nable"), this);
- QVBox *colorButtonContainer = new QVBox (this);
+ TQVBox *colorButtonContainer = new TQVBox (this);
colorButtonContainer->setMargin (KDialog::marginHint () / 2);
colorButtonContainer->setSpacing (spacingHint ());
m_color1Button = new KColorButton (s_lastColor1, colorButtonContainer);
@@ -163,18 +163,18 @@ kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection,
m_color2Button->setEnabled (false);
- QVBoxLayout *lay = new QVBoxLayout (this, marginHint (), spacingHint ());
+ TQVBoxLayout *lay = new TQVBoxLayout (this, marginHint (), spacingHint ());
lay->addWidget (m_enableCheckBox);
lay->addWidget (colorButtonContainer);
- connect (m_enableCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (slotEnableChanged (bool)));
+ connect (m_enableCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotEnableChanged (bool)));
- connect (m_color1Button, SIGNAL (changed (const QColor &)),
- this, SIGNAL (settingsChanged ()));
- connect (m_color2Button, SIGNAL (changed (const QColor &)),
- this, SIGNAL (settingsChanged ()));
+ connect (m_color1Button, TQT_SIGNAL (changed (const TQColor &)),
+ this, TQT_SIGNAL (settingsChanged ()));
+ connect (m_color2Button, TQT_SIGNAL (changed (const TQColor &)),
+ this, TQT_SIGNAL (settingsChanged ()));
}
kpEffectFlattenWidget::~kpEffectFlattenWidget ()
@@ -193,13 +193,13 @@ kpEffectFlattenWidget::~kpEffectFlattenWidget ()
// public
-QColor kpEffectFlattenWidget::color1 () const
+TQColor kpEffectFlattenWidget::color1 () const
{
return m_color1Button->color ();
}
// public
-QColor kpEffectFlattenWidget::color2 () const
+TQColor kpEffectFlattenWidget::color2 () const
{
return m_color2Button->color ();
}
@@ -210,7 +210,7 @@ QColor kpEffectFlattenWidget::color2 () const
//
// public virtual [base kpColorEffectWidget]
-QString kpEffectFlattenWidget::caption () const
+TQString kpEffectFlattenWidget::caption () const
{
return i18n ("Colors");
}
@@ -223,7 +223,7 @@ bool kpEffectFlattenWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectFlattenWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectFlattenWidget::applyColorEffect (const TQPixmap &pixmap)
{
#if DEBUG_KP_EFFECT_FLATTEN
kdDebug () << "kpEffectFlattenWidget::applyColorEffect() nop="
diff --git a/kolourpaint/pixmapfx/kpeffectflatten.h b/kolourpaint/pixmapfx/kpeffectflatten.h
index 79c9bbaf..a4f06af9 100644
--- a/kolourpaint/pixmapfx/kpeffectflatten.h
+++ b/kolourpaint/pixmapfx/kpeffectflatten.h
@@ -30,13 +30,13 @@
#define KP_EFFECT_FLATTEN_H
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kpcoloreffect.h>
-class QCheckBox;
-class QImage;
+class TQCheckBox;
+class TQImage;
class KColorButton;
@@ -46,20 +46,20 @@ class kpMainWindow;
class kpEffectFlattenCommand : public kpColorEffectCommand
{
public:
- kpEffectFlattenCommand (const QColor &color1, const QColor &color2,
+ kpEffectFlattenCommand (const TQColor &color1, const TQColor &color2,
bool actOnSelection,
kpMainWindow *mainWindow);
virtual ~kpEffectFlattenCommand ();
- static void apply (QPixmap *destPixmapPtr,
- const QColor &color1, const QColor &color2);
- static QPixmap apply (const QPixmap &pm,
- const QColor &color1, const QColor &color2);
- static void apply (QImage *destImagePtr,
- const QColor &color1, const QColor &color2);
- static QImage apply (const QImage &img,
- const QColor &color1, const QColor &color2);
+ static void apply (TQPixmap *destPixmapPtr,
+ const TQColor &color1, const TQColor &color2);
+ static TQPixmap apply (const TQPixmap &pm,
+ const TQColor &color1, const TQColor &color2);
+ static void apply (TQImage *destImagePtr,
+ const TQColor &color1, const TQColor &color2);
+ static TQImage apply (const TQImage &img,
+ const TQColor &color1, const TQColor &color2);
//
@@ -67,9 +67,9 @@ public:
//
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
- QColor m_color1, m_color2;
+ TQColor m_color1, m_color2;
};
@@ -80,25 +80,25 @@ Q_OBJECT
public:
kpEffectFlattenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectFlattenWidget ();
- static QColor s_lastColor1, s_lastColor2;
+ static TQColor s_lastColor1, s_lastColor2;
- QColor color1 () const;
- QColor color2 () const;
+ TQColor color1 () const;
+ TQColor color2 () const;
//
// kpColorEffectWidget interface
//
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
@@ -106,7 +106,7 @@ protected slots:
void slotEnableChanged (bool enable);
protected:
- QCheckBox *m_enableCheckBox;
+ TQCheckBox *m_enableCheckBox;
KColorButton *m_color1Button, *m_color2Button;
};
diff --git a/kolourpaint/pixmapfx/kpeffectinvert.cpp b/kolourpaint/pixmapfx/kpeffectinvert.cpp
index b9bb00a8..67c1d6d0 100644
--- a/kolourpaint/pixmapfx/kpeffectinvert.cpp
+++ b/kolourpaint/pixmapfx/kpeffectinvert.cpp
@@ -30,10 +30,10 @@
#include <kpeffectinvert.h>
-#include <qcheckbox.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qpixmap.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <klocale.h>
@@ -68,23 +68,23 @@ kpEffectInvertCommand::~kpEffectInvertCommand ()
// public static
-void kpEffectInvertCommand::apply (QPixmap *destPixmapPtr, int channels)
+void kpEffectInvertCommand::apply (TQPixmap *destPixmapPtr, int channels)
{
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
apply (&image, channels);
*destPixmapPtr = kpPixmapFX::convertToPixmap (image);
}
// public static
-QPixmap kpEffectInvertCommand::apply (const QPixmap &pm, int channels)
+TQPixmap kpEffectInvertCommand::apply (const TQPixmap &pm, int channels)
{
- QImage image = kpPixmapFX::convertToImage (pm);
+ TQImage image = kpPixmapFX::convertToImage (pm);
apply (&image, channels);
return kpPixmapFX::convertToPixmap (image);
}
// public static
-void kpEffectInvertCommand::apply (QImage *destImagePtr, int channels)
+void kpEffectInvertCommand::apply (TQImage *destImagePtr, int channels)
{
QRgb mask = qRgba ((channels & Red) ? 0xFF : 0,
(channels & Green) ? 0xFF : 0,
@@ -124,9 +124,9 @@ void kpEffectInvertCommand::apply (QImage *destImagePtr, int channels)
}
// public static
-QImage kpEffectInvertCommand::apply (const QImage &img, int channels)
+TQImage kpEffectInvertCommand::apply (const TQImage &img, int channels)
{
- QImage retImage = img;
+ TQImage retImage = img;
apply (&retImage, channels);
return retImage;
}
@@ -137,7 +137,7 @@ QImage kpEffectInvertCommand::apply (const QImage &img, int channels)
//
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectInvertCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectInvertCommand::applyColorEffect (const TQPixmap &pixmap)
{
return apply (pixmap, m_channels);
}
@@ -149,30 +149,30 @@ QPixmap kpEffectInvertCommand::applyColorEffect (const QPixmap &pixmap)
kpEffectInvertWidget::kpEffectInvertWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
- QVBoxLayout *topLevelLay = new QVBoxLayout (this, marginHint (), spacingHint ());
+ TQVBoxLayout *topLevelLay = new TQVBoxLayout (this, marginHint (), spacingHint ());
- QWidget *centerWidget = new QWidget (this);
+ TQWidget *centerWidget = new TQWidget (this);
topLevelLay->addWidget (centerWidget, 0/*stretch*/, Qt::AlignCenter);
- QVBoxLayout *centerWidgetLay = new QVBoxLayout (centerWidget,
+ TQVBoxLayout *centerWidgetLay = new TQVBoxLayout (centerWidget,
0/*margin*/,
spacingHint ());
- m_redCheckBox = new QCheckBox (i18n ("&Red"), centerWidget);
- m_greenCheckBox = new QCheckBox (i18n ("&Green"), centerWidget);
- m_blueCheckBox = new QCheckBox (i18n ("&Blue"), centerWidget);
+ m_redCheckBox = new TQCheckBox (i18n ("&Red"), centerWidget);
+ m_greenCheckBox = new TQCheckBox (i18n ("&Green"), centerWidget);
+ m_blueCheckBox = new TQCheckBox (i18n ("&Blue"), centerWidget);
- QWidget *spaceWidget = new QWidget (centerWidget);
+ TQWidget *spaceWidget = new TQWidget (centerWidget);
spaceWidget->setFixedSize (1, spacingHint ());
- m_allCheckBox = new QCheckBox (i18n ("&All"), centerWidget);
+ m_allCheckBox = new TQCheckBox (i18n ("&All"), centerWidget);
m_redCheckBox->setChecked (false);
@@ -192,15 +192,15 @@ kpEffectInvertWidget::kpEffectInvertWidget (bool actOnSelection,
m_inSignalHandler = false;
- connect (m_redCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (slotRGBCheckBoxToggled ()));
- connect (m_greenCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (slotRGBCheckBoxToggled ()));
- connect (m_blueCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (slotRGBCheckBoxToggled ()));
-
- connect (m_allCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (slotAllCheckBoxToggled ()));
+ connect (m_redCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotRGBCheckBoxToggled ()));
+ connect (m_greenCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotRGBCheckBoxToggled ()));
+ connect (m_blueCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotRGBCheckBoxToggled ()));
+
+ connect (m_allCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotAllCheckBoxToggled ()));
}
kpEffectInvertWidget::~kpEffectInvertWidget ()
@@ -244,7 +244,7 @@ int kpEffectInvertWidget::channels () const
//
// public virtual [base kpColorEffectWidget]
-QString kpEffectInvertWidget::caption () const
+TQString kpEffectInvertWidget::caption () const
{
return i18n ("Channels");
}
@@ -257,7 +257,7 @@ bool kpEffectInvertWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectInvertWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectInvertWidget::applyColorEffect (const TQPixmap &pixmap)
{
return kpEffectInvertCommand::apply (pixmap, channels ());
}
diff --git a/kolourpaint/pixmapfx/kpeffectinvert.h b/kolourpaint/pixmapfx/kpeffectinvert.h
index 61d6cfda..a63237df 100644
--- a/kolourpaint/pixmapfx/kpeffectinvert.h
+++ b/kolourpaint/pixmapfx/kpeffectinvert.h
@@ -33,8 +33,8 @@
#include <kpcoloreffect.h>
-class QCheckBox;
-class QImage;
+class TQCheckBox;
+class TQImage;
class kpMainWindow;
@@ -59,7 +59,7 @@ public:
//
// Inverts the colours of each pixel in the given image.
- // These functions differ from QImage::invertPixels() in the following ways:
+ // These functions differ from TQImage::invertPixels() in the following ways:
//
// 1. for 8-bit images, it inverts the colours of the Colour Table
// (this means that you would get visually similar results to inversion
@@ -68,10 +68,10 @@ public:
// 2. never inverts the Alpha Buffer
//
- static void apply (QPixmap *destPixmapPtr, int channels = RGB);
- static QPixmap apply (const QPixmap &pm, int channels = RGB);
- static void apply (QImage *destImagePtr, int channels = RGB);
- static QImage apply (const QImage &img, int channels = RGB);
+ static void apply (TQPixmap *destPixmapPtr, int channels = RGB);
+ static TQPixmap apply (const TQPixmap &pm, int channels = RGB);
+ static void apply (TQImage *destImagePtr, int channels = RGB);
+ static TQImage apply (const TQImage &img, int channels = RGB);
//
@@ -82,7 +82,7 @@ public:
virtual bool isInvertible () const { return true; }
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
int m_channels;
};
@@ -95,7 +95,7 @@ Q_OBJECT
public:
kpEffectInvertWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectInvertWidget ();
@@ -106,10 +106,10 @@ public:
// kpColorEffectWidget interface
//
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
@@ -118,7 +118,7 @@ protected slots:
void slotAllCheckBoxToggled ();
protected:
- QCheckBox *m_redCheckBox, *m_greenCheckBox, *m_blueCheckBox,
+ TQCheckBox *m_redCheckBox, *m_greenCheckBox, *m_blueCheckBox,
*m_allCheckBox;
// blockSignals() didn't seem to work
diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
index b6eb7a42..44fd7ea7 100644
--- a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
+++ b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
@@ -30,12 +30,12 @@
#include <kpeffectreducecolors.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqradiobutton.h>
#include <kdebug.h>
#include <klocale.h>
@@ -43,7 +43,7 @@
#include <kppixmapfx.h>
-QImage convertImageDepth (const QImage &image, int depth, bool dither)
+TQImage convertImageDepth (const TQImage &image, int depth, bool dither)
{
#if DEBUG_KP_EFFECT_REDUCE_COLORS
kdDebug () << "::convertImageDepth() changing image (w=" << image.width ()
@@ -73,7 +73,7 @@ QImage convertImageDepth (const QImage &image, int depth, bool dither)
#endif
- // Hack around Qt's braindead QImage::convertDepth(1, ...) (with
+ // Hack around Qt's braindead TQImage::convertDepth(1, ...) (with
// dithering off) which produces pathetic results with an image that
// only has 2 colours - sometimes it just gives a completely black
// result. Instead, we simply preserve the 2 colours. One use case
@@ -89,8 +89,8 @@ QImage convertImageDepth (const QImage &image, int depth, bool dither)
bool moreThan2Colors = false;
- QImage monoImage (image.width (), image.height (),
- 1/*depth*/, 2/*numColors*/, QImage::LittleEndian);
+ TQImage monoImage (image.width (), image.height (),
+ 1/*depth*/, 2/*numColors*/, TQImage::LittleEndian);
#if DEBUG_KP_EFFECT_REDUCE_COLORS
kdDebug () << "\t\tinitialising output image w=" << monoImage.width ()
<< ",h=" << monoImage.height ()
@@ -153,7 +153,7 @@ QImage convertImageDepth (const QImage &image, int depth, bool dither)
}
- QImage retImage = image.convertDepth (depth,
+ TQImage retImage = image.convertDepth (depth,
Qt::AutoColor |
(dither ? Qt::DiffuseDither : Qt::ThresholdDither) |
Qt::ThresholdAlphaDither |
@@ -193,7 +193,7 @@ kpEffectReduceColorsCommand::~kpEffectReduceColorsCommand ()
// public
-QString kpEffectReduceColorsCommand::commandName (int depth, int dither) const
+TQString kpEffectReduceColorsCommand::commandName (int depth, int dither) const
{
if (depth == 1)
{
@@ -211,13 +211,13 @@ QString kpEffectReduceColorsCommand::commandName (int depth, int dither) const
}
else
{
- return QString::null;
+ return TQString::null;
}
}
// public static
-void kpEffectReduceColorsCommand::apply (QPixmap *destPixmapPtr, int depth, bool dither)
+void kpEffectReduceColorsCommand::apply (TQPixmap *destPixmapPtr, int depth, bool dither)
{
if (!destPixmapPtr)
return;
@@ -226,7 +226,7 @@ void kpEffectReduceColorsCommand::apply (QPixmap *destPixmapPtr, int depth, bool
return;
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
image = ::convertImageDepth (image, depth, dither);
@@ -235,12 +235,12 @@ void kpEffectReduceColorsCommand::apply (QPixmap *destPixmapPtr, int depth, bool
return;
- QPixmap pixmap = kpPixmapFX::convertToPixmap (image, false/*no dither*/);
+ TQPixmap pixmap = kpPixmapFX::convertToPixmap (image, false/*no dither*/);
// HACK: The above "image.convertDepth()" erases the Alpha Channel
// (at least for monochrome).
- // qpixmap.html says "alpha masks on monochrome images are ignored."
+ // tqpixmap.html says "alpha masks on monochrome images are ignored."
//
// Put the mask back.
//
@@ -251,9 +251,9 @@ void kpEffectReduceColorsCommand::apply (QPixmap *destPixmapPtr, int depth, bool
}
// public static
-QPixmap kpEffectReduceColorsCommand::apply (const QPixmap &pm, int depth, bool dither)
+TQPixmap kpEffectReduceColorsCommand::apply (const TQPixmap &pm, int depth, bool dither)
{
- QPixmap ret = pm;
+ TQPixmap ret = pm;
apply (&ret, depth, dither);
return ret;
}
@@ -264,7 +264,7 @@ QPixmap kpEffectReduceColorsCommand::apply (const QPixmap &pm, int depth, bool d
//
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectReduceColorsCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectReduceColorsCommand::applyColorEffect (const TQPixmap &pixmap)
{
return apply (pixmap, m_depth, m_dither);
}
@@ -276,27 +276,27 @@ QPixmap kpEffectReduceColorsCommand::applyColorEffect (const QPixmap &pixmap)
kpEffectReduceColorsWidget::kpEffectReduceColorsWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
- QVBoxLayout *lay = new QVBoxLayout (this, marginHint (), spacingHint ());
+ TQVBoxLayout *lay = new TQVBoxLayout (this, marginHint (), spacingHint ());
m_blackAndWhiteRadioButton =
- new QRadioButton (i18n ("&Monochrome"), this);
+ new TQRadioButton (i18n ("&Monochrome"), this);
m_blackAndWhiteDitheredRadioButton =
- new QRadioButton (i18n ("Mo&nochrome (dithered)"), this);
+ new TQRadioButton (i18n ("Mo&nochrome (dithered)"), this);
- m_8BitRadioButton = new QRadioButton (i18n ("256 co&lor"), this);
+ m_8BitRadioButton = new TQRadioButton (i18n ("256 co&lor"), this);
- m_8BitDitheredRadioButton = new QRadioButton (i18n ("256 colo&r (dithered)"), this);
+ m_8BitDitheredRadioButton = new TQRadioButton (i18n ("256 colo&r (dithered)"), this);
- m_24BitRadioButton = new QRadioButton (i18n ("24-&bit color"), this);
+ m_24BitRadioButton = new TQRadioButton (i18n ("24-&bit color"), this);
- QButtonGroup *buttonGroup = new QButtonGroup (this);
+ TQButtonGroup *buttonGroup = new TQButtonGroup (this);
buttonGroup->hide ();
buttonGroup->insert (m_blackAndWhiteRadioButton);
@@ -306,7 +306,7 @@ kpEffectReduceColorsWidget::kpEffectReduceColorsWidget (bool actOnSelection,
buttonGroup->insert (m_24BitRadioButton);
- const int screenDepth = QPixmap::defaultDepth ();
+ const int screenDepth = TQPixmap::defaultDepth ();
#if DEBUG_KP_EFFECT_REDUCE_COLORS
kdDebug () << "kpEffectReduceColorsWidget::<ctor> screenDepth="
<< screenDepth
@@ -361,16 +361,16 @@ kpEffectReduceColorsWidget::kpEffectReduceColorsWidget (bool actOnSelection,
lay->addWidget (m_24BitRadioButton);
- connect (m_blackAndWhiteRadioButton, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChanged ()));
- connect (m_blackAndWhiteDitheredRadioButton, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChanged ()));
- connect (m_8BitRadioButton, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChanged ()));
- connect (m_8BitDitheredRadioButton, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChanged ()));
- connect (m_24BitRadioButton, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChanged ()));
+ connect (m_blackAndWhiteRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChanged ()));
+ connect (m_blackAndWhiteDitheredRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChanged ()));
+ connect (m_8BitRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChanged ()));
+ connect (m_8BitDitheredRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChanged ()));
+ connect (m_24BitRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChanged ()));
}
kpEffectReduceColorsWidget::~kpEffectReduceColorsWidget ()
@@ -414,7 +414,7 @@ bool kpEffectReduceColorsWidget::dither () const
//
// public virtual [base kpColorEffectWidget]
-QString kpEffectReduceColorsWidget::caption () const
+TQString kpEffectReduceColorsWidget::caption () const
{
return i18n ("Reduce To");
}
@@ -427,7 +427,7 @@ bool kpEffectReduceColorsWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectReduceColorsWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectReduceColorsWidget::applyColorEffect (const TQPixmap &pixmap)
{
return kpEffectReduceColorsCommand::apply (pixmap, depth (), dither ());
}
diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.h b/kolourpaint/pixmapfx/kpeffectreducecolors.h
index a14cffc7..bf44ef3e 100644
--- a/kolourpaint/pixmapfx/kpeffectreducecolors.h
+++ b/kolourpaint/pixmapfx/kpeffectreducecolors.h
@@ -33,13 +33,13 @@
#include <kpcoloreffect.h>
-class QRadioButton;
-class QImage;
+class TQRadioButton;
+class TQImage;
class kpMainWindow;
-QImage convertImageDepth (const QImage &image, int depth, bool dither);
+TQImage convertImageDepth (const TQImage &image, int depth, bool dither);
class kpEffectReduceColorsCommand : public kpColorEffectCommand
@@ -51,11 +51,11 @@ public:
kpMainWindow *mainWindow);
virtual ~kpEffectReduceColorsCommand ();
- QString commandName (int depth, int dither) const;
+ TQString commandName (int depth, int dither) const;
// (always preserves mask)
- static void apply (QPixmap *destPixmapPtr, int depth, bool dither);
- static QPixmap apply (const QPixmap &pm, int depth, bool dither);
+ static void apply (TQPixmap *destPixmapPtr, int depth, bool dither);
+ static TQPixmap apply (const TQPixmap &pm, int depth, bool dither);
//
@@ -63,7 +63,7 @@ public:
//
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
int m_depth;
bool m_dither;
@@ -77,7 +77,7 @@ Q_OBJECT
public:
kpEffectReduceColorsWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectReduceColorsWidget ();
@@ -89,20 +89,20 @@ public:
// kpColorEffectWidget interface
//
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
protected:
- QRadioButton *m_blackAndWhiteRadioButton,
+ TQRadioButton *m_blackAndWhiteRadioButton,
*m_blackAndWhiteDitheredRadioButton,
*m_8BitRadioButton,
*m_8BitDitheredRadioButton,
*m_24BitRadioButton;
- QRadioButton *m_defaultRadioButton;
+ TQRadioButton *m_defaultRadioButton;
};
diff --git a/kolourpaint/pixmapfx/kpeffectsdialog.cpp b/kolourpaint/pixmapfx/kpeffectsdialog.cpp
index 666f81cf..90dfbd32 100644
--- a/kolourpaint/pixmapfx/kpeffectsdialog.cpp
+++ b/kolourpaint/pixmapfx/kpeffectsdialog.cpp
@@ -30,11 +30,11 @@
#include <kpeffectsdialog.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -63,12 +63,12 @@ kpEffectsDialog::kpEffectsDialog (bool actOnSelection,
const char *name)
: kpToolPreviewDialog (kpToolPreviewDialog::Preview,
true/*reserve top row*/,
- QString::null/*caption*/,
- QString::null/*afterActionText (no Dimensions Group Box)*/,
+ TQString::null/*caption*/,
+ TQString::null/*afterActionText (no Dimensions Group Box)*/,
actOnSelection,
parent,
name),
- m_delayedUpdateTimer (new QTimer (this)),
+ m_delayedUpdateTimer (new TQTimer (this)),
m_effectsComboBox (0),
m_settingsGroupBox (0),
m_settingsLayout (0),
@@ -84,16 +84,16 @@ kpEffectsDialog::kpEffectsDialog (bool actOnSelection,
setCaption (i18n ("More Image Effects"));
- connect (m_delayedUpdateTimer, SIGNAL (timeout ()),
- this, SLOT (slotUpdateWithWaitCursor ()));
+ connect (m_delayedUpdateTimer, TQT_SIGNAL (timeout ()),
+ this, TQT_SLOT (slotUpdateWithWaitCursor ()));
- QHBox *effectContainer = new QHBox (mainWidget ());
+ TQHBox *effectContainer = new TQHBox (mainWidget ());
effectContainer->setSpacing (spacingHint () * 4
- /*need more space for QGroupBox titles*/);
+ /*need more space for TQGroupBox titles*/);
effectContainer->setMargin (0);
- QLabel *label = new QLabel (i18n ("&Effect:"), effectContainer);
+ TQLabel *label = new TQLabel (i18n ("&Effect:"), effectContainer);
m_effectsComboBox = new KComboBox (effectContainer);
m_effectsComboBox->insertItem (i18n ("Balance"));
@@ -109,15 +109,15 @@ kpEffectsDialog::kpEffectsDialog (bool actOnSelection,
addCustomWidgetToFront (effectContainer);
- m_settingsGroupBox = new QGroupBox (mainWidget ());
- m_settingsLayout = new QVBoxLayout (m_settingsGroupBox,
+ m_settingsGroupBox = new TQGroupBox (mainWidget ());
+ m_settingsLayout = new TQVBoxLayout (m_settingsGroupBox,
marginHint () * 2,
spacingHint ());
addCustomWidgetToBack (m_settingsGroupBox);
- connect (m_effectsComboBox, SIGNAL (activated (int)),
- this, SLOT (selectEffect (int)));
+ connect (m_effectsComboBox, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (selectEffect (int)));
selectEffect (0);
@@ -157,21 +157,21 @@ kpColorEffectCommand *kpEffectsDialog::createCommand () const
// protected virtual [base kpToolPreviewDialog]
-QSize kpEffectsDialog::newDimensions () const
+TQSize kpEffectsDialog::newDimensions () const
{
kpDocument *doc = document ();
if (!doc)
- return QSize ();
+ return TQSize ();
- return QSize (doc->width (m_actOnSelection),
+ return TQSize (doc->width (m_actOnSelection),
doc->height (m_actOnSelection));
}
// protected virtual [base kpToolPreviewDialog]
-QPixmap kpEffectsDialog::transformPixmap (const QPixmap &pixmap,
+TQPixmap kpEffectsDialog::transformPixmap (const TQPixmap &pixmap,
int targetWidth, int targetHeight) const
{
- QPixmap pixmapWithEffect;
+ TQPixmap pixmapWithEffect;
if (m_colorEffectWidget)
pixmapWithEffect = m_colorEffectWidget->applyColorEffect (pixmap);
@@ -209,7 +209,7 @@ void kpEffectsDialog::selectEffect (int which)
m_colorEffectWidget = 0;
- m_settingsGroupBox->setCaption (QString::null);
+ m_settingsGroupBox->setCaption (TQString::null);
#define CREATE_EFFECT_WIDGET(name) \
m_colorEffectWidget = new name (m_actOnSelection, \
@@ -255,12 +255,12 @@ void kpEffectsDialog::selectEffect (int which)
// Don't resize the preview when showing the widget:
// TODO: actually work
- QSize previewGroupBoxMinSize = m_previewGroupBox->minimumSize ();
- QSize previewGroupBoxMaxSize = m_previewGroupBox->maximumSize ();
- QLayout::ResizeMode previewGroupBoxResizeMode =
+ TQSize previewGroupBoxMinSize = m_previewGroupBox->minimumSize ();
+ TQSize previewGroupBoxMaxSize = m_previewGroupBox->maximumSize ();
+ TQLayout::ResizeMode previewGroupBoxResizeMode =
m_previewGroupBox->layout () ?
m_previewGroupBox->layout ()->resizeMode () :
- QLayout::Auto;
+ TQLayout::Auto;
#if DEBUG_KP_EFFECTS_DIALOG
kdDebug () << "\tpreviewGroupBox: minSize=" << previewGroupBoxMinSize
<< " maxSize=" << previewGroupBoxMaxSize
@@ -271,7 +271,7 @@ void kpEffectsDialog::selectEffect (int which)
#endif
if (m_previewGroupBox->layout ())
- m_previewGroupBox->layout ()->setResizeMode (QLayout::FreeResize);
+ m_previewGroupBox->layout ()->setResizeMode (TQLayout::FreeResize);
#if DEBUG_KP_EFFECTS_DIALOG
kdDebug () << "\tafter set resizeMode, previewGroupBox.size="
<< m_previewGroupBox->size () << endl;
@@ -308,12 +308,12 @@ void kpEffectsDialog::selectEffect (int which)
#endif
- connect (m_colorEffectWidget, SIGNAL (settingsChangedNoWaitCursor ()),
- this, SLOT (slotUpdate ()));
- connect (m_colorEffectWidget, SIGNAL (settingsChanged ()),
- this, SLOT (slotUpdateWithWaitCursor ()));
- connect (m_colorEffectWidget, SIGNAL (settingsChangedDelayed ()),
- this, SLOT (slotDelayedUpdate ()));
+ connect (m_colorEffectWidget, TQT_SIGNAL (settingsChangedNoWaitCursor ()),
+ this, TQT_SLOT (slotUpdate ()));
+ connect (m_colorEffectWidget, TQT_SIGNAL (settingsChanged ()),
+ this, TQT_SLOT (slotUpdateWithWaitCursor ()));
+ connect (m_colorEffectWidget, TQT_SIGNAL (settingsChangedDelayed ()),
+ this, TQT_SLOT (slotDelayedUpdate ()));
slotUpdateWithWaitCursor ();
#if DEBUG_KP_EFFECTS_DIALOG
kdDebug () << "\tafter slotUpdateWithWaitCursor, previewGroupBox.size="
diff --git a/kolourpaint/pixmapfx/kpeffectsdialog.h b/kolourpaint/pixmapfx/kpeffectsdialog.h
index fe7265cc..c0086cbb 100644
--- a/kolourpaint/pixmapfx/kpeffectsdialog.h
+++ b/kolourpaint/pixmapfx/kpeffectsdialog.h
@@ -33,10 +33,10 @@
#include <kptoolpreviewdialog.h>
-class QGroupBox;
-class QStringList;
-class QTimer;
-class QVBoxLayout;
+class TQGroupBox;
+class TQStringList;
+class TQTimer;
+class TQVBoxLayout;
class KComboBox;
@@ -59,8 +59,8 @@ public:
kpColorEffectCommand *createCommand () const;
protected:
- virtual QSize newDimensions () const;
- virtual QPixmap transformPixmap (const QPixmap &pixmap,
+ virtual TQSize newDimensions () const;
+ virtual TQPixmap transformPixmap (const TQPixmap &pixmap,
int targetWidth, int targetHeight) const;
public:
@@ -77,11 +77,11 @@ protected slots:
protected:
static int s_lastWidth, s_lastHeight;
- QTimer *m_delayedUpdateTimer;
+ TQTimer *m_delayedUpdateTimer;
KComboBox *m_effectsComboBox;
- QGroupBox *m_settingsGroupBox;
- QVBoxLayout *m_settingsLayout;
+ TQGroupBox *m_settingsGroupBox;
+ TQVBoxLayout *m_settingsLayout;
kpColorEffectWidget *m_colorEffectWidget;
};
diff --git a/kolourpaint/pixmapfx/kpfloodfill.cpp b/kolourpaint/pixmapfx/kpfloodfill.cpp
index 602e8acf..55238f2d 100644
--- a/kolourpaint/pixmapfx/kpfloodfill.cpp
+++ b/kolourpaint/pixmapfx/kpfloodfill.cpp
@@ -31,10 +31,10 @@
#include <kpfloodfill.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <kpdefs.h>
@@ -43,7 +43,7 @@
#include <kptool.h>
-kpFloodFill::kpFloodFill (QPixmap *pixmap, int x, int y,
+kpFloodFill::kpFloodFill (TQPixmap *pixmap, int x, int y,
const kpColor &color, int processedColorSimilarity)
: m_pixmapPtr (pixmap), m_x (x), m_y (y),
m_color (color), m_processedColorSimilarity (processedColorSimilarity),
@@ -57,7 +57,7 @@ kpFloodFill::~kpFloodFill ()
// private
-int kpFloodFill::fillLinesListSize (const QValueList <kpFloodFill::FillLine> &fillLines) const
+int kpFloodFill::fillLinesListSize (const TQValueList <kpFloodFill::FillLine> &fillLines) const
{
return (fillLines.size () * kpFloodFill::FillLine::size ());
}
@@ -66,7 +66,7 @@ int kpFloodFill::fillLinesListSize (const QValueList <kpFloodFill::FillLine> &fi
int kpFloodFill::size () const
{
int fillLinesCacheSize = 0;
- for (QValueVector < QValueList <kpFloodFill::FillLine > >::const_iterator it = m_fillLinesCache.begin ();
+ for (TQValueVector < TQValueList <kpFloodFill::FillLine > >::const_iterator it = m_fillLinesCache.begin ();
it != m_fillLinesCache.end ();
it++)
{
@@ -79,7 +79,7 @@ int kpFloodFill::size () const
}
-QRect kpFloodFill::boundingRect () const
+TQRect kpFloodFill::boundingRect () const
{
return m_boundingRect;
}
@@ -95,10 +95,10 @@ bool kpFloodFill::fill ()
// not trying to do a NOP fill
if (m_boundingRect.isValid ())
{
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- QPainter painter, maskPainter;
- QBitmap maskBitmap;
+ TQPainter painter, maskPainter;
+ TQBitmap maskBitmap;
if (m_pixmapPtr->mask () || m_color.isTransparent ())
{
@@ -113,13 +113,13 @@ bool kpFloodFill::fill ()
painter.setPen (m_color.toQColor ());
}
- const QValueList <FillLine>::ConstIterator fillLinesEnd = m_fillLines.end ();
- for (QValueList <FillLine>::ConstIterator it = m_fillLines.begin ();
+ const TQValueList <FillLine>::ConstIterator fillLinesEnd = m_fillLines.end ();
+ for (TQValueList <FillLine>::ConstIterator it = m_fillLines.begin ();
it != fillLinesEnd;
it++)
{
- QPoint p1 = QPoint ((*it).m_x1, (*it).m_y);
- QPoint p2 = QPoint ((*it).m_x2, (*it).m_y);
+ TQPoint p1 = TQPoint ((*it).m_x1, (*it).m_y);
+ TQPoint p2 = TQPoint ((*it).m_x2, (*it).m_y);
if (painter.isActive ())
painter.drawLine (p1, p2);
@@ -137,7 +137,7 @@ bool kpFloodFill::fill ()
if (!maskBitmap.isNull ())
m_pixmapPtr->setMask (maskBitmap);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
else
{
@@ -155,7 +155,7 @@ bool kpFloodFill::prepareColorToChange ()
kdDebug () << "kpFloodFill::prepareColorToChange" << endl;
#endif
- m_colorToChange = kpPixmapFX::getColorAtPixel (*m_pixmapPtr, QPoint (m_x, m_y));
+ m_colorToChange = kpPixmapFX::getColorAtPixel (*m_pixmapPtr, TQPoint (m_x, m_y));
if (m_colorToChange.isOpaque ())
{
@@ -184,7 +184,7 @@ bool kpFloodFill::prepare ()
#if DEBUG_KP_FLOOD_FILL && 1
kdDebug () << "kpFloodFill::prepare()" << endl;
#endif
- m_boundingRect = QRect ();
+ m_boundingRect = TQRect ();
if (m_initState < 1 && !prepareColorToChange ())
{
@@ -213,7 +213,7 @@ bool kpFloodFill::prepare ()
m_image = kpPixmapFX::convertToImage (*m_pixmapPtr);
if (m_image.isNull ())
{
- kdError () << "kpFloodFill::prepare() could not convert to QImage" << endl;
+ kdError () << "kpFloodFill::prepare() could not convert to TQImage" << endl;
return false;
}
@@ -231,7 +231,7 @@ bool kpFloodFill::prepare ()
// draw initial line
addLine (m_y, findMinX (m_y, m_x), findMaxX (m_y, m_x));
- for (QValueList <FillLine>::ConstIterator it = m_fillLines.begin ();
+ for (TQValueList <FillLine>::ConstIterator it = m_fillLines.begin ();
it != m_fillLines.end ();
it++)
{
@@ -267,7 +267,7 @@ void kpFloodFill::addLine (int y, int x1, int x2)
m_fillLines.append (FillLine (y, x1, x2));
m_fillLinesCache [y].append (FillLine (y /* OPT */, x1, x2));
- m_boundingRect = m_boundingRect.unite (QRect (QPoint (x1, y), QPoint (x2, y)));
+ m_boundingRect = m_boundingRect.unite (TQRect (TQPoint (x1, y), TQPoint (x2, y)));
}
kpColor kpFloodFill::pixelColor (int x, int y, bool *beenHere) const
@@ -283,8 +283,8 @@ kpColor kpFloodFill::pixelColor (int x, int y, bool *beenHere) const
return kpColor::invalid;
}
- const QValueList <FillLine>::ConstIterator theEnd = m_fillLinesCache [y].end ();
- for (QValueList <FillLine>::ConstIterator it = m_fillLinesCache [y].begin ();
+ const TQValueList <FillLine>::ConstIterator theEnd = m_fillLinesCache [y].end ();
+ for (TQValueList <FillLine>::ConstIterator it = m_fillLinesCache [y].begin ();
it != theEnd;
it++)
{
@@ -296,7 +296,7 @@ kpColor kpFloodFill::pixelColor (int x, int y, bool *beenHere) const
}
}
- return kpPixmapFX::getColorAtPixel (m_image, QPoint (x, y));
+ return kpPixmapFX::getColorAtPixel (m_image, TQPoint (x, y));
}
bool kpFloodFill::shouldGoTo (int x, int y) const
diff --git a/kolourpaint/pixmapfx/kpfloodfill.h b/kolourpaint/pixmapfx/kpfloodfill.h
index 5c0d8001..57cb5648 100644
--- a/kolourpaint/pixmapfx/kpfloodfill.h
+++ b/kolourpaint/pixmapfx/kpfloodfill.h
@@ -29,18 +29,18 @@
#ifndef __kpfloodfill_h__
#define __kpfloodfill_h__
-#include <qimage.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+#include <tqimage.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
#include <kpcolor.h>
-class QPixmap;
+class TQPixmap;
class kpFloodFill
{
public:
- kpFloodFill (QPixmap *pixmap, int x, int y,
+ kpFloodFill (TQPixmap *pixmap, int x, int y,
const kpColor &color,
int processedColorSimilarity);
~kpFloodFill ();
@@ -57,19 +57,19 @@ public:
kpColor colorToChange () const { return m_colorToChange; };
bool prepare ();
- QRect boundingRect () const; // only valid after prepare()
+ TQRect boundingRect () const; // only valid after prepare()
bool fill ();
private:
- QPixmap *m_pixmapPtr;
+ TQPixmap *m_pixmapPtr;
int m_x, m_y;
kpColor m_color;
int m_processedColorSimilarity;
int m_initState;
- QRect m_boundingRect;
+ TQRect m_boundingRect;
struct FillLine
{
@@ -86,7 +86,7 @@ private:
int m_y, m_x1, m_x2;
};
- int fillLinesListSize (const QValueList <kpFloodFill::FillLine> &fillLines) const;
+ int fillLinesListSize (const TQValueList <kpFloodFill::FillLine> &fillLines) const;
void addLine (int y, int x1, int x2);
kpColor pixelColor (int x, int y, bool *beenHere = 0) const;
@@ -95,11 +95,11 @@ private:
int findMinX (int y, int x) const;
int findMaxX (int y, int x) const;
- QValueList <FillLine> m_fillLines;
+ TQValueList <FillLine> m_fillLines;
// Init info
- QImage m_image;
- QValueVector < QValueList <FillLine> > m_fillLinesCache;
+ TQImage m_image;
+ TQValueVector < TQValueList <FillLine> > m_fillLinesCache;
kpColor m_colorToChange;
};
diff --git a/kolourpaint/pixmapfx/kppixmapfx.cpp b/kolourpaint/pixmapfx/kppixmapfx.cpp
index 1bd0b173..5457ef50 100644
--- a/kolourpaint/pixmapfx/kppixmapfx.cpp
+++ b/kolourpaint/pixmapfx/kppixmapfx.cpp
@@ -33,15 +33,15 @@
#include <math.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qdatetime.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qrect.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqdatetime.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqrect.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -87,17 +87,17 @@ int kpPixmapFX::multiplyDimensions (int lhs, int rhs)
//
-// QPixmap Statistics
+// TQPixmap Statistics
//
// public static
-int kpPixmapFX::pixmapArea (const QPixmap &pixmap)
+int kpPixmapFX::pixmapArea (const TQPixmap &pixmap)
{
return kpPixmapFX::pixmapArea (pixmap.width (), pixmap.height ());
}
// public static
-int kpPixmapFX::pixmapArea (const QPixmap *pixmap)
+int kpPixmapFX::pixmapArea (const TQPixmap *pixmap)
{
return (pixmap ? kpPixmapFX::pixmapArea (*pixmap) : 0);
}
@@ -110,14 +110,14 @@ int kpPixmapFX::pixmapArea (int width, int height)
// public static
-int kpPixmapFX::pixmapSize (const QPixmap &pixmap)
+int kpPixmapFX::pixmapSize (const TQPixmap &pixmap)
{
return kpPixmapFX::pixmapSize (pixmap.width (), pixmap.height (),
pixmap.depth ());
}
// public static
-int kpPixmapFX::pixmapSize (const QPixmap *pixmap)
+int kpPixmapFX::pixmapSize (const TQPixmap *pixmap)
{
return (pixmap ? kpPixmapFX::pixmapSize (*pixmap) : 0);
}
@@ -142,13 +142,13 @@ int kpPixmapFX::pixmapSize (int width, int height, int depth)
// public static
-int kpPixmapFX::imageSize (const QImage &image)
+int kpPixmapFX::imageSize (const TQImage &image)
{
return kpPixmapFX::imageSize (image.width (), image.height (), image.depth ());
}
// public static
-int kpPixmapFX::imageSize (const QImage *image)
+int kpPixmapFX::imageSize (const TQImage *image)
{
return (image ? kpPixmapFX::imageSize (*image) : 0);
}
@@ -187,49 +187,49 @@ int kpPixmapFX::selectionSize (const kpSelection *sel)
// public static
-int kpPixmapFX::stringSize (const QString &string)
+int kpPixmapFX::stringSize (const TQString &string)
{
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "kpPixmapFX::stringSize(" << string << ")"
<< " len=" << string.length ()
- << " sizeof(QChar)=" << sizeof (QChar)
+ << " sizeof(TQChar)=" << sizeof (TQChar)
<< endl;
#endif
- return string.length () * sizeof (QChar);
+ return string.length () * sizeof (TQChar);
}
// public static
-int kpPixmapFX::pointArraySize (const QPointArray &points)
+int kpPixmapFX::pointArraySize (const TQPointArray &points)
{
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "kpPixmapFX::pointArraySize() points.size="
<< points.size ()
- << " sizeof(QPoint)=" << sizeof (QPoint)
+ << " sizeof(TQPoint)=" << sizeof (TQPoint)
<< endl;
#endif
- return (points.size () * sizeof (QPoint));
+ return (points.size () * sizeof (TQPoint));
}
//
-// QPixmap/QImage Conversion Functions
+// QPixmap/TQImage Conversion Functions
//
// public static
-QImage kpPixmapFX::convertToImage (const QPixmap &pixmap)
+TQImage kpPixmapFX::convertToImage (const TQPixmap &pixmap)
{
if (pixmap.isNull ())
- return QImage ();
+ return TQImage ();
return pixmap.convertToImage ();
}
// Returns true if <image> contains translucency (rather than just transparency)
-// QPixmap::hasAlphaChannel() appears to give incorrect results
-static bool imageHasAlphaChannel (const QImage &image)
+// TQPixmap::hasAlphaChannel() appears to give incorrect results
+static bool imageHasAlphaChannel (const TQImage &image)
{
if (image.depth () < 32)
return false;
@@ -248,9 +248,9 @@ static bool imageHasAlphaChannel (const QImage &image)
return false;
}
-static int imageNumColorsUpTo (const QImage &image, int max)
+static int imageNumColorsUpTo (const TQImage &image, int max)
{
- QMap <QRgb, bool> rgbMap;
+ TQMap <QRgb, bool> rgbMap;
if (image.depth () <= 8)
{
@@ -273,22 +273,22 @@ static int imageNumColorsUpTo (const QImage &image, int max)
return rgbMap.size ();
}
-static void convertToPixmapWarnAboutLoss (const QImage &image,
+static void convertToPixmapWarnAboutLoss (const TQImage &image,
const kpPixmapFX::WarnAboutLossInfo &wali)
{
if (!wali.isValid ())
return;
- const QString colorDepthTranslucencyDontAskAgain =
+ const TQString colorDepthTranslucencyDontAskAgain =
wali.m_dontAskAgainPrefix + "_ColorDepthTranslucency";
- const QString colorDepthDontAskAgain =
+ const TQString colorDepthDontAskAgain =
wali.m_dontAskAgainPrefix + "_ColorDepth";
- const QString translucencyDontAskAgain =
+ const TQString translucencyDontAskAgain =
wali.m_dontAskAgainPrefix + "_Translucency";
#if DEBUG_KP_PIXMAP_FX && 1
- QTime timer;
+ TQTime timer;
timer.start ();
#endif
@@ -303,8 +303,8 @@ static void convertToPixmapWarnAboutLoss (const QImage &image,
bool moreColorsThanDisplay =
(KMessageBox::shouldBeShownContinue (colorDepthDontAskAgain) &&
- image.depth () > QColor::numBitPlanes () &&
- QColor::numBitPlanes () < 24); // 32 indicates alpha channel
+ image.depth () > TQColor::numBitPlanes () &&
+ TQColor::numBitPlanes () < 24); // 32 indicates alpha channel
int screenDepthNeeded = 0;
@@ -322,7 +322,7 @@ static void convertToPixmapWarnAboutLoss (const QImage &image,
<< endl
<< "\timage.depth()=" << image.depth ()
<< endl
- << "\tscreenDepth=" << QColor::numBitPlanes ()
+ << "\tscreenDepth=" << TQColor::numBitPlanes ()
<< endl
<< "\tmoreColorsThanDisplay=" << moreColorsThanDisplay
<< endl
@@ -331,14 +331,14 @@ static void convertToPixmapWarnAboutLoss (const QImage &image,
#endif
- QApplication::setOverrideCursor (Qt::arrowCursor);
+ TQApplication::setOverrideCursor (Qt::arrowCursor);
if (moreColorsThanDisplay && hasAlphaChannel)
{
KMessageBox::information (wali.m_parent,
wali.m_moreColorsThanDisplayAndHasAlphaChannelMessage
.arg (screenDepthNeeded),
- QString::null, // or would you prefer "Low Screen Depth and Image Contains Transparency"? :)
+ TQString::null, // or would you prefer "Low Screen Depth and Image Contains Transparency"? :)
colorDepthTranslucencyDontAskAgain);
if (!KMessageBox::shouldBeShownContinue (colorDepthTranslucencyDontAskAgain))
@@ -363,26 +363,26 @@ static void convertToPixmapWarnAboutLoss (const QImage &image,
translucencyDontAskAgain);
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public static
-QPixmap kpPixmapFX::convertToPixmap (const QImage &image, bool pretty,
+TQPixmap kpPixmapFX::convertToPixmap (const TQImage &image, bool pretty,
const WarnAboutLossInfo &wali)
{
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "kpPixmapFX::convertToPixmap(image,pretty=" << pretty
<< ",warnAboutLossInfo.isValid=" << wali.isValid ()
<< ")" << endl;
- QTime timer;
+ TQTime timer;
timer.start ();
#endif
if (image.isNull ())
- return QPixmap ();
+ return TQPixmap ();
- QPixmap destPixmap;
+ TQPixmap destPixmap;
if (!pretty)
{
@@ -417,29 +417,29 @@ QPixmap kpPixmapFX::convertToPixmap (const QImage &image, bool pretty,
// TODO: don't dup convertToPixmap() code
// public static
-QPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const QImage &image,
+TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image,
const WarnAboutLossInfo &wali)
{
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "kpPixmapFX::convertToPixmapAsLosslessAsPossible(image depth="
<< image.depth ()
<< ",warnAboutLossInfo.isValid=" << wali.isValid ()
- << ") screenDepth=" << QPixmap::defaultDepth ()
+ << ") screenDepth=" << TQPixmap::defaultDepth ()
<< " imageNumColorsUpTo257=" << imageNumColorsUpTo (image, 257)
<< endl;
- QTime timer;
+ TQTime timer;
timer.start ();
#endif
if (image.isNull ())
- return QPixmap ();
+ return TQPixmap ();
- const int screenDepth = (QPixmap::defaultDepth () >= 24 ?
+ const int screenDepth = (TQPixmap::defaultDepth () >= 24 ?
32 :
- QPixmap::defaultDepth ());
+ TQPixmap::defaultDepth ());
- QPixmap destPixmap;
+ TQPixmap destPixmap;
int ditherFlags = 0;
if (image.depth () <= screenDepth)
@@ -553,17 +553,17 @@ QPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const QImage &image,
// public static
-QPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const QPixmap &pixmap,
- const QColor &transparentColor)
+TQPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap,
+ const TQColor &transparentColor)
{
if (!pixmap.mask ())
return pixmap;
- QPixmap retPixmap (pixmap.width (), pixmap.height ());
+ TQPixmap retPixmap (pixmap.width (), pixmap.height ());
retPixmap.fill (transparentColor);
- QPainter p (&retPixmap);
- p.drawPixmap (QPoint (0, 0), pixmap);
+ TQPainter p (&retPixmap);
+ p.drawPixmap (TQPoint (0, 0), pixmap);
p.end ();
retPixmap.setMask (*pixmap.mask ());
@@ -577,9 +577,9 @@ QPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const QPixmap &pixmap,
// public static
-QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
+TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect)
{
- QPixmap retPixmap (rect.width (), rect.height ());
+ TQPixmap retPixmap (rect.width (), rect.height ());
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "kpPixmapFX::getPixmapAt(pm.hasMask="
@@ -590,7 +590,7 @@ QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
<< endl;
#endif
- const QRect validSrcRect = pm.rect ().intersect (rect);
+ const TQRect validSrcRect = pm.rect ().intersect (rect);
const bool wouldHaveUndefinedPixels = (validSrcRect != rect);
if (wouldHaveUndefinedPixels)
@@ -598,7 +598,7 @@ QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "\tret would contain undefined pixels - setting them to transparent" << endl;
#endif
- QBitmap transparentMask (rect.width (), rect.height ());
+ TQBitmap transparentMask (rect.width (), rect.height ());
transparentMask.fill (Qt::color0/*transparent*/);
retPixmap.setMask (transparentMask);
}
@@ -612,7 +612,7 @@ QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
}
- const QPoint destTopLeft = validSrcRect.topLeft () - rect.topLeft ();
+ const TQPoint destTopLeft = validSrcRect.topLeft () - rect.topLeft ();
// copy data _and_ mask (if avail)
copyBlt (&retPixmap, /* dest */
@@ -627,7 +627,7 @@ QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
kdDebug () << "\tensure opaque in valid region" << endl;
#endif
kpPixmapFX::ensureOpaqueAt (&retPixmap,
- QRect (destTopLeft.x (), destTopLeft.y (),
+ TQRect (destTopLeft.x (), destTopLeft.y (),
validSrcRect.width (), validSrcRect.height ()));
}
@@ -642,8 +642,8 @@ QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
// public static
-void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
- const QPixmap &srcPixmap)
+void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
+ const TQPixmap &srcPixmap)
{
if (!destPixmapPtr)
return;
@@ -666,7 +666,7 @@ void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
#if DEBUG_KP_PIXMAP_FX && 0
if (destPixmapPtr->mask ())
{
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
int numTrans = 0;
for (int y = 0; y < image.height (); y++)
@@ -704,7 +704,7 @@ void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
if (srcPixmap.mask ())
{
- QBitmap mask = getNonNullMask (*destPixmapPtr);
+ TQBitmap mask = getNonNullMask (*destPixmapPtr);
bitBlt (&mask,
destRect.x (), destRect.y (),
srcPixmap.mask (),
@@ -730,7 +730,7 @@ void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
<< endl;
if (destPixmapPtr->mask ())
{
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
int numTrans = 0;
for (int y = 0; y < image.height (); y++)
@@ -748,26 +748,26 @@ void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
}
// public static
-void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap)
+void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap)
{
kpPixmapFX::setPixmapAt (destPixmapPtr,
- QRect (destAt.x (), destAt.y (),
+ TQRect (destAt.x (), destAt.y (),
srcPixmap.width (), srcPixmap.height ()),
srcPixmap);
}
// public static
-void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap)
+void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap)
{
- kpPixmapFX::setPixmapAt (destPixmapPtr, QPoint (destX, destY), srcPixmap);
+ kpPixmapFX::setPixmapAt (destPixmapPtr, TQPoint (destX, destY), srcPixmap);
}
// public static
-void kpPixmapFX::paintPixmapAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap)
+void kpPixmapFX::paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap)
{
if (!destPixmapPtr)
return;
@@ -782,15 +782,15 @@ void kpPixmapFX::paintPixmapAt (QPixmap *destPixmapPtr, const QPoint &destAt,
}
// public static
-void kpPixmapFX::paintPixmapAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap)
+void kpPixmapFX::paintPixmapAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap)
{
- kpPixmapFX::paintPixmapAt (destPixmapPtr, QPoint (destX, destY), srcPixmap);
+ kpPixmapFX::paintPixmapAt (destPixmapPtr, TQPoint (destX, destY), srcPixmap);
}
// public static
-kpColor kpPixmapFX::getColorAtPixel (const QPixmap &pm, const QPoint &at)
+kpColor kpPixmapFX::getColorAtPixel (const TQPixmap &pm, const TQPoint &at)
{
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "kpToolColorPicker::colorAtPixel" << p << endl;
@@ -802,25 +802,25 @@ kpColor kpPixmapFX::getColorAtPixel (const QPixmap &pm, const QPoint &at)
return kpColor::invalid;
}
- QPixmap pixmap = getPixmapAt (pm, QRect (at, at));
- QImage image = kpPixmapFX::convertToImage (pixmap);
+ TQPixmap pixmap = getPixmapAt (pm, TQRect (at, at));
+ TQImage image = kpPixmapFX::convertToImage (pixmap);
if (image.isNull ())
{
- kdError () << "kpPixmapFX::getColorAtPixel(QPixmap) could not convert to QImage" << endl;
+ kdError () << "kpPixmapFX::getColorAtPixel(TQPixmap) could not convert to TQImage" << endl;
return kpColor::invalid;
}
- return getColorAtPixel (image, QPoint (0, 0));
+ return getColorAtPixel (image, TQPoint (0, 0));
}
// public static
-kpColor kpPixmapFX::getColorAtPixel (const QPixmap &pm, int x, int y)
+kpColor kpPixmapFX::getColorAtPixel (const TQPixmap &pm, int x, int y)
{
- return kpPixmapFX::getColorAtPixel (pm, QPoint (x, y));
+ return kpPixmapFX::getColorAtPixel (pm, TQPoint (x, y));
}
// public static
-kpColor kpPixmapFX::getColorAtPixel (const QImage &img, const QPoint &at)
+kpColor kpPixmapFX::getColorAtPixel (const TQImage &img, const TQPoint &at)
{
if (!img.valid (at.x (), at.y ()))
return kpColor::invalid;
@@ -830,9 +830,9 @@ kpColor kpPixmapFX::getColorAtPixel (const QImage &img, const QPoint &at)
}
// public static
-kpColor kpPixmapFX::getColorAtPixel (const QImage &img, int x, int y)
+kpColor kpPixmapFX::getColorAtPixel (const TQImage &img, int x, int y)
{
- return kpPixmapFX::getColorAtPixel (img, QPoint (x, y));
+ return kpPixmapFX::getColorAtPixel (img, TQPoint (x, y));
}
@@ -842,7 +842,7 @@ kpColor kpPixmapFX::getColorAtPixel (const QImage &img, int x, int y)
// public static
-void kpPixmapFX::ensureNoAlphaChannel (QPixmap *destPixmapPtr)
+void kpPixmapFX::ensureNoAlphaChannel (TQPixmap *destPixmapPtr)
{
if (destPixmapPtr->hasAlphaChannel ())
destPixmapPtr->setMask (kpPixmapFX::getNonNullMask/*just in case*/ (*destPixmapPtr));
@@ -850,13 +850,13 @@ void kpPixmapFX::ensureNoAlphaChannel (QPixmap *destPixmapPtr)
// public static
-QBitmap kpPixmapFX::getNonNullMask (const QPixmap &pm)
+TQBitmap kpPixmapFX::getNonNullMask (const TQPixmap &pm)
{
if (pm.mask ())
return *pm.mask ();
else
{
- QBitmap maskBitmap (pm.width (), pm.height ());
+ TQBitmap maskBitmap (pm.width (), pm.height ());
maskBitmap.fill (Qt::color1/*opaque*/);
return maskBitmap;
@@ -865,14 +865,14 @@ QBitmap kpPixmapFX::getNonNullMask (const QPixmap &pm)
// public static
-void kpPixmapFX::ensureTransparentAt (QPixmap *destPixmapPtr, const QRect &destRect)
+void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &destRect)
{
if (!destPixmapPtr)
return;
- QBitmap maskBitmap = getNonNullMask (*destPixmapPtr);
+ TQBitmap maskBitmap = getNonNullMask (*destPixmapPtr);
- QPainter p (&maskBitmap);
+ TQPainter p (&maskBitmap);
p.setPen (Qt::color0/*transparent*/);
p.setBrush (Qt::color0/*transparent*/);
@@ -886,8 +886,8 @@ void kpPixmapFX::ensureTransparentAt (QPixmap *destPixmapPtr, const QRect &destR
// public static
-void kpPixmapFX::paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &brushBitmap)
+void kpPixmapFX::paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &brushBitmap)
{
if (!destPixmapPtr)
return;
@@ -898,7 +898,7 @@ void kpPixmapFX::paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, const QP
return;
}
- QBitmap destMaskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
+ TQBitmap destMaskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
// Src
// Dest Mask Brush Bitmap = Result
@@ -922,24 +922,24 @@ void kpPixmapFX::paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, const QP
}
// public static
-void kpPixmapFX::paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &brushBitmap)
+void kpPixmapFX::paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &brushBitmap)
{
kpPixmapFX::paintMaskTransparentWithBrush (destPixmapPtr,
- QPoint (destX, destY),
+ TQPoint (destX, destY),
brushBitmap);
}
// public static
-void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, const QRect &destRect)
+void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect)
{
if (!destPixmapPtr || !destPixmapPtr->mask ()/*already opaque*/)
return;
- QBitmap maskBitmap = *destPixmapPtr->mask ();
+ TQBitmap maskBitmap = *destPixmapPtr->mask ();
- QPainter p (&maskBitmap);
+ TQPainter p (&maskBitmap);
p.setPen (Qt::color1/*opaque*/);
p.setBrush (Qt::color1/*opaque*/);
@@ -952,25 +952,25 @@ void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, const QRect &destRect)
}
// public static
-void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap)
+void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap)
{
if (!destPixmapPtr || !destPixmapPtr->mask ()/*already opaque*/)
return;
- QBitmap destMask = *destPixmapPtr->mask ();
+ TQBitmap destMask = *destPixmapPtr->mask ();
if (srcPixmap.mask ())
{
bitBlt (&destMask, /* dest */
destAt, /* dest pt */
srcPixmap.mask (), /* src */
- QRect (0, 0, srcPixmap.width (), srcPixmap.height ()), /* src rect */
+ TQRect (0, 0, srcPixmap.width (), srcPixmap.height ()), /* src rect */
Qt::OrROP/*if either is opaque, it's opaque*/);
}
else
{
- QPainter p (&destMask);
+ TQPainter p (&destMask);
p.setPen (Qt::color1/*opaque*/);
p.setBrush (Qt::color1/*opaque*/);
@@ -985,10 +985,10 @@ void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, const QPoint &destAt,
}
// public static
-void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap)
+void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap)
{
- kpPixmapFX::ensureOpaqueAt (destPixmapPtr, QPoint (destX, destY), srcPixmap);
+ kpPixmapFX::ensureOpaqueAt (destPixmapPtr, TQPoint (destX, destY), srcPixmap);
}
@@ -997,17 +997,17 @@ void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, int destX, int destY,
//
// public static
-void kpPixmapFX::convertToGrayscale (QPixmap *destPixmapPtr)
+void kpPixmapFX::convertToGrayscale (TQPixmap *destPixmapPtr)
{
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
kpPixmapFX::convertToGrayscale (&image);
*destPixmapPtr = kpPixmapFX::convertToPixmap (image);
}
// public static
-QPixmap kpPixmapFX::convertToGrayscale (const QPixmap &pm)
+TQPixmap kpPixmapFX::convertToGrayscale (const TQPixmap &pm)
{
- QImage image = kpPixmapFX::convertToImage (pm);
+ TQImage image = kpPixmapFX::convertToImage (pm);
kpPixmapFX::convertToGrayscale (&image);
return kpPixmapFX::convertToPixmap (image);
}
@@ -1025,7 +1025,7 @@ static QRgb toGray (QRgb rgb)
}
// public static
-void kpPixmapFX::convertToGrayscale (QImage *destImagePtr)
+void kpPixmapFX::convertToGrayscale (TQImage *destImagePtr)
{
if (destImagePtr->depth () > 8)
{
@@ -1048,23 +1048,23 @@ void kpPixmapFX::convertToGrayscale (QImage *destImagePtr)
}
// public static
-QImage kpPixmapFX::convertToGrayscale (const QImage &img)
+TQImage kpPixmapFX::convertToGrayscale (const TQImage &img)
{
- QImage retImage = img;
+ TQImage retImage = img;
kpPixmapFX::convertToGrayscale (&retImage);
return retImage;
}
// public static
-void kpPixmapFX::fill (QPixmap *destPixmapPtr, const kpColor &color)
+void kpPixmapFX::fill (TQPixmap *destPixmapPtr, const kpColor &color)
{
if (!destPixmapPtr)
return;
if (color.isOpaque ())
{
- destPixmapPtr->setMask (QBitmap ()); // no mask = opaque
+ destPixmapPtr->setMask (TQBitmap ()); // no mask = opaque
destPixmapPtr->fill (color.toQColor ());
}
else
@@ -1074,16 +1074,16 @@ void kpPixmapFX::fill (QPixmap *destPixmapPtr, const kpColor &color)
}
// public static
-QPixmap kpPixmapFX::fill (const QPixmap &pm, const kpColor &color)
+TQPixmap kpPixmapFX::fill (const TQPixmap &pm, const kpColor &color)
{
- QPixmap ret = pm;
+ TQPixmap ret = pm;
kpPixmapFX::fill (&ret, color);
return ret;
}
// public static
-void kpPixmapFX::resize (QPixmap *destPixmapPtr, int w, int h,
+void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
const kpColor &backgroundColor, bool fillNewAreas)
{
#if DEBUG_KP_PIXMAP_FX && 1
@@ -1107,8 +1107,8 @@ void kpPixmapFX::resize (QPixmap *destPixmapPtr, int w, int h,
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tfilling in new areas" << endl;
#endif
- QBitmap maskBitmap;
- QPainter painter, maskPainter;
+ TQBitmap maskBitmap;
+ TQPainter painter, maskPainter;
if (backgroundColor.isOpaque ())
{
@@ -1152,17 +1152,17 @@ void kpPixmapFX::resize (QPixmap *destPixmapPtr, int w, int h,
}
// public static
-QPixmap kpPixmapFX::resize (const QPixmap &pm, int w, int h,
+TQPixmap kpPixmapFX::resize (const TQPixmap &pm, int w, int h,
const kpColor &backgroundColor, bool fillNewAreas)
{
- QPixmap ret = pm;
+ TQPixmap ret = pm;
kpPixmapFX::resize (&ret, w, h, backgroundColor, fillNewAreas);
return ret;
}
// public static
-void kpPixmapFX::scale (QPixmap *destPixmapPtr, int w, int h, bool pretty)
+void kpPixmapFX::scale (TQPixmap *destPixmapPtr, int w, int h, bool pretty)
{
if (!destPixmapPtr)
return;
@@ -1171,7 +1171,7 @@ void kpPixmapFX::scale (QPixmap *destPixmapPtr, int w, int h, bool pretty)
}
// public static
-QPixmap kpPixmapFX::scale (const QPixmap &pm, int w, int h, bool pretty)
+TQPixmap kpPixmapFX::scale (const TQPixmap &pm, int w, int h, bool pretty)
{
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "kpPixmapFX::scale(oldRect=" << pm.rect ()
@@ -1187,7 +1187,7 @@ QPixmap kpPixmapFX::scale (const QPixmap &pm, int w, int h, bool pretty)
if (pretty)
{
- QImage image = kpPixmapFX::convertToImage (pm);
+ TQImage image = kpPixmapFX::convertToImage (pm);
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "\tBefore smooth scale:" << endl;
@@ -1219,7 +1219,7 @@ QPixmap kpPixmapFX::scale (const QPixmap &pm, int w, int h, bool pretty)
}
else
{
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.scale (double (w) / double (pm.width ()),
double (h) / double (pm.height ()));
@@ -1235,7 +1235,7 @@ double kpPixmapFX::AngleInDegreesEpsilon =
/ (2.0/*max error allowed*/ * 2.0/*for good measure*/);
-static QWMatrix matrixWithZeroOrigin (const QWMatrix &matrix, int width, int height)
+static TQWMatrix matrixWithZeroOrigin (const TQWMatrix &matrix, int width, int height)
{
#if DEBUG_KP_PIXMAP_FX
kdDebug () << "matrixWithZeroOrigin(w=" << width << ",h=" << height << ")" << endl;
@@ -1247,23 +1247,23 @@ static QWMatrix matrixWithZeroOrigin (const QWMatrix &matrix, int width, int hei
<< " dy=" << matrix.dy ()
<< endl;
#endif
- // TODO: Should we be using QWMatrix::Areas?
- QRect newRect = matrix.mapRect (QRect (0, 0, width, height));
+ // TODO: Should we be using TQWMatrix::Areas?
+ TQRect newRect = matrix.mapRect (TQRect (0, 0, width, height));
#if DEBUG_KP_PIXMAP_FX
kdDebug () << "\tnewRect=" << newRect << endl;
#endif
- QWMatrix translatedMatrix (matrix.m11 (), matrix.m12 (), matrix.m21 (), matrix.m22 (),
+ TQWMatrix translatedMatrix (matrix.m11 (), matrix.m12 (), matrix.m21 (), matrix.m22 (),
matrix.dx () - newRect.left (), matrix.dy () - newRect.top ());
return translatedMatrix;
}
-static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
+static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,
const kpColor &backgroundColor,
int targetWidth, int targetHeight)
{
- QWMatrix transformMatrix = transformMatrix_;
+ TQWMatrix transformMatrix = transformMatrix_;
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "kppixmapfx.cpp: xForm(pm.size=" << pm.size ()
@@ -1272,14 +1272,14 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
<< ")"
<< endl;
#endif
- // TODO: Should we be using QWMatrix::Areas?
- QRect newRect = transformMatrix.map (pm.rect ());
+ // TODO: Should we be using TQWMatrix::Areas?
+ TQRect newRect = transformMatrix.map (pm.rect ());
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tmappedRect=" << newRect << endl;
#endif
- QWMatrix scaleMatrix;
+ TQWMatrix scaleMatrix;
if (targetWidth > 0 && targetWidth != newRect.width ())
{
#if DEBUG_KP_PIXMAP_FX && 1
@@ -1300,16 +1300,16 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
{
#if DEBUG_KP_PIXMAP_FX && 1
// TODO: What is going on here??? Why isn't matrix * working properly?
- QWMatrix wrongMatrix = transformMatrix * scaleMatrix;
- QWMatrix oldHat = transformMatrix;
+ TQWMatrix wrongMatrix = transformMatrix * scaleMatrix;
+ TQWMatrix oldHat = transformMatrix;
if (targetWidth > 0 && targetWidth != newRect.width ())
oldHat.scale (double (targetWidth) / double (newRect.width ()), 1);
if (targetHeight > 0 && targetHeight != newRect.height ())
oldHat.scale (1, double (targetHeight) / double (newRect.height ()));
- QWMatrix altHat = transformMatrix;
+ TQWMatrix altHat = transformMatrix;
altHat.scale ((targetWidth > 0 && targetWidth != newRect.width ()) ? double (targetWidth) / double (newRect.width ()) : 1,
(targetHeight > 0 && targetHeight != newRect.height ()) ? double (targetHeight) / double (newRect.height ()) : 1);
- QWMatrix correctMatrix = scaleMatrix * transformMatrix;
+ TQWMatrix correctMatrix = scaleMatrix * transformMatrix;
kdDebug () << "\tsupposedlyWrongMatrix: m11=" << wrongMatrix.m11 () // <<<---- this is the correct matrix???
<< " m12=" << wrongMatrix.m12 ()
@@ -1347,7 +1347,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
transformMatrix = transformMatrix * scaleMatrix;
- // TODO: Should we be using QWMatrix::Areas?
+ // TODO: Should we be using TQWMatrix::Areas?
newRect = transformMatrix.map (pm.rect ());
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tnewRect after targetWidth,targetHeight adjust=" << newRect << endl;
@@ -1355,7 +1355,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
}
- QPixmap newPixmap (targetWidth > 0 ? targetWidth : newRect.width (),
+ TQPixmap newPixmap (targetWidth > 0 ? targetWidth : newRect.width (),
targetHeight > 0 ? targetHeight : newRect.height ());
if ((targetWidth > 0 && targetWidth != newRect.width ()) ||
(targetHeight > 0 && targetHeight != newRect.height ()))
@@ -1370,7 +1370,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
#endif
}
- QBitmap newBitmapMask;
+ TQBitmap newBitmapMask;
if (backgroundColor.isOpaque ())
newPixmap.fill (backgroundColor.toQColor ());
@@ -1381,7 +1381,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
newBitmapMask.fill (backgroundColor.maskColor ());
}
- QPainter painter (&newPixmap);
+ TQPainter painter (&newPixmap);
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tmatrix: m11=" << transformMatrix.m11 ()
<< " m12=" << transformMatrix.m12 ()
@@ -1390,7 +1390,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
<< " dx=" << transformMatrix.dx ()
<< " dy=" << transformMatrix.dy ()
<< endl;
- const QWMatrix trueMatrix = QPixmap::trueMatrix (transformMatrix,
+ const TQWMatrix trueMatrix = TQPixmap::trueMatrix (transformMatrix,
pm.width (), pm.height ());
kdDebug () << "\ttrue matrix: m11=" << trueMatrix.m11 ()
<< " m12=" << trueMatrix.m12 ()
@@ -1402,7 +1402,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
#endif
painter.setWorldMatrix (transformMatrix);
#if DEBUG_KP_PIXMAP_FX && 0
- kdDebug () << "\ttranslate top=" << painter.xForm (QPoint (0, 0)) << endl;
+ kdDebug () << "\ttranslate top=" << painter.xForm (TQPoint (0, 0)) << endl;
kdDebug () << "\tmatrix: m11=" << painter.worldMatrix ().m11 ()
<< " m12=" << painter.worldMatrix ().m12 ()
<< " m21=" << painter.worldMatrix ().m21 ()
@@ -1411,14 +1411,14 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
<< " dy=" << painter.worldMatrix ().dy ()
<< endl;
#endif
- painter.drawPixmap (QPoint (0, 0), pm);
+ painter.drawPixmap (TQPoint (0, 0), pm);
painter.end ();
if (!newBitmapMask.isNull ())
{
- QPainter maskPainter (&newBitmapMask);
+ TQPainter maskPainter (&newBitmapMask);
maskPainter.setWorldMatrix (transformMatrix);
- maskPainter.drawPixmap (QPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
+ maskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
maskPainter.end ();
newPixmap.setMask (newBitmapMask);
}
@@ -1427,12 +1427,12 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
}
// public static
-QWMatrix kpPixmapFX::skewMatrix (int width, int height, double hangle, double vangle)
+TQWMatrix kpPixmapFX::skewMatrix (int width, int height, double hangle, double vangle)
{
if (fabs (hangle - 0) < kpPixmapFX::AngleInDegreesEpsilon &&
fabs (vangle - 0) < kpPixmapFX::AngleInDegreesEpsilon)
{
- return QWMatrix ();
+ return TQWMatrix ();
}
@@ -1464,9 +1464,9 @@ QWMatrix kpPixmapFX::skewMatrix (int width, int height, double hangle, double va
*
*/
- //QWMatrix matrix (1, tan (KP_DEGREES_TO_RADIANS (vangle)), tan (KP_DEGREES_TO_RADIANS (hangle)), 1, 0, 0);
+ //TQWMatrix matrix (1, tan (KP_DEGREES_TO_RADIANS (vangle)), tan (KP_DEGREES_TO_RADIANS (hangle)), 1, 0, 0);
// I think this is clearer than above :)
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.shear (tan (KP_DEGREES_TO_RADIANS (hangle)),
tan (KP_DEGREES_TO_RADIANS (vangle)));
@@ -1474,14 +1474,14 @@ QWMatrix kpPixmapFX::skewMatrix (int width, int height, double hangle, double va
}
// public static
-QWMatrix kpPixmapFX::skewMatrix (const QPixmap &pixmap, double hangle, double vangle)
+TQWMatrix kpPixmapFX::skewMatrix (const TQPixmap &pixmap, double hangle, double vangle)
{
return kpPixmapFX::skewMatrix (pixmap.width (), pixmap.height (), hangle, vangle);
}
// public static
-void kpPixmapFX::skew (QPixmap *destPixmapPtr, double hangle, double vangle,
+void kpPixmapFX::skew (TQPixmap *destPixmapPtr, double hangle, double vangle,
const kpColor &backgroundColor,
int targetWidth, int targetHeight)
{
@@ -1494,7 +1494,7 @@ void kpPixmapFX::skew (QPixmap *destPixmapPtr, double hangle, double vangle,
}
// public static
-QPixmap kpPixmapFX::skew (const QPixmap &pm, double hangle, double vangle,
+TQPixmap kpPixmapFX::skew (const TQPixmap &pm, double hangle, double vangle,
const kpColor &backgroundColor,
int targetWidth, int targetHeight)
{
@@ -1523,21 +1523,21 @@ QPixmap kpPixmapFX::skew (const QPixmap &pm, double hangle, double vangle,
}
- QWMatrix matrix = skewMatrix (pm, hangle, vangle);
+ TQWMatrix matrix = skewMatrix (pm, hangle, vangle);
return ::xForm (pm, matrix, backgroundColor, targetWidth, targetHeight);
}
// public static
-QWMatrix kpPixmapFX::rotateMatrix (int width, int height, double angle)
+TQWMatrix kpPixmapFX::rotateMatrix (int width, int height, double angle)
{
if (fabs (angle - 0) < kpPixmapFX::AngleInDegreesEpsilon)
{
- return QWMatrix ();
+ return TQWMatrix ();
}
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.translate (width / 2, height / 2);
matrix.rotate (angle);
@@ -1545,7 +1545,7 @@ QWMatrix kpPixmapFX::rotateMatrix (int width, int height, double angle)
}
// public static
-QWMatrix kpPixmapFX::rotateMatrix (const QPixmap &pixmap, double angle)
+TQWMatrix kpPixmapFX::rotateMatrix (const TQPixmap &pixmap, double angle)
{
return kpPixmapFX::rotateMatrix (pixmap.width (), pixmap.height (), angle);
}
@@ -1585,7 +1585,7 @@ bool kpPixmapFX::isLosslessRotation (double angle)
// public static
-void kpPixmapFX::rotate (QPixmap *destPixmapPtr, double angle,
+void kpPixmapFX::rotate (TQPixmap *destPixmapPtr, double angle,
const kpColor &backgroundColor,
int targetWidth, int targetHeight)
{
@@ -1598,7 +1598,7 @@ void kpPixmapFX::rotate (QPixmap *destPixmapPtr, double angle,
}
// public static
-QPixmap kpPixmapFX::rotate (const QPixmap &pm, double angle,
+TQPixmap kpPixmapFX::rotate (const TQPixmap &pm, double angle,
const kpColor &backgroundColor,
int targetWidth, int targetHeight)
{
@@ -1609,22 +1609,22 @@ QPixmap kpPixmapFX::rotate (const QPixmap &pm, double angle,
}
- QWMatrix matrix = rotateMatrix (pm, angle);
+ TQWMatrix matrix = rotateMatrix (pm, angle);
return ::xForm (pm, matrix, backgroundColor, targetWidth, targetHeight);
}
// public static
-QWMatrix kpPixmapFX::flipMatrix (int width, int height, bool horz, bool vert)
+TQWMatrix kpPixmapFX::flipMatrix (int width, int height, bool horz, bool vert)
{
if (width <= 0 || height <= 0)
{
kdError () << "kpPixmapFX::flipMatrix() passed invalid dimensions" << endl;
- return QWMatrix ();
+ return TQWMatrix ();
}
- return QWMatrix (horz ? -1 : +1, // m11
+ return TQWMatrix (horz ? -1 : +1, // m11
0, // m12
0, // m21
vert ? -1 : +1, // m22
@@ -1633,7 +1633,7 @@ QWMatrix kpPixmapFX::flipMatrix (int width, int height, bool horz, bool vert)
}
// public static
-QWMatrix kpPixmapFX::flipMatrix (const QPixmap &pixmap, bool horz, bool vert)
+TQWMatrix kpPixmapFX::flipMatrix (const TQPixmap &pixmap, bool horz, bool vert)
{
return kpPixmapFX::flipMatrix (pixmap.width (), pixmap.height (),
horz, vert);
@@ -1641,7 +1641,7 @@ QWMatrix kpPixmapFX::flipMatrix (const QPixmap &pixmap, bool horz, bool vert)
// public static
-void kpPixmapFX::flip (QPixmap *destPixmapPtr, bool horz, bool vert)
+void kpPixmapFX::flip (TQPixmap *destPixmapPtr, bool horz, bool vert)
{
if (!horz && !vert)
return;
@@ -1650,7 +1650,7 @@ void kpPixmapFX::flip (QPixmap *destPixmapPtr, bool horz, bool vert)
}
// public static
-QPixmap kpPixmapFX::flip (const QPixmap &pm, bool horz, bool vert)
+TQPixmap kpPixmapFX::flip (const TQPixmap &pm, bool horz, bool vert)
{
if (!horz && !vert)
return pm;
@@ -1659,7 +1659,7 @@ QPixmap kpPixmapFX::flip (const QPixmap &pm, bool horz, bool vert)
}
// public static
-void kpPixmapFX::flip (QImage *destImagePtr, bool horz, bool vert)
+void kpPixmapFX::flip (TQImage *destImagePtr, bool horz, bool vert)
{
if (!horz && !vert)
return;
@@ -1668,7 +1668,7 @@ void kpPixmapFX::flip (QImage *destImagePtr, bool horz, bool vert)
}
// public static
-QImage kpPixmapFX::flip (const QImage &img, bool horz, bool vert)
+TQImage kpPixmapFX::flip (const TQImage &img, bool horz, bool vert)
{
if (!horz && !vert)
return img;
diff --git a/kolourpaint/pixmapfx/kppixmapfx.h b/kolourpaint/pixmapfx/kppixmapfx.h
index c083ee43..ac52e992 100644
--- a/kolourpaint/pixmapfx/kppixmapfx.h
+++ b/kolourpaint/pixmapfx/kppixmapfx.h
@@ -30,19 +30,19 @@
#define KP_PIXMAP_FX_H
-#include <qstring.h>
+#include <tqstring.h>
-class QBitmap;
-class QColor;
-class QImage;
-class QPointArray;
-class QPixmap;
-class QPoint;
-class QRect;
-class QString;
-class QWidget;
-class QWMatrix;
+class TQBitmap;
+class TQColor;
+class TQImage;
+class TQPointArray;
+class TQPixmap;
+class TQPoint;
+class TQRect;
+class TQString;
+class TQWidget;
+class TQWMatrix;
class kpColor;
class kpSelection;
@@ -61,56 +61,56 @@ public:
//
- // QPixmap Statistics
+ // TQPixmap Statistics
//
// Returns the width * height.
- static int pixmapArea (const QPixmap &pixmap);
- static int pixmapArea (const QPixmap *pixmap);
+ static int pixmapArea (const TQPixmap &pixmap);
+ static int pixmapArea (const TQPixmap *pixmap);
static int pixmapArea (int width, int height);
// Returns the estimated size of <pixmap> in pixmap memory.
- static int pixmapSize (const QPixmap &pixmap);
- static int pixmapSize (const QPixmap *pixmap);
+ static int pixmapSize (const TQPixmap &pixmap);
+ static int pixmapSize (const TQPixmap *pixmap);
static int pixmapSize (int width, int height, int depth);
- static int imageSize (const QImage &image);
- static int imageSize (const QImage *image);
+ static int imageSize (const TQImage &image);
+ static int imageSize (const TQImage *image);
static int imageSize (int width, int height, int depth);
static int selectionSize (const kpSelection &sel);
static int selectionSize (const kpSelection *sel);
- static int stringSize (const QString &string);
+ static int stringSize (const TQString &string);
- static int pointArraySize (const QPointArray &points);
+ static int pointArraySize (const TQPointArray &points);
//
- // QPixmap/QImage Conversion Functions
+ // QPixmap/TQImage Conversion Functions
//
//
- // Converts <pixmap> to a QImage and returns it.
+ // Converts <pixmap> to a TQImage and returns it.
//
// WARNING: On an 8-bit screen:
//
- // QPixmap result = convertToPixmap (convertToImage (pixmap));
+ // TQPixmap result = convertToPixmap (convertToImage (pixmap));
//
// <result> is slightly differently colored to <pixmap>.
//
- // KolourPaint needs to convert to QImage occasionally as
- // QImage allows KolourPaint to read pixels and because the QImage
+ // KolourPaint needs to convert to TQImage occasionally as
+ // TQImage allows KolourPaint to read pixels and because the QImage
// methods give reliable results and pixel-identical results on
- // all platforms. The QPixmap paint engine has no such guarantee
+ // all platforms. The TQPixmap paint engine has no such guarantee
// and even depends on the quality of the video driver.
//
// As a result, KolourPaint should not be used on an 8-bit screen.
// HITODO: Add warning on startup, like in KolourPaint/KDE4.
//
// This bug will be fixed when KolourPaint gets a proper image library,
- // where QPixmap -> QImage -> QPixmap transitions will be not be needed.
- static QImage convertToImage (const QPixmap &pixmap);
+ // where TQPixmap -> TQImage -> TQPixmap transitions will be not be needed.
+ static TQImage convertToImage (const TQPixmap &pixmap);
//
// Dialog info for warning about data loss with convertToPixmap().
@@ -150,11 +150,11 @@ public:
//
// Dialog parent
//
- WarnAboutLossInfo (const QString &moreColorsThanDisplayAndHasAlphaChannelMessage,
- const QString &moreColorsThanDisplayMessage,
- const QString &hasAlphaChannelMessage,
- const QString &dontAskAgainPrefix,
- QWidget *parent)
+ WarnAboutLossInfo (const TQString &moreColorsThanDisplayAndHasAlphaChannelMessage,
+ const TQString &moreColorsThanDisplayMessage,
+ const TQString &hasAlphaChannelMessage,
+ const TQString &dontAskAgainPrefix,
+ TQWidget *parent)
:
m_moreColorsThanDisplayAndHasAlphaChannelMessage (
moreColorsThanDisplayAndHasAlphaChannelMessage),
@@ -183,16 +183,16 @@ public:
bool isValid () const { return m_isValid; }
- QString m_moreColorsThanDisplayAndHasAlphaChannelMessage,
+ TQString m_moreColorsThanDisplayAndHasAlphaChannelMessage,
m_moreColorsThanDisplayMessage,
m_hasAlphaChannelMessage;
- QString m_dontAskAgainPrefix;
- QWidget *m_parent;
+ TQString m_dontAskAgainPrefix;
+ TQWidget *m_parent;
bool m_isValid;
};
//
- // Converts <image> to a QPixmap of the current display's depth and
+ // Converts <image> to a TQPixmap of the current display's depth and
// returns it.
//
// If the flag <pretty> is set, it will dither the image making the
@@ -202,14 +202,14 @@ public:
//
// This will automatically call ensureNoAlphaChannel().
//
- // Never use a foreign QPixmap that is offered to you - always get the
- // foreign QImage and use this function to convert it to a sane QPixmap.
+ // Never use a foreign TQPixmap that is offered to you - always get the
+ // foreign TQImage and use this function to convert it to a sane TQPixmap.
//
// <wali>, if specified, describes parameters for the dialog that comes
// up warning the user of data loss if the <image> contains translucency
// and/or more colors than the current display.
//
- static QPixmap convertToPixmap (const QImage &image, bool pretty = false,
+ static TQPixmap convertToPixmap (const TQImage &image, bool pretty = false,
const WarnAboutLossInfo &wali = WarnAboutLossInfo ());
// Same as convertToPixmap() but tries as hard as possible to make the
@@ -221,15 +221,15 @@ public:
// instead. If you know for sure that <image> cannot be displayed
// losslessly, then call convertToPixmap() with <pretty> = true.
//
- static QPixmap convertToPixmapAsLosslessAsPossible (const QImage &image,
+ static TQPixmap convertToPixmapAsLosslessAsPossible (const TQImage &image,
const WarnAboutLossInfo &wali = WarnAboutLossInfo ());
// Sets the RGB values of the pixels where <pixmap> is transparent to
// <transparentColor>. This has visually no effect on the <pixmap>
// unless the mask is lost.
- static QPixmap pixmapWithDefinedTransparentPixels (const QPixmap &pixmap,
- const QColor &transparentColor);
+ static TQPixmap pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap,
+ const TQColor &transparentColor);
//
@@ -240,50 +240,50 @@ public:
//
// Returns the pixel and mask data found at the <rect> in <pm>.
//
- static QPixmap getPixmapAt (const QPixmap &pm, const QRect &rect);
+ static TQPixmap getPixmapAt (const TQPixmap &pm, const TQRect &rect);
//
// Sets the pixel and mask data at <destRect> in <*destPixmapPtr>
// to <srcPixmap>.
//
- static void setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
- const QPixmap &srcPixmap);
+ static void setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
+ const TQPixmap &srcPixmap);
//
// Sets the pixel and mask data at the rectangle in <*destPixmapPtr>,
// with the top-left <destAt> and dimensions <srcPixmap.rect()>,
// to <srcPixmap>.
//
- static void setPixmapAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap);
- static void setPixmapAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap);
+ static void setPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap);
+ static void setPixmapAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap);
//
// Draws <srcPixmap> on top of <*destPixmapPtr> at <destAt>.
// The mask of <*destPixmapPtr> is adjusted so that all opaque
// pixels in <srcPixmap> will be opaque in <*destPixmapPtr>.
//
- static void paintPixmapAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap);
- static void paintPixmapAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap);
+ static void paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap);
+ static void paintPixmapAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap);
//
// Returns the colour of the pixel at <at> in <pm>.
// If the pixel is transparent, a value is returned such that
// kpTool::isColorTransparent(<return_value>) will return true.
//
- static kpColor getColorAtPixel (const QPixmap &pm, const QPoint &at);
- static kpColor getColorAtPixel (const QPixmap &pm, int x, int y);
+ static kpColor getColorAtPixel (const TQPixmap &pm, const TQPoint &at);
+ static kpColor getColorAtPixel (const TQPixmap &pm, int x, int y);
//
// Returns the color of the pixel at <at> in <img>.
// If the pixel is transparent, a value is returned such that
// kpTool::isColorTransparent(<return_value>) will return true.
//
- static kpColor getColorAtPixel (const QImage &img, const QPoint &at);
- static kpColor getColorAtPixel (const QImage &img, int x, int y);
+ static kpColor getColorAtPixel (const TQImage &img, const TQPoint &at);
+ static kpColor getColorAtPixel (const TQImage &img, int x, int y);
//
@@ -293,49 +293,49 @@ public:
//
// Removes <*destPixmapPtr>'s Alpha Channel and attempts to convert it
- // to a mask. KolourPaint - and QPixmap to a great extent - does not
+ // to a mask. KolourPaint - and TQPixmap to a great extent - does not
// support Alpha Channels - only masks. Call this whenever you get
// a pixmap from a foreign source; else all KolourPaint code will
// exhibit "undefined behaviour".
//
- static void ensureNoAlphaChannel (QPixmap *destPixmapPtr);
+ static void ensureNoAlphaChannel (TQPixmap *destPixmapPtr);
//
// Returns <pm>'s mask or a fully opaque mask (with <pm>'s dimensions)
// if <pm> does not have a mask.
//
- static QBitmap getNonNullMask (const QPixmap &pm);
+ static TQBitmap getNonNullMask (const TQPixmap &pm);
//
// Ensures that <*destPixmapPtr> is transparent at <rect>.
//
- static void ensureTransparentAt (QPixmap *destPixmapPtr, const QRect &destRect);
+ static void ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &destRect);
//
// Sets the mask of <*destPixmapPtr> at the rectangle, with the
// top-left <destAt> and dimensions <srcMaskBitmap.rect()>,
// to transparent where <brushBitmap> is opaque.
//
- // <brushPixmap> must be a QPixmap of depth 1 (or a QBitmap).
+ // <brushPixmap> must be a TQPixmap of depth 1 (or a TQBitmap).
//
- static void paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &brushBitmap);
- static void paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &brushBitmap);
+ static void paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &brushBitmap);
+ static void paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &brushBitmap);
//
// Ensures that <*destPixmapPtr> is opaque at <rect>.
//
- static void ensureOpaqueAt (QPixmap *destPixmapPtr, const QRect &destRect);
+ static void ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect);
//
// Ensures that <srcPixmap>'s opaque pixels will be opaque if
// painted onto <*destPixmapPtr> at <destAt>.
//
- static void ensureOpaqueAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap);
- static void ensureOpaqueAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap);
+ static void ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap);
+ static void ensureOpaqueAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap);
//
@@ -346,32 +346,32 @@ public:
//
// Converts the image to grayscale.
//
- static void convertToGrayscale (QPixmap *destPixmapPtr);
- static QPixmap convertToGrayscale (const QPixmap &pm);
- static void convertToGrayscale (QImage *destImagePtr);
- static QImage convertToGrayscale (const QImage &img);
+ static void convertToGrayscale (TQPixmap *destPixmapPtr);
+ static TQPixmap convertToGrayscale (const TQPixmap &pm);
+ static void convertToGrayscale (TQImage *destImagePtr);
+ static TQImage convertToGrayscale (const TQImage &img);
//
// Fills an image in the given color.
//
- static void fill (QPixmap *destPixmapPtr, const kpColor &color);
- static QPixmap fill (const QPixmap &pm, const kpColor &color);
+ static void fill (TQPixmap *destPixmapPtr, const kpColor &color);
+ static TQPixmap fill (const TQPixmap &pm, const kpColor &color);
//
// Resizes an image to the given width and height,
// filling any new areas with <backgroundColor> if <fillNewAreas> is set.
//
- static void resize (QPixmap *destPixmapPtr, int w, int h,
+ static void resize (TQPixmap *destPixmapPtr, int w, int h,
const kpColor &backgroundColor, bool fillNewAreas = true);
- static QPixmap resize (const QPixmap &pm, int w, int h,
+ static TQPixmap resize (const TQPixmap &pm, int w, int h,
const kpColor &backgroundColor, bool fillNewAreas = true);
//
// Scales an image to the given width and height.
// If <pretty> is true, a smooth scale will be used.
//
- static void scale (QPixmap *destPixmapPtr, int w, int h, bool pretty = false);
- static QPixmap scale (const QPixmap &pm, int w, int h, bool pretty = false);
+ static void scale (TQPixmap *destPixmapPtr, int w, int h, bool pretty = false);
+ static TQPixmap scale (const TQPixmap &pm, int w, int h, bool pretty = false);
// The minimum difference between 2 angles (in degrees) such that they are
@@ -395,13 +395,13 @@ public:
// Using <targetWidth> & <targetHeight> to generate preview pixmaps is
// significantly more efficient than skewing and then scaling yourself.
//
- static QWMatrix skewMatrix (int width, int height, double hangle, double vangle);
- static QWMatrix skewMatrix (const QPixmap &pixmap, double hangle, double vangle);
+ static TQWMatrix skewMatrix (int width, int height, double hangle, double vangle);
+ static TQWMatrix skewMatrix (const TQPixmap &pixmap, double hangle, double vangle);
- static void skew (QPixmap *destPixmapPtr, double hangle, double vangle,
+ static void skew (TQPixmap *destPixmapPtr, double hangle, double vangle,
const kpColor &backgroundColor,
int targetWidth = -1, int targetHeight = -1);
- static QPixmap skew (const QPixmap &pm, double hangle, double vangle,
+ static TQPixmap skew (const TQPixmap &pm, double hangle, double vangle,
const kpColor &backgroundColor,
int targetWidth = -1, int targetHeight = -1);
@@ -416,15 +416,15 @@ public:
// Using <targetWidth> & <targetHeight> to generate preview pixmaps is
// significantly more efficient than rotating and then scaling yourself.
//
- static QWMatrix rotateMatrix (int width, int height, double angle);
- static QWMatrix rotateMatrix (const QPixmap &pixmap, double angle);
+ static TQWMatrix rotateMatrix (int width, int height, double angle);
+ static TQWMatrix rotateMatrix (const TQPixmap &pixmap, double angle);
static bool isLosslessRotation (double angle);
- static void rotate (QPixmap *destPixmapPtr, double angle,
+ static void rotate (TQPixmap *destPixmapPtr, double angle,
const kpColor &backgroundColor,
int targetWidth = -1, int targetHeight = -1);
- static QPixmap rotate (const QPixmap &pm, double angle,
+ static TQPixmap rotate (const TQPixmap &pm, double angle,
const kpColor &backgroundColor,
int targetWidth = -1, int targetHeight = -1);
@@ -432,18 +432,18 @@ public:
//
// Flips an image in the given directions.
//
- static QWMatrix flipMatrix (int width, int height, bool horz, bool vert);
- static QWMatrix flipMatrix (const QPixmap &pixmap, bool horz, bool vert);
+ static TQWMatrix flipMatrix (int width, int height, bool horz, bool vert);
+ static TQWMatrix flipMatrix (const TQPixmap &pixmap, bool horz, bool vert);
// TODO: this kind of overloading is error prone
- // e.g. QPixmap pixmap;
+ // e.g. TQPixmap pixmap;
// kpPixmapFX::flip (pixmap, false, true);
// looks like it will flip vertically but does absolutely nothing!
// (should be &pixmap)
- static void flip (QPixmap *destPixmapPtr, bool horz, bool vert);
- static QPixmap flip (const QPixmap &pm, bool horz, bool vert);
- static void flip (QImage *destImagePtr, bool horz, bool vert);
- static QImage flip (const QImage &img, bool horz, bool vert);
+ static void flip (TQPixmap *destPixmapPtr, bool horz, bool vert);
+ static TQPixmap flip (const TQPixmap &pm, bool horz, bool vert);
+ static void flip (TQImage *destImagePtr, bool horz, bool vert);
+ static TQImage flip (const TQImage &img, bool horz, bool vert);
};