summaryrefslogtreecommitdiffstats
path: root/kolourpaint
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commitda4be7880ff1de6415ab6256afd2514e64f5fa2e (patch)
tree0862c14883af0435b012f6f592221fc167ed7d91 /kolourpaint
parentd0a269b9b0361bf71c5dd5787be0839f9dcace8c (diff)
downloadtdegraphics-da4be7880ff1de6415ab6256afd2514e64f5fa2e.tar.gz
tdegraphics-da4be7880ff1de6415ab6256afd2514e64f5fa2e.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kolourpaint')
-rw-r--r--kolourpaint/kpdocumentsaveoptions.cpp2
-rw-r--r--kolourpaint/kpmainwindow.cpp8
-rw-r--r--kolourpaint/kpmainwindow_file.cpp10
-rw-r--r--kolourpaint/kpmainwindow_help.cpp2
-rw-r--r--kolourpaint/kpmainwindow_view.cpp2
-rw-r--r--kolourpaint/kpselection.cpp18
-rw-r--r--kolourpaint/kpselection.h4
-rw-r--r--kolourpaint/kpview.cpp8
-rw-r--r--kolourpaint/kpviewmanager.cpp4
-rw-r--r--kolourpaint/kpviewscrollablecontainer.cpp10
-rw-r--r--kolourpaint/pixmapfx/kpfloodfill.cpp2
-rw-r--r--kolourpaint/tools/kptoolautocrop.cpp2
-rw-r--r--kolourpaint/tools/kptoolpen.cpp4
-rw-r--r--kolourpaint/tools/kptoolselection.cpp6
-rw-r--r--kolourpaint/widgets/kpcolortoolbar.cpp16
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.cpp2
16 files changed, 50 insertions, 50 deletions
diff --git a/kolourpaint/kpdocumentsaveoptions.cpp b/kolourpaint/kpdocumentsaveoptions.cpp
index a5b2988c..89eaf2d8 100644
--- a/kolourpaint/kpdocumentsaveoptions.cpp
+++ b/kolourpaint/kpdocumentsaveoptions.cpp
@@ -396,7 +396,7 @@ static bool mimeTypeSupportsProperty (const TQString &mimeType,
const TQStringList mimeTypeList = mimeTypesSupportingProperty (
property, defaultMimeTypesWithPropertyList);
- return mimeTypeList.tqcontains (mimeType);
+ return mimeTypeList.contains (mimeType);
}
diff --git a/kolourpaint/kpmainwindow.cpp b/kolourpaint/kpmainwindow.cpp
index c600d36b..34d9d998 100644
--- a/kolourpaint/kpmainwindow.cpp
+++ b/kolourpaint/kpmainwindow.cpp
@@ -939,7 +939,7 @@ void kpMainWindow::dropEvent (TQDropEvent *e)
#endif
if (m_thumbnailView &&
kpWidgetMapper::toGlobal (m_thumbnailView, m_thumbnailView->rect ())
- .tqcontains (globalPos))
+ .contains (globalPos))
{
// TODO: Code will never get executed.
// Thumbnail doesn't accept drops.
@@ -947,13 +947,13 @@ void kpMainWindow::dropEvent (TQDropEvent *e)
}
else if (m_mainView &&
kpWidgetMapper::toGlobal (m_mainView, m_mainView->rect ())
- .tqcontains (globalPos) &&
+ .contains (globalPos) &&
m_scrollView &&
kpWidgetMapper::toGlobal (m_scrollView,
TQRect (0, 0,
m_scrollView->visibleWidth (),
m_scrollView->visibleHeight ()))
- .tqcontains (globalPos))
+ .contains (globalPos))
{
view = m_mainView;
}
@@ -967,7 +967,7 @@ void kpMainWindow::dropEvent (TQDropEvent *e)
// viewUnderCursor() is hacky and can return a view when we aren't
// over one thanks to drags.
- if (m_document && m_document->rect ().tqcontains (docPoint))
+ if (m_document && m_document->rect ().contains (docPoint))
{
selTopLeft = docPoint;
diff --git a/kolourpaint/kpmainwindow_file.cpp b/kolourpaint/kpmainwindow_file.cpp
index caf7a75d..bcc1c1c4 100644
--- a/kolourpaint/kpmainwindow_file.cpp
+++ b/kolourpaint/kpmainwindow_file.cpp
@@ -548,7 +548,7 @@ bool kpMainWindow::save (bool localOnly)
{
if (m_document->url ().isEmpty () ||
KImageIO::mimeTypes (KImageIO::Writing)
- .tqfindIndex (m_document->saveOptions ()->mimeType ()) < 0 ||
+ .findIndex (m_document->saveOptions ()->mimeType ()) < 0 ||
// SYNC: kpDocument::getPixmapFromFile() can't determine quality
// from file so it has been set initially to an invalid value.
(m_document->saveOptions ()->mimeTypeHasConfigurableQuality () &&
@@ -639,7 +639,7 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption,
}
#define MIME_TYPE_IS_VALID() (!fdSaveOptions.mimeTypeIsInvalid () && \
- mimeTypes.tqfindIndex (fdSaveOptions.mimeType ()) >= 0)
+ mimeTypes.findIndex (fdSaveOptions.mimeType ()) >= 0)
if (!MIME_TYPE_IS_VALID ())
{
#if DEBUG_KP_MAIN_WINDOW
@@ -658,9 +658,9 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption,
kdDebug () << "\tmimeType=" << fdSaveOptions.mimeType ()
<< " not valid, get hardcoded" << endl;
#endif
- if (mimeTypes.tqfindIndex ("image/png") > -1)
+ if (mimeTypes.findIndex ("image/png") > -1)
fdSaveOptions.setMimeType ("image/png");
- else if (mimeTypes.tqfindIndex ("image/x-bmp") > -1)
+ else if (mimeTypes.findIndex ("image/x-bmp") > -1)
fdSaveOptions.setMimeType ("image/x-bmp");
else
fdSaveOptions.setMimeType (mimeTypes.first ());
@@ -964,7 +964,7 @@ void kpMainWindow::sendFilenameToPrinter (KPrinter *printer)
int dot;
TQString fileName = url.fileName ();
- dot = fileName.tqfindRev ('.');
+ dot = fileName.findRev ('.');
// file.ext but not .hidden-file?
if (dot > 0)
diff --git a/kolourpaint/kpmainwindow_help.cpp b/kolourpaint/kpmainwindow_help.cpp
index 78ec0265..d7b529dd 100644
--- a/kolourpaint/kpmainwindow_help.cpp
+++ b/kolourpaint/kpmainwindow_help.cpp
@@ -114,7 +114,7 @@ void kpMainWindow::slotHelpTakingScreenshots ()
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tdcopApps=" << dcopApps << endl;
#endif
- bool isRunningKDE = (dcopApps.tqfindIndex ("kwin") >= 0);
+ bool isRunningKDE = (dcopApps.findIndex ("kwin") >= 0);
#if 0
{
diff --git a/kolourpaint/kpmainwindow_view.cpp b/kolourpaint/kpmainwindow_view.cpp
index ee8a0aff..8be4beb8 100644
--- a/kolourpaint/kpmainwindow_view.cpp
+++ b/kolourpaint/kpmainwindow_view.cpp
@@ -404,7 +404,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
<< endl;
#endif
- if (vuc->clipRegion ().tqcontains (viewPoint))
+ if (vuc->clipRegion ().contains (viewPoint))
{
const TQPoint globalPoint =
kpWidgetMapper::toGlobal (vuc, viewPoint);
diff --git a/kolourpaint/kpselection.cpp b/kolourpaint/kpselection.cpp
index 97865852..65c2e0f3 100644
--- a/kolourpaint/kpselection.cpp
+++ b/kolourpaint/kpselection.cpp
@@ -490,18 +490,18 @@ int kpSelection::height () const
}
// public
-bool kpSelection::tqcontains (const TQPoint &point) const
+bool kpSelection::contains (const TQPoint &point) const
{
TQRect rect = boundingRect ();
#if DEBUG_KP_SELECTION && 1
- kdDebug () << "kpSelection::tqcontains(" << point
+ kdDebug () << "kpSelection::contains(" << point
<< ") rect==" << rect
<< " #points=" << m_points.size ()
<< endl;
#endif
- if (!rect.tqcontains (point))
+ if (!rect.contains (point))
return false;
// OPT: TQRegion is probably incredibly slow - cache
@@ -514,20 +514,20 @@ bool kpSelection::tqcontains (const TQPoint &point) const
case kpSelection::Text:
return true;
case kpSelection::Ellipse:
- return TQRegion (m_rect, TQRegion::Ellipse).tqcontains (point);
+ return TQRegion (m_rect, TQRegion::Ellipse).contains (point);
case kpSelection::Points:
// TODO: make this always include the border
// (draw up a rect sel in this mode to see what I mean)
- return TQRegion (m_points, false/*even-odd algo*/).tqcontains (point);
+ return TQRegion (m_points, false/*even-odd algo*/).contains (point);
default:
return false;
}
}
// public
-bool kpSelection::tqcontains (int x, int y)
+bool kpSelection::contains (int x, int y)
{
- return tqcontains (TQPoint (x, y));
+ return contains (TQPoint (x, y));
}
@@ -1000,7 +1000,7 @@ bool kpSelection::pointIsInTextBorderArea (const TQPoint &globalPoint) const
return false;
}
- return (m_rect.tqcontains (globalPoint) && !pointIsInTextArea (globalPoint));
+ return (m_rect.contains (globalPoint) && !pointIsInTextArea (globalPoint));
}
// public
@@ -1012,7 +1012,7 @@ bool kpSelection::pointIsInTextArea (const TQPoint &globalPoint) const
return false;
}
- return textAreaRect ().tqcontains (globalPoint);
+ return textAreaRect ().contains (globalPoint);
}
diff --git a/kolourpaint/kpselection.h b/kolourpaint/kpselection.h
index fc309771..24b1ba39 100644
--- a/kolourpaint/kpselection.h
+++ b/kolourpaint/kpselection.h
@@ -127,8 +127,8 @@ public:
// (for non-rectangular selections, may return false even if
// kpView::onSelectionResizeHandle())
- bool tqcontains (const TQPoint &point) const;
- bool tqcontains (int x, int y);
+ bool contains (const TQPoint &point) const;
+ bool contains (int x, int y);
// (Avoid using for text selections since text selection may
diff --git a/kolourpaint/kpview.cpp b/kolourpaint/kpview.cpp
index 341a6790..12a39fb0 100644
--- a/kolourpaint/kpview.cpp
+++ b/kolourpaint/kpview.cpp
@@ -668,7 +668,7 @@ bool kpView::mouseOnSelection (const TQPoint &viewPoint) const
if (!selViewRect.isValid ())
return false;
- return selViewRect.tqcontains (mouseViewPoint (viewPoint));
+ return selViewRect.contains (mouseViewPoint (viewPoint));
}
@@ -874,7 +874,7 @@ int kpView::mouseOnSelectionResizeHandle (const TQPoint &viewPoint) const
#define LOCAL_POINT_IN_BOX_AT(x,y) \
- TQRect ((x), (y), atomicLength, atomicLength).tqcontains (viewPointRelSel)
+ TQRect ((x), (y), atomicLength, atomicLength).contains (viewPointRelSel)
// Favour the bottom & right and the corners.
if (LOCAL_POINT_IN_BOX_AT (selViewRect.width () - atomicLength,
@@ -969,7 +969,7 @@ void kpView::mouseMoveEvent (TQMouseEvent *e)
// TODO: This is wrong if you leaveEvent the mainView by mouseMoving on the
// mainView, landing on top of the thumbnailView cleverly put on top
// of the mainView.
- setHasMouse (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ()));
+ setHasMouse (TQT_TQRECT_OBJECT(rect ()).contains (e->pos ()));
if (tool ())
tool ()->mouseMoveEvent (e);
@@ -1003,7 +1003,7 @@ void kpView::mouseReleaseEvent (TQMouseEvent *e)
<< endl;
#endif
- setHasMouse (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ()));
+ setHasMouse (TQT_TQRECT_OBJECT(rect ()).contains (e->pos ()));
if (tool ())
tool ()->mouseReleaseEvent (e);
diff --git a/kolourpaint/kpviewmanager.cpp b/kolourpaint/kpviewmanager.cpp
index 3a3bcdad..3586a173 100644
--- a/kolourpaint/kpviewmanager.cpp
+++ b/kolourpaint/kpviewmanager.cpp
@@ -78,7 +78,7 @@ void kpViewManager::registerView (kpView *view)
#if DEBUG_KP_VIEW_MANAGER && 1
kdDebug () << "kpViewManager::registerView (" << view << ")" << endl;
#endif
- if (view && m_views.tqfindRef (view) < 0)
+ if (view && m_views.findRef (view) < 0)
{
#if DEBUG_KP_VIEW_MANAGER && 1
kdDebug () << "\tadded view" << endl;
@@ -469,7 +469,7 @@ kpView *kpViewManager::viewUnderCursor (bool usingTQt) const
{
kpViewManager *nonConstThis = const_cast <kpViewManager *> (this);
- if (m_viewUnderCursor && nonConstThis->m_views.tqfindRef (m_viewUnderCursor) < 0)
+ if (m_viewUnderCursor && nonConstThis->m_views.findRef (m_viewUnderCursor) < 0)
{
kdError () << "kpViewManager::viewUnderCursor(): invalid view" << endl;
nonConstThis->m_viewUnderCursor = 0;
diff --git a/kolourpaint/kpviewscrollablecontainer.cpp b/kolourpaint/kpviewscrollablecontainer.cpp
index 7ffecf92..7cfddb1a 100644
--- a/kolourpaint/kpviewscrollablecontainer.cpp
+++ b/kolourpaint/kpviewscrollablecontainer.cpp
@@ -898,23 +898,23 @@ void kpViewScrollableContainer::recalculateStatusMessage ()
//
if (kpWidgetMapper::toGlobal (this,
TQRect (0, 0, visibleWidth (), visibleHeight ()))
- .tqcontains (TQCursor::pos ()))
+ .contains (TQCursor::pos ()))
{
if (m_bottomRightGrip->isShown () &&
m_bottomRightGrip->hotRect (true/*to global*/)
- .tqcontains (TQCursor::pos ()))
+ .contains (TQCursor::pos ()))
{
m_bottomRightGrip->setUserMessage (i18n ("Left drag the handle to resize the image."));
}
else if (m_bottomGrip->isShown () &&
m_bottomGrip->hotRect (true/*to global*/)
- .tqcontains (TQCursor::pos ()))
+ .contains (TQCursor::pos ()))
{
m_bottomGrip->setUserMessage (i18n ("Left drag the handle to resize the image."));
}
else if (m_rightGrip->isShown () &&
m_rightGrip->hotRect (true/*to global*/)
- .tqcontains (TQCursor::pos ()))
+ .contains (TQCursor::pos ()))
{
m_rightGrip->setUserMessage (i18n ("Left drag the handle to resize the image."));
}
@@ -1119,7 +1119,7 @@ bool kpViewScrollableContainer::beginDragScroll (const TQPoint &/*docPoint*/,
bool stopDragScroll = true;
bool scrolled = false;
- if (!noDragScrollRect ().tqcontains (p))
+ if (!noDragScrollRect ().contains (p))
{
if (m_dragScrollTimer->isActive ())
{
diff --git a/kolourpaint/pixmapfx/kpfloodfill.cpp b/kolourpaint/pixmapfx/kpfloodfill.cpp
index eaf100ab..2b509cb1 100644
--- a/kolourpaint/pixmapfx/kpfloodfill.cpp
+++ b/kolourpaint/pixmapfx/kpfloodfill.cpp
@@ -196,7 +196,7 @@ bool kpFloodFill::prepare ()
kdDebug () << "\tperforming NOP check" << endl;
#endif
- // get the color we need to tqreplace
+ // get the color we need to replace
if (m_processedColorSimilarity == 0 && m_color == m_colorToChange)
{
// need to do absolutely nothing (this is a significant optimisation
diff --git a/kolourpaint/tools/kptoolautocrop.cpp b/kolourpaint/tools/kptoolautocrop.cpp
index d8c8100f..1f3bab0c 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 tqfind)? Chicken and egg situation.
+// place (that's what you're trying to find)? 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
diff --git a/kolourpaint/tools/kptoolpen.cpp b/kolourpaint/tools/kptoolpen.cpp
index 57e19527..d87e3e39 100644
--- a/kolourpaint/tools/kptoolpen.cpp
+++ b/kolourpaint/tools/kptoolpen.cpp
@@ -266,7 +266,7 @@ void kpToolPen::hover (const TQPoint &point)
}
#if DEBUG_KP_TOOL_PEN && 0
- if (document ()->rect ().tqcontains (point))
+ if (document ()->rect ().contains (point))
{
TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ());
@@ -538,7 +538,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
bool didSomething = wash (&painter, &maskPainter,
image,
- color (1 - m_mouseButton)/*color to tqreplace*/,
+ color (1 - m_mouseButton)/*color to replace*/,
rect, rect);
if (painter.isActive ())
diff --git a/kolourpaint/tools/kptoolselection.cpp b/kolourpaint/tools/kptoolselection.cpp
index dc689c4b..2d796ff0 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->tqcontains (m_currentPoint))
+ else if (sel && sel->contains (m_currentPoint))
{
if (m_mode == Text)
{
@@ -300,7 +300,7 @@ void kpToolSelection::beginDraw ()
}
viewManager ()->restoreQueueUpdates ();
}
- else if (sel->tqcontains (m_currentPoint))
+ else if (sel->contains (m_currentPoint))
{
if (m_mode == Text && onSelectionToSelectText () && !controlOrShiftPressed ())
{
@@ -408,7 +408,7 @@ const TQCursor &kpToolSelection::cursor () const
return TQt::arrowCursor;
}
- else if (sel && sel->tqcontains (m_currentPoint))
+ else if (sel && sel->contains (m_currentPoint))
{
#if DEBUG_KP_TOOL_SELECTION && 1
kdDebug () << "\tsel contains currentPoint; selecting text? "
diff --git a/kolourpaint/widgets/kpcolortoolbar.cpp b/kolourpaint/widgets/kpcolortoolbar.cpp
index 89357d1c..7fd520f7 100644
--- a/kolourpaint/widgets/kpcolortoolbar.cpp
+++ b/kolourpaint/widgets/kpcolortoolbar.cpp
@@ -203,8 +203,8 @@ TQRect kpDualColorButton::backgroundRect () const
// protected virtual [base TQWidget]
void kpDualColorButton::dragMoveEvent (TQDragMoveEvent *e)
{
- e->accept ((foregroundRect ().tqcontains (e->pos ()) ||
- backgroundRect ().tqcontains (e->pos ())) &&
+ e->accept ((foregroundRect ().contains (e->pos ()) ||
+ backgroundRect ().contains (e->pos ())) &&
KColorDrag::canDecode (e));
}
@@ -216,9 +216,9 @@ void kpDualColorButton::dropEvent (TQDropEvent *e)
if (col.isValid ())
{
- if (foregroundRect ().tqcontains (e->pos ()))
+ if (foregroundRect ().contains (e->pos ()))
setForegroundColor (kpColor (col.rgb ()));
- else if (backgroundRect ().tqcontains (e->pos ()))
+ else if (backgroundRect ().contains (e->pos ()))
setBackgroundColor (kpColor (col.rgb ()));
}
}
@@ -235,9 +235,9 @@ void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e)
{
int whichColor = -1;
- if (foregroundRect ().tqcontains (e->pos ()))
+ if (foregroundRect ().contains (e->pos ()))
whichColor = 0;
- else if (backgroundRect ().tqcontains (e->pos ()))
+ else if (backgroundRect ().contains (e->pos ()))
whichColor = 1;
if (whichColor == 0 || whichColor == 1)
@@ -266,7 +266,7 @@ void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e)
// protected virtual [base TQWidget]
void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e)
{
- if (swapPixmapRect ().tqcontains (e->pos ()) &&
+ if (swapPixmapRect ().contains (e->pos ()) &&
m_color [0] != m_color [1])
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
@@ -783,7 +783,7 @@ void kpTransparentColorCell::mousePressEvent (TQMouseEvent * /*e*/)
// protected virtual [base TQWidget]
void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e)
{
- if (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ()))
+ if (TQT_TQRECT_OBJECT(rect ()).contains (e->pos ()))
{
if (e->button () == Qt::LeftButton)
{
diff --git a/kolourpaint/widgets/kptoolwidgetbase.cpp b/kolourpaint/widgets/kptoolwidgetbase.cpp
index a7532fc4..ef5f35c3 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.cpp
+++ b/kolourpaint/widgets/kptoolwidgetbase.cpp
@@ -549,7 +549,7 @@ void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e)
{
for (int j = 0; j < (int) m_pixmapRects [i].count (); j++)
{
- if (m_pixmapRects [i][j].tqcontains (e->pos ()))
+ if (m_pixmapRects [i][j].contains (e->pos ()))
{
setSelected (i, j);
e->accept ();