summaryrefslogtreecommitdiffstats
path: root/kolourpaint
diff options
context:
space:
mode:
Diffstat (limited to 'kolourpaint')
-rw-r--r--kolourpaint/cursors/kpcursorlightcross.cpp24
-rw-r--r--kolourpaint/kpcolor.cpp2
-rw-r--r--kolourpaint/kpcolor.h2
-rw-r--r--kolourpaint/kpdocument.cpp20
-rw-r--r--kolourpaint/kpdocument.h2
-rw-r--r--kolourpaint/kpselection.cpp26
-rw-r--r--kolourpaint/kpselection.h2
-rw-r--r--kolourpaint/kpthumbnail.cpp6
-rw-r--r--kolourpaint/kpview.cpp42
-rw-r--r--kolourpaint/kpview.h4
-rw-r--r--kolourpaint/kpviewmanager.cpp2
-rw-r--r--kolourpaint/kpviewmanager.h2
-rw-r--r--kolourpaint/pixmapfx/kpeffectreducecolors.cpp2
-rw-r--r--kolourpaint/pixmapfx/kpfloodfill.cpp22
-rw-r--r--kolourpaint/pixmapfx/kppixmapfx.cpp54
-rw-r--r--kolourpaint/pixmapfx/kppixmapfx.h2
-rw-r--r--kolourpaint/tools/kptoolairspray.cpp14
-rw-r--r--kolourpaint/tools/kptoolautocrop.cpp22
-rw-r--r--kolourpaint/tools/kptoolclear.cpp2
-rw-r--r--kolourpaint/tools/kptoolcrop.cpp2
-rw-r--r--kolourpaint/tools/kptoolpen.cpp82
-rw-r--r--kolourpaint/tools/kptoolpen.h4
-rw-r--r--kolourpaint/tools/kptoolpolygon.cpp60
-rw-r--r--kolourpaint/tools/kptoolrectangle.cpp78
-rw-r--r--kolourpaint/tools/kptoolrectangle.h12
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.cpp6
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.h2
-rw-r--r--kolourpaint/widgets/kptoolwidgeterasersize.cpp18
-rw-r--r--kolourpaint/widgets/kptoolwidgetfillstyle.cpp10
-rw-r--r--kolourpaint/widgets/kptoolwidgetfillstyle.h4
-rw-r--r--kolourpaint/widgets/kptoolwidgetlinewidth.cpp16
31 files changed, 273 insertions, 273 deletions
diff --git a/kolourpaint/cursors/kpcursorlightcross.cpp b/kolourpaint/cursors/kpcursorlightcross.cpp
index dc52f9bd..34051dbf 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 *tqmaskBitmap,
+ unsigned char *maskBitmap,
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, tqmaskValue;
+ int colorValue, maskValue;
switch (pv)
{
case White:
colorValue = ColorWhite;
- tqmaskValue = MaskOpaque;
+ maskValue = MaskOpaque;
break;
case Black:
colorValue = ColorBlack;
- tqmaskValue = MaskOpaque;
+ maskValue = MaskOpaque;
break;
case Transparent:
default:
colorValue = ColorWhite;
- tqmaskValue = MaskTransparent;
+ maskValue = MaskTransparent;
break;
}
if (colorValue)
colorBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8));
- if (tqmaskValue)
- tqmaskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8));
+ if (maskValue)
+ maskBitmap [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 *tqmaskBitmap = new unsigned char [byteSize];
+ unsigned char *maskBitmap = new unsigned char [byteSize];
memset (colorBitmap, 0, byteSize);
- memset (tqmaskBitmap, 0, byteSize);
+ memset (maskBitmap, 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, tqmaskBitmap, side, (y), (x), pv)
+ #define DRAW(y,x) setPixel (colorBitmap, maskBitmap, 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, tqmaskBitmap, true/*little endian bit order*/));
+ TQBitmap (side, side, maskBitmap, true/*little endian bit order*/));
- delete [] tqmaskBitmap;
+ delete [] maskBitmap;
delete [] colorBitmap;
return cursor;
diff --git a/kolourpaint/kpcolor.cpp b/kolourpaint/kpcolor.cpp
index 2efa3c9e..48eb3e8e 100644
--- a/kolourpaint/kpcolor.cpp
+++ b/kolourpaint/kpcolor.cpp
@@ -354,7 +354,7 @@ const TQColor &kpColor::toTQColor () const
}
// public
-TQColor kpColor::tqmaskColor () const
+TQColor kpColor::maskColor () const
{
return isTransparent () ? TQt::color0 : TQt::color1;
}
diff --git a/kolourpaint/kpcolor.h b/kolourpaint/kpcolor.h
index ece77e57..74f5a910 100644
--- a/kolourpaint/kpcolor.h
+++ b/kolourpaint/kpcolor.h
@@ -87,7 +87,7 @@ public:
// (const TQColor & return results in fewer color reallocations)
const TQColor &toTQColor () const;
- TQColor tqmaskColor () const;
+ TQColor maskColor () const;
private:
bool m_rgbaIsValid;
diff --git a/kolourpaint/kpdocument.cpp b/kolourpaint/kpdocument.cpp
index 2886d077..9b7d5936 100644
--- a/kolourpaint/kpdocument.cpp
+++ b/kolourpaint/kpdocument.cpp
@@ -1235,7 +1235,7 @@ void kpDocument::setSelection (const kpSelection &selection)
}
// public
-TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
+TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const
{
kpSelection *sel = selection ();
@@ -1259,13 +1259,13 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
}
- TQBitmap tqmaskBitmap = tqmaskBitmap_;
- if (tqmaskBitmap.isNull () &&
+ TQBitmap maskBitmap = maskBitmap_;
+ if (maskBitmap.isNull () &&
!sel->isRectangular ())
{
- tqmaskBitmap = sel->tqmaskForOwnType ();
+ maskBitmap = sel->maskForOwnType ();
- if (tqmaskBitmap.isNull ())
+ if (maskBitmap.isNull ())
{
kdError () << "kpDocument::getSelectedPixmap() could not get tqmask" << endl;
return TQPixmap ();
@@ -1275,7 +1275,7 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
TQPixmap selPixmap = getPixmapAt (boundingRect);
- if (!tqmaskBitmap.isNull ())
+ if (!maskBitmap.isNull ())
{
// Src Dest = Result
// -----------------
@@ -1286,8 +1286,8 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
TQBitmap selMaskBitmap = kpPixmapFX::getNonNullMask (selPixmap);
bitBlt (&selMaskBitmap,
TQPoint (0, 0),
- &tqmaskBitmap,
- TQRect (0, 0, tqmaskBitmap.width (), tqmaskBitmap.height ()),
+ &maskBitmap,
+ TQRect (0, 0, maskBitmap.width (), maskBitmap.height ()),
TQt::AndROP);
selPixmap.setMask (selMaskBitmap);
}
@@ -1328,14 +1328,14 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor)
// Figure out tqmask for non-rectangular selections
//
- TQBitmap tqmaskBitmap = sel->tqmaskForOwnType (true/*return null bitmap for rectangular*/);
+ TQBitmap maskBitmap = sel->maskForOwnType (true/*return null bitmap for rectangular*/);
//
// Get selection pixmap from document
//
- TQPixmap selPixmap = getSelectedPixmap (tqmaskBitmap);
+ TQPixmap selPixmap = getSelectedPixmap (maskBitmap);
if (vm)
vm->setQueueUpdates ();
diff --git a/kolourpaint/kpdocument.h b/kolourpaint/kpdocument.h
index bc11990b..67ce32f3 100644
--- a/kolourpaint/kpdocument.h
+++ b/kolourpaint/kpdocument.h
@@ -189,7 +189,7 @@ public:
void setSelection (const kpSelection &selection);
// TODO: this always returns opaque pixmap - need transparent ver
- TQPixmap getSelectedPixmap (const TQBitmap &tqmaskBitmap = TQBitmap ()) const;
+ TQPixmap getSelectedPixmap (const TQBitmap &maskBitmap = TQBitmap ()) const;
bool selectionPullFromDocument (const kpColor &backgroundColor);
bool selectionDelete ();
diff --git a/kolourpaint/kpselection.cpp b/kolourpaint/kpselection.cpp
index 8947f8d0..97865852 100644
--- a/kolourpaint/kpselection.cpp
+++ b/kolourpaint/kpselection.cpp
@@ -337,11 +337,11 @@ int kpSelection::size () const
// public
-TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const
+TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const
{
if (!m_rect.isValid ())
{
- kdError () << "kpSelection::tqmaskForOwnType() boundingRect invalid" << endl;
+ kdError () << "kpSelection::maskForOwnType() boundingRect invalid" << endl;
return TQBitmap ();
}
@@ -351,17 +351,17 @@ TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const
if (nullForRectangular)
return TQBitmap ();
- 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 (TQt::color1/*opaque*/);
+ return maskBitmap;
}
- TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ());
- tqmaskBitmap.fill (TQt::color0/*transparent*/);
+ TQBitmap maskBitmap (m_rect.width (), m_rect.height ());
+ maskBitmap.fill (TQt::color0/*transparent*/);
TQPainter painter;
- painter.begin (&tqmaskBitmap);
+ painter.begin (&maskBitmap);
painter.setPen (TQt::color1)/*opaque*/;
painter.setBrush (TQt::color1/*opaque*/);
@@ -379,7 +379,7 @@ TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const
painter.end ();
- return tqmaskBitmap;
+ return maskBitmap;
}
@@ -615,11 +615,11 @@ static TQRgb mostContrastingRGB (TQRgb val)
}
// private
-static void drawTextLines (TQPainter *painter, TQPainter *tqmaskPainter,
+static void drawTextLines (TQPainter *painter, TQPainter *maskPainter,
const TQRect &rect,
const TQValueVector <TQString> &textLines)
{
- if (!painter->clipRegion ().isEmpty () || !tqmaskPainter->clipRegion ().isEmpty ())
+ if (!painter->clipRegion ().isEmpty () || !maskPainter->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 *tqmaskPainter,
if (painter->isActive ()) \
painter->cmd; \
\
- if (tqmaskPainter->isActive ()) \
- tqmaskPainter->cmd; \
+ if (maskPainter->isActive ()) \
+ maskPainter->cmd; \
}
diff --git a/kolourpaint/kpselection.h b/kolourpaint/kpselection.h
index e7e54d54..fc309771 100644
--- a/kolourpaint/kpselection.h
+++ b/kolourpaint/kpselection.h
@@ -103,7 +103,7 @@ public:
int size () const;
- TQBitmap tqmaskForOwnType (bool nullForRectangular = false) const;
+ TQBitmap maskForOwnType (bool nullForRectangular = false) const;
// synonyms
TQPoint topLeft () const;
diff --git a/kolourpaint/kpthumbnail.cpp b/kolourpaint/kpthumbnail.cpp
index 08a2331e..58b0b48f 100644
--- a/kolourpaint/kpthumbnail.cpp
+++ b/kolourpaint/kpthumbnail.cpp
@@ -63,7 +63,7 @@ kpThumbnail::kpThumbnail (kpMainWindow *tqparent, const char *name)
}
- TQSize tqlayoutMinimumSize = tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ();
+ TQSize layoutMinimumSize = tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ();
#if DEBUG_KP_THUMBNAIL
kdDebug () << "\ttqlayout=" << tqlayout ()
<< " minSize=" << (tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ()) << endl;
@@ -73,8 +73,8 @@ kpThumbnail::kpThumbnail (kpMainWindow *tqparent, const char *name)
#endif
if (tqlayout ())
tqlayout ()->setResizeMode (TQLayout::FreeResize);
- setMinimumSize (TQMAX (tqlayoutMinimumSize.width (), 64),
- TQMAX (tqlayoutMinimumSize.height (), 64));
+ setMinimumSize (TQMAX (layoutMinimumSize.width (), 64),
+ TQMAX (layoutMinimumSize.height (), 64));
// Enable "X" Close Button
diff --git a/kolourpaint/kpview.cpp b/kolourpaint/kpview.cpp
index 3f64bbb9..341a6790 100644
--- a/kolourpaint/kpview.cpp
+++ b/kolourpaint/kpview.cpp
@@ -590,10 +590,10 @@ void kpView::addToQueuedArea (const TQRect &rect)
}
// public
-void kpView::tqinvalidateQueuedArea ()
+void kpView::invalidateQueuedArea ()
{
#if DEBUG_KP_VIEW && 0
- kdDebug () << "kpView::tqinvalidateQueuedArea()" << endl;
+ kdDebug () << "kpView::invalidateQueuedArea()" << endl;
#endif
d->m_queuedUpdateArea = TQRegion ();
@@ -621,7 +621,7 @@ void kpView::updateQueuedArea ()
if (!d->m_queuedUpdateArea.isNull ())
vm->updateView (this, d->m_queuedUpdateArea);
- tqinvalidateQueuedArea ();
+ invalidateQueuedArea ();
}
// public
@@ -1346,21 +1346,21 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
destPixmapPainter.setBackgroundMode (Qt::OpaqueMode);
destPixmapPainter.setBackgroundColor (TQt::blue);
- TQBitmap tqmaskBitmap;
- TQPainter tqmaskBitmapPainter;
+ TQBitmap maskBitmap;
+ TQPainter maskBitmapPainter;
if (destPixmap->tqmask ())
{
- tqmaskBitmap = *destPixmap->tqmask ();
- tqmaskBitmapPainter.begin (&tqmaskBitmap);
- tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/);
+ maskBitmap = *destPixmap->tqmask ();
+ maskBitmapPainter.begin (&maskBitmap);
+ maskBitmapPainter.setPen (TQt::color1/*opaque*/);
}
#define PAINTER_CMD(cmd) \
{ \
destPixmapPainter . cmd; \
- if (tqmaskBitmapPainter.isActive ()) \
- tqmaskBitmapPainter . cmd; \
+ if (maskBitmapPainter.isActive ()) \
+ maskBitmapPainter . cmd; \
}
TQRect boundingRect = sel->boundingRect ();
@@ -1450,10 +1450,10 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
#undef PAINTER_CMD
destPixmapPainter.end ();
- if (tqmaskBitmapPainter.isActive ())
- tqmaskBitmapPainter.end ();
+ if (maskBitmapPainter.isActive ())
+ maskBitmapPainter.end ();
- destPixmap->setMask (tqmaskBitmap);
+ destPixmap->setMask (maskBitmap);
}
@@ -1480,15 +1480,15 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
{
rect.moveBy (-docRect.x (), -docRect.y ());
- TQBitmap tqmaskBitmap;
- TQPainter destPixmapPainter, tqmaskBitmapPainter;
+ TQBitmap maskBitmap;
+ TQPainter destPixmapPainter, maskBitmapPainter;
if (destPixmap->tqmask ())
{
- tqmaskBitmap = *destPixmap->tqmask ();
- tqmaskBitmapPainter.begin (&tqmaskBitmap);
- tqmaskBitmapPainter.fillRect (rect, TQt::color1/*opaque*/);
- tqmaskBitmapPainter.end ();
+ maskBitmap = *destPixmap->tqmask ();
+ maskBitmapPainter.begin (&maskBitmap);
+ maskBitmapPainter.fillRect (rect, TQt::color1/*opaque*/);
+ maskBitmapPainter.end ();
}
destPixmapPainter.begin (destPixmap);
@@ -1496,8 +1496,8 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
destPixmapPainter.fillRect (rect, TQt::white);
destPixmapPainter.end ();
- if (!tqmaskBitmap.isNull ())
- destPixmap->setMask (tqmaskBitmap);
+ if (!maskBitmap.isNull ())
+ destPixmap->setMask (maskBitmap);
}
}
}
diff --git a/kolourpaint/kpview.h b/kolourpaint/kpview.h
index 44674123..613cafd2 100644
--- a/kolourpaint/kpview.h
+++ b/kolourpaint/kpview.h
@@ -366,11 +366,11 @@ public:
* Removes the dirty region that has been queued for updating.
* Does not update the view.
*/
- void tqinvalidateQueuedArea ();
+ void invalidateQueuedArea ();
/**
* Updates the part of the view described by dirty region and then
- * calls tqinvalidateQueuedArea(). Does nothing if @ref kpViewManager
+ * calls invalidateQueuedArea(). Does nothing if @ref kpViewManager
* is set to queue updates.
*/
void updateQueuedArea ();
diff --git a/kolourpaint/kpviewmanager.cpp b/kolourpaint/kpviewmanager.cpp
index e7a095fd..3a3bcdad 100644
--- a/kolourpaint/kpviewmanager.cpp
+++ b/kolourpaint/kpviewmanager.cpp
@@ -152,7 +152,7 @@ void kpViewManager::setTempPixmap (const kpTempPixmap &tempPixmap)
}
// public
-void kpViewManager::tqinvalidateTempPixmap ()
+void kpViewManager::invalidateTempPixmap ()
{
if (!m_tempPixmap)
return;
diff --git a/kolourpaint/kpviewmanager.h b/kolourpaint/kpviewmanager.h
index be3e3065..6e48be3d 100644
--- a/kolourpaint/kpviewmanager.h
+++ b/kolourpaint/kpviewmanager.h
@@ -69,7 +69,7 @@ public:
const kpTempPixmap *tempPixmap () const;
void setTempPixmap (const kpTempPixmap &tempPixmap);
- void tqinvalidateTempPixmap ();
+ void invalidateTempPixmap ();
//
diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
index 80fadd8d..c89685da 100644
--- a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
+++ b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
@@ -240,7 +240,7 @@ 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 tqmasks on monochrome images are ignored."
+ // tqpixmap.html says "alpha masks on monochrome images are ignored."
//
// Put the tqmask back.
//
diff --git a/kolourpaint/pixmapfx/kpfloodfill.cpp b/kolourpaint/pixmapfx/kpfloodfill.cpp
index 76731d23..eaf100ab 100644
--- a/kolourpaint/pixmapfx/kpfloodfill.cpp
+++ b/kolourpaint/pixmapfx/kpfloodfill.cpp
@@ -97,14 +97,14 @@ bool kpFloodFill::fill ()
{
TQApplication::setOverrideCursor (TQt::waitCursor);
- TQPainter painter, tqmaskPainter;
- TQBitmap tqmaskBitmap;
+ TQPainter painter, maskPainter;
+ TQBitmap maskBitmap;
if (m_pixmapPtr->tqmask () || m_color.isTransparent ())
{
- tqmaskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr);
- tqmaskPainter.begin (&tqmaskBitmap);
- tqmaskPainter.setPen (m_color.tqmaskColor ());
+ maskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr);
+ maskPainter.begin (&maskBitmap);
+ maskPainter.setPen (m_color.maskColor ());
}
if (m_color.isOpaque ())
@@ -124,18 +124,18 @@ bool kpFloodFill::fill ()
if (painter.isActive ())
painter.drawLine (p1, p2);
- if (tqmaskPainter.isActive ())
- tqmaskPainter.drawLine (p1, p2);
+ if (maskPainter.isActive ())
+ maskPainter.drawLine (p1, p2);
}
if (painter.isActive ())
painter.end ();
- if (tqmaskPainter.isActive ())
- tqmaskPainter.end ();
+ if (maskPainter.isActive ())
+ maskPainter.end ();
- if (!tqmaskBitmap.isNull ())
- m_pixmapPtr->setMask (tqmaskBitmap);
+ if (!maskBitmap.isNull ())
+ m_pixmapPtr->setMask (maskBitmap);
TQApplication::restoreOverrideCursor ();
}
diff --git a/kolourpaint/pixmapfx/kppixmapfx.cpp b/kolourpaint/pixmapfx/kppixmapfx.cpp
index 1837a22e..e46f91cb 100644
--- a/kolourpaint/pixmapfx/kppixmapfx.cpp
+++ b/kolourpaint/pixmapfx/kppixmapfx.cpp
@@ -772,7 +772,7 @@ void kpPixmapFX::paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
if (!destPixmapPtr)
return;
- // Copy src (tqmasked by src's tqmask) on top of dest.
+ // Copy src (masked by src's tqmask) on top of dest.
bitBlt (destPixmapPtr, /* dest */
destAt.x (), destAt.y (), /* dest pt */
&srcPixmap, /* src */
@@ -856,10 +856,10 @@ TQBitmap kpPixmapFX::getNonNullMask (const TQPixmap &pm)
return *pm.tqmask ();
else
{
- TQBitmap tqmaskBitmap (pm.width (), pm.height ());
- tqmaskBitmap.fill (TQt::color1/*opaque*/);
+ TQBitmap maskBitmap (pm.width (), pm.height ());
+ maskBitmap.fill (TQt::color1/*opaque*/);
- return tqmaskBitmap;
+ return maskBitmap;
}
}
@@ -870,9 +870,9 @@ void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &des
if (!destPixmapPtr)
return;
- TQBitmap tqmaskBitmap = getNonNullMask (*destPixmapPtr);
+ TQBitmap maskBitmap = getNonNullMask (*destPixmapPtr);
- TQPainter p (&tqmaskBitmap);
+ TQPainter p (&maskBitmap);
p.setPen (TQt::color0/*transparent*/);
p.setBrush (TQt::color0/*transparent*/);
@@ -881,7 +881,7 @@ void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &des
p.end ();
- destPixmapPtr->setMask (tqmaskBitmap);
+ destPixmapPtr->setMask (maskBitmap);
}
@@ -937,9 +937,9 @@ void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect
if (!destPixmapPtr || !destPixmapPtr->tqmask ()/*already opaque*/)
return;
- TQBitmap tqmaskBitmap = *destPixmapPtr->tqmask ();
+ TQBitmap maskBitmap = *destPixmapPtr->tqmask ();
- TQPainter p (&tqmaskBitmap);
+ TQPainter p (&maskBitmap);
p.setPen (TQt::color1/*opaque*/);
p.setBrush (TQt::color1/*opaque*/);
@@ -948,7 +948,7 @@ void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect
p.end ();
- destPixmapPtr->setMask (tqmaskBitmap);
+ destPixmapPtr->setMask (maskBitmap);
}
// public static
@@ -1107,8 +1107,8 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tfilling in new areas" << endl;
#endif
- TQBitmap tqmaskBitmap;
- TQPainter painter, tqmaskPainter;
+ TQBitmap maskBitmap;
+ TQPainter painter, maskPainter;
if (backgroundColor.isOpaque ())
{
@@ -1119,10 +1119,10 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
if (backgroundColor.isTransparent () || destPixmapPtr->tqmask ())
{
- tqmaskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
- tqmaskPainter.begin (&tqmaskBitmap);
- tqmaskPainter.setPen (backgroundColor.tqmaskColor ());
- tqmaskPainter.setBrush (backgroundColor.tqmaskColor ());
+ maskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
+ maskPainter.begin (&maskBitmap);
+ maskPainter.setPen (backgroundColor.maskColor ());
+ maskPainter.setBrush (backgroundColor.maskColor ());
}
#define PAINTER_CALL(cmd) \
@@ -1130,8 +1130,8 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
if (painter.isActive ()) \
painter . cmd ; \
\
- if (tqmaskPainter.isActive ()) \
- tqmaskPainter . cmd ; \
+ if (maskPainter.isActive ()) \
+ maskPainter . 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 (tqmaskPainter.isActive ())
- tqmaskPainter.end ();
+ if (maskPainter.isActive ())
+ maskPainter.end ();
if (painter.isActive ())
painter.end ();
- if (!tqmaskBitmap.isNull ())
- destPixmapPtr->setMask (tqmaskBitmap);
+ if (!maskBitmap.isNull ())
+ destPixmapPtr->setMask (maskBitmap);
}
}
@@ -1378,7 +1378,7 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,
if (backgroundColor.isTransparent () || pm.tqmask ())
{
newBitmapMask.resize (newPixmap.width (), newPixmap.height ());
- newBitmapMask.fill (backgroundColor.tqmaskColor ());
+ newBitmapMask.fill (backgroundColor.maskColor ());
}
TQPainter painter (&newPixmap);
@@ -1416,10 +1416,10 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,
if (!newBitmapMask.isNull ())
{
- TQPainter tqmaskPainter (&newBitmapMask);
- tqmaskPainter.setWorldMatrix (transformMatrix);
- tqmaskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
- tqmaskPainter.end ();
+ TQPainter maskPainter (&newBitmapMask);
+ maskPainter.setWorldMatrix (transformMatrix);
+ maskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
+ maskPainter.end ();
newPixmap.setMask (newBitmapMask);
}
diff --git a/kolourpaint/pixmapfx/kppixmapfx.h b/kolourpaint/pixmapfx/kppixmapfx.h
index 738d82fa..72882839 100644
--- a/kolourpaint/pixmapfx/kppixmapfx.h
+++ b/kolourpaint/pixmapfx/kppixmapfx.h
@@ -294,7 +294,7 @@ public:
//
// Removes <*destPixmapPtr>'s Alpha Channel and attempts to convert it
// to a tqmask. KolourPaint - and TQPixmap to a great extent - does not
- // support Alpha Channels - only tqmasks. Call this whenever you get
+ // support Alpha Channels - only masks. Call this whenever you get
// a pixmap from a foreign source; else all KolourPaint code will
// exhibit "undefined behaviour".
//
diff --git a/kolourpaint/tools/kptoolairspray.cpp b/kolourpaint/tools/kptoolairspray.cpp
index 022c534d..f8aabce1 100644
--- a/kolourpaint/tools/kptoolairspray.cpp
+++ b/kolourpaint/tools/kptoolairspray.cpp
@@ -314,7 +314,7 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
TQPixmap pixmap = document ()->getPixmapAt (docRect);
TQBitmap tqmask;
- TQPainter painter, tqmaskPainter;
+ TQPainter painter, maskPainter;
if (m_color.isOpaque ())
{
@@ -325,8 +325,8 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
if (pixmap.tqmask () || m_color.isTransparent ())
{
tqmask = kpPixmapFX::getNonNullMask (pixmap);
- tqmaskPainter.begin (&tqmask);
- tqmaskPainter.setPen (m_color.tqmaskColor ());
+ maskPainter.begin (&tqmask);
+ maskPainter.setPen (m_color.maskColor ());
}
for (int i = 0; i < (int) points.count (); i++)
@@ -337,12 +337,12 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
if (painter.isActive ())
painter.drawPoint (pt);
- if (tqmaskPainter.isActive ())
- tqmaskPainter.drawPoint (pt);
+ if (maskPainter.isActive ())
+ maskPainter.drawPoint (pt);
}
- if (tqmaskPainter.isActive ())
- tqmaskPainter.end ();
+ if (maskPainter.isActive ())
+ maskPainter.end ();
if (painter.isActive ())
painter.end ();
diff --git a/kolourpaint/tools/kptoolautocrop.cpp b/kolourpaint/tools/kptoolautocrop.cpp
index 0d103af7..d8c8100f 100644
--- a/kolourpaint/tools/kptoolautocrop.cpp
+++ b/kolourpaint/tools/kptoolautocrop.cpp
@@ -654,7 +654,7 @@ void kpToolAutoCropCommand::unexecute ()
return;
TQPixmap pixmap (m_oldWidth, m_oldHeight);
- TQBitmap tqmaskBitmap;
+ TQBitmap maskBitmap;
// 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 tqmaskPainter;
+ TQPainter maskPainter;
const kpToolAutoCropBorder *borders [] =
{
@@ -699,14 +699,14 @@ void kpToolAutoCropCommand::unexecute ()
}
else
{
- if (tqmaskBitmap.isNull ())
+ if (maskBitmap.isNull ())
{
// TODO: dangerous when a painter is active on pixmap?
- tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
- tqmaskPainter.begin (&tqmaskBitmap);
+ maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
+ maskPainter.begin (&maskBitmap);
}
- tqmaskPainter.fillRect ((*b)->rect (), TQt::color0/*transparent*/);
+ maskPainter.fillRect ((*b)->rect (), TQt::color0/*transparent*/);
}
}
else
@@ -721,7 +721,7 @@ void kpToolAutoCropCommand::unexecute ()
if (*p)
{
// TODO: We should really edit the tqmask here. Due to good
- // luck (if "tqmaskBitmap" is initialized above, this region
+ // luck (if "maskBitmap" 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 tqmask but this is
@@ -731,13 +731,13 @@ void kpToolAutoCropCommand::unexecute ()
}
}
- if (tqmaskPainter.isActive ())
- tqmaskPainter.end ();
+ if (maskPainter.isActive ())
+ maskPainter.end ();
painter.end ();
- if (!tqmaskBitmap.isNull ())
- pixmap.setMask (tqmaskBitmap);
+ if (!maskBitmap.isNull ())
+ pixmap.setMask (maskBitmap);
if (!m_actOnSelection)
diff --git a/kolourpaint/tools/kptoolclear.cpp b/kolourpaint/tools/kptoolclear.cpp
index b6fa2eab..7b1a775b 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->tqmaskForOwnType ());
+ newPixmap.setMask (sel->maskForOwnType ());
sel->setPixmap (newPixmap);
}
diff --git a/kolourpaint/tools/kptoolcrop.cpp b/kolourpaint/tools/kptoolcrop.cpp
index e5483a90..e3916121 100644
--- a/kolourpaint/tools/kptoolcrop.cpp
+++ b/kolourpaint/tools/kptoolcrop.cpp
@@ -167,7 +167,7 @@ void kpToolCropSetImageCommand::execute ()
kpPixmapFX::paintMaskTransparentWithBrush (&newDocPixmap,
TQPoint (0, 0),
- m_fromSelection.tqmaskForOwnType ());
+ m_fromSelection.maskForOwnType ());
kpPixmapFX::paintPixmapAt (&newDocPixmap,
TQPoint (0, 0),
diff --git a/kolourpaint/tools/kptoolpen.cpp b/kolourpaint/tools/kptoolpen.cpp
index 5c7ff6ea..57e19527 100644
--- a/kolourpaint/tools/kptoolpen.cpp
+++ b/kolourpaint/tools/kptoolpen.cpp
@@ -179,7 +179,7 @@ void kpToolPen::end ()
if (vm)
{
if (vm->tempPixmap () && vm->tempPixmap ()->isBrush ())
- vm->tqinvalidateTempPixmap ();
+ vm->invalidateTempPixmap ();
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 ()->tqinvalidateTempPixmap ();
+ viewManager ()->invalidateTempPixmap ();
setUserMessage (cancelUserMessage ());
}
@@ -282,15 +282,15 @@ void kpToolPen::hover (const TQPoint &point)
setUserShapePoints (point);
}
-bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter,
+bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, int plotx, int ploty)
{
- return wash (painter, tqmaskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty));
+ return wash (painter, maskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty));
}
-bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter,
+bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, const TQRect &drawRect)
@@ -308,8 +308,8 @@ bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter,
{ \
if (painter && painter->isActive ()) \
painter->drawLine (startDrawX, y, x - 1, y); \
- if (tqmaskPainter && tqmaskPainter->isActive ()) \
- tqmaskPainter->drawLine (startDrawX, y, x - 1, y); \
+ if (maskPainter && maskPainter->isActive ()) \
+ maskPainter->drawLine (startDrawX, y, x - 1, y); \
didSomething = true; \
startDrawX = -1; \
}
@@ -388,8 +388,8 @@ void kpToolPen::globalDraw ()
kpToolPenCommand *cmd = new kpToolPenCommand (
i18n ("Color Eraser"), mainWindow ());
- TQPainter painter, tqmaskPainter;
- TQBitmap tqmaskBitmap;
+ TQPainter painter, maskPainter;
+ TQBitmap maskBitmap;
if (backgroundColor ().isOpaque ())
{
@@ -400,16 +400,16 @@ void kpToolPen::globalDraw ()
if (backgroundColor ().isTransparent () ||
document ()->pixmap ()->tqmask ())
{
- tqmaskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ());
- tqmaskPainter.begin (&tqmaskBitmap);
+ maskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ());
+ maskPainter.begin (&maskBitmap);
- tqmaskPainter.setPen (backgroundColor ().tqmaskColor ());
+ maskPainter.setPen (backgroundColor ().maskColor ());
}
const TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ());
TQRect rect = document ()->rect ();
- const bool didSomething = wash (&painter, &tqmaskPainter, image,
+ const bool didSomething = wash (&painter, &maskPainter, image,
foregroundColor ()/*replace foreground*/,
rect, rect);
@@ -417,13 +417,13 @@ void kpToolPen::globalDraw ()
if (painter.isActive ())
painter.end ();
- if (tqmaskPainter.isActive ())
- tqmaskPainter.end ();
+ if (maskPainter.isActive ())
+ maskPainter.end ();
if (didSomething)
{
- if (!tqmaskBitmap.isNull ())
- document ()->pixmap ()->setMask (tqmaskBitmap);
+ if (!maskBitmap.isNull ())
+ document ()->pixmap ()->setMask (maskBitmap);
document ()->slotContentsChanged (rect);
@@ -519,8 +519,8 @@ 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, tqmaskPainter;
- TQBitmap tqmaskBitmap;
+ TQPainter painter, maskPainter;
+ TQBitmap maskBitmap;
if (color (m_mouseButton).isOpaque ())
{
@@ -531,12 +531,12 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (color (m_mouseButton).isTransparent () ||
pixmap.tqmask ())
{
- tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
- tqmaskPainter.begin (&tqmaskBitmap);
- tqmaskPainter.setPen (color (m_mouseButton).tqmaskColor ());
+ maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
+ maskPainter.begin (&maskBitmap);
+ maskPainter.setPen (color (m_mouseButton).maskColor ());
}
- bool didSomething = wash (&painter, &tqmaskPainter,
+ bool didSomething = wash (&painter, &maskPainter,
image,
color (1 - m_mouseButton)/*color to tqreplace*/,
rect, rect);
@@ -544,13 +544,13 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (painter.isActive ())
painter.end ();
- if (tqmaskPainter.isActive ())
- tqmaskPainter.end ();
+ if (maskPainter.isActive ())
+ maskPainter.end ();
if (didSomething)
{
- if (!tqmaskBitmap.isNull ())
- pixmap.setMask (tqmaskBitmap);
+ if (!maskBitmap.isNull ())
+ pixmap.setMask (maskBitmap);
#if DEBUG_KP_TOOL_PEN
kdDebug () << "\twashed: " << timer.restart () << "ms" << endl;
@@ -594,9 +594,9 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
bool transparent = c.isTransparent ();
TQPixmap pixmap = document ()->getPixmapAt (rect);
- TQBitmap tqmaskBitmap;
+ TQBitmap maskBitmap;
- TQPainter painter, tqmaskPainter;
+ TQPainter painter, maskPainter;
if (m_mode & (DrawsPixels | WashesPixmaps))
{
@@ -608,9 +608,9 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (transparent || pixmap.tqmask ())
{
- tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
- tqmaskPainter.begin (&tqmaskBitmap);
- tqmaskPainter.setPen (c.tqmaskColor ());
+ maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
+ maskPainter.begin (&maskBitmap);
+ maskPainter.setPen (c.maskColor ());
}
}
@@ -635,8 +635,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (painter.isActive ())
painter.drawLine (sp, ep);
- if (tqmaskPainter.isActive ())
- tqmaskPainter.drawLine (sp, ep);
+ if (maskPainter.isActive ())
+ maskPainter.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, &tqmaskPainter, image,
+ if (wash (&painter, &maskPainter, 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, &tqmaskPainter, image,
+ if (wash (&painter, &maskPainter, 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, &tqmaskPainter, image,
+ if (wash (&painter, &maskPainter, 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 (tqmaskPainter.isActive ())
- tqmaskPainter.end ();
+ if (maskPainter.isActive ())
+ maskPainter.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 (!tqmaskBitmap.isNull ())
- pixmap.setMask (tqmaskBitmap);
+ if (!maskBitmap.isNull ())
+ pixmap.setMask (maskBitmap);
// draw onto doc
document ()->setPixmapAt (pixmap, rect.topLeft ());
diff --git a/kolourpaint/tools/kptoolpen.h b/kolourpaint/tools/kptoolpen.h
index 77d7c33c..acee1265 100644
--- a/kolourpaint/tools/kptoolpen.h
+++ b/kolourpaint/tools/kptoolpen.h
@@ -103,11 +103,11 @@ private slots:
void slotEraserSizeChanged (int size);
private:
- bool wash (TQPainter *painter, TQPainter *tqmaskPainter,
+ bool wash (TQPainter *painter, TQPainter *maskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, int plotx, int ploty);
- bool wash (TQPainter *painter, TQPainter *tqmaskPainter,
+ bool wash (TQPainter *painter, TQPainter *maskPainter,
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 0e298759..5a074bb6 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.tqmaskColor (),
+ return TQPen (color.maskColor (),
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->tqmaskBrush (foregroundColor, backgroundColor);
+ return toolWidgetFillStyle->maskBrush (foregroundColor, backgroundColor);
else
return Qt::NoBrush;
}
@@ -155,33 +155,33 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
// draw
TQPen pen = makePen (foregroundColor, lineWidth, lineStyle),
- tqmaskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle);
+ maskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle);
TQBrush brush = makeBrush (foregroundColor, backgroundColor, toolWidgetFillStyle),
- tqmaskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle);
+ maskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle);
TQPixmap pixmap = oldPixmap;
- TQBitmap tqmaskBitmap;
+ TQBitmap maskBitmap;
- TQPainter painter, tqmaskPainter;
+ TQPainter painter, maskPainter;
if (pixmap.tqmask () ||
- (tqmaskPen.style () != TQt::NoPen &&
- tqmaskPen.color () == TQt::color0/*transparent*/) ||
- (tqmaskBrush.style () != TQt::NoBrush &&
- tqmaskBrush.color () == TQt::color0/*transparent*/))
+ (maskPen.style () != TQt::NoPen &&
+ maskPen.color () == TQt::color0/*transparent*/) ||
+ (maskBrush.style () != TQt::NoBrush &&
+ maskBrush.color () == TQt::color0/*transparent*/))
{
- tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
- tqmaskPainter.begin (&tqmaskBitmap);
- tqmaskPainter.setPen (tqmaskPen);
- tqmaskPainter.setBrush (tqmaskBrush);
+ maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
+ maskPainter.begin (&maskBitmap);
+ maskPainter.setPen (maskPen);
+ maskPainter.setBrush (maskBrush);
#if DEBUG_KP_TOOL_POLYGON && 0
- kdDebug () << "\ttqmaskPainter begin because:" << endl
+ kdDebug () << "\tmaskPainter 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;
+ << "\t\t(maskPenStyle!=NoPen)=" << (maskPen.style () != TQt::NoPen) << endl
+ << "\t\t(maskPenColor==trans)=" << (maskPen.color () == TQt::color0) << endl
+ << "\t\t(maskBrushStyle!=NoBrush)=" << (maskBrush.style () != TQt::NoBrush) << endl
+ << "\t\t(maskBrushColor==trans)=" << (maskBrush.color () == TQt::color0) << endl;
#endif
}
@@ -204,8 +204,8 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
if (painter.isActive ()) \
painter . cmd ; \
\
- if (tqmaskPainter.isActive ()) \
- tqmaskPainter . cmd ; \
+ if (maskPainter.isActive ()) \
+ maskPainter . cmd ; \
}
// SYNC: TQt bug
@@ -240,9 +240,9 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
painter.setRasterOp (TQt::XorROP);
}
- if (tqmaskPainter.isActive ())
+ if (maskPainter.isActive ())
{
- TQPen XORpen = tqmaskPainter.pen ();
+ TQPen XORpen = maskPainter.pen ();
// TODO???
#if 0
@@ -252,7 +252,7 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
XORpen.setColor (TQt::color0/*transparent*/);
#endif
- tqmaskPainter.setPen (XORpen);
+ maskPainter.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 (tqmaskPainter.isActive ())
- tqmaskPainter.end ();
+ if (maskPainter.isActive ())
+ maskPainter.end ();
- if (!tqmaskBitmap.isNull ())
- pixmap.setMask (tqmaskBitmap);
+ if (!maskBitmap.isNull ())
+ pixmap.setMask (maskBitmap);
return pixmap;
}
@@ -671,7 +671,7 @@ void kpToolPolygon::cancelShape ()
endDraw (TQPoint (), TQRect ());
commandHistory ()->undo ();
#else
- viewManager ()->tqinvalidateTempPixmap ();
+ viewManager ()->invalidateTempPixmap ();
#endif
m_points.resize (0);
@@ -781,7 +781,7 @@ void kpToolPolygon::endShape (const TQPoint &, const TQRect &)
if (!hasBegunShape ())
return;
- viewManager ()->tqinvalidateTempPixmap ();
+ viewManager ()->invalidateTempPixmap ();
TQRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth);
diff --git a/kolourpaint/tools/kptoolrectangle.cpp b/kolourpaint/tools/kptoolrectangle.cpp
index ea749da6..491e0fae 100644
--- a/kolourpaint/tools/kptoolrectangle.cpp
+++ b/kolourpaint/tools/kptoolrectangle.cpp
@@ -53,39 +53,39 @@
static TQPixmap pixmap (const kpToolRectangle::Mode mode,
kpDocument *document, const TQRect &rect,
const TQPoint &startPoint, const TQPoint &endPoint,
- const TQPen &pen, const TQPen &tqmaskPen,
- const TQBrush &brush, const TQBrush &tqmaskBrush)
+ const TQPen &pen, const TQPen &maskPen,
+ const TQBrush &brush, const TQBrush &maskBrush)
{
TQPixmap pixmap = document->getPixmapAt (rect);
- TQBitmap tqmaskBitmap;
+ TQBitmap maskBitmap;
- TQPainter painter, tqmaskPainter;
+ TQPainter painter, maskPainter;
#if DEBUG_KP_TOOL_RECTANGLE && 1
kdDebug () << "pixmap: rect=" << rect
<< " startPoint=" << startPoint
<< " endPoint=" << endPoint
<< endl;
- kdDebug () << "\tm: p=" << (tqmaskPen.style () != TQt::NoPen)
- << " b=" << (tqmaskBrush.style () != TQt::NoBrush)
+ kdDebug () << "\tm: p=" << (maskPen.style () != TQt::NoPen)
+ << " b=" << (maskBrush.style () != TQt::NoBrush)
<< " o: p=" << (pen.style () != TQt::NoPen)
<< " b=" << (brush.style () != TQt::NoBrush)
<< endl;
- kdDebug () << "\ttqmaskPen.color()=" << (int *) tqmaskPen.color ().rgb ()
+ kdDebug () << "\tmaskPen.color()=" << (int *) maskPen.color ().rgb ()
<< " transparent=" << (int *) TQt::color0.rgb ()/*transparent*/
<< endl;
#endif
if (pixmap.tqmask () ||
- (tqmaskPen.style () != TQt::NoPen &&
- tqmaskPen.color () == TQt::color0/*transparent*/) ||
- (tqmaskBrush.style () != TQt::NoBrush &&
- tqmaskBrush.color () == TQt::color0/*transparent*/))
+ (maskPen.style () != TQt::NoPen &&
+ maskPen.color () == TQt::color0/*transparent*/) ||
+ (maskBrush.style () != TQt::NoBrush &&
+ maskBrush.color () == TQt::color0/*transparent*/))
{
- tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
- tqmaskPainter.begin (&tqmaskBitmap);
- tqmaskPainter.setPen (tqmaskPen);
- tqmaskPainter.setBrush (tqmaskBrush);
+ maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
+ maskPainter.begin (&maskBitmap);
+ maskPainter.setPen (maskPen);
+ maskPainter.setBrush (maskBrush);
}
if (pen.style () != TQt::NoPen ||
@@ -101,8 +101,8 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode,
if (painter.isActive ()) \
painter . cmd ; \
\
- if (tqmaskPainter.isActive ()) \
- tqmaskPainter . cmd ; \
+ if (maskPainter.isActive ()) \
+ maskPainter . cmd ; \
}
if (startPoint != endPoint)
@@ -144,11 +144,11 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode,
if (painter.isActive ())
painter.end ();
- if (tqmaskPainter.isActive ())
- tqmaskPainter.end ();
+ if (maskPainter.isActive ())
+ maskPainter.end ();
- if (!tqmaskBitmap.isNull ())
- pixmap.setMask (tqmaskBitmap);
+ if (!maskBitmap.isNull ())
+ pixmap.setMask (maskBitmap);
return pixmap;
}
@@ -231,7 +231,7 @@ void kpToolRectangle::slotBackgroundColorChanged (const kpColor &)
// private
void kpToolRectangle::updatePen (int mouseButton)
{
- TQColor tqmaskPenColor = color (mouseButton).tqmaskColor ();
+ TQColor maskPenColor = color (mouseButton).maskColor ();
if (!m_toolWidgetLineWidth)
{
@@ -239,7 +239,7 @@ void kpToolRectangle::updatePen (int mouseButton)
m_pen [mouseButton] = TQPen (color (mouseButton).toTQColor ());
else
m_pen [mouseButton] = TQPen(Qt::NoPen);
- m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor);
+ m_maskPen [mouseButton] = TQPen (maskPenColor);
}
else
{
@@ -251,7 +251,7 @@ void kpToolRectangle::updatePen (int mouseButton)
}
else
m_pen [mouseButton] = TQPen(Qt::NoPen);
- m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor,
+ m_maskPen [mouseButton] = TQPen (maskPenColor,
m_toolWidgetLineWidth->lineWidth (),
TQt::SolidLine);
}
@@ -270,14 +270,14 @@ void kpToolRectangle::updateBrush (int mouseButton)
color (mouseButton)/*foreground colour*/,
color (1 - mouseButton)/*background colour*/);
- m_tqmaskBrush [mouseButton] = m_toolWidgetFillStyle->tqmaskBrush (
+ m_maskBrush [mouseButton] = m_toolWidgetFillStyle->maskBrush (
color (mouseButton)/*foreground colour*/,
color (1 - mouseButton)/*background colour*/);
}
else
{
m_brush [mouseButton] = TQBrush(Qt::NoBrush);
- m_tqmaskBrush [mouseButton] = TQBrush(Qt::NoBrush);
+ m_maskBrush [mouseButton] = TQBrush(Qt::NoBrush);
}
}
@@ -437,7 +437,7 @@ void kpToolRectangle::applyModifiers ()
m_toolRectangleRectWithoutLineWidth = rect;
m_toolRectangleRect = kpTool::neededRect (rect, TQMAX (m_pen [m_mouseButton].width (),
- m_tqmaskPen [m_mouseButton].width ()));
+ m_maskPen [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_tqmaskPen [m_mouseButton],
- m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton]);
+ m_pen [m_mouseButton], m_maskPen [m_mouseButton],
+ m_brush [m_mouseButton], m_maskBrush [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 ()->tqinvalidateTempPixmap ();
+ viewManager ()->invalidateTempPixmap ();
#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 ()->tqinvalidateTempPixmap ();
+ viewManager ()->invalidateTempPixmap ();
mainWindow ()->commandHistory ()->addCommand (
new kpToolRectangleCommand
(m_mode,
- m_pen [m_mouseButton], m_tqmaskPen [m_mouseButton],
- m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton],
+ m_pen [m_mouseButton], m_maskPen [m_mouseButton],
+ m_brush [m_mouseButton], m_maskBrush [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 &tqmaskPen,
- const TQBrush &brush, const TQBrush &tqmaskBrush,
+ const TQPen &pen, const TQPen &maskPen,
+ const TQBrush &brush, const TQBrush &maskBrush,
const TQRect &rect,
const TQPoint &startPoint, const TQPoint &endPoint,
kpMainWindow *mainWindow)
: kpCommand (mainWindow),
m_mode (mode),
- m_pen (pen), m_tqmaskPen (tqmaskPen),
- m_brush (brush), m_tqmaskBrush (tqmaskBrush),
+ m_pen (pen), m_maskPen (maskPen),
+ m_brush (brush), m_maskBrush (maskBrush),
m_rect (rect),
m_startPoint (startPoint),
m_endPoint (endPoint),
@@ -612,8 +612,8 @@ void kpToolRectangleCommand::execute ()
doc->setPixmapAt (pixmap (m_mode, doc,
m_rect, m_startPoint, m_endPoint,
- m_pen, m_tqmaskPen,
- m_brush, m_tqmaskBrush),
+ m_pen, m_maskPen,
+ m_brush, m_maskBrush),
m_rect.topLeft ());
}
diff --git a/kolourpaint/tools/kptoolrectangle.h b/kolourpaint/tools/kptoolrectangle.h
index 03ade5a7..e41b5d47 100644
--- a/kolourpaint/tools/kptoolrectangle.h
+++ b/kolourpaint/tools/kptoolrectangle.h
@@ -103,10 +103,10 @@ private:
kpToolWidgetFillStyle *m_toolWidgetFillStyle;
void updatePen (int mouseButton);
- TQPen m_pen [2], m_tqmaskPen [2];
+ TQPen m_pen [2], m_maskPen [2];
void updateBrush (int mouseButton);
- TQBrush m_brush [2], m_tqmaskBrush [2];
+ TQBrush m_brush [2], m_maskBrush [2];
void applyModifiers ();
TQPoint m_toolRectangleStartPoint, m_toolRectangleEndPoint;
@@ -117,8 +117,8 @@ class kpToolRectangleCommand : public kpCommand
{
public:
kpToolRectangleCommand (kpToolRectangle::Mode mode,
- const TQPen &pen, const TQPen &tqmaskPen,
- const TQBrush &brush, const TQBrush &tqmaskBrush,
+ const TQPen &pen, const TQPen &maskPen,
+ const TQBrush &brush, const TQBrush &maskBrush,
const TQRect &rect,
const TQPoint &startPoint, const TQPoint &endPoint,
kpMainWindow *mainWindow);
@@ -133,8 +133,8 @@ public:
private:
kpToolRectangle::Mode m_mode;
- TQPen m_pen, m_tqmaskPen;
- TQBrush m_brush, m_tqmaskBrush;
+ TQPen m_pen, m_maskPen;
+ TQBrush m_brush, m_maskBrush;
TQRect m_rect;
TQPoint m_startPoint, m_endPoint;
TQPixmap *m_oldPixmapPtr;
diff --git a/kolourpaint/widgets/kptoolwidgetbase.cpp b/kolourpaint/widgets/kptoolwidgetbase.cpp
index c230c1ee..a7532fc4 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.cpp
+++ b/kolourpaint/widgets/kptoolwidgetbase.cpp
@@ -92,7 +92,7 @@ void kpToolWidgetBase::finishConstruction (int fallBackRow, int fallBackCol)
<< endl;
#endif
- retqlayoutOptions ();
+ relayoutOptions ();
const TQPair <int, int> rowColPair = defaultSelectedRowAndCol ();
if (!setSelected (rowColPair.first, rowColPair.second, false/*don't save*/))
@@ -226,10 +226,10 @@ void kpToolWidgetBase::saveSelectedAsDefault () const
// public
-void kpToolWidgetBase::retqlayoutOptions ()
+void kpToolWidgetBase::relayoutOptions ()
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kdDebug () << "kpToolWidgetBase::retqlayoutOptions()" << endl;
+ kdDebug () << "kpToolWidgetBase::relayoutOptions()" << endl;
#endif
while (!m_pixmaps.isEmpty () && m_pixmaps.last ().count () == 0)
diff --git a/kolourpaint/widgets/kptoolwidgetbase.h b/kolourpaint/widgets/kptoolwidgetbase.h
index 033f4946..8bef2a67 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.h
+++ b/kolourpaint/widgets/kptoolwidgetbase.h
@@ -70,7 +70,7 @@ public: // (only have to use these if you don't use finishConstruction())
void saveSelectedAsDefault () const;
- void retqlayoutOptions ();
+ void relayoutOptions ();
public:
int selectedRow () const;
diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.cpp b/kolourpaint/widgets/kptoolwidgeterasersize.cpp
index effd631f..c4354dea 100644
--- a/kolourpaint/widgets/kptoolwidgeterasersize.cpp
+++ b/kolourpaint/widgets/kptoolwidgeterasersize.cpp
@@ -78,9 +78,9 @@ kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *tqparent, const char *
TQBitmap tqmask (previewPixmap.width (), previewPixmap.height ());
tqmask.fill (TQt::color0/*transparent*/);
- TQPainter tqmaskPainter (&tqmask);
- tqmaskPainter.fillRect (rect, TQt::color1/*opaque*/);
- tqmaskPainter.end ();
+ TQPainter maskPainter (&tqmask);
+ maskPainter.fillRect (rect, TQt::color1/*opaque*/);
+ maskPainter.end ();
previewPixmap.setMask (tqmask);
@@ -130,19 +130,19 @@ TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
if (color.isTransparent ())
{
- TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ());
- tqmaskBitmap.fill (TQt::color0/*transparent*/);
+ TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
+ maskBitmap.fill (TQt::color0/*transparent*/);
if (showBorder)
{
- TQPainter tqmaskBitmapPainter (&tqmaskBitmap);
- tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/);
- tqmaskBitmapPainter.drawRect (tqmaskBitmap.rect ());
+ TQPainter maskBitmapPainter (&maskBitmap);
+ maskBitmapPainter.setPen (TQt::color1/*opaque*/);
+ maskBitmapPainter.drawRect (maskBitmap.rect ());
}
- pixmap.setMask (tqmaskBitmap);
+ pixmap.setMask (maskBitmap);
}
diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
index c59b730e..e2a1afce 100644
--- a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
+++ b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
@@ -139,7 +139,7 @@ kpToolWidgetFillStyle::FillStyle kpToolWidgetFillStyle::fillStyle () const
}
// public static
-TQBrush kpToolWidgetFillStyle::tqmaskBrushForFillStyle (FillStyle fs,
+TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
@@ -152,10 +152,10 @@ TQBrush kpToolWidgetFillStyle::tqmaskBrushForFillStyle (FillStyle fs,
return Qt::NoBrush;
break;
case FillWithBackground:
- return TQBrush (backgroundColor.tqmaskColor ());
+ return TQBrush (backgroundColor.maskColor ());
break;
case FillWithForeground:
- return TQBrush (foregroundColor.tqmaskColor ());
+ return TQBrush (foregroundColor.maskColor ());
break;
default:
return Qt::NoBrush;
@@ -163,10 +163,10 @@ TQBrush kpToolWidgetFillStyle::tqmaskBrushForFillStyle (FillStyle fs,
}
}
-TQBrush kpToolWidgetFillStyle::tqmaskBrush (const kpColor &foregroundColor,
+TQBrush kpToolWidgetFillStyle::maskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
- return tqmaskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
+ return maskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
}
// public static
diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.h b/kolourpaint/widgets/kptoolwidgetfillstyle.h
index 221d0245..82ee1357 100644
--- a/kolourpaint/widgets/kptoolwidgetfillstyle.h
+++ b/kolourpaint/widgets/kptoolwidgetfillstyle.h
@@ -59,10 +59,10 @@ private:
public:
FillStyle fillStyle () const;
- static TQBrush tqmaskBrushForFillStyle (FillStyle fs,
+ static TQBrush maskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor);
- TQBrush tqmaskBrush (const kpColor &foregroundColor,
+ TQBrush maskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor);
static TQBrush brushForFillStyle (FillStyle fs,
diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
index e7804149..0d419333 100644
--- a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
+++ b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
@@ -52,22 +52,22 @@ kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *tqparent, const char *na
(h <= 0 ? height () : h));
pixmap.fill (TQt::white);
- TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ());
- tqmaskBitmap.fill (TQt::color0/*transparent*/);
+ TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
+ maskBitmap.fill (TQt::color0/*transparent*/);
- TQPainter painter (&pixmap), tqmaskPainter (&tqmaskBitmap);
- painter.setPen (TQt::black), tqmaskPainter.setPen (TQt::color1/*opaque*/);
- painter.setBrush (TQt::black), tqmaskPainter.setBrush (TQt::color1/*opaque*/);
+ TQPainter painter (&pixmap), maskPainter (&maskBitmap);
+ painter.setPen (TQt::black), maskPainter.setPen (TQt::color1/*opaque*/);
+ painter.setBrush (TQt::black), maskPainter.setBrush (TQt::color1/*opaque*/);
TQRect rect = TQRect (0, (pixmap.height () - lineWidths [i]) / 2,
pixmap.width (), lineWidths [i]);
- painter.drawRect (rect), tqmaskPainter.drawRect (rect);
+ painter.drawRect (rect), maskPainter.drawRect (rect);
- painter.end (), tqmaskPainter.end ();
+ painter.end (), maskPainter.end ();
- pixmap.setMask (tqmaskBitmap);
+ pixmap.setMask (maskBitmap);
addOption (pixmap, TQString::number (lineWidths [i]));
startNewOptionRow ();