summaryrefslogtreecommitdiffstats
path: root/kolourpaint/tools
diff options
context:
space:
mode:
Diffstat (limited to 'kolourpaint/tools')
-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
52 files changed, 391 insertions, 368 deletions
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);