summaryrefslogtreecommitdiffstats
path: root/kolourpaint/pixmapfx
diff options
context:
space:
mode:
Diffstat (limited to 'kolourpaint/pixmapfx')
-rw-r--r--kolourpaint/pixmapfx/kpcoloreffect.cpp10
-rw-r--r--kolourpaint/pixmapfx/kpcoloreffect.h5
-rw-r--r--kolourpaint/pixmapfx/kpeffectbalance.cpp58
-rw-r--r--kolourpaint/pixmapfx/kpeffectbalance.h3
-rw-r--r--kolourpaint/pixmapfx/kpeffectblursharpen.cpp22
-rw-r--r--kolourpaint/pixmapfx/kpeffectblursharpen.h3
-rw-r--r--kolourpaint/pixmapfx/kpeffectemboss.cpp18
-rw-r--r--kolourpaint/pixmapfx/kpeffectemboss.h3
-rw-r--r--kolourpaint/pixmapfx/kpeffectflatten.cpp8
-rw-r--r--kolourpaint/pixmapfx/kpeffectflatten.h3
-rw-r--r--kolourpaint/pixmapfx/kpeffectinvert.cpp20
-rw-r--r--kolourpaint/pixmapfx/kpeffectinvert.h3
-rw-r--r--kolourpaint/pixmapfx/kpeffectreducecolors.cpp20
-rw-r--r--kolourpaint/pixmapfx/kpeffectreducecolors.h5
-rw-r--r--kolourpaint/pixmapfx/kpeffectsdialog.cpp30
-rw-r--r--kolourpaint/pixmapfx/kpeffectsdialog.h3
-rw-r--r--kolourpaint/pixmapfx/kpfloodfill.cpp30
-rw-r--r--kolourpaint/pixmapfx/kppixmapfx.cpp222
-rw-r--r--kolourpaint/pixmapfx/kppixmapfx.h36
19 files changed, 255 insertions, 247 deletions
diff --git a/kolourpaint/pixmapfx/kpcoloreffect.cpp b/kolourpaint/pixmapfx/kpcoloreffect.cpp
index b0e04496..9b8262dd 100644
--- a/kolourpaint/pixmapfx/kpcoloreffect.cpp
+++ b/kolourpaint/pixmapfx/kpcoloreffect.cpp
@@ -80,7 +80,7 @@ void kpColorEffectCommand::execute ()
if (!doc)
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
const TQPixmap oldPixmap = *doc->pixmap (m_actOnSelection);
@@ -107,7 +107,7 @@ void kpColorEffectCommand::unexecute ()
if (!doc)
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
TQPixmap newPixmap;
@@ -133,8 +133,8 @@ void kpColorEffectCommand::unexecute ()
kpColorEffectWidget::kpColorEffectWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name)
- : TQWidget (parent, name),
+ TQWidget *tqparent, const char *name)
+ : TQWidget (tqparent, name),
m_actOnSelection (actOnSelection),
m_mainWindow (mainWindow)
{
@@ -148,7 +148,7 @@ kpColorEffectWidget::~kpColorEffectWidget ()
// public
TQString kpColorEffectWidget::caption () const
{
- return TQString::null;
+ return TQString();
}
diff --git a/kolourpaint/pixmapfx/kpcoloreffect.h b/kolourpaint/pixmapfx/kpcoloreffect.h
index afd60a5e..1286e794 100644
--- a/kolourpaint/pixmapfx/kpcoloreffect.h
+++ b/kolourpaint/pixmapfx/kpcoloreffect.h
@@ -71,14 +71,15 @@ private:
};
-class kpColorEffectWidget : public QWidget
+class kpColorEffectWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
kpColorEffectWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
virtual ~kpColorEffectWidget ();
signals:
diff --git a/kolourpaint/pixmapfx/kpeffectbalance.cpp b/kolourpaint/pixmapfx/kpeffectbalance.cpp
index d4e26a9c..c19c352b 100644
--- a/kolourpaint/pixmapfx/kpeffectbalance.cpp
+++ b/kolourpaint/pixmapfx/kpeffectbalance.cpp
@@ -91,7 +91,7 @@ static inline int contrast (int base, int strength)
static inline int gamma (int base, int strength)
{
- return between0And255 (qRound (255.0 * pow (base / 255.0, 1.0 / pow (10, strength / 50.0))));
+ return between0And255 (tqRound (255.0 * pow (base / 255.0, 1.0 / pow (10, strength / 50.0))));
}
@@ -105,13 +105,13 @@ static inline int brightnessContrastGamma (int base,
newGamma);
}
-static inline QRgb brightnessContrastGammaForRGB (QRgb rgb,
+static inline TQRgb brightnessContrastGammaForRGB (TQRgb rgb,
int channels,
int brightness, int contrast, int gamma)
{
- int red = qRed (rgb);
- int green = qGreen (rgb);
- int blue = qBlue (rgb);
+ int red = tqRed (rgb);
+ int green = tqGreen (rgb);
+ int blue = tqBlue (rgb);
if (channels & kpEffectBalanceCommand::Red)
@@ -122,7 +122,7 @@ static inline QRgb brightnessContrastGammaForRGB (QRgb rgb,
blue = brightnessContrastGamma (blue, brightness, contrast, gamma);
- return qRgba (red, green, blue, qAlpha (rgb));
+ return tqRgba (red, green, blue, tqAlpha (rgb));
}
@@ -147,13 +147,13 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap,
#endif
- Q_UINT8 transformRed [256],
+ TQ_UINT8 transformRed [256],
transformGreen [256],
transformBlue [256];
for (int i = 0; i < 256; i++)
{
- Q_UINT8 applied = (Q_UINT8) brightnessContrastGamma (i, brightness, contrast, gamma);
+ TQ_UINT8 applied = (TQ_UINT8) brightnessContrastGamma (i, brightness, contrast, gamma);
if (channels & kpEffectBalanceCommand::Red)
transformRed [i] = applied;
@@ -182,15 +182,15 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap,
{
for (int x = 0; x < image.width (); x++)
{
- const QRgb rgb = image.pixel (x, y);
+ const TQRgb rgb = image.pixel (x, y);
- const Q_UINT8 red = (Q_UINT8) qRed (rgb);
- const Q_UINT8 green = (Q_UINT8) qGreen (rgb);
- const Q_UINT8 blue = (Q_UINT8) qBlue (rgb);
- const Q_UINT8 alpha = (Q_UINT8) qAlpha (rgb);
+ const TQ_UINT8 red = (TQ_UINT8) tqRed (rgb);
+ const TQ_UINT8 green = (TQ_UINT8) tqGreen (rgb);
+ const TQ_UINT8 blue = (TQ_UINT8) tqBlue (rgb);
+ const TQ_UINT8 alpha = (TQ_UINT8) tqAlpha (rgb);
image.setPixel (x, y,
- qRgba (transformRed [red],
+ tqRgba (transformRed [red],
transformGreen [green],
transformBlue [blue],
alpha));
@@ -208,15 +208,15 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap,
{
for (int i = 0; i < image.numColors (); i++)
{
- const QRgb rgb = image.color (i);
+ const TQRgb rgb = image.color (i);
- const Q_UINT8 red = (Q_UINT8) qRed (rgb);
- const Q_UINT8 green = (Q_UINT8) qGreen (rgb);
- const Q_UINT8 blue = (Q_UINT8) qBlue (rgb);
- const Q_UINT8 alpha = (Q_UINT8) qAlpha (rgb);
+ const TQ_UINT8 red = (TQ_UINT8) tqRed (rgb);
+ const TQ_UINT8 green = (TQ_UINT8) tqGreen (rgb);
+ const TQ_UINT8 blue = (TQ_UINT8) tqBlue (rgb);
+ const TQ_UINT8 alpha = (TQ_UINT8) tqAlpha (rgb);
image.setColor (i,
- qRgba (transformRed [red],
+ tqRgba (transformRed [red],
transformGreen [green],
transformBlue [blue],
alpha));
@@ -253,8 +253,8 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap)
kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name)
- : kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
+ TQWidget *tqparent, const char *name)
+ : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name)
{
TQGridLayout *lay = new TQGridLayout (this, 5, 5, marginHint (), spacingHint ());
@@ -275,9 +275,9 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection,
// TODO: This is what should be shown in the m_gammaInput spinbox
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.
+ // whole tqlayout moves when we drag the gamma slider.
m_gammaLabel->setMinimumWidth (m_gammaLabel->fontMetrics ().width (" 10.00 "));
- m_gammaLabel->setAlignment (m_gammaLabel->alignment () | Qt::AlignRight);
+ m_gammaLabel->tqsetAlignment (m_gammaLabel->tqalignment () | TQt::AlignRight);
TQPushButton *gammaResetPushButton = new TQPushButton (i18n ("Rese&t"), this);
@@ -317,11 +317,11 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection,
lay->addWidget (gammaResetPushButton, 2, 4);
lay->addMultiCellWidget (spaceWidget, 3, 3, 0, 4);
- lay->addMultiCellWidget (resetPushButton, 4, 4, 2, 4, Qt::AlignRight);
+ lay->addMultiCellWidget (resetPushButton, 4, 4, 2, 4, TQt::AlignRight);
lay->addWidget (channelLabel, 4, 0);
- lay->addWidget (m_channelsComboBox, 4, 1, Qt::AlignLeft);
- //lay->addWidget (resetPushButton, 4, 2, Qt::AlignRight);
+ lay->addWidget (m_channelsComboBox, 4, 1, TQt::AlignLeft);
+ //lay->addWidget (resetPushButton, 4, 2, TQt::AlignRight);
lay->setColStretch (1, 1);
@@ -438,7 +438,7 @@ void kpEffectBalanceWidget::recalculateGammaLabel ()
'f'/*[-]9.9*/,
2/*precision*/) +
" ");
- m_gammaLabel->repaint ();
+ m_gammaLabel->tqrepaint ();
}
@@ -499,7 +499,7 @@ void kpEffectBalanceWidget::resetAll ()
return;
// Prevent multiple settingsChanged() which would normally result in
- // redundant, expensive preview repaints
+ // redundant, expensive preview tqrepaints
blockSignals (true);
resetBrightness ();
diff --git a/kolourpaint/pixmapfx/kpeffectbalance.h b/kolourpaint/pixmapfx/kpeffectbalance.h
index e80bb7a6..f44004a2 100644
--- a/kolourpaint/pixmapfx/kpeffectbalance.h
+++ b/kolourpaint/pixmapfx/kpeffectbalance.h
@@ -74,11 +74,12 @@ protected:
class kpEffectBalanceWidget : public kpColorEffectWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
kpEffectBalanceWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
virtual ~kpEffectBalanceWidget ();
virtual TQString caption () const;
diff --git a/kolourpaint/pixmapfx/kpeffectblursharpen.cpp b/kolourpaint/pixmapfx/kpeffectblursharpen.cpp
index 9986df4f..145ed78c 100644
--- a/kolourpaint/pixmapfx/kpeffectblursharpen.cpp
+++ b/kolourpaint/pixmapfx/kpeffectblursharpen.cpp
@@ -52,7 +52,7 @@ static TQString nameForType (kpEffectBlurSharpenCommand::Type type)
else if (type == kpEffectBlurSharpenCommand::Sharpen)
return i18n ("Sharpen");
else
- return TQString::null;
+ return TQString();
}
@@ -88,10 +88,10 @@ TQPixmap kpEffectBlurSharpenCommand::apply (const TQPixmap &pixmap,
<< endl;
#endif
- // (KImageEffect::(blur|sharpen)() ignores mask)
+ // (KImageEffect::(blur|sharpen)() ignores tqmask)
TQPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels (
pixmap,
- Qt::white/*arbitrarily chosen*/);
+ TQt::white/*arbitrarily chosen*/);
TQImage image = kpPixmapFX::convertToImage (usePixmap);
@@ -107,9 +107,9 @@ TQPixmap kpEffectBlurSharpenCommand::apply (const TQPixmap &pixmap,
TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
- // KImageEffect::(blur|sharpen)() nukes mask - restore it
- if (usePixmap.mask ())
- retPixmap.setMask (*usePixmap.mask ());
+ // KImageEffect::(blur|sharpen)() nukes tqmask - restore it
+ if (usePixmap.tqmask ())
+ retPixmap.setMask (*usePixmap.tqmask ());
return retPixmap;
@@ -125,8 +125,8 @@ TQPixmap kpEffectBlurSharpenCommand::applyColorEffect (const TQPixmap &pixmap)
kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name)
- : kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
+ TQWidget *tqparent, const char *name)
+ : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name)
{
TQGridLayout *lay = new TQGridLayout (this, 4, 2, marginHint (), spacingHint ());
@@ -144,7 +144,7 @@ kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection,
lay->addWidget (amountLabel, 0, 0);
lay->addWidget (m_amountInput, 0, 1);
- lay->addMultiCellWidget (m_typeLabel, 1, 1, 0, 1, Qt::AlignCenter);
+ lay->addMultiCellWidget (m_typeLabel, 1, 1, 0, 1, TQt::AlignCenter);
lay->setColStretch (1, 1);
@@ -164,7 +164,7 @@ kpEffectBlurSharpenWidget::~kpEffectBlurSharpenWidget ()
// public virtual [base kpColorEffectWidget]
TQString kpEffectBlurSharpenWidget::caption () const
{
- return TQString::null;
+ return TQString();
}
@@ -281,7 +281,7 @@ int kpEffectBlurSharpenWidget::repeat () const
const double SharpenMin = 1;
const double SharpenMax = 2;
- return qRound (SharpenMin +
+ return tqRound (SharpenMin +
(m_amountInput->value () - 1) *
(SharpenMax - SharpenMin) /
(m_amountInput->maxValue () - 1));
diff --git a/kolourpaint/pixmapfx/kpeffectblursharpen.h b/kolourpaint/pixmapfx/kpeffectblursharpen.h
index 54b9c993..e4db5f86 100644
--- a/kolourpaint/pixmapfx/kpeffectblursharpen.h
+++ b/kolourpaint/pixmapfx/kpeffectblursharpen.h
@@ -74,11 +74,12 @@ protected:
class kpEffectBlurSharpenWidget : public kpColorEffectWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
kpEffectBlurSharpenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
virtual ~kpEffectBlurSharpenWidget ();
virtual TQString caption () const;
diff --git a/kolourpaint/pixmapfx/kpeffectemboss.cpp b/kolourpaint/pixmapfx/kpeffectemboss.cpp
index f58f248a..647794db 100644
--- a/kolourpaint/pixmapfx/kpeffectemboss.cpp
+++ b/kolourpaint/pixmapfx/kpeffectemboss.cpp
@@ -75,10 +75,10 @@ TQPixmap kpEffectEmbossCommand::apply (const TQPixmap &pixmap,
<< endl;
#endif
- // (KImageEffect::emboss() ignores mask)
+ // (KImageEffect::emboss() ignores tqmask)
TQPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels (
pixmap,
- Qt::white/*arbitrarily chosen*/);
+ TQt::white/*arbitrarily chosen*/);
TQImage image = kpPixmapFX::convertToImage (usePixmap);
@@ -91,9 +91,9 @@ TQPixmap kpEffectEmbossCommand::apply (const TQPixmap &pixmap,
TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
- // KImageEffect::emboss() nukes mask - restore it
- if (usePixmap.mask ())
- retPixmap.setMask (*usePixmap.mask ());
+ // KImageEffect::emboss() nukes tqmask - restore it
+ if (usePixmap.tqmask ())
+ retPixmap.setMask (*usePixmap.tqmask ());
return retPixmap;
@@ -109,8 +109,8 @@ TQPixmap kpEffectEmbossCommand::applyColorEffect (const TQPixmap &pixmap)
kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name)
- : kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
+ TQWidget *tqparent, const char *name)
+ : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name)
{
TQGridLayout *lay = new TQGridLayout (this, 4, 2, marginHint (), spacingHint ());
@@ -138,7 +138,7 @@ kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection,
m_enableCheckBox = new TQCheckBox (i18n ("E&nable"), this);
- lay->addMultiCellWidget (m_enableCheckBox, 0, 0, 0, 1, Qt::AlignCenter);
+ lay->addMultiCellWidget (m_enableCheckBox, 0, 0, 0, 1, TQt::AlignCenter);
// (settingsChangedDelayed() instead of settingsChanged() so that the
@@ -156,7 +156,7 @@ kpEffectEmbossWidget::~kpEffectEmbossWidget ()
// public virtual [base kpColorEffectWidget]
TQString kpEffectEmbossWidget::caption () const
{
- return TQString::null;
+ return TQString();
}
diff --git a/kolourpaint/pixmapfx/kpeffectemboss.h b/kolourpaint/pixmapfx/kpeffectemboss.h
index b77f69e7..215a3cfa 100644
--- a/kolourpaint/pixmapfx/kpeffectemboss.h
+++ b/kolourpaint/pixmapfx/kpeffectemboss.h
@@ -66,11 +66,12 @@ protected:
class kpEffectEmbossWidget : public kpColorEffectWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
kpEffectEmbossWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
virtual ~kpEffectEmbossWidget ();
virtual TQString caption () const;
diff --git a/kolourpaint/pixmapfx/kpeffectflatten.cpp b/kolourpaint/pixmapfx/kpeffectflatten.cpp
index b8dee16c..4357e086 100644
--- a/kolourpaint/pixmapfx/kpeffectflatten.cpp
+++ b/kolourpaint/pixmapfx/kpeffectflatten.cpp
@@ -131,9 +131,9 @@ TQColor kpEffectFlattenWidget::s_lastColor2;
kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
+ : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name)
{
if (!s_lastColor1.isValid () || !s_lastColor2.isValid ())
{
@@ -142,11 +142,11 @@ kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection,
s_lastColor1 = cfg->readColorEntry (kpSettingFlattenEffectColor1);
if (!s_lastColor1.isValid ())
- s_lastColor1 = Qt::red;
+ s_lastColor1 = TQt::red;
s_lastColor2 = cfg->readColorEntry (kpSettingFlattenEffectColor2);
if (!s_lastColor2.isValid ())
- s_lastColor2 = Qt::blue;
+ s_lastColor2 = TQt::blue;
}
diff --git a/kolourpaint/pixmapfx/kpeffectflatten.h b/kolourpaint/pixmapfx/kpeffectflatten.h
index a4f06af9..4bdf34d4 100644
--- a/kolourpaint/pixmapfx/kpeffectflatten.h
+++ b/kolourpaint/pixmapfx/kpeffectflatten.h
@@ -76,11 +76,12 @@ protected:
class kpEffectFlattenWidget : public kpColorEffectWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
kpEffectFlattenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
virtual ~kpEffectFlattenWidget ();
diff --git a/kolourpaint/pixmapfx/kpeffectinvert.cpp b/kolourpaint/pixmapfx/kpeffectinvert.cpp
index 67c1d6d0..aaf2c5d7 100644
--- a/kolourpaint/pixmapfx/kpeffectinvert.cpp
+++ b/kolourpaint/pixmapfx/kpeffectinvert.cpp
@@ -86,30 +86,30 @@ TQPixmap kpEffectInvertCommand::apply (const TQPixmap &pm, int channels)
// public static
void kpEffectInvertCommand::apply (TQImage *destImagePtr, int channels)
{
- QRgb mask = qRgba ((channels & Red) ? 0xFF : 0,
+ TQRgb tqmask = tqRgba ((channels & Red) ? 0xFF : 0,
(channels & Green) ? 0xFF : 0,
(channels & Blue) ? 0xFF : 0,
0/*don't invert alpha*/);
#if DEBUG_KP_EFFECT_INVERT
kdDebug () << "kpEffectInvertCommand::apply(channels=" << channels
- << ") mask=" << (int *) mask
+ << ") tqmask=" << (int *) tqmask
<< endl;
#endif
if (destImagePtr->depth () > 8)
{
#if 0
- // SYNC: TODO: Qt BUG - invertAlpha argument is inverted!!!
- destImagePtr->invertPixels (true/*no invert alpha (Qt 3.2)*/);
+ // SYNC: TODO: TQt BUG - invertAlpha argument is inverted!!!
+ destImagePtr->invertPixels (true/*no invert alpha (TQt 3.2)*/);
#else
- // Above version works for Qt 3.2 at least.
+ // Above version works for TQt 3.2 at least.
// But this version will always work (slower, though) and supports
// inverting particular channels.
for (int y = 0; y < destImagePtr->height (); y++)
{
for (int x = 0; x < destImagePtr->width (); x++)
{
- destImagePtr->setPixel (x, y, destImagePtr->pixel (x, y) ^ mask);
+ destImagePtr->setPixel (x, y, destImagePtr->pixel (x, y) ^ tqmask);
}
}
#endif
@@ -118,7 +118,7 @@ void kpEffectInvertCommand::apply (TQImage *destImagePtr, int channels)
{
for (int i = 0; i < destImagePtr->numColors (); i++)
{
- destImagePtr->setColor (i, destImagePtr->color (i) ^ mask);
+ destImagePtr->setColor (i, destImagePtr->color (i) ^ tqmask);
}
}
}
@@ -149,15 +149,15 @@ TQPixmap kpEffectInvertCommand::applyColorEffect (const TQPixmap &pixmap)
kpEffectInvertWidget::kpEffectInvertWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
+ : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name)
{
TQVBoxLayout *topLevelLay = new TQVBoxLayout (this, marginHint (), spacingHint ());
TQWidget *centerWidget = new TQWidget (this);
- topLevelLay->addWidget (centerWidget, 0/*stretch*/, Qt::AlignCenter);
+ topLevelLay->addWidget (centerWidget, 0/*stretch*/, TQt::AlignCenter);
TQVBoxLayout *centerWidgetLay = new TQVBoxLayout (centerWidget,
diff --git a/kolourpaint/pixmapfx/kpeffectinvert.h b/kolourpaint/pixmapfx/kpeffectinvert.h
index a63237df..67277ac3 100644
--- a/kolourpaint/pixmapfx/kpeffectinvert.h
+++ b/kolourpaint/pixmapfx/kpeffectinvert.h
@@ -91,11 +91,12 @@ protected:
class kpEffectInvertWidget : public kpColorEffectWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
kpEffectInvertWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
virtual ~kpEffectInvertWidget ();
diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
index 44fd7ea7..80fadd8d 100644
--- a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
+++ b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
@@ -73,7 +73,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither)
#endif
- // Hack around Qt's braindead TQImage::convertDepth(1, ...) (with
+ // Hack around TQt'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
@@ -84,7 +84,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither)
#if DEBUG_KP_EFFECT_REDUCE_COLORS
kdDebug () << "\tinvoking convert-to-depth 1 hack" << endl;
#endif
- QRgb color0, color1;
+ TQRgb color0, color1;
bool color0Valid = false, color1Valid = false;
bool moreThan2Colors = false;
@@ -101,7 +101,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither)
{
for (int x = 0; x < image.width (); x++)
{
- QRgb imagePixel = image.pixel (x, y);
+ TQRgb imagePixel = image.pixel (x, y);
if (color0Valid && imagePixel == color0)
monoImage.setPixel (x, y, 0);
@@ -211,7 +211,7 @@ TQString kpEffectReduceColorsCommand::commandName (int depth, int dither) const
}
else
{
- return TQString::null;
+ return TQString();
}
}
@@ -240,12 +240,12 @@ void kpEffectReduceColorsCommand::apply (TQPixmap *destPixmapPtr, int depth, boo
// HACK: The above "image.convertDepth()" erases the Alpha Channel
// (at least for monochrome).
- // tqpixmap.html says "alpha masks on monochrome images are ignored."
+ // tqpixmap.html says "alpha tqmasks on monochrome images are ignored."
//
- // Put the mask back.
+ // Put the tqmask back.
//
- if (destPixmapPtr->mask ())
- pixmap.setMask (*destPixmapPtr->mask ());
+ if (destPixmapPtr->tqmask ())
+ pixmap.setMask (*destPixmapPtr->tqmask ());
*destPixmapPtr = pixmap;
}
@@ -276,9 +276,9 @@ TQPixmap kpEffectReduceColorsCommand::applyColorEffect (const TQPixmap &pixmap)
kpEffectReduceColorsWidget::kpEffectReduceColorsWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
+ : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name)
{
TQVBoxLayout *lay = new TQVBoxLayout (this, marginHint (), spacingHint ());
diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.h b/kolourpaint/pixmapfx/kpeffectreducecolors.h
index bf44ef3e..df4c0bc0 100644
--- a/kolourpaint/pixmapfx/kpeffectreducecolors.h
+++ b/kolourpaint/pixmapfx/kpeffectreducecolors.h
@@ -53,7 +53,7 @@ public:
TQString commandName (int depth, int dither) const;
- // (always preserves mask)
+ // (always preserves tqmask)
static void apply (TQPixmap *destPixmapPtr, int depth, bool dither);
static TQPixmap apply (const TQPixmap &pm, int depth, bool dither);
@@ -73,11 +73,12 @@ protected:
class kpEffectReduceColorsWidget : public kpColorEffectWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
kpEffectReduceColorsWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
virtual ~kpEffectReduceColorsWidget ();
diff --git a/kolourpaint/pixmapfx/kpeffectsdialog.cpp b/kolourpaint/pixmapfx/kpeffectsdialog.cpp
index 90dfbd32..80a242c3 100644
--- a/kolourpaint/pixmapfx/kpeffectsdialog.cpp
+++ b/kolourpaint/pixmapfx/kpeffectsdialog.cpp
@@ -59,14 +59,14 @@ int kpEffectsDialog::s_lastHeight = 620;
kpEffectsDialog::kpEffectsDialog (bool actOnSelection,
- kpMainWindow *parent,
+ kpMainWindow *tqparent,
const char *name)
: kpToolPreviewDialog (kpToolPreviewDialog::Preview,
true/*reserve top row*/,
- TQString::null/*caption*/,
- TQString::null/*afterActionText (no Dimensions Group Box)*/,
+ TQString()/*caption*/,
+ TQString()/*afterActionText (no Dimensions Group Box)*/,
actOnSelection,
- parent,
+ tqparent,
name),
m_delayedUpdateTimer (new TQTimer (this)),
m_effectsComboBox (0),
@@ -209,7 +209,7 @@ void kpEffectsDialog::selectEffect (int which)
m_colorEffectWidget = 0;
- m_settingsGroupBox->setCaption (TQString::null);
+ m_settingsGroupBox->setCaption (TQString());
#define CREATE_EFFECT_WIDGET(name) \
m_colorEffectWidget = new name (m_actOnSelection, \
@@ -255,23 +255,23 @@ void kpEffectsDialog::selectEffect (int which)
// Don't resize the preview when showing the widget:
// TODO: actually work
- TQSize previewGroupBoxMinSize = m_previewGroupBox->minimumSize ();
- TQSize previewGroupBoxMaxSize = m_previewGroupBox->maximumSize ();
- TQLayout::ResizeMode previewGroupBoxResizeMode =
- m_previewGroupBox->layout () ?
- m_previewGroupBox->layout ()->resizeMode () :
+ TQSize previewGroupBoxMinSize = m_previewGroupBox->tqminimumSize ();
+ TQSize previewGroupBoxMaxSize = m_previewGroupBox->tqmaximumSize ();
+ TQLayout::ResizeMode previewGroupBoxResizeMode =
+ m_previewGroupBox->tqlayout () ?
+ m_previewGroupBox->tqlayout ()->tqresizeMode () :
TQLayout::Auto;
#if DEBUG_KP_EFFECTS_DIALOG
kdDebug () << "\tpreviewGroupBox: minSize=" << previewGroupBoxMinSize
<< " maxSize=" << previewGroupBoxMaxSize
<< " size=" << m_previewGroupBox->size ()
- << " layout=" << m_previewGroupBox->layout ()
+ << " tqlayout=" << m_previewGroupBox->tqlayout ()
<< " resizeMode=" << previewGroupBoxResizeMode
<< endl;
#endif
- if (m_previewGroupBox->layout ())
- m_previewGroupBox->layout ()->setResizeMode (TQLayout::FreeResize);
+ if (m_previewGroupBox->tqlayout ())
+ m_previewGroupBox->tqlayout ()->setResizeMode (TQLayout::FreeResize);
#if DEBUG_KP_EFFECTS_DIALOG
kdDebug () << "\tafter set resizeMode, previewGroupBox.size="
<< m_previewGroupBox->size () << endl;
@@ -300,8 +300,8 @@ void kpEffectsDialog::selectEffect (int which)
kdDebug () << "\tafter set fixedSize, previewGroupBox.size="
<< m_previewGroupBox->size () << endl;
#endif
- if (m_previewGroupBox->layout ())
- m_previewGroupBox->layout ()->setResizeMode (previewGroupBoxResizeMode);
+ if (m_previewGroupBox->tqlayout ())
+ m_previewGroupBox->tqlayout ()->setResizeMode (previewGroupBoxResizeMode);
#if DEBUG_KP_EFFECTS_DIALOG
kdDebug () << "\tafter restore resizeMode, previewGroupBox.size="
<< m_previewGroupBox->size () << endl;
diff --git a/kolourpaint/pixmapfx/kpeffectsdialog.h b/kolourpaint/pixmapfx/kpeffectsdialog.h
index c0086cbb..ddb3f8c2 100644
--- a/kolourpaint/pixmapfx/kpeffectsdialog.h
+++ b/kolourpaint/pixmapfx/kpeffectsdialog.h
@@ -48,10 +48,11 @@ class kpMainWindow;
class kpEffectsDialog : public kpToolPreviewDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
kpEffectsDialog (bool actOnSelection,
- kpMainWindow *parent,
+ kpMainWindow *tqparent,
const char *name = 0);
virtual ~kpEffectsDialog ();
diff --git a/kolourpaint/pixmapfx/kpfloodfill.cpp b/kolourpaint/pixmapfx/kpfloodfill.cpp
index 55238f2d..76731d23 100644
--- a/kolourpaint/pixmapfx/kpfloodfill.cpp
+++ b/kolourpaint/pixmapfx/kpfloodfill.cpp
@@ -95,22 +95,22 @@ bool kpFloodFill::fill ()
// not trying to do a NOP fill
if (m_boundingRect.isValid ())
{
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
- TQPainter painter, maskPainter;
- TQBitmap maskBitmap;
+ TQPainter painter, tqmaskPainter;
+ TQBitmap tqmaskBitmap;
- if (m_pixmapPtr->mask () || m_color.isTransparent ())
+ if (m_pixmapPtr->tqmask () || m_color.isTransparent ())
{
- maskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr);
- maskPainter.begin (&maskBitmap);
- maskPainter.setPen (m_color.maskColor ());
+ tqmaskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr);
+ tqmaskPainter.begin (&tqmaskBitmap);
+ tqmaskPainter.setPen (m_color.tqmaskColor ());
}
if (m_color.isOpaque ())
{
painter.begin (m_pixmapPtr);
- painter.setPen (m_color.toQColor ());
+ painter.setPen (m_color.toTQColor ());
}
const TQValueList <FillLine>::ConstIterator fillLinesEnd = m_fillLines.end ();
@@ -124,18 +124,18 @@ bool kpFloodFill::fill ()
if (painter.isActive ())
painter.drawLine (p1, p2);
- if (maskPainter.isActive ())
- maskPainter.drawLine (p1, p2);
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.drawLine (p1, p2);
}
if (painter.isActive ())
painter.end ();
- if (maskPainter.isActive ())
- maskPainter.end ();
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.end ();
- if (!maskBitmap.isNull ())
- m_pixmapPtr->setMask (maskBitmap);
+ if (!tqmaskBitmap.isNull ())
+ m_pixmapPtr->setMask (tqmaskBitmap);
TQApplication::restoreOverrideCursor ();
}
@@ -196,7 +196,7 @@ bool kpFloodFill::prepare ()
kdDebug () << "\tperforming NOP check" << endl;
#endif
- // get the color we need to replace
+ // get the color we need to tqreplace
if (m_processedColorSimilarity == 0 && m_color == m_colorToChange)
{
// need to do absolutely nothing (this is a significant optimisation
diff --git a/kolourpaint/pixmapfx/kppixmapfx.cpp b/kolourpaint/pixmapfx/kppixmapfx.cpp
index 5457ef50..1837a22e 100644
--- a/kolourpaint/pixmapfx/kppixmapfx.cpp
+++ b/kolourpaint/pixmapfx/kppixmapfx.cpp
@@ -214,7 +214,7 @@ int kpPixmapFX::pointArraySize (const TQPointArray &points)
//
-// QPixmap/TQImage Conversion Functions
+// TQPixmap/TQImage Conversion Functions
//
// public static
@@ -238,9 +238,9 @@ static bool imageHasAlphaChannel (const TQImage &image)
{
for (int x = 0; x < image.width (); x++)
{
- const QRgb rgb = image.pixel (x, y);
+ const TQRgb rgb = image.pixel (x, y);
- if (qAlpha (rgb) > 0 && qAlpha (rgb) < 255)
+ if (tqAlpha (rgb) > 0 && tqAlpha (rgb) < 255)
return true;
}
}
@@ -250,7 +250,7 @@ static bool imageHasAlphaChannel (const TQImage &image)
static int imageNumColorsUpTo (const TQImage &image, int max)
{
- TQMap <QRgb, bool> rgbMap;
+ TQMap <TQRgb, bool> rgbMap;
if (image.depth () <= 8)
{
@@ -309,7 +309,7 @@ static void convertToPixmapWarnAboutLoss (const TQImage &image,
int screenDepthNeeded = 0;
if (moreColorsThanDisplay)
- screenDepthNeeded = QMIN (24, image.depth ());
+ screenDepthNeeded = TQMIN (24, image.depth ());
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\ttranslucencyShouldBeShown="
@@ -331,14 +331,14 @@ static void convertToPixmapWarnAboutLoss (const TQImage &image,
#endif
- TQApplication::setOverrideCursor (Qt::arrowCursor);
+ TQApplication::setOverrideCursor (TQt::arrowCursor);
if (moreColorsThanDisplay && hasAlphaChannel)
{
KMessageBox::information (wali.m_parent,
wali.m_moreColorsThanDisplayAndHasAlphaChannelMessage
.arg (screenDepthNeeded),
- TQString::null, // or would you prefer "Low Screen Depth and Image Contains Transparency"? :)
+ TQString(), // or would you prefer "Low Screen Depth and Image Contains Transparency"? :)
colorDepthTranslucencyDontAskAgain);
if (!KMessageBox::shouldBeShownContinue (colorDepthTranslucencyDontAskAgain))
@@ -387,18 +387,18 @@ TQPixmap kpPixmapFX::convertToPixmap (const TQImage &image, bool pretty,
if (!pretty)
{
destPixmap.convertFromImage (image,
- Qt::ColorOnly/*always display depth*/ |
- Qt::ThresholdDither/*no dither*/ |
- Qt::ThresholdAlphaDither/*no dither alpha*/|
- Qt::AvoidDither);
+ TQt::ColorOnly/*always display depth*/ |
+ TQt::ThresholdDither/*no dither*/ |
+ TQt::ThresholdAlphaDither/*no dither alpha*/|
+ TQt::AvoidDither);
}
else
{
destPixmap.convertFromImage (image,
- Qt::ColorOnly/*always display depth*/ |
- Qt::DiffuseDither/*hi quality dither*/ |
- Qt::ThresholdAlphaDither/*no dither alpha*/ |
- Qt::PreferDither/*(dither even if <256 colours)*/);
+ TQt::ColorOnly/*always display depth*/ |
+ TQt::DiffuseDither/*hi quality dither*/ |
+ TQt::ThresholdAlphaDither/*no dither alpha*/ |
+ TQt::PreferDither/*(dither even if <256 colours)*/);
}
#if DEBUG_KP_PIXMAP_FX && 1
@@ -449,7 +449,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image,
<< " (AvoidDither | ThresholdDither)" << endl;
#endif
- ditherFlags = (Qt::AvoidDither | Qt::ThresholdDither);
+ ditherFlags = (TQt::AvoidDither | TQt::ThresholdDither);
}
// PRE: image.depth() > screenDepth
// ASSERT: screenDepth < 32
@@ -470,7 +470,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image,
kdDebug () << "\t\tcolors fit on screen - don't dither"
<< " (AvoidDither | ThresholdDither)" << endl;
#endif
- ditherFlags = (Qt::AvoidDither | Qt::ThresholdDither);
+ ditherFlags = (TQt::AvoidDither | TQt::ThresholdDither);
}
else
{
@@ -478,7 +478,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image,
kdDebug () << "\t\tcolors don't fit on screen - dither"
<< " (PreferDither | DiffuseDither)" << endl;
#endif
- ditherFlags = (Qt::PreferDither | Qt::DiffuseDither);
+ ditherFlags = (TQt::PreferDither | TQt::DiffuseDither);
}
}
// PRE: image.depth() > screenDepth &&
@@ -519,7 +519,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image,
kdDebug () << "\t\t\talways dither (PreferDither | DiffuseDither)"
<< endl;
#endif
- ditherFlags = (Qt::PreferDither | Qt::DiffuseDither);
+ ditherFlags = (TQt::PreferDither | TQt::DiffuseDither);
}
else
{
@@ -527,14 +527,14 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image,
kdDebug () << "\t\t\tdon't dither (AvoidDither | ThresholdDither)"
<< endl;
#endif
- ditherFlags = (Qt::AvoidDither | Qt::ThresholdDither);
+ ditherFlags = (TQt::AvoidDither | TQt::ThresholdDither);
}
}
destPixmap.convertFromImage (image,
- Qt::ColorOnly/*always display depth*/ |
- Qt::ThresholdAlphaDither/*no dither alpha*/ |
+ TQt::ColorOnly/*always display depth*/ |
+ TQt::ThresholdAlphaDither/*no dither alpha*/ |
ditherFlags);
#if DEBUG_KP_PIXMAP_FX && 1
@@ -556,7 +556,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image,
TQPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap,
const TQColor &transparentColor)
{
- if (!pixmap.mask ())
+ if (!pixmap.tqmask ())
return pixmap;
TQPixmap retPixmap (pixmap.width (), pixmap.height ());
@@ -566,7 +566,7 @@ TQPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap,
p.drawPixmap (TQPoint (0, 0), pixmap);
p.end ();
- retPixmap.setMask (*pixmap.mask ());
+ retPixmap.setMask (*pixmap.tqmask ());
return retPixmap;
}
@@ -583,7 +583,7 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect)
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "kpPixmapFX::getPixmapAt(pm.hasMask="
- << (pm.mask () ? 1 : 0)
+ << (pm.tqmask () ? 1 : 0)
<< ",rect="
<< rect
<< ")"
@@ -599,7 +599,7 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect)
kdDebug () << "\tret would contain undefined pixels - setting them to transparent" << endl;
#endif
TQBitmap transparentMask (rect.width (), rect.height ());
- transparentMask.fill (Qt::color0/*transparent*/);
+ transparentMask.fill (TQt::color0/*transparent*/);
retPixmap.setMask (transparentMask);
}
@@ -614,14 +614,14 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect)
const TQPoint destTopLeft = validSrcRect.topLeft () - rect.topLeft ();
- // copy data _and_ mask (if avail)
+ // copy data _and_ tqmask (if avail)
copyBlt (&retPixmap, /* dest */
destTopLeft.x (), destTopLeft.y (), /* dest pt */
&pm, /* src */
validSrcRect.x (), validSrcRect.y (), /* src pt */
validSrcRect.width (), validSrcRect.height ());
- if (wouldHaveUndefinedPixels && retPixmap.mask () && !pm.mask ())
+ if (wouldHaveUndefinedPixels && retPixmap.tqmask () && !pm.tqmask ())
{
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "\tensure opaque in valid region" << endl;
@@ -633,7 +633,7 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect)
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "\tretPixmap.hasMask="
- << (retPixmap.mask () ? 1 : 0)
+ << (retPixmap.tqmask () ? 1 : 0)
<< endl;
#endif
@@ -652,19 +652,19 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
kdDebug () << "kpPixmapFX::setPixmapAt(destPixmap->rect="
<< destPixmapPtr->rect ()
<< ",destPixmap->hasMask="
- << (destPixmapPtr->mask () ? 1 : 0)
+ << (destPixmapPtr->tqmask () ? 1 : 0)
<< ",destRect="
<< destRect
<< ",srcPixmap.rect="
<< srcPixmap.rect ()
<< ",srcPixmap.hasMask="
- << (srcPixmap.mask () ? 1 : 0)
+ << (srcPixmap.tqmask () ? 1 : 0)
<< ")"
<< endl;
#endif
#if DEBUG_KP_PIXMAP_FX && 0
- if (destPixmapPtr->mask ())
+ if (destPixmapPtr->tqmask ())
{
TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
int numTrans = 0;
@@ -673,7 +673,7 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
{
for (int x = 0; x < image.width (); x++)
{
- if (qAlpha (image.pixel (x, y)) == 0)
+ if (tqAlpha (image.pixel (x, y)) == 0)
numTrans++;
}
}
@@ -685,38 +685,38 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
#if 0
// TODO: why does undo'ing a single pen dot on a transparent pixel,
// result in a opaque image, except for that single transparent pixel???
- // Qt bug on boundary case?
+ // TQt bug on boundary case?
- // copy data _and_ mask
+ // copy data _and_ tqmask
copyBlt (destPixmapPtr,
destAt.x (), destAt.y (),
&srcPixmap,
0, 0,
destRect.width (), destRect.height ());
#else
- bitBlt (destPixmapPtr,
+ bitBlt (TQT_TQPAINTDEVICE(destPixmapPtr),
destRect.x (), destRect.y (),
- &srcPixmap,
+ TQT_TQPAINTDEVICE(const_cast<TQPixmap*>(&srcPixmap)),
0, 0,
destRect.width (), destRect.height (),
- Qt::CopyROP,
- true/*ignore mask*/);
+ TQt::CopyROP,
+ true/*ignore tqmask*/);
- if (srcPixmap.mask ())
+ if (srcPixmap.tqmask ())
{
- TQBitmap mask = getNonNullMask (*destPixmapPtr);
- bitBlt (&mask,
+ TQBitmap tqmask = getNonNullMask (*destPixmapPtr);
+ bitBlt (TQT_TQPAINTDEVICE(&tqmask),
destRect.x (), destRect.y (),
- srcPixmap.mask (),
+ TQT_TQPAINTDEVICE(const_cast<TQBitmap*>(srcPixmap.tqmask ())),
0, 0,
destRect.width (), destRect.height (),
- Qt::CopyROP,
- true/*ignore mask*/);
- destPixmapPtr->setMask (mask);
+ TQt::CopyROP,
+ true/*ignore tqmask*/);
+ destPixmapPtr->setMask (tqmask);
}
#endif
- if (destPixmapPtr->mask () && !srcPixmap.mask ())
+ if (destPixmapPtr->tqmask () && !srcPixmap.tqmask ())
{
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "\t\topaque'ing dest rect" << endl;
@@ -726,9 +726,9 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "\tdestPixmap->hasMask="
- << (destPixmapPtr->mask () ? 1 : 0)
+ << (destPixmapPtr->tqmask () ? 1 : 0)
<< endl;
- if (destPixmapPtr->mask ())
+ if (destPixmapPtr->tqmask ())
{
TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
int numTrans = 0;
@@ -737,7 +737,7 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
{
for (int x = 0; x < image.width (); x++)
{
- if (qAlpha (image.pixel (x, y)) == 0)
+ if (tqAlpha (image.pixel (x, y)) == 0)
numTrans++;
}
}
@@ -772,7 +772,7 @@ void kpPixmapFX::paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
if (!destPixmapPtr)
return;
- // Copy src (masked by src's mask) on top of dest.
+ // Copy src (tqmasked by src's tqmask) on top of dest.
bitBlt (destPixmapPtr, /* dest */
destAt.x (), destAt.y (), /* dest pt */
&srcPixmap, /* src */
@@ -825,7 +825,7 @@ kpColor kpPixmapFX::getColorAtPixel (const TQImage &img, const TQPoint &at)
if (!img.valid (at.x (), at.y ()))
return kpColor::invalid;
- QRgb rgba = img.pixel (at.x (), at.y ());
+ TQRgb rgba = img.pixel (at.x (), at.y ());
return kpColor (rgba);
}
@@ -852,14 +852,14 @@ void kpPixmapFX::ensureNoAlphaChannel (TQPixmap *destPixmapPtr)
// public static
TQBitmap kpPixmapFX::getNonNullMask (const TQPixmap &pm)
{
- if (pm.mask ())
- return *pm.mask ();
+ if (pm.tqmask ())
+ return *pm.tqmask ();
else
{
- TQBitmap maskBitmap (pm.width (), pm.height ());
- maskBitmap.fill (Qt::color1/*opaque*/);
+ TQBitmap tqmaskBitmap (pm.width (), pm.height ());
+ tqmaskBitmap.fill (TQt::color1/*opaque*/);
- return maskBitmap;
+ return tqmaskBitmap;
}
}
@@ -870,18 +870,18 @@ void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &des
if (!destPixmapPtr)
return;
- TQBitmap maskBitmap = getNonNullMask (*destPixmapPtr);
+ TQBitmap tqmaskBitmap = getNonNullMask (*destPixmapPtr);
- TQPainter p (&maskBitmap);
+ TQPainter p (&tqmaskBitmap);
- p.setPen (Qt::color0/*transparent*/);
- p.setBrush (Qt::color0/*transparent*/);
+ p.setPen (TQt::color0/*transparent*/);
+ p.setBrush (TQt::color0/*transparent*/);
p.drawRect (destRect);
p.end ();
- destPixmapPtr->setMask (maskBitmap);
+ destPixmapPtr->setMask (tqmaskBitmap);
}
@@ -916,7 +916,7 @@ void kpPixmapFX::paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, const T
&brushBitmap,
0, 0,
brushBitmap.width (), brushBitmap.height (),
- Qt::NotAndROP);
+ TQt::NotAndROP);
destPixmapPtr->setMask (destMaskBitmap);
}
@@ -934,46 +934,46 @@ void kpPixmapFX::paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, int des
// public static
void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect)
{
- if (!destPixmapPtr || !destPixmapPtr->mask ()/*already opaque*/)
+ if (!destPixmapPtr || !destPixmapPtr->tqmask ()/*already opaque*/)
return;
- TQBitmap maskBitmap = *destPixmapPtr->mask ();
+ TQBitmap tqmaskBitmap = *destPixmapPtr->tqmask ();
- TQPainter p (&maskBitmap);
+ TQPainter p (&tqmaskBitmap);
- p.setPen (Qt::color1/*opaque*/);
- p.setBrush (Qt::color1/*opaque*/);
+ p.setPen (TQt::color1/*opaque*/);
+ p.setBrush (TQt::color1/*opaque*/);
p.drawRect (destRect);
p.end ();
- destPixmapPtr->setMask (maskBitmap);
+ destPixmapPtr->setMask (tqmaskBitmap);
}
// public static
void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
const TQPixmap &srcPixmap)
{
- if (!destPixmapPtr || !destPixmapPtr->mask ()/*already opaque*/)
+ if (!destPixmapPtr || !destPixmapPtr->tqmask ()/*already opaque*/)
return;
- TQBitmap destMask = *destPixmapPtr->mask ();
+ TQBitmap destMask = *destPixmapPtr->tqmask ();
- if (srcPixmap.mask ())
+ if (srcPixmap.tqmask ())
{
bitBlt (&destMask, /* dest */
destAt, /* dest pt */
- srcPixmap.mask (), /* src */
+ srcPixmap.tqmask (), /* src */
TQRect (0, 0, srcPixmap.width (), srcPixmap.height ()), /* src rect */
- Qt::OrROP/*if either is opaque, it's opaque*/);
+ TQt::OrROP/*if either is opaque, it's opaque*/);
}
else
{
TQPainter p (&destMask);
- p.setPen (Qt::color1/*opaque*/);
- p.setBrush (Qt::color1/*opaque*/);
+ p.setPen (TQt::color1/*opaque*/);
+ p.setBrush (TQt::color1/*opaque*/);
p.drawRect (destAt.x (), destAt.y (),
srcPixmap.width (), srcPixmap.height ());
@@ -1012,16 +1012,16 @@ TQPixmap kpPixmapFX::convertToGrayscale (const TQPixmap &pm)
return kpPixmapFX::convertToPixmap (image);
}
-static QRgb toGray (QRgb rgb)
+static TQRgb toGray (TQRgb rgb)
{
// naive way that doesn't preserve brightness
- // int gray = (qRed (rgb) + qGreen (rgb) + qBlue (rgb)) / 3;
+ // int gray = (tqRed (rgb) + tqGreen (rgb) + tqBlue (rgb)) / 3;
// over-exaggerates red & blue
- // int gray = qGray (rgb);
+ // int gray = tqGray (rgb);
- int gray = (212671 * qRed (rgb) + 715160 * qGreen (rgb) + 72169 * qBlue (rgb)) / 1000000;
- return qRgba (gray, gray, gray, qAlpha (rgb));
+ int gray = (212671 * tqRed (rgb) + 715160 * tqGreen (rgb) + 72169 * tqBlue (rgb)) / 1000000;
+ return tqRgba (gray, gray, gray, tqAlpha (rgb));
}
// public static
@@ -1064,8 +1064,8 @@ void kpPixmapFX::fill (TQPixmap *destPixmapPtr, const kpColor &color)
if (color.isOpaque ())
{
- destPixmapPtr->setMask (TQBitmap ()); // no mask = opaque
- destPixmapPtr->fill (color.toQColor ());
+ destPixmapPtr->setMask (TQBitmap ()); // no tqmask = opaque
+ destPixmapPtr->fill (color.toTQColor ());
}
else
{
@@ -1107,22 +1107,22 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tfilling in new areas" << endl;
#endif
- TQBitmap maskBitmap;
- TQPainter painter, maskPainter;
+ TQBitmap tqmaskBitmap;
+ TQPainter painter, tqmaskPainter;
if (backgroundColor.isOpaque ())
{
painter.begin (destPixmapPtr);
- painter.setPen (backgroundColor.toQColor ());
- painter.setBrush (backgroundColor.toQColor ());
+ painter.setPen (backgroundColor.toTQColor ());
+ painter.setBrush (backgroundColor.toTQColor ());
}
- if (backgroundColor.isTransparent () || destPixmapPtr->mask ())
+ if (backgroundColor.isTransparent () || destPixmapPtr->tqmask ())
{
- maskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
- maskPainter.begin (&maskBitmap);
- maskPainter.setPen (backgroundColor.maskColor ());
- maskPainter.setBrush (backgroundColor.maskColor ());
+ tqmaskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
+ tqmaskPainter.begin (&tqmaskBitmap);
+ tqmaskPainter.setPen (backgroundColor.tqmaskColor ());
+ tqmaskPainter.setBrush (backgroundColor.tqmaskColor ());
}
#define PAINTER_CALL(cmd) \
@@ -1130,8 +1130,8 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
if (painter.isActive ()) \
painter . cmd ; \
\
- if (maskPainter.isActive ()) \
- maskPainter . cmd ; \
+ if (tqmaskPainter.isActive ()) \
+ tqmaskPainter . cmd ; \
}
if (w > oldWidth)
PAINTER_CALL (drawRect (oldWidth, 0, w - oldWidth, oldHeight));
@@ -1140,14 +1140,14 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
PAINTER_CALL (drawRect (0, oldHeight, w, h - oldHeight));
#undef PAINTER_CALL
- if (maskPainter.isActive ())
- maskPainter.end ();
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.end ();
if (painter.isActive ())
painter.end ();
- if (!maskBitmap.isNull ())
- destPixmapPtr->setMask (maskBitmap);
+ if (!tqmaskBitmap.isNull ())
+ destPixmapPtr->setMask (tqmaskBitmap);
}
}
@@ -1373,12 +1373,12 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,
TQBitmap newBitmapMask;
if (backgroundColor.isOpaque ())
- newPixmap.fill (backgroundColor.toQColor ());
+ newPixmap.fill (backgroundColor.toTQColor ());
- if (backgroundColor.isTransparent () || pm.mask ())
+ if (backgroundColor.isTransparent () || pm.tqmask ())
{
newBitmapMask.resize (newPixmap.width (), newPixmap.height ());
- newBitmapMask.fill (backgroundColor.maskColor ());
+ newBitmapMask.fill (backgroundColor.tqmaskColor ());
}
TQPainter painter (&newPixmap);
@@ -1403,12 +1403,12 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,
painter.setWorldMatrix (transformMatrix);
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "\ttranslate top=" << painter.xForm (TQPoint (0, 0)) << endl;
- kdDebug () << "\tmatrix: m11=" << painter.worldMatrix ().m11 ()
- << " m12=" << painter.worldMatrix ().m12 ()
- << " m21=" << painter.worldMatrix ().m21 ()
- << " m22=" << painter.worldMatrix ().m22 ()
- << " dx=" << painter.worldMatrix ().dx ()
- << " dy=" << painter.worldMatrix ().dy ()
+ kdDebug () << "\tmatrix: m11=" << painter.tqworldMatrix ().m11 ()
+ << " m12=" << painter.tqworldMatrix ().m12 ()
+ << " m21=" << painter.tqworldMatrix ().m21 ()
+ << " m22=" << painter.tqworldMatrix ().m22 ()
+ << " dx=" << painter.tqworldMatrix ().dx ()
+ << " dy=" << painter.tqworldMatrix ().dy ()
<< endl;
#endif
painter.drawPixmap (TQPoint (0, 0), pm);
@@ -1416,10 +1416,10 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,
if (!newBitmapMask.isNull ())
{
- TQPainter maskPainter (&newBitmapMask);
- maskPainter.setWorldMatrix (transformMatrix);
- maskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
- maskPainter.end ();
+ TQPainter tqmaskPainter (&newBitmapMask);
+ tqmaskPainter.setWorldMatrix (transformMatrix);
+ tqmaskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
+ tqmaskPainter.end ();
newPixmap.setMask (newBitmapMask);
}
diff --git a/kolourpaint/pixmapfx/kppixmapfx.h b/kolourpaint/pixmapfx/kppixmapfx.h
index ac52e992..738d82fa 100644
--- a/kolourpaint/pixmapfx/kppixmapfx.h
+++ b/kolourpaint/pixmapfx/kppixmapfx.h
@@ -87,7 +87,7 @@ public:
//
- // QPixmap/TQImage Conversion Functions
+ // TQPixmap/TQImage Conversion Functions
//
//
@@ -100,7 +100,7 @@ public:
// <result> is slightly differently colored to <pixmap>.
//
// KolourPaint needs to convert to TQImage occasionally as
- // TQImage allows KolourPaint to read pixels and because the QImage
+ // TQImage allows KolourPaint to read pixels and because the TQImage
// methods give reliable results and pixel-identical results on
// all platforms. The TQPixmap paint engine has no such guarantee
// and even depends on the quality of the video driver.
@@ -128,7 +128,7 @@ public:
//
// " contains translucency which is not fully"
// " supported. The translucency data will be"
- // " approximated with a 1-bit transparency mask.")
+ // " approximated with a 1-bit transparency tqmask.")
//
// <moreColorsThanDisplayMessage>:
// i18n ("The (image \"example.jpg\"|image from the clipboard)"
@@ -140,21 +140,21 @@ public:
// i18n ("The (image \"example.jpg\"|image from the clipboard)"
// " contains translucency which is not fully"
// " supported. The translucency data will be"
- // " approximated with a 1-bit transparency mask.")
+ // " approximated with a 1-bit transparency tqmask.")
//
// <dontAskAgainPrefix>:
//
// Don'tAskAgain ID for dialog.
//
- // <parent>:
+ // <tqparent>:
//
- // Dialog parent
+ // Dialog tqparent
//
WarnAboutLossInfo (const TQString &moreColorsThanDisplayAndHasAlphaChannelMessage,
const TQString &moreColorsThanDisplayMessage,
const TQString &hasAlphaChannelMessage,
const TQString &dontAskAgainPrefix,
- TQWidget *parent)
+ TQWidget *tqparent)
:
m_moreColorsThanDisplayAndHasAlphaChannelMessage (
moreColorsThanDisplayAndHasAlphaChannelMessage),
@@ -164,7 +164,7 @@ public:
hasAlphaChannelMessage),
m_dontAskAgainPrefix (
dontAskAgainPrefix),
- m_parent (parent),
+ m_parent (tqparent),
m_isValid (true)
{
}
@@ -227,7 +227,7 @@ public:
// 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.
+ // unless the tqmask is lost.
static TQPixmap pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap,
const TQColor &transparentColor);
@@ -238,19 +238,19 @@ public:
//
- // Returns the pixel and mask data found at the <rect> in <pm>.
+ // Returns the pixel and tqmask data found at the <rect> in <pm>.
//
static TQPixmap getPixmapAt (const TQPixmap &pm, const TQRect &rect);
//
- // Sets the pixel and mask data at <destRect> in <*destPixmapPtr>
+ // Sets the pixel and tqmask data at <destRect> in <*destPixmapPtr>
// to <srcPixmap>.
//
static void setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
const TQPixmap &srcPixmap);
//
- // Sets the pixel and mask data at the rectangle in <*destPixmapPtr>,
+ // Sets the pixel and tqmask data at the rectangle in <*destPixmapPtr>,
// with the top-left <destAt> and dimensions <srcPixmap.rect()>,
// to <srcPixmap>.
//
@@ -261,7 +261,7 @@ public:
//
// Draws <srcPixmap> on top of <*destPixmapPtr> at <destAt>.
- // The mask of <*destPixmapPtr> is adjusted so that all opaque
+ // The tqmask of <*destPixmapPtr> is adjusted so that all opaque
// pixels in <srcPixmap> will be opaque in <*destPixmapPtr>.
//
static void paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
@@ -293,16 +293,16 @@ public:
//
// Removes <*destPixmapPtr>'s Alpha Channel and attempts to convert it
- // to a mask. KolourPaint - and TQPixmap to a great extent - does not
- // support Alpha Channels - only masks. Call this whenever you get
+ // to a tqmask. KolourPaint - and TQPixmap to a great extent - does not
+ // support Alpha Channels - only tqmasks. Call this whenever you get
// a pixmap from a foreign source; else all KolourPaint code will
// exhibit "undefined behaviour".
//
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.
+ // Returns <pm>'s tqmask or a fully opaque tqmask (with <pm>'s dimensions)
+ // if <pm> does not have a tqmask.
//
static TQBitmap getNonNullMask (const TQPixmap &pm);
@@ -312,7 +312,7 @@ public:
static void ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &destRect);
//
- // Sets the mask of <*destPixmapPtr> at the rectangle, with the
+ // Sets the tqmask of <*destPixmapPtr> at the rectangle, with the
// top-left <destAt> and dimensions <srcMaskBitmap.rect()>,
// to transparent where <brushBitmap> is opaque.
//