summaryrefslogtreecommitdiffstats
path: root/kolourpaint
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kolourpaint
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kolourpaint')
-rw-r--r--kolourpaint/BUGS6
-rw-r--r--kolourpaint/cursors/kpcursorlightcross.cpp24
-rw-r--r--kolourpaint/kolourpaint.cpp2
-rw-r--r--kolourpaint/kpcolor.cpp52
-rw-r--r--kolourpaint/kpcolor.h16
-rw-r--r--kolourpaint/kpcommandhistory.cpp12
-rw-r--r--kolourpaint/kpcommandhistory.h10
-rw-r--r--kolourpaint/kpdefs.h98
-rw-r--r--kolourpaint/kpdocument.cpp148
-rw-r--r--kolourpaint/kpdocument.h13
-rw-r--r--kolourpaint/kpdocumentmetainfo.cpp10
-rw-r--r--kolourpaint/kpdocumentsaveoptions.cpp38
-rw-r--r--kolourpaint/kpdocumentsaveoptions.h4
-rw-r--r--kolourpaint/kpdocumentsaveoptionswidget.cpp70
-rw-r--r--kolourpaint/kpdocumentsaveoptionswidget.h14
-rw-r--r--kolourpaint/kpmainwindow.cpp34
-rw-r--r--kolourpaint/kpmainwindow.h5
-rw-r--r--kolourpaint/kpmainwindow_edit.cpp88
-rw-r--r--kolourpaint/kpmainwindow_file.cpp80
-rw-r--r--kolourpaint/kpmainwindow_help.cpp8
-rw-r--r--kolourpaint/kpmainwindow_image.cpp42
-rw-r--r--kolourpaint/kpmainwindow_settings.cpp16
-rw-r--r--kolourpaint/kpmainwindow_statusbar.cpp20
-rw-r--r--kolourpaint/kpmainwindow_text.cpp14
-rw-r--r--kolourpaint/kpmainwindow_tools.cpp18
-rw-r--r--kolourpaint/kpmainwindow_view.cpp76
-rw-r--r--kolourpaint/kpselection.cpp140
-rw-r--r--kolourpaint/kpselection.h13
-rw-r--r--kolourpaint/kpselectiondrag.cpp24
-rw-r--r--kolourpaint/kpselectiondrag.h5
-rw-r--r--kolourpaint/kpselectiontransparency.cpp4
-rw-r--r--kolourpaint/kpsinglekeytriggersaction.cpp4
-rw-r--r--kolourpaint/kpsinglekeytriggersaction.h3
-rw-r--r--kolourpaint/kptemppixmap.h2
-rw-r--r--kolourpaint/kpthumbnail.cpp60
-rw-r--r--kolourpaint/kpthumbnail.h5
-rw-r--r--kolourpaint/kptool.cpp126
-rw-r--r--kolourpaint/kptool.h11
-rw-r--r--kolourpaint/kpview.cpp170
-rw-r--r--kolourpaint/kpview.h29
-rw-r--r--kolourpaint/kpviewmanager.cpp16
-rw-r--r--kolourpaint/kpviewmanager.h13
-rw-r--r--kolourpaint/kpviewscrollablecontainer.cpp134
-rw-r--r--kolourpaint/kpviewscrollablecontainer.h16
-rw-r--r--kolourpaint/patches/doc_resize_no_flicker.diff44
-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
-rw-r--r--kolourpaint/tools/kptoolaction.cpp4
-rw-r--r--kolourpaint/tools/kptoolaction.h3
-rw-r--r--kolourpaint/tools/kptoolairspray.cpp28
-rw-r--r--kolourpaint/tools/kptoolairspray.h1
-rw-r--r--kolourpaint/tools/kptoolautocrop.cpp64
-rw-r--r--kolourpaint/tools/kptoolautocrop.h2
-rw-r--r--kolourpaint/tools/kptoolbrush.cpp4
-rw-r--r--kolourpaint/tools/kptoolbrush.h1
-rw-r--r--kolourpaint/tools/kptoolclear.cpp2
-rw-r--r--kolourpaint/tools/kptoolcolorpicker.cpp2
-rw-r--r--kolourpaint/tools/kptoolcolorpicker.h1
-rw-r--r--kolourpaint/tools/kptoolcolorwasher.cpp2
-rw-r--r--kolourpaint/tools/kptoolcolorwasher.h1
-rw-r--r--kolourpaint/tools/kptoolconverttograyscale.cpp2
-rw-r--r--kolourpaint/tools/kptoolcrop.cpp10
-rw-r--r--kolourpaint/tools/kptoolcurve.cpp2
-rw-r--r--kolourpaint/tools/kptoolcurve.h1
-rw-r--r--kolourpaint/tools/kptoolellipse.cpp2
-rw-r--r--kolourpaint/tools/kptoolellipse.h1
-rw-r--r--kolourpaint/tools/kptoolellipticalselection.cpp2
-rw-r--r--kolourpaint/tools/kptooleraser.cpp2
-rw-r--r--kolourpaint/tools/kptooleraser.h3
-rw-r--r--kolourpaint/tools/kptoolflip.cpp8
-rw-r--r--kolourpaint/tools/kptoolflip.h3
-rw-r--r--kolourpaint/tools/kptoolfloodfill.cpp4
-rw-r--r--kolourpaint/tools/kptoolfloodfill.h1
-rw-r--r--kolourpaint/tools/kptoolfreeformselection.cpp2
-rw-r--r--kolourpaint/tools/kptoolline.cpp2
-rw-r--r--kolourpaint/tools/kptoolline.h1
-rw-r--r--kolourpaint/tools/kptoolpen.cpp136
-rw-r--r--kolourpaint/tools/kptoolpen.h5
-rw-r--r--kolourpaint/tools/kptoolpolygon.cpp90
-rw-r--r--kolourpaint/tools/kptoolpolygon.h1
-rw-r--r--kolourpaint/tools/kptoolpolyline.cpp2
-rw-r--r--kolourpaint/tools/kptoolpolyline.h1
-rw-r--r--kolourpaint/tools/kptoolpreviewdialog.cpp30
-rw-r--r--kolourpaint/tools/kptoolpreviewdialog.h5
-rw-r--r--kolourpaint/tools/kptoolrectangle.cpp114
-rw-r--r--kolourpaint/tools/kptoolrectangle.h15
-rw-r--r--kolourpaint/tools/kptoolrectselection.cpp2
-rw-r--r--kolourpaint/tools/kptoolresizescale.cpp52
-rw-r--r--kolourpaint/tools/kptoolresizescale.h1
-rw-r--r--kolourpaint/tools/kptoolrotate.cpp12
-rw-r--r--kolourpaint/tools/kptoolrotate.h3
-rw-r--r--kolourpaint/tools/kptoolroundedrectangle.cpp2
-rw-r--r--kolourpaint/tools/kptoolroundedrectangle.h1
-rw-r--r--kolourpaint/tools/kptoolselection.cpp66
-rw-r--r--kolourpaint/tools/kptoolselection.h2
-rw-r--r--kolourpaint/tools/kptoolskew.cpp8
-rw-r--r--kolourpaint/tools/kptoolskew.h3
-rw-r--r--kolourpaint/tools/kptooltext.cpp46
-rw-r--r--kolourpaint/tools/kptooltext.h1
-rw-r--r--kolourpaint/views/kpthumbnailview.cpp6
-rw-r--r--kolourpaint/views/kpthumbnailview.h5
-rw-r--r--kolourpaint/views/kpunzoomedthumbnailview.cpp16
-rw-r--r--kolourpaint/views/kpunzoomedthumbnailview.h5
-rw-r--r--kolourpaint/views/kpzoomedthumbnailview.cpp8
-rw-r--r--kolourpaint/views/kpzoomedthumbnailview.h5
-rw-r--r--kolourpaint/views/kpzoomedview.cpp4
-rw-r--r--kolourpaint/views/kpzoomedview.h3
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritycube.cpp32
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritycube.h6
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritydialog.cpp8
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritydialog.h3
-rw-r--r--kolourpaint/widgets/kpcolortoolbar.cpp114
-rw-r--r--kolourpaint/widgets/kpcolortoolbar.h26
-rw-r--r--kolourpaint/widgets/kpresizesignallinglabel.cpp10
-rw-r--r--kolourpaint/widgets/kpresizesignallinglabel.h7
-rw-r--r--kolourpaint/widgets/kpsqueezedtextlabel.cpp48
-rw-r--r--kolourpaint/widgets/kpsqueezedtextlabel.h9
-rw-r--r--kolourpaint/widgets/kptooltoolbar.cpp16
-rw-r--r--kolourpaint/widgets/kptooltoolbar.h1
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.cpp36
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.h13
-rw-r--r--kolourpaint/widgets/kptoolwidgetbrush.cpp44
-rw-r--r--kolourpaint/widgets/kptoolwidgetbrush.h5
-rw-r--r--kolourpaint/widgets/kptoolwidgeterasersize.cpp38
-rw-r--r--kolourpaint/widgets/kptoolwidgeterasersize.h3
-rw-r--r--kolourpaint/widgets/kptoolwidgetfillstyle.cpp40
-rw-r--r--kolourpaint/widgets/kptoolwidgetfillstyle.h7
-rw-r--r--kolourpaint/widgets/kptoolwidgetlinewidth.cpp22
-rw-r--r--kolourpaint/widgets/kptoolwidgetlinewidth.h3
-rw-r--r--kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp4
-rw-r--r--kolourpaint/widgets/kptoolwidgetopaqueortransparent.h3
-rw-r--r--kolourpaint/widgets/kptoolwidgetspraycansize.cpp20
-rw-r--r--kolourpaint/widgets/kptoolwidgetspraycansize.h3
150 files changed, 1810 insertions, 1761 deletions
diff --git a/kolourpaint/BUGS b/kolourpaint/BUGS
index 84f3391f..25814d61 100644
--- a/kolourpaint/BUGS
+++ b/kolourpaint/BUGS
@@ -27,8 +27,8 @@ This file lists known bugs in this version that are not considered
manifestations of the current QSpinBox behaviour.
6. a) The undo history and document modified state are not updated during
- the drawing of multi-segment shapes (Polygon, Connected Lines,
- Curve). They are however updated after shapes' completion.
+ the drawing of multi-segment tqshapes (Polygon, Connected Lines,
+ Curve). They are however updated after tqshapes' completion.
b) The text and brush-like tools set the document modified flag even if
user cancels the draw operation.
@@ -37,7 +37,7 @@ This file lists known bugs in this version that are not considered
still marked as modified (because 2 commands - the create selection
and the move - were added but only one was undone).
-7. Certain shapes may have the wrong size (usually only a pixel off and
+7. Certain tqshapes may have the wrong size (usually only a pixel off and
only in extreme cases) e.g. an ellipse of height 1 always has a width 1
pixel less than it should be. This is a Qt bug.
diff --git a/kolourpaint/cursors/kpcursorlightcross.cpp b/kolourpaint/cursors/kpcursorlightcross.cpp
index 34051dbf..dc52f9bd 100644
--- a/kolourpaint/cursors/kpcursorlightcross.cpp
+++ b/kolourpaint/cursors/kpcursorlightcross.cpp
@@ -42,7 +42,7 @@ enum PixelValue
};
static void setPixel (unsigned char *colorBitmap,
- unsigned char *maskBitmap,
+ unsigned char *tqmaskBitmap,
int width,
int y, int x, enum PixelValue pv)
{
@@ -52,32 +52,32 @@ static void setPixel (unsigned char *colorBitmap,
const int MaskOpaque = 1;
const int MaskTransparent = 0;
- int colorValue, maskValue;
+ int colorValue, tqmaskValue;
switch (pv)
{
case White:
colorValue = ColorWhite;
- maskValue = MaskOpaque;
+ tqmaskValue = MaskOpaque;
break;
case Black:
colorValue = ColorBlack;
- maskValue = MaskOpaque;
+ tqmaskValue = MaskOpaque;
break;
case Transparent:
default:
colorValue = ColorWhite;
- maskValue = MaskTransparent;
+ tqmaskValue = MaskTransparent;
break;
}
if (colorValue)
colorBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8));
- if (maskValue)
- maskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8));
+ if (tqmaskValue)
+ tqmaskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8));
}
@@ -90,10 +90,10 @@ const TQCursor *kpMakeCursorLightCross ()
const int side = 24;
const int byteSize = (side * side) / 8;
unsigned char *colorBitmap = new unsigned char [byteSize];
- unsigned char *maskBitmap = new unsigned char [byteSize];
+ unsigned char *tqmaskBitmap = new unsigned char [byteSize];
memset (colorBitmap, 0, byteSize);
- memset (maskBitmap, 0, byteSize);
+ memset (tqmaskBitmap, 0, byteSize);
const int oddSide = side - 1;
const int strokeLen = oddSide * 3 / 8;
@@ -104,7 +104,7 @@ const TQCursor *kpMakeCursorLightCross ()
#define X_(val) (val)
#define Y_(val) (val)
- #define DRAW(y,x) setPixel (colorBitmap, maskBitmap, side, (y), (x), pv)
+ #define DRAW(y,x) setPixel (colorBitmap, tqmaskBitmap, side, (y), (x), pv)
// horizontal
DRAW (Y_(side / 2), X_(1 + i));
DRAW (Y_(side / 2), X_(side - 1 - i));
@@ -118,9 +118,9 @@ const TQCursor *kpMakeCursorLightCross ()
}
TQCursor *cursor = new TQCursor (TQBitmap (side, side, colorBitmap, true/*little endian bit order*/),
- TQBitmap (side, side, maskBitmap, true/*little endian bit order*/));
+ TQBitmap (side, side, tqmaskBitmap, true/*little endian bit order*/));
- delete [] maskBitmap;
+ delete [] tqmaskBitmap;
delete [] colorBitmap;
return cursor;
diff --git a/kolourpaint/kolourpaint.cpp b/kolourpaint/kolourpaint.cpp
index e1b41fc5..37cff567 100644
--- a/kolourpaint/kolourpaint.cpp
+++ b/kolourpaint/kolourpaint.cpp
@@ -191,7 +191,7 @@ int main (int argc, char *argv [])
KImageIO::registerFormats ();
- // Qt says this is necessary but I don't think it is...
+ // TQt says this is necessary but I don't think it is...
TQObject::connect (&app, TQT_SIGNAL (lastWindowClosed ()),
&app, TQT_SLOT (quit ()));
diff --git a/kolourpaint/kpcolor.cpp b/kolourpaint/kpcolor.cpp
index 1c325d39..2efa3c9e 100644
--- a/kolourpaint/kpcolor.cpp
+++ b/kolourpaint/kpcolor.cpp
@@ -66,22 +66,22 @@ kpColor::kpColor (int red, int green, int blue, bool isTransparent)
return;
}
- m_rgba = qRgba (red, green, blue, isTransparent ? 0 : 255/*opaque*/);
+ m_rgba = tqRgba (red, green, blue, isTransparent ? 0 : 255/*opaque*/);
m_rgbaIsValid = true;
}
-kpColor::kpColor (const QRgb &rgba)
+kpColor::kpColor (const TQRgb &rgba)
: m_colorCacheIsValid (false)
{
- if (qAlpha (rgba) > 0 && qAlpha (rgba) < 255)
+ if (tqAlpha (rgba) > 0 && tqAlpha (rgba) < 255)
{
- kdError () << "kpColor::<ctor>(QRgb) passed translucent alpha "
- << qAlpha (rgba)
+ kdError () << "kpColor::<ctor>(TQRgb) passed translucent alpha "
+ << tqAlpha (rgba)
<< " - trying to recover"
<< endl;
// Forget the alpha channel - make it opaque
- m_rgba = qRgb (qRed (m_rgba), qGreen (m_rgba), qBlue (m_rgba));
+ m_rgba = tqRgb (tqRed (m_rgba), tqGreen (m_rgba), tqBlue (m_rgba));
m_rgbaIsValid = true;
}
else
@@ -198,9 +198,9 @@ bool kpColor::isSimilarTo (const kpColor &rhs, int processedSimilarity) const
return false;
else
{
- return (square (qRed (m_rgba) - qRed (rhs.m_rgba)) +
- square (qGreen (m_rgba) - qGreen (rhs.m_rgba)) +
- square (qBlue (m_rgba) - qBlue (rhs.m_rgba))
+ return (square (tqRed (m_rgba) - tqRed (rhs.m_rgba)) +
+ square (tqGreen (m_rgba) - tqGreen (rhs.m_rgba)) +
+ square (tqBlue (m_rgba) - tqBlue (rhs.m_rgba))
<= processedSimilarity);
}
}
@@ -232,7 +232,7 @@ int kpColor::red () const
return 0;
}
- return qRed (m_rgba);
+ return tqRed (m_rgba);
}
// public
@@ -250,7 +250,7 @@ int kpColor::green () const
return 0;
}
- return qGreen (m_rgba);
+ return tqGreen (m_rgba);
}
// public
@@ -268,7 +268,7 @@ int kpColor::blue () const
return 0;
}
- return qBlue (m_rgba);
+ return tqBlue (m_rgba);
}
// public
@@ -280,7 +280,7 @@ int kpColor::alpha () const
return 0;
}
- const int alpha = qAlpha (m_rgba);
+ const int alpha = tqAlpha (m_rgba);
if (alpha > 0 && alpha < 255)
{
@@ -309,11 +309,11 @@ bool kpColor::isOpaque () const
// public
-QRgb kpColor::toQRgb () const
+TQRgb kpColor::toTQRgb () const
{
if (!m_rgbaIsValid)
{
- kdError () << "kpColor::toQRgb() called with invalid kpColor" << endl;
+ kdError () << "kpColor::toTQRgb() called with invalid kpColor" << endl;
return 0;
}
@@ -321,31 +321,31 @@ QRgb kpColor::toQRgb () const
}
// public
-const TQColor &kpColor::toQColor () const
+const TQColor &kpColor::toTQColor () const
{
if (!m_rgbaIsValid)
{
- kdError () << "kpColor::toQColor() called with invalid kpColor" << endl;
- return Qt::black;
+ kdError () << "kpColor::toTQColor() called with invalid kpColor" << endl;
+ return TQt::black;
}
if (m_colorCacheIsValid)
return m_colorCache;
- if (qAlpha (m_rgba) < 255)
+ if (tqAlpha (m_rgba) < 255)
{
- kdError () << "kpColor::toQColor() called with not fully opaque kpColor alpha="
- << qAlpha (m_rgba)
+ kdError () << "kpColor::toTQColor() called with not fully opaque kpColor alpha="
+ << tqAlpha (m_rgba)
<< endl;
- return Qt::black;
+ return TQt::black;
}
m_colorCache = TQColor (m_rgba);
if (!m_colorCache.isValid ())
{
- kdError () << "kpColor::toQColor () internal error - could not return valid TQColor"
+ kdError () << "kpColor::toTQColor () internal error - could not return valid TQColor"
<< endl;
- return Qt::black;
+ return TQt::black;
}
m_colorCacheIsValid = true;
@@ -354,7 +354,7 @@ const TQColor &kpColor::toQColor () const
}
// public
-TQColor kpColor::maskColor () const
+TQColor kpColor::tqmaskColor () const
{
- return isTransparent () ? Qt::color0 : Qt::color1;
+ return isTransparent () ? TQt::color0 : TQt::color1;
}
diff --git a/kolourpaint/kpcolor.h b/kolourpaint/kpcolor.h
index 255d645f..ece77e57 100644
--- a/kolourpaint/kpcolor.h
+++ b/kolourpaint/kpcolor.h
@@ -36,13 +36,13 @@ class TQDataStream;
//
-// kpColor is an object-oriented abstraction of QRgb, with the additional
+// kpColor is an object-oriented abstraction of TQRgb, with the additional
// restriction of following the KolourPaint convention of only supporting
// totally transparent and totally opaque colors. It also provides better
// error handling, reporting (noisy kdError()'s) and recovery.
//
-// In general, you should pass around kpColor objects instead of QRgb
-// and TQColor. Only convert an opaque kpColor to a TQColor (using toQColor())
+// In general, you should pass around kpColor objects instead of TQRgb
+// and TQColor. Only convert an opaque kpColor to a TQColor (using toTQColor())
// if you need to draw something onscreen. Constructing a kpColor object
// from TQColor is probably wrong since onscreen representations of color
// are not guaranteed to be faithful (due to TQColor color allocation).
@@ -52,7 +52,7 @@ class kpColor
public:
kpColor ();
kpColor (int red, int green, int blue, bool isTransparent = false);
- kpColor (const QRgb &rgba);
+ kpColor (const TQRgb &rgba);
kpColor (const kpColor &rhs);
friend TQDataStream &operator<< (TQDataStream &stream, const kpColor &color);
friend TQDataStream &operator>> (TQDataStream &stream, kpColor &color);
@@ -81,17 +81,17 @@ public:
// Cast operators will most likely result in careless conversions so
// use explicit functions instead:
- QRgb toQRgb () const;
+ TQRgb toTQRgb () const;
// (only valid if isOpaque())
// (const TQColor & return results in fewer color reallocations)
- const TQColor &toQColor () const;
+ const TQColor &toTQColor () const;
- TQColor maskColor () const;
+ TQColor tqmaskColor () const;
private:
bool m_rgbaIsValid;
- QRgb m_rgba;
+ TQRgb m_rgba;
mutable bool m_colorCacheIsValid;
mutable TQColor m_colorCache;
diff --git a/kolourpaint/kpcommandhistory.cpp b/kolourpaint/kpcommandhistory.cpp
index 6849ebf4..d92c43e6 100644
--- a/kolourpaint/kpcommandhistory.cpp
+++ b/kolourpaint/kpcommandhistory.cpp
@@ -257,13 +257,13 @@ kpCommandHistoryBase::kpCommandHistoryBase (bool doReadConfig,
: d (new kpCommandHistoryBasePrivate ())
{
m_actionUndo = new KToolBarPopupAction (undoActionText (),
- TQString::fromLatin1 ("undo"),
+ TQString::tqfromLatin1 ("undo"),
KStdAccel::shortcut (KStdAccel::Undo),
this, TQT_SLOT (undo ()),
ac, KStdAction::name (KStdAction::Undo));
m_actionRedo = new KToolBarPopupAction (redoActionText (),
- TQString::fromLatin1 ("redo"),
+ TQString::tqfromLatin1 ("redo"),
KStdAccel::shortcut (KStdAccel::Redo),
this, TQT_SLOT (redo ()),
ac, KStdAction::name (KStdAction::Redo));
@@ -763,7 +763,7 @@ void kpCommandHistoryBase::trimCommandLists ()
-m_documentRestoredPosition > (int) m_undoCommandList.size ())
{
#if DEBUG_KP_COMMAND_HISTORY
- kdDebug () << "\t\t\tinvalidate documentRestoredPosition" << endl;
+ kdDebug () << "\t\t\ttqinvalidate documentRestoredPosition" << endl;
#endif
m_documentRestoredPosition = INT_MAX;
}
@@ -911,7 +911,7 @@ void kpCommandHistory::undo ()
if (m_mainWindow && m_mainWindow->toolHasBegunShape ())
{
#if DEBUG_KP_COMMAND_HISTORY
- kdDebug () << "\thas begun shape - cancel draw" << endl;
+ kdDebug () << "\thas begun tqshape - cancel draw" << endl;
#endif
m_mainWindow->tool ()->cancelShapeInternal ();
}
@@ -927,8 +927,8 @@ void kpCommandHistory::redo ()
// Not completely obvious but what else can we do?
//
// Ignoring the request would not be intuitive for tools like
- // Polygon & Polyline (where it's not always apparent to the user
- // that s/he's still drawing a shape even though the mouse isn't
+ // Polygon & Polyline (where it's not always aptqparent to the user
+ // that s/he's still drawing a tqshape even though the mouse isn't
// down).
m_mainWindow->tool ()->cancelShapeInternal ();
}
diff --git a/kolourpaint/kpcommandhistory.h b/kolourpaint/kpcommandhistory.h
index c29d68fc..da415663 100644
--- a/kolourpaint/kpcommandhistory.h
+++ b/kolourpaint/kpcommandhistory.h
@@ -130,9 +130,10 @@ private:
// Features not required by KolourPaint (e.g. commandExecuted()) are not
// implemented and undo limit == redo limit. So compared to
// KCommandHistory, this is only "almost source compatible".
-class kpCommandHistoryBase : public QObject
+class kpCommandHistoryBase : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
kpCommandHistoryBase (bool doReadConfig, KActionCollection *ac);
@@ -221,16 +222,16 @@ private:
// Intercepts Undo/Redo requests:
//
-// If the user is currently drawing a shape, it cancels it.
+// If the user is currently drawing a tqshape, it cancels it.
// Else it passes on the Undo/Redo request to kpCommandHistoryBase.
//
// TODO: This is wrong. It won't work if the Undo action is disabled,
// for instance.
//
// Maybe the real solution is to call kpCommandHistoryBase::addCommand()
-// as _soon_ as the shape starts - not after it ends. But the
+// as _soon_ as the tqshape starts - not after it ends. But the
// trouble with this solution is that if the user Undoes/cancels
-// the shape s/he's currently drawing, it would replace a Redo
+// the tqshape s/he's currently drawing, it would replace a Redo
// slot in the history. Arguably you shouldn't be able to Redo
// something you never finished drawing.
//
@@ -238,6 +239,7 @@ private:
class kpCommandHistory : public kpCommandHistoryBase
{
Q_OBJECT
+ TQ_OBJECT
public:
kpCommandHistory (bool doReadConfig, kpMainWindow *mainWindow);
diff --git a/kolourpaint/kpdefs.h b/kolourpaint/kpdefs.h
index a437c2d5..c46ccec9 100644
--- a/kolourpaint/kpdefs.h
+++ b/kolourpaint/kpdefs.h
@@ -40,7 +40,7 @@
#include <kdeversion.h>
-#define KP_IS_QT_3_3 (QT_VERSION >= 0x030300 && 1)
+#define KP_IS_TQT_3_3 ([[[TQT_VERSION IS DEPRECATED]]] >= 0x030300 && 1)
#define KP_IS_KDE_3_3 ((KDE_VERSION_MAJOR >= 3 && KDE_VERSION_MINOR >= 3) && 1)
@@ -65,71 +65,71 @@
// Settings
//
-#define kpSettingsGroupGeneral TQString::fromLatin1 ("General Settings")
-#define kpSettingFirstTime TQString::fromLatin1 ("First Time")
-#define kpSettingShowGrid TQString::fromLatin1 ("Show Grid")
-#define kpSettingShowPath TQString::fromLatin1 ("Show Path")
-#define kpSettingColorSimilarity TQString::fromLatin1 ("Color Similarity")
-#define kpSettingDitherOnOpen TQString::fromLatin1 ("Dither on Open if Screen is 15/16bpp and Image Num Colors More Than")
-#define kpSettingPrintImageCenteredOnPage TQString::fromLatin1 ("Print Image Centered On Page")
+#define kpSettingsGroupGeneral TQString::tqfromLatin1 ("General Settings")
+#define kpSettingFirstTime TQString::tqfromLatin1 ("First Time")
+#define kpSettingShowGrid TQString::tqfromLatin1 ("Show Grid")
+#define kpSettingShowPath TQString::tqfromLatin1 ("Show Path")
+#define kpSettingColorSimilarity TQString::tqfromLatin1 ("Color Similarity")
+#define kpSettingDitherOnOpen TQString::tqfromLatin1 ("Dither on Open if Screen is 15/16bpp and Image Num Colors More Than")
+#define kpSettingPrintImageCenteredOnPage TQString::tqfromLatin1 ("Print Image Centered On Page")
-#define kpSettingsGroupFileSaveAs TQString::fromLatin1 ("File/Save As")
-#define kpSettingsGroupFileExport TQString::fromLatin1 ("File/Export")
-#define kpSettingsGroupEditCopyTo TQString::fromLatin1 ("Edit/Copy To")
+#define kpSettingsGroupFileSaveAs TQString::tqfromLatin1 ("File/Save As")
+#define kpSettingsGroupFileExport TQString::tqfromLatin1 ("File/Export")
+#define kpSettingsGroupEditCopyTo TQString::tqfromLatin1 ("Edit/Copy To")
-#define kpSettingForcedMimeType TQString::fromLatin1 ("Forced MimeType")
-#define kpSettingForcedColorDepth TQString::fromLatin1 ("Forced Color Depth")
-#define kpSettingForcedDither TQString::fromLatin1 ("Forced Dither")
-#define kpSettingForcedQuality TQString::fromLatin1 ("Forced Quality")
+#define kpSettingForcedMimeType TQString::tqfromLatin1 ("Forced MimeType")
+#define kpSettingForcedColorDepth TQString::tqfromLatin1 ("Forced Color Depth")
+#define kpSettingForcedDither TQString::tqfromLatin1 ("Forced Dither")
+#define kpSettingForcedQuality TQString::tqfromLatin1 ("Forced Quality")
-#define kpSettingLastDocSize TQString::fromLatin1 ("Last Document Size")
+#define kpSettingLastDocSize TQString::tqfromLatin1 ("Last Document Size")
-#define kpSettingMoreEffectsLastEffect TQString::fromLatin1 ("More Effects - Last Effect")
+#define kpSettingMoreEffectsLastEffect TQString::tqfromLatin1 ("More Effects - Last Effect")
-#define kpSettingResizeScaleLastKeepAspect TQString::fromLatin1 ("Resize Scale - Last Keep Aspect")
+#define kpSettingResizeScaleLastKeepAspect TQString::tqfromLatin1 ("Resize Scale - Last Keep Aspect")
-#define kpSettingsGroupMimeTypeProperties TQString::fromLatin1 ("MimeType Properties Version 1.2-2")
-#define kpSettingMimeTypeMaximumColorDepth TQString::fromLatin1 ("Maximum Color Depth")
-#define kpSettingMimeTypeHasConfigurableColorDepth TQString::fromLatin1 ("Configurable Color Depth")
-#define kpSettingMimeTypeHasConfigurableQuality TQString::fromLatin1 ("Configurable Quality Setting")
+#define kpSettingsGroupMimeTypeProperties TQString::tqfromLatin1 ("MimeType Properties Version 1.2-2")
+#define kpSettingMimeTypeMaximumColorDepth TQString::tqfromLatin1 ("Maximum Color Depth")
+#define kpSettingMimeTypeHasConfigurableColorDepth TQString::tqfromLatin1 ("Configurable Color Depth")
+#define kpSettingMimeTypeHasConfigurableQuality TQString::tqfromLatin1 ("Configurable Quality Setting")
-#define kpSettingsGroupUndoRedo TQString::fromLatin1 ("Undo/Redo Settings")
-#define kpSettingUndoMinLimit TQString::fromLatin1 ("Min Limit")
-#define kpSettingUndoMaxLimit TQString::fromLatin1 ("Max Limit")
-#define kpSettingUndoMaxLimitSizeLimit TQString::fromLatin1 ("Max Limit Size Limit")
+#define kpSettingsGroupUndoRedo TQString::tqfromLatin1 ("Undo/Redo Settings")
+#define kpSettingUndoMinLimit TQString::tqfromLatin1 ("Min Limit")
+#define kpSettingUndoMaxLimit TQString::tqfromLatin1 ("Max Limit")
+#define kpSettingUndoMaxLimitSizeLimit TQString::tqfromLatin1 ("Max Limit Size Limit")
-#define kpSettingsGroupThumbnail TQString::fromLatin1 ("Thumbnail Settings")
-#define kpSettingThumbnailShown TQString::fromLatin1 ("Shown")
-#define kpSettingThumbnailGeometry TQString::fromLatin1 ("Geometry")
-#define kpSettingThumbnailZoomed TQString::fromLatin1 ("Zoomed")
-#define kpSettingThumbnailShowRectangle TQString::fromLatin1 ("ShowRectangle")
+#define kpSettingsGroupThumbnail TQString::tqfromLatin1 ("Thumbnail Settings")
+#define kpSettingThumbnailShown TQString::tqfromLatin1 ("Shown")
+#define kpSettingThumbnailGeometry TQString::tqfromLatin1 ("Geometry")
+#define kpSettingThumbnailZoomed TQString::tqfromLatin1 ("Zoomed")
+#define kpSettingThumbnailShowRectangle TQString::tqfromLatin1 ("ShowRectangle")
-#define kpSettingsGroupPreviewSave TQString::fromLatin1 ("Save Preview Settings")
-#define kpSettingPreviewSaveGeometry TQString::fromLatin1 ("Geometry")
-#define kpSettingPreviewSaveUpdateDelay TQString::fromLatin1 ("Update Delay")
+#define kpSettingsGroupPreviewSave TQString::tqfromLatin1 ("Save Preview Settings")
+#define kpSettingPreviewSaveGeometry TQString::tqfromLatin1 ("Geometry")
+#define kpSettingPreviewSaveUpdateDelay TQString::tqfromLatin1 ("Update Delay")
-#define kpSettingsGroupTools TQString::fromLatin1 ("Tool Settings")
-#define kpSettingLastTool TQString::fromLatin1 ("Last Used Tool")
-#define kpSettingToolBoxIconSize TQString::fromLatin1 ("Tool Box Icon Size")
+#define kpSettingsGroupTools TQString::tqfromLatin1 ("Tool Settings")
+#define kpSettingLastTool TQString::tqfromLatin1 ("Last Used Tool")
+#define kpSettingToolBoxIconSize TQString::tqfromLatin1 ("Tool Box Icon Size")
-#define kpSettingsGroupText TQString::fromLatin1 ("Text Settings")
-#define kpSettingFontFamily TQString::fromLatin1 ("Font Family")
-#define kpSettingFontSize TQString::fromLatin1 ("Font Size")
-#define kpSettingBold TQString::fromLatin1 ("Bold")
-#define kpSettingItalic TQString::fromLatin1 ("Italic")
-#define kpSettingUnderline TQString::fromLatin1 ("Underline")
-#define kpSettingStrikeThru TQString::fromLatin1 ("Strike Thru")
+#define kpSettingsGroupText TQString::tqfromLatin1 ("Text Settings")
+#define kpSettingFontFamily TQString::tqfromLatin1 ("Font Family")
+#define kpSettingFontSize TQString::tqfromLatin1 ("Font Size")
+#define kpSettingBold TQString::tqfromLatin1 ("Bold")
+#define kpSettingItalic TQString::tqfromLatin1 ("Italic")
+#define kpSettingUnderline TQString::tqfromLatin1 ("Underline")
+#define kpSettingStrikeThru TQString::tqfromLatin1 ("Strike Thru")
-#define kpSettingsGroupFlattenEffect TQString::fromLatin1 ("Flatten Effect Settings")
-#define kpSettingFlattenEffectColor1 TQString::fromLatin1 ("Color1")
-#define kpSettingFlattenEffectColor2 TQString::fromLatin1 ("Color2")
+#define kpSettingsGroupFlattenEffect TQString::tqfromLatin1 ("Flatten Effect Settings")
+#define kpSettingFlattenEffectColor1 TQString::tqfromLatin1 ("Color1")
+#define kpSettingFlattenEffectColor2 TQString::tqfromLatin1 ("Color2")
//
@@ -140,11 +140,11 @@
//
// This key only exists if the document does. If it exists, it can be empty.
// The URL need not point to a file that exists e.g. "kolourpaint doesnotexist.png".
-#define kpSessionSettingDocumentUrl TQString::fromLatin1 ("Session Document Url")
+#define kpSessionSettingDocumentUrl TQString::tqfromLatin1 ("Session Document Url")
// The size of a document which is not from a URL e.g. "kolourpaint doesnotexist.png".
// This key does not exist for documents from URLs.
-#define kpSessionSettingNotFromUrlDocumentSize TQString::fromLatin1 ("Session Not-From-Url Document Size")
+#define kpSessionSettingNotFromUrlDocumentSize TQString::tqfromLatin1 ("Session Not-From-Url Document Size")
#endif // __kp_defs_h__
diff --git a/kolourpaint/kpdocument.cpp b/kolourpaint/kpdocument.cpp
index aa078c85..2886d077 100644
--- a/kolourpaint/kpdocument.cpp
+++ b/kolourpaint/kpdocument.cpp
@@ -94,7 +94,7 @@ kpDocument::kpDocument (int w, int h, kpMainWindow *mainWindow)
#endif
m_pixmap = new TQPixmap (w, h);
- m_pixmap->fill (Qt::white);
+ m_pixmap->fill (TQt::white);
}
kpDocument::~kpDocument ()
@@ -156,7 +156,7 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible (
metaInfo->setDotsPerMeterY (image.dotsPerMeterY ());
metaInfo->setOffset (image.offset ());
- TQValueList <TQImageTextKeyLang> keyList = image.textList ();
+ TQValueList <TQImageTextKeyLang> keyList = image.tqtextList ();
for (TQValueList <TQImageTextKeyLang>::const_iterator it = keyList.begin ();
it != keyList.end ();
it++)
@@ -179,7 +179,7 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible (
{
for (int x = 0; x < image.width (); x++)
{
- const QRgb rgb = image.pixel (x, y);
+ const TQRgb rgb = image.pixel (x, y);
fprintf (stderr, " %08X", rgb);
}
fprintf (stderr, "\n");
@@ -204,7 +204,7 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible (
{
for (int x = 0; x < image2.width (); x++)
{
- const QRgb rgb = image2.pixel (x, y);
+ const TQRgb rgb = image2.pixel (x, y);
hash += ((x % 2) + 1) * rgb;
if (rgb != image.pixel (x, y))
{
@@ -231,12 +231,12 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible (
// public static
TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog,
- TQWidget *parent,
+ TQWidget *tqparent,
kpDocumentSaveOptions *saveOptions,
kpDocumentMetaInfo *metaInfo)
{
#if DEBUG_KP_DOCUMENT
- kdDebug () << "kpDocument::getPixmapFromFile(" << url << "," << parent << ")" << endl;
+ kdDebug () << "kpDocument::getPixmapFromFile(" << url << "," << tqparent << ")" << endl;
#endif
if (saveOptions)
@@ -247,11 +247,11 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis
TQString tempFile;
- if (url.isEmpty () || !KIO::NetAccess::download (url, tempFile, parent))
+ if (url.isEmpty () || !KIO::NetAccess::download (url, tempFile, tqparent))
{
if (!suppressDoesntExistDialog)
{
- KMessageBox::sorry (parent,
+ KMessageBox::sorry (tqparent,
i18n ("Could not open \"%1\".")
.arg (kpDocument::prettyFilenameForURL (url)));
}
@@ -277,7 +277,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis
if (detectedMimeType.isEmpty ())
{
- KMessageBox::sorry (parent,
+ KMessageBox::sorry (tqparent,
i18n ("Could not open \"%1\" - unknown mimetype.")
.arg (kpDocument::prettyFilenameForURL (url)));
KIO::NetAccess::removeTempFile (tempFile);
@@ -292,7 +292,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis
if (image.isNull ())
{
- KMessageBox::sorry (parent,
+ KMessageBox::sorry (tqparent,
i18n ("Could not open \"%1\" - unsupported image format.\n"
"The file may be corrupt.")
.arg (kpDocument::prettyFilenameForURL (url)));
@@ -310,7 +310,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis
" 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.")
.arg (prettyFilenameForURL (url)),
i18n ("The image \"%1\""
" may have more colors than the current screen mode."
@@ -320,16 +320,16 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis
i18n ("The image \"%1\""
" 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.")
.arg (prettyFilenameForURL (url)),
"docOpen",
- parent),
+ tqparent),
saveOptions,
metaInfo);
if (newPixmap.isNull ())
{
- KMessageBox::sorry (parent,
+ KMessageBox::sorry (tqparent,
i18n ("Could not open \"%1\" - out of graphics memory.")
.arg (kpDocument::prettyFilenameForURL (url)));
return TQPixmap ();
@@ -352,7 +352,7 @@ void kpDocument::openNew (const KURL &url)
kdDebug () << "KpDocument::openNew (" << url << ")" << endl;
#endif
- m_pixmap->fill (Qt::white);
+ m_pixmap->fill (TQt::white);
setURL (url, false/*not from url*/);
*m_saveOptions = kpDocumentSaveOptions ();
@@ -446,13 +446,13 @@ bool kpDocument::save (bool overwritePrompt, bool lossyPrompt)
// public static
bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap,
const kpDocumentSaveOptions &saveOptions,
- TQWidget *parent)
+ TQWidget *tqparent)
{
#if DEBUG_KP_DOCUMENT
kdDebug () << "kpDocument::lossyPromptContinue()" << endl;
#endif
-#define QUIT_IF_CANCEL(messageBoxCommand) \
+#define TQUIT_IF_CANCEL(messageBoxCommand) \
{ \
if (messageBoxCommand != KMessageBox::Continue) \
{ \
@@ -464,8 +464,8 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap,
if (lossyType & (kpDocumentSaveOptions::MimeTypeMaximumColorDepthLow |
kpDocumentSaveOptions::Quality))
{
- QUIT_IF_CANCEL (
- KMessageBox::warningContinueCancel (parent,
+ TQUIT_IF_CANCEL (
+ KMessageBox::warningContinueCancel (tqparent,
i18n ("<qt><p>The <b>%1</b> format may not be able"
" to preserve all of the image's color information.</p>"
@@ -475,12 +475,12 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap,
// low maximum colour depth
i18n ("Lossy File Format"),
KStdGuiItem::save (),
- TQString::fromLatin1 ("SaveInLossyMimeTypeDontAskAgain")));
+ TQString::tqfromLatin1 ("SaveInLossyMimeTypeDontAskAgain")));
}
else if (lossyType & kpDocumentSaveOptions::ColorDepthLow)
{
- QUIT_IF_CANCEL (
- KMessageBox::warningContinueCancel (parent,
+ TQUIT_IF_CANCEL (
+ KMessageBox::warningContinueCancel (tqparent,
i18n ("<qt><p>Saving the image at the low color depth of %1-bit"
" may result in the loss of color information."
@@ -490,9 +490,9 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap,
.arg (saveOptions.colorDepth ()),
i18n ("Low Color Depth"),
KStdGuiItem::save (),
- TQString::fromLatin1 ("SaveAtLowColorDepthDontAskAgain")));
+ TQString::tqfromLatin1 ("SaveAtLowColorDepthDontAskAgain")));
}
-#undef QUIT_IF_CANCEL
+#undef TQUIT_IF_CANCEL
return true;
}
@@ -503,7 +503,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
bool lossyPrompt,
- TQWidget *parent,
+ TQWidget *tqparent,
bool *userCancelled)
{
if (userCancelled)
@@ -515,7 +515,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap,
<< " type=" << type << endl;
#endif
- if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, parent))
+ if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, tqparent))
{
if (userCancelled)
*userCancelled = true;
@@ -529,7 +529,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap,
TQPixmap pixmapToSave =
kpPixmapFX::pixmapWithDefinedTransparentPixels (pixmap,
- Qt::white); // CONFIG
+ TQt::white); // CONFIG
TQImage imageToSave = kpPixmapFX::convertToImage (pixmapToSave);
@@ -584,7 +584,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap,
if (!imageToSave.save (device, type.latin1 (), quality))
{
#if DEBUG_KP_DOCUMENT
- kdDebug () << "\tQImage::save() returned false" << endl;
+ kdDebug () << "\tTQImage::save() returned false" << endl;
#endif
return false;
}
@@ -596,16 +596,16 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap,
return true;
}
-static void CouldNotCreateTemporaryFileDialog (TQWidget *parent)
+static void CouldNotCreateTemporaryFileDialog (TQWidget *tqparent)
{
- KMessageBox::error (parent,
+ KMessageBox::error (tqparent,
i18n ("Could not save image - unable to create temporary file."));
}
-static void CouldNotSaveDialog (const KURL &url, TQWidget *parent)
+static void CouldNotSaveDialog (const KURL &url, TQWidget *tqparent)
{
// TODO: use file.errorString()
- KMessageBox::error (parent,
+ KMessageBox::error (tqparent,
i18n ("Could not save as \"%1\".")
.arg (kpDocument::prettyFilenameForURL (url)));
}
@@ -617,7 +617,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
const kpDocumentMetaInfo &metaInfo,
bool overwritePrompt,
bool lossyPrompt,
- TQWidget *parent)
+ TQWidget *tqparent)
{
// TODO: Use KIO::NetAccess:mostLocalURL() for accessing home:/ (and other
// such local URLs) for efficiency and because only local writes
@@ -628,17 +628,17 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
<< ",overwritePrompt=" << overwritePrompt
<< ",lossyPrompt=" << lossyPrompt
<< ")" << endl;
- saveOptions.printDebug (TQString::fromLatin1 ("\tsaveOptions"));
- metaInfo.printDebug (TQString::fromLatin1 ("\tmetaInfo"));
+ saveOptions.printDebug (TQString::tqfromLatin1 ("\tsaveOptions"));
+ metaInfo.printDebug (TQString::tqfromLatin1 ("\tmetaInfo"));
#endif
- if (overwritePrompt && KIO::NetAccess::exists (url, false/*write*/, parent))
+ if (overwritePrompt && KIO::NetAccess::exists (url, false/*write*/, tqparent))
{
- int result = KMessageBox::warningContinueCancel (parent,
+ int result = KMessageBox::warningContinueCancel (tqparent,
i18n ("A document called \"%1\" already exists.\n"
"Do you want to overwrite it?")
.arg (prettyFilenameForURL (url)),
- TQString::null,
+ TQString(),
i18n ("Overwrite"));
if (result != KMessageBox::Continue)
@@ -652,7 +652,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
}
- if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, parent))
+ if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, tqparent))
{
#if DEBUG_KP_DOCUMENT
kdDebug () << "\treturning false because of lossyPrompt" << endl;
@@ -681,15 +681,15 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
kdDebug () << "\treturning false because could not open KSaveFile"
<< " status=" << atomicFileWriter.status () << endl;
#endif
- ::CouldNotCreateTemporaryFileDialog (parent);
+ ::CouldNotCreateTemporaryFileDialog (tqparent);
return false;
}
// Write to local temporary file.
- if (!savePixmapToDevice (pixmap, atomicFileWriter.file (),
+ if (!savePixmapToDevice (pixmap, TQT_TQIODEVICE(atomicFileWriter.file ()),
saveOptions, metaInfo,
false/*no lossy prompt*/,
- parent))
+ tqparent))
{
atomicFileWriter.abort ();
@@ -697,7 +697,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
kdDebug () << "\treturning false because could not save pixmap to device"
<< endl;
#endif
- ::CouldNotSaveDialog (url, parent);
+ ::CouldNotSaveDialog (url, tqparent);
return false;
}
@@ -710,7 +710,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
#if DEBUG_KP_DOCUMENT
kdDebug () << "\tcould not close KSaveFile" << endl;
#endif
- ::CouldNotSaveDialog (url, parent);
+ ::CouldNotSaveDialog (url, tqparent);
return false;
}
} // sync KSaveFile.abort()
@@ -729,7 +729,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
#if DEBUG_KP_DOCUMENT
kdDebug () << "\treturning false because tempFile empty" << endl;
#endif
- ::CouldNotCreateTemporaryFileDialog (parent);
+ ::CouldNotCreateTemporaryFileDialog (tqparent);
return false;
}
@@ -742,20 +742,20 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
kdDebug () << "\treturning false because can't open file"
<< " errorString=" << file.errorString () << endl;
#endif
- ::CouldNotCreateTemporaryFileDialog (parent);
+ ::CouldNotCreateTemporaryFileDialog (tqparent);
return false;
}
- if (!savePixmapToDevice (pixmap, &file,
+ if (!savePixmapToDevice (pixmap, TQT_TQIODEVICE(&file),
saveOptions, metaInfo,
false/*no lossy prompt*/,
- parent))
+ tqparent))
{
#if DEBUG_KP_DOCUMENT
kdDebug () << "\treturning false because could not save pixmap to device"
<< endl;
#endif
- ::CouldNotSaveDialog (url, parent);
+ ::CouldNotSaveDialog (url, tqparent);
return false;
}
}
@@ -765,7 +765,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
#if DEBUG_KP_DOCUMENT
kdDebug () << "\treturning false because could not close" << endl;
#endif
- ::CouldNotSaveDialog (url, parent);
+ ::CouldNotSaveDialog (url, tqparent);
return false;
}
@@ -773,12 +773,12 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
// TODO: No one seems to know how to do this atomically
// [http://lists.kde.org/?l=kde-core-devel&m=117845162728484&w=2].
// At least, fish:// (ssh) is definitely not atomic.
- if (!KIO::NetAccess::upload (filename, url, parent))
+ if (!KIO::NetAccess::upload (filename, url, tqparent))
{
#if DEBUG_KP_DOCUMENT
kdDebug () << "\treturning false because could not upload" << endl;
#endif
- KMessageBox::error (parent,
+ KMessageBox::error (tqparent,
i18n ("Could not save image - failed to upload."));
return false;
}
@@ -1109,22 +1109,22 @@ void kpDocument::setSelection (const kpSelection &selection)
(selection.type () == kpSelection::Text));
// We don't change the Selection Tool if the new selection's
- // shape is merely different to the current tool's (e.g. rectangular
+ // tqshape is merely different to the current tool's (e.g. rectangular
// vs elliptical) because:
//
// 1. All image selection tools support editing selections of all the
- // different shapes anyway.
+ // different tqshapes anyway.
// 2. Suppose the user is trying out different drags of selection borders
- // and then decides to paste a differently shaped selection before continuing
+ // and then decides to paste a differently tqshaped selection before continuing
// to try out different borders. If the pasting were to switch to
- // a differently shaped tool, the borders drawn after the paste would
- // be using a new shape rather than the shape before the paste. This
+ // a differently tqshaped tool, the borders drawn after the paste would
+ // be using a new tqshape rather than the tqshape before the paste. This
// could get irritating so we don't do the switch.
//
if (m_mainWindow &&
(!m_mainWindow->toolIsASelectionTool () || isTextChanged))
{
- // Switch to the appropriately shaped selection tool
+ // Switch to the appropriately tqshaped selection tool
// _before_ we change the selection
// (all selection tool's ::end() functions nuke the current selection)
switch (selection.type ())
@@ -1235,7 +1235,7 @@ void kpDocument::setSelection (const kpSelection &selection)
}
// public
-TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const
+TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
{
kpSelection *sel = selection ();
@@ -1259,15 +1259,15 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const
}
- TQBitmap maskBitmap = maskBitmap_;
- if (maskBitmap.isNull () &&
+ TQBitmap tqmaskBitmap = tqmaskBitmap_;
+ if (tqmaskBitmap.isNull () &&
!sel->isRectangular ())
{
- maskBitmap = sel->maskForOwnType ();
+ tqmaskBitmap = sel->tqmaskForOwnType ();
- if (maskBitmap.isNull ())
+ if (tqmaskBitmap.isNull ())
{
- kdError () << "kpDocument::getSelectedPixmap() could not get mask" << endl;
+ kdError () << "kpDocument::getSelectedPixmap() could not get tqmask" << endl;
return TQPixmap ();
}
}
@@ -1275,7 +1275,7 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const
TQPixmap selPixmap = getPixmapAt (boundingRect);
- if (!maskBitmap.isNull ())
+ if (!tqmaskBitmap.isNull ())
{
// Src Dest = Result
// -----------------
@@ -1286,9 +1286,9 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const
TQBitmap selMaskBitmap = kpPixmapFX::getNonNullMask (selPixmap);
bitBlt (&selMaskBitmap,
TQPoint (0, 0),
- &maskBitmap,
- TQRect (0, 0, maskBitmap.width (), maskBitmap.height ()),
- Qt::AndROP);
+ &tqmaskBitmap,
+ TQRect (0, 0, tqmaskBitmap.width (), tqmaskBitmap.height ()),
+ TQt::AndROP);
selPixmap.setMask (selMaskBitmap);
}
@@ -1325,17 +1325,17 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor)
//
- // Figure out mask for non-rectangular selections
+ // Figure out tqmask for non-rectangular selections
//
- TQBitmap maskBitmap = sel->maskForOwnType (true/*return null bitmap for rectangular*/);
+ TQBitmap tqmaskBitmap = sel->tqmaskForOwnType (true/*return null bitmap for rectangular*/);
//
// Get selection pixmap from document
//
- TQPixmap selPixmap = getSelectedPixmap (maskBitmap);
+ TQPixmap selPixmap = getSelectedPixmap (tqmaskBitmap);
if (vm)
vm->setQueueUpdates ();
@@ -1353,10 +1353,10 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor)
if (backgroundColor.isOpaque ())
{
TQPixmap erasePixmap (boundingRect.width (), boundingRect.height ());
- erasePixmap.fill (backgroundColor.toQColor ());
+ erasePixmap.fill (backgroundColor.toTQColor ());
- if (selTransparentPixmap.mask ())
- erasePixmap.setMask (*selTransparentPixmap.mask ());
+ if (selTransparentPixmap.tqmask ())
+ erasePixmap.setMask (*selTransparentPixmap.tqmask ());
paintPixmapAt (erasePixmap, boundingRect.topLeft ());
}
diff --git a/kolourpaint/kpdocument.h b/kolourpaint/kpdocument.h
index a0369566..bc11990b 100644
--- a/kolourpaint/kpdocument.h
+++ b/kolourpaint/kpdocument.h
@@ -52,9 +52,10 @@ class kpMainWindow;
class kpSelection;
-class kpDocument : public QObject
+class kpDocument : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
kpDocument (int w, int h, kpMainWindow *mainWindow);
@@ -77,7 +78,7 @@ public:
kpDocumentMetaInfo *metaInfo = 0);
static TQPixmap getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog,
- TQWidget *parent,
+ TQWidget *tqparent,
kpDocumentSaveOptions *saveOptions = 0,
kpDocumentMetaInfo *metaInfo = 0);
// TODO: fix: open*() should only be called once.
@@ -87,13 +88,13 @@ public:
static bool lossyPromptContinue (const TQPixmap &pixmap,
const kpDocumentSaveOptions &saveOptions,
- TQWidget *parent);
+ TQWidget *tqparent);
static bool savePixmapToDevice (const TQPixmap &pixmap,
TQIODevice *device,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
bool lossyPrompt,
- TQWidget *parent,
+ TQWidget *tqparent,
bool *userCancelled = 0);
static bool savePixmapToFile (const TQPixmap &pixmap,
const KURL &url,
@@ -101,7 +102,7 @@ public:
const kpDocumentMetaInfo &metaInfo,
bool overwritePrompt,
bool lossyPrompt,
- TQWidget *parent);
+ TQWidget *tqparent);
bool save (bool overwritePrompt = false, bool lossyPrompt = false);
bool saveAs (const KURL &url,
const kpDocumentSaveOptions &saveOptions,
@@ -188,7 +189,7 @@ public:
void setSelection (const kpSelection &selection);
// TODO: this always returns opaque pixmap - need transparent ver
- TQPixmap getSelectedPixmap (const TQBitmap &maskBitmap = TQBitmap ()) const;
+ TQPixmap getSelectedPixmap (const TQBitmap &tqmaskBitmap = TQBitmap ()) const;
bool selectionPullFromDocument (const kpColor &backgroundColor);
bool selectionDelete ();
diff --git a/kolourpaint/kpdocumentmetainfo.cpp b/kolourpaint/kpdocumentmetainfo.cpp
index 36c1dde6..cf5d9987 100644
--- a/kolourpaint/kpdocumentmetainfo.cpp
+++ b/kolourpaint/kpdocumentmetainfo.cpp
@@ -82,8 +82,8 @@ kpDocumentMetaInfo &kpDocumentMetaInfo::operator= (const kpDocumentMetaInfo &rhs
void kpDocumentMetaInfo::printDebug (const TQString &prefix) const
{
const TQString usedPrefix = !prefix.isEmpty () ?
- prefix + TQString::fromLatin1 (":") :
- TQString::null;
+ prefix + TQString::tqfromLatin1 (":") :
+ TQString();
kdDebug () << usedPrefix << endl;
@@ -96,9 +96,9 @@ void kpDocumentMetaInfo::printDebug (const TQString &prefix) const
it != keyList.end ();
it++)
{
- kdDebug () << "key=" << (*it).key
- << " lang=" << (*it).lang
- << " text=" << text (*it)
+ kdDebug () << "key=" << (*it).key.data()
+ << " lang=" << (*it).lang.data()
+ << " text=" << text (*it).data()
<< endl;
}
diff --git a/kolourpaint/kpdocumentsaveoptions.cpp b/kolourpaint/kpdocumentsaveoptions.cpp
index 5151e739..a5b2988c 100644
--- a/kolourpaint/kpdocumentsaveoptions.cpp
+++ b/kolourpaint/kpdocumentsaveoptions.cpp
@@ -114,8 +114,8 @@ kpDocumentSaveOptions &kpDocumentSaveOptions::operator= (const kpDocumentSaveOpt
void kpDocumentSaveOptions::printDebug (const TQString &prefix) const
{
const TQString usedPrefix = !prefix.isEmpty () ?
- prefix + TQString::fromLatin1 (": ") :
- TQString::null;
+ prefix + TQString::tqfromLatin1 (": ") :
+ TQString();
kdDebug () << usedPrefix
<< "mimeType=" << mimeType ()
@@ -142,7 +142,7 @@ void kpDocumentSaveOptions::setMimeType (const TQString &mimeType)
// public static
TQString kpDocumentSaveOptions::invalidMimeType ()
{
- return TQString::null;
+ return TQString();
}
// public static
@@ -246,7 +246,7 @@ bool kpDocumentSaveOptions::qualityIsInvalid () const
TQString kpDocumentSaveOptions::defaultMimeType (KConfigBase *config)
{
return config->readEntry (kpSettingForcedMimeType,
- TQString::fromLatin1 ("image/png"));
+ TQString::tqfromLatin1 ("image/png"));
}
// public static
@@ -396,7 +396,7 @@ static bool mimeTypeSupportsProperty (const TQString &mimeType,
const TQStringList mimeTypeList = mimeTypesSupportingProperty (
property, defaultMimeTypesWithPropertyList);
- return mimeTypeList.contains (mimeType);
+ return mimeTypeList.tqcontains (mimeType);
}
@@ -445,19 +445,19 @@ int kpDocumentSaveOptions::mimeTypeMaximumColorDepth (const TQString &mimeType)
// SYNC: update mime info here
// Greyscale actually (unenforced since depth not set to configurable)
- defaultList << TQString::fromLatin1 ("image/x-eps:32");
+ defaultList << TQString::tqfromLatin1 ("image/x-eps:32");
- defaultList << TQString::fromLatin1 ("image/x-portable-bitmap:1");
+ defaultList << TQString::tqfromLatin1 ("image/x-portable-bitmap:1");
// Greyscale actually (unenforced since depth not set to configurable)
- defaultList << TQString::fromLatin1 ("image/x-portable-greymap:8");
+ defaultList << TQString::tqfromLatin1 ("image/x-portable-greymap:8");
- defaultList << TQString::fromLatin1 ("image/x-xbm:1");
+ defaultList << TQString::tqfromLatin1 ("image/x-xbm:1");
const TQStringList mimeTypeList = mimeTypesSupportingProperty (
kpSettingMimeTypeMaximumColorDepth, defaultList);
- const TQString mimeTypeColon = mimeType + TQString::fromLatin1 (":");
+ const TQString mimeTypeColon = mimeType + TQString::tqfromLatin1 (":");
for (TQStringList::const_iterator it = mimeTypeList.begin ();
it != mimeTypeList.end ();
it++)
@@ -488,16 +488,16 @@ bool kpDocumentSaveOptions::mimeTypeHasConfigurableColorDepth (const TQString &m
TQStringList defaultMimeTypes;
// SYNC: update mime info here
- defaultMimeTypes << TQString::fromLatin1 ("image/png");
- defaultMimeTypes << TQString::fromLatin1 ("image/x-bmp");
- defaultMimeTypes << TQString::fromLatin1 ("image/x-pcx");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/png");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/x-bmp");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/x-pcx");
- // TODO: Only 1, 24 not 8; Qt only sees 32 but "file" cmd realises
+ // TODO: Only 1, 24 not 8; TQt only sees 32 but "file" cmd realises
// it's either 1 or 24.
- defaultMimeTypes << TQString::fromLatin1 ("image/x-rgb");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/x-rgb");
// TODO: Only 8 and 24 - no 1.
- defaultMimeTypes << TQString::fromLatin1 ("image/x-xpm");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/x-xpm");
return mimeTypeSupportsProperty (mimeType,
kpSettingMimeTypeHasConfigurableColorDepth,
@@ -517,8 +517,8 @@ bool kpDocumentSaveOptions::mimeTypeHasConfigurableQuality (const TQString &mime
TQStringList defaultMimeTypes;
// SYNC: update mime info here
- defaultMimeTypes << TQString::fromLatin1 ("image/jp2");
- defaultMimeTypes << TQString::fromLatin1 ("image/jpeg");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/jp2");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/jpeg");
return mimeTypeSupportsProperty (mimeType,
kpSettingMimeTypeHasConfigurableQuality,
@@ -545,7 +545,7 @@ int kpDocumentSaveOptions::isLossyForSaving (const TQPixmap &pixmap) const
if (mimeTypeHasConfigurableColorDepth () &&
!colorDepthIsInvalid () /*TODO: prevent*/ &&
(colorDepth () < pixmap.depth () ||
- colorDepth () < 32 && pixmap.mask ()))
+ colorDepth () < 32 && pixmap.tqmask ()))
{
ret |= ColorDepthLow;
}
diff --git a/kolourpaint/kpdocumentsaveoptions.h b/kolourpaint/kpdocumentsaveoptions.h
index d6279885..22feaaa9 100644
--- a/kolourpaint/kpdocumentsaveoptions.h
+++ b/kolourpaint/kpdocumentsaveoptions.h
@@ -119,7 +119,7 @@ public:
bool mimeTypeHasConfigurableQuality () const;
- // TODO: checking for mask loss due to format e.g. BMP
+ // TODO: checking for tqmask loss due to format e.g. BMP
enum LossyType
{
LossLess = 0,
@@ -127,7 +127,7 @@ public:
// mimeTypeMaximumColorDepth() < <pixmap>.depth()
MimeTypeMaximumColorDepthLow = 1,
// i.e. colorDepth() < <pixmap>.depth() ||
- // colorDepth() < 32 && <pixmap>.mask()
+ // colorDepth() < 32 && <pixmap>.tqmask()
ColorDepthLow = 2,
// i.e. mimeTypeHasConfigurableQuality()
Quality = 4
diff --git a/kolourpaint/kpdocumentsaveoptionswidget.cpp b/kolourpaint/kpdocumentsaveoptionswidget.cpp
index 4847c72d..223bac5a 100644
--- a/kolourpaint/kpdocumentsaveoptionswidget.cpp
+++ b/kolourpaint/kpdocumentsaveoptionswidget.cpp
@@ -62,15 +62,15 @@ const TQSize kpDocumentSaveOptionsPreviewDialog::s_pixmapLabelMinimumSize (25, 2
kpDocumentSaveOptionsPreviewDialog::kpDocumentSaveOptionsPreviewDialog (
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : TQWidget (parent, name,
- Qt::WType_TopLevel |
- Qt::WStyle_Customize |
- Qt::WStyle_DialogBorder |
- Qt::WStyle_Title),
+ : TQWidget (tqparent, name,
+ TQt::WType_TopLevel |
+ TQt::WStyle_Customize |
+ TQt::WStyle_DialogBorder |
+ TQt::WStyle_Title),
#if 0
-KDialogBase (parent, name, false/*non-modal*/,
+KDialogBase (tqparent, name, false/*non-modal*/,
i18n ("Save Preview"),
0/*no buttons*/),
#endif
@@ -94,7 +94,7 @@ KDialogBase (parent, name, false/*non-modal*/,
lay->addWidget (m_filePixmapLabel, 0, 0);
- lay->addWidget (m_fileSizeLabel, 1, 0, Qt::AlignHCenter);
+ lay->addWidget (m_fileSizeLabel, 1, 0, TQt::AlignHCenter);
lay->setRowStretch (0, 1);
@@ -134,7 +134,7 @@ void kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize (const TQPixmap &p
const int pixmapSize = kpPixmapFX::pixmapSize (pixmap);
const int percent = pixmapSize ?
- QMAX (1, fileSize * 100 / pixmapSize) :
+ TQMAX (1, fileSize * 100 / pixmapSize) :
0;
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize()"
@@ -173,9 +173,9 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview ()
if (m_filePixmap)
{
- int maxNewWidth = QMIN (m_filePixmap->width (),
+ int maxNewWidth = TQMIN (m_filePixmap->width (),
m_filePixmapLabel->width ()),
- maxNewHeight = QMIN (m_filePixmap->height (),
+ maxNewHeight = TQMIN (m_filePixmap->height (),
m_filePixmapLabel->height ());
double keepsAspect = kpToolPreviewDialog::aspectScale (
@@ -229,7 +229,7 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview ()
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDocumentSaveOptionsPreviewDialog::closeEvent (TQCloseEvent *e)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
@@ -241,7 +241,7 @@ void kpDocumentSaveOptionsPreviewDialog::closeEvent (TQCloseEvent *e)
emit finished ();
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDocumentSaveOptionsPreviewDialog::moveEvent (TQMoveEvent *e)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
@@ -253,7 +253,7 @@ void kpDocumentSaveOptionsPreviewDialog::moveEvent (TQMoveEvent *e)
emit moved ();
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDocumentSaveOptionsPreviewDialog::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
@@ -270,9 +270,9 @@ kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget (
const TQPixmap &docPixmap,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
- TQWidget *parent, const char *name)
- : TQWidget (parent, name),
- m_visualParent (parent)
+ TQWidget *tqparent, const char *name)
+ : TQWidget (tqparent, name),
+ m_visualParent (tqparent)
{
init ();
setDocumentSaveOptions (saveOptions);
@@ -281,9 +281,9 @@ kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget (
}
kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget (
- TQWidget *parent, const char *name)
- : TQWidget (parent, name),
- m_visualParent (parent)
+ TQWidget *tqparent, const char *name)
+ : TQWidget (tqparent, name),
+ m_visualParent (tqparent)
{
init ();
}
@@ -320,15 +320,15 @@ void kpDocumentSaveOptionsWidget::init ()
TQHBoxLayout *lay = new TQHBoxLayout (this, 0/*margin*/, KDialog::spacingHint ());
- lay->addWidget (m_colorDepthLabel, 0/*stretch*/, Qt::AlignLeft);
+ lay->addWidget (m_colorDepthLabel, 0/*stretch*/, TQt::AlignLeft);
lay->addWidget (m_colorDepthCombo, 0/*stretch*/);
lay->addWidget (m_colorDepthSpaceWidget, 1/*stretch*/);
- lay->addWidget (m_qualityLabel, 0/*stretch*/, Qt::AlignLeft);
+ lay->addWidget (m_qualityLabel, 0/*stretch*/, TQt::AlignLeft);
lay->addWidget (m_qualityInput, 2/*stretch*/);
- lay->addWidget (m_previewButton, 0/*stretch*/, Qt::AlignRight);
+ lay->addWidget (m_previewButton, 0/*stretch*/, TQt::AlignRight);
connect (m_colorDepthCombo, TQT_SIGNAL (activated (int)),
@@ -704,17 +704,17 @@ void kpDocumentSaveOptionsWidget::setMode (Mode mode)
// SYNC: HACK: When changing between color depth and quality widgets,
// we change the height of "this", causing the text on the labels
// to move but the first instance of the text doesn't get erased.
- // Qt bug.
- TQTimer::singleShot (0, this, TQT_SLOT (repaintLabels ()));
+ // TQt bug.
+ TQTimer::singleShot (0, this, TQT_SLOT (tqrepaintLabels ()));
}
// protected slot
-void kpDocumentSaveOptionsWidget::repaintLabels ()
+void kpDocumentSaveOptionsWidget::tqrepaintLabels ()
{
if (mode () != Quality)
- m_colorDepthLabel->repaint ();
+ m_colorDepthLabel->tqrepaint ();
if (mode () == Quality)
- m_qualityLabel->repaint ();
+ m_qualityLabel->tqrepaint ();
}
@@ -767,7 +767,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
if (m_previewDialogLastRelativeGeometry.isEmpty ())
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kdDebug () << "\tread cfg preview dialog last rel geometry" << endl;
+ kdDebug () << "\tread cfg preview dialog last rel tqgeometry" << endl;
#endif
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupPreviewSave);
KConfigBase *cfg = cfgGroupSaver.config ();
@@ -826,7 +826,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kdDebug () << "\tgeometry after show="
+ kdDebug () << "\ttqgeometry after show="
<< TQRect (m_previewDialog->x (), m_previewDialog->y (),
m_previewDialog->width (), m_previewDialog->height ())
<< endl;
@@ -852,9 +852,9 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
cfg->sync ();
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kdDebug () << "\tsaving preview geometry "
+ kdDebug () << "\tsaving preview tqgeometry "
<< m_previewDialogLastRelativeGeometry
- << " (Qt would have us believe "
+ << " (TQt would have us believe "
<< kpWidgetMapper::fromGlobal (m_visualParent,
TQRect (m_previewDialog->x (), m_previewDialog->y (),
m_previewDialog->width (), m_previewDialog->height ()))
@@ -891,14 +891,14 @@ void kpDocumentSaveOptionsWidget::updatePreview ()
m_updatePreviewTimer->stop ();
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
TQByteArray data;
TQBuffer buffer (data);
buffer.open (IO_WriteOnly);
kpDocument::savePixmapToDevice (*m_documentPixmap,
- &buffer,
+ TQT_TQIODEVICE(&buffer),
documentSaveOptions (),
m_documentMetaInfo,
false/*no lossy prompt*/,
@@ -942,7 +942,7 @@ void kpDocumentSaveOptionsWidget::updatePreviewDialogLastRelativeGeometry ()
else
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kdDebug () << "\tnot visible - ignoring geometry" << endl;
+ kdDebug () << "\tnot visible - ignoring tqgeometry" << endl;
#endif
}
}
diff --git a/kolourpaint/kpdocumentsaveoptionswidget.h b/kolourpaint/kpdocumentsaveoptionswidget.h
index 1aeb8cb1..a01e8784 100644
--- a/kolourpaint/kpdocumentsaveoptionswidget.h
+++ b/kolourpaint/kpdocumentsaveoptionswidget.h
@@ -41,12 +41,13 @@ class TQLabel;
class kpResizeSignallingLabel;
-class kpDocumentSaveOptionsPreviewDialog : public QWidget
+class kpDocumentSaveOptionsPreviewDialog : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpDocumentSaveOptionsPreviewDialog (TQWidget *parent, const char *name = 0);
+ kpDocumentSaveOptionsPreviewDialog (TQWidget *tqparent, const char *name = 0);
virtual ~kpDocumentSaveOptionsPreviewDialog ();
TQSize preferredMinimumSize () const;
@@ -92,16 +93,17 @@ class KIntNumInput;
class KPushButton;
-class kpDocumentSaveOptionsWidget : public QWidget
+class kpDocumentSaveOptionsWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
kpDocumentSaveOptionsWidget (const TQPixmap &docPixmap,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
- TQWidget *parent, const char *name = 0);
- kpDocumentSaveOptionsWidget (TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
+ kpDocumentSaveOptionsWidget (TQWidget *tqparent, const char *name = 0);
private:
void init ();
public:
@@ -159,7 +161,7 @@ protected:
void setMode (Mode mode);
protected slots:
- void repaintLabels ();
+ void tqrepaintLabels ();
protected slots:
diff --git a/kolourpaint/kpmainwindow.cpp b/kolourpaint/kpmainwindow.cpp
index 9e760c2c..c600d36b 100644
--- a/kolourpaint/kpmainwindow.cpp
+++ b/kolourpaint/kpmainwindow.cpp
@@ -64,7 +64,7 @@
kpMainWindow::kpMainWindow ()
- : KMainWindow (0/*parent*/, "mainWindow"),
+ : KMainWindow (0/*tqparent*/, "mainWindow"),
m_isFullyConstructed (false)
{
init ();
@@ -74,7 +74,7 @@ kpMainWindow::kpMainWindow ()
}
kpMainWindow::kpMainWindow (const KURL &url)
- : KMainWindow (0/*parent*/, "mainWindow"),
+ : KMainWindow (0/*tqparent*/, "mainWindow"),
m_isFullyConstructed (false)
{
init ();
@@ -84,7 +84,7 @@ kpMainWindow::kpMainWindow (const KURL &url)
}
kpMainWindow::kpMainWindow (kpDocument *newDoc)
- : KMainWindow (0/*parent*/, "mainWindow"),
+ : KMainWindow (0/*tqparent*/, "mainWindow"),
m_isFullyConstructed (false)
{
init ();
@@ -157,7 +157,7 @@ void kpMainWindow::readThumbnailSettings ()
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tThumbnail Settings: shown=" << m_configThumbnailShown
- << " geometry=" << m_configThumbnailGeometry
+ << " tqgeometry=" << m_configThumbnailGeometry
<< " zoomed=" << m_configZoomedThumbnail
<< " showRectangle=" << d->m_configThumbnailShowRectangle
<< endl;
@@ -658,11 +658,11 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
if (!m_lastCopyToURL.isEmpty ())
- m_lastCopyToURL.setFileName (TQString::null);
+ m_lastCopyToURL.setFileName (TQString());
m_copyToFirstTime = true;
if (!m_lastExportURL.isEmpty ())
- m_lastExportURL.setFileName (TQString::null);
+ m_lastExportURL.setFileName (TQString());
m_exportFirstTime = true;
@@ -731,7 +731,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
connect (m_document, TQT_SIGNAL (selectionIsTextChanged (bool)),
this, TQT_SLOT (slotImageMenuUpdateDueToSelection ()));
- // Status bar
+ // tqStatus bar
connect (m_document, TQT_SIGNAL (documentOpened ()),
this, TQT_SLOT (recalculateStatusBar ()));
@@ -808,7 +808,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
#endif
slotCreateThumbnail ();
}
- // this' geometry is weird ATM
+ // this' tqgeometry is weird ATM
else
{
#if DEBUG_KP_MAIN_WINDOW
@@ -855,7 +855,7 @@ bool kpMainWindow::queryClose ()
i18n ("The document \"%1\" has been modified.\n"
"Do you want to save it?")
.arg (m_document->prettyFilename ()),
- TQString::null/*caption*/,
+ TQString()/*caption*/,
KStdGuiItem::save (), KStdGuiItem::discard ());
switch (result)
@@ -870,7 +870,7 @@ bool kpMainWindow::queryClose ()
}
-// private virtual [base QWidget]
+// private virtual [base TQWidget]
void kpMainWindow::dragEnterEvent (TQDragEnterEvent *e)
{
e->accept (kpSelectionDrag::canDecode (e) ||
@@ -878,7 +878,7 @@ void kpMainWindow::dragEnterEvent (TQDragEnterEvent *e)
TQTextDrag::canDecode (e));
}
-// private virtual [base QWidget]
+// private virtual [base TQWidget]
void kpMainWindow::dropEvent (TQDropEvent *e)
{
#if DEBUG_KP_MAIN_WINDOW
@@ -939,7 +939,7 @@ void kpMainWindow::dropEvent (TQDropEvent *e)
#endif
if (m_thumbnailView &&
kpWidgetMapper::toGlobal (m_thumbnailView, m_thumbnailView->rect ())
- .contains (globalPos))
+ .tqcontains (globalPos))
{
// TODO: Code will never get executed.
// Thumbnail doesn't accept drops.
@@ -947,13 +947,13 @@ void kpMainWindow::dropEvent (TQDropEvent *e)
}
else if (m_mainView &&
kpWidgetMapper::toGlobal (m_mainView, m_mainView->rect ())
- .contains (globalPos) &&
+ .tqcontains (globalPos) &&
m_scrollView &&
kpWidgetMapper::toGlobal (m_scrollView,
TQRect (0, 0,
m_scrollView->visibleWidth (),
m_scrollView->visibleHeight ()))
- .contains (globalPos))
+ .tqcontains (globalPos))
{
view = m_mainView;
}
@@ -967,7 +967,7 @@ void kpMainWindow::dropEvent (TQDropEvent *e)
// viewUnderCursor() is hacky and can return a view when we aren't
// over one thanks to drags.
- if (m_document && m_document->rect ().contains (docPoint))
+ if (m_document && m_document->rect ().tqcontains (docPoint))
{
selTopLeft = docPoint;
@@ -1021,7 +1021,7 @@ void kpMainWindow::slotScrollViewAfterScroll ()
}
-// private virtual [base QWidget]
+// private virtual [base TQWidget]
void kpMainWindow::moveEvent (TQMoveEvent * /*e*/)
{
if (m_thumbnail)
@@ -1045,7 +1045,7 @@ void kpMainWindow::slotUpdateCaption ()
}
else
{
- setCaption (TQString::null, false);
+ setCaption (TQString(), false);
}
}
diff --git a/kolourpaint/kpmainwindow.h b/kolourpaint/kpmainwindow.h
index abc5434b..bd0df32b 100644
--- a/kolourpaint/kpmainwindow.h
+++ b/kolourpaint/kpmainwindow.h
@@ -88,6 +88,7 @@ class kpZoomedView;
class kpMainWindow : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
// Opens a new window with a blank document.
@@ -639,7 +640,7 @@ private slots:
/*
- * Status Bar
+ * tqStatus Bar
*/
private:
@@ -665,7 +666,7 @@ private:
void createStatusBar ();
private slots:
- void setStatusBarMessage (const TQString &message = TQString::null);
+ void setStatusBarMessage (const TQString &message = TQString());
void setStatusBarShapePoints (const TQPoint &startPoint = KP_INVALID_POINT,
const TQPoint &endPoint = KP_INVALID_POINT);
void setStatusBarShapeSize (const TQSize &size = KP_INVALID_SIZE);
diff --git a/kolourpaint/kpmainwindow_edit.cpp b/kolourpaint/kpmainwindow_edit.cpp
index 1dfdb3fd..103b6e11 100644
--- a/kolourpaint/kpmainwindow_edit.cpp
+++ b/kolourpaint/kpmainwindow_edit.cpp
@@ -72,7 +72,7 @@ kpPixmapFX::WarnAboutLossInfo kpMainWindow::pasteWarnAboutLossInfo ()
" 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."),
i18n ("The image to be pasted"
" may have more colors than the current screen mode."
" In order to display it, some colors may be changed."
@@ -80,7 +80,7 @@ kpPixmapFX::WarnAboutLossInfo kpMainWindow::pasteWarnAboutLossInfo ()
i18n ("The image to be pasted"
" 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."),
"paste",
this);
}
@@ -103,25 +103,25 @@ void kpMainWindow::setupEditMenuActions ()
}
- m_actionCut = KStdAction::cut (this, TQT_SLOT (slotCut ()), ac);
- m_actionCopy = KStdAction::copy (this, TQT_SLOT (slotCopy ()), ac);
- m_actionPaste = KStdAction::paste (this, TQT_SLOT (slotPaste ()), ac);
+ m_actionCut = KStdAction::cut (TQT_TQOBJECT(this), TQT_SLOT (slotCut ()), ac);
+ m_actionCopy = KStdAction::copy (TQT_TQOBJECT(this), TQT_SLOT (slotCopy ()), ac);
+ m_actionPaste = KStdAction::paste (TQT_TQOBJECT(this), TQT_SLOT (slotPaste ()), ac);
m_actionPasteInNewWindow = new KAction (i18n ("Paste in &New Window"),
- Qt::CTRL + Qt::SHIFT + Qt::Key_V,
- this, TQT_SLOT (slotPasteInNewWindow ()), ac, "edit_paste_in_new_window");
+ TQt::CTRL + TQt::SHIFT + TQt::Key_V,
+ TQT_TQOBJECT(this), TQT_SLOT (slotPasteInNewWindow ()), ac, "edit_paste_in_new_window");
//m_actionDelete = KStdAction::clear (this, TQT_SLOT (slotDelete ()), ac);
m_actionDelete = new KAction (i18n ("&Delete Selection"), 0,
- this, TQT_SLOT (slotDelete ()), ac, "edit_clear");
+ TQT_TQOBJECT(this), TQT_SLOT (slotDelete ()), ac, "edit_clear");
- m_actionSelectAll = KStdAction::selectAll (this, TQT_SLOT (slotSelectAll ()), ac);
- m_actionDeselect = KStdAction::deselect (this, TQT_SLOT (slotDeselect ()), ac);
+ m_actionSelectAll = KStdAction::selectAll (TQT_TQOBJECT(this), TQT_SLOT (slotSelectAll ()), ac);
+ m_actionDeselect = KStdAction::deselect (TQT_TQOBJECT(this), TQT_SLOT (slotDeselect ()), ac);
m_actionCopyToFile = new KAction (i18n ("C&opy to File..."), 0,
- this, TQT_SLOT (slotCopyToFile ()), ac, "edit_copy_to_file");
+ TQT_TQOBJECT(this), TQT_SLOT (slotCopyToFile ()), ac, "edit_copy_to_file");
m_actionPasteFromFile = new KAction (i18n ("Paste &From File..."), 0,
- this, TQT_SLOT (slotPasteFromFile ()), ac, "edit_paste_from_file");
+ TQT_TQOBJECT(this), TQT_SLOT (slotPasteFromFile ()), ac, "edit_paste_from_file");
m_editMenuDocumentActionsEnabled = false;
@@ -129,8 +129,8 @@ void kpMainWindow::setupEditMenuActions ()
// Paste should always be enabled, as long as there is something paste
// (independent of whether we have a document or not)
- connect (TQApplication::clipboard (), TQT_SIGNAL (dataChanged ()),
- this, TQT_SLOT (slotEnablePaste ()));
+ connect (TQApplication::tqclipboard (), TQT_SIGNAL (dataChanged ()),
+ TQT_TQOBJECT(this), TQT_SLOT (slotEnablePaste ()));
slotEnablePaste ();
}
@@ -180,7 +180,7 @@ void kpMainWindow::slotCut ()
}
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
@@ -208,14 +208,14 @@ void kpMainWindow::slotCopy ()
}
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
kpSelection sel = *m_document->selection ();
// Transparency doesn't get sent across the aether so nuke it now
- // so that transparency mask doesn't get needlessly recalculated
+ // so that transparency tqmask doesn't get needlessly recalculated
// if we ever call sel.setPixmap().
sel.setTransparency (kpSelectionTransparency ());
@@ -223,8 +223,8 @@ void kpMainWindow::slotCopy ()
{
if (!sel.text ().isEmpty ())
{
- TQApplication::clipboard ()->setData (new TQTextDrag (sel.text ()),
- QClipboard::Clipboard);
+ TQApplication::tqclipboard ()->setData (new TQTextDrag (sel.text ()),
+ TQClipboard::Clipboard);
// SYNC: Normally, users highlight text and press CTRL+C.
// Highlighting text copies it to the X11 "middle
@@ -238,13 +238,13 @@ void kpMainWindow::slotCopy ()
// as no one ever middle-mouse-pastes images.
//
// Note that we don't share the TQTextDrag pointer with
- // the above in case Qt doesn't expect it.
+ // the above in case TQt doesn't expect it.
//
// Once we change KolourPaint to support highlighted text
// and CTRL+C to copy only the highlighted text, delete
// this code.
- TQApplication::clipboard ()->setData (new TQTextDrag (sel.text ()),
- QClipboard::Selection);
+ TQApplication::tqclipboard ()->setData (new TQTextDrag (sel.text ()),
+ TQClipboard::Selection);
}
}
else
@@ -256,20 +256,20 @@ void kpMainWindow::slotCopy ()
else
rawPixmap = m_document->getSelectedPixmap ();
- // Some apps, such as OpenOffice.org 2.0.4, ignore the image mask
+ // Some apps, such as OpenOffice.org 2.0.4, ignore the image tqmask
// when pasting. For transparent pixels, the uninitialized RGB
// values are used. Fix this by initializing those values to a
// neutral color -- white.
//
- // Strangely enough, OpenOffice.org respects the mask when inserting
+ // Strangely enough, OpenOffice.org respects the tqmask when inserting
// an image from a file, as opposed to pasting one from the clipboard.
sel.setPixmap (
kpPixmapFX::pixmapWithDefinedTransparentPixels (
rawPixmap,
- Qt::white)); // CONFIG
+ TQt::white)); // CONFIG
- TQApplication::clipboard ()->setData (new kpSelectionDrag (sel),
- QClipboard::Clipboard);
+ TQApplication::tqclipboard ()->setData (new kpSelectionDrag (sel),
+ TQClipboard::Clipboard);
}
TQApplication::restoreOverrideCursor ();
@@ -288,7 +288,7 @@ static bool HasSomethingToPaste (kpMainWindow *mw)
bool hasSomething = false;
- TQMimeSource *ms = TQApplication::clipboard ()->data (QClipboard::Clipboard);
+ TQMimeSource *ms = TQApplication::tqclipboard ()->data (TQClipboard::Clipboard);
if (ms)
{
// It's faster to test for TQTextDrag::canDecode() first due to the
@@ -311,7 +311,7 @@ static bool HasSomethingToPaste (kpMainWindow *mw)
return hasSomething;
}
-// HACK: SYNC: Non-Qt apps do not cause TQApplication::clipboard() to
+// HACK: SYNC: Non-TQt apps do not cause TQApplication::tqtqclipboard() to
// emit dataChanged(). We don't want to have our paste
// action disabled when we can actually paste something.
//
@@ -332,7 +332,7 @@ static bool HasSomethingToPasteWithDialogIfNot (kpMainWindow *mw)
#if 1
(void) mw;
#else
- TQApplication::setOverrideCursor (Qt::arrowCursor);
+ TQApplication::setOverrideCursor (TQt::arrowCursor);
KMessageBox::sorry (mw,
STRING_FREEZE_i18n ("<qt><p>There is nothing in the clipboard to paste.</p></qt>"),
@@ -428,7 +428,7 @@ void kpMainWindow::paste (const kpSelection &sel, bool forceTopLeft)
return;
}
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
@@ -482,8 +482,8 @@ void kpMainWindow::paste (const kpSelection &sel, bool forceTopLeft)
m_commandHistory->addCommand (
new kpToolResizeScaleCommand (
false/*act on doc, not sel*/,
- QMAX (sel.width (), m_document->width ()),
- QMAX (sel.height (), m_document->height ()),
+ TQMAX (sel.width (), m_document->width ()),
+ TQMAX (sel.height (), m_document->height ()),
kpToolResizeScaleCommand::Resize,
this));
}
@@ -509,18 +509,18 @@ void kpMainWindow::pasteText (const TQString &text,
// sync: restoreOverrideCursor() in all exit paths
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
- TQValueVector <TQString> textLines (1, TQString::null);
+ TQValueVector <TQString> textLines (1, TQString());
for (int i = 0; i < (int) text.length (); i++)
{
if (text [i] == '\n')
- textLines.push_back (TQString::null);
+ textLines.push_back (TQString());
else
textLines [textLines.size () - 1].append (text [i]);
}
@@ -544,7 +544,7 @@ void kpMainWindow::pasteText (const TQString &text,
{
macroCmd->addCommand (
new kpToolTextEnterCommand (
- TQString::null/*uninteresting child of macroCmd*/,
+ TQString()/*uninteresting child of macroCmd*/,
m_viewManager->textCursorRow (),
m_viewManager->textCursorCol (),
this));
@@ -552,7 +552,7 @@ void kpMainWindow::pasteText (const TQString &text,
macroCmd->addCommand (
new kpToolTextInsertCommand (
- TQString::null/*uninteresting child of macroCmd*/,
+ TQString()/*uninteresting child of macroCmd*/,
m_viewManager->textCursorRow (),
m_viewManager->textCursorCol (),
textLines [i],
@@ -585,9 +585,9 @@ void kpMainWindow::pasteText (const TQString &text,
}
- const int selWidth = QMAX (kpSelection::minimumWidthForTextStyle (ts),
+ const int selWidth = TQMAX (kpSelection::minimumWidthForTextStyle (ts),
width + kpSelection::textBorderSize () * 2);
- const int selHeight = QMAX (kpSelection::minimumHeightForTextStyle (ts),
+ const int selHeight = TQMAX (kpSelection::minimumHeightForTextStyle (ts),
height + kpSelection::textBorderSize () * 2);
kpSelection sel (TQRect (0, 0, selWidth, selHeight),
textLines,
@@ -620,7 +620,7 @@ void kpMainWindow::pasteTextAt (const TQString &text, const TQPoint &point,
<< ")" << endl;
#endif
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
@@ -666,7 +666,7 @@ void kpMainWindow::slotPaste ()
#endif
// sync: restoreOverrideCursor() in all exit paths
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
@@ -683,7 +683,7 @@ void kpMainWindow::slotPaste ()
// Acquire the pixmap
//
- TQMimeSource *ms = TQApplication::clipboard ()->data (QClipboard::Clipboard);
+ TQMimeSource *ms = TQApplication::tqclipboard ()->data (TQClipboard::Clipboard);
if (!ms)
{
kdError () << "kpMainWindow::slotPaste() without mimeSource" << endl;
@@ -763,7 +763,7 @@ void kpMainWindow::slotPasteInNewWindow ()
#endif
// sync: restoreOverrideCursor() in all exit paths
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
diff --git a/kolourpaint/kpmainwindow_file.cpp b/kolourpaint/kpmainwindow_file.cpp
index a3a10433..caf7a75d 100644
--- a/kolourpaint/kpmainwindow_file.cpp
+++ b/kolourpaint/kpmainwindow_file.cpp
@@ -67,41 +67,41 @@ void kpMainWindow::setupFileMenuActions ()
#endif
KActionCollection *ac = actionCollection ();
- m_actionNew = KStdAction::openNew (this, TQT_SLOT (slotNew ()), ac);
- m_actionOpen = KStdAction::open (this, TQT_SLOT (slotOpen ()), ac);
+ m_actionNew = KStdAction::openNew (TQT_TQOBJECT(this), TQT_SLOT (slotNew ()), ac);
+ m_actionOpen = KStdAction::open (TQT_TQOBJECT(this), TQT_SLOT (slotOpen ()), ac);
- m_actionOpenRecent = KStdAction::openRecent (this, TQT_SLOT (slotOpenRecent (const KURL &)), ac);
+ m_actionOpenRecent = KStdAction::openRecent (TQT_TQOBJECT(this), TQT_SLOT (slotOpenRecent (const KURL &)), ac);
m_actionOpenRecent->loadEntries (kapp->config ());
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\trecent URLs=" << m_actionOpenRecent->items () << endl;
#endif
- m_actionSave = KStdAction::save (this, TQT_SLOT (slotSave ()), ac);
- m_actionSaveAs = KStdAction::saveAs (this, TQT_SLOT (slotSaveAs ()), ac);
+ m_actionSave = KStdAction::save (TQT_TQOBJECT(this), TQT_SLOT (slotSave ()), ac);
+ m_actionSaveAs = KStdAction::saveAs (TQT_TQOBJECT(this), TQT_SLOT (slotSaveAs ()), ac);
m_actionExport = new KAction (i18n ("E&xport..."), 0,
- this, TQT_SLOT (slotExport ()), ac, "file_export");
+ TQT_TQOBJECT(this), TQT_SLOT (slotExport ()), ac, "file_export");
m_actionScan = new KAction (i18n ("Scan..."), SmallIcon ("scanner"), 0,
- this, TQT_SLOT (slotScan ()), ac, "file_scan");
+ TQT_TQOBJECT(this), TQT_SLOT (slotScan ()), ac, "file_scan");
//m_actionRevert = KStdAction::revert (this, TQT_SLOT (slotRevert ()), ac);
m_actionReload = new KAction (i18n ("Reloa&d"), KStdAccel::reload (),
- this, TQT_SLOT (slotReload ()), ac, "file_revert");
+ TQT_TQOBJECT(this), TQT_SLOT (slotReload ()), ac, "file_revert");
slotEnableReload ();
- m_actionPrint = KStdAction::print (this, TQT_SLOT (slotPrint ()), ac);
- m_actionPrintPreview = KStdAction::printPreview (this, TQT_SLOT (slotPrintPreview ()), ac);
+ m_actionPrint = KStdAction::print (TQT_TQOBJECT(this), TQT_SLOT (slotPrint ()), ac);
+ m_actionPrintPreview = KStdAction::printPreview (TQT_TQOBJECT(this), TQT_SLOT (slotPrintPreview ()), ac);
- m_actionMail = KStdAction::mail (this, TQT_SLOT (slotMail ()), ac);
+ m_actionMail = KStdAction::mail (TQT_TQOBJECT(this), TQT_SLOT (slotMail ()), ac);
m_actionSetAsWallpaperCentered = new KAction (i18n ("Set as Wa&llpaper (Centered)"), 0,
- this, TQT_SLOT (slotSetAsWallpaperCentered ()), ac, "file_set_as_wallpaper_centered");
+ TQT_TQOBJECT(this), TQT_SLOT (slotSetAsWallpaperCentered ()), ac, "file_set_as_wallpaper_centered");
m_actionSetAsWallpaperTiled = new KAction (i18n ("Set as Wallpaper (&Tiled)"), 0,
- this, TQT_SLOT (slotSetAsWallpaperTiled ()), ac, "file_set_as_wallpaper_tiled");
+ TQT_TQOBJECT(this), TQT_SLOT (slotSetAsWallpaperTiled ()), ac, "file_set_as_wallpaper_tiled");
- m_actionClose = KStdAction::close (this, TQT_SLOT (slotClose ()), ac);
- m_actionQuit = KStdAction::quit (this, TQT_SLOT (slotQuit ()), ac);
+ m_actionClose = KStdAction::close (TQT_TQOBJECT(this), TQT_SLOT (slotClose ()), ac);
+ m_actionQuit = KStdAction::quit (TQT_TQOBJECT(this), TQT_SLOT (slotQuit ()), ac);
m_scanDialog = 0;
@@ -247,8 +247,8 @@ TQSize kpMainWindow::defaultDocSize () const
{
// Don't get too big or you'll thrash (or even lock up) the computer
// just by opening a window
- docSize = TQSize (QMIN (2048, docSize.width ()),
- QMIN (2048, docSize.height ()));
+ docSize = TQSize (TQMIN (2048, docSize.width ()),
+ TQMIN (2048, docSize.height ()));
}
return docSize;
@@ -370,7 +370,7 @@ void kpMainWindow::slotOpen ()
const KURL::List urls = askForOpenURLs (i18n ("Open Image"),
- m_document ? m_document->url ().url () : TQString::null);
+ m_document ? m_document->url ().url () : TQString());
for (KURL::List::const_iterator it = urls.begin ();
it != urls.end ();
@@ -548,7 +548,7 @@ bool kpMainWindow::save (bool localOnly)
{
if (m_document->url ().isEmpty () ||
KImageIO::mimeTypes (KImageIO::Writing)
- .findIndex (m_document->saveOptions ()->mimeType ()) < 0 ||
+ .tqfindIndex (m_document->saveOptions ()->mimeType ()) < 0 ||
// SYNC: kpDocument::getPixmapFromFile() can't determine quality
// from file so it has been set initially to an invalid value.
(m_document->saveOptions ()->mimeTypeHasConfigurableQuality () &&
@@ -639,7 +639,7 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption,
}
#define MIME_TYPE_IS_VALID() (!fdSaveOptions.mimeTypeIsInvalid () && \
- mimeTypes.findIndex (fdSaveOptions.mimeType ()) >= 0)
+ mimeTypes.tqfindIndex (fdSaveOptions.mimeType ()) >= 0)
if (!MIME_TYPE_IS_VALID ())
{
#if DEBUG_KP_MAIN_WINDOW
@@ -658,9 +658,9 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption,
kdDebug () << "\tmimeType=" << fdSaveOptions.mimeType ()
<< " not valid, get hardcoded" << endl;
#endif
- if (mimeTypes.findIndex ("image/png") > -1)
+ if (mimeTypes.tqfindIndex ("image/png") > -1)
fdSaveOptions.setMimeType ("image/png");
- else if (mimeTypes.findIndex ("image/x-bmp") > -1)
+ else if (mimeTypes.tqfindIndex ("image/x-bmp") > -1)
fdSaveOptions.setMimeType ("image/x-bmp");
else
fdSaveOptions.setMimeType (mimeTypes.first ());
@@ -692,7 +692,7 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption,
docMetaInfo,
this);
- KFileDialog fd (startURL, TQString::null, this, "fd", true/*modal*/,
+ KFileDialog fd (startURL, TQString(), this, "fd", true/*modal*/,
saveOptionsWidget);
saveOptionsWidget->setVisualParent (&fd);
fd.setCaption (caption);
@@ -898,7 +898,7 @@ bool kpMainWindow::slotReload ()
"Reloading will lose all changes since you last saved it.\n"
"Are you sure?")
.arg (m_document->prettyFilename ()),
- TQString::null/*caption*/,
+ TQString()/*caption*/,
i18n ("&Reload"));
}
else
@@ -908,7 +908,7 @@ bool kpMainWindow::slotReload ()
"Reloading will lose all changes.\n"
"Are you sure?")
.arg (m_document->prettyFilename ()),
- TQString::null/*caption*/,
+ TQString()/*caption*/,
i18n ("&Reload"));
}
@@ -964,7 +964,7 @@ void kpMainWindow::sendFilenameToPrinter (KPrinter *printer)
int dot;
TQString fileName = url.fileName ();
- dot = fileName.findRev ('.');
+ dot = fileName.tqfindRev ('.');
// file.ext but not .hidden-file?
if (dot > 0)
@@ -1045,7 +1045,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
#endif
// Image DPI invalid (e.g. new image, could not read from file
- // or Qt3 doesn't implement DPI for JPEG)?
+ // or TQt3 doesn't implement DPI for JPEG)?
if (pixmapDotsPerMeterX < 1 || pixmapDotsPerMeterY < 1)
{
// Even if just one DPI dimension is invalid, mutate both DPI
@@ -1113,7 +1113,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
/ dpiX;
const double scaleDpiY = (pixmap.height () / (printerHeightMM / 25.4))
/ dpiY;
- const double scaleDpi = QMAX (scaleDpiX, scaleDpiY);
+ const double scaleDpi = TQMAX (scaleDpiX, scaleDpiY);
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tscaleDpi: x=" << scaleDpiX << " y=" << scaleDpiY
<< " --> scale at " << scaleDpi << " to fit?"
@@ -1145,7 +1145,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
#endif
kpPixmapFX::scale (&pixmap,
pixmap.width (),
- QMAX (1, qRound (pixmap.height () * dpiX / dpiY)),
+ TQMAX (1, tqRound (pixmap.height () * dpiX / dpiY)),
false/*don't antialias*/);
dpiY = dpiX;
@@ -1157,7 +1157,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
<< dpiY << endl;
#endif
kpPixmapFX::scale (&pixmap,
- QMAX (1, qRound (pixmap.width () * dpiY / dpiX)),
+ TQMAX (1, tqRound (pixmap.width () * dpiY / dpiX)),
pixmap.height (),
false/*don't antialias*/);
@@ -1167,7 +1167,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
// ASSERT: dpiX == dpiY
// TQPrinter::setResolution() has to be called before TQPrinter::setup().
- printer->setResolution (QMAX (1, qRound (dpiX)));
+ printer->setResolution (TQMAX (1, tqRound (dpiX)));
double originX = 0, originY = 0;
@@ -1199,7 +1199,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
// Send pixmap to printer.
TQPainter painter;
painter.begin (printer);
- painter.drawPixmap (qRound (originX), qRound (originY), pixmap);
+ painter.drawPixmap (tqRound (originX), tqRound (originY), pixmap);
painter.end ();
}
@@ -1224,7 +1224,7 @@ void kpMainWindow::slotPrintPreview ()
// TODO: get it to reflect default printer's settings
KPrinter printer (false/*separate settings from ordinary printer*/);
- // TODO: pass "this" as parent
+ // TODO: pass "this" as tqparent
printer.setPreviewOnly (true);
sendPixmapToPrinter (&printer, false/*don't showPrinterSetupDialog*/);
@@ -1244,7 +1244,7 @@ void kpMainWindow::slotMail ()
int result = KMessageBox::questionYesNo (this,
i18n ("You must save this image before sending it.\n"
"Do you want to save it?"),
- TQString::null,
+ TQString(),
KStdGuiItem::save (), KStdGuiItem::cancel ());
if (result == KMessageBox::Yes)
@@ -1263,12 +1263,12 @@ void kpMainWindow::slotMail ()
}
kapp->invokeMailer (
- TQString::null/*to*/,
- TQString::null/*cc*/,
- TQString::null/*bcc*/,
+ TQString()/*to*/,
+ TQString()/*cc*/,
+ TQString()/*bcc*/,
m_document->prettyFilename()/*subject*/,
- TQString::null/*body*/,
- TQString::null/*messageFile*/,
+ TQString()/*body*/,
+ TQString()/*messageFile*/,
TQStringList (m_document->url ().url ())/*attachments*/);
}
@@ -1297,7 +1297,7 @@ void kpMainWindow::setAsWallpaper (bool centered)
}
int result = KMessageBox::questionYesNo (this,
- question, TQString::null,
+ question, TQString(),
KStdGuiItem::save (), KStdGuiItem::cancel ());
if (result == KMessageBox::Yes)
diff --git a/kolourpaint/kpmainwindow_help.cpp b/kolourpaint/kpmainwindow_help.cpp
index 9d69143c..78ec0265 100644
--- a/kolourpaint/kpmainwindow_help.cpp
+++ b/kolourpaint/kpmainwindow_help.cpp
@@ -57,7 +57,7 @@ void kpMainWindow::setupHelpMenuActions ()
// -- Thurston
d->m_actionHelpTakingScreenshots = new KAction (
i18n ("Acquiring &Screenshots"), 0,
- this, TQT_SLOT (slotHelpTakingScreenshots ()),
+ TQT_TQOBJECT(this), TQT_SLOT (slotHelpTakingScreenshots ()),
ac, "help_taking_screenshots");
@@ -92,7 +92,7 @@ static TQString printScreenShortcutString ()
else
{
// (localised)
- return KKey (Qt::CTRL + Qt::Key_Print).toString ();
+ return KKey (TQt::CTRL + TQt::Key_Print).toString ();
}
}
@@ -114,7 +114,7 @@ void kpMainWindow::slotHelpTakingScreenshots ()
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tdcopApps=" << dcopApps << endl;
#endif
- bool isRunningKDE = (dcopApps.findIndex ("kwin") >= 0);
+ bool isRunningKDE = (dcopApps.tqfindIndex ("kwin") >= 0);
#if 0
{
@@ -188,7 +188,7 @@ void kpMainWindow::slotHelpTakingScreenshots ()
disconnect (messageLabel, TQT_SIGNAL (linkClicked (const TQString &)),
messageLabel, TQT_SLOT (openLink (const TQString &)));
connect (messageLabel, TQT_SIGNAL (linkClicked (const TQString &)),
- this, TQT_SLOT (slotHelpTakingScreenshotsFollowLink (const TQString &)));
+ TQT_TQOBJECT(this), TQT_SLOT (slotHelpTakingScreenshotsFollowLink (const TQString &)));
dlg.setMainWidget (messageLabel);
diff --git a/kolourpaint/kpmainwindow_image.cpp b/kolourpaint/kpmainwindow_image.cpp
index a00f0fd3..7de1b158 100644
--- a/kolourpaint/kpmainwindow_image.cpp
+++ b/kolourpaint/kpmainwindow_image.cpp
@@ -89,38 +89,38 @@ void kpMainWindow::setupImageMenuActions ()
{
KActionCollection *ac = actionCollection ();
- m_actionResizeScale = new KAction (i18n ("R&esize / Scale..."), Qt::CTRL + Qt::Key_E,
- this, TQT_SLOT (slotResizeScale ()), ac, "image_resize_scale");
+ m_actionResizeScale = new KAction (i18n ("R&esize / Scale..."), TQt::CTRL + TQt::Key_E,
+ TQT_TQOBJECT(this), TQT_SLOT (slotResizeScale ()), ac, "image_resize_scale");
- m_actionCrop = new KAction (i18n ("Se&t as Image (Crop)"), Qt::CTRL + Qt::Key_T,
- this, TQT_SLOT (slotCrop ()), ac, "image_crop");
+ m_actionCrop = new KAction (i18n ("Se&t as Image (Crop)"), TQt::CTRL + TQt::Key_T,
+ TQT_TQOBJECT(this), TQT_SLOT (slotCrop ()), ac, "image_crop");
- m_actionAutoCrop = new KAction (autoCropText (), Qt::CTRL + Qt::Key_U,
- this, TQT_SLOT (slotAutoCrop ()), ac, "image_auto_crop");
+ m_actionAutoCrop = new KAction (autoCropText (), TQt::CTRL + TQt::Key_U,
+ TQT_TQOBJECT(this), TQT_SLOT (slotAutoCrop ()), ac, "image_auto_crop");
- m_actionFlip = new KAction (i18n ("&Flip..."), Qt::CTRL + Qt::Key_F,
- this, TQT_SLOT (slotFlip ()), ac, "image_flip");
+ m_actionFlip = new KAction (i18n ("&Flip..."), TQt::CTRL + TQt::Key_F,
+ TQT_TQOBJECT(this), TQT_SLOT (slotFlip ()), ac, "image_flip");
- m_actionRotate = new KAction (i18n ("&Rotate..."), Qt::CTRL + Qt::Key_R,
- this, TQT_SLOT (slotRotate ()), ac, "image_rotate");
+ m_actionRotate = new KAction (i18n ("&Rotate..."), TQt::CTRL + TQt::Key_R,
+ TQT_TQOBJECT(this), TQT_SLOT (slotRotate ()), ac, "image_rotate");
- m_actionSkew = new KAction (i18n ("S&kew..."), Qt::CTRL + Qt::Key_K,
- this, TQT_SLOT (slotSkew ()), ac, "image_skew");
+ m_actionSkew = new KAction (i18n ("S&kew..."), TQt::CTRL + TQt::Key_K,
+ TQT_TQOBJECT(this), TQT_SLOT (slotSkew ()), ac, "image_skew");
m_actionConvertToBlackAndWhite = new KAction (i18n ("Reduce to Mo&nochrome (Dithered)"), 0,
- this, TQT_SLOT (slotConvertToBlackAndWhite ()), ac, "image_convert_to_black_and_white");
+ TQT_TQOBJECT(this), TQT_SLOT (slotConvertToBlackAndWhite ()), ac, "image_convert_to_black_and_white");
m_actionConvertToGrayscale = new KAction (i18n ("Reduce to &Grayscale"), 0,
- this, TQT_SLOT (slotConvertToGrayscale ()), ac, "image_convert_to_grayscale");
+ TQT_TQOBJECT(this), TQT_SLOT (slotConvertToGrayscale ()), ac, "image_convert_to_grayscale");
- m_actionInvertColors = new KAction (i18n ("&Invert Colors"), Qt::CTRL + Qt::Key_I,
- this, TQT_SLOT (slotInvertColors ()), ac, "image_invert_colors");
+ m_actionInvertColors = new KAction (i18n ("&Invert Colors"), TQt::CTRL + TQt::Key_I,
+ TQT_TQOBJECT(this), TQT_SLOT (slotInvertColors ()), ac, "image_invert_colors");
- m_actionClear = new KAction (i18n ("C&lear"), Qt::CTRL + Qt::SHIFT + Qt::Key_N,
- this, TQT_SLOT (slotClear ()), ac, "image_clear");
+ m_actionClear = new KAction (i18n ("C&lear"), TQt::CTRL + TQt::SHIFT + TQt::Key_N,
+ TQT_TQOBJECT(this), TQT_SLOT (slotClear ()), ac, "image_clear");
- m_actionMoreEffects = new KAction (i18n ("&More Effects..."), Qt::CTRL + Qt::Key_M,
- this, TQT_SLOT (slotMoreEffects ()), ac, "image_more_effects");
+ m_actionMoreEffects = new KAction (i18n ("&More Effects..."), TQt::CTRL + TQt::Key_M,
+ TQT_TQOBJECT(this), TQT_SLOT (slotMoreEffects ()), ac, "image_more_effects");
enableImageMenuDocumentActions (false);
}
@@ -260,7 +260,7 @@ void kpMainWindow::addImageOrSelectionCommand (kpCommand *cmd,
kpMacroCommand *macroCmd = new kpMacroCommand (cmd->name (), this);
macroCmd->addCommand (new kpToolSelectionPullFromDocumentCommand (
- TQString::null/*uninteresting child of macro cmd*/,
+ TQString()/*uninteresting child of macro cmd*/,
this));
macroCmd->addCommand (cmd);
diff --git a/kolourpaint/kpmainwindow_settings.cpp b/kolourpaint/kpmainwindow_settings.cpp
index 9e3914e8..c9ce8b74 100644
--- a/kolourpaint/kpmainwindow_settings.cpp
+++ b/kolourpaint/kpmainwindow_settings.cpp
@@ -57,19 +57,19 @@ void kpMainWindow::setupSettingsMenuActions ()
createStandardStatusBarAction ();
- m_actionFullScreen = KStdAction::fullScreen (this, TQT_SLOT (slotFullScreen ()), ac,
+ m_actionFullScreen = KStdAction::fullScreen (TQT_TQOBJECT(this), TQT_SLOT (slotFullScreen ()), ac,
this/*window*/);
m_actionShowPath = new KToggleAction (i18n ("Show &Path"), 0,
- this, TQT_SLOT (slotShowPathToggled ()), ac, "settings_show_path");
+ TQT_TQOBJECT(this), TQT_SLOT (slotShowPathToggled ()), ac, "settings_show_path");
m_actionShowPath->setCheckedState (i18n ("Hide &Path"));
slotEnableSettingsShowPath ();
- m_actionKeyBindings = KStdAction::keyBindings (this, TQT_SLOT (slotKeyBindings ()), ac);
- m_actionConfigureToolbars = KStdAction::configureToolbars (this, TQT_SLOT (slotConfigureToolBars ()), ac);
- // m_actionConfigure = KStdAction::preferences (this, TQT_SLOT (slotConfigure ()), ac);
+ m_actionKeyBindings = KStdAction::keyBindings (TQT_TQOBJECT(this), TQT_SLOT (slotKeyBindings ()), ac);
+ m_actionConfigureToolbars = KStdAction::configureToolbars (TQT_TQOBJECT(this), TQT_SLOT (slotConfigureToolBars ()), ac);
+ // m_actionConfigure = KStdAction::preferences (TQT_TQOBJECT(this), TQT_SLOT (slotConfigure ()), ac);
enableSettingsMenuDocumentActions (false);
@@ -168,9 +168,9 @@ void kpMainWindow::slotConfigureToolBars ()
//saveMainWindowSettings (kapp->config (), autoSaveGroup ());
KEditToolbar dialog (actionCollection (),
- TQString::null/*default ui.rc file*/,
+ TQString()/*default ui.rc file*/,
true/*global resource*/,
- this/*parent*/);
+ this/*tqparent*/);
// Clicking on OK after Apply brings up the dialog (below) again.
// Bug with KEditToolBar.
dialog.showButtonApply (false);
@@ -195,7 +195,7 @@ void kpMainWindow::slotNewToolBarConfig ()
KMessageBox::information (this,
i18n ("You have to restart KolourPaint for these changes to take effect."),
i18n ("Toolbar Settings Changed"),
- TQString::fromLatin1 ("ToolBarSettingsChanged"));
+ TQString::tqfromLatin1 ("ToolBarSettingsChanged"));
//createGUI();
//applyMainWindowSettings (kapp->config (), autoSaveGroup ());
diff --git a/kolourpaint/kpmainwindow_statusbar.cpp b/kolourpaint/kpmainwindow_statusbar.cpp
index ba3b8702..bc1bc296 100644
--- a/kolourpaint/kpmainwindow_statusbar.cpp
+++ b/kolourpaint/kpmainwindow_statusbar.cpp
@@ -56,7 +56,7 @@ void kpMainWindow::addPermanentStatusBarItem (int id, int maxTextLen)
maxTextLen); //+ 2/*spaces on either side*/);
sb->insertFixedItem (textWithMaxLen, id, true/*permanent, place on the right*/);
- sb->changeItem (TQString::null, id);
+ sb->changeItem (TQString(), id);
}
// private
@@ -67,8 +67,8 @@ void kpMainWindow::createStatusBar ()
// 9999 pixels "ought to be enough for anybody"
const int maxDimenLength = 4;
- //sb->insertItem (TQString::null, StatusBarItemMessage, 1/*stretch*/);
- //sb->setItemAlignment (StatusBarItemMessage, Qt::AlignLeft | Qt::AlignVCenter);
+ //sb->insertItem (TQString(), StatusBarItemMessage, 1/*stretch*/);
+ //sb->setItemAlignment (StatusBarItemMessage, TQt::AlignLeft | TQt::AlignVCenter);
m_statusBarMessageLabel = new kpSqueezedTextLabel (sb);
//m_statusBarMessageLabel->setShowEllipsis (false);
@@ -137,7 +137,7 @@ void kpMainWindow::setStatusBarShapePoints (const TQPoint &startPoint,
if (startPoint == KP_INVALID_POINT)
{
- statusBar ()->changeItem (TQString::null, StatusBarItemShapePoints);
+ statusBar ()->changeItem (TQString(), StatusBarItemShapePoints);
}
else if (endPoint == KP_INVALID_POINT)
{
@@ -185,7 +185,7 @@ void kpMainWindow::setStatusBarShapeSize (const TQSize &size)
if (size == KP_INVALID_SIZE)
{
- statusBar ()->changeItem (TQString::null, StatusBarItemShapeSize);
+ statusBar ()->changeItem (TQString(), StatusBarItemShapeSize);
}
else
{
@@ -214,7 +214,7 @@ void kpMainWindow::setStatusBarDocSize (const TQSize &size)
if (size == KP_INVALID_SIZE)
{
- statusBar ()->changeItem (TQString::null, StatusBarItemDocSize);
+ statusBar ()->changeItem (TQString(), StatusBarItemDocSize);
}
else
{
@@ -240,7 +240,7 @@ void kpMainWindow::setStatusBarDocDepth (int depth)
if (depth <= 0)
{
- statusBar ()->changeItem (TQString::null, StatusBarItemDocDepth);
+ statusBar ()->changeItem (TQString(), StatusBarItemDocDepth);
}
else
{
@@ -264,7 +264,7 @@ void kpMainWindow::setStatusBarZoom (int zoom)
if (zoom <= 0)
{
- statusBar ()->changeItem (TQString::null, StatusBarItemZoom);
+ statusBar ()->changeItem (TQString(), StatusBarItemZoom);
}
else
{
@@ -289,7 +289,7 @@ void kpMainWindow::recalculateStatusBarMessage ()
#endif
// HACK: To work around kpViewScrollableContainer's unreliable
- // status messages (which in turn is due to Qt not updating
+ // status messages (which in turn is due to TQt not updating
// TQWidget::hasMouse() on drags and we needing to hack around it)
if (!scrollViewMessage.isEmpty () &&
m_scrollView->newDocSize ().isEmpty () &&
@@ -303,7 +303,7 @@ void kpMainWindow::recalculateStatusBarMessage ()
m_scrollView->clearStatusMessage ();
m_scrollView->blockSignals (false);
- scrollViewMessage = TQString::null;
+ scrollViewMessage = TQString();
#if DEBUG_STATUS_BAR && 1
kdDebug () << "\t\t\tdone" << endl;
#endif
diff --git a/kolourpaint/kpmainwindow_text.cpp b/kolourpaint/kpmainwindow_text.cpp
index 233ba5b5..859e33f0 100644
--- a/kolourpaint/kpmainwindow_text.cpp
+++ b/kolourpaint/kpmainwindow_text.cpp
@@ -50,22 +50,22 @@ void kpMainWindow::setupTextToolBarActions ()
KActionCollection *ac = actionCollection ();
m_actionTextFontFamily = new KFontAction (i18n ("Font Family"), 0/*shortcut*/,
- this, TQT_SLOT (slotTextFontFamilyChanged ()), ac, "text_font_family");
+ TQT_TQOBJECT(this), TQT_SLOT (slotTextFontFamilyChanged ()), ac, "text_font_family");
m_actionTextFontSize = new KFontSizeAction (i18n ("Font Size"), 0/*shortcut*/,
- this, TQT_SLOT (slotTextFontSizeChanged ()), ac, "text_font_size");
+ TQT_TQOBJECT(this), TQT_SLOT (slotTextFontSizeChanged ()), ac, "text_font_size");
m_actionTextBold = new KToggleAction (i18n ("Bold"),
"text_bold"/*icon*/, 0/*shortcut*/,
- this, TQT_SLOT (slotTextBoldChanged ()), ac, "text_bold");
+ TQT_TQOBJECT(this), TQT_SLOT (slotTextBoldChanged ()), ac, "text_bold");
m_actionTextItalic = new KToggleAction (i18n ("Italic"),
"text_italic"/*icon*/, 0/*shortcut*/,
- this, TQT_SLOT (slotTextItalicChanged ()), ac, "text_italic");
+ TQT_TQOBJECT(this), TQT_SLOT (slotTextItalicChanged ()), ac, "text_italic");
m_actionTextUnderline = new KToggleAction (i18n ("Underline"),
"text_under"/*icon*/, 0/*shortcut*/,
- this, TQT_SLOT (slotTextUnderlineChanged ()), ac, "text_underline");
+ TQT_TQOBJECT(this), TQT_SLOT (slotTextUnderlineChanged ()), ac, "text_underline");
m_actionTextStrikeThru = new KToggleAction (i18n ("Strike Through"),
"text_strike"/*icon*/, 0/*shortcut*/,
- this, TQT_SLOT (slotTextStrikeThruChanged ()), ac, "text_strike_thru");
+ TQT_TQOBJECT(this), TQT_SLOT (slotTextStrikeThruChanged ()), ac, "text_strike_thru");
readAndApplyTextSettings ();
@@ -80,7 +80,7 @@ void kpMainWindow::readAndApplyTextSettings ()
KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupText);
KConfigBase *cfg = cfgGroupSaver.config ();
- m_actionTextFontFamily->setFont (cfg->readEntry (kpSettingFontFamily, TQString::fromLatin1 ("Times")));
+ m_actionTextFontFamily->setFont (cfg->readEntry (kpSettingFontFamily, TQString::tqfromLatin1 ("Times")));
m_actionTextFontSize->setFontSize (cfg->readNumEntry (kpSettingFontSize, 14));
m_actionTextBold->setChecked (cfg->readBoolEntry (kpSettingBold, false));
m_actionTextItalic->setChecked (cfg->readBoolEntry (kpSettingItalic, false));
diff --git a/kolourpaint/kpmainwindow_tools.cpp b/kolourpaint/kpmainwindow_tools.cpp
index de48e1df..e4832f59 100644
--- a/kolourpaint/kpmainwindow_tools.cpp
+++ b/kolourpaint/kpmainwindow_tools.cpp
@@ -102,24 +102,24 @@ void kpMainWindow::setupToolActions ()
m_actionPrevToolOptionGroup1 = new kpSingleKeyTriggersAction (
i18n ("Previous Tool Option (Group #1)"),
- kpTool::shortcutForKey (Qt::Key_1),
- this, TQT_SLOT (slotActionPrevToolOptionGroup1 ()),
+ kpTool::shortcutForKey (TQt::Key_1),
+ TQT_TQOBJECT(this), TQT_SLOT (slotActionPrevToolOptionGroup1 ()),
ac, "prev_tool_option_group_1");
m_actionNextToolOptionGroup1 = new kpSingleKeyTriggersAction (
i18n ("Next Tool Option (Group #1)"),
- kpTool::shortcutForKey (Qt::Key_2),
- this, TQT_SLOT (slotActionNextToolOptionGroup1 ()),
+ kpTool::shortcutForKey (TQt::Key_2),
+ TQT_TQOBJECT(this), TQT_SLOT (slotActionNextToolOptionGroup1 ()),
ac, "next_tool_option_group_1");
m_actionPrevToolOptionGroup2 = new kpSingleKeyTriggersAction (
i18n ("Previous Tool Option (Group #2)"),
- kpTool::shortcutForKey (Qt::Key_3),
- this, TQT_SLOT (slotActionPrevToolOptionGroup2 ()),
+ kpTool::shortcutForKey (TQt::Key_3),
+ TQT_TQOBJECT(this), TQT_SLOT (slotActionPrevToolOptionGroup2 ()),
ac, "prev_tool_option_group_2");
m_actionNextToolOptionGroup2 = new kpSingleKeyTriggersAction (
i18n ("Next Tool Option (Group #2)"),
- kpTool::shortcutForKey (Qt::Key_4),
- this, TQT_SLOT (slotActionNextToolOptionGroup2 ()),
+ kpTool::shortcutForKey (TQt::Key_4),
+ TQT_TQOBJECT(this), TQT_SLOT (slotActionNextToolOptionGroup2 ()),
ac, "next_tool_option_group_2");
}
@@ -289,7 +289,7 @@ void kpMainWindow::setSelectionTransparency (const kpSelectionTransparency &tran
{
#if DEBUG_KP_MAIN_WINDOW && 1
kdDebug () << "kpMainWindow::setSelectionTransparency() isOpaque=" << transparency.isOpaque ()
- << " color=" << (transparency.transparentColor ().isValid () ? (int *) transparency.transparentColor ().toQRgb () : 0)
+ << " color=" << (transparency.transparentColor ().isValid () ? (int *) transparency.transparentColor ().toTQRgb () : 0)
<< " forceColorChange=" << forceColorChange
<< endl;
#endif
diff --git a/kolourpaint/kpmainwindow_view.cpp b/kolourpaint/kpmainwindow_view.cpp
index 5459f1a7..b1fbdf67 100644
--- a/kolourpaint/kpmainwindow_view.cpp
+++ b/kolourpaint/kpmainwindow_view.cpp
@@ -67,18 +67,18 @@ void kpMainWindow::setupViewMenuActions ()
m_actionFullScreen->setEnabled (false);*/
- m_actionActualSize = KStdAction::actualSize (this, TQT_SLOT (slotActualSize ()), ac);
- /*m_actionFitToPage = KStdAction::fitToPage (this, TQT_SLOT (slotFitToPage ()), ac);
- m_actionFitToWidth = KStdAction::fitToWidth (this, TQT_SLOT (slotFitToWidth ()), ac);
- m_actionFitToHeight = KStdAction::fitToHeight (this, TQT_SLOT (slotFitToHeight ()), ac);*/
+ m_actionActualSize = KStdAction::actualSize (TQT_TQOBJECT(this), TQT_SLOT (slotActualSize ()), ac);
+ /*m_actionFitToPage = KStdAction::fitToPage (TQT_TQOBJECT(this), TQT_SLOT (slotFitToPage ()), ac);
+ m_actionFitToWidth = KStdAction::fitToWidth (TQT_TQOBJECT(this), TQT_SLOT (slotFitToWidth ()), ac);
+ m_actionFitToHeight = KStdAction::fitToHeight (TQT_TQOBJECT(this), TQT_SLOT (slotFitToHeight ()), ac);*/
- m_actionZoomIn = KStdAction::zoomIn (this, TQT_SLOT (slotZoomIn ()), ac);
- m_actionZoomOut = KStdAction::zoomOut (this, TQT_SLOT (slotZoomOut ()), ac);
+ m_actionZoomIn = KStdAction::zoomIn (TQT_TQOBJECT(this), TQT_SLOT (slotZoomIn ()), ac);
+ m_actionZoomOut = KStdAction::zoomOut (TQT_TQOBJECT(this), TQT_SLOT (slotZoomOut ()), ac);
m_actionZoom = new KSelectAction (i18n ("&Zoom"), 0,
- this, TQT_SLOT (slotZoom ()), actionCollection (), "view_zoom_to");
+ TQT_TQOBJECT(this), TQT_SLOT (slotZoom ()), actionCollection (), "view_zoom_to");
m_actionZoom->setEditable (true);
// create the zoom list for the 1st call to zoomTo() below
@@ -91,7 +91,7 @@ void kpMainWindow::setupViewMenuActions ()
m_actionShowGrid = new KToggleAction (i18n ("Show &Grid"), CTRL + Key_G,
- this, TQT_SLOT (slotShowGridToggled ()), actionCollection (), "view_show_grid");
+ TQT_TQOBJECT(this), TQT_SLOT (slotShowGridToggled ()), actionCollection (), "view_show_grid");
m_actionShowGrid->setCheckedState (i18n ("Hide &Grid"));
@@ -99,12 +99,12 @@ void kpMainWindow::setupViewMenuActions ()
// Testcase: Press CTRL+H twice on a fresh KolourPaint.
// The second CTRL+H doesn't close the thumbnail.
m_actionShowThumbnail = new KToggleAction (i18n ("Show T&humbnail"), CTRL + Key_H,
- this, TQT_SLOT (slotShowThumbnailToggled ()), actionCollection (), "view_show_thumbnail");
+ TQT_TQOBJECT(this), TQT_SLOT (slotShowThumbnailToggled ()), actionCollection (), "view_show_thumbnail");
m_actionShowThumbnail->setCheckedState (i18n ("Hide T&humbnail"));
// Please do not use setCheckedState() here - it wouldn't make sense
m_actionZoomedThumbnail = new KToggleAction (i18n ("Zoo&med Thumbnail Mode"), 0,
- this, TQT_SLOT (slotZoomedThumbnailToggled ()), actionCollection (), "view_zoomed_thumbnail");
+ TQT_TQOBJECT(this), TQT_SLOT (slotZoomedThumbnailToggled ()), actionCollection (), "view_zoomed_thumbnail");
// For consistency with the above action, don't use setCheckedState()
//
@@ -114,7 +114,7 @@ void kpMainWindow::setupViewMenuActions ()
d->m_actionShowThumbnailRectangle = new KToggleAction (
i18n ("Enable Thumbnail &Rectangle"),
0,
- this, TQT_SLOT (slotThumbnailShowRectangleToggled ()),
+ TQT_TQOBJECT(this), TQT_SLOT (slotThumbnailShowRectangleToggled ()),
actionCollection (), "view_show_thumbnail_rectangle");
@@ -238,7 +238,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
"results in imprecise editing and redraw glitches.\n"
"Do you really want to set to zoom level to %1%?")
.arg (zoomLevel),
- TQString::null/*caption*/,
+ TQString()/*caption*/,
i18n ("Set Zoom Level to %1%").arg (zoomLevel),
"DoNotAskAgain_ZoomLevelNotMultipleOf100") != KMessageBox::Continue)
{
@@ -289,7 +289,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
// Ordinary flicker is better than the whole view moving
TQPainter p (m_mainView);
p.fillRect (m_mainView->rect (),
- m_scrollView->viewport ()->colorGroup ().background ());
+ m_scrollView->viewport ()->tqcolorGroup ().background ());
}
}
@@ -311,7 +311,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
<< endl;
#endif
- // TODO: when changing from no scrollbars to scrollbars, Qt lies about
+ // TODO: when changing from no scrollbars to scrollbars, TQt lies about
// visibleWidth() & visibleHeight() (doesn't take into account the
// space taken by the would-be scrollbars) until it updates the
// scrollview; hence the centring is off by about 5-10 pixels.
@@ -344,10 +344,10 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
else
{
viewX = m_scrollView->contentsX () +
- QMIN (m_mainView->width (),
+ TQMIN (m_mainView->width (),
m_scrollView->visibleWidth ()) / 2;
viewY = m_scrollView->contentsY () +
- QMIN (m_mainView->height (),
+ TQMIN (m_mainView->height (),
m_scrollView->visibleHeight ()) / 2;
}
@@ -404,7 +404,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
<< endl;
#endif
- if (vuc->clipRegion ().contains (viewPoint))
+ if (vuc->clipRegion ().tqcontains (viewPoint))
{
const TQPoint globalPoint =
kpWidgetMapper::toGlobal (vuc, viewPoint);
@@ -505,13 +505,13 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
#endif
#endif
- // HACK: make sure all of Qt's update() calls trigger
+ // HACK: make sure all of TQt's update() calls trigger
// kpView::paintEvent() _now_ so that they can be queued by us
// (until kpViewManager::restoreQueueUpdates()) to reduce flicker
// caused mainly by m_scrollView->center()
//
// TODO: remove flicker completely
- //TQTimer::singleShot (0, this, TQT_SLOT (finishZoomTo ()));
+ //TQTimer::singleShot (0, TQT_TQOBJECT(this), TQT_SLOT (finishZoomTo ()));
// Later: I don't think there is an update() that needs to be queued
// - let's reduce latency instead.
@@ -626,7 +626,7 @@ void kpMainWindow::slotFitToPage ()
// doc_height * zoom / 100 <= view_height &&
// 1 <= zoom <= 3200
- zoomTo (QMIN (3200, QMAX (1, QMIN (m_scrollView->visibleWidth () * 100 / m_document->width (),
+ zoomTo (TQMIN (3200, TQMAX (1, TQMIN (m_scrollView->visibleWidth () * 100 / m_document->width (),
m_scrollView->visibleHeight () * 100 / m_document->height ()))));
}
@@ -639,7 +639,7 @@ void kpMainWindow::slotFitToWidth ()
// doc_width * zoom / 100 <= view_width &&
// 1 <= zoom <= 3200
- zoomTo (QMIN (3200, QMAX (1, m_scrollView->visibleWidth () * 100 / m_document->width ())));
+ zoomTo (TQMIN (3200, TQMAX (1, m_scrollView->visibleWidth () * 100 / m_document->width ())));
}
// private slot
@@ -651,7 +651,7 @@ void kpMainWindow::slotFitToHeight ()
// doc_height * zoom / 100 <= view_height &&
// 1 <= zoom <= 3200
- zoomTo (QMIN (3200, QMAX (1, m_scrollView->visibleHeight () * 100 / m_document->height ())));
+ zoomTo (TQMIN (3200, TQMAX (1, m_scrollView->visibleHeight () * 100 / m_document->height ())));
}
@@ -823,7 +823,7 @@ void kpMainWindow::notifyThumbnailGeometryChanged ()
{
m_thumbnailSaveConfigTimer = new TQTimer (this);
connect (m_thumbnailSaveConfigTimer, TQT_SIGNAL (timeout ()),
- this, TQT_SLOT (slotSaveThumbnailGeometry ()));
+ TQT_TQOBJECT(this), TQT_SLOT (slotSaveThumbnailGeometry ()));
}
m_thumbnailSaveConfigTimer->start (500/*msec*/, true/*single shot*/);
@@ -842,13 +842,13 @@ void kpMainWindow::slotSaveThumbnailGeometry ()
TQRect rect (m_thumbnail->x (), m_thumbnail->y (),
m_thumbnail->width (), m_thumbnail->height ());
#if DEBUG_KP_MAIN_WINDOW
- kdDebug () << "\tthumbnail relative geometry=" << rect << endl;
+ kdDebug () << "\tthumbnail relative tqgeometry=" << rect << endl;
#endif
m_configThumbnailGeometry = mapFromGlobal (rect);
#if DEBUG_KP_MAIN_WINDOW
- kdDebug () << "\tCONFIG: saving thumbnail geometry "
+ kdDebug () << "\tCONFIG: saving thumbnail tqgeometry "
<< m_configThumbnailGeometry
<< endl;
#endif
@@ -1067,11 +1067,11 @@ void kpMainWindow::updateThumbnail ()
kdDebug () << "\tcreating thumbnail" << endl;
#endif
- // Read last saved geometry before creating thumbnail & friends
+ // Read last saved tqgeometry before creating thumbnail & friends
// in case they call notifyThumbnailGeometryChanged()
TQRect thumbnailGeometry = m_configThumbnailGeometry;
#if DEBUG_KP_MAIN_WINDOW
- kdDebug () << "\t\tlast used geometry=" << thumbnailGeometry << endl;
+ kdDebug () << "\t\tlast used tqgeometry=" << thumbnailGeometry << endl;
#endif
m_thumbnail = new kpThumbnail (this, "thumbnail");
@@ -1084,9 +1084,9 @@ void kpMainWindow::updateThumbnail ()
if (!thumbnailGeometry.isEmpty () &&
TQRect (0, 0, width (), height ()).intersects (thumbnailGeometry))
{
- const TQRect geometry = mapToGlobal (thumbnailGeometry);
- m_thumbnail->resize (geometry.size ());
- m_thumbnail->move (geometry.topLeft ());
+ const TQRect tqgeometry = mapToGlobal (thumbnailGeometry);
+ m_thumbnail->resize (tqgeometry.size ());
+ m_thumbnail->move (tqgeometry.topLeft ());
}
else
{
@@ -1095,21 +1095,21 @@ void kpMainWindow::updateThumbnail ()
const int margin = 20;
const int initialWidth = 160, initialHeight = 120;
- TQRect geometryRect (width () - initialWidth - margin * 2,
+ TQRect tqgeometryRect (width () - initialWidth - margin * 2,
m_scrollView->y () + margin,
initialWidth,
initialHeight);
#if DEBUG_KP_MAIN_WINDOW
- kdDebug () << "\t\tcreating geometry=" << geometryRect << endl;
+ kdDebug () << "\t\tcreating tqgeometry=" << tqgeometryRect << endl;
#endif
- geometryRect = mapToGlobal (geometryRect);
+ tqgeometryRect = mapToGlobal (tqgeometryRect);
#if DEBUG_KP_MAIN_WINDOW
- kdDebug () << "\t\tmap to global=" << geometryRect << endl;
+ kdDebug () << "\t\tmap to global=" << tqgeometryRect << endl;
#endif
- m_thumbnail->resize (geometryRect.size ());
- m_thumbnail->move (geometryRect.topLeft ());
+ m_thumbnail->resize (tqgeometryRect.size ());
+ m_thumbnail->move (tqgeometryRect.topLeft ());
}
}
@@ -1122,7 +1122,7 @@ void kpMainWindow::updateThumbnail ()
kdDebug () << "\t\tconnecting thumbnail::visibilityChange to destroy slot" << endl;
#endif
connect (m_thumbnail, TQT_SIGNAL (visibilityChanged (bool)),
- this, TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool)));
+ TQT_TQOBJECT(this), TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool)));
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tDONE" << endl;
#endif
@@ -1144,7 +1144,7 @@ void kpMainWindow::updateThumbnail ()
disconnect (m_thumbnail, TQT_SIGNAL (visibilityChanged (bool)),
- this, TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool)));
+ TQT_TQOBJECT(this), TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool)));
m_thumbnail->deleteLater (); m_thumbnail = 0;
}
diff --git a/kolourpaint/kpselection.cpp b/kolourpaint/kpselection.cpp
index 728fbad9..8947f8d0 100644
--- a/kolourpaint/kpselection.cpp
+++ b/kolourpaint/kpselection.cpp
@@ -337,11 +337,11 @@ int kpSelection::size () const
// public
-TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const
+TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const
{
if (!m_rect.isValid ())
{
- kdError () << "kpSelection::maskForOwnType() boundingRect invalid" << endl;
+ kdError () << "kpSelection::tqmaskForOwnType() boundingRect invalid" << endl;
return TQBitmap ();
}
@@ -351,19 +351,19 @@ TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const
if (nullForRectangular)
return TQBitmap ();
- TQBitmap maskBitmap (m_rect.width (), m_rect.height ());
- maskBitmap.fill (Qt::color1/*opaque*/);
- return maskBitmap;
+ TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ());
+ tqmaskBitmap.fill (TQt::color1/*opaque*/);
+ return tqmaskBitmap;
}
- TQBitmap maskBitmap (m_rect.width (), m_rect.height ());
- maskBitmap.fill (Qt::color0/*transparent*/);
+ TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ());
+ tqmaskBitmap.fill (TQt::color0/*transparent*/);
TQPainter painter;
- painter.begin (&maskBitmap);
- painter.setPen (Qt::color1)/*opaque*/;
- painter.setBrush (Qt::color1/*opaque*/);
+ painter.begin (&tqmaskBitmap);
+ painter.setPen (TQt::color1)/*opaque*/;
+ painter.setBrush (TQt::color1/*opaque*/);
if (m_type == kpSelection::Ellipse)
painter.drawEllipse (0, 0, m_rect.width (), m_rect.height ());
@@ -373,13 +373,13 @@ TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const
points.detach ();
points.translate (-m_rect.x (), -m_rect.y ());
- painter.drawPolygon (points, false/*even-odd algo*/);
+ painter.tqdrawPolygon (points, false/*even-odd algo*/);
}
painter.end ();
- return maskBitmap;
+ return tqmaskBitmap;
}
@@ -490,18 +490,18 @@ int kpSelection::height () const
}
// public
-bool kpSelection::contains (const TQPoint &point) const
+bool kpSelection::tqcontains (const TQPoint &point) const
{
TQRect rect = boundingRect ();
#if DEBUG_KP_SELECTION && 1
- kdDebug () << "kpSelection::contains(" << point
+ kdDebug () << "kpSelection::tqcontains(" << point
<< ") rect==" << rect
<< " #points=" << m_points.size ()
<< endl;
#endif
- if (!rect.contains (point))
+ if (!rect.tqcontains (point))
return false;
// OPT: TQRegion is probably incredibly slow - cache
@@ -514,20 +514,20 @@ bool kpSelection::contains (const TQPoint &point) const
case kpSelection::Text:
return true;
case kpSelection::Ellipse:
- return TQRegion (m_rect, TQRegion::Ellipse).contains (point);
+ return TQRegion (m_rect, TQRegion::Ellipse).tqcontains (point);
case kpSelection::Points:
// TODO: make this always include the border
// (draw up a rect sel in this mode to see what I mean)
- return TQRegion (m_points, false/*even-odd algo*/).contains (point);
+ return TQRegion (m_points, false/*even-odd algo*/).tqcontains (point);
default:
return false;
}
}
// public
-bool kpSelection::contains (int x, int y)
+bool kpSelection::tqcontains (int x, int y)
{
- return contains (TQPoint (x, y));
+ return tqcontains (TQPoint (x, y));
}
@@ -606,20 +606,20 @@ static int mostContrastingValue (int val)
return 0;
}
-static QRgb mostContrastingRGB (QRgb val)
+static TQRgb mostContrastingRGB (TQRgb val)
{
- return qRgba (mostContrastingValue (qRed (val)),
- mostContrastingValue (qGreen (val)),
- mostContrastingValue (qBlue (val)),
- mostContrastingValue (qAlpha (val)));
+ return tqRgba (mostContrastingValue (tqRed (val)),
+ mostContrastingValue (tqGreen (val)),
+ mostContrastingValue (tqBlue (val)),
+ mostContrastingValue (tqAlpha (val)));
}
// private
-static void drawTextLines (TQPainter *painter, TQPainter *maskPainter,
+static void drawTextLines (TQPainter *painter, TQPainter *tqmaskPainter,
const TQRect &rect,
const TQValueVector <TQString> &textLines)
{
- if (!painter->clipRegion ().isEmpty () || !maskPainter->clipRegion ().isEmpty ())
+ if (!painter->clipRegion ().isEmpty () || !tqmaskPainter->clipRegion ().isEmpty ())
{
// TODO: fix esp. before making method public
kdError () << "kpselection.cpp:drawTextLines() can't deal with existing painter clip regions" << endl;
@@ -632,8 +632,8 @@ static void drawTextLines (TQPainter *painter, TQPainter *maskPainter,
if (painter->isActive ()) \
painter->cmd; \
\
- if (maskPainter->isActive ()) \
- maskPainter->cmd; \
+ if (tqmaskPainter->isActive ()) \
+ tqmaskPainter->cmd; \
}
@@ -685,7 +685,7 @@ void kpSelection::paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect)
TQBitmap destPixmapMask;
TQPainter destPixmapPainter, destPixmapMaskPainter;
- if (destPixmap->mask ())
+ if (destPixmap->tqmask ())
{
if (m_textStyle.effectiveBackgroundColor ().isTransparent ())
{
@@ -698,19 +698,19 @@ void kpSelection::paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect)
modifyingRectRelPixmap,
kpPixmapFX::pixmapWithDefinedTransparentPixels (
kpPixmapFX::getPixmapAt (*destPixmap, modifyingRectRelPixmap),
- m_textStyle.foregroundColor ().toQColor ()));
+ m_textStyle.foregroundColor ().toTQColor ()));
}
- destPixmapMask = *destPixmap->mask ();
+ destPixmapMask = *destPixmap->tqmask ();
destPixmapMaskPainter.begin (&destPixmapMask);
destPixmapMaskPainter.translate (-docRect.x (), -docRect.y ());
- destPixmapMaskPainter.setPen (Qt::color1/*opaque*/);
+ destPixmapMaskPainter.setPen (TQt::color1/*opaque*/);
destPixmapMaskPainter.setFont (m_textStyle.font ());
}
destPixmapPainter.begin (destPixmap);
destPixmapPainter.translate (-docRect.x (), -docRect.y ());
- destPixmapPainter.setPen (m_textStyle.foregroundColor ().toQColor ());
+ destPixmapPainter.setPen (m_textStyle.foregroundColor ().toTQColor ());
destPixmapPainter.setFont (m_textStyle.font ());
@@ -718,13 +718,13 @@ void kpSelection::paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect)
{
destPixmapPainter.fillRect (
boundingRect (),
- m_textStyle.effectiveBackgroundColor ().toQColor ());
+ m_textStyle.effectiveBackgroundColor ().toTQColor ());
if (destPixmapMaskPainter.isActive ())
{
destPixmapMaskPainter.fillRect (
boundingRect (),
- Qt::color1/*opaque*/);
+ TQt::color1/*opaque*/);
}
}
@@ -759,7 +759,7 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const
// Iron out stupid case first
if (m_textStyle.effectiveBackgroundColor ().isTransparent ())
{
- pixmapMask.fill (Qt::color0/*transparent*/);
+ pixmapMask.fill (TQt::color0/*transparent*/);
pixmap.setMask (pixmapMask);
return pixmap;
}
@@ -775,22 +775,22 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const
TQPainter pixmapPainter, pixmapMaskPainter;
- pixmap.fill (m_textStyle.effectiveBackgroundColor ().toQColor ());
+ pixmap.fill (m_textStyle.effectiveBackgroundColor ().toTQColor ());
pixmapPainter.begin (&pixmap);
// HACK: Transparent foreground colour + antialiased fonts don't
// work - they don't seem to be able to draw in
- // Qt::color0/*transparent*/ (but Qt::color1 seems Ok).
+ // TQt::color0/*transparent*/ (but TQt::color1 seems Ok).
// So we draw in a contrasting color to the background so that
// we can identify the transparent pixels for manually creating
- // the mask.
+ // the tqmask.
pixmapPainter.setPen (
- TQColor (mostContrastingRGB (m_textStyle.effectiveBackgroundColor ().toQRgb () & RGB_MASK)));
+ TQColor (mostContrastingRGB (m_textStyle.effectiveBackgroundColor ().toTQRgb () & TQRGB_MASK)));
pixmapPainter.setFont (font);
- pixmapMask.fill (Qt::color1/*opaque*/);
+ pixmapMask.fill (TQt::color1/*opaque*/);
pixmapMaskPainter.begin (&pixmapMask);
- pixmapMaskPainter.setPen (Qt::color0/*transparent*/);
+ pixmapMaskPainter.setPen (TQt::color0/*transparent*/);
pixmapMaskPainter.setFont (font);
@@ -812,7 +812,7 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const
kdDebug () << "\tinvoking foreground transparency hack" << endl;
#endif
TQImage image = kpPixmapFX::convertToImage (pixmap);
- QRgb backgroundRGB = image.pixel (0, 0); // on textBorderSize()
+ TQRgb backgroundRGB = image.pixel (0, 0); // on textBorderSize()
pixmapMaskPainter.begin (&pixmapMask);
for (int y = 0; y < image.height (); y++)
@@ -820,9 +820,9 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const
for (int x = 0; x < image.width (); x++)
{
if (image.pixel (x, y) == backgroundRGB)
- pixmapMaskPainter.setPen (Qt::color1/*opaque*/);
+ pixmapMaskPainter.setPen (TQt::color1/*opaque*/);
else
- pixmapMaskPainter.setPen (Qt::color0/*transparent*/);
+ pixmapMaskPainter.setPen (TQt::color0/*transparent*/);
pixmapMaskPainter.drawPoint (x, y);
}
@@ -853,9 +853,9 @@ void kpSelection::paint (TQPixmap *destPixmap, const TQRect &docRect) const
{
#if DEBUG_KP_SELECTION
kdDebug () << "kpSelection::paint() textStyle: fcol="
- << (int *) m_textStyle.foregroundColor ().toQRgb ()
+ << (int *) m_textStyle.foregroundColor ().toTQRgb ()
<< " bcol="
- << (int *) m_textStyle.effectiveBackgroundColor ().toQRgb ()
+ << (int *) m_textStyle.effectiveBackgroundColor ().toTQRgb ()
<< endl;
#endif
@@ -913,7 +913,7 @@ void kpSelection::calculateTextPixmap ()
TQString kpSelection::textForTextLines (const TQValueVector <TQString> &textLines_)
{
if (textLines_.isEmpty ())
- return TQString::null;
+ return TQString();
TQString bigString = textLines_ [0];
@@ -921,7 +921,7 @@ TQString kpSelection::textForTextLines (const TQValueVector <TQString> &textLine
it != textLines_.end ();
it++)
{
- bigString += TQString::fromLatin1 ("\n");
+ bigString += TQString::tqfromLatin1 ("\n");
bigString += (*it);
}
@@ -933,7 +933,7 @@ TQString kpSelection::text () const
{
if (!isText ())
{
- return TQString::null;
+ return TQString();
}
return textForTextLines (m_textLines);
@@ -964,7 +964,7 @@ void kpSelection::setTextLines (const TQValueVector <TQString> &textLines_)
if (m_textLines.isEmpty ())
{
kdError () << "kpSelection::setTextLines() passed no lines" << endl;
- m_textLines.push_back (TQString::null);
+ m_textLines.push_back (TQString());
}
calculateTextPixmap ();
emit changed (boundingRect ());
@@ -1000,7 +1000,7 @@ bool kpSelection::pointIsInTextBorderArea (const TQPoint &globalPoint) const
return false;
}
- return (m_rect.contains (globalPoint) && !pointIsInTextArea (globalPoint));
+ return (m_rect.tqcontains (globalPoint) && !pointIsInTextArea (globalPoint));
}
// public
@@ -1012,7 +1012,7 @@ bool kpSelection::pointIsInTextArea (const TQPoint &globalPoint) const
return false;
}
- return textAreaRect ().contains (globalPoint);
+ return textAreaRect ().tqcontains (globalPoint);
}
@@ -1049,7 +1049,7 @@ int kpSelection::minimumHeightForTextStyle (const kpTextStyle &)
}
// public static
-TQSize kpSelection::minimumSizeForTextStyle (const kpTextStyle &textStyle)
+TQSize kpSelection::tqminimumSizeForTextStyle (const kpTextStyle &textStyle)
{
return TQSize (minimumWidthForTextStyle (textStyle),
minimumHeightForTextStyle (textStyle));
@@ -1061,14 +1061,14 @@ int kpSelection::preferredMinimumWidthForTextStyle (const kpTextStyle &textStyle
{
const int about15CharsWidth =
textStyle.fontMetrics ().width (
- TQString::fromLatin1 ("1234567890abcde"));
+ TQString::tqfromLatin1 ("1234567890abcde"));
const int preferredMinWidth =
- QMAX (150,
+ TQMAX (150,
textBorderSize () * 2 + about15CharsWidth);
- return QMAX (minimumWidthForTextStyle (textStyle),
- QMIN (250, preferredMinWidth));
+ return TQMAX (minimumWidthForTextStyle (textStyle),
+ TQMIN (250, preferredMinWidth));
}
// public static
@@ -1077,8 +1077,8 @@ int kpSelection::preferredMinimumHeightForTextStyle (const kpTextStyle &textStyl
const int preferredMinHeight =
textBorderSize () * 2 + textStyle.fontMetrics ().height ();
- return QMAX (minimumHeightForTextStyle (textStyle),
- QMIN (150, preferredMinHeight));
+ return TQMAX (minimumHeightForTextStyle (textStyle),
+ TQMIN (150, preferredMinHeight));
}
// public static
@@ -1108,7 +1108,7 @@ int kpSelection::minimumHeight () const
}
// public
-TQSize kpSelection::minimumSize () const
+TQSize kpSelection::tqminimumSize () const
{
return TQSize (minimumWidth (), minimumHeight ());
}
@@ -1252,7 +1252,7 @@ void kpSelection::calculateTransparencyMask ()
if (isText ())
{
#if DEBUG_KP_SELECTION
- kdDebug () << "\ttext - no need for transparency mask" << endl;
+ kdDebug () << "\ttext - no need for transparency tqmask" << endl;
#endif
m_transparencyMask.resize (0, 0);
return;
@@ -1261,7 +1261,7 @@ void kpSelection::calculateTransparencyMask ()
if (!m_pixmap)
{
#if DEBUG_KP_SELECTION
- kdDebug () << "\tno pixmap - no need for transparency mask" << endl;
+ kdDebug () << "\tno pixmap - no need for transparency tqmask" << endl;
#endif
m_transparencyMask.resize (0, 0);
return;
@@ -1270,7 +1270,7 @@ void kpSelection::calculateTransparencyMask ()
if (m_transparency.isOpaque ())
{
#if DEBUG_KP_SELECTION
- kdDebug () << "\topaque - no need for transparency mask" << endl;
+ kdDebug () << "\topaque - no need for transparency tqmask" << endl;
#endif
m_transparencyMask.resize (0, 0);
return;
@@ -1289,12 +1289,12 @@ void kpSelection::calculateTransparencyMask ()
if (kpPixmapFX::getColorAtPixel (image, x, y).isSimilarTo (m_transparency.transparentColor (),
m_transparency.processedColorSimilarity ()))
{
- transparencyMaskPainter.setPen (Qt::color1/*make it transparent*/);
+ transparencyMaskPainter.setPen (TQt::color1/*make it transparent*/);
hasTransparent = true;
}
else
{
- transparencyMaskPainter.setPen (Qt::color0/*keep pixel as is*/);
+ transparencyMaskPainter.setPen (TQt::color0/*keep pixel as is*/);
}
transparencyMaskPainter.drawPoint (x, y);
@@ -1373,8 +1373,8 @@ bool kpSelection::setTransparency (const kpSelectionTransparency &transparency,
{
#if DEBUG_KP_SELECTION
kdDebug () << "\tdiffer at " << TQPoint (x, y)
- << " old=" << (int *) kpPixmapFX::getColorAtPixel (oldTransparencyMaskImage, x, y).toQRgb ()
- << " new=" << (int *) kpPixmapFX::getColorAtPixel (newTransparencyMaskImage, x, y).toQRgb ()
+ << " old=" << (int *) kpPixmapFX::getColorAtPixel (oldTransparencyMaskImage, x, y).toTQRgb ()
+ << " new=" << (int *) kpPixmapFX::getColorAtPixel (newTransparencyMaskImage, x, y).toTQRgb ()
<< endl;
#endif
changed = true;
@@ -1433,9 +1433,9 @@ void kpSelection::flip (bool horiz, bool vert)
if (!m_transparencyMask.isNull ())
{
#if DEBUG_KP_SELECTION && 1
- kdDebug () << "\thave transparency mask - flipping that" << endl;
+ kdDebug () << "\thave transparency tqmask - flipping that" << endl;
#endif
- kpPixmapFX::flip (&m_transparencyMask, horiz, vert);
+ kpPixmapFX::flip (TQT_TQPIXMAP(&m_transparencyMask), horiz, vert);
}
diff --git a/kolourpaint/kpselection.h b/kolourpaint/kpselection.h
index b99f5cb9..e7e54d54 100644
--- a/kolourpaint/kpselection.h
+++ b/kolourpaint/kpselection.h
@@ -52,9 +52,10 @@ class TQSize;
* Holds a selection - will also be used for the clipboard
* so that we can retain the border.
*/
-class kpSelection : public QObject
+class kpSelection : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type
@@ -102,7 +103,7 @@ public:
int size () const;
- TQBitmap maskForOwnType (bool nullForRectangular = false) const;
+ TQBitmap tqmaskForOwnType (bool nullForRectangular = false) const;
// synonyms
TQPoint topLeft () const;
@@ -126,8 +127,8 @@ public:
// (for non-rectangular selections, may return false even if
// kpView::onSelectionResizeHandle())
- bool contains (const TQPoint &point) const;
- bool contains (int x, int y);
+ bool tqcontains (const TQPoint &point) const;
+ bool tqcontains (int x, int y);
// (Avoid using for text selections since text selection may
@@ -168,7 +169,7 @@ public:
// Be more robust when external enforcement fails.
static int minimumWidthForTextStyle (const kpTextStyle &);
static int minimumHeightForTextStyle (const kpTextStyle &);
- static TQSize minimumSizeForTextStyle (const kpTextStyle &);
+ static TQSize tqminimumSizeForTextStyle (const kpTextStyle &);
static int preferredMinimumWidthForTextStyle (const kpTextStyle &textStyle);
static int preferredMinimumHeightForTextStyle (const kpTextStyle &textStyle);
@@ -176,7 +177,7 @@ public:
int minimumWidth () const;
int minimumHeight () const;
- TQSize minimumSize () const;
+ TQSize tqminimumSize () const;
int textRowForPoint (const TQPoint &globalPoint) const;
int textColForPoint (const TQPoint &globalPoint) const;
diff --git a/kolourpaint/kpselectiondrag.cpp b/kolourpaint/kpselectiondrag.cpp
index 91ecf35c..22cdeb4a 100644
--- a/kolourpaint/kpselectiondrag.cpp
+++ b/kolourpaint/kpselectiondrag.cpp
@@ -74,7 +74,7 @@ void kpSelectionDrag::setSelection (const kpSelection &sel)
m_selection = sel;
- // OPT: an awful waste of memory storing image in both selection and QImage
+ // OPT: an awful waste of memory storing image in both selection and TQImage
// HACK: need to set image else TQImageDrag::format() lies
setImage (kpPixmapFX::convertToImage (*m_selection.pixmap ()));
@@ -87,7 +87,7 @@ bool kpSelectionDrag::holdsSelection () const
}
-// public virtual [base QMimeSource]
+// public virtual [base TQMimeSource]
const char *kpSelectionDrag::format (int which) const
{
#if DEBUG_KP_SELECTION_DRAG && 0
@@ -97,7 +97,7 @@ const char *kpSelectionDrag::format (int which) const
if (ret)
{
#if DEBUG_KP_SELECTION_DRAG && 0
- kdDebug () << "\tQImageDrag reports " << ret << endl;
+ kdDebug () << "\tTQImageDrag reports " << ret << endl;
#endif
return ret;
}
@@ -126,8 +126,8 @@ const char *kpSelectionDrag::format (int which) const
}
}
-// public virtual [base QMimeSource]
-// Don't need to override in Qt 3.2 (the TQMimeSource base will work)
+// public virtual [base TQMimeSource]
+// Don't need to override in TQt 3.2 (the TQMimeSource base will work)
// but we do so just in case TQImageDrag later decides to override it.
bool kpSelectionDrag::provides (const char *mimeType) const
{
@@ -142,11 +142,11 @@ bool kpSelectionDrag::provides (const char *mimeType) const
TQImageDrag::provides (mimeType));
}
-// public virtual [base QMimeSource]
-TQByteArray kpSelectionDrag::encodedData (const char *mimeType) const
+// public virtual [base TQMimeSource]
+TQByteArray kpSelectionDrag::tqencodedData (const char *mimeType) const
{
#if DEBUG_KP_SELECTION_DRAG
- kdDebug () << "kpSelectionDrag::encodedData(" << mimeType << ")" << endl;
+ kdDebug () << "kpSelectionDrag::tqencodedData(" << mimeType << ")" << endl;
#endif
if (!mimeType)
@@ -192,7 +192,7 @@ TQByteArray kpSelectionDrag::encodedData (const char *mimeType) const
}
else
{
- kdError () << "kpSelectionDrag::encodedData(" << mimeType << ")"
+ kdError () << "kpSelectionDrag::tqencodedData(" << mimeType << ")"
<< " kpSelectionDrag(TQImage) could not decode data into TQImage"
<< endl;
stream << kpSelection ();
@@ -207,7 +207,7 @@ TQByteArray kpSelectionDrag::encodedData (const char *mimeType) const
kdDebug () << "\twant it as TQImage in TQByteArray" << endl;
#endif
- return TQImageDrag::encodedData (mimeType);
+ return TQImageDrag::tqencodedData (mimeType);
}
}
@@ -255,10 +255,10 @@ bool kpSelectionDrag::decode (const TQMimeSource *e, kpSelection &sel,
#if DEBUG_KP_SELECTION_DRAG
kdDebug () << "\tmimeSource provides selection - just return it in TQByteArray" << endl;
#endif
- TQByteArray data = e->encodedData (kpSelectionDrag::selectionMimeType);
+ TQByteArray data = e->tqencodedData (kpSelectionDrag::selectionMimeType);
TQDataStream stream (data, IO_ReadOnly);
- // (no need for wali as kpSelection's by definition only support QPixmap's)
+ // (no need for wali as kpSelection's by definition only support TQPixmap's)
stream >> sel;
}
else
diff --git a/kolourpaint/kpselectiondrag.h b/kolourpaint/kpselectiondrag.h
index e2b81e62..93473509 100644
--- a/kolourpaint/kpselectiondrag.h
+++ b/kolourpaint/kpselectiondrag.h
@@ -35,9 +35,10 @@
#include <kpselection.h>
-class kpSelectionDrag : public QImageDrag
+class kpSelectionDrag : public TQImageDrag
{
Q_OBJECT
+ TQ_OBJECT
public:
kpSelectionDrag (TQWidget *dragSource = 0, const char *name = 0);
@@ -55,7 +56,7 @@ protected:
public:
virtual const char *format (int which = 0) const;
virtual bool provides (const char *mimeType) const;
- virtual TQByteArray encodedData (const char *mimeType) const;
+ virtual TQByteArray tqencodedData (const char *mimeType) const;
static bool canDecode (const TQMimeSource *e);
static bool decode (const TQMimeSource *e, TQImage &img);
diff --git a/kolourpaint/kpselectiontransparency.cpp b/kolourpaint/kpselectiontransparency.cpp
index 62919be4..f3fe062b 100644
--- a/kolourpaint/kpselectiontransparency.cpp
+++ b/kolourpaint/kpselectiontransparency.cpp
@@ -83,8 +83,8 @@ bool kpSelectionTransparency::operator== (const kpSelectionTransparency &rhs) co
}
#if DEBUG_KP_SELECTION_TRANSPARENCY && 0
- kdDebug () << "\tcolours: lhs=" << (int *) m_transparentColor.toQRgb ()
- << " rhs=" << (int *) rhs.m_transparentColor.toQRgb ()
+ kdDebug () << "\tcolours: lhs=" << (int *) m_transparentColor.toTQRgb ()
+ << " rhs=" << (int *) rhs.m_transparentColor.toTQRgb ()
<< endl;
kdDebug () << "\tcolour similarity: lhs=" << m_colorSimilarity
<< " rhs=" << rhs.m_colorSimilarity
diff --git a/kolourpaint/kpsinglekeytriggersaction.cpp b/kolourpaint/kpsinglekeytriggersaction.cpp
index 07573bf4..54e083c7 100644
--- a/kolourpaint/kpsinglekeytriggersaction.cpp
+++ b/kolourpaint/kpsinglekeytriggersaction.cpp
@@ -119,8 +119,8 @@ void kpSingleKeyTriggersActionInterface::enableSingleKeyTriggers (bool enable)
kpSingleKeyTriggersAction::kpSingleKeyTriggersAction (const TQString &text,
const KShortcut &shortcut,
const TQObject *receiver, const char *slot,
- KActionCollection *parent, const char *name)
- : KAction (text, shortcut, receiver, slot, parent, name)
+ KActionCollection *tqparent, const char *name)
+ : KAction (text, shortcut, receiver, slot, tqparent, name)
{
}
diff --git a/kolourpaint/kpsinglekeytriggersaction.h b/kolourpaint/kpsinglekeytriggersaction.h
index 2c1ddf3f..7b7001ff 100644
--- a/kolourpaint/kpsinglekeytriggersaction.h
+++ b/kolourpaint/kpsinglekeytriggersaction.h
@@ -60,12 +60,13 @@ class kpSingleKeyTriggersAction : public KAction,
public kpSingleKeyTriggersActionInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
kpSingleKeyTriggersAction (const TQString &text,
const KShortcut &shortcut,
const TQObject *receiver, const char *slot,
- KActionCollection *parent, const char *name);
+ KActionCollection *tqparent, const char *name);
virtual ~kpSingleKeyTriggersAction ();
diff --git a/kolourpaint/kptemppixmap.h b/kolourpaint/kptemppixmap.h
index 2bd9d7bc..e66d622e 100644
--- a/kolourpaint/kptemppixmap.h
+++ b/kolourpaint/kptemppixmap.h
@@ -69,7 +69,7 @@ public:
int height () const;
- // Returns whether a call to paint() may change <*destPixmap>'s mask
+ // Returns whether a call to paint() may change <*destPixmap>'s tqmask
bool mayChangeDocumentMask () const;
/*
diff --git a/kolourpaint/kpthumbnail.cpp b/kolourpaint/kpthumbnail.cpp
index 5c57b12d..08a2331e 100644
--- a/kolourpaint/kpthumbnail.cpp
+++ b/kolourpaint/kpthumbnail.cpp
@@ -45,54 +45,36 @@
// TODO: get out of the Alt+Tab list
-kpThumbnail::kpThumbnail (kpMainWindow *parent, const char *name)
-#if KP_IS_QT_3_3
- : TQDockWindow (TQDockWindow::OutsideDock, parent, name),
-#else // With Qt <3.3, OutsideDock requires parent = 0,
- // sync: make sure outside of dock
- : TQDockWindow (TQDockWindow::InDock, parent, name),
- #warning "Using Qt <3.3: the thumbnail will flicker more when appearing"
-#endif
- m_mainWindow (parent),
+kpThumbnail::kpThumbnail (kpMainWindow *tqparent, const char *name)
+ : TQDockWindow (TQDockWindow::OutsideDock, tqparent, name),
+ m_mainWindow (tqparent),
m_view (0)
{
- if (!parent)
- kdError () << "kpThumbnail::kpThumbnail() requires parent" << endl;
-
-
-#if !KP_IS_QT_3_3
- if (parent)
- {
- hide ();
-
- // sync: make sure outside of dock
- parent->moveDockWindow (this, Qt::DockTornOff);
- }
-#endif
-
+ if (!tqparent)
+ kdError () << "kpThumbnail::kpThumbnail() requires tqparent" << endl;
- if (parent)
+ if (tqparent)
{
// Prevent thumbnail from docking - it's _really_ irritating otherwise
- parent->leftDock ()->setAcceptDockWindow (this, false);
- parent->rightDock ()->setAcceptDockWindow (this, false);
- parent->topDock ()->setAcceptDockWindow (this, false);
- parent->bottomDock ()->setAcceptDockWindow (this, false);
+ tqparent->leftDock ()->setAcceptDockWindow (this, false);
+ tqparent->rightDock ()->setAcceptDockWindow (this, false);
+ tqparent->topDock ()->setAcceptDockWindow (this, false);
+ tqparent->bottomDock ()->setAcceptDockWindow (this, false);
}
- TQSize layoutMinimumSize = layout () ? layout ()->minimumSize () : TQSize ();
+ TQSize tqlayoutMinimumSize = tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ();
#if DEBUG_KP_THUMBNAIL
- kdDebug () << "\tlayout=" << layout ()
- << " minSize=" << (layout () ? layout ()->minimumSize () : TQSize ()) << endl;
+ kdDebug () << "\ttqlayout=" << tqlayout ()
+ << " minSize=" << (tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ()) << endl;
kdDebug () << "\tboxLayout=" << boxLayout ()
- << " minSize=" << (boxLayout () ? boxLayout ()->minimumSize () : TQSize ())
+ << " minSize=" << (boxLayout () ? boxLayout ()->tqminimumSize () : TQSize ())
<< endl;
#endif
- if (layout ())
- layout ()->setResizeMode (TQLayout::FreeResize);
- setMinimumSize (QMAX (layoutMinimumSize.width (), 64),
- QMAX (layoutMinimumSize.height (), 64));
+ if (tqlayout ())
+ tqlayout ()->setResizeMode (TQLayout::FreeResize);
+ setMinimumSize (TQMAX (tqlayoutMinimumSize.width (), 64),
+ TQMAX (tqlayoutMinimumSize.height (), 64));
// Enable "X" Close Button
@@ -158,7 +140,7 @@ void kpThumbnail::updateCaption ()
}
-// public slot virtual [base QDockWindow]
+// public slot virtual [base TQDockWindow]
void kpThumbnail::dock ()
{
#if DEBUG_KP_THUMBNAIL
@@ -181,7 +163,7 @@ void kpThumbnail::slotViewDestroyed ()
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpThumbnail::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_THUMBNAIL
@@ -202,7 +184,7 @@ void kpThumbnail::resizeEvent (TQResizeEvent *e)
}
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpThumbnail::moveEvent (TQMoveEvent * /*e*/)
{
if (m_mainWindow)
diff --git a/kolourpaint/kpthumbnail.h b/kolourpaint/kpthumbnail.h
index 9ed738dc..1bb97ff3 100644
--- a/kolourpaint/kpthumbnail.h
+++ b/kolourpaint/kpthumbnail.h
@@ -35,12 +35,13 @@ class kpMainWindow;
class kpThumbnailView;
-class kpThumbnail : public QDockWindow
+class kpThumbnail : public TQDockWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpThumbnail (kpMainWindow *parent, const char *name = 0);
+ kpThumbnail (kpMainWindow *tqparent, const char *name = 0);
virtual ~kpThumbnail ();
public:
diff --git a/kolourpaint/kptool.cpp b/kolourpaint/kptool.cpp
index 3d016fdb..7c6a057b 100644
--- a/kolourpaint/kptool.cpp
+++ b/kolourpaint/kptool.cpp
@@ -153,7 +153,7 @@ void kpTool::createAction ()
m_action = new kpToolAction (text (), iconName (), shortcutForKey (m_key),
this, TQT_SLOT (slotActionActivated ()),
m_mainWindow->actionCollection (), name ());
- m_action->setExclusiveGroup (TQString::fromLatin1 ("Tool Box Actions"));
+ m_action->setExclusiveGroup (TQString::tqfromLatin1 ("Tool Box Actions"));
m_action->setWhatsThis (description ());
connect (m_action, TQT_SIGNAL (toolTipChanged (const TQString &)),
@@ -239,7 +239,7 @@ KShortcut kpTool::shortcutForKey (int key)
shortcut.append (KKeySequence (KKey (key)));
// (CTRL+<key>, ALT+<key>, CTRL+ALT+<key>, CTRL+SHIFT+<key>
// all clash with global KDE shortcuts)
- shortcut.append (KKeySequence (KKey (Qt::ALT + Qt::SHIFT + key)));
+ shortcut.append (KKeySequence (KKey (TQt::ALT + TQt::SHIFT + key)));
}
return shortcut;
@@ -256,7 +256,7 @@ KShortcut kpTool::shortcut () const
bool kpTool::keyIsText (int key)
{
// TODO: should work like !TQKeyEvent::text().isEmpty()
- return !(key & (Qt::MODIFIER_MASK ^ Qt::SHIFT));
+ return !(key & (TQt::MODIFIER_MASK ^ TQt::SHIFT));
}
// public static
@@ -744,7 +744,7 @@ void kpTool::endDrawInternal (const TQPoint &thisPoint, const TQRect &normalized
// private
void kpTool::endShapeInternal (const TQPoint &thisPoint, const TQRect &normalizedRect)
{
- endDrawInternal (thisPoint, normalizedRect, true/*end shape*/);
+ endDrawInternal (thisPoint, normalizedRect, true/*end tqshape*/);
}
// virtual
@@ -940,11 +940,11 @@ void kpTool::mousePressEvent (TQMouseEvent *e)
#endif
// state of all the buttons - not just the one that triggered the event (button())
- Qt::ButtonState buttonState = e->stateAfter ();
+ TQt::ButtonState buttonState = e->stateAfter ();
if (m_mainWindow && e->button () == Qt::MidButton)
{
- const TQString text = TQApplication::clipboard ()->text (QClipboard::Selection);
+ const TQString text = TQApplication::tqclipboard ()->text (TQClipboard::Selection);
#if DEBUG_KP_TOOL && 1
kdDebug () << "\tMMB pasteText='" << text << "'" << endl;
#endif
@@ -1016,9 +1016,9 @@ void kpTool::mousePressEvent (TQMouseEvent *e)
// let user know what mouse button is being used for entire draw
m_mouseButton = mouseButton (buttonState);
- m_shiftPressed = (buttonState & Qt::ShiftButton);
- m_controlPressed = (buttonState & Qt::ControlButton);
- m_altPressed = (buttonState & Qt::AltButton);
+ m_shiftPressed = (buttonState & TQt::ShiftButton);
+ m_controlPressed = (buttonState & TQt::ControlButton);
+ m_altPressed = (buttonState & TQt::AltButton);
m_startPoint = m_currentPoint = view ? view->transformViewToDoc (e->pos ()) : TQPoint (-1, -1);
m_currentViewPoint = view ? e->pos () : TQPoint (-1, -1);
m_viewUnderStartPoint = view;
@@ -1040,19 +1040,19 @@ void kpTool::mouseMoveEvent (TQMouseEvent *e)
kdDebug () << "kpTool::mouseMoveEvent pos=" << e->pos ()
<< " btnStateAfter=" << (int) e->stateAfter () << endl;
kpView *v0 = viewUnderCursor (),
- *v1 = viewManager ()->viewUnderCursor (true/*use Qt*/),
+ *v1 = viewManager ()->viewUnderCursor (true/*use TQt*/),
*v2 = viewUnderStartPoint ();
kdDebug () << "\tviewUnderCursor=" << (v0 ? v0->name () : "(none)")
- << " viewUnderCursorQt=" << (v1 ? v1->name () : "(none)")
+ << " viewUnderCursorTQt=" << (v1 ? v1->name () : "(none)")
<< " viewUnderStartPoint=" << (v2 ? v2->name () : "(none)")
<< endl;
- kdDebug () << "\tfocusWidget=" << kapp->focusWidget () << endl;
+ kdDebug () << "\ttqfocusWidget=" << kapp->tqfocusWidget () << endl;
#endif
- Qt::ButtonState buttonState = e->stateAfter ();
- m_shiftPressed = (buttonState & Qt::ShiftButton);
- m_controlPressed = (buttonState & Qt::ControlButton);
- m_altPressed = (buttonState & Qt::AltButton);
+ TQt::ButtonState buttonState = e->stateAfter ();
+ m_shiftPressed = (buttonState & TQt::ShiftButton);
+ m_controlPressed = (buttonState & TQt::ControlButton);
+ m_altPressed = (buttonState & TQt::AltButton);
if (m_beganDraw)
{
@@ -1151,10 +1151,10 @@ void kpTool::wheelEvent (TQWheelEvent *e)
e->ignore ();
// If CTRL not pressed, bye.
- if ((e->state () & Qt::ControlButton) == 0)
+ if ((e->state () & TQt::ControlButton) == 0)
return;
- // If drawing, bye; don't care if a shape in progress though.
+ // If drawing, bye; don't care if a tqshape in progress though.
if (hasBegunDraw ())
return;
@@ -1196,20 +1196,20 @@ void kpTool::keyPressEvent (TQKeyEvent *e)
switch (e->key ())
{
case 0:
- case Qt::Key_unknown:
+ case TQt::Key_unknown:
#if DEBUG_KP_TOOL && 0
kdDebug () << "kpTool::keyPressEvent() picked up unknown key!" << endl;
#endif
// --- fall thru and update all modifiers ---
- case Qt::Key_Alt:
- case Qt::Key_Shift:
- case Qt::Key_Control:
+ case TQt::Key_Alt:
+ case TQt::Key_Shift:
+ case TQt::Key_Control:
keyUpdateModifierState (e);
e->accept ();
break;
- case Qt::Key_Delete:
+ case TQt::Key_Delete:
m_mainWindow->slotDelete ();
break;
@@ -1217,21 +1217,21 @@ void kpTool::keyPressEvent (TQKeyEvent *e)
* TQCursor::setPos conveniently causes mouseMoveEvents :)
*/
- case Qt::Key_Home: dx = -1, dy = -1; break;
- case Qt::Key_Up: dy = -1; break;
- case Qt::Key_PageUp: dx = +1, dy = -1; break;
+ case TQt::Key_Home: dx = -1, dy = -1; break;
+ case TQt::Key_Up: dy = -1; break;
+ case TQt::Key_PageUp: dx = +1, dy = -1; break;
- case Qt::Key_Left: dx = -1; break;
- case Qt::Key_Right: dx = +1; break;
+ case TQt::Key_Left: dx = -1; break;
+ case TQt::Key_Right: dx = +1; break;
- case Qt::Key_End: dx = -1, dy = +1; break;
- case Qt::Key_Down: dy = +1; break;
- case Qt::Key_PageDown: dx = +1, dy = +1; break;
+ case TQt::Key_End: dx = -1, dy = +1; break;
+ case TQt::Key_Down: dy = +1; break;
+ case TQt::Key_PageDown: dx = +1, dy = +1; break;
- case Qt::Key_Enter:
- case Qt::Key_Return:
- case Qt::Key_Insert:
- case Qt::Key_Clear/*Numpad 5 Key*/:
+ case TQt::Key_Enter:
+ case TQt::Key_Return:
+ case TQt::Key_Insert:
+ case TQt::Key_Clear/*Numpad 5 Key*/:
{
kpView *view = viewUnderCursor (); // TODO: wrong for dragging lines outside of view (for e.g.)
if (view)
@@ -1258,8 +1258,8 @@ void kpTool::keyPressEvent (TQKeyEvent *e)
#endif
- const int viewIncX = (dx ? QMAX (1, view->zoomLevelX () / 100) * dx : 0);
- const int viewIncY = (dy ? QMAX (1, view->zoomLevelY () / 100) * dy : 0);
+ const int viewIncX = (dx ? TQMAX (1, view->zoomLevelX () / 100) * dx : 0);
+ const int viewIncY = (dy ? TQMAX (1, view->zoomLevelY () / 100) * dy : 0);
int newViewX = oldPoint.x () + viewIncX;
int newViewY = oldPoint.y () + viewIncY;
@@ -1282,8 +1282,8 @@ void kpTool::keyPressEvent (TQKeyEvent *e)
// TODO: visible width/height (e.g. with scrollbars)
- int x = QMIN (QMAX (newViewX, 0), view->width () - 1);
- int y = QMIN (QMAX (newViewY, 0), view->height () - 1);
+ int x = TQMIN (TQMAX (newViewX, 0), view->width () - 1);
+ int y = TQMIN (TQMAX (newViewY, 0), view->height () - 1);
TQCursor::setPos (view->mapToGlobal (TQPoint (x, y)));
e->accept ();
@@ -1301,23 +1301,23 @@ void kpTool::keyReleaseEvent (TQKeyEvent *e)
switch (e->key ())
{
case 0:
- case Qt::Key_unknown:
+ case TQt::Key_unknown:
#if DEBUG_KP_TOOL
kdDebug () << "kpTool::keyReleaseEvent() picked up unknown key!" << endl;
#endif
- // HACK: around Qt bug: if you hold a modifier before you start the
+ // HACK: around TQt bug: if you hold a modifier before you start the
// program and then release it over the view,
- // Qt reports it as the release of an unknown key
+ // TQt reports it as the release of an unknown key
// --- fall thru and update all modifiers ---
- case Qt::Key_Alt:
- case Qt::Key_Shift:
- case Qt::Key_Control:
+ case TQt::Key_Alt:
+ case TQt::Key_Shift:
+ case TQt::Key_Control:
keyUpdateModifierState (e);
e->accept ();
break;
- case Qt::Key_Escape:
+ case TQt::Key_Escape:
if (hasBegunDraw ())
{
cancelShapeInternal ();
@@ -1326,10 +1326,10 @@ void kpTool::keyReleaseEvent (TQKeyEvent *e)
break;
- case Qt::Key_Enter:
- case Qt::Key_Return:
- case Qt::Key_Insert:
- case Qt::Key_Clear/*Numpad 5 Key*/:
+ case TQt::Key_Enter:
+ case TQt::Key_Return:
+ case TQt::Key_Insert:
+ case TQt::Key_Clear/*Numpad 5 Key*/:
{
kpView *view = viewUnderCursor ();
if (view)
@@ -1351,21 +1351,21 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e)
#if DEBUG_KP_TOOL && 0
kdDebug () << "kpTool::updateModifierState() e->key=" << e->key () << endl;
kdDebug () << "\tshift="
- << (e->stateAfter () & Qt::ShiftButton)
+ << (e->stateAfter () & TQt::ShiftButton)
<< " control="
- << (e->stateAfter () & Qt::ControlButton)
+ << (e->stateAfter () & TQt::ControlButton)
<< " alt="
- << (e->stateAfter () & Qt::AltButton)
+ << (e->stateAfter () & TQt::AltButton)
<< endl;
#endif
- if (e->key () & (Qt::Key_Alt | Qt::Key_Shift | Qt::Key_Control))
+ if (e->key () & (TQt::Key_Alt | TQt::Key_Shift | TQt::Key_Control))
{
#if DEBUG_KP_TOOL && 0
kdDebug () << "\t\tmodifier changed - use e's claims" << endl;
#endif
- setShiftPressed (e->stateAfter () & Qt::ShiftButton);
- setControlPressed (e->stateAfter () & Qt::ControlButton);
- setAltPressed (e->stateAfter () & Qt::AltButton);
+ setShiftPressed (e->stateAfter () & TQt::ShiftButton);
+ setControlPressed (e->stateAfter () & TQt::ControlButton);
+ setAltPressed (e->stateAfter () & TQt::AltButton);
}
else
{
@@ -1379,7 +1379,7 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e)
// TODO: Can't do much about ALT - unless it's always KApplication::Modifier1?
// Ditto for everywhere else where I set SHIFT & CTRL but not alt.
- setAltPressed (e->stateAfter () & Qt::AltButton);
+ setAltPressed (e->stateAfter () & TQt::AltButton);
}
}
@@ -1466,14 +1466,14 @@ void kpTool::leaveEvent (TQEvent *)
}
// static
-int kpTool::mouseButton (const Qt::ButtonState &buttonState)
+int kpTool::mouseButton (const TQt::ButtonState &buttonState)
{
// we have nothing to do with mid-buttons
if (buttonState & Qt::MidButton)
return -1;
// both left & right together is quite meaningless...
- Qt::ButtonState bothButtons = (Qt::ButtonState) (Qt::LeftButton | Qt::RightButton);
+ TQt::ButtonState bothButtons = (TQt::ButtonState) (Qt::LeftButton | Qt::RightButton);
if ((buttonState & bothButtons) == bothButtons)
return -1;
@@ -1618,7 +1618,7 @@ bool kpTool::warnIfBigImageSize (int oldWidth, int oldHeight,
const TQString &text,
const TQString &caption,
const TQString &continueButtonText,
- TQWidget *parent)
+ TQWidget *tqparent)
{
#if DEBUG_KP_TOOL
kdDebug () << "kpTool::warnIfBigImageSize()"
@@ -1648,11 +1648,11 @@ bool kpTool::warnIfBigImageSize (int oldWidth, int oldHeight,
if (kpPixmapFX::pixmapSize (newWidth, newHeight, TQPixmap::defaultDepth ()) >=
KP_BIG_IMAGE_SIZE)
{
- int accept = KMessageBox::warningContinueCancel (parent,
+ int accept = KMessageBox::warningContinueCancel (tqparent,
text,
caption,
continueButtonText,
- TQString::fromLatin1 ("BigImageDontAskAgain"));
+ TQString::tqfromLatin1 ("BigImageDontAskAgain"));
return (accept == KMessageBox::Continue);
}
diff --git a/kolourpaint/kptool.h b/kolourpaint/kptool.h
index a0309463..1094b8d1 100644
--- a/kolourpaint/kptool.h
+++ b/kolourpaint/kptool.h
@@ -55,9 +55,10 @@ class kpToolToolBar;
// Base class for all tools
-class kpTool : public QObject
+class kpTool : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
kpTool (const TQString &text, const TQString &description,
@@ -328,7 +329,7 @@ protected:
virtual void leaveEvent (TQEvent *e);
// 0 = left, 1 = right, -1 = other (none, left+right, mid)
- static int mouseButton (const Qt::ButtonState &buttonState);
+ static int mouseButton (const TQt::ButtonState &buttonState);
TQString m_text, m_description;
const char *m_name;
@@ -340,7 +341,7 @@ protected:
/*
- * User Notifications (Status Bar)
+ * User Notifications (tqStatus Bar)
*/
public:
@@ -350,7 +351,7 @@ public:
TQString cancelUserMessage () const;
TQString userMessage () const;
- void setUserMessage (const TQString &userMessage = TQString::null);
+ void setUserMessage (const TQString &userMessage = TQString());
TQPoint userShapeStartPoint () const;
TQPoint userShapeEndPoint () const;
@@ -409,7 +410,7 @@ public:
const TQString &text,
const TQString &caption,
const TQString &continueButtonText,
- TQWidget *parent);
+ TQWidget *tqparent);
protected:
diff --git a/kolourpaint/kpview.cpp b/kolourpaint/kpview.cpp
index 8e0020f6..3f64bbb9 100644
--- a/kolourpaint/kpview.cpp
+++ b/kolourpaint/kpview.cpp
@@ -102,9 +102,9 @@ kpView::kpView (kpDocument *document,
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- TQWidget *parent, const char *name)
+ TQWidget *tqparent, const char *name)
- : TQWidget (parent, name, Qt::WNoAutoErase/*no flicker*/),
+ : TQWidget (tqparent, name, TQt::WNoAutoErase/*no flicker*/),
d (new kpViewPrivate ())
{
d->m_document = document;
@@ -121,8 +121,8 @@ kpView::kpView (kpDocument *document,
d->m_backBuffer = 0;
- setBackgroundMode (Qt::NoBackground); // no flicker
- setFocusPolicy (TQWidget::WheelFocus);
+ setBackgroundMode (TQt::NoBackground); // no flicker
+ setFocusPolicy (TQ_WheelFocus);
setMouseTracking (true); // mouseMoveEvent's even when no mousebtn down
setKeyCompression (true);
setInputMethodEnabled (true); // ensure using InputMethod
@@ -385,9 +385,9 @@ void kpView::updateBuddyViewScrollableContainerRectangle ()
TQRect docRect = buddyView ()->transformViewToDoc (
TQRect (buddyViewScrollableContainer ()->contentsXSoon (),
buddyViewScrollableContainer ()->contentsYSoon (),
- QMIN (buddyView ()->width (),
+ TQMIN (buddyView ()->width (),
buddyViewScrollableContainer ()->visibleWidth ()),
- QMIN (buddyView ()->height (),
+ TQMIN (buddyView ()->height (),
buddyViewScrollableContainer ()->visibleHeight ())));
@@ -462,8 +462,8 @@ TQRect kpView::transformViewToDoc (const TQRect &viewRect) const
const TQPoint docTopLeft = transformViewToDoc (viewRect.topLeft ());
// (don't call transformViewToDoc[XY]() - need to round up dimensions)
- const int docWidth = qRound (double (viewRect.width ()) * 100.0 / double (zoomLevelX ()));
- const int docHeight = qRound (double (viewRect.height ()) * 100.0 / double (zoomLevelY ()));
+ const int docWidth = tqRound (double (viewRect.width ()) * 100.0 / double (zoomLevelX ()));
+ const int docHeight = tqRound (double (viewRect.height ()) * 100.0 / double (zoomLevelY ()));
// (like TQWMatrix::Areas)
return TQRect (docTopLeft.x (), docTopLeft.y (), docWidth, docHeight);
@@ -505,8 +505,8 @@ TQRect kpView::transformDocToView (const TQRect &docRect) const
const TQPoint viewTopLeft = transformDocToView (docRect.topLeft ());
// (don't call transformDocToView[XY]() - need to round up dimensions)
- const int viewWidth = qRound (double (docRect.width ()) * double (zoomLevelX ()) / 100.0);
- const int viewHeight = qRound (double (docRect.height ()) * double (zoomLevelY ()) / 100.0);
+ const int viewWidth = tqRound (double (docRect.width ()) * double (zoomLevelX ()) / 100.0);
+ const int viewHeight = tqRound (double (docRect.height ()) * double (zoomLevelY ()) / 100.0);
// (like TQWMatrix::Areas)
return TQRect (viewTopLeft.x (), viewTopLeft.y (), viewWidth, viewHeight);
@@ -590,10 +590,10 @@ void kpView::addToQueuedArea (const TQRect &rect)
}
// public
-void kpView::invalidateQueuedArea ()
+void kpView::tqinvalidateQueuedArea ()
{
#if DEBUG_KP_VIEW && 0
- kdDebug () << "kpView::invalidateQueuedArea()" << endl;
+ kdDebug () << "kpView::tqinvalidateQueuedArea()" << endl;
#endif
d->m_queuedUpdateArea = TQRegion ();
@@ -621,7 +621,7 @@ void kpView::updateQueuedArea ()
if (!d->m_queuedUpdateArea.isNull ())
vm->updateView (this, d->m_queuedUpdateArea);
- invalidateQueuedArea ();
+ tqinvalidateQueuedArea ();
}
// public
@@ -668,7 +668,7 @@ bool kpView::mouseOnSelection (const TQPoint &viewPoint) const
if (!selViewRect.isValid ())
return false;
- return selViewRect.contains (mouseViewPoint (viewPoint));
+ return selViewRect.tqcontains (mouseViewPoint (viewPoint));
}
@@ -678,7 +678,7 @@ int kpView::textSelectionMoveBorderAtomicSize () const
if (!selection () || !selection ()->isText ())
return 0;
- return QMAX (4, zoomLevelX () / 100);
+ return TQMAX (4, zoomLevelX () / 100);
}
// public
@@ -730,7 +730,7 @@ bool kpView::selectionLargeEnoughToHaveResizeHandlesIfAtomicSize (int atomicSize
// public
int kpView::selectionResizeHandleAtomicSize () const
{
- int atomicSize = QMIN (7, QMAX (4, zoomLevelX () / 100));
+ int atomicSize = TQMIN (7, TQMAX (4, zoomLevelX () / 100));
while (atomicSize > 0 &&
!selectionLargeEnoughToHaveResizeHandlesIfAtomicSize (atomicSize))
{
@@ -783,9 +783,9 @@ TQRegion kpView::selectionResizeHandlesViewRegion (bool forRenderer) const
if (selection ()->isText () && selection ()->textLines ().size () == 1)
{
if (zoomLevelX () <= 150)
- vertEdgeAtomicLength = QMIN (vertEdgeAtomicLength, QMAX (2, zoomLevelX () / 100));
+ vertEdgeAtomicLength = TQMIN (vertEdgeAtomicLength, TQMAX (2, zoomLevelX () / 100));
else if (zoomLevelX () <= 250)
- vertEdgeAtomicLength = QMIN (vertEdgeAtomicLength, QMAX (3, zoomLevelX () / 100));
+ vertEdgeAtomicLength = TQMIN (vertEdgeAtomicLength, TQMAX (3, zoomLevelX () / 100));
}
}
@@ -874,7 +874,7 @@ int kpView::mouseOnSelectionResizeHandle (const TQPoint &viewPoint) const
#define LOCAL_POINT_IN_BOX_AT(x,y) \
- TQRect ((x), (y), atomicLength, atomicLength).contains (viewPointRelSel)
+ TQRect ((x), (y), atomicLength, atomicLength).tqcontains (viewPointRelSel)
// Favour the bottom & right and the corners.
if (LOCAL_POINT_IN_BOX_AT (selViewRect.width () - atomicLength,
@@ -957,7 +957,7 @@ bool kpView::mouseOnSelectionToSelectText (const TQPoint &viewPoint) const
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::mouseMoveEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW && 0
@@ -969,7 +969,7 @@ void kpView::mouseMoveEvent (TQMouseEvent *e)
// TODO: This is wrong if you leaveEvent the mainView by mouseMoving on the
// mainView, landing on top of the thumbnailView cleverly put on top
// of the mainView.
- setHasMouse (rect ().contains (e->pos ()));
+ setHasMouse (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ()));
if (tool ())
tool ()->mouseMoveEvent (e);
@@ -977,7 +977,7 @@ void kpView::mouseMoveEvent (TQMouseEvent *e)
e->accept ();
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::mousePressEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW && 0
@@ -994,7 +994,7 @@ void kpView::mousePressEvent (TQMouseEvent *e)
e->accept ();
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::mouseReleaseEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW && 0
@@ -1003,7 +1003,7 @@ void kpView::mouseReleaseEvent (TQMouseEvent *e)
<< endl;
#endif
- setHasMouse (rect ().contains (e->pos ()));
+ setHasMouse (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ()));
if (tool ())
tool ()->mouseReleaseEvent (e);
@@ -1011,7 +1011,7 @@ void kpView::mouseReleaseEvent (TQMouseEvent *e)
e->accept ();
}
-// public virtual [base QWidget]
+// public virtual [base TQWidget]
void kpView::wheelEvent (TQWheelEvent *e)
{
if (tool ())
@@ -1019,7 +1019,7 @@ void kpView::wheelEvent (TQWheelEvent *e)
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::keyPressEvent (TQKeyEvent *e)
{
#if DEBUG_KP_VIEW && 0
@@ -1032,7 +1032,7 @@ void kpView::keyPressEvent (TQKeyEvent *e)
e->accept ();
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::keyReleaseEvent (TQKeyEvent *e)
{
#if DEBUG_KP_VIEW && 0
@@ -1046,7 +1046,7 @@ void kpView::keyReleaseEvent (TQKeyEvent *e)
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::focusInEvent (TQFocusEvent *e)
{
#if DEBUG_KP_VIEW && 0
@@ -1056,7 +1056,7 @@ void kpView::focusInEvent (TQFocusEvent *e)
tool ()->focusInEvent (e);
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::focusOutEvent (TQFocusEvent *e)
{
#if DEBUG_KP_VIEW && 0
@@ -1067,7 +1067,7 @@ void kpView::focusOutEvent (TQFocusEvent *e)
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::enterEvent (TQEvent *e)
{
#if DEBUG_KP_VIEW && 0
@@ -1076,7 +1076,7 @@ void kpView::enterEvent (TQEvent *e)
// Don't call setHasMouse(true) as it displays the brush cursor (if
// active) when dragging open a menu and then dragging
- // past the extents of the menu due to Qt sending us an EnterEvent.
+ // past the extents of the menu due to TQt sending us an EnterEvent.
// We're already covered by MouseMoveEvent anyway.
//
// But disabling this causes a more serious problem: RMB on a text
@@ -1089,7 +1089,7 @@ void kpView::enterEvent (TQEvent *e)
tool ()->enterEvent (e);
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::leaveEvent (TQEvent *e)
{
#if DEBUG_KP_VIEW && 0
@@ -1102,7 +1102,7 @@ void kpView::leaveEvent (TQEvent *e)
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::dragEnterEvent (TQDragEnterEvent *)
{
#if DEBUG_KP_VIEW && 1
@@ -1112,7 +1112,7 @@ void kpView::dragEnterEvent (TQDragEnterEvent *)
setHasMouse (true);
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::dragLeaveEvent (TQDragLeaveEvent *)
{
#if DEBUG_KP_VIEW && 1
@@ -1123,7 +1123,7 @@ void kpView::dragLeaveEvent (TQDragLeaveEvent *)
}
-// public virtual [base QWidget]
+// public virtual [base TQWidget]
void kpView::resize (int w, int h)
{
#if DEBUG_KP_VIEW && 1
@@ -1135,7 +1135,7 @@ void kpView::resize (int w, int h)
TQWidget::resize (w, h);
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_VIEW && 1
@@ -1270,7 +1270,7 @@ void kpView::drawTransparentBackground (TQPainter *painter,
col = TQColor (224, 224, 224);
}
else
- col = Qt::white;
+ col = TQt::white;
painter->fillRect (x - rect.x (), y - rect.y (), cellSize, cellSize,
col);
@@ -1340,27 +1340,27 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
if (vm->selectionBorderVisible ())
{
TQPainter destPixmapPainter (destPixmap);
- destPixmapPainter.setRasterOp (Qt::XorROP);
- destPixmapPainter.setPen (TQPen (Qt::white, 1, Qt::DotLine));
+ destPixmapPainter.setRasterOp (TQt::XorROP);
+ destPixmapPainter.setPen (TQPen (TQt::white, 1, TQt::DotLine));
- destPixmapPainter.setBackgroundMode (TQPainter::OpaqueMode);
- destPixmapPainter.setBackgroundColor (Qt::blue);
+ destPixmapPainter.setBackgroundMode (Qt::OpaqueMode);
+ destPixmapPainter.setBackgroundColor (TQt::blue);
- TQBitmap maskBitmap;
- TQPainter maskBitmapPainter;
- if (destPixmap->mask ())
+ TQBitmap tqmaskBitmap;
+ TQPainter tqmaskBitmapPainter;
+ if (destPixmap->tqmask ())
{
- maskBitmap = *destPixmap->mask ();
- maskBitmapPainter.begin (&maskBitmap);
- maskBitmapPainter.setPen (Qt::color1/*opaque*/);
+ tqmaskBitmap = *destPixmap->tqmask ();
+ tqmaskBitmapPainter.begin (&tqmaskBitmap);
+ tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/);
}
#define PAINTER_CMD(cmd) \
{ \
destPixmapPainter . cmd; \
- if (maskBitmapPainter.isActive ()) \
- maskBitmapPainter . cmd; \
+ if (tqmaskBitmapPainter.isActive ()) \
+ tqmaskBitmapPainter . cmd; \
}
TQRect boundingRect = sel->boundingRect ();
@@ -1432,7 +1432,7 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
{
destPixmapPainter.save ();
- destPixmapPainter.setRasterOp (Qt::NotROP);
+ destPixmapPainter.setRasterOp (TQt::NotROP);
PAINTER_CMD (drawRect (boundingRect.x () - docRect.x (),
boundingRect.y () - docRect.y (),
boundingRect.width (),
@@ -1443,17 +1443,17 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
}
else
{
- // SYNC: Work around Qt bug: can't draw 1x1 rectangle
+ // SYNC: Work around TQt bug: can't draw 1x1 rectangle
PAINTER_CMD (drawPoint (boundingRect.topLeft () - docRect.topLeft ()));
}
#undef PAINTER_CMD
destPixmapPainter.end ();
- if (maskBitmapPainter.isActive ())
- maskBitmapPainter.end ();
+ if (tqmaskBitmapPainter.isActive ())
+ tqmaskBitmapPainter.end ();
- destPixmap->setMask (maskBitmap);
+ destPixmap->setMask (tqmaskBitmap);
}
@@ -1480,24 +1480,24 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
{
rect.moveBy (-docRect.x (), -docRect.y ());
- TQBitmap maskBitmap;
- TQPainter destPixmapPainter, maskBitmapPainter;
+ TQBitmap tqmaskBitmap;
+ TQPainter destPixmapPainter, tqmaskBitmapPainter;
- if (destPixmap->mask ())
+ if (destPixmap->tqmask ())
{
- maskBitmap = *destPixmap->mask ();
- maskBitmapPainter.begin (&maskBitmap);
- maskBitmapPainter.fillRect (rect, Qt::color1/*opaque*/);
- maskBitmapPainter.end ();
+ tqmaskBitmap = *destPixmap->tqmask ();
+ tqmaskBitmapPainter.begin (&tqmaskBitmap);
+ tqmaskBitmapPainter.fillRect (rect, TQt::color1/*opaque*/);
+ tqmaskBitmapPainter.end ();
}
destPixmapPainter.begin (destPixmap);
- destPixmapPainter.setRasterOp (Qt::XorROP);
- destPixmapPainter.fillRect (rect, Qt::white);
+ destPixmapPainter.setRasterOp (TQt::XorROP);
+ destPixmapPainter.fillRect (rect, TQt::white);
destPixmapPainter.end ();
- if (!maskBitmap.isNull ())
- destPixmap->setMask (maskBitmap);
+ if (!tqmaskBitmap.isNull ())
+ destPixmap->setMask (tqmaskBitmap);
}
}
}
@@ -1559,16 +1559,16 @@ void kpView::paintEventDrawSelectionResizeHandles (TQPainter *painter, const TQR
TQColor fillColor;
if (selectionResizeHandleAtomicSizeCloseToZoomLevel ())
{
- fillColor = Qt::blue;
- painter->setRasterOp (Qt::CopyROP);
+ fillColor = TQt::blue;
+ painter->setRasterOp (TQt::CopyROP);
}
else
{
- fillColor = Qt::white;
- painter->setRasterOp (Qt::XorROP);
+ fillColor = TQt::white;
+ painter->setRasterOp (TQt::XorROP);
}
- TQMemArray <TQRect> rects = selResizeHandlesRegion.rects ();
+ TQMemArray <TQRect> rects = selResizeHandlesRegion.tqrects ();
for (TQMemArray <TQRect>::ConstIterator it = rects.begin ();
it != rects.end ();
it++)
@@ -1607,8 +1607,8 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect
int hzoomMultiple = zoomLevelX () / 100;
int vzoomMultiple = zoomLevelY () / 100;
- TQPen ordinaryPen (Qt::gray);
- TQPen tileBoundaryPen (Qt::lightGray);
+ TQPen ordinaryPen (TQt::gray);
+ TQPen tileBoundaryPen (TQt::lightGray);
painter->setPen (ordinaryPen);
@@ -1622,7 +1622,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect
if (0 && tileHeight > 0 && y % tileHeight == 0)
{
painter->setPen (tileBoundaryPen);
- //painter.setRasterOp (Qt::XorROP);
+ //painter.setRasterOp (TQt::XorROP);
}
painter->drawLine (0, y, viewRect.right () - viewRect.left (), y);
@@ -1630,7 +1630,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect
if (0 && tileHeight > 0 && y % tileHeight == 0)
{
painter->setPen (ordinaryPen);
- //painter.setRasterOp (Qt::CopyROP);
+ //painter.setRasterOp (TQt::CopyROP);
}
}
@@ -1644,7 +1644,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect
if (0 && tileWidth > 0 && x % tileWidth == 0)
{
painter->setPen (tileBoundaryPen);
- //painter.setRasterOp (Qt::XorROP);
+ //painter.setRasterOp (TQt::XorROP);
}
painter->drawLine (x, 0, x, viewRect.bottom () - viewRect.top ());
@@ -1652,7 +1652,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect
if (0 && tileWidth > 0 && x % tileWidth == 0)
{
painter->setPen (ordinaryPen);
- //painter.setRasterOp (Qt::CopyROP);
+ //painter.setRasterOp (TQt::CopyROP);
}
}
}
@@ -1685,7 +1685,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect)
// uncomment to cause deliberate flicker (identifies needless updates)
#if DEBUG_KP_VIEW_RENDERER && 0
TQPainter flickerPainter (this);
- flickerPainter.fillRect (viewRect, Qt::red);
+ flickerPainter.fillRect (viewRect, TQt::red);
flickerPainter.end ();
#endif
@@ -1711,7 +1711,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect)
// uncomment to catch bits of the view that the renderer forgot to update
#if 0
- d->m_backBuffer->fill (Qt::green);
+ d->m_backBuffer->fill (TQt::green);
#endif
TQPainter backBufferPainter;
@@ -1747,11 +1747,11 @@ void kpView::paintEventDrawRect (const TQRect &viewRect)
#endif
}
- if (docPixmap.mask () ||
+ if (docPixmap.tqmask () ||
(tempPixmapWillBeRendered && vm->tempPixmap ()->mayChangeDocumentMask ()))
{
#if DEBUG_KP_VIEW_RENDERER && 1
- kdDebug () << "\tmask=" << (bool) docPixmap.mask ()
+ kdDebug () << "\ttqmask=" << (bool) docPixmap.tqmask ()
<< endl;
#endif
paintEventDrawCheckerBoard (&backBufferPainter, viewRect);
@@ -1759,7 +1759,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect)
else
{
#if DEBUG_KP_VIEW_RENDERER && 1
- kdDebug () << "\tno mask" << endl;
+ kdDebug () << "\tno tqmask" << endl;
#endif
}
@@ -1820,8 +1820,8 @@ void kpView::paintEventDrawRect (const TQRect &viewRect)
{
backBufferPainter.save ();
- backBufferPainter.setRasterOp (Qt::XorROP);
- backBufferPainter.setPen (Qt::white);
+ backBufferPainter.setRasterOp (TQt::XorROP);
+ backBufferPainter.setPen (TQt::white);
backBufferPainter.translate (-viewRect.x (), -viewRect.y ());
backBufferPainter.drawRect (bvsvRect);
@@ -1850,7 +1850,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect)
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpView::paintEvent (TQPaintEvent *e)
{
// sync: kpViewPrivate
@@ -1888,7 +1888,7 @@ void kpView::paintEvent (TQPaintEvent *e)
TQRegion viewRegion = clipRegion ().intersect (e->region ());
- TQMemArray <TQRect> rects = viewRegion.rects ();
+ TQMemArray <TQRect> rects = viewRegion.tqrects ();
#if DEBUG_KP_VIEW_RENDERER && 1
kdDebug () << "\t#rects = " << rects.count () << endl;
#endif
diff --git a/kolourpaint/kpview.h b/kolourpaint/kpview.h
index 6464d869..66471489 100644
--- a/kolourpaint/kpview.h
+++ b/kolourpaint/kpview.h
@@ -56,9 +56,10 @@ class kpViewScrollableContainer;
*
* @author Clarence Dang <dang@kde.org>
*/
-class kpView : public QWidget
+class kpView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -80,7 +81,7 @@ public:
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- TQWidget *parent, const char *name);
+ TQWidget *tqparent, const char *name);
/**
* Destructs this view. Informs the viewManager() that the mouse
@@ -147,8 +148,8 @@ public:
/**
* Sets the horizontal and vertical zoom levels.
*
- * @param hzoom Horizontal zoom level.
- * @param vzoom Vertical zoom level.
+ * @param hzoomQt::Horizontal zoom level.
+ * @param vzoomQt::Vertical zoom level.
*
* If reimplementing, you must call this base implementation.
*/
@@ -227,7 +228,7 @@ protected slots:
public:
/**
- * @param viewX Horizontal position in view coordinates.
+ * @param viewXQt::Horizontal position in view coordinates.
*
* @returns viewX transformed to document coordinates, based on the
* origin() and zoomLevelX().
@@ -235,7 +236,7 @@ public:
double transformViewToDocX (double viewX) const;
/**
- * @param viewY Vertical position in view coordinates.
+ * @param viewYQt::Vertical position in view coordinates.
*
* @returns viewY transformed to document coordinates, based on the
* origin() and zoomLevelY().
@@ -264,7 +265,7 @@ public:
/**
- * @param docX Horizontal position in document coordinates.
+ * @param docXQt::Horizontal position in document coordinates.
*
* @returns docX transformed to view coordinates, based on the origin()
* and zoomLevelX().
@@ -272,7 +273,7 @@ public:
double transformDocToViewX (double docX) const;
/**
- * @param docY Vertical position in document coordinates.
+ * @param docYQt::Vertical position in document coordinates.
*
* @returns docY transformed to view coordinates, based on the origin()
* and zoomLevelY().
@@ -343,10 +344,10 @@ protected:
public:
/**
* Adds a region (in view coordinates) to the dirty area that is
- * repainted when the parent @ref kpViewManager is set not to queue
+ * tqrepainted when the tqparent @ref kpViewManager is set not to queue
* updates.
*
- * @param region Region (in view coordinates) that needs repainting.
+ * @param region Region (in view coordinates) that needs tqrepainting.
*/
void addToQueuedArea (const TQRegion &region);
@@ -354,10 +355,10 @@ public:
* Convenience function. Same as above.
*
* Adds a rectangle (in view coordinates) to the dirty area that is
- * repainted when the parent @ref kpViewManager is set not to queue
+ * tqrepainted when the tqparent @ref kpViewManager is set not to queue
* updates.
*
- * @param rect Rectangle (in view coordinates) that needs repainting.
+ * @param rect Rectangle (in view coordinates) that needs tqrepainting.
*/
void addToQueuedArea (const TQRect &rect);
@@ -365,11 +366,11 @@ public:
* Removes the dirty region that has been queued for updating.
* Does not update the view.
*/
- void invalidateQueuedArea ();
+ void tqinvalidateQueuedArea ();
/**
* Updates the part of the view described by dirty region and then
- * calls invalidateQueuedArea(). Does nothing if @ref kpViewManager
+ * calls tqinvalidateQueuedArea(). Does nothing if @ref kpViewManager
* is set to queue updates.
*/
void updateQueuedArea ();
diff --git a/kolourpaint/kpviewmanager.cpp b/kolourpaint/kpviewmanager.cpp
index acff3413..e7a095fd 100644
--- a/kolourpaint/kpviewmanager.cpp
+++ b/kolourpaint/kpviewmanager.cpp
@@ -78,7 +78,7 @@ void kpViewManager::registerView (kpView *view)
#if DEBUG_KP_VIEW_MANAGER && 1
kdDebug () << "kpViewManager::registerView (" << view << ")" << endl;
#endif
- if (view && m_views.findRef (view) < 0)
+ if (view && m_views.tqfindRef (view) < 0)
{
#if DEBUG_KP_VIEW_MANAGER && 1
kdDebug () << "\tadded view" << endl;
@@ -152,7 +152,7 @@ void kpViewManager::setTempPixmap (const kpTempPixmap &tempPixmap)
}
// public
-void kpViewManager::invalidateTempPixmap ()
+void kpViewManager::tqinvalidateTempPixmap ()
{
if (!m_tempPixmap)
return;
@@ -463,13 +463,13 @@ void kpViewManager::unsetCursor ()
}
-kpView *kpViewManager::viewUnderCursor (bool usingQt) const
+kpView *kpViewManager::viewUnderCursor (bool usingTQt) const
{
- if (!usingQt)
+ if (!usingTQt)
{
kpViewManager *nonConstThis = const_cast <kpViewManager *> (this);
- if (m_viewUnderCursor && nonConstThis->m_views.findRef (m_viewUnderCursor) < 0)
+ if (m_viewUnderCursor && nonConstThis->m_views.tqfindRef (m_viewUnderCursor) < 0)
{
kdError () << "kpViewManager::viewUnderCursor(): invalid view" << endl;
nonConstThis->m_viewUnderCursor = 0;
@@ -628,7 +628,7 @@ void kpViewManager::updateView (kpView *v, const TQRect &viewRect)
if (!queueUpdates ())
{
if (fastUpdates ())
- v->repaint (viewRect, false/*no erase*/);
+ v->tqrepaint (viewRect, false/*no erase*/);
else
v->update (viewRect);
}
@@ -646,7 +646,7 @@ void kpViewManager::updateView (kpView *v, const TQRegion &viewRegion)
if (!queueUpdates ())
{
if (fastUpdates ())
- v->repaint (viewRegion, false/*no erase*/);
+ v->tqrepaint (viewRegion, false/*no erase*/);
else
v->update (viewRegion.boundingRect ());
}
@@ -719,7 +719,7 @@ void kpViewManager::updateViews (const TQRect &docRect)
{
TQRect viewRect = view->transformDocToView (docRect);
- int diff = qRound (double (QMAX (view->zoomLevelX (), view->zoomLevelY ())) / 100.0) + 1;
+ int diff = tqRound (double (TQMAX (view->zoomLevelX (), view->zoomLevelY ())) / 100.0) + 1;
TQRect newRect = TQRect (viewRect.x () - diff,
viewRect.y () - diff,
diff --git a/kolourpaint/kpviewmanager.h b/kolourpaint/kpviewmanager.h
index 9bb6e8b6..db2724ce 100644
--- a/kolourpaint/kpviewmanager.h
+++ b/kolourpaint/kpviewmanager.h
@@ -44,9 +44,10 @@ class kpView;
class kpMainWindow;
class kpTempPixmap;
-class kpViewManager : public QObject
+class kpViewManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
kpViewManager (kpMainWindow *mainWindow);
@@ -68,7 +69,7 @@ public:
const kpTempPixmap *tempPixmap () const;
void setTempPixmap (const kpTempPixmap &tempPixmap);
- void invalidateTempPixmap ();
+ void tqinvalidateTempPixmap ();
//
@@ -120,7 +121,7 @@ public:
// View
//
- kpView *viewUnderCursor (bool usingQt = false) const;
+ kpView *viewUnderCursor (bool usingTQt = false) const;
//
// TQWidget::hasMouse() is unreliable:
@@ -156,18 +157,18 @@ public:
//
// This is better than TQWidget::setUpdatesEnabled() because
// restoreQueueUpdates() automatically restores only the regions
- // of the views that need to be repainted, per view.
+ // of the views that need to be tqrepainted, per view.
bool queueUpdates () const;
void setQueueUpdates ();
void restoreQueueUpdates ();
// Controls behaviour of updateViews():
//
- // Slow: Let Qt buffer paint events via TQWidget::update().
+ // Slow: Let TQt buffer paint events via TQWidget::update().
// Results in less flicker. Paint events are probably merged
// so long-term efficiency is increased at the expense of
// reduced responsiveness (default).
- // Fast: Force Qt to redraw immediately. No paint events
+ // Fast: Force TQt to redraw immediately. No paint events
// are merged so there is great potential for flicker,
// if used inappropriately. Use this when the redraw
// area is small and KolourPaint's responsiveness is
diff --git a/kolourpaint/kpviewscrollablecontainer.cpp b/kolourpaint/kpviewscrollablecontainer.cpp
index c3942806..feeb5a1b 100644
--- a/kolourpaint/kpviewscrollablecontainer.cpp
+++ b/kolourpaint/kpviewscrollablecontainer.cpp
@@ -58,8 +58,8 @@ static const int GripHandleSize = 7;
kpGrip::kpGrip (GripType type,
- TQWidget *parent, const char *name)
- : TQWidget (parent, name),
+ TQWidget *tqparent, const char *name)
+ : TQWidget (tqparent, name),
m_type (type),
m_startPoint (KP_INVALID_POINT),
m_currentPoint (KP_INVALID_POINT),
@@ -90,19 +90,19 @@ const TQCursor &kpGrip::cursorForType (GripType type)
switch (type)
{
case Bottom:
- return Qt::sizeVerCursor;
+ return TQt::sizeVerCursor;
break; // one day you'll forget
case Right:
- return Qt::sizeHorCursor;
+ return TQt::sizeHorCursor;
break; // one day you'll forget
case BottomRight:
- return Qt::sizeFDiagCursor;
+ return TQt::sizeFDiagCursor;
break; // one day you'll forget
}
- return Qt::arrowCursor;
+ return TQt::arrowCursor;
}
@@ -166,7 +166,7 @@ TQString kpGrip::userMessage () const
void kpGrip::setUserMessage (const TQString &message)
{
// Don't do NOP checking here since another grip might have changed
- // the message so an apparent NOP for this grip is not a NOP in the
+ // the message so an aptqparent NOP for this grip is not a NOP in the
// global sense (kpViewScrollableContainer::slotGripStatusMessageChanged()).
m_userMessage = message;
@@ -184,7 +184,7 @@ void kpGrip::updatePixmap ()
return;
TQPixmap pixmap (width (), height ());
- pixmap.fill (colorGroup ().highlight ());
+ pixmap.fill (tqcolorGroup ().highlight ());
kpPixmapFX::ensureTransparentAt (&pixmap, pixmap.rect ());
const TQRect hr = hotRect ();
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -194,8 +194,8 @@ void kpGrip::updatePixmap ()
kpPixmapFX::ensureOpaqueAt (&pixmap, hr);
setBackgroundPixmap (pixmap);
- if (pixmap.mask ())
- setMask (*pixmap.mask ());
+ if (pixmap.tqmask ())
+ setMask (*pixmap.tqmask ());
}
@@ -212,7 +212,7 @@ void kpGrip::cancel ()
m_currentPoint = KP_INVALID_POINT;
setUserMessage (i18n ("Resize Image: Let go of all the mouse buttons."));
- setCursor (Qt::arrowCursor);
+ setCursor (TQt::arrowCursor);
m_shouldReleaseMouseButtons = true;
releaseKeyboard ();
@@ -220,17 +220,17 @@ void kpGrip::cancel ()
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpGrip::keyReleaseEvent (TQKeyEvent *e)
{
if (m_startPoint != KP_INVALID_POINT &&
- e->key () == Qt::Key_Escape)
+ e->key () == TQt::Key_Escape)
{
cancel ();
}
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpGrip::mousePressEvent (TQMouseEvent *e)
{
if (m_startPoint == KP_INVALID_POINT &&
@@ -279,7 +279,7 @@ void kpGrip::mouseMovedTo (const TQPoint &point, bool dueToDragScroll)
dueToDragScroll);
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpGrip::mouseMoveEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -298,7 +298,7 @@ void kpGrip::mouseMoveEvent (TQMouseEvent *e)
mouseMovedTo (e->pos (), false/*not due to drag scroll*/);
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpGrip::mouseReleaseEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -323,7 +323,7 @@ void kpGrip::mouseReleaseEvent (TQMouseEvent *e)
if ((e->stateAfter () & Qt::MouseButtonMask) == 0)
{
m_shouldReleaseMouseButtons = false;
- setUserMessage (TQString::null);
+ setUserMessage (TQString());
setCursor (cursorForType (m_type));
releaseKeyboard ();
@@ -332,7 +332,7 @@ void kpGrip::mouseReleaseEvent (TQMouseEvent *e)
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpGrip::resizeEvent (TQResizeEvent *)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -342,7 +342,7 @@ void kpGrip::resizeEvent (TQResizeEvent *)
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpGrip::enterEvent (TQEvent * /*e*/)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -362,7 +362,7 @@ void kpGrip::enterEvent (TQEvent * /*e*/)
}
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpGrip::leaveEvent (TQEvent * /*e*/)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -374,12 +374,12 @@ void kpGrip::leaveEvent (TQEvent * /*e*/)
if (m_startPoint == KP_INVALID_POINT &&
!m_shouldReleaseMouseButtons)
{
- setUserMessage (TQString::null);
+ setUserMessage (TQString());
}
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpGrip::paintEvent (TQPaintEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 0
@@ -390,10 +390,10 @@ void kpGrip::paintEvent (TQPaintEvent *e)
// TODO: Are we checking for m_view == 0 often enough?
-kpViewScrollableContainer::kpViewScrollableContainer (kpMainWindow *parent,
+kpViewScrollableContainer::kpViewScrollableContainer (kpMainWindow *tqparent,
const char *name)
- : TQScrollView ((TQWidget *) parent, name, Qt::WStaticContents | Qt::WNoAutoErase),
- m_mainWindow (parent),
+ : TQScrollView ((TQWidget *) tqparent, name, TQt::WStaticContents | TQt::WNoAutoErase),
+ m_mainWindow (tqparent),
m_contentsXSoon (-1), m_contentsYSoon (-1),
m_view (0),
m_bottomGrip (new kpGrip (kpGrip::Bottom, viewport (), "Bottom Grip")),
@@ -500,9 +500,9 @@ void kpViewScrollableContainer::clearStatusMessage ()
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 1
kdDebug () << "kpViewScrollableContainer::clearStatusMessage()" << endl;
#endif
- m_bottomRightGrip->setUserMessage (TQString::null);
- m_bottomGrip->setUserMessage (TQString::null);
- m_rightGrip->setUserMessage (TQString::null);
+ m_bottomRightGrip->setUserMessage (TQString());
+ m_bottomGrip->setUserMessage (TQString());
+ m_rightGrip->setUserMessage (TQString());
}
@@ -518,7 +518,7 @@ TQSize kpViewScrollableContainer::newDocSize (int viewDX, int viewDY) const
const int docX = (int) m_view->transformViewToDocX (m_view->width () + viewDX);
const int docY = (int) m_view->transformViewToDocY (m_view->height () + viewDY);
- return TQSize (QMAX (1, docX), QMAX (1, docY));
+ return TQSize (TQMAX (1, docX), TQMAX (1, docY));
}
@@ -552,7 +552,7 @@ int kpViewScrollableContainer::bottomResizeLineWidth () const
return -1;
if (docResizingGrip ()->type () & kpGrip::Bottom)
- return QMAX (m_view->zoomLevelY () / 100, 1);
+ return TQMAX (m_view->zoomLevelY () / 100, 1);
else
return 1;
}
@@ -567,7 +567,7 @@ int kpViewScrollableContainer::rightResizeLineWidth () const
return -1;
if (docResizingGrip ()->type () & kpGrip::Right)
- return QMAX (m_view->zoomLevelX () / 100, 1);
+ return TQMAX (m_view->zoomLevelX () / 100, 1);
else
return 1;
}
@@ -644,7 +644,7 @@ TQRect kpViewScrollableContainer::mapViewToGlobal (const TQRect &viewRect)
// protected
-void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect (
+void kpViewScrollableContainer::tqrepaintWidgetAtResizeLineViewRect (
TQWidget *widget, const TQRect &resizeLineViewRect)
{
const TQRect resizeLineGlobalRect = mapViewToGlobal (resizeLineViewRect);
@@ -660,19 +660,19 @@ void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect (
if (redrawWidgetRect.isValid ())
{
- // TODO: should be "!widget->testWFlags (Qt::WRepaintNoErase)"
+ // TODO: should be "!widget->testWFlags (TQt::WRepaintNoErase)"
// but for some reason, doesn't work for viewport().
const bool erase = !dynamic_cast <kpView *> (widget);
- widget->repaint (redrawWidgetRect, erase);
+ widget->tqrepaint (redrawWidgetRect, erase);
}
}
// protected
-void kpViewScrollableContainer::repaintWidgetAtResizeLines (TQWidget *widget)
+void kpViewScrollableContainer::tqrepaintWidgetAtResizeLines (TQWidget *widget)
{
- repaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ());
- repaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ());
- repaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ());
+ tqrepaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ());
+ tqrepaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ());
+ tqrepaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ());
}
// protected
@@ -680,12 +680,12 @@ void kpViewScrollableContainer::eraseResizeLines ()
{
if (m_resizeRoundedLastViewX >= 0 && m_resizeRoundedLastViewY >= 0)
{
- repaintWidgetAtResizeLines (viewport ());
- repaintWidgetAtResizeLines (m_view);
+ tqrepaintWidgetAtResizeLines (viewport ());
+ tqrepaintWidgetAtResizeLines (m_view);
- repaintWidgetAtResizeLines (m_bottomGrip);
- repaintWidgetAtResizeLines (m_rightGrip);
- repaintWidgetAtResizeLines (m_bottomRightGrip);
+ tqrepaintWidgetAtResizeLines (m_bottomGrip);
+ tqrepaintWidgetAtResizeLines (m_rightGrip);
+ tqrepaintWidgetAtResizeLines (m_bottomRightGrip);
}
}
@@ -702,19 +702,19 @@ void kpViewScrollableContainer::drawResizeLines ()
TQPainter p (viewport (), true/*unclipped*/);
- p.setRasterOp (Qt::NotROP);
+ p.setRasterOp (TQt::NotROP);
const TQRect rightRect = rightResizeLineRect ();
if (rightRect.isValid ())
- p.fillRect (mapViewToViewport (rightRect), Qt::white);
+ p.fillRect (mapViewToViewport (rightRect), TQt::white);
const TQRect bottomRect = bottomResizeLineRect ();
if (bottomRect.isValid ())
- p.fillRect (mapViewToViewport (bottomRect), Qt::white);
+ p.fillRect (mapViewToViewport (bottomRect), TQt::white);
const TQRect bottomRightRect = bottomRightResizeLineRect ();
if (bottomRightRect.isValid ())
- p.fillRect (mapViewToViewport (bottomRightRect), Qt::white);
+ p.fillRect (mapViewToViewport (bottomRightRect), TQt::white);
p.end ();
}
@@ -816,8 +816,8 @@ void kpViewScrollableContainer::slotGripContinuedDraw (int inViewDX, int inViewD
m_haveMovedFromOriginalDocSize = true;
- updateResizeLines (QMAX (1, QMAX (m_view->width () + viewDX, (int) m_view->transformDocToViewX (1))),
- QMAX (1, QMAX (m_view->height () + viewDY, (int) m_view->transformDocToViewY (1))),
+ updateResizeLines (TQMAX (1, TQMAX (m_view->width () + viewDX, (int) m_view->transformDocToViewX (1))),
+ TQMAX (1, TQMAX (m_view->height () + viewDY, (int) m_view->transformDocToViewY (1))),
viewDX, viewDY);
emit continuedDocResize (newDocSize ());
@@ -881,7 +881,7 @@ void kpViewScrollableContainer::recalculateStatusMessage ()
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpViewScrollabelContainer::recalculateStatusMessage()" << endl;
- kdDebug () << "\tQCursor::pos=" << TQCursor::pos ()
+ kdDebug () << "\tTQCursor::pos=" << TQCursor::pos ()
<< " global visibleRect="
<< kpWidgetMapper::toGlobal (this,
TQRect (0, 0, visibleWidth (), visibleHeight ()))
@@ -898,23 +898,23 @@ void kpViewScrollableContainer::recalculateStatusMessage ()
//
if (kpWidgetMapper::toGlobal (this,
TQRect (0, 0, visibleWidth (), visibleHeight ()))
- .contains (TQCursor::pos ()))
+ .tqcontains (TQCursor::pos ()))
{
if (m_bottomRightGrip->isShown () &&
m_bottomRightGrip->hotRect (true/*to global*/)
- .contains (TQCursor::pos ()))
+ .tqcontains (TQCursor::pos ()))
{
m_bottomRightGrip->setUserMessage (i18n ("Left drag the handle to resize the image."));
}
else if (m_bottomGrip->isShown () &&
m_bottomGrip->hotRect (true/*to global*/)
- .contains (TQCursor::pos ()))
+ .tqcontains (TQCursor::pos ()))
{
m_bottomGrip->setUserMessage (i18n ("Left drag the handle to resize the image."));
}
else if (m_rightGrip->isShown () &&
m_rightGrip->hotRect (true/*to global*/)
- .contains (TQCursor::pos ()))
+ .tqcontains (TQCursor::pos ()))
{
m_rightGrip->setUserMessage (i18n ("Left drag the handle to resize the image."));
}
@@ -988,7 +988,7 @@ void kpViewScrollableContainer::connectViewSignals ()
}
-// public virtual [base QScrollView]
+// public virtual [base TQScrollView]
void kpViewScrollableContainer::addChild (TQWidget *widget, int x, int y)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -1119,7 +1119,7 @@ bool kpViewScrollableContainer::beginDragScroll (const TQPoint &/*docPoint*/,
bool stopDragScroll = true;
bool scrolled = false;
- if (!noDragScrollRect ().contains (p))
+ if (!noDragScrollRect ().tqcontains (p))
{
if (m_dragScrollTimer->isActive ())
{
@@ -1241,8 +1241,8 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething)
<< endl;
#endif
- dx *= dxMultiplier;// * QMAX (1, m_zoomLevel / 100);
- dy *= dyMultiplier;// * QMAX (1, m_zoomLevel / 100);
+ dx *= dxMultiplier;// * TQMAX (1, m_zoomLevel / 100);
+ dy *= dyMultiplier;// * TQMAX (1, m_zoomLevel / 100);
if (dx || dy)
{
@@ -1269,7 +1269,7 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething)
// Repaint newly exposed region immediately to reduce tearing
// of scrollView.
- m_view->repaint (region, false/*no erase*/);
+ m_view->tqrepaint (region, false/*no erase*/);
}
}
@@ -1284,7 +1284,7 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething)
return scrolled;
}
-// protected virtual [base QScrollView]
+// protected virtual [base TQScrollView]
void kpViewScrollableContainer::contentsDragMoveEvent (TQDragMoveEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -1303,7 +1303,7 @@ bool kpViewScrollableContainer::slotDragScroll ()
}
-// protected virtual [base QScrollView]
+// protected virtual [base TQScrollView]
void kpViewScrollableContainer::contentsMouseMoveEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -1315,7 +1315,7 @@ void kpViewScrollableContainer::contentsMouseMoveEvent (TQMouseEvent *e)
TQScrollView::contentsMouseMoveEvent (e);
}
-// protected virtual [base QScrollView]
+// protected virtual [base TQScrollView]
void kpViewScrollableContainer::mouseMoveEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -1328,7 +1328,7 @@ void kpViewScrollableContainer::mouseMoveEvent (TQMouseEvent *e)
}
-// protected virtual [base QScrollView]
+// protected virtual [base TQScrollView]
void kpViewScrollableContainer::contentsWheelEvent (TQWheelEvent *e)
{
e->ignore ();
@@ -1348,13 +1348,13 @@ TQRect kpViewScrollableContainer::noDragScrollRect () const
height () - DragScrollLeftTopMargin - DragScrollRightBottomMargin);
}
-// protected virtual [base QScrollView]
+// protected virtual [base TQScrollView]
bool kpViewScrollableContainer::eventFilter (TQObject *watchedObject, TQEvent *event)
{
return TQScrollView::eventFilter (watchedObject, event);
}
-// protected virtual [base QScrollView]
+// protected virtual [base TQScrollView]
void kpViewScrollableContainer::viewportPaintEvent (TQPaintEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -1366,7 +1366,7 @@ void kpViewScrollableContainer::viewportPaintEvent (TQPaintEvent *e)
TQScrollView::viewportPaintEvent (e);
}
-// protected virtual [base QFrame]
+// protected virtual [base TQFrame]
void kpViewScrollableContainer::paintEvent (TQPaintEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 0
@@ -1378,7 +1378,7 @@ void kpViewScrollableContainer::paintEvent (TQPaintEvent *e)
TQScrollView::paintEvent (e);
}
-// protected virtual [base QScrollView]
+// protected virtual [base TQScrollView]
void kpViewScrollableContainer::resizeEvent (TQResizeEvent *e)
{
TQScrollView::resizeEvent (e);
diff --git a/kolourpaint/kpviewscrollablecontainer.h b/kolourpaint/kpviewscrollablecontainer.h
index ad948e9a..08f79b1e 100644
--- a/kolourpaint/kpviewscrollablecontainer.h
+++ b/kolourpaint/kpviewscrollablecontainer.h
@@ -45,9 +45,10 @@ class kpMainWindow;
// TODO: refactor by sharing iface's with kpTool
-class kpGrip : public QWidget
+class kpGrip : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum GripType
@@ -57,7 +58,7 @@ public:
};
kpGrip (GripType type,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
virtual ~kpGrip ();
GripType type () const;
@@ -112,12 +113,13 @@ protected:
};
-class kpViewScrollableContainer : public QScrollView
+class kpViewScrollableContainer : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpViewScrollableContainer (kpMainWindow *parent, const char *name = 0);
+ kpViewScrollableContainer (kpMainWindow *tqparent, const char *name = 0);
virtual ~kpViewScrollableContainer ();
// Same as contentsX() and contentsY() except that after
@@ -169,9 +171,9 @@ protected:
TQRect mapViewportToGlobal (const TQRect &viewportRect);
TQRect mapViewToGlobal (const TQRect &viewRect);
- void repaintWidgetAtResizeLineViewRect (TQWidget *widget,
+ void tqrepaintWidgetAtResizeLineViewRect (TQWidget *widget,
const TQRect &resizeLineViewRect);
- void repaintWidgetAtResizeLines (TQWidget *widget);
+ void tqrepaintWidgetAtResizeLines (TQWidget *widget);
void eraseResizeLines ();
void drawResizeLines ();
@@ -211,7 +213,7 @@ protected slots:
void slotViewDestroyed ();
public slots:
- // TODO: Why the QPoint's?
+ // TODO: Why the TQPoint's?
// Why the need for view's zoomLevel? We have the view() anyway.
bool beginDragScroll (const TQPoint &, const TQPoint &,
int zoomLevel,
diff --git a/kolourpaint/patches/doc_resize_no_flicker.diff b/kolourpaint/patches/doc_resize_no_flicker.diff
index ae5f9aba..3e763f95 100644
--- a/kolourpaint/patches/doc_resize_no_flicker.diff
+++ b/kolourpaint/patches/doc_resize_no_flicker.diff
@@ -117,9 +117,9 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp
+
// protected
--void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect (
+-void kpViewScrollableContainer::tqrepaintWidgetAtResizeLineViewRect (
- QWidget *widget, const QRect &resizeLineViewRect)
-+void kpViewScrollableContainer::repaintWidgetRegion (
++void kpViewScrollableContainer::tqrepaintWidgetRegion (
+ QWidget *widget,
+ const QRegion &viewRegion)
{
@@ -147,18 +147,18 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp
// TODO: should be "!widget->testWFlags (Qt::WRepaintNoErase)"
// but for some reason, doesn't work for viewport().
const bool erase = !dynamic_cast <kpView *> (widget);
-- widget->repaint (redrawWidgetRect, erase);
-+ widget->repaint (redrawWidgetRegion, erase);
+- widget->tqrepaint (redrawWidgetRect, erase);
++ widget->tqrepaint (redrawWidgetRegion, erase);
}
}
// protected
--void kpViewScrollableContainer::repaintWidgetAtResizeLines (QWidget *widget)
+-void kpViewScrollableContainer::tqrepaintWidgetAtResizeLines (QWidget *widget)
+void kpViewScrollableContainer::eraseResizeLines (const QRegion &viewRegion)
{
-- repaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ());
-- repaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ());
-- repaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ());
+- tqrepaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ());
+- tqrepaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ());
+- tqrepaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ());
-}
+ if (viewRegion.isEmpty ())
+ return;
@@ -168,19 +168,19 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp
-{
- if (m_resizeRoundedLastViewX >= 0 && m_resizeRoundedLastViewY >= 0)
- {
-- repaintWidgetAtResizeLines (viewport ());
-- repaintWidgetAtResizeLines (m_view);
+- tqrepaintWidgetAtResizeLines (viewport ());
+- tqrepaintWidgetAtResizeLines (m_view);
-- repaintWidgetAtResizeLines (m_bottomGrip);
-- repaintWidgetAtResizeLines (m_rightGrip);
-- repaintWidgetAtResizeLines (m_bottomRightGrip);
+- tqrepaintWidgetAtResizeLines (m_bottomGrip);
+- tqrepaintWidgetAtResizeLines (m_rightGrip);
+- tqrepaintWidgetAtResizeLines (m_bottomRightGrip);
- }
-+ repaintWidgetRegion (viewport (), viewRegion);
-+ repaintWidgetRegion (m_view, viewRegion);
++ tqrepaintWidgetRegion (viewport (), viewRegion);
++ tqrepaintWidgetRegion (m_view, viewRegion);
+
-+ repaintWidgetRegion (m_bottomGrip, viewRegion);
-+ repaintWidgetRegion (m_rightGrip, viewRegion);
-+ repaintWidgetRegion (m_bottomRightGrip, viewRegion);
++ tqrepaintWidgetRegion (m_bottomGrip, viewRegion);
++ tqrepaintWidgetRegion (m_rightGrip, viewRegion);
++ tqrepaintWidgetRegion (m_bottomRightGrip, viewRegion);
}
@@ -502,11 +502,11 @@ diff -u -p -r1.3 kpviewscrollablecontainer.h
QRect mapViewToGlobal (const QRect &viewRect);
+ QRegion mapViewToGlobal (const QRegion &viewRegion);
-- void repaintWidgetAtResizeLineViewRect (QWidget *widget,
+- void tqrepaintWidgetAtResizeLineViewRect (QWidget *widget,
- const QRect &resizeLineViewRect);
-- void repaintWidgetAtResizeLines (QWidget *widget);
+- void tqrepaintWidgetAtResizeLines (QWidget *widget);
- void eraseResizeLines ();
-+ void repaintWidgetRegion (QWidget *widget,
++ void tqrepaintWidgetRegion (QWidget *widget,
+ const QRegion &viewRegion);
+ void eraseResizeLines (const QRegion &viewRegion);
@@ -519,7 +519,7 @@ diff -u -p -r1.3 kpviewscrollablecontainer.h
virtual void viewportPaintEvent (QPaintEvent *e);
virtual void paintEvent (QPaintEvent *e);
-+protected slots:
++protected Q_SLOTS:
+ void windowActivationChanged ();
+protected:
+ virtual void windowActivationChange (bool wasActive);
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.
//
diff --git a/kolourpaint/tools/kptoolaction.cpp b/kolourpaint/tools/kptoolaction.cpp
index d45acb30..269fd0d0 100644
--- a/kolourpaint/tools/kptoolaction.cpp
+++ b/kolourpaint/tools/kptoolaction.cpp
@@ -34,11 +34,11 @@
kpToolAction::kpToolAction (const TQString &text,
const TQString &pic, const KShortcut &shortcut,
const TQObject *receiver, const char *slot,
- TQObject *parent, const char *name)
+ TQObject *tqparent, const char *name)
: KToggleAction (text,
pic, shortcut,
receiver, slot,
- parent, name)
+ tqparent, name)
{
updateToolTip ();
}
diff --git a/kolourpaint/tools/kptoolaction.h b/kolourpaint/tools/kptoolaction.h
index bf3257c2..c9af7d6d 100644
--- a/kolourpaint/tools/kptoolaction.h
+++ b/kolourpaint/tools/kptoolaction.h
@@ -38,12 +38,13 @@ class kpToolAction : public KToggleAction,
public kpSingleKeyTriggersActionInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolAction (const TQString &text,
const TQString &pic, const KShortcut &shortcut,
const TQObject *receiver, const char *slot,
- TQObject *parent, const char *name);
+ TQObject *tqparent, const char *name);
virtual ~kpToolAction ();
diff --git a/kolourpaint/tools/kptoolairspray.cpp b/kolourpaint/tools/kptoolairspray.cpp
index 7f9a2b04..022c534d 100644
--- a/kolourpaint/tools/kptoolairspray.cpp
+++ b/kolourpaint/tools/kptoolairspray.cpp
@@ -60,7 +60,7 @@
kpToolAirSpray::kpToolAirSpray (kpMainWindow *mainWindow)
: kpTool (i18n ("Spraycan"), i18n ("Sprays graffiti"),
- Qt::Key_Y,
+ TQt::Key_Y,
mainWindow, "tool_spraycan"),
m_currentCommand (0)
{
@@ -312,21 +312,21 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
#endif
TQPixmap pixmap = document ()->getPixmapAt (docRect);
- TQBitmap mask;
+ TQBitmap tqmask;
- TQPainter painter, maskPainter;
+ TQPainter painter, tqmaskPainter;
if (m_color.isOpaque ())
{
painter.begin (&pixmap);
- painter.setPen (m_color.toQColor ());
+ painter.setPen (m_color.toTQColor ());
}
- if (pixmap.mask () || m_color.isTransparent ())
+ if (pixmap.tqmask () || m_color.isTransparent ())
{
- mask = kpPixmapFX::getNonNullMask (pixmap);
- maskPainter.begin (&mask);
- maskPainter.setPen (m_color.maskColor ());
+ tqmask = kpPixmapFX::getNonNullMask (pixmap);
+ tqmaskPainter.begin (&tqmask);
+ tqmaskPainter.setPen (m_color.tqmaskColor ());
}
for (int i = 0; i < (int) points.count (); i++)
@@ -337,18 +337,18 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
if (painter.isActive ())
painter.drawPoint (pt);
- if (maskPainter.isActive ())
- maskPainter.drawPoint (pt);
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.drawPoint (pt);
}
- if (maskPainter.isActive ())
- maskPainter.end ();
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.end ();
if (painter.isActive ())
painter.end ();
- if (!mask.isNull ())
- pixmap.setMask (mask);
+ if (!tqmask.isNull ())
+ pixmap.setMask (tqmask);
viewManager ()->setFastUpdates ();
document ()->setPixmapAt (pixmap, docRect.topLeft ());
diff --git a/kolourpaint/tools/kptoolairspray.h b/kolourpaint/tools/kptoolairspray.h
index ed983980..f968bb97 100644
--- a/kolourpaint/tools/kptoolairspray.h
+++ b/kolourpaint/tools/kptoolairspray.h
@@ -47,6 +47,7 @@ class kpViewManager;
class kpToolAirSpray : public kpTool
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolAirSpray (kpMainWindow *);
diff --git a/kolourpaint/tools/kptoolautocrop.cpp b/kolourpaint/tools/kptoolautocrop.cpp
index f0284116..0d103af7 100644
--- a/kolourpaint/tools/kptoolautocrop.cpp
+++ b/kolourpaint/tools/kptoolautocrop.cpp
@@ -34,7 +34,7 @@
// at the other extreme would not be deemed similar enough. The
// key is to find the median color as the reference but how do
// you do this if you don't know which pixels to sample in the first
-// place (that's what you're trying to find)? Chicken and egg situation.
+// place (that's what you're trying to tqfind)? Chicken and egg situation.
//
// The other heuristic that is in doubt is the use of the average
// color in determining the similarity of sides (it is possible
@@ -70,7 +70,7 @@ kpToolAutoCropBorder::kpToolAutoCropBorder (const TQPixmap *pixmapPtr,
: m_pixmapPtr (pixmapPtr),
m_processedColorSimilarity (processedColorSimilarity)
{
- invalidate ();
+ tqinvalidate ();
}
@@ -280,7 +280,7 @@ bool kpToolAutoCropBorder::exists () const
}
// public
-void kpToolAutoCropBorder::invalidate ()
+void kpToolAutoCropBorder::tqinvalidate ()
{
m_rect = TQRect ();
m_referenceColor = kpColor::invalid;
@@ -306,7 +306,7 @@ public:
void showNothingToAutocropMessage (kpMainWindow *mainWindow, bool actOnSelection)
{
- kpSetOverrideCursorSaver cursorSaver (Qt::arrowCursor);
+ kpSetOverrideCursorSaver cursorSaver (TQt::arrowCursor);
if (actOnSelection)
{
@@ -367,14 +367,14 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow)
botBorder (&pixmap, processedColorSimilarity);
- kpSetOverrideCursorSaver cursorSaver (Qt::waitCursor);
+ kpSetOverrideCursorSaver cursorSaver (TQt::waitCursor);
// TODO: With Colour Similarity, a lot of weird (and wonderful) things can
// happen resulting in a huge number of code paths. Needs refactoring
// and regression testing.
//
// TODO: e.g. When the top fills entire rect but bot doesn't we could
- // invalidate top and continue autocrop.
+ // tqinvalidate top and continue autocrop.
int numRegions = 0;
if (!leftBorder.calculate (true/*x*/, +1/*going right*/) ||
leftBorder.fillsEntirePixmap () ||
@@ -403,20 +403,20 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow)
#if DEBUG_KP_TOOL_AUTO_CROP
kdDebug () << "\tnumRegions=" << numRegions << endl;
kdDebug () << "\t\tleft=" << leftBorder.rect ()
- << " refCol=" << (leftBorder.exists () ? (int *) leftBorder.referenceColor ().toQRgb () : 0)
- << " avgCol=" << (leftBorder.exists () ? (int *) leftBorder.averageColor ().toQRgb () : 0)
+ << " refCol=" << (leftBorder.exists () ? (int *) leftBorder.referenceColor ().toTQRgb () : 0)
+ << " avgCol=" << (leftBorder.exists () ? (int *) leftBorder.averageColor ().toTQRgb () : 0)
<< endl;
kdDebug () << "\t\tright=" << rightBorder.rect ()
- << " refCol=" << (rightBorder.exists () ? (int *) rightBorder.referenceColor ().toQRgb () : 0)
- << " avgCol=" << (rightBorder.exists () ? (int *) rightBorder.averageColor ().toQRgb () : 0)
+ << " refCol=" << (rightBorder.exists () ? (int *) rightBorder.referenceColor ().toTQRgb () : 0)
+ << " avgCol=" << (rightBorder.exists () ? (int *) rightBorder.averageColor ().toTQRgb () : 0)
<< endl;
kdDebug () << "\t\ttop=" << topBorder.rect ()
- << " refCol=" << (topBorder.exists () ? (int *) topBorder.referenceColor ().toQRgb () : 0)
- << " avgCol=" << (topBorder.exists () ? (int *) topBorder.averageColor ().toQRgb () : 0)
+ << " refCol=" << (topBorder.exists () ? (int *) topBorder.referenceColor ().toTQRgb () : 0)
+ << " avgCol=" << (topBorder.exists () ? (int *) topBorder.averageColor ().toTQRgb () : 0)
<< endl;
kdDebug () << "\t\tbot=" << botBorder.rect ()
- << " refCol=" << (botBorder.exists () ? (int *) botBorder.referenceColor ().toQRgb () : 0)
- << " avgCol=" << (botBorder.exists () ? (int *) botBorder.averageColor ().toQRgb () : 0)
+ << " refCol=" << (botBorder.exists () ? (int *) botBorder.referenceColor ().toTQRgb () : 0)
+ << " avgCol=" << (botBorder.exists () ? (int *) botBorder.averageColor ().toTQRgb () : 0)
<< endl;
#endif
@@ -439,7 +439,7 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow)
#if DEBUG_KP_TOOL_AUTO_CROP
kdDebug () << "\tignoring left border" << endl;
#endif
- leftBorder.invalidate ();
+ leftBorder.tqinvalidate ();
}
}
@@ -454,7 +454,7 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow)
#if DEBUG_KP_TOOL_AUTO_CROP
kdDebug () << "\tignoring top border" << endl;
#endif
- topBorder.invalidate ();
+ topBorder.tqinvalidate ();
}
}
@@ -654,7 +654,7 @@ void kpToolAutoCropCommand::unexecute ()
return;
TQPixmap pixmap (m_oldWidth, m_oldHeight);
- TQBitmap maskBitmap;
+ TQBitmap tqmaskBitmap;
// restore the position of the centre image
kpPixmapFX::setPixmapAt (&pixmap, m_contentsRect,
@@ -663,7 +663,7 @@ void kpToolAutoCropCommand::unexecute ()
// draw the borders
TQPainter painter (&pixmap);
- TQPainter maskPainter;
+ TQPainter tqmaskPainter;
const kpToolAutoCropBorder *borders [] =
{
@@ -690,23 +690,23 @@ void kpToolAutoCropCommand::unexecute ()
kpColor col = (*b)->referenceColor ();
#if DEBUG_KP_TOOL_AUTO_CROP && 1
kdDebug () << "\tdrawing border " << (*b)->rect ()
- << " rgb=" << (int *) col.toQRgb () /* %X hack */ << endl;
+ << " rgb=" << (int *) col.toTQRgb () /* %X hack */ << endl;
#endif
if (col.isOpaque ())
{
- painter.fillRect ((*b)->rect (), col.toQColor ());
+ painter.fillRect ((*b)->rect (), col.toTQColor ());
}
else
{
- if (maskBitmap.isNull ())
+ if (tqmaskBitmap.isNull ())
{
// TODO: dangerous when a painter is active on pixmap?
- maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
- maskPainter.begin (&maskBitmap);
+ tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
+ tqmaskPainter.begin (&tqmaskBitmap);
}
- maskPainter.fillRect ((*b)->rect (), Qt::color0/*transparent*/);
+ tqmaskPainter.fillRect ((*b)->rect (), TQt::color0/*transparent*/);
}
}
else
@@ -720,24 +720,24 @@ void kpToolAutoCropCommand::unexecute ()
// and the other branch would execute.
if (*p)
{
- // TODO: We should really edit the mask here. Due to good
- // luck (if "maskBitmap" is initialized above, this region
- // will be marked as opaque in the mask; if it's not
+ // TODO: We should really edit the tqmask here. Due to good
+ // luck (if "tqmaskBitmap" is initialized above, this region
+ // will be marked as opaque in the tqmask; if it's not
// initialized, we will be opaque by default), we
- // don't actually have to edit the mask but this is
+ // don't actually have to edit the tqmask but this is
// highly error-prone.
painter.drawPixmap ((*b)->rect (), **p);
}
}
}
- if (maskPainter.isActive ())
- maskPainter.end ();
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.end ();
painter.end ();
- if (!maskBitmap.isNull ())
- pixmap.setMask (maskBitmap);
+ if (!tqmaskBitmap.isNull ())
+ pixmap.setMask (tqmaskBitmap);
if (!m_actOnSelection)
diff --git a/kolourpaint/tools/kptoolautocrop.h b/kolourpaint/tools/kptoolautocrop.h
index bb1a5d4a..886b4223 100644
--- a/kolourpaint/tools/kptoolautocrop.h
+++ b/kolourpaint/tools/kptoolautocrop.h
@@ -69,7 +69,7 @@ public:
bool fillsEntirePixmap () const;
bool exists () const;
- void invalidate ();
+ void tqinvalidate ();
private:
const TQPixmap *m_pixmapPtr;
diff --git a/kolourpaint/tools/kptoolbrush.cpp b/kolourpaint/tools/kptoolbrush.cpp
index 6e684ed9..30c68aee 100644
--- a/kolourpaint/tools/kptoolbrush.cpp
+++ b/kolourpaint/tools/kptoolbrush.cpp
@@ -32,8 +32,8 @@
kpToolBrush::kpToolBrush (kpMainWindow *mainWindow)
: kpToolPen (kpToolPen::Brush,
i18n ("Brush"),
- i18n ("Draw using brushes of different shapes and sizes"),
- Qt::Key_B,
+ i18n ("Draw using brushes of different tqshapes and sizes"),
+ TQt::Key_B,
mainWindow, "tool_brush")
{
}
diff --git a/kolourpaint/tools/kptoolbrush.h b/kolourpaint/tools/kptoolbrush.h
index 69498495..4b86ab9f 100644
--- a/kolourpaint/tools/kptoolbrush.h
+++ b/kolourpaint/tools/kptoolbrush.h
@@ -34,6 +34,7 @@
class kpToolBrush : public kpToolPen
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolBrush (kpMainWindow *mainWindow);
diff --git a/kolourpaint/tools/kptoolclear.cpp b/kolourpaint/tools/kptoolclear.cpp
index 7b1a775b..b6fa2eab 100644
--- a/kolourpaint/tools/kptoolclear.cpp
+++ b/kolourpaint/tools/kptoolclear.cpp
@@ -108,7 +108,7 @@ void kpToolClearCommand::execute ()
kpPixmapFX::fill (&newPixmap, m_newColor);
// TODO: maybe disable Image/Clear if transparent colour
if (m_newColor.isOpaque ())
- newPixmap.setMask (sel->maskForOwnType ());
+ newPixmap.setMask (sel->tqmaskForOwnType ());
sel->setPixmap (newPixmap);
}
diff --git a/kolourpaint/tools/kptoolcolorpicker.cpp b/kolourpaint/tools/kptoolcolorpicker.cpp
index 615012cd..d02a9572 100644
--- a/kolourpaint/tools/kptoolcolorpicker.cpp
+++ b/kolourpaint/tools/kptoolcolorpicker.cpp
@@ -52,7 +52,7 @@
kpToolColorPicker::kpToolColorPicker (kpMainWindow *mainWindow)
: kpTool (i18n ("Color Picker"), i18n ("Lets you select a color from the image"),
- Qt::Key_C,
+ TQt::Key_C,
mainWindow, "tool_color_picker")
{
}
diff --git a/kolourpaint/tools/kptoolcolorpicker.h b/kolourpaint/tools/kptoolcolorpicker.h
index 6ebaa6d7..b8e79370 100644
--- a/kolourpaint/tools/kptoolcolorpicker.h
+++ b/kolourpaint/tools/kptoolcolorpicker.h
@@ -42,6 +42,7 @@ class kpColorToolBar;
class kpToolColorPicker : public kpTool
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolColorPicker (kpMainWindow *);
diff --git a/kolourpaint/tools/kptoolcolorwasher.cpp b/kolourpaint/tools/kptoolcolorwasher.cpp
index 6c2d091f..27679276 100644
--- a/kolourpaint/tools/kptoolcolorwasher.cpp
+++ b/kolourpaint/tools/kptoolcolorwasher.cpp
@@ -33,7 +33,7 @@ kpToolColorWasher::kpToolColorWasher (kpMainWindow *mainWindow)
: kpToolPen (kpToolPen::ColorWasher,
i18n ("Color Eraser"),
i18n ("Replaces pixels of the foreground color with the background color"),
- Qt::Key_O,
+ TQt::Key_O,
mainWindow, "tool_color_washer")
{
}
diff --git a/kolourpaint/tools/kptoolcolorwasher.h b/kolourpaint/tools/kptoolcolorwasher.h
index 1a707c3e..537e5723 100644
--- a/kolourpaint/tools/kptoolcolorwasher.h
+++ b/kolourpaint/tools/kptoolcolorwasher.h
@@ -34,6 +34,7 @@
class kpToolColorWasher : public kpToolPen
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolColorWasher (kpMainWindow *mainWindow);
diff --git a/kolourpaint/tools/kptoolconverttograyscale.cpp b/kolourpaint/tools/kptoolconverttograyscale.cpp
index 524e3e6d..7fe544f2 100644
--- a/kolourpaint/tools/kptoolconverttograyscale.cpp
+++ b/kolourpaint/tools/kptoolconverttograyscale.cpp
@@ -79,7 +79,7 @@ void kpToolConvertToGrayscaleCommand::execute ()
if (!doc)
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
m_oldPixmapPtr = new TQPixmap ();
*m_oldPixmapPtr = *doc->pixmap (m_actOnSelection);
diff --git a/kolourpaint/tools/kptoolcrop.cpp b/kolourpaint/tools/kptoolcrop.cpp
index f1e530ca..e5483a90 100644
--- a/kolourpaint/tools/kptoolcrop.cpp
+++ b/kolourpaint/tools/kptoolcrop.cpp
@@ -68,7 +68,7 @@ public:
virtual ~kpToolCropSetImageCommand ();
/* (uninteresting child of macro cmd) */
- virtual TQString name () const { return TQString::null; }
+ virtual TQString name () const { return TQString(); }
virtual int size () const
{
@@ -132,7 +132,7 @@ void kpToolCropSetImageCommand::execute ()
//
// The selection is deleted.
//
- // TODO: Do not introduce a mask if the result will not contain
+ // TODO: Do not introduce a tqmask if the result will not contain
// any transparent pixels.
//
@@ -167,7 +167,7 @@ void kpToolCropSetImageCommand::execute ()
kpPixmapFX::paintMaskTransparentWithBrush (&newDocPixmap,
TQPoint (0, 0),
- m_fromSelection.maskForOwnType ());
+ m_fromSelection.tqmaskForOwnType ());
kpPixmapFX::paintPixmapAt (&newDocPixmap,
TQPoint (0, 0),
@@ -274,7 +274,7 @@ kpToolCropCommand::kpToolCropCommand (kpMainWindow *mainWindow)
#endif
kpToolSelectionMoveCommand *moveCmd =
new kpToolSelectionMoveCommand (
- TQString::null/*uninteresting child of macro cmd*/,
+ TQString()/*uninteresting child of macro cmd*/,
mainWindow);
moveCmd->moveTo (TQPoint (0, 0), true/*move on exec, not now*/);
moveCmd->finalize ();
@@ -291,7 +291,7 @@ kpToolCropCommand::kpToolCropCommand (kpMainWindow *mainWindow)
#if 0
addCommand (
new kpToolSelectionCreateCommand (
- TQString::null/*uninteresting child of macro cmd*/,
+ TQString()/*uninteresting child of macro cmd*/,
selectionBorderAndMovedTo0_0 (*sel),
mainWindow));
#endif
diff --git a/kolourpaint/tools/kptoolcurve.cpp b/kolourpaint/tools/kptoolcurve.cpp
index f889c1ba..65424026 100644
--- a/kolourpaint/tools/kptoolcurve.cpp
+++ b/kolourpaint/tools/kptoolcurve.cpp
@@ -35,7 +35,7 @@ kpToolCurve::kpToolCurve (kpMainWindow *mainWindow)
: kpToolPolygon (Curve,
i18n ("Curve"),
i18n ("Draws curves"),
- Qt::Key_V,
+ TQt::Key_V,
mainWindow, "tool_curve")
{
}
diff --git a/kolourpaint/tools/kptoolcurve.h b/kolourpaint/tools/kptoolcurve.h
index 489ce1fb..29baaead 100644
--- a/kolourpaint/tools/kptoolcurve.h
+++ b/kolourpaint/tools/kptoolcurve.h
@@ -36,6 +36,7 @@ class kpMainWindow;
class kpToolCurve : public kpToolPolygon
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolCurve (kpMainWindow *mainWindow);
diff --git a/kolourpaint/tools/kptoolellipse.cpp b/kolourpaint/tools/kptoolellipse.cpp
index f3b31dbb..0f52a6ce 100644
--- a/kolourpaint/tools/kptoolellipse.cpp
+++ b/kolourpaint/tools/kptoolellipse.cpp
@@ -33,7 +33,7 @@ kpToolEllipse::kpToolEllipse (kpMainWindow *mainWindow)
: kpToolRectangle (Ellipse,
i18n ("Ellipse"),
i18n ("Draws ellipses and circles"),
- Qt::Key_E,
+ TQt::Key_E,
mainWindow, "tool_ellipse")
{
}
diff --git a/kolourpaint/tools/kptoolellipse.h b/kolourpaint/tools/kptoolellipse.h
index fc9bf798..fde8708d 100644
--- a/kolourpaint/tools/kptoolellipse.h
+++ b/kolourpaint/tools/kptoolellipse.h
@@ -36,6 +36,7 @@ class kpMainWindow;
class kpToolEllipse : public kpToolRectangle
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolEllipse (kpMainWindow *);
diff --git a/kolourpaint/tools/kptoolellipticalselection.cpp b/kolourpaint/tools/kptoolellipticalselection.cpp
index 13daf799..353fea9f 100644
--- a/kolourpaint/tools/kptoolellipticalselection.cpp
+++ b/kolourpaint/tools/kptoolellipticalselection.cpp
@@ -35,7 +35,7 @@ kpToolEllipticalSelection::kpToolEllipticalSelection (kpMainWindow *mainWindow)
: kpToolSelection (Ellipse,
i18n ("Selection (Elliptical)"),
i18n ("Makes an elliptical or circular selection"),
- Qt::Key_I,
+ TQt::Key_I,
mainWindow, "tool_elliptical_selection")
{
}
diff --git a/kolourpaint/tools/kptooleraser.cpp b/kolourpaint/tools/kptooleraser.cpp
index 1acbf66e..7349f01c 100644
--- a/kolourpaint/tools/kptooleraser.cpp
+++ b/kolourpaint/tools/kptooleraser.cpp
@@ -32,7 +32,7 @@
kpToolEraser::kpToolEraser (kpMainWindow *mainWindow)
: kpToolPen (kpToolPen::Eraser,
i18n ("Eraser"), i18n ("Lets you rub out mistakes"),
- Qt::Key_A,
+ TQt::Key_A,
mainWindow, "tool_eraser")
{
}
diff --git a/kolourpaint/tools/kptooleraser.h b/kolourpaint/tools/kptooleraser.h
index 4dd7704a..8626c67b 100644
--- a/kolourpaint/tools/kptooleraser.h
+++ b/kolourpaint/tools/kptooleraser.h
@@ -33,7 +33,8 @@
class kpToolEraser : public kpToolPen
{
-Q_OBJECT
+Q_OBJECT
+TQ_OBJECT
public:
kpToolEraser (kpMainWindow *mainWindow);
diff --git a/kolourpaint/tools/kptoolflip.cpp b/kolourpaint/tools/kptoolflip.cpp
index 146b639f..1d85dc46 100644
--- a/kolourpaint/tools/kptoolflip.cpp
+++ b/kolourpaint/tools/kptoolflip.cpp
@@ -80,7 +80,7 @@ TQString kpToolFlipCommand::name () const
else
{
kdError () << "kpToolFlipCommand::name() not asked to flip" << endl;
- return TQString::null;
+ return TQString();
}
#endif
@@ -120,7 +120,7 @@ void kpToolFlipCommand::flip ()
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (m_actOnSelection)
@@ -149,8 +149,8 @@ void kpToolFlipCommand::flip ()
bool kpToolFlipDialog::s_lastIsVerticalFlip = true;
-kpToolFlipDialog::kpToolFlipDialog (bool actOnSelection, TQWidget *parent)
- : KDialogBase (parent, 0/*name*/, true/*modal*/,
+kpToolFlipDialog::kpToolFlipDialog (bool actOnSelection, TQWidget *tqparent)
+ : KDialogBase (tqparent, 0/*name*/, true/*modal*/,
actOnSelection ? i18n ("Flip Selection") : i18n ("Flip Image"),
KDialogBase::Ok | KDialogBase::Cancel)
{
diff --git a/kolourpaint/tools/kptoolflip.h b/kolourpaint/tools/kptoolflip.h
index 8399cf40..279fcec7 100644
--- a/kolourpaint/tools/kptoolflip.h
+++ b/kolourpaint/tools/kptoolflip.h
@@ -65,9 +65,10 @@ private:
class kpToolFlipDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolFlipDialog (bool actOnSelection, TQWidget *parent);
+ kpToolFlipDialog (bool actOnSelection, TQWidget *tqparent);
~kpToolFlipDialog ();
private:
diff --git a/kolourpaint/tools/kptoolfloodfill.cpp b/kolourpaint/tools/kptoolfloodfill.cpp
index 518820ba..51e35707 100644
--- a/kolourpaint/tools/kptoolfloodfill.cpp
+++ b/kolourpaint/tools/kptoolfloodfill.cpp
@@ -53,7 +53,7 @@
kpToolFloodFill::kpToolFloodFill (kpMainWindow *mainWindow)
: kpTool (i18n ("Flood Fill"), i18n ("Fills regions in the image"),
- Qt::Key_F,
+ TQt::Key_F,
mainWindow, "tool_flood_fill"),
m_currentCommand (0)
{
@@ -80,7 +80,7 @@ void kpToolFloodFill::beginDraw ()
kdDebug () << "kpToolFloodFill::beginDraw()" << endl;
#endif
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
// Flood Fill is an expensive CPU operation so we only fill at a
// mouse click (beginDraw ()), not on mouse move (virtually draw())
diff --git a/kolourpaint/tools/kptoolfloodfill.h b/kolourpaint/tools/kptoolfloodfill.h
index 73f5aae2..f048f3f1 100644
--- a/kolourpaint/tools/kptoolfloodfill.h
+++ b/kolourpaint/tools/kptoolfloodfill.h
@@ -48,6 +48,7 @@ class kpToolFloodFillCommand;
class kpToolFloodFill : public kpTool
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolFloodFill (kpMainWindow *);
diff --git a/kolourpaint/tools/kptoolfreeformselection.cpp b/kolourpaint/tools/kptoolfreeformselection.cpp
index 7c736728..6beab422 100644
--- a/kolourpaint/tools/kptoolfreeformselection.cpp
+++ b/kolourpaint/tools/kptoolfreeformselection.cpp
@@ -35,7 +35,7 @@ kpToolFreeFormSelection::kpToolFreeFormSelection (kpMainWindow *mainWindow)
: kpToolSelection (kpToolSelection::FreeForm,
i18n ("Selection (Free-Form)"),
i18n ("Makes a free-form selection"),
- Qt::Key_M,
+ TQt::Key_M,
mainWindow, "tool_free_form_selection")
{
}
diff --git a/kolourpaint/tools/kptoolline.cpp b/kolourpaint/tools/kptoolline.cpp
index 809824d9..e9cf57dd 100644
--- a/kolourpaint/tools/kptoolline.cpp
+++ b/kolourpaint/tools/kptoolline.cpp
@@ -35,7 +35,7 @@ kpToolLine::kpToolLine (kpMainWindow *mainWindow)
: kpToolPolygon (Line,
i18n ("Line"),
i18n ("Draws lines"),
- Qt::Key_L,
+ TQt::Key_L,
mainWindow, "tool_line")
{
}
diff --git a/kolourpaint/tools/kptoolline.h b/kolourpaint/tools/kptoolline.h
index 7a956245..82d99510 100644
--- a/kolourpaint/tools/kptoolline.h
+++ b/kolourpaint/tools/kptoolline.h
@@ -36,6 +36,7 @@ class kpMainWindow;
class kpToolLine : public kpToolPolygon
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolLine (kpMainWindow *);
diff --git a/kolourpaint/tools/kptoolpen.cpp b/kolourpaint/tools/kptoolpen.cpp
index b738060c..5c7ff6ea 100644
--- a/kolourpaint/tools/kptoolpen.cpp
+++ b/kolourpaint/tools/kptoolpen.cpp
@@ -73,7 +73,7 @@ kpToolPen::kpToolPen (Mode mode,
kpToolPen::kpToolPen (kpMainWindow *mainWindow)
: kpTool (i18n ("Pen"), i18n ("Draws dots and freehand strokes"),
- Qt::Key_P,
+ TQt::Key_P,
mainWindow, "tool_pen"),
m_mode (Pen),
m_toolWidgetBrush (0),
@@ -116,7 +116,7 @@ TQString kpToolPen::haventBegunDrawUserMessage () const
case ColorWasher:
return i18n ("Click or drag to erase pixels of the foreground color.");
default:
- return TQString::null;
+ return TQString();
}
}
@@ -179,7 +179,7 @@ void kpToolPen::end ()
if (vm)
{
if (vm->tempPixmap () && vm->tempPixmap ()->isBrush ())
- vm->invalidateTempPixmap ();
+ vm->tqinvalidateTempPixmap ();
if (m_mode & (SquareBrushes | DiverseBrushes))
vm->unsetCursor ();
@@ -218,7 +218,7 @@ void kpToolPen::beginDraw ()
// user starts drawing in the background color, we don't want to leave
// the cursor in the foreground colour -- just hide it in all cases
// to avoid confusion
- viewManager ()->invalidateTempPixmap ();
+ viewManager ()->tqinvalidateTempPixmap ();
setUserMessage (cancelUserMessage ());
}
@@ -266,15 +266,15 @@ void kpToolPen::hover (const TQPoint &point)
}
#if DEBUG_KP_TOOL_PEN && 0
- if (document ()->rect ().contains (point))
+ if (document ()->rect ().tqcontains (point))
{
TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ());
- QRgb v = image.pixel (point.x (), point.y ());
- kdDebug () << "(" << point << "): r=" << qRed (v)
- << " g=" << qGreen (v)
- << " b=" << qBlue (v)
- << " a=" << qAlpha (v)
+ TQRgb v = image.pixel (point.x (), point.y ());
+ kdDebug () << "(" << point << "): r=" << tqRed (v)
+ << " g=" << tqGreen (v)
+ << " b=" << tqBlue (v)
+ << " a=" << tqAlpha (v)
<< endl;
}
#endif
@@ -282,15 +282,15 @@ void kpToolPen::hover (const TQPoint &point)
setUserShapePoints (point);
}
-bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
+bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, int plotx, int ploty)
{
- return wash (painter, maskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty));
+ return wash (painter, tqmaskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty));
}
-bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
+bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, const TQRect &drawRect)
@@ -308,8 +308,8 @@ bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
{ \
if (painter && painter->isActive ()) \
painter->drawLine (startDrawX, y, x - 1, y); \
- if (maskPainter && maskPainter->isActive ()) \
- maskPainter->drawLine (startDrawX, y, x - 1, y); \
+ if (tqmaskPainter && tqmaskPainter->isActive ()) \
+ tqmaskPainter->drawLine (startDrawX, y, x - 1, y); \
didSomething = true; \
startDrawX = -1; \
}
@@ -331,8 +331,8 @@ bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
#if DEBUG_KP_TOOL_PEN && 0
fprintf (stderr, "y=%i x=%i colorAtPixel=%08X colorToReplace=%08X ... ",
y, x,
- kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).toQRgb (),
- colorToReplace.toQRgb ());
+ kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).toTQRgb (),
+ colorToReplace.toTQRgb ());
#endif
if (kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).isSimilarTo (colorToReplace, processedColorSimilarity ()))
{
@@ -383,33 +383,33 @@ void kpToolPen::globalDraw ()
if (foregroundColor () == backgroundColor () && processedColorSimilarity () == 0)
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
kpToolPenCommand *cmd = new kpToolPenCommand (
i18n ("Color Eraser"), mainWindow ());
- TQPainter painter, maskPainter;
- TQBitmap maskBitmap;
+ TQPainter painter, tqmaskPainter;
+ TQBitmap tqmaskBitmap;
if (backgroundColor ().isOpaque ())
{
painter.begin (document ()->pixmap ());
- painter.setPen (backgroundColor ().toQColor ());
+ painter.setPen (backgroundColor ().toTQColor ());
}
if (backgroundColor ().isTransparent () ||
- document ()->pixmap ()->mask ())
+ document ()->pixmap ()->tqmask ())
{
- maskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ());
- maskPainter.begin (&maskBitmap);
+ tqmaskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ());
+ tqmaskPainter.begin (&tqmaskBitmap);
- maskPainter.setPen (backgroundColor ().maskColor ());
+ tqmaskPainter.setPen (backgroundColor ().tqmaskColor ());
}
const TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ());
TQRect rect = document ()->rect ();
- const bool didSomething = wash (&painter, &maskPainter, image,
+ const bool didSomething = wash (&painter, &tqmaskPainter, image,
foregroundColor ()/*replace foreground*/,
rect, rect);
@@ -417,13 +417,13 @@ void kpToolPen::globalDraw ()
if (painter.isActive ())
painter.end ();
- if (maskPainter.isActive ())
- maskPainter.end ();
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.end ();
if (didSomething)
{
- if (!maskBitmap.isNull ())
- document ()->pixmap ()->setMask (maskBitmap);
+ if (!tqmaskBitmap.isNull ())
+ document ()->pixmap ()->setMask (tqmaskBitmap);
document ()->slotContentsChanged (rect);
@@ -471,14 +471,14 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
// OPT: this seems hopelessly inefficient
if (c.isOpaque ())
{
- pixmap.fill (c.toQColor ());
+ pixmap.fill (c.toTQColor ());
}
else
{
- TQBitmap mask (1, 1);
- mask.fill (Qt::color0/*transparent*/);
+ TQBitmap tqmask (1, 1);
+ tqmask.fill (TQt::color0/*transparent*/);
- pixmap.setMask (mask);
+ pixmap.setMask (tqmask);
}
// draw onto doc
@@ -519,38 +519,38 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
#if DEBUG_KP_TOOL_PEN
kdDebug () << "\tconvert to image: " << timer.restart () << "ms" << endl;
#endif
- TQPainter painter, maskPainter;
- TQBitmap maskBitmap;
+ TQPainter painter, tqmaskPainter;
+ TQBitmap tqmaskBitmap;
if (color (m_mouseButton).isOpaque ())
{
painter.begin (&pixmap);
- painter.setPen (color (m_mouseButton).toQColor ());
+ painter.setPen (color (m_mouseButton).toTQColor ());
}
if (color (m_mouseButton).isTransparent () ||
- pixmap.mask ())
+ pixmap.tqmask ())
{
- maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
- maskPainter.begin (&maskBitmap);
- maskPainter.setPen (color (m_mouseButton).maskColor ());
+ tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
+ tqmaskPainter.begin (&tqmaskBitmap);
+ tqmaskPainter.setPen (color (m_mouseButton).tqmaskColor ());
}
- bool didSomething = wash (&painter, &maskPainter,
+ bool didSomething = wash (&painter, &tqmaskPainter,
image,
- color (1 - m_mouseButton)/*color to replace*/,
+ color (1 - m_mouseButton)/*color to tqreplace*/,
rect, rect);
if (painter.isActive ())
painter.end ();
- if (maskPainter.isActive ())
- maskPainter.end ();
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.end ();
if (didSomething)
{
- if (!maskBitmap.isNull ())
- pixmap.setMask (maskBitmap);
+ if (!tqmaskBitmap.isNull ())
+ pixmap.setMask (tqmaskBitmap);
#if DEBUG_KP_TOOL_PEN
kdDebug () << "\twashed: " << timer.restart () << "ms" << endl;
@@ -594,23 +594,23 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
bool transparent = c.isTransparent ();
TQPixmap pixmap = document ()->getPixmapAt (rect);
- TQBitmap maskBitmap;
+ TQBitmap tqmaskBitmap;
- TQPainter painter, maskPainter;
+ TQPainter painter, tqmaskPainter;
if (m_mode & (DrawsPixels | WashesPixmaps))
{
if (!transparent)
{
painter.begin (&pixmap);
- painter.setPen (c.toQColor ());
+ painter.setPen (c.toTQColor ());
}
- if (transparent || pixmap.mask ())
+ if (transparent || pixmap.tqmask ())
{
- maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
- maskPainter.begin (&maskBitmap);
- maskPainter.setPen (c.maskColor ());
+ tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
+ tqmaskPainter.begin (&tqmaskBitmap);
+ tqmaskPainter.setPen (c.tqmaskColor ());
}
}
@@ -635,8 +635,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (painter.isActive ())
painter.drawLine (sp, ep);
- if (maskPainter.isActive ())
- maskPainter.drawLine (sp, ep);
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.drawLine (sp, ep);
didSomething = true;
}
@@ -678,7 +678,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (m_mode & WashesPixmaps)
{
- if (wash (&painter, &maskPainter, image,
+ if (wash (&painter, &tqmaskPainter, image,
colorToReplace,
rect, plotx + rect.left (), ploty + rect.top ()))
{
@@ -746,7 +746,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (m_mode & WashesPixmaps)
{
- if (wash (&painter, &maskPainter, image,
+ if (wash (&painter, &tqmaskPainter, image,
colorToReplace,
rect, plotx + rect.left (), oldploty + rect.top ()))
{
@@ -774,7 +774,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (m_mode & WashesPixmaps)
{
- if (wash (&painter, &maskPainter, image,
+ if (wash (&painter, &tqmaskPainter, image,
colorToReplace,
rect, plotx + rect.left (), ploty + rect.top ()))
{
@@ -806,8 +806,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (painter.isActive ())
painter.end ();
- if (maskPainter.isActive ())
- maskPainter.end ();
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.end ();
#if DEBUG_KP_TOOL_PEN
if (m_mode & WashesPixmaps)
@@ -824,8 +824,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (didSomething)
{
- if (!maskBitmap.isNull ())
- pixmap.setMask (maskBitmap);
+ if (!tqmaskBitmap.isNull ())
+ pixmap.setMask (tqmaskBitmap);
// draw onto doc
document ()->setPixmapAt (pixmap, rect.topLeft ());
@@ -920,7 +920,7 @@ void kpToolPen::slotForegroundColorChanged (const kpColor &col)
kdDebug () << "kpToolPen::slotForegroundColorChanged()" << endl;
#endif
if (col.isOpaque ())
- m_brushPixmap [(m_mode & SwappedColors) ? 1 : 0].fill (col.toQColor ());
+ m_brushPixmap [(m_mode & SwappedColors) ? 1 : 0].fill (col.toTQColor ());
updateBrushCursor ();
}
@@ -933,7 +933,7 @@ void kpToolPen::slotBackgroundColorChanged (const kpColor &col)
#endif
if (col.isOpaque ())
- m_brushPixmap [(m_mode & SwappedColors) ? 0 : 1].fill (col.toQColor ());
+ m_brushPixmap [(m_mode & SwappedColors) ? 0 : 1].fill (col.toTQColor ());
updateBrushCursor ();
}
@@ -948,7 +948,7 @@ void kpToolPen::slotBrushChanged (const TQPixmap &pixmap, bool isDiagonalLine)
{
m_brushPixmap [i] = pixmap;
if (color (i).isOpaque ())
- m_brushPixmap [i].fill (color (i).toQColor ());
+ m_brushPixmap [i].fill (color (i).toTQColor ());
}
m_brushIsDiagonalLine = isDiagonalLine;
@@ -966,7 +966,7 @@ void kpToolPen::slotEraserSizeChanged (int size)
for (int i = 0; i < 2; i++)
{
// Note: No matter what, the eraser's brush pixmap is never given
- // a mask.
+ // a tqmask.
//
// With a transparent color, since we don't fill anything, the
// resize by itself will leave us with garbage pixels. This
@@ -978,7 +978,7 @@ void kpToolPen::slotEraserSizeChanged (int size)
// which only cares about the opaqueness.
m_brushPixmap [i].resize (size, size);
if (color (i).isOpaque ())
- m_brushPixmap [i].fill (color (i).toQColor ());
+ m_brushPixmap [i].fill (color (i).toTQColor ());
}
updateBrushCursor ();
diff --git a/kolourpaint/tools/kptoolpen.h b/kolourpaint/tools/kptoolpen.h
index 6bf8976a..77d7c33c 100644
--- a/kolourpaint/tools/kptoolpen.h
+++ b/kolourpaint/tools/kptoolpen.h
@@ -48,6 +48,7 @@ class kpViewManager;
class kpToolPen : public kpTool
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode
@@ -102,11 +103,11 @@ private slots:
void slotEraserSizeChanged (int size);
private:
- bool wash (TQPainter *painter, TQPainter *maskPainter,
+ bool wash (TQPainter *painter, TQPainter *tqmaskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, int plotx, int ploty);
- bool wash (TQPainter *painter, TQPainter *maskPainter,
+ bool wash (TQPainter *painter, TQPainter *tqmaskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, const TQRect &drawRect);
diff --git a/kolourpaint/tools/kptoolpolygon.cpp b/kolourpaint/tools/kptoolpolygon.cpp
index 56c7941d..0e298759 100644
--- a/kolourpaint/tools/kptoolpolygon.cpp
+++ b/kolourpaint/tools/kptoolpolygon.cpp
@@ -81,7 +81,7 @@ static const char *pointArrayToString (const TQPointArray &pointArray)
static TQPen makeMaskPen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyle)
{
- return TQPen (color.maskColor (),
+ return TQPen (color.tqmaskColor (),
lineWidth == 1 ? 0/*closer to looking width 1*/ : lineWidth, lineStyle,
Qt::RoundCap, Qt::RoundJoin);
}
@@ -90,7 +90,7 @@ static TQPen makePen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyl
{
if (color.isOpaque ())
{
- return TQPen (color.toQColor (),
+ return TQPen (color.toTQColor (),
lineWidth == 1 ? 0/*closer to looking width 1*/ : lineWidth, lineStyle,
Qt::RoundCap, Qt::RoundJoin);
}
@@ -103,7 +103,7 @@ static TQBrush makeMaskBrush (const kpColor &foregroundColor,
kpToolWidgetFillStyle *toolWidgetFillStyle)
{
if (toolWidgetFillStyle)
- return toolWidgetFillStyle->maskBrush (foregroundColor, backgroundColor);
+ return toolWidgetFillStyle->tqmaskBrush (foregroundColor, backgroundColor);
else
return Qt::NoBrush;
}
@@ -155,38 +155,38 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
// draw
TQPen pen = makePen (foregroundColor, lineWidth, lineStyle),
- maskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle);
+ tqmaskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle);
TQBrush brush = makeBrush (foregroundColor, backgroundColor, toolWidgetFillStyle),
- maskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle);
+ tqmaskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle);
TQPixmap pixmap = oldPixmap;
- TQBitmap maskBitmap;
+ TQBitmap tqmaskBitmap;
- TQPainter painter, maskPainter;
+ TQPainter painter, tqmaskPainter;
- if (pixmap.mask () ||
- (maskPen.style () != Qt::NoPen &&
- maskPen.color () == Qt::color0/*transparent*/) ||
- (maskBrush.style () != Qt::NoBrush &&
- maskBrush.color () == Qt::color0/*transparent*/))
+ if (pixmap.tqmask () ||
+ (tqmaskPen.style () != TQt::NoPen &&
+ tqmaskPen.color () == TQt::color0/*transparent*/) ||
+ (tqmaskBrush.style () != TQt::NoBrush &&
+ tqmaskBrush.color () == TQt::color0/*transparent*/))
{
- maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
- maskPainter.begin (&maskBitmap);
- maskPainter.setPen (maskPen);
- maskPainter.setBrush (maskBrush);
+ tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
+ tqmaskPainter.begin (&tqmaskBitmap);
+ tqmaskPainter.setPen (tqmaskPen);
+ tqmaskPainter.setBrush (tqmaskBrush);
#if DEBUG_KP_TOOL_POLYGON && 0
- kdDebug () << "\tmaskPainter begin because:" << endl
- << "\t\tpixmap.mask=" << pixmap.mask () << endl
- << "\t\t(maskPenStyle!=NoPen)=" << (maskPen.style () != Qt::NoPen) << endl
- << "\t\t(maskPenColor==trans)=" << (maskPen.color () == Qt::color0) << endl
- << "\t\t(maskBrushStyle!=NoBrush)=" << (maskBrush.style () != Qt::NoBrush) << endl
- << "\t\t(maskBrushColor==trans)=" << (maskBrush.color () == Qt::color0) << endl;
+ kdDebug () << "\ttqmaskPainter begin because:" << endl
+ << "\t\tpixmap.tqmask=" << pixmap.tqmask () << endl
+ << "\t\t(tqmaskPenStyle!=NoPen)=" << (tqmaskPen.style () != TQt::NoPen) << endl
+ << "\t\t(tqmaskPenColor==trans)=" << (tqmaskPen.color () == TQt::color0) << endl
+ << "\t\t(tqmaskBrushStyle!=NoBrush)=" << (tqmaskBrush.style () != TQt::NoBrush) << endl
+ << "\t\t(tqmaskBrushColor==trans)=" << (tqmaskBrush.color () == TQt::color0) << endl;
#endif
}
- if (pen.style () != Qt::NoPen ||
- brush.style () != Qt::NoBrush)
+ if (pen.style () != TQt::NoPen ||
+ brush.style () != TQt::NoBrush)
{
painter.begin (&pixmap);
painter.setPen (pen);
@@ -204,11 +204,11 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
if (painter.isActive ()) \
painter . cmd ; \
\
- if (maskPainter.isActive ()) \
- maskPainter . cmd ; \
+ if (tqmaskPainter.isActive ()) \
+ tqmaskPainter . cmd ; \
}
- // SYNC: Qt bug
+ // SYNC: TQt bug
if (only1PixelInPointArray (pointsInRect))
{
PAINTER_CALL (drawPoint (pointsInRect [0]));
@@ -234,25 +234,25 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
if (painter.isActive ())
{
TQPen XORpen = painter.pen ();
- XORpen.setColor (Qt::white);
+ XORpen.setColor (TQt::white);
painter.setPen (XORpen);
- painter.setRasterOp (Qt::XorROP);
+ painter.setRasterOp (TQt::XorROP);
}
- if (maskPainter.isActive ())
+ if (tqmaskPainter.isActive ())
{
- TQPen XORpen = maskPainter.pen ();
+ TQPen XORpen = tqmaskPainter.pen ();
// TODO???
#if 0
if (kpTool::isColorTransparent (foregroundColor))
- XORpen.setColor (Qt::color1/*opaque*/);
+ XORpen.setColor (TQt::color1/*opaque*/);
else
- XORpen.setColor (Qt::color0/*transparent*/);
+ XORpen.setColor (TQt::color0/*transparent*/);
#endif
- maskPainter.setPen (XORpen);
+ tqmaskPainter.setPen (XORpen);
}
PAINTER_CALL (drawLine (pointsInRect [0], pointsInRect [count - 1]));
@@ -288,11 +288,11 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
if (painter.isActive ())
painter.end ();
- if (maskPainter.isActive ())
- maskPainter.end ();
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.end ();
- if (!maskBitmap.isNull ())
- pixmap.setMask (maskBitmap);
+ if (!tqmaskBitmap.isNull ())
+ pixmap.setMask (tqmaskBitmap);
return pixmap;
}
@@ -315,7 +315,7 @@ kpToolPolygon::kpToolPolygon (Mode mode,
kpToolPolygon::kpToolPolygon (kpMainWindow *mainWindow)
: kpTool (i18n ("Polygon"), i18n ("Draws polygons"),
- Qt::Key_G,
+ TQt::Key_G,
mainWindow, "tool_polygon"),
m_mode (Polygon),
m_toolWidgetFillStyle (0),
@@ -346,7 +346,7 @@ TQString kpToolPolygon::haventBegunShapeUserMessage () const
case Curve:
return i18n ("Drag out the start and end points.");
default:
- return TQString::null;
+ return TQString();
}
}
@@ -479,7 +479,7 @@ void kpToolPolygon::beginDraw ()
break;
default:
- kdError () << "kpToolPolygon::beginDraw() shape" << endl;
+ kdError () << "kpToolPolygon::beginDraw() tqshape" << endl;
break;
}
}
@@ -565,8 +565,8 @@ void kpToolPolygon::applyModifiers ()
#define sgn(a) ((a)<0?-1:1)
// Round distances _before_ adding to any coordinate
// (ensures consistent rounding behaviour in x & y directions)
- const int newdx = qRound (dist * cos (angle) * sgn (diffx));
- const int newdy = qRound (dist * sin (angle) * sgn (diffy));
+ const int newdx = tqRound (dist * cos (angle) * sgn (diffx));
+ const int newdy = tqRound (dist * sin (angle) * sgn (diffy));
#undef sgn
m_toolLineEndPoint = TQPoint (m_toolLineStartPoint.x () + newdx,
@@ -671,7 +671,7 @@ void kpToolPolygon::cancelShape ()
endDraw (TQPoint (), TQRect ());
commandHistory ()->undo ();
#else
- viewManager ()->invalidateTempPixmap ();
+ viewManager ()->tqinvalidateTempPixmap ();
#endif
m_points.resize (0);
@@ -781,7 +781,7 @@ void kpToolPolygon::endShape (const TQPoint &, const TQRect &)
if (!hasBegunShape ())
return;
- viewManager ()->invalidateTempPixmap ();
+ viewManager ()->tqinvalidateTempPixmap ();
TQRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth);
diff --git a/kolourpaint/tools/kptoolpolygon.h b/kolourpaint/tools/kptoolpolygon.h
index 289fb9ab..50129be3 100644
--- a/kolourpaint/tools/kptoolpolygon.h
+++ b/kolourpaint/tools/kptoolpolygon.h
@@ -60,6 +60,7 @@ class kpViewManager;
class kpToolPolygon : public kpTool
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode
diff --git a/kolourpaint/tools/kptoolpolyline.cpp b/kolourpaint/tools/kptoolpolyline.cpp
index 6299b5b7..aa388ef4 100644
--- a/kolourpaint/tools/kptoolpolyline.cpp
+++ b/kolourpaint/tools/kptoolpolyline.cpp
@@ -35,7 +35,7 @@ kpToolPolyline::kpToolPolyline (kpMainWindow *mainWindow)
: kpToolPolygon (Polyline,
i18n ("Connected Lines"),
i18n ("Draws connected lines"),
- Qt::Key_N,
+ TQt::Key_N,
mainWindow, "tool_polyline")
{
}
diff --git a/kolourpaint/tools/kptoolpolyline.h b/kolourpaint/tools/kptoolpolyline.h
index f76a3959..96cfcac5 100644
--- a/kolourpaint/tools/kptoolpolyline.h
+++ b/kolourpaint/tools/kptoolpolyline.h
@@ -36,6 +36,7 @@ class kpMainWindow;
class kpToolPolyline : public kpToolPolygon
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolPolyline (kpMainWindow *);
diff --git a/kolourpaint/tools/kptoolpreviewdialog.cpp b/kolourpaint/tools/kptoolpreviewdialog.cpp
index 5149664b..a9542989 100644
--- a/kolourpaint/tools/kptoolpreviewdialog.cpp
+++ b/kolourpaint/tools/kptoolpreviewdialog.cpp
@@ -51,14 +51,14 @@ kpToolPreviewDialog::kpToolPreviewDialog (Features features,
const TQString &caption,
const TQString &afterActionText,
bool actOnSelection,
- kpMainWindow *parent,
+ kpMainWindow *tqparent,
const char *name)
- : KDialogBase (parent, name, true/*modal*/,
+ : KDialogBase (tqparent, name, true/*modal*/,
caption,
KDialogBase::Ok | KDialogBase::Cancel),
m_afterActionText (afterActionText),
m_actOnSelection (actOnSelection),
- m_mainWindow (parent),
+ m_mainWindow (tqparent),
m_dimensionsGroupBox (0),
m_afterTransformDimensionsLabel (0),
m_previewGroupBox (0),
@@ -149,10 +149,10 @@ void kpToolPreviewDialog::createDimensionsGroupBox ()
2, 2,
marginHint () * 2, spacingHint ());
- dimensionsLayout->addWidget (originalLabel, 0, 0, Qt::AlignBottom);
- dimensionsLayout->addWidget (originalDimensionsLabel, 0, 1, Qt::AlignBottom);
- dimensionsLayout->addWidget (afterTransformLabel, 1, 0, Qt::AlignTop);
- dimensionsLayout->addWidget (m_afterTransformDimensionsLabel, 1, 1, Qt::AlignTop);
+ dimensionsLayout->addWidget (originalLabel, 0, 0, TQt::AlignBottom);
+ dimensionsLayout->addWidget (originalDimensionsLabel, 0, 1, TQt::AlignBottom);
+ dimensionsLayout->addWidget (afterTransformLabel, 1, 0, TQt::AlignTop);
+ dimensionsLayout->addWidget (m_afterTransformDimensionsLabel, 1, 1, TQt::AlignTop);
}
// private
@@ -173,10 +173,10 @@ void kpToolPreviewDialog::createPreviewGroupBox ()
TQVBoxLayout *previewLayout = new TQVBoxLayout (m_previewGroupBox,
marginHint () * 2,
- QMAX (1, spacingHint () / 2));
+ TQMAX (1, spacingHint () / 2));
previewLayout->addWidget (m_previewPixmapLabel, 1/*stretch*/);
- previewLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter);
+ previewLayout->addWidget (updatePushButton, 0/*stretch*/, TQt::AlignHCenter);
}
@@ -231,15 +231,15 @@ double kpToolPreviewDialog::aspectScale (int newWidth, int newHeight,
double heightScale = double (newHeight) / double (oldHeight);
// Keeps aspect ratio
- return QMIN (widthScale, heightScale);
+ return TQMIN (widthScale, heightScale);
}
// public static
int kpToolPreviewDialog::scaleDimension (int dimension, double scale, int min, int max)
{
- return QMAX (min,
- QMIN (max,
- qRound (dimension * scale)));
+ return TQMAX (min,
+ TQMIN (max,
+ tqRound (dimension * scale)));
}
@@ -389,7 +389,7 @@ void kpToolPreviewDialog::updatePreview ()
m_previewPixmapLabel->setPixmap (previewPixmap);
// immediate update esp. for expensive previews
- m_previewPixmapLabel->repaint (false/*no erase*/);
+ m_previewPixmapLabel->tqrepaint (false/*no erase*/);
#if DEBUG_KP_TOOL_PREVIEW_DIALOG
kdDebug () << "\tafter TQLabel::setPixmap() previewPixmapLabel: w="
@@ -420,7 +420,7 @@ void kpToolPreviewDialog::slotUpdateWithWaitCursor ()
<< endl;
#endif
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
slotUpdate ();
diff --git a/kolourpaint/tools/kptoolpreviewdialog.h b/kolourpaint/tools/kptoolpreviewdialog.h
index 074a03ec..98cf28dc 100644
--- a/kolourpaint/tools/kptoolpreviewdialog.h
+++ b/kolourpaint/tools/kptoolpreviewdialog.h
@@ -46,6 +46,7 @@ class kpResizeSignallingLabel;
class kpToolPreviewDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Features
@@ -62,7 +63,7 @@ public:
// (in the Dimensions Group Box) e.g. "After Skew:"
const TQString &afterActionText,
bool actOnSelection,
- kpMainWindow *parent,
+ kpMainWindow *tqparent,
const char *name = 0);
virtual ~kpToolPreviewDialog ();
@@ -76,7 +77,7 @@ public:
protected:
kpDocument *document () const;
- // All widgets must have mainWidget() as their parent
+ // All widgets must have mainWidget() as their tqparent
void addCustomWidgetToFront (TQWidget *w); // see <reserveTopRow> in ctor
void addCustomWidget (TQWidget *w);
void addCustomWidgetToBack (TQWidget *w)
diff --git a/kolourpaint/tools/kptoolrectangle.cpp b/kolourpaint/tools/kptoolrectangle.cpp
index 2c717fee..ea749da6 100644
--- a/kolourpaint/tools/kptoolrectangle.cpp
+++ b/kolourpaint/tools/kptoolrectangle.cpp
@@ -53,43 +53,43 @@
static TQPixmap pixmap (const kpToolRectangle::Mode mode,
kpDocument *document, const TQRect &rect,
const TQPoint &startPoint, const TQPoint &endPoint,
- const TQPen &pen, const TQPen &maskPen,
- const TQBrush &brush, const TQBrush &maskBrush)
+ const TQPen &pen, const TQPen &tqmaskPen,
+ const TQBrush &brush, const TQBrush &tqmaskBrush)
{
TQPixmap pixmap = document->getPixmapAt (rect);
- TQBitmap maskBitmap;
+ TQBitmap tqmaskBitmap;
- TQPainter painter, maskPainter;
+ TQPainter painter, tqmaskPainter;
#if DEBUG_KP_TOOL_RECTANGLE && 1
kdDebug () << "pixmap: rect=" << rect
<< " startPoint=" << startPoint
<< " endPoint=" << endPoint
<< endl;
- kdDebug () << "\tm: p=" << (maskPen.style () != Qt::NoPen)
- << " b=" << (maskBrush.style () != Qt::NoBrush)
- << " o: p=" << (pen.style () != Qt::NoPen)
- << " b=" << (brush.style () != Qt::NoBrush)
+ kdDebug () << "\tm: p=" << (tqmaskPen.style () != TQt::NoPen)
+ << " b=" << (tqmaskBrush.style () != TQt::NoBrush)
+ << " o: p=" << (pen.style () != TQt::NoPen)
+ << " b=" << (brush.style () != TQt::NoBrush)
<< endl;
- kdDebug () << "\tmaskPen.color()=" << (int *) maskPen.color ().rgb ()
- << " transparent=" << (int *) Qt::color0.rgb ()/*transparent*/
+ kdDebug () << "\ttqmaskPen.color()=" << (int *) tqmaskPen.color ().rgb ()
+ << " transparent=" << (int *) TQt::color0.rgb ()/*transparent*/
<< endl;
#endif
- if (pixmap.mask () ||
- (maskPen.style () != Qt::NoPen &&
- maskPen.color () == Qt::color0/*transparent*/) ||
- (maskBrush.style () != Qt::NoBrush &&
- maskBrush.color () == Qt::color0/*transparent*/))
+ if (pixmap.tqmask () ||
+ (tqmaskPen.style () != TQt::NoPen &&
+ tqmaskPen.color () == TQt::color0/*transparent*/) ||
+ (tqmaskBrush.style () != TQt::NoBrush &&
+ tqmaskBrush.color () == TQt::color0/*transparent*/))
{
- maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
- maskPainter.begin (&maskBitmap);
- maskPainter.setPen (maskPen);
- maskPainter.setBrush (maskBrush);
+ tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
+ tqmaskPainter.begin (&tqmaskBitmap);
+ tqmaskPainter.setPen (tqmaskPen);
+ tqmaskPainter.setBrush (tqmaskBrush);
}
- if (pen.style () != Qt::NoPen ||
- brush.style () != Qt::NoBrush)
+ if (pen.style () != TQt::NoPen ||
+ brush.style () != TQt::NoBrush)
{
painter.begin (&pixmap);
painter.setPen (pen);
@@ -101,14 +101,14 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode,
if (painter.isActive ()) \
painter . cmd ; \
\
- if (maskPainter.isActive ()) \
- maskPainter . cmd ; \
+ if (tqmaskPainter.isActive ()) \
+ tqmaskPainter . cmd ; \
}
if (startPoint != endPoint)
{
#if DEBUG_KP_TOOL_RECTANGLE && 1
- kdDebug () << "\tdraw shape" << endl;
+ kdDebug () << "\tdraw tqshape" << endl;
#endif
// TODO: Rectangle of pen width 1, height 1 and width X is rendered
@@ -134,7 +134,7 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode,
#if DEBUG_KP_TOOL_RECTANGLE && 1
kdDebug () << "\tstartPoint == endPoint" << endl;
#endif
- // SYNC: Work around Qt bug: can't draw 1x1 rectangle
+ // SYNC: Work around TQt bug: can't draw 1x1 rectangle
// Not strictly correct for border width > 1
// but better than not drawing at all
PAINTER_CALL (drawPoint (startPoint - rect.topLeft ()));
@@ -144,11 +144,11 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode,
if (painter.isActive ())
painter.end ();
- if (maskPainter.isActive ())
- maskPainter.end ();
+ if (tqmaskPainter.isActive ())
+ tqmaskPainter.end ();
- if (!maskBitmap.isNull ())
- pixmap.setMask (maskBitmap);
+ if (!tqmaskBitmap.isNull ())
+ pixmap.setMask (tqmaskBitmap);
return pixmap;
}
@@ -173,7 +173,7 @@ kpToolRectangle::kpToolRectangle (Mode mode,
kpToolRectangle::kpToolRectangle (kpMainWindow *mainWindow)
: kpTool (i18n ("Rectangle"), i18n ("Draws rectangles and squares"),
- Qt::Key_R,
+ TQt::Key_R,
mainWindow, "tool_rectangle"),
m_mode (Rectangle),
m_toolWidgetLineWidth (0),
@@ -231,29 +231,29 @@ void kpToolRectangle::slotBackgroundColorChanged (const kpColor &)
// private
void kpToolRectangle::updatePen (int mouseButton)
{
- TQColor maskPenColor = color (mouseButton).maskColor ();
+ TQColor tqmaskPenColor = color (mouseButton).tqmaskColor ();
if (!m_toolWidgetLineWidth)
{
if (color (mouseButton).isOpaque ())
- m_pen [mouseButton] = TQPen (color (mouseButton).toQColor ());
+ m_pen [mouseButton] = TQPen (color (mouseButton).toTQColor ());
else
- m_pen [mouseButton] = Qt::NoPen;
- m_maskPen [mouseButton] = TQPen (maskPenColor);
+ m_pen [mouseButton] = TQPen(Qt::NoPen);
+ m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor);
}
else
{
if (color (mouseButton).isOpaque ())
{
- m_pen [mouseButton] = TQPen (color (mouseButton).toQColor (),
+ m_pen [mouseButton] = TQPen (color (mouseButton).toTQColor (),
m_toolWidgetLineWidth->lineWidth (),
- Qt::SolidLine);
+ TQt::SolidLine);
}
else
- m_pen [mouseButton] = Qt::NoPen;
- m_maskPen [mouseButton] = TQPen (maskPenColor,
+ m_pen [mouseButton] = TQPen(Qt::NoPen);
+ m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor,
m_toolWidgetLineWidth->lineWidth (),
- Qt::SolidLine);
+ TQt::SolidLine);
}
}
@@ -270,14 +270,14 @@ void kpToolRectangle::updateBrush (int mouseButton)
color (mouseButton)/*foreground colour*/,
color (1 - mouseButton)/*background colour*/);
- m_maskBrush [mouseButton] = m_toolWidgetFillStyle->maskBrush (
+ m_tqmaskBrush [mouseButton] = m_toolWidgetFillStyle->tqmaskBrush (
color (mouseButton)/*foreground colour*/,
color (1 - mouseButton)/*background colour*/);
}
else
{
- m_brush [mouseButton] = Qt::NoBrush;
- m_maskBrush [mouseButton] = Qt::NoBrush;
+ m_brush [mouseButton] = TQBrush(Qt::NoBrush);
+ m_tqmaskBrush [mouseButton] = TQBrush(Qt::NoBrush);
}
}
@@ -436,8 +436,8 @@ void kpToolRectangle::applyModifiers ()
m_toolRectangleEndPoint = rect.bottomRight ();
m_toolRectangleRectWithoutLineWidth = rect;
- m_toolRectangleRect = kpTool::neededRect (rect, QMAX (m_pen [m_mouseButton].width (),
- m_maskPen [m_mouseButton].width ()));
+ m_toolRectangleRect = kpTool::neededRect (rect, TQMAX (m_pen [m_mouseButton].width (),
+ m_tqmaskPen [m_mouseButton].width ()));
}
void kpToolRectangle::beginDraw ()
@@ -451,8 +451,8 @@ void kpToolRectangle::updateShape ()
TQPixmap newPixmap = pixmap (m_mode, document (), m_toolRectangleRect,
m_toolRectangleStartPoint, m_toolRectangleEndPoint,
- m_pen [m_mouseButton], m_maskPen [m_mouseButton],
- m_brush [m_mouseButton], m_maskBrush [m_mouseButton]);
+ m_pen [m_mouseButton], m_tqmaskPen [m_mouseButton],
+ m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton]);
kpTempPixmap newTempPixmap (false/*always display*/,
kpTempPixmap::SetPixmap/*render mode*/,
m_toolRectangleRect.topLeft (),
@@ -511,7 +511,7 @@ void kpToolRectangle::cancelShape ()
endDraw (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
mainWindow ()->commandHistory ()->undo ();
#else
- viewManager ()->invalidateTempPixmap ();
+ viewManager ()->tqinvalidateTempPixmap ();
#endif
setUserMessage (i18n ("Let go of all the mouse buttons."));
@@ -527,13 +527,13 @@ void kpToolRectangle::endDraw (const TQPoint &, const TQRect &)
applyModifiers ();
// TODO: flicker
- viewManager ()->invalidateTempPixmap ();
+ viewManager ()->tqinvalidateTempPixmap ();
mainWindow ()->commandHistory ()->addCommand (
new kpToolRectangleCommand
(m_mode,
- m_pen [m_mouseButton], m_maskPen [m_mouseButton],
- m_brush [m_mouseButton], m_maskBrush [m_mouseButton],
+ m_pen [m_mouseButton], m_tqmaskPen [m_mouseButton],
+ m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton],
m_toolRectangleRect, m_toolRectangleStartPoint, m_toolRectangleEndPoint,
mainWindow ()));
@@ -546,15 +546,15 @@ void kpToolRectangle::endDraw (const TQPoint &, const TQRect &)
*/
kpToolRectangleCommand::kpToolRectangleCommand (kpToolRectangle::Mode mode,
- const TQPen &pen, const TQPen &maskPen,
- const TQBrush &brush, const TQBrush &maskBrush,
+ const TQPen &pen, const TQPen &tqmaskPen,
+ const TQBrush &brush, const TQBrush &tqmaskBrush,
const TQRect &rect,
const TQPoint &startPoint, const TQPoint &endPoint,
kpMainWindow *mainWindow)
: kpCommand (mainWindow),
m_mode (mode),
- m_pen (pen), m_maskPen (maskPen),
- m_brush (brush), m_maskBrush (maskBrush),
+ m_pen (pen), m_tqmaskPen (tqmaskPen),
+ m_brush (brush), m_tqmaskBrush (tqmaskBrush),
m_rect (rect),
m_startPoint (startPoint),
m_endPoint (endPoint),
@@ -581,7 +581,7 @@ TQString kpToolRectangleCommand::name () const
return i18n ("Ellipse");
default:
kdError () << "kpToolRectangleCommand::name() passed unknown mode: " << int (m_mode) << endl;
- return TQString::null;
+ return TQString();
}
}
@@ -612,8 +612,8 @@ void kpToolRectangleCommand::execute ()
doc->setPixmapAt (pixmap (m_mode, doc,
m_rect, m_startPoint, m_endPoint,
- m_pen, m_maskPen,
- m_brush, m_maskBrush),
+ m_pen, m_tqmaskPen,
+ m_brush, m_tqmaskBrush),
m_rect.topLeft ());
}
diff --git a/kolourpaint/tools/kptoolrectangle.h b/kolourpaint/tools/kptoolrectangle.h
index a412a475..03ade5a7 100644
--- a/kolourpaint/tools/kptoolrectangle.h
+++ b/kolourpaint/tools/kptoolrectangle.h
@@ -50,9 +50,10 @@ class kpViewManager;
class kpToolRectangle : public kpTool
{
Q_OBJECT
+ TQ_OBJECT
public:
- // it turns out that these shapes are all really the same thing
+ // it turns out that these tqshapes are all really the same thing
// (same options, same feel) - the only real difference is the
// drawing functions (a one line change)
enum Mode {Rectangle, RoundedRectangle, Ellipse};
@@ -102,10 +103,10 @@ private:
kpToolWidgetFillStyle *m_toolWidgetFillStyle;
void updatePen (int mouseButton);
- TQPen m_pen [2], m_maskPen [2];
+ TQPen m_pen [2], m_tqmaskPen [2];
void updateBrush (int mouseButton);
- TQBrush m_brush [2], m_maskBrush [2];
+ TQBrush m_brush [2], m_tqmaskBrush [2];
void applyModifiers ();
TQPoint m_toolRectangleStartPoint, m_toolRectangleEndPoint;
@@ -116,8 +117,8 @@ class kpToolRectangleCommand : public kpCommand
{
public:
kpToolRectangleCommand (kpToolRectangle::Mode mode,
- const TQPen &pen, const TQPen &maskPen,
- const TQBrush &brush, const TQBrush &maskBrush,
+ const TQPen &pen, const TQPen &tqmaskPen,
+ const TQBrush &brush, const TQBrush &tqmaskBrush,
const TQRect &rect,
const TQPoint &startPoint, const TQPoint &endPoint,
kpMainWindow *mainWindow);
@@ -132,8 +133,8 @@ public:
private:
kpToolRectangle::Mode m_mode;
- TQPen m_pen, m_maskPen;
- TQBrush m_brush, m_maskBrush;
+ TQPen m_pen, m_tqmaskPen;
+ TQBrush m_brush, m_tqmaskBrush;
TQRect m_rect;
TQPoint m_startPoint, m_endPoint;
TQPixmap *m_oldPixmapPtr;
diff --git a/kolourpaint/tools/kptoolrectselection.cpp b/kolourpaint/tools/kptoolrectselection.cpp
index 3726cbfe..4c5b2b78 100644
--- a/kolourpaint/tools/kptoolrectselection.cpp
+++ b/kolourpaint/tools/kptoolrectselection.cpp
@@ -35,7 +35,7 @@ kpToolRectSelection::kpToolRectSelection (kpMainWindow *mainWindow)
: kpToolSelection (Rectangle,
i18n ("Selection (Rectangular)"),
i18n ("Makes a rectangular selection"),
- Qt::Key_S,
+ TQt::Key_S,
mainWindow, "tool_rect_selection")
{
}
diff --git a/kolourpaint/tools/kptoolresizescale.cpp b/kolourpaint/tools/kptoolresizescale.cpp
index e7f14c5d..40270e1f 100644
--- a/kolourpaint/tools/kptoolresizescale.cpp
+++ b/kolourpaint/tools/kptoolresizescale.cpp
@@ -138,7 +138,7 @@ TQString kpToolResizeScaleCommand::name () const
}
}
- return TQString::null;
+ return TQString();
}
// public virtual [base kpCommand]
@@ -283,7 +283,7 @@ void kpToolResizeScaleCommand::execute ()
}
else
{
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
document ()->selection ()->textResize (m_newWidth, m_newHeight);
if (m_mainWindow->tool ())
@@ -294,7 +294,7 @@ void kpToolResizeScaleCommand::execute ()
}
else
{
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (m_newWidth < m_oldWidth)
@@ -321,7 +321,7 @@ void kpToolResizeScaleCommand::execute ()
}
else
{
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
TQPixmap oldPixmap = *document ()->pixmap (m_actOnSelection);
@@ -395,7 +395,7 @@ void kpToolResizeScaleCommand::unexecute ()
}
else
{
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
document ()->selection ()->textResize (m_oldWidth, m_oldHeight);
if (m_mainWindow->tool ())
@@ -406,7 +406,7 @@ void kpToolResizeScaleCommand::unexecute ()
}
else
{
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
TQPixmap newPixmap (m_oldWidth, m_oldHeight);
@@ -436,7 +436,7 @@ void kpToolResizeScaleCommand::unexecute ()
}
else
{
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
TQPixmap oldPixmap;
@@ -634,7 +634,7 @@ static void toolButtonSetLook (TQToolButton *button,
button->setUsesTextLabel (true);
button->setTextLabel (name, false/*no tooltip*/);
button->setAccel (TQAccel::shortcutKey (name));
- button->setFocusPolicy (TQWidget::StrongFocus);
+ button->setFocusPolicy (TQ_StrongFocus);
button->setToggleButton (true);
}
@@ -665,17 +665,17 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget)
// TODO: ALT+R doesn't select the button.
m_resizeButton = new TQToolButton (m_operationGroupBox);
toolButtonSetLook (m_resizeButton,
- TQString::fromLatin1 ("resize"),
+ TQString::tqfromLatin1 ("resize"),
i18n ("&Resize"));
m_scaleButton = new TQToolButton (m_operationGroupBox);
toolButtonSetLook (m_scaleButton,
- TQString::fromLatin1 ("scale"),
+ TQString::tqfromLatin1 ("scale"),
i18n ("&Scale"));
m_smoothScaleButton = new TQToolButton (m_operationGroupBox);
toolButtonSetLook (m_smoothScaleButton,
- TQString::fromLatin1 ("smooth_scale"),
+ TQString::tqfromLatin1 ("smooth_scale"),
i18n ("S&mooth Scale"));
@@ -684,9 +684,9 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget)
//m_smoothScaleLabel = new TQLabel (i18n ("S&mooth scale"), m_operationGroupBox);
- //m_resizeLabel->setAlignment (m_resizeLabel->alignment () | Qt::ShowPrefix);
- //m_scaleLabel->setAlignment (m_scaleLabel->alignment () | Qt::ShowPrefix);
- //m_smoothScaleLabel->setAlignment (m_smoothScaleLabel->alignment () | Qt::ShowPrefix);
+ //m_resizeLabel->tqsetAlignment (m_resizeLabel->tqalignment () | TQt::ShowPrefix);
+ //m_scaleLabel->tqsetAlignment (m_scaleLabel->tqalignment () | TQt::ShowPrefix);
+ //m_smoothScaleLabel->tqsetAlignment (m_smoothScaleLabel->tqalignment () | TQt::ShowPrefix);
TQButtonGroup *resizeScaleButtonGroup = new TQButtonGroup (baseWidget);
@@ -703,14 +703,14 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget)
marginHint () * 2/*don't overlap groupbox title*/,
spacingHint ());
- operationLayout->addWidget (m_resizeButton, 0, 0, Qt::AlignCenter);
- //operationLayout->addWidget (m_resizeLabel, 1, 0, Qt::AlignCenter);
+ operationLayout->addWidget (m_resizeButton, 0, 0, TQt::AlignCenter);
+ //operationLayout->addWidget (m_resizeLabel, 1, 0, TQt::AlignCenter);
- operationLayout->addWidget (m_scaleButton, 0, 1, Qt::AlignCenter);
- //operationLayout->addWidget (m_scaleLabel, 1, 1, Qt::AlignCenter);
+ operationLayout->addWidget (m_scaleButton, 0, 1, TQt::AlignCenter);
+ //operationLayout->addWidget (m_scaleLabel, 1, 1, TQt::AlignCenter);
- operationLayout->addWidget (m_smoothScaleButton, 0, 2, Qt::AlignCenter);
- //operationLayout->addWidget (m_smoothScaleLabel, 1, 2, Qt::AlignCenter);
+ operationLayout->addWidget (m_smoothScaleButton, 0, 2, TQt::AlignCenter);
+ //operationLayout->addWidget (m_smoothScaleLabel, 1, 2, TQt::AlignCenter);
connect (m_resizeButton, TQT_SIGNAL (toggled (bool)),
@@ -727,9 +727,9 @@ void kpToolResizeScaleDialog::createDimensionsGroupBox (TQWidget *baseWidget)
m_dimensionsGroupBox = new TQGroupBox (i18n ("Dimensions"), baseWidget);
TQLabel *widthLabel = new TQLabel (i18n ("Width:"), m_dimensionsGroupBox);
- widthLabel->setAlignment (widthLabel->alignment () | Qt::AlignHCenter);
+ widthLabel->tqsetAlignment (widthLabel->tqalignment () | TQt::AlignHCenter);
TQLabel *heightLabel = new TQLabel (i18n ("Height:"), m_dimensionsGroupBox);
- heightLabel->setAlignment (heightLabel->alignment () | Qt::AlignHCenter);
+ heightLabel->tqsetAlignment (heightLabel->tqalignment () | TQt::AlignHCenter);
TQLabel *originalLabel = new TQLabel (i18n ("Original:"), m_dimensionsGroupBox);
m_originalWidthInput = new KIntNumInput (
@@ -822,7 +822,7 @@ void kpToolResizeScaleDialog::widthFitHeightToAspectRatio ()
{
// width / height = oldWidth / oldHeight
// height = width * oldHeight / oldWidth
- const int newHeight = qRound (double (imageWidth ()) * double (originalHeight ())
+ const int newHeight = tqRound (double (imageWidth ()) * double (originalHeight ())
/ double (originalWidth ()));
IGNORE_KEEP_ASPECT_RATIO (m_newHeightInput->setValue (newHeight));
}
@@ -835,7 +835,7 @@ void kpToolResizeScaleDialog::heightFitWidthToAspectRatio ()
{
// width / height = oldWidth / oldHeight
// width = height * oldWidth / oldHeight
- const int newWidth = qRound (double (imageHeight ()) * double (originalWidth ())
+ const int newWidth = tqRound (double (imageHeight ()) * double (originalWidth ())
/ double (originalHeight ()));
IGNORE_KEEP_ASPECT_RATIO (m_newWidthInput->setValue (newWidth));
}
@@ -979,7 +979,7 @@ void kpToolResizeScaleDialog::slotPercentWidthChanged (double percentWidth)
#endif
SET_VALUE_WITHOUT_SIGNAL_EMISSION (m_newWidthInput,
- qRound (percentWidth * originalWidth () / 100.0));
+ tqRound (percentWidth * originalWidth () / 100.0));
widthFitHeightToAspectRatio ();
@@ -996,7 +996,7 @@ void kpToolResizeScaleDialog::slotPercentHeightChanged (double percentHeight)
#endif
SET_VALUE_WITHOUT_SIGNAL_EMISSION (m_newHeightInput,
- qRound (percentHeight * originalHeight () / 100.0));
+ tqRound (percentHeight * originalHeight () / 100.0));
heightFitWidthToAspectRatio ();
diff --git a/kolourpaint/tools/kptoolresizescale.h b/kolourpaint/tools/kptoolresizescale.h
index 1dd95aa0..f0fa2150 100644
--- a/kolourpaint/tools/kptoolresizescale.h
+++ b/kolourpaint/tools/kptoolresizescale.h
@@ -107,6 +107,7 @@ protected:
class kpToolResizeScaleDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolResizeScaleDialog (kpMainWindow *mainWindow);
diff --git a/kolourpaint/tools/kptoolrotate.cpp b/kolourpaint/tools/kptoolrotate.cpp
index fe3a4cbe..5def33ca 100644
--- a/kolourpaint/tools/kptoolrotate.cpp
+++ b/kolourpaint/tools/kptoolrotate.cpp
@@ -97,7 +97,7 @@ void kpToolRotateCommand::execute ()
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (!m_losslessRotation)
@@ -181,7 +181,7 @@ void kpToolRotateCommand::unexecute ()
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
TQPixmap oldPixmap;
@@ -294,10 +294,10 @@ void kpToolRotateDialog::createDirectionGroupBox ()
TQGridLayout *directionLayout = new TQGridLayout (directionGroupBox,
2, 2, marginHint () * 2, spacingHint ());
- directionLayout->addWidget (antiClockwisePixmapLabel, 0, 0, Qt::AlignCenter);
- directionLayout->addWidget (clockwisePixmapLabel, 0, 1, Qt::AlignCenter);
- directionLayout->addWidget (m_antiClockwiseRadioButton, 1, 0, Qt::AlignCenter);
- directionLayout->addWidget (m_clockwiseRadioButton, 1, 1, Qt::AlignCenter);
+ directionLayout->addWidget (antiClockwisePixmapLabel, 0, 0, TQt::AlignCenter);
+ directionLayout->addWidget (clockwisePixmapLabel, 0, 1, TQt::AlignCenter);
+ directionLayout->addWidget (m_antiClockwiseRadioButton, 1, 0, TQt::AlignCenter);
+ directionLayout->addWidget (m_clockwiseRadioButton, 1, 1, TQt::AlignCenter);
connect (m_antiClockwiseRadioButton, TQT_SIGNAL (toggled (bool)),
diff --git a/kolourpaint/tools/kptoolrotate.h b/kolourpaint/tools/kptoolrotate.h
index 1cff0884..618b29c0 100644
--- a/kolourpaint/tools/kptoolrotate.h
+++ b/kolourpaint/tools/kptoolrotate.h
@@ -81,10 +81,11 @@ private:
class kpToolRotateDialog : public kpToolPreviewDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolRotateDialog (bool actOnSelection,
- kpMainWindow *parent,
+ kpMainWindow *tqparent,
const char *name = 0);
virtual ~kpToolRotateDialog ();
diff --git a/kolourpaint/tools/kptoolroundedrectangle.cpp b/kolourpaint/tools/kptoolroundedrectangle.cpp
index b0f4ba05..0c4c6b6d 100644
--- a/kolourpaint/tools/kptoolroundedrectangle.cpp
+++ b/kolourpaint/tools/kptoolroundedrectangle.cpp
@@ -33,7 +33,7 @@ kpToolRoundedRectangle::kpToolRoundedRectangle (kpMainWindow *mainWindow)
: kpToolRectangle (RoundedRectangle,
i18n ("Rounded Rectangle"),
i18n ("Draws rectangles and squares with rounded corners"),
- Qt::Key_U,
+ TQt::Key_U,
mainWindow, "tool_rounded_rectangle")
{
}
diff --git a/kolourpaint/tools/kptoolroundedrectangle.h b/kolourpaint/tools/kptoolroundedrectangle.h
index 924c1b34..cedd3e7f 100644
--- a/kolourpaint/tools/kptoolroundedrectangle.h
+++ b/kolourpaint/tools/kptoolroundedrectangle.h
@@ -36,6 +36,7 @@ class kpMainWindow;
class kpToolRoundedRectangle : public kpToolRectangle
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolRoundedRectangle (kpMainWindow *);
diff --git a/kolourpaint/tools/kptoolselection.cpp b/kolourpaint/tools/kptoolselection.cpp
index 7812c4f9..dc689c4b 100644
--- a/kolourpaint/tools/kptoolselection.cpp
+++ b/kolourpaint/tools/kptoolselection.cpp
@@ -141,7 +141,7 @@ TQString kpToolSelection::haventBegunDrawUserMessage () const
else
return i18n ("Left drag to scale selection.");
}
- else if (sel && sel->contains (m_currentPoint))
+ else if (sel && sel->tqcontains (m_currentPoint))
{
if (m_mode == Text)
{
@@ -300,7 +300,7 @@ void kpToolSelection::beginDraw ()
}
viewManager ()->restoreQueueUpdates ();
}
- else if (sel->contains (m_currentPoint))
+ else if (sel->tqcontains (m_currentPoint))
{
if (m_mode == Text && onSelectionToSelectText () && !controlOrShiftPressed ())
{
@@ -391,24 +391,24 @@ const TQCursor &kpToolSelection::cursor () const
{
case (kpView::Top | kpView::Left):
case (kpView::Bottom | kpView::Right):
- return Qt::sizeFDiagCursor;
+ return TQt::sizeFDiagCursor;
case (kpView::Bottom | kpView::Left):
case (kpView::Top | kpView::Right):
- return Qt::sizeBDiagCursor;
+ return TQt::sizeBDiagCursor;
case kpView::Top:
case kpView::Bottom:
- return Qt::sizeVerCursor;
+ return TQt::sizeVerCursor;
case kpView::Left:
case kpView::Right:
- return Qt::sizeHorCursor;
+ return TQt::sizeHorCursor;
}
- return Qt::arrowCursor;
+ return TQt::arrowCursor;
}
- else if (sel && sel->contains (m_currentPoint))
+ else if (sel && sel->tqcontains (m_currentPoint))
{
#if DEBUG_KP_TOOL_SELECTION && 1
kdDebug () << "\tsel contains currentPoint; selecting text? "
@@ -416,16 +416,16 @@ const TQCursor &kpToolSelection::cursor () const
#endif
if (m_mode == Text && onSelectionToSelectText () && !controlOrShiftPressed ())
- return Qt::ibeamCursor;
+ return TQt::ibeamCursor;
else
- return Qt::sizeAllCursor;
+ return TQt::sizeAllCursor;
}
else
{
#if DEBUG_KP_TOOL_SELECTION && 1
kdDebug () << "\tnot on sel" << endl;
#endif
- return Qt::crossCursor;
+ return TQt::crossCursor;
}
}
@@ -617,8 +617,8 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
mainWindow ()->selectionTransparency ()));
setUserShapePoints (m_startPoint,
- TQPoint (QMAX (0, QMIN (m_currentPoint.x (), document ()->width () - 1)),
- QMAX (0, QMIN (m_currentPoint.y (), document ()->height () - 1))));
+ TQPoint (TQMAX (0, TQMIN (m_currentPoint.x (), document ()->width () - 1)),
+ TQMAX (0, TQMIN (m_currentPoint.y (), document ()->height () - 1))));
break;
}
case kpToolSelection::Text:
@@ -646,7 +646,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
{
if (m_startPoint.x () + minimumWidth - 1 >= document ()->width ())
{
- minimumWidth = QMAX (kpSelection::minimumWidthForTextStyle (textStyle),
+ minimumWidth = TQMAX (kpSelection::minimumWidthForTextStyle (textStyle),
document ()->width () - m_startPoint.x ());
}
}
@@ -654,7 +654,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
{
if (m_startPoint.x () - minimumWidth + 1 < 0)
{
- minimumWidth = QMAX (kpSelection::minimumWidthForTextStyle (textStyle),
+ minimumWidth = TQMAX (kpSelection::minimumWidthForTextStyle (textStyle),
m_startPoint.x () + 1);
}
}
@@ -664,7 +664,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
{
if (m_startPoint.y () + minimumHeight - 1 >= document ()->height ())
{
- minimumHeight = QMAX (kpSelection::minimumHeightForTextStyle (textStyle),
+ minimumHeight = TQMAX (kpSelection::minimumHeightForTextStyle (textStyle),
document ()->height () - m_startPoint.y ());
}
}
@@ -672,7 +672,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
{
if (m_startPoint.y () - minimumHeight + 1 < 0)
{
- minimumHeight = QMAX (kpSelection::minimumHeightForTextStyle (textStyle),
+ minimumHeight = TQMAX (kpSelection::minimumHeightForTextStyle (textStyle),
m_startPoint.y () + 1);
}
}
@@ -845,7 +845,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
if (!sel->pixmap () && !m_currentPullFromDocumentCommand)
{
m_currentPullFromDocumentCommand = new kpToolSelectionPullFromDocumentCommand (
- TQString::null/*uninteresting child of macro cmd*/,
+ TQString()/*uninteresting child of macro cmd*/,
mainWindow ());
m_currentPullFromDocumentCommand->execute ();
}
@@ -853,7 +853,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
if (!m_currentMoveCommand)
{
m_currentMoveCommand = new kpToolSelectionMoveCommand (
- TQString::null/*uninteresting child of macro cmd*/,
+ TQString()/*uninteresting child of macro cmd*/,
mainWindow ());
m_currentMoveCommandIsSmear = false;
}
@@ -903,7 +903,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
if (!sel->pixmap () && !m_currentPullFromDocumentCommand)
{
m_currentPullFromDocumentCommand = new kpToolSelectionPullFromDocumentCommand (
- TQString::null/*uninteresting child of macro cmd*/,
+ TQString()/*uninteresting child of macro cmd*/,
mainWindow ());
m_currentPullFromDocumentCommand->execute ();
}
@@ -929,7 +929,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
int newWidth = oldWidth + userXSign * (thisPoint.x () - m_startPoint.x ());
- newWidth = QMAX (originalSelection.minimumWidth (), newWidth);
+ newWidth = TQMAX (originalSelection.minimumWidth (), newWidth);
// Determine new height.
@@ -942,7 +942,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
int newHeight = oldHeight + userYSign * (thisPoint.y () - m_startPoint.y ());
- newHeight = QMAX (originalSelection.minimumHeight (), newHeight);
+ newHeight = TQMAX (originalSelection.minimumHeight (), newHeight);
// Keep aspect ratio?
@@ -954,7 +954,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
(userYSign ? double (newHeight) / oldHeight : 0))
{
newHeight = newWidth * oldHeight / oldWidth;
- newHeight = QMAX (originalSelection.minimumHeight (),
+ newHeight = TQMAX (originalSelection.minimumHeight (),
newHeight);
}
// Height changed more than width?
@@ -962,7 +962,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo
else
{
newWidth = newHeight * oldWidth / oldHeight;
- newWidth = QMAX (originalSelection.minimumWidth (), newWidth);
+ newWidth = TQMAX (originalSelection.minimumWidth (), newWidth);
}
}
@@ -1243,7 +1243,7 @@ void kpToolSelection::keyPressEvent (TQKeyEvent *e)
if (document ()->selection () &&
!hasBegunDraw () &&
- e->key () == Qt::Key_Escape)
+ e->key () == TQt::Key_Escape)
{
#if DEBUG_KP_TOOL_SELECTION && 0
kdDebug () << "\tescape pressed with sel when not begun draw - deselecting" << endl;
@@ -1307,7 +1307,7 @@ void kpToolSelection::selectionTransparencyChanged (const TQString & /*name*/)
// Undo.
// The rectangle is no longer invisible.
//
- //if (document ()->selection ()->setTransparency (st, true/*check harder for no change in mask*/))
+ //if (document ()->selection ()->setTransparency (st, true/*check harder for no change in tqmask*/))
document ()->selection ()->setTransparency (st);
if (true)
@@ -1356,7 +1356,7 @@ void kpToolSelection::slotIsOpaqueChanged ()
kdDebug () << "\thave sel - set transparency" << endl;
#endif
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
if (hasBegunShape ())
endShapeInternal ();
@@ -1400,7 +1400,7 @@ void kpToolSelection::slotBackgroundColorChanged (const kpColor &)
kdDebug () << "\thave sel - set transparency" << endl;
#endif
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
kpSelectionTransparency st = mainWindow ()->selectionTransparency ();
kpSelectionTransparency oldST = st;
@@ -1439,7 +1439,7 @@ void kpToolSelection::slotColorSimilarityChanged (double, int)
kdDebug () << "\thave sel - set transparency" << endl;
#endif
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
kpSelectionTransparency st = mainWindow ()->selectionTransparency ();
kpSelectionTransparency oldST = st;
@@ -1747,7 +1747,7 @@ void kpToolSelectionTransparencyCommand::execute ()
if (!doc)
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
m_mainWindow->setSelectionTransparency (m_st, true/*force colour change*/);
@@ -1768,7 +1768,7 @@ void kpToolSelectionTransparencyCommand::unexecute ()
if (!doc)
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
m_mainWindow->setSelectionTransparency (m_oldST, true/*force colour change*/);
@@ -2203,7 +2203,7 @@ void kpToolSelectionResizeScaleCommand::finalize ()
// public virtual [base kpToolResizeScaleCommand]
void kpToolSelectionResizeScaleCommand::execute ()
{
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
killSmoothScaleTimer ();
@@ -2218,7 +2218,7 @@ void kpToolSelectionResizeScaleCommand::execute ()
// public virtual [base kpToolResizeScaleCommand]
void kpToolSelectionResizeScaleCommand::unexecute ()
{
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
killSmoothScaleTimer ();
diff --git a/kolourpaint/tools/kptoolselection.h b/kolourpaint/tools/kptoolselection.h
index 1f209d86..531f1b78 100644
--- a/kolourpaint/tools/kptoolselection.h
+++ b/kolourpaint/tools/kptoolselection.h
@@ -59,6 +59,7 @@ class kpToolWidgetOpaqueOrTransparent;
class kpToolSelection : public kpTool
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode {Rectangle, Ellipse, FreeForm, Text};
@@ -242,6 +243,7 @@ class kpToolSelectionResizeScaleCommand : public TQObject,
public kpNamedCommand
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolSelectionResizeScaleCommand (kpMainWindow *mainWindow);
diff --git a/kolourpaint/tools/kptoolskew.cpp b/kolourpaint/tools/kptoolskew.cpp
index dff1d19b..7cc4aa7b 100644
--- a/kolourpaint/tools/kptoolskew.cpp
+++ b/kolourpaint/tools/kptoolskew.cpp
@@ -100,7 +100,7 @@ void kpToolSkewCommand::execute ()
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
m_oldPixmapPtr = new TQPixmap ();
@@ -181,7 +181,7 @@ void kpToolSkewCommand::unexecute ()
return;
- TQApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (TQt::waitCursor);
TQPixmap oldPixmap = *m_oldPixmapPtr;
@@ -218,13 +218,13 @@ int kpToolSkewDialog::s_lastHorizontalAngle = 0,
kpToolSkewDialog::s_lastVerticalAngle = 0;
-kpToolSkewDialog::kpToolSkewDialog (bool actOnSelection, kpMainWindow *parent,
+kpToolSkewDialog::kpToolSkewDialog (bool actOnSelection, kpMainWindow *tqparent,
const char *name)
: kpToolPreviewDialog (kpToolPreviewDialog::AllFeatures,
false/*don't reserve top row*/,
actOnSelection ? i18n ("Skew Selection") : i18n ("Skew Image"),
i18n ("After Skew:"),
- actOnSelection, parent, name)
+ actOnSelection, tqparent, name)
{
// Too confusing - disable for now
s_lastHorizontalAngle = s_lastVerticalAngle = 0;
diff --git a/kolourpaint/tools/kptoolskew.h b/kolourpaint/tools/kptoolskew.h
index ae368020..63703c9b 100644
--- a/kolourpaint/tools/kptoolskew.h
+++ b/kolourpaint/tools/kptoolskew.h
@@ -76,9 +76,10 @@ private:
class kpToolSkewDialog : public kpToolPreviewDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolSkewDialog (bool actOnSelection, kpMainWindow *parent,
+ kpToolSkewDialog (bool actOnSelection, kpMainWindow *tqparent,
const char *name = 0);
virtual ~kpToolSkewDialog ();
diff --git a/kolourpaint/tools/kptooltext.cpp b/kolourpaint/tools/kptooltext.cpp
index e2261278..352715ed 100644
--- a/kolourpaint/tools/kptooltext.cpp
+++ b/kolourpaint/tools/kptooltext.cpp
@@ -46,7 +46,7 @@
kpToolText::kpToolText (kpMainWindow *mainWindow)
: kpToolSelection (Text,
i18n ("Text"), i18n ("Writes text"),
- Qt::Key_T,
+ TQt::Key_T,
mainWindow, "tool_text"),
m_isIMStarted (false),
m_IMStartCursorRow (0),
@@ -193,7 +193,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
#define IS_SPACE(c) ((c).isSpace () || (c).isNull ())
- if (e->key () == Qt::Key_Enter || e->key () == Qt::Key_Return)
+ if (e->key () == TQt::Key_Enter || e->key () == TQt::Key_Return)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\tenter pressed" << endl;
@@ -214,7 +214,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
e->accept ();
}
- else if (e->key () == Qt::Key_Backspace)
+ else if (e->key () == TQt::Key_Backspace)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\tbackspace pressed" << endl;
@@ -235,7 +235,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
e->accept ();
}
- else if (e->key () == Qt::Key_Delete)
+ else if (e->key () == TQt::Key_Delete)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\tdelete pressed" << endl;
@@ -256,7 +256,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
e->accept ();
}
- else if (e->key () == Qt::Key_Up)
+ else if (e->key () == TQt::Key_Up)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\tup pressed" << endl;
@@ -268,13 +268,13 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
if (cursorRow > 0)
{
cursorRow--;
- cursorCol = QMIN (cursorCol, (int) textLines [cursorRow].length ());
+ cursorCol = TQMIN (cursorCol, (int) textLines [cursorRow].length ());
viewManager ()->setTextCursorPosition (cursorRow, cursorCol);
}
e->accept ();
}
- else if (e->key () == Qt::Key_Down)
+ else if (e->key () == TQt::Key_Down)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\tdown pressed" << endl;
@@ -286,13 +286,13 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
if (cursorRow < (int) textLines.size () - 1)
{
cursorRow++;
- cursorCol = QMIN (cursorCol, (int) textLines [cursorRow].length ());
+ cursorCol = TQMIN (cursorCol, (int) textLines [cursorRow].length ());
viewManager ()->setTextCursorPosition (cursorRow, cursorCol);
}
e->accept ();
}
- else if (e->key () == Qt::Key_Left)
+ else if (e->key () == TQt::Key_Left)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\tleft pressed" << endl;
@@ -318,7 +318,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
if (hasBegunShape ())
endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
- if ((e->state () & Qt::ControlButton) == 0)
+ if ((e->state () & TQt::ControlButton) == 0)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\tmove single char" << endl;
@@ -367,7 +367,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
e->accept ();
}
- else if (e->key () == Qt::Key_Right)
+ else if (e->key () == TQt::Key_Right)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\tright pressed" << endl;
@@ -393,7 +393,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
if (hasBegunShape ())
endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
- if ((e->state () & Qt::ControlButton) == 0)
+ if ((e->state () & TQt::ControlButton) == 0)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\tmove single char" << endl;
@@ -438,7 +438,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
e->accept ();
}
- else if (e->key () == Qt::Key_Home)
+ else if (e->key () == TQt::Key_Home)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\thome pressed" << endl;
@@ -447,7 +447,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
if (hasBegunShape ())
endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
- if (e->state () & Qt::ControlButton)
+ if (e->state () & TQt::ControlButton)
cursorRow = 0;
cursorCol = 0;
@@ -456,7 +456,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
e->accept ();
}
- else if (e->key () == Qt::Key_End)
+ else if (e->key () == TQt::Key_End)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\tend pressed" << endl;
@@ -465,7 +465,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e)
if (hasBegunShape ())
endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
- if (e->state () & Qt::ControlButton)
+ if (e->state () & TQt::ControlButton)
cursorRow = textLines.size () - 1;
cursorCol = textLines [cursorRow].length ();
@@ -545,7 +545,7 @@ void kpToolText::imStartEvent (TQIMEvent *e)
m_IMStartCursorRow = viewManager ()->textCursorRow ();
m_IMStartCursorCol = viewManager ()->textCursorCol ();
- m_IMPreeditStr = TQString::null;
+ m_IMPreeditStr = TQString();
}
void kpToolText::imComposeEvent (TQIMEvent *e)
@@ -651,7 +651,7 @@ void kpToolText::imEndEvent (TQIMEvent *e)
m_deleteCommand->addDelete ();
}
}
- m_IMPreeditStr = TQString::null;
+ m_IMPreeditStr = TQString();
// commit string
TQString inputStr = e->text();
@@ -1056,7 +1056,7 @@ void kpToolTextInsertCommand::execute ()
viewManager ()->setTextCursorPosition (m_row, m_col);
TQString text = m_newText;
- m_newText = TQString::null;
+ m_newText = TQString();
addText (text);
}
@@ -1242,7 +1242,7 @@ void kpToolTextBackspaceCommand::execute ()
{
viewManager ()->setTextCursorPosition (m_row, m_col);
- m_deletedText = TQString::null;
+ m_deletedText = TQString();
int oldNumBackspaces = m_numBackspaces;
m_numBackspaces = 0;
@@ -1279,7 +1279,7 @@ void kpToolTextBackspaceCommand::unexecute ()
}
}
- m_deletedText = TQString::null;
+ m_deletedText = TQString();
selection ()->setTextLines (textLines);
@@ -1350,7 +1350,7 @@ void kpToolTextDeleteCommand::execute ()
{
viewManager ()->setTextCursorPosition (m_row, m_col);
- m_deletedText = TQString::null;
+ m_deletedText = TQString();
int oldNumDeletes = m_numDeletes;
m_numDeletes = 0;
@@ -1383,7 +1383,7 @@ void kpToolTextDeleteCommand::unexecute ()
}
}
- m_deletedText = TQString::null;
+ m_deletedText = TQString();
selection ()->setTextLines (textLines);
diff --git a/kolourpaint/tools/kptooltext.h b/kolourpaint/tools/kptooltext.h
index 15cda865..44edc0f9 100644
--- a/kolourpaint/tools/kptooltext.h
+++ b/kolourpaint/tools/kptooltext.h
@@ -44,6 +44,7 @@ class kpViewManager;
class kpToolText : public kpToolSelection
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolText (kpMainWindow *mainWindow);
diff --git a/kolourpaint/views/kpthumbnailview.cpp b/kolourpaint/views/kpthumbnailview.cpp
index 179f7c92..7332433a 100644
--- a/kolourpaint/views/kpthumbnailview.cpp
+++ b/kolourpaint/views/kpthumbnailview.cpp
@@ -39,12 +39,12 @@ kpThumbnailView::kpThumbnailView (kpDocument *document,
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- TQWidget *parent, const char *name)
+ TQWidget *tqparent, const char *name)
: kpView (document, toolToolBar, viewManager,
buddyView,
scrollableContainer,
- parent, name)
+ tqparent, name)
{
}
@@ -77,7 +77,7 @@ void kpThumbnailView::resizeEvent (TQResizeEvent *e)
<< endl;
#endif
- // For QResizeEvent's, Qt already throws an entire widget repaint into
+ // For TQResizeEvent's, TQt already throws an entire widget tqrepaint into
// the event loop. So eat useless update() calls that can only slow
// things down.
// TODO: this doesn't seem to work.
diff --git a/kolourpaint/views/kpthumbnailview.h b/kolourpaint/views/kpthumbnailview.h
index 9bc4dad8..5f2e1664 100644
--- a/kolourpaint/views/kpthumbnailview.h
+++ b/kolourpaint/views/kpthumbnailview.h
@@ -41,6 +41,7 @@
class kpThumbnailView : public kpView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -53,7 +54,7 @@ public:
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- TQWidget *parent, const char *name);
+ TQWidget *tqparent, const char *name);
/**
* Destructs this thumbnail view.
@@ -69,7 +70,7 @@ public:
protected:
/**
- * Sets the mask to cover the rectangle with top-left, origin() and
+ * Sets the tqmask to cover the rectangle with top-left, origin() and
* dimensions equal to or slightly less than (in case of rounding
* error) the size of the document in view coordinates. This ensures
* that all pixels are initialised with either document pixels or the
diff --git a/kolourpaint/views/kpunzoomedthumbnailview.cpp b/kolourpaint/views/kpunzoomedthumbnailview.cpp
index 4f019905..dea4e089 100644
--- a/kolourpaint/views/kpunzoomedthumbnailview.cpp
+++ b/kolourpaint/views/kpunzoomedthumbnailview.cpp
@@ -50,12 +50,12 @@ kpUnzoomedThumbnailView::kpUnzoomedThumbnailView (
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- TQWidget *parent, const char *name)
+ TQWidget *tqparent, const char *name)
: kpThumbnailView (document, toolToolBar, viewManager,
buddyView,
scrollableContainer,
- parent, name),
+ tqparent, name),
d (new kpUnzoomedThumbnailViewPrivate ())
{
if (buddyViewScrollableContainer ())
@@ -112,7 +112,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
if (document ()->width () > width ())
{
x = (int) buddyView ()->transformViewToDocX (scrollViewContentsX);
- const int rightMostAllowedX = QMAX (0, document ()->width () - width ());
+ const int rightMostAllowedX = TQMAX (0, document ()->width () - width ());
#if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW
kdDebug () << "\tdocX=" << x
<< " docWidth=" << document ()->width ()
@@ -135,7 +135,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
if (document ()->height () > height ())
{
y = (int) buddyView ()->transformViewToDocY (scrollViewContentsY);
- const int bottomMostAllowedY = QMAX (0, document ()->height () - height ());
+ const int bottomMostAllowedY = TQMAX (0, document ()->height () - height ());
#if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW
kdDebug () << "\tdocY=" << y
<< " docHeight=" << document ()->height ()
@@ -163,12 +163,12 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
TQRect docRect = buddyView ()->transformViewToDoc (
TQRect (buddyViewScrollableContainer ()->contentsXSoon (),
buddyViewScrollableContainer ()->contentsYSoon (),
- QMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()),
- QMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ())));
+ TQMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()),
+ TQMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ())));
x = docRect.x () - (width () - docRect.width ()) / 2;
kdDebug () << "\tnew suggest x=" << x << endl;
- const int rightMostAllowedX = QMAX (0, document ()->width () - width ());
+ const int rightMostAllowedX = TQMAX (0, document ()->width () - width ());
if (x < 0)
x = 0;
if (x > rightMostAllowedX)
@@ -176,7 +176,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
y = docRect.y () - (height () - docRect.height ()) / 2;
kdDebug () << "\tnew suggest y=" << y << endl;
- const int bottomMostAllowedY = QMAX (0, document ()->height () - height ());
+ const int bottomMostAllowedY = TQMAX (0, document ()->height () - height ());
if (y < 0)
y = 0;
if (y > bottomMostAllowedY)
diff --git a/kolourpaint/views/kpunzoomedthumbnailview.h b/kolourpaint/views/kpunzoomedthumbnailview.h
index cff6bdab..7e81a5db 100644
--- a/kolourpaint/views/kpunzoomedthumbnailview.h
+++ b/kolourpaint/views/kpunzoomedthumbnailview.h
@@ -55,6 +55,7 @@ class kpViewScrollableContainer;
/*sealed*/ class kpUnzoomedThumbnailView : public kpThumbnailView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -65,7 +66,7 @@ public:
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- TQWidget *parent, const char *name);
+ TQWidget *tqparent, const char *name);
/**
* Destructs an unzoomed thumbnail view.
@@ -86,7 +87,7 @@ public slots:
* container will be visible.
*
* It tries to maximise the used area of this view. Unused areas will
- * be set to the widget background thanks to the mask.
+ * be set to the widget background thanks to the tqmask.
*
* Call this if the size of the document changes.
* Already connected to buddyViewScrollableContainer()'s
diff --git a/kolourpaint/views/kpzoomedthumbnailview.cpp b/kolourpaint/views/kpzoomedthumbnailview.cpp
index c5bde48d..adef47c0 100644
--- a/kolourpaint/views/kpzoomedthumbnailview.cpp
+++ b/kolourpaint/views/kpzoomedthumbnailview.cpp
@@ -43,12 +43,12 @@ kpZoomedThumbnailView::kpZoomedThumbnailView (kpDocument *document,
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- TQWidget *parent, const char *name)
+ TQWidget *tqparent, const char *name)
: kpThumbnailView (document, toolToolBar, viewManager,
buddyView,
scrollableContainer,
- parent, name)
+ tqparent, name)
{
// Call to virtual function - this is why the class is sealed
adjustToEnvironment ();
@@ -97,8 +97,8 @@ void kpZoomedThumbnailView::adjustToEnvironment ()
}
- int hzoom = QMAX (1, width () * 100 / document ()->width ());
- int vzoom = QMAX (1, height () * 100 / document ()->height ());
+ int hzoom = TQMAX (1, width () * 100 / document ()->width ());
+ int vzoom = TQMAX (1, height () * 100 / document ()->height ());
// keep aspect ratio
if (hzoom < vzoom)
diff --git a/kolourpaint/views/kpzoomedthumbnailview.h b/kolourpaint/views/kpzoomedthumbnailview.h
index 882c6d08..c35c22bb 100644
--- a/kolourpaint/views/kpzoomedthumbnailview.h
+++ b/kolourpaint/views/kpzoomedthumbnailview.h
@@ -50,6 +50,7 @@
/*sealed*/ class kpZoomedThumbnailView : public kpThumbnailView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -60,7 +61,7 @@ public:
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- TQWidget *parent, const char *name);
+ TQWidget *tqparent, const char *name);
/**
* Destructs a zoomed thumbnail view.
@@ -77,7 +78,7 @@ public:
public slots:
/**
* Changes its zoom level to accommodate the display of entire document
- * in the view. It maintains aspect by changing the origin and mask.
+ * in the view. It maintains aspect by changing the origin and tqmask.
*
* Call this if the size of the document changes.
* Already called by @ref kpThumbnailView resizeEvent().
diff --git a/kolourpaint/views/kpzoomedview.cpp b/kolourpaint/views/kpzoomedview.cpp
index c2b1f47d..402b8e39 100644
--- a/kolourpaint/views/kpzoomedview.cpp
+++ b/kolourpaint/views/kpzoomedview.cpp
@@ -43,12 +43,12 @@ kpZoomedView::kpZoomedView (kpDocument *document,
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- TQWidget *parent, const char *name)
+ TQWidget *tqparent, const char *name)
: kpView (document, toolToolBar, viewManager,
buddyView,
scrollableContainer,
- parent, name)
+ tqparent, name)
{
// Call to virtual function - this is why the class is sealed
adjustToEnvironment ();
diff --git a/kolourpaint/views/kpzoomedview.h b/kolourpaint/views/kpzoomedview.h
index 12565ab4..e0228fde 100644
--- a/kolourpaint/views/kpzoomedview.h
+++ b/kolourpaint/views/kpzoomedview.h
@@ -51,6 +51,7 @@
/*sealed*/ class kpZoomedView : public kpView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -61,7 +62,7 @@ public:
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- TQWidget *parent, const char *name);
+ TQWidget *tqparent, const char *name);
/**
* Destructs an unzoomed view.
diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.cpp b/kolourpaint/widgets/kpcolorsimilaritycube.cpp
index c09e495a..07693130 100644
--- a/kolourpaint/widgets/kpcolorsimilaritycube.cpp
+++ b/kolourpaint/widgets/kpcolorsimilaritycube.cpp
@@ -49,9 +49,9 @@ const double kpColorSimilarityCube::colorCubeDiagonalDistance =
kpColorSimilarityCube::kpColorSimilarityCube (int look,
kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
+ : TQFrame (tqparent, name, TQt::WNoAutoErase/*no flicker*/),
m_mainWindow (mainWindow),
m_colorSimilarity (-1)
{
@@ -133,12 +133,12 @@ void kpColorSimilarityCube::setColorSimilarity (double similarity)
m_colorSimilarity = similarity;
- repaint (false/*no erase*/);
+ tqrepaint (false/*no erase*/);
}
-// protected virtual [base QWidget]
-TQSize kpColorSimilarityCube::sizeHint () const
+// protected virtual [base TQWidget]
+TQSize kpColorSimilarityCube::tqsizeHint () const
{
return TQSize (52, 52);
}
@@ -193,8 +193,8 @@ static void drawQuadrant (TQPainter *p,
points.resize (3);
- p->setPen (Qt::black);
- p->setBrush (Qt::NoBrush);
+ p->setPen (TQt::black);
+ p->setBrush (TQt::NoBrush);
p->drawPolyline (points);
@@ -233,7 +233,7 @@ void kpColorSimilarityCube::drawFace (TQPainter *p,
const TQPoint mm (::pointBetween (ml, mr));
- const int baseBrightness = QMAX (127,
+ const int baseBrightness = TQMAX (127,
255 - int (kpColorSimilarityDialog::maximumColorSimilarity *
kpColorSimilarityCube::colorCubeDiagonalDistance / 2));
TQColor colors [2] =
@@ -247,8 +247,8 @@ void kpColorSimilarityCube::drawFace (TQPainter *p,
#if DEBUG_KP_COLOR_SIMILARITY_CUBE
kdDebug () << "\tnot enabled - making us grey" << endl;
#endif
- colors [0] = colorGroup ().background ();
- colors [1] = colorGroup ().background ();
+ colors [0] = tqcolorGroup ().background ();
+ colors [1] = tqcolorGroup ().background ();
}
#if DEBUG_KP_COLOR_SIMILARITY_CUBE
@@ -256,8 +256,8 @@ void kpColorSimilarityCube::drawFace (TQPainter *p,
<< " colorCubeDiagDist=" << kpColorSimilarityCube::colorCubeDiagonalDistance
<< endl
<< "\tbaseBrightness=" << baseBrightness
- << " color[0]=" << ((colors [0].rgb () & RGB_MASK) >> ((2 - redOrGreenOrBlue) * 8))
- << " color[1]=" << ((colors [1].rgb () & RGB_MASK) >> ((2 - redOrGreenOrBlue) * 8))
+ << " color[0]=" << ((colors [0].rgb () & TQRGB_MASK) >> ((2 - redOrGreenOrBlue) * 8))
+ << " color[1]=" << ((colors [1].rgb () & TQRGB_MASK) >> ((2 - redOrGreenOrBlue) * 8))
<< endl;
#endif
@@ -268,17 +268,17 @@ void kpColorSimilarityCube::drawFace (TQPainter *p,
::drawQuadrant (p, colors [0], bm, br, mr, mm);
}
-// protected virtual [base QFrame]
+// protected virtual [base TQFrame]
void kpColorSimilarityCube::drawContents (TQPainter *p)
{
TQRect cr (contentsRect ());
TQPixmap backBuffer (cr.width (), cr.height ());
- backBuffer.fill (colorGroup ().background ());
+ backBuffer.fill (tqcolorGroup ().background ());
TQPainter backBufferPainter (&backBuffer);
- int cubeRectSize = QMIN (cr.width () * 6 / 8, cr.height () * 6 / 8);
+ int cubeRectSize = TQMIN (cr.width () * 6 / 8, cr.height () * 6 / 8);
int dx = (cr.width () - cubeRectSize) / 2,
dy = (cr.height () - cubeRectSize) / 2;
backBufferPainter.translate (dx, dy);
@@ -336,7 +336,7 @@ void kpColorSimilarityCube::drawContents (TQPainter *p)
#if 0
backBufferPainter.save ();
- backBufferPainter.setPen (Qt::cyan);
+ backBufferPainter.setPen (TQt::cyan);
backBufferPainter.drawRect (0, 0, cubeRectSize, cubeRectSize);
backBufferPainter.restore ();
#endif
diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.h b/kolourpaint/widgets/kpcolorsimilaritycube.h
index ee074d55..d2fb85d2 100644
--- a/kolourpaint/widgets/kpcolorsimilaritycube.h
+++ b/kolourpaint/widgets/kpcolorsimilaritycube.h
@@ -34,7 +34,7 @@
class kpColor;
class kpMainWindow;
-class kpColorSimilarityCube : public QFrame
+class kpColorSimilarityCube : public TQFrame
{
public:
enum Look
@@ -46,7 +46,7 @@ public:
kpColorSimilarityCube (int look,
kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name = 0);
virtual ~kpColorSimilarityCube ();
@@ -55,7 +55,7 @@ public:
double colorSimilarity () const;
void setColorSimilarity (double similarity);
- virtual TQSize sizeHint () const;
+ virtual TQSize tqsizeHint () const;
protected:
TQColor color (int redOrGreenOrBlue, int baseBrightness, int similarityDirection) const;
diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
index 5831c62f..ee4ff1b0 100644
--- a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
+++ b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
@@ -44,9 +44,9 @@ const double kpColorSimilarityDialog::maximumColorSimilarity = .30;
kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : KDialogBase (parent, name, true/*modal*/,
+ : KDialogBase (tqparent, name, true/*modal*/,
i18n ("Color Similarity"),
KDialogBase::Ok | KDialogBase::Cancel),
m_mainWindow (mainWindow)
@@ -66,7 +66,7 @@ kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow,
TQVBoxLayout *cubeLayout = new TQVBoxLayout (cubeGroupBox, marginHint () * 2, spacingHint ());
cubeLayout->addWidget (m_colorSimilarityCube, 1/*stretch*/);
- cubeLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter);
+ cubeLayout->addWidget (updatePushButton, 0/*stretch*/, TQt::AlignHCenter);
connect (updatePushButton, TQT_SIGNAL (clicked ()),
@@ -109,7 +109,7 @@ double kpColorSimilarityDialog::colorSimilarity () const
// public
void kpColorSimilarityDialog::setColorSimilarity (double similarity)
{
- m_colorSimilarityInput->setValue (qRound (similarity * 100));
+ m_colorSimilarityInput->setValue (tqRound (similarity * 100));
}
diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.h b/kolourpaint/widgets/kpcolorsimilaritydialog.h
index 7dee17b8..df4e2445 100644
--- a/kolourpaint/widgets/kpcolorsimilaritydialog.h
+++ b/kolourpaint/widgets/kpcolorsimilaritydialog.h
@@ -38,10 +38,11 @@ class kpMainWindow;
class kpColorSimilarityDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
kpColorSimilarityDialog (kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name = 0);
virtual ~kpColorSimilarityDialog ();
diff --git a/kolourpaint/widgets/kpcolortoolbar.cpp b/kolourpaint/widgets/kpcolortoolbar.cpp
index 327229df..89357d1c 100644
--- a/kolourpaint/widgets/kpcolortoolbar.cpp
+++ b/kolourpaint/widgets/kpcolortoolbar.cpp
@@ -61,8 +61,8 @@
*/
kpDualColorButton::kpDualColorButton (kpMainWindow *mainWindow,
- TQWidget *parent, const char *name)
- : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
+ TQWidget *tqparent, const char *name)
+ : TQFrame (tqparent, name, TQt::WNoAutoErase/*no flicker*/),
m_mainWindow (mainWindow),
m_backBuffer (0)
{
@@ -149,8 +149,8 @@ kpColor kpDualColorButton::oldBackgroundColor () const
}
-// public virtual [base QWidget]
-TQSize kpDualColorButton::sizeHint () const
+// public virtual [base TQWidget]
+TQSize kpDualColorButton::tqsizeHint () const
{
return TQSize (52, 52);
}
@@ -200,15 +200,15 @@ TQRect kpDualColorButton::backgroundRect () const
// TODO: drag a colour from this widget
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDualColorButton::dragMoveEvent (TQDragMoveEvent *e)
{
- e->accept ((foregroundRect ().contains (e->pos ()) ||
- backgroundRect ().contains (e->pos ())) &&
+ e->accept ((foregroundRect ().tqcontains (e->pos ()) ||
+ backgroundRect ().tqcontains (e->pos ())) &&
KColorDrag::canDecode (e));
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDualColorButton::dropEvent (TQDropEvent *e)
{
TQColor col;
@@ -216,35 +216,35 @@ void kpDualColorButton::dropEvent (TQDropEvent *e)
if (col.isValid ())
{
- if (foregroundRect ().contains (e->pos ()))
+ if (foregroundRect ().tqcontains (e->pos ()))
setForegroundColor (kpColor (col.rgb ()));
- else if (backgroundRect ().contains (e->pos ()))
+ else if (backgroundRect ().tqcontains (e->pos ()))
setBackgroundColor (kpColor (col.rgb ()));
}
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDualColorButton::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e)
{
int whichColor = -1;
- if (foregroundRect ().contains (e->pos ()))
+ if (foregroundRect ().tqcontains (e->pos ()))
whichColor = 0;
- else if (backgroundRect ().contains (e->pos ()))
+ else if (backgroundRect ().tqcontains (e->pos ()))
whichColor = 1;
if (whichColor == 0 || whichColor == 1)
{
- TQColor col = Qt::black;
+ TQColor col = TQt::black;
if (color (whichColor).isOpaque ())
- col = color (whichColor).toQColor ();
+ col = color (whichColor).toTQColor ();
else
{
// TODO: If you double-click on a transparent color and press OK, you get
@@ -257,16 +257,16 @@ void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e)
// to opaque colors.
}
- // TODO: parent
+ // TODO: tqparent
if (KColorDialog::getColor (col/*ref*/))
setColor (whichColor, kpColor (col.rgb ()));
}
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e)
{
- if (swapPixmapRect ().contains (e->pos ()) &&
+ if (swapPixmapRect ().tqcontains (e->pos ()) &&
m_color [0] != m_color [1])
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
@@ -288,7 +288,7 @@ void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e)
}
-// protected virtual [base QFrame]
+// protected virtual [base TQFrame]
void kpDualColorButton::drawContents (TQPainter *p)
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
@@ -318,14 +318,14 @@ void kpDualColorButton::drawContents (TQPainter *p)
else
{
backBufferPainter.fillRect (m_backBuffer->rect (),
- colorGroup ().color (TQColorGroup::Background));
+ tqcolorGroup ().color (TQColorGroup::Background));
}
TQPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16");
if (!isEnabled ())
{
- // swapPixmap has a mask after all
- swapPixmap.fill (colorGroup ().color (TQColorGroup::Dark));
+ // swapPixmap has a tqmask after all
+ swapPixmap.fill (tqcolorGroup ().color (TQColorGroup::Dark));
}
backBufferPainter.drawPixmap (swapPixmapRect ().topLeft (), swapPixmap);
@@ -337,17 +337,17 @@ void kpDualColorButton::drawContents (TQPainter *p)
if (isEnabled ())
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
- kdDebug () << "\tbackgroundColor=" << (int *) m_color [1].toQRgb ()
+ kdDebug () << "\tbackgroundColor=" << (int *) m_color [1].toTQRgb ()
<< endl;
#endif
if (m_color [1].isOpaque ())
- backBufferPainter.fillRect (bgRectInside, m_color [1].toQColor ());
+ backBufferPainter.fillRect (bgRectInside, m_color [1].toTQColor ());
else
backBufferPainter.drawPixmap (bgRectInside, UserIcon ("color_transparent_26x26"));
}
else
- backBufferPainter.fillRect (bgRectInside, colorGroup ().color (TQColorGroup::Button));
- qDrawShadePanel (&backBufferPainter, bgRect, colorGroup (),
+ backBufferPainter.fillRect (bgRectInside, tqcolorGroup ().color (TQColorGroup::Button));
+ qDrawShadePanel (&backBufferPainter, bgRect, tqcolorGroup (),
false/*not sunken*/, 2/*lineWidth*/,
0/*never fill*/);
@@ -357,17 +357,17 @@ void kpDualColorButton::drawContents (TQPainter *p)
if (isEnabled ())
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
- kdDebug () << "\tforegroundColor=" << (int *) m_color [0].toQRgb ()
+ kdDebug () << "\tforegroundColor=" << (int *) m_color [0].toTQRgb ()
<< endl;
#endif
if (m_color [0].isOpaque ())
- backBufferPainter.fillRect (fgRectInside, m_color [0].toQColor ());
+ backBufferPainter.fillRect (fgRectInside, m_color [0].toTQColor ());
else
backBufferPainter.drawPixmap (fgRectInside, UserIcon ("color_transparent_26x26"));
}
else
- backBufferPainter.fillRect (fgRectInside, colorGroup ().color (TQColorGroup::Button));
- qDrawShadePanel (&backBufferPainter, fgRect, colorGroup (),
+ backBufferPainter.fillRect (fgRectInside, tqcolorGroup ().color (TQColorGroup::Button));
+ qDrawShadePanel (&backBufferPainter, fgRect, tqcolorGroup (),
false/*not sunken*/, 2/*lineWidth*/,
0/*never fill*/);
@@ -421,8 +421,8 @@ static TQColor add (const TQColor &a, const TQColor &b)
//
-// make our own colors in case weird ones like "Qt::cyan"
-// (turquoise) get changed by Qt
+// make our own colors in case weird ones like "TQt::cyan"
+// (turquoise) get changed by TQt
//
// primary colors + B&W
@@ -461,10 +461,10 @@ static bool ownColorsInitialised = false;
*/
#define rows 2
#define cols 11
-kpColorCells::kpColorCells (TQWidget *parent,
+kpColorCells::kpColorCells (TQWidget *tqparent,
Qt::Orientation o,
const char *name)
- : KColorCells (parent, rows, cols),
+ : KColorCells (tqparent, rows, cols),
m_mouseButton (-1)
{
setName (name);
@@ -657,7 +657,7 @@ void kpColorCells::mouseReleaseEvent (TQMouseEvent *e)
{
m_mouseButton = -1;
- Qt::ButtonState button = e->button ();
+ TQt::ButtonState button = e->button ();
#if DEBUG_KP_COLOR_TOOL_BAR
kdDebug () << "kpColorCells::mouseReleaseEvent(left="
<< (button & Qt::LeftButton)
@@ -729,7 +729,7 @@ void kpColorCells::slotColorDoubleClicked (int cell)
TQColor color = KColorCells::color (cell);
- // TODO: parent
+ // TODO: tqparent
if (KColorDialog::getColor (color/*ref*/))
KColorCells::setColor (cell, color);
}
@@ -739,8 +739,8 @@ void kpColorCells::slotColorDoubleClicked (int cell)
* kpTransparentColorCell
*/
-kpTransparentColorCell::kpTransparentColorCell (TQWidget *parent, const char *name)
- : TQFrame (parent, name)
+kpTransparentColorCell::kpTransparentColorCell (TQWidget *tqparent, const char *name)
+ : TQFrame (tqparent, name)
{
#if DEBUG_KP_COLOR_TOOL_BAR
kdDebug () << "kpTransparentColorCell::kpTransparentColorCell()" << endl;
@@ -767,23 +767,23 @@ kpTransparentColorCell::~kpTransparentColorCell ()
}
-// public virtual [base QWidget]
-TQSize kpTransparentColorCell::sizeHint () const
+// public virtual [base TQWidget]
+TQSize kpTransparentColorCell::tqsizeHint () const
{
return TQSize (m_pixmap.width () + frameWidth () * 2,
m_pixmap.height () + frameWidth () * 2);
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpTransparentColorCell::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e)
{
- if (rect ().contains (e->pos ()))
+ if (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ()))
{
if (e->button () == Qt::LeftButton)
{
@@ -798,7 +798,7 @@ void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e)
}
}
-// protected virtual [base QFrame]
+// protected virtual [base TQFrame]
void kpTransparentColorCell::drawContents (TQPainter *p)
{
TQFrame::drawContents (p);
@@ -818,10 +818,10 @@ void kpTransparentColorCell::drawContents (TQPainter *p)
* kpColorPalette
*/
-kpColorPalette::kpColorPalette (TQWidget *parent,
+kpColorPalette::kpColorPalette (TQWidget *tqparent,
Qt::Orientation o,
const char *name)
- : TQWidget (parent, name),
+ : TQWidget (tqparent, name),
m_boxLayout (0)
{
#if DEBUG_KP_COLOR_TOOL_BAR
@@ -829,7 +829,7 @@ kpColorPalette::kpColorPalette (TQWidget *parent,
#endif
m_transparentColorCell = new kpTransparentColorCell (this);
- m_transparentColorCell->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ m_transparentColorCell->tqsetSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
connect (m_transparentColorCell, TQT_SIGNAL (foregroundColorChanged (const kpColor &)),
this, TQT_SIGNAL (foregroundColorChanged (const kpColor &)));
connect (m_transparentColorCell, TQT_SIGNAL (backgroundColorChanged (const kpColor &)),
@@ -863,13 +863,13 @@ void kpColorPalette::setOrientation (Qt::Orientation o)
if (o == Qt::Horizontal)
{
m_boxLayout = new TQBoxLayout (this, TQBoxLayout::LeftToRight, 0/*margin*/, 5/*spacing*/);
- m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignVCenter);
+ m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, TQt::AlignVCenter);
m_boxLayout->addWidget (m_colorCells);
}
else
{
m_boxLayout = new TQBoxLayout (this, TQBoxLayout::TopToBottom, 0/*margin*/, 5/*spacing*/);
- m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignHCenter);
+ m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, TQt::AlignHCenter);
m_boxLayout->addWidget (m_colorCells);
}
@@ -882,11 +882,11 @@ void kpColorPalette::setOrientation (Qt::Orientation o)
*/
kpColorSimilarityToolBarItem::kpColorSimilarityToolBarItem (kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
: kpColorSimilarityCube (kpColorSimilarityCube::Depressed |
kpColorSimilarityCube::DoubleClickInstructions,
- mainWindow, parent, name),
+ mainWindow, tqparent, name),
m_mainWindow (mainWindow),
m_processedColorSimilarity (kpColor::Exact)
{
@@ -912,7 +912,7 @@ void kpColorSimilarityToolBarItem::setColorSimilarity (double similarity)
kpColorSimilarityCube::setColorSimilarity (similarity);
if (similarity > 0)
- TQToolTip::add (this, i18n ("Color similarity: %1%").arg (qRound (similarity * 100)));
+ TQToolTip::add (this, i18n ("Color similarity: %1%").arg (tqRound (similarity * 100)));
else
TQToolTip::add (this, i18n ("Color similarity: Exact"));
@@ -930,13 +930,13 @@ double kpColorSimilarityToolBarItem::oldColorSimilarity () const
}
-// private virtual [base QWidget]
+// private virtual [base TQWidget]
void kpColorSimilarityToolBarItem::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
-// private virtual [base QWidget]
+// private virtual [base TQWidget]
void kpColorSimilarityToolBarItem::mouseDoubleClickEvent (TQMouseEvent * /*e*/)
{
kpColorSimilarityDialog dialog (m_mainWindow, this);
@@ -964,7 +964,7 @@ kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow,
5/*margin*/, (10 * 4)/*spacing*/);
m_dualColorButton = new kpDualColorButton (mainWindow, base);
- m_dualColorButton->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ m_dualColorButton->tqsetSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
connect (m_dualColorButton, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &)),
this, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &)));
connect (m_dualColorButton, TQT_SIGNAL (foregroundColorChanged (const kpColor &)),
@@ -981,7 +981,7 @@ kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow,
m_boxLayout->addWidget (m_colorPalette, 0/*stretch*/);
m_colorSimilarityToolBarItem = new kpColorSimilarityToolBarItem (mainWindow, base);
- m_colorSimilarityToolBarItem->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ m_colorSimilarityToolBarItem->tqsetSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
connect (m_colorSimilarityToolBarItem, TQT_SIGNAL (colorSimilarityChanged (double, int)),
this, TQT_SIGNAL (colorSimilarityChanged (double, int)));
m_boxLayout->addWidget (m_colorSimilarityToolBarItem, 0/*stretch*/);
diff --git a/kolourpaint/widgets/kpcolortoolbar.h b/kolourpaint/widgets/kpcolortoolbar.h
index 3b50c825..b1e8faa8 100644
--- a/kolourpaint/widgets/kpcolortoolbar.h
+++ b/kolourpaint/widgets/kpcolortoolbar.h
@@ -56,13 +56,14 @@ class kpMainWindow;
// used by kpTransparentColorCell
// - no obscure "current" colour
//
-class kpDualColorButton : public QFrame
+class kpDualColorButton : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
kpDualColorButton (kpMainWindow *mainWindow,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
virtual ~kpDualColorButton ();
kpColor color (int which) const;
@@ -90,7 +91,7 @@ public:
kpColor oldBackgroundColor () const;
public:
- virtual TQSize sizeHint () const;
+ virtual TQSize tqsizeHint () const;
protected:
TQRect swapPixmapRect () const;
@@ -118,9 +119,10 @@ protected:
class kpColorCells : public KColorCells
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpColorCells (TQWidget *parent,
+ kpColorCells (TQWidget *tqparent,
Qt::Orientation o = Qt::Horizontal,
const char *name = 0);
virtual ~kpColorCells ();
@@ -152,15 +154,16 @@ protected slots:
};
-class kpTransparentColorCell : public QFrame
+class kpTransparentColorCell : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpTransparentColorCell (TQWidget *parent, const char *name = 0);
+ kpTransparentColorCell (TQWidget *tqparent, const char *name = 0);
virtual ~kpTransparentColorCell ();
- virtual TQSize sizeHint () const;
+ virtual TQSize tqsizeHint () const;
signals:
void transparentColorSelected (int mouseButton);
@@ -179,12 +182,13 @@ protected:
};
-class kpColorPalette : public QWidget
+class kpColorPalette : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpColorPalette (TQWidget *parent,
+ kpColorPalette (TQWidget *tqparent,
Qt::Orientation o = Qt::Horizontal,
const char *name = 0);
virtual ~kpColorPalette ();
@@ -208,10 +212,11 @@ protected:
class kpColorSimilarityToolBarItem : public kpColorSimilarityCube
{
Q_OBJECT
+ TQ_OBJECT
public:
kpColorSimilarityToolBarItem (kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name = 0);
virtual ~kpColorSimilarityToolBarItem ();
@@ -243,6 +248,7 @@ private:
class kpColorToolBar : public KToolBar
{
Q_OBJECT
+ TQ_OBJECT
public:
kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, const char *name = 0);
diff --git a/kolourpaint/widgets/kpresizesignallinglabel.cpp b/kolourpaint/widgets/kpresizesignallinglabel.cpp
index cb5a2311..b62f3679 100644
--- a/kolourpaint/widgets/kpresizesignallinglabel.cpp
+++ b/kolourpaint/widgets/kpresizesignallinglabel.cpp
@@ -34,15 +34,15 @@
kpResizeSignallingLabel::kpResizeSignallingLabel (const TQString &string,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : TQLabel (string, parent, name)
+ : TQLabel (string, tqparent, name)
{
}
-kpResizeSignallingLabel::kpResizeSignallingLabel (TQWidget *parent,
+kpResizeSignallingLabel::kpResizeSignallingLabel (TQWidget *tqparent,
const char *name)
- : TQLabel (parent, name)
+ : TQLabel (tqparent, name)
{
}
@@ -51,7 +51,7 @@ kpResizeSignallingLabel::~kpResizeSignallingLabel ()
}
-// protected virtual [base QLabel]
+// protected virtual [base TQLabel]
void kpResizeSignallingLabel::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_RESIZE_SIGNALLING_LABEL
diff --git a/kolourpaint/widgets/kpresizesignallinglabel.h b/kolourpaint/widgets/kpresizesignallinglabel.h
index 5a53dcf2..88f4477c 100644
--- a/kolourpaint/widgets/kpresizesignallinglabel.h
+++ b/kolourpaint/widgets/kpresizesignallinglabel.h
@@ -32,13 +32,14 @@
#include <tqlabel.h>
-class kpResizeSignallingLabel : public QLabel
+class kpResizeSignallingLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpResizeSignallingLabel (const TQString &string, TQWidget *parent, const char *name = 0);
- kpResizeSignallingLabel (TQWidget *parent, const char *name = 0);
+ kpResizeSignallingLabel (const TQString &string, TQWidget *tqparent, const char *name = 0);
+ kpResizeSignallingLabel (TQWidget *tqparent, const char *name = 0);
virtual ~kpResizeSignallingLabel ();
signals:
diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.cpp b/kolourpaint/widgets/kpsqueezedtextlabel.cpp
index 613c93a9..8cd4dfbb 100644
--- a/kolourpaint/widgets/kpsqueezedtextlabel.cpp
+++ b/kolourpaint/widgets/kpsqueezedtextlabel.cpp
@@ -25,7 +25,7 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define DEBUG_KP_SQUEEZED_TEXT_LABEL 0
+#define DEBUG_KP_STQUEEZED_TEXT_LABEL 0
#include <kpsqueezedtextlabel.h>
@@ -38,14 +38,14 @@
#include <klocale.h>
-kpSqueezedTextLabel::kpSqueezedTextLabel (TQWidget *parent, const char *name)
- : TQLabel (parent, name),
+kpSqueezedTextLabel::kpSqueezedTextLabel (TQWidget *tqparent, const char *name)
+ : TQLabel (tqparent, name),
m_showEllipsis (true)
{
}
-kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name)
- : TQLabel (parent, name),
+kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *tqparent, const char *name)
+ : TQLabel (tqparent, name),
m_showEllipsis (true)
{
setText (text);
@@ -53,11 +53,11 @@ kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *parent
// public virtual
-TQSize kpSqueezedTextLabel::minimumSizeHint () const
+TQSize kpSqueezedTextLabel::tqminimumSizeHint () const
{
-#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
- kdDebug () << "kpSqueezedTextLabel::minimumSizeHint() qLabel prefers"
- << TQLabel::minimumSizeHint () << endl;
+#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
+ kdDebug () << "kpSqueezedTextLabel::tqminimumSizeHint() qLabel prefers"
+ << TQLabel::tqminimumSizeHint () << endl;
#endif
return TQSize (-1/*no minimum width*/, TQLabel::minimumHeight ());
}
@@ -88,7 +88,7 @@ void kpSqueezedTextLabel::setShowEllipsis (bool yes)
}
-// public slots virtual [base QLabel]
+// public slots virtual [base TQLabel]
void kpSqueezedTextLabel::setText (const TQString &text)
{
m_fullText = text;
@@ -96,10 +96,10 @@ void kpSqueezedTextLabel::setText (const TQString &text)
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpSqueezedTextLabel::resizeEvent (TQResizeEvent *e)
{
-#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "kpSqueezedTextLabeL::resizeEvent() size=" << e->size ()
<< " oldSize=" << e->oldSize ()
<< endl;
@@ -111,19 +111,19 @@ void kpSqueezedTextLabel::resizeEvent (TQResizeEvent *e)
// protected
TQString kpSqueezedTextLabel::ellipsisText () const
{
- return m_showEllipsis ? i18n ("...") : TQString::null;
+ return m_showEllipsis ? i18n ("...") : TQString();
}
// protected
void kpSqueezedTextLabel::squeezeText ()
{
-#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "kpSqueezedTextLabeL::squeezeText" << endl;
#endif
TQFontMetrics fontMetrics (font ());
int fullTextWidth = fontMetrics.width (m_fullText);
-#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tfullText=" << m_fullText
<< " fullTextWidth=" << fullTextWidth
<< " labelWidth=" << width ()
@@ -132,14 +132,14 @@ void kpSqueezedTextLabel::squeezeText ()
if (fullTextWidth <= width ())
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tfullText will fit - display" << endl;
#endif
TQLabel::setText (m_fullText);
}
else
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tfullText won't fit :( - squeeze" << endl;
kdDebug () << "\t\twidth of \"...\"="
<< fontMetrics.width (ellipsisText ())
@@ -148,10 +148,10 @@ void kpSqueezedTextLabel::squeezeText ()
#endif
if (fontMetrics.width (ellipsisText ()) > width ())
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\t\tcan't even fit \"...\" - forget it" << endl;
#endif
- TQLabel::setText (TQString::null);
+ TQLabel::setText (TQString());
return;
}
@@ -164,7 +164,7 @@ void kpSqueezedTextLabel::squeezeText ()
{
int numLettersToUseMid = (numLettersToUseLo + numLettersToUseHi) / 2;
int squeezedWidth = fontMetrics.width (m_fullText.left (numLettersToUseMid) + ellipsisText ());
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tbsearch: lo=" << numLettersToUseLo
<< " hi=" << numLettersToUseHi
<< " mid=" << numLettersToUseMid
@@ -175,7 +175,7 @@ void kpSqueezedTextLabel::squeezeText ()
if (squeezedWidth == width ())
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\tperfect match!" << endl;
#endif
numLettersToUse = numLettersToUseMid;
@@ -183,14 +183,14 @@ void kpSqueezedTextLabel::squeezeText ()
}
else if (squeezedWidth < width ())
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\tsmall enough - numLettersToUse="
<< numLettersToUse << endl;
#endif
if (numLettersToUseMid > numLettersToUse)
{
numLettersToUse = numLettersToUseMid;
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\t\tset numLettersToUse="
<< numLettersToUse
<< endl;
@@ -201,7 +201,7 @@ void kpSqueezedTextLabel::squeezeText ()
}
else
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\ttoo big" << endl;
#endif
numLettersToUseHi = numLettersToUseMid - 1;
diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.h b/kolourpaint/widgets/kpsqueezedtextlabel.h
index f4bd320d..1169be63 100644
--- a/kolourpaint/widgets/kpsqueezedtextlabel.h
+++ b/kolourpaint/widgets/kpsqueezedtextlabel.h
@@ -34,15 +34,16 @@
// KSqueezedTextLabel done properly - squeeze at the end of the string,
// not the middle.
-class kpSqueezedTextLabel : public QLabel
+class kpSqueezedTextLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpSqueezedTextLabel (TQWidget *parent, const char *name = 0);
- kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name = 0);
+ kpSqueezedTextLabel (TQWidget *tqparent, const char *name = 0);
+ kpSqueezedTextLabel (const TQString &text, TQWidget *tqparent, const char *name = 0);
- virtual TQSize minimumSizeHint () const;
+ virtual TQSize tqminimumSizeHint () const;
// TODO: maybe text() should return the full text?
TQString fullText () const;
diff --git a/kolourpaint/widgets/kptooltoolbar.cpp b/kolourpaint/widgets/kptooltoolbar.cpp
index 26c610e9..163a7f49 100644
--- a/kolourpaint/widgets/kptooltoolbar.cpp
+++ b/kolourpaint/widgets/kptooltoolbar.cpp
@@ -55,11 +55,11 @@
#include <kptoolwidgetspraycansize.h>
-class kpToolButton : public QToolButton
+class kpToolButton : public TQToolButton
{
public:
- kpToolButton (kpTool *tool, TQWidget *parent)
- : TQToolButton (parent),
+ kpToolButton (kpTool *tool, TQWidget *tqparent)
+ : TQToolButton (tqparent),
m_tool (tool)
{
}
@@ -69,7 +69,7 @@ public:
}
protected:
- // virtual [base QWidget]
+ // virtual [base TQWidget]
void mouseDoubleClickEvent (TQMouseEvent *e)
{
if (e->button () == Qt::LeftButton && m_tool)
@@ -144,7 +144,7 @@ kpToolToolBar::kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, i
setOrientation (orientation ());
#if DEBUG_KP_TOOL_TOOL_BAR
- kdDebug () << "kpToolToolBar::<ctor> layout tool widgets msec="
+ kdDebug () << "kpToolToolBar::<ctor> tqlayout tool widgets msec="
<< timer.elapsed () << endl;
#endif
@@ -199,7 +199,7 @@ int kpToolToolBar::defaultIconSize ()
if (m_defaultIconSize <= 0)
{
- // Adapt according to screen geometry
+ // Adapt according to screen tqgeometry
const TQRect desktopSize = KGlobalSettings::desktopGeometry (this);
#if DEBUG_KP_TOOL_TOOL_BAR
kdDebug () << "\tadapting to screen size=" << desktopSize << endl;
@@ -547,7 +547,7 @@ void kpToolToolBar::slotToolActionToolTipChanged ()
}
-// public slot virtual [base QDockWindow]
+// public slot virtual [base TQDockWindow]
void kpToolToolBar::setOrientation (Qt::Orientation o)
{
#if DEBUG_KP_TOOL_TOOL_BAR
@@ -616,7 +616,7 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
{
m_baseLayout->addWidget (*it,
0/*stretch*/,
- o == Qt::Vertical ? Qt::AlignHCenter : Qt::AlignVCenter);
+ o == Qt::Vertical ? TQt::AlignHCenter : TQt::AlignVCenter);
}
}
diff --git a/kolourpaint/widgets/kptooltoolbar.h b/kolourpaint/widgets/kptooltoolbar.h
index 417ae022..5005396f 100644
--- a/kolourpaint/widgets/kptooltoolbar.h
+++ b/kolourpaint/widgets/kptooltoolbar.h
@@ -54,6 +54,7 @@ class kpToolWidgetSpraycanSize;
class kpToolToolBar : public KToolBar
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, int colsOrRows = 2, const char *name = 0);
diff --git a/kolourpaint/widgets/kptoolwidgetbase.cpp b/kolourpaint/widgets/kptoolwidgetbase.cpp
index 0d0a9245..c230c1ee 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.cpp
+++ b/kolourpaint/widgets/kptoolwidgetbase.cpp
@@ -45,8 +45,8 @@
#include <kpeffectinvert.h>
-kpToolWidgetBase::kpToolWidgetBase (TQWidget *parent, const char *name)
- : TQFrame (parent, name),
+kpToolWidgetBase::kpToolWidgetBase (TQWidget *tqparent, const char *name)
+ : TQFrame (tqparent, name),
m_invertSelectedPixmap (true),
m_selectedRow (-1), m_selectedCol (-1)
{
@@ -92,9 +92,9 @@ void kpToolWidgetBase::finishConstruction (int fallBackRow, int fallBackCol)
<< endl;
#endif
- relayoutOptions ();
+ retqlayoutOptions ();
- const QPair <int, int> rowColPair = defaultSelectedRowAndCol ();
+ const TQPair <int, int> rowColPair = defaultSelectedRowAndCol ();
if (!setSelected (rowColPair.first, rowColPair.second, false/*don't save*/))
{
if (!setSelected (fallBackRow, fallBackCol))
@@ -166,7 +166,7 @@ TQValueVector <int> kpToolWidgetBase::spreadOutElements (const TQValueVector <in
// public
-QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
+TQPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
{
int row = -1, col = -1;
@@ -175,10 +175,10 @@ QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools);
KConfigBase *cfg = cfgGroupSaver.config ();
- TQString nameString = TQString::fromLatin1 (name ());
+ TQString nameString = TQString::tqfromLatin1 (name ());
- row = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Row"), -1);
- col = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Col"), -1);
+ row = cfg->readNumEntry (nameString + TQString::tqfromLatin1 (" Row"), -1);
+ col = cfg->readNumEntry (nameString + TQString::tqfromLatin1 (" Col"), -1);
}
#if DEBUG_KP_TOOL_WIDGET_BASE
@@ -188,7 +188,7 @@ QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
<< endl;
#endif
- return qMakePair (row, col);
+ return tqMakePair (row, col);
}
// public
@@ -218,18 +218,18 @@ void kpToolWidgetBase::saveSelectedAsDefault () const
KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools);
KConfigBase *cfg = cfgGroupSaver.config ();
- TQString nameString = TQString::fromLatin1 (name ());
- cfg->writeEntry (nameString + TQString::fromLatin1 (" Row"), m_selectedRow);
- cfg->writeEntry (nameString + TQString::fromLatin1 (" Col"), m_selectedCol);
+ TQString nameString = TQString::tqfromLatin1 (name ());
+ cfg->writeEntry (nameString + TQString::tqfromLatin1 (" Row"), m_selectedRow);
+ cfg->writeEntry (nameString + TQString::tqfromLatin1 (" Col"), m_selectedCol);
cfg->sync ();
}
// public
-void kpToolWidgetBase::relayoutOptions ()
+void kpToolWidgetBase::retqlayoutOptions ()
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kdDebug () << "kpToolWidgetBase::relayoutOptions()" << endl;
+ kdDebug () << "kpToolWidgetBase::retqlayoutOptions()" << endl;
#endif
while (!m_pixmaps.isEmpty () && m_pixmaps.last ().count () == 0)
@@ -536,7 +536,7 @@ bool kpToolWidgetBase::selectNextOption ()
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e)
{
e->ignore ();
@@ -549,7 +549,7 @@ void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e)
{
for (int j = 0; j < (int) m_pixmapRects [i].count (); j++)
{
- if (m_pixmapRects [i][j].contains (e->pos ()))
+ if (m_pixmapRects [i][j].tqcontains (e->pos ()))
{
setSelected (i, j);
e->accept ();
@@ -559,7 +559,7 @@ void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e)
}
}
-// protected virtual [base QFrame]
+// protected virtual [base TQFrame]
void kpToolWidgetBase::drawContents (TQPainter *painter)
{
#if DEBUG_KP_TOOL_WIDGET_BASE && 1
@@ -583,7 +583,7 @@ void kpToolWidgetBase::drawContents (TQPainter *painter)
if (i == m_selectedRow && j == m_selectedCol)
{
- painter->fillRect (rect, Qt::blue/*selection color*/);
+ painter->fillRect (rect, TQt::blue/*selection color*/);
if (m_invertSelectedPixmap)
kpEffectInvertCommand::apply (&pixmap);
diff --git a/kolourpaint/widgets/kptoolwidgetbase.h b/kolourpaint/widgets/kptoolwidgetbase.h
index 1a4c8a6f..033f4946 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.h
+++ b/kolourpaint/widgets/kptoolwidgetbase.h
@@ -40,17 +40,18 @@
class TQPainter;
-// TODO: frame becomes a combobox when its parent kpToolToolBar becomes too small
-class kpToolWidgetBase : public QFrame
+// TODO: frame becomes a combobox when its tqparent kpToolToolBar becomes too small
+class kpToolWidgetBase : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetBase (TQWidget *parent, const char *name); // must provide a name for config to work
+ kpToolWidgetBase (TQWidget *tqparent, const char *name); // must provide a name for config to work
virtual ~kpToolWidgetBase ();
public:
- void addOption (const TQPixmap &pixmap, const TQString &toolTip = TQString::null);
+ void addOption (const TQPixmap &pixmap, const TQString &toolTip = TQString());
void startNewOptionRow ();
// Call this at the end of your constructor.
@@ -63,13 +64,13 @@ private:
public: // (only have to use these if you don't use finishConstruction())
// (rereads from config file)
- QPair <int, int> defaultSelectedRowAndCol () const;
+ TQPair <int, int> defaultSelectedRowAndCol () const;
int defaultSelectedRow () const;
int defaultSelectedCol () const;
void saveSelectedAsDefault () const;
- void relayoutOptions ();
+ void retqlayoutOptions ();
public:
int selectedRow () const;
diff --git a/kolourpaint/widgets/kptoolwidgetbrush.cpp b/kolourpaint/widgets/kptoolwidgetbrush.cpp
index 1e53891e..69445905 100644
--- a/kolourpaint/widgets/kptoolwidgetbrush.cpp
+++ b/kolourpaint/widgets/kptoolwidgetbrush.cpp
@@ -52,14 +52,14 @@ static int brushSize [][3] =
#define BRUSH_SIZE_NUM_COLS (int (sizeof (brushSize [0]) / sizeof (brushSize [0][0])))
#define BRUSH_SIZE_NUM_ROWS (int (sizeof (brushSize) / sizeof (brushSize [0])))
-kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
setInvertSelectedPixmap ();
TQPixmap *pm = m_brushBitmaps;
- for (int shape = 0; shape < BRUSH_SIZE_NUM_ROWS; shape++)
+ for (int tqshape = 0; tqshape < BRUSH_SIZE_NUM_ROWS; tqshape++)
{
for (int i = 0; i < BRUSH_SIZE_NUM_COLS; i++)
{
@@ -68,7 +68,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
pm->resize ((w <= 0 ? width () : w),
(h <= 0 ? height () : h));
- const int s = brushSize [shape][i];
+ const int s = brushSize [tqshape][i];
TQRect rect;
if (s >= pm->width () || s >= pm->height ())
@@ -85,14 +85,14 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
kdDebug () << "kpToolWidgetBrush::kpToolWidgetBrush() rect=" << rect << endl;
#endif
- pm->fill (Qt::white);
+ pm->fill (TQt::white);
TQPainter painter (pm);
- painter.setPen (Qt::black);
- painter.setBrush (Qt::black);
+ painter.setPen (TQt::black);
+ painter.setBrush (TQt::black);
// sync: <brushes>
- switch (shape)
+ switch (tqshape)
{
case 0:
painter.drawEllipse (rect);
@@ -110,7 +110,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
painter.end ();
pm->setMask (pm->createHeuristicMask ());
- addOption (*pm, brushName (shape, i)/*tooltip*/);
+ addOption (*pm, brushName (tqshape, i)/*tooltip*/);
pm++;
}
@@ -127,38 +127,38 @@ kpToolWidgetBrush::~kpToolWidgetBrush ()
// private
-TQString kpToolWidgetBrush::brushName (int shape, int whichSize)
+TQString kpToolWidgetBrush::brushName (int tqshape, int whichSize)
{
- int s = brushSize [shape][whichSize];
+ int s = brushSize [tqshape][whichSize];
if (s == 1)
return i18n ("1x1");
- TQString shapeName;
+ TQString tqshapeName;
// sync: <brushes>
- switch (shape)
+ switch (tqshape)
{
case 0:
- shapeName = i18n ("Circle");
+ tqshapeName = i18n ("Circle");
break;
case 1:
- shapeName = i18n ("Square");
+ tqshapeName = i18n ("Square");
break;
case 2:
- // TODO: is this really the name of a shape? :)
- shapeName = i18n ("Slash");
+ // TODO: is this really the name of a tqshape? :)
+ tqshapeName = i18n ("Slash");
break;
case 3:
- // TODO: is this really the name of a shape? :)
- shapeName = i18n ("Backslash");
+ // TODO: is this really the name of a tqshape? :)
+ tqshapeName = i18n ("Backslash");
break;
}
- if (shapeName.isEmpty ())
- return TQString::null;
+ if (tqshapeName.isEmpty ())
+ return TQString();
- return i18n ("%1x%2 %3").arg (s).arg (s).arg (shapeName);
+ return i18n ("%1x%2 %3").arg (s).arg (s).arg (tqshapeName);
}
TQPixmap kpToolWidgetBrush::brush () const
diff --git a/kolourpaint/widgets/kptoolwidgetbrush.h b/kolourpaint/widgets/kptoolwidgetbrush.h
index 563d9625..7fc2ffe0 100644
--- a/kolourpaint/widgets/kptoolwidgetbrush.h
+++ b/kolourpaint/widgets/kptoolwidgetbrush.h
@@ -36,13 +36,14 @@
class kpToolWidgetBrush : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetBrush (TQWidget *parent, const char *name);
+ kpToolWidgetBrush (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetBrush ();
private:
- TQString brushName (int shape, int whichSize);
+ TQString brushName (int tqshape, int whichSize);
public:
TQPixmap brush () const;
diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.cpp b/kolourpaint/widgets/kptoolwidgeterasersize.cpp
index 9b9ffe8a..effd631f 100644
--- a/kolourpaint/widgets/kptoolwidgeterasersize.cpp
+++ b/kolourpaint/widgets/kptoolwidgeterasersize.cpp
@@ -44,8 +44,8 @@ static int eraserSizes [] = {2, 3, 5, 9, 17, 29};
static const int numEraserSizes = int (sizeof (eraserSizes) / sizeof (eraserSizes [0]));
-kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
setInvertSelectedPixmap ();
@@ -60,29 +60,29 @@ kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *parent, const char *na
int s = eraserSizes [i];
cursorPixmap->resize (s, s);
- cursorPixmap->fill (Qt::black);
+ cursorPixmap->fill (TQt::black);
TQPixmap previewPixmap (s, s);
if (i < 3)
{
- // HACK: kpToolWidgetBase's layout code sucks and gives uneven spacing
+ // HACK: kpToolWidgetBase's tqlayout code sucks and gives uneven spacing
previewPixmap.resize ((width () - 4) / 3, 9);
}
TQPainter painter (&previewPixmap);
TQRect rect ((previewPixmap.width () - s) / 2, (previewPixmap.height () - s) / 2, s, s);
- painter.fillRect (rect, Qt::black);
+ painter.fillRect (rect, TQt::black);
painter.end ();
- TQBitmap mask (previewPixmap.width (), previewPixmap.height ());
- mask.fill (Qt::color0/*transparent*/);
+ TQBitmap tqmask (previewPixmap.width (), previewPixmap.height ());
+ tqmask.fill (TQt::color0/*transparent*/);
- TQPainter maskPainter (&mask);
- maskPainter.fillRect (rect, Qt::color1/*opaque*/);
- maskPainter.end ();
+ TQPainter tqmaskPainter (&tqmask);
+ tqmaskPainter.fillRect (rect, TQt::color1/*opaque*/);
+ tqmaskPainter.end ();
- previewPixmap.setMask (mask);
+ previewPixmap.setMask (tqmask);
addOption (previewPixmap, i18n ("%1x%2").arg (s).arg (s)/*tooltip*/);
@@ -115,7 +115,7 @@ TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
// TODO: why are we even storing m_cursorPixmaps?
TQPixmap pixmap = m_cursorPixmaps [selected ()];
if (color.isOpaque ())
- pixmap.fill (color.toQColor ());
+ pixmap.fill (color.toTQColor ());
bool showBorder = (pixmap.width () > 2 && pixmap.height () > 2);
@@ -123,26 +123,26 @@ TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
if (showBorder)
{
TQPainter painter (&pixmap);
- painter.setPen (Qt::black);
+ painter.setPen (TQt::black);
painter.drawRect (pixmap.rect ());
}
if (color.isTransparent ())
{
- TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
- maskBitmap.fill (Qt::color0/*transparent*/);
+ TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ());
+ tqmaskBitmap.fill (TQt::color0/*transparent*/);
if (showBorder)
{
- TQPainter maskBitmapPainter (&maskBitmap);
- maskBitmapPainter.setPen (Qt::color1/*opaque*/);
- maskBitmapPainter.drawRect (maskBitmap.rect ());
+ TQPainter tqmaskBitmapPainter (&tqmaskBitmap);
+ tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/);
+ tqmaskBitmapPainter.drawRect (tqmaskBitmap.rect ());
}
- pixmap.setMask (maskBitmap);
+ pixmap.setMask (tqmaskBitmap);
}
diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.h b/kolourpaint/widgets/kptoolwidgeterasersize.h
index 09b8c0f8..1568088d 100644
--- a/kolourpaint/widgets/kptoolwidgeterasersize.h
+++ b/kolourpaint/widgets/kptoolwidgeterasersize.h
@@ -38,9 +38,10 @@ class kpColor;
class kpToolWidgetEraserSize : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetEraserSize (TQWidget *parent, const char *name);
+ kpToolWidgetEraserSize (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetEraserSize ();
int eraserSize () const;
diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
index 9b780b3f..c59b730e 100644
--- a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
+++ b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
@@ -42,8 +42,8 @@
#include <kptool.h>
-kpToolWidgetFillStyle::kpToolWidgetFillStyle (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetFillStyle::kpToolWidgetFillStyle (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
setInvertSelectedPixmap ();
@@ -71,34 +71,34 @@ kpToolWidgetFillStyle::~kpToolWidgetFillStyle ()
TQPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h)
{
TQPixmap pixmap ((w <= 0 ? width () : w), (h <= 0 ? height () : h));
- pixmap.fill (Qt::white);
+ pixmap.fill (TQt::white);
TQPainter painter (&pixmap);
- painter.setPen (TQPen (Qt::black, 2));
+ painter.setPen (TQPen (TQt::black, 2));
painter.setBrush (brushForFillStyle (fs,
- kpColor (Qt::black.rgb ())/*foreground*/,
- kpColor (Qt::gray.rgb ())/*background*/));
+ kpColor (TQt::black.rgb ())/*foreground*/,
+ kpColor (TQt::gray.rgb ())/*background*/));
painter.drawRect (2, 2, w - 3, h - 3);
painter.end ();
- TQBitmap mask (pixmap.width (), pixmap.height ());
- mask.fill (Qt::color0);
+ TQBitmap tqmask (pixmap.width (), pixmap.height ());
+ tqmask.fill (TQt::color0);
- painter.begin (&mask);
- painter.setPen (TQPen (Qt::color1, 2));
+ painter.begin (&tqmask);
+ painter.setPen (TQPen (TQt::color1, 2));
if (fs == FillWithBackground || fs == FillWithForeground)
- painter.setBrush (Qt::color1);
+ painter.setBrush (TQt::color1);
painter.drawRect (2, 2, w - 3, h - 3);
painter.end ();
- pixmap.setMask (mask);
+ pixmap.setMask (tqmask);
return pixmap;
}
@@ -121,7 +121,7 @@ TQString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const
return i18n ("Fill with Foreground Color");
break;
default:
- return TQString::null;
+ return TQString();
break;
}
}
@@ -139,7 +139,7 @@ kpToolWidgetFillStyle::FillStyle kpToolWidgetFillStyle::fillStyle () const
}
// public static
-TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
+TQBrush kpToolWidgetFillStyle::tqmaskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
@@ -152,10 +152,10 @@ TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
return Qt::NoBrush;
break;
case FillWithBackground:
- return TQBrush (backgroundColor.maskColor ());
+ return TQBrush (backgroundColor.tqmaskColor ());
break;
case FillWithForeground:
- return TQBrush (foregroundColor.maskColor ());
+ return TQBrush (foregroundColor.tqmaskColor ());
break;
default:
return Qt::NoBrush;
@@ -163,10 +163,10 @@ TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
}
}
-TQBrush kpToolWidgetFillStyle::maskBrush (const kpColor &foregroundColor,
+TQBrush kpToolWidgetFillStyle::tqmaskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
- return maskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
+ return tqmaskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
}
// public static
@@ -186,13 +186,13 @@ TQBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs,
break;
case FillWithBackground:
if (backgroundColor.isOpaque ())
- return TQBrush (backgroundColor.toQColor ());
+ return TQBrush (backgroundColor.toTQColor ());
else
return Qt::NoBrush;
break;
case FillWithForeground:
if (foregroundColor.isOpaque ())
- return TQBrush (foregroundColor.toQColor ());
+ return TQBrush (foregroundColor.toTQColor ());
else
return Qt::NoBrush;
break;
diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.h b/kolourpaint/widgets/kptoolwidgetfillstyle.h
index 86a47270..221d0245 100644
--- a/kolourpaint/widgets/kptoolwidgetfillstyle.h
+++ b/kolourpaint/widgets/kptoolwidgetfillstyle.h
@@ -38,9 +38,10 @@ class kpColor;
class kpToolWidgetFillStyle : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetFillStyle (TQWidget *parent, const char *name);
+ kpToolWidgetFillStyle (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetFillStyle ();
enum FillStyle
@@ -58,10 +59,10 @@ private:
public:
FillStyle fillStyle () const;
- static TQBrush maskBrushForFillStyle (FillStyle fs,
+ static TQBrush tqmaskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor);
- TQBrush maskBrush (const kpColor &foregroundColor,
+ TQBrush tqmaskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor);
static TQBrush brushForFillStyle (FillStyle fs,
diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
index ded51a03..e7804149 100644
--- a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
+++ b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
@@ -36,8 +36,8 @@
static int lineWidths [] = {1, 2, 3, 5, 8};
-kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
setInvertSelectedPixmap ();
@@ -50,24 +50,24 @@ kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *parent, const char *name
{
TQPixmap pixmap ((w <= 0 ? width () : w),
(h <= 0 ? height () : h));
- pixmap.fill (Qt::white);
+ pixmap.fill (TQt::white);
- TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
- maskBitmap.fill (Qt::color0/*transparent*/);
+ TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ());
+ tqmaskBitmap.fill (TQt::color0/*transparent*/);
- TQPainter painter (&pixmap), maskPainter (&maskBitmap);
- painter.setPen (Qt::black), maskPainter.setPen (Qt::color1/*opaque*/);
- painter.setBrush (Qt::black), maskPainter.setBrush (Qt::color1/*opaque*/);
+ TQPainter painter (&pixmap), tqmaskPainter (&tqmaskBitmap);
+ painter.setPen (TQt::black), tqmaskPainter.setPen (TQt::color1/*opaque*/);
+ painter.setBrush (TQt::black), tqmaskPainter.setBrush (TQt::color1/*opaque*/);
TQRect rect = TQRect (0, (pixmap.height () - lineWidths [i]) / 2,
pixmap.width (), lineWidths [i]);
- painter.drawRect (rect), maskPainter.drawRect (rect);
+ painter.drawRect (rect), tqmaskPainter.drawRect (rect);
- painter.end (), maskPainter.end ();
+ painter.end (), tqmaskPainter.end ();
- pixmap.setMask (maskBitmap);
+ pixmap.setMask (tqmaskBitmap);
addOption (pixmap, TQString::number (lineWidths [i]));
startNewOptionRow ();
diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.h b/kolourpaint/widgets/kptoolwidgetlinewidth.h
index 8fa041a0..8ac76909 100644
--- a/kolourpaint/widgets/kptoolwidgetlinewidth.h
+++ b/kolourpaint/widgets/kptoolwidgetlinewidth.h
@@ -34,9 +34,10 @@
class kpToolWidgetLineWidth : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetLineWidth (TQWidget *parent, const char *name);
+ kpToolWidgetLineWidth (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetLineWidth ();
int lineWidth () const;
diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
index 4cd5b6f6..6479d891 100644
--- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
+++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
@@ -35,8 +35,8 @@
#include <klocale.h>
-kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
setInvertSelectedPixmap (false);
diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
index 82ea3f50..45e49a2f 100644
--- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
+++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
@@ -35,9 +35,10 @@
class kpToolWidgetOpaqueOrTransparent : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name);
+ kpToolWidgetOpaqueOrTransparent (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetOpaqueOrTransparent ();
bool isOpaque () const;
diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
index 2f426df5..cce8f1b5 100644
--- a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
+++ b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
@@ -44,8 +44,8 @@
static int spraycanSizes [] = {9, 17, 29};
-kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
kdDebug () << "kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize() CALLED!" << endl;
@@ -54,14 +54,14 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char
for (int i = 0; i < int (sizeof (spraycanSizes) / sizeof (spraycanSizes [0])); i++)
{
int s = spraycanSizes [i];
- TQString iconName = TQString ("tool_spraycan_%1x%1").arg (s).arg(s);
+ TQString iconName = TQString ("tool_spraycan_%1x%1").tqarg (s).tqarg(s);
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
kdDebug () << "\ticonName=" << iconName << endl;
#endif
TQPixmap pixmap (s, s);
- pixmap.fill (Qt::white);
+ pixmap.fill (TQt::white);
TQPainter painter (&pixmap);
painter.drawPixmap (0, 0, UserIcon (iconName));
@@ -69,24 +69,24 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char
TQImage image = kpPixmapFX::convertToImage (pixmap);
- TQBitmap mask (pixmap.width (), pixmap.height ());
- mask.fill (Qt::color0);
+ TQBitmap tqmask (pixmap.width (), pixmap.height ());
+ tqmask.fill (TQt::color0);
- painter.begin (&mask);
- painter.setPen (Qt::color1);
+ painter.begin (&tqmask);
+ painter.setPen (TQt::color1);
for (int y = 0; y < image.height (); y++)
{
for (int x = 0; x < image.width (); x++)
{
- if ((image.pixel (x, y) & RGB_MASK) == 0/*black*/)
+ if ((image.pixel (x, y) & TQRGB_MASK) == 0/*black*/)
painter.drawPoint (x, y); // mark as opaque
}
}
painter.end ();
- pixmap.setMask (mask);
+ pixmap.setMask (tqmask);
addOption (pixmap, i18n ("%1x%2").arg (s).arg (s)/*tooltip*/);
if (i == 1)
diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.h b/kolourpaint/widgets/kptoolwidgetspraycansize.h
index 6cc7d11e..ef86891f 100644
--- a/kolourpaint/widgets/kptoolwidgetspraycansize.h
+++ b/kolourpaint/widgets/kptoolwidgetspraycansize.h
@@ -34,9 +34,10 @@
class kpToolWidgetSpraycanSize : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetSpraycanSize (TQWidget *parent, const char *name);
+ kpToolWidgetSpraycanSize (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetSpraycanSize ();
int spraycanSize () const;