summaryrefslogtreecommitdiffstats
path: root/kommander/editor/formwindow.cpp
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
commit36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 (patch)
tree629d3942958745660e36c30b0d6139af9459c0f8 /kommander/editor/formwindow.cpp
parent929d7ae4f69d62b8f1f6d3506adf75f017753935 (diff)
downloadtdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.tar.gz
tdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/formwindow.cpp')
-rw-r--r--kommander/editor/formwindow.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp
index 590d1c47..55c1b142 100644
--- a/kommander/editor/formwindow.cpp
+++ b/kommander/editor/formwindow.cpp
@@ -81,7 +81,7 @@ static void setCursorToAll(const TQCursor &c, TQWidget *start)
static void restoreCursors(TQWidget *start, FormWindow *fw)
{
- if (fw->widgets()->tqfind(start))
+ if (fw->widgets()->find(start))
start->setCursor(MetaDataBase::cursor(start));
else
start->setCursor(TQt::ArrowCursor);
@@ -210,7 +210,7 @@ void FormWindow::paintGrid(TQWidget *w, TQPaintEvent *e)
TQPixmap grid;
TQString grid_name;
grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y());
- if(!TQPixmapCache::tqfind(grid_name, grid)) {
+ if(!TQPixmapCache::find(grid_name, grid)) {
grid = TQPixmap(350 + (350 % mainWindow()->grid().x()), 350 + (350 % mainWindow()->grid().y()));
grid.fill(tqcolorGroup().color(TQColorGroup::Foreground));
TQBitmap tqmask(grid.width(), grid.height());
@@ -362,10 +362,10 @@ void FormWindow::insertWidget()
TQObject *o = it.current();
++it;
if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo(this) &&
- insertedWidgets.tqfind((TQWidget*)o) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w))
+ insertedWidgets.find((TQWidget*)o) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w))
{
TQRect r2(((TQWidget*)o)->pos(), ((TQWidget*)o)->size());
- if (r.tqcontains(r2))
+ if (r.contains(r2))
lst.append((TQWidget*)o);
}
}
@@ -461,7 +461,7 @@ void FormWindow::handleContextMenu(TQContextMenuEvent *e, TQWidget *w)
// if widget is laid out, find the first non-laid out super-widget
TQWidget *realWidget = w; // but store the original one
while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) !=
- WidgetFactory::NoLayout || !insertedWidgets.tqfind(w)))
+ WidgetFactory::NoLayout || !insertedWidgets.find(w)))
w = w->parentWidget();
if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) &&
((TQMainWindow*)mainContainer())->centralWidget() == realWidget)
@@ -530,7 +530,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
{
if (!o->isWidgetType())
continue;
- if (insertedWidgets.tqfind((TQWidget*)o))
+ if (insertedWidgets.find((TQWidget*)o))
selectWidget(TQT_TQOBJECT(o), false);
}
setPropertyShowingBlocked(false);
@@ -552,7 +552,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
// if widget is laid out, find the first non-laid out super-widget
while (w->parentWidget() &&
(WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout
- || !insertedWidgets.tqfind(w)))
+ || !insertedWidgets.find(w)))
w = w->parentWidget();
if (e->button() == Qt::LeftButton)
@@ -609,7 +609,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
orderedWidgets.append(w);
for (TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev())
{
- int i = stackedWidgets.tqfindRef(wid);
+ int i = stackedWidgets.findRef(wid);
if (i != -1)
{
stackedWidgets.removeRef(wid);
@@ -665,7 +665,7 @@ void FormWindow::handleMouseDblClick(TQMouseEvent *, TQWidget *w)
orderedWidgets.append(w);
for (TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev())
{
- int i = stackedWidgets.tqfindRef(wid);
+ int i = stackedWidgets.findRef(wid);
if (i != -1)
{
stackedWidgets.removeRef(wid);
@@ -696,7 +696,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
{ // we are prepated for a move
// if widget is laid out, find the first non-laid out super-widget
while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) !=
- WidgetFactory::NoLayout || !insertedWidgets.tqfind(w)))
+ WidgetFactory::NoLayout || !insertedWidgets.find(w)))
w = w->parentWidget();
// calc correct position
TQPoint pos = w->mapFromGlobal(e->globalPos());
@@ -793,7 +793,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
wid = tqApp->widgetAt(e->globalPos(), true);
if (wid)
wid = designerWidget(TQT_TQOBJECT(wid));
- if (wid && (isMainContainer(TQT_TQOBJECT(wid)) || insertedWidgets.tqfind(wid)) && wid->isVisibleTo(this))
+ if (wid && (isMainContainer(TQT_TQOBJECT(wid)) || insertedWidgets.find(wid)) && wid->isVisibleTo(this))
newReceiver = wid;
if (newReceiver && (newReceiver->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING)
|| newReceiver->inherits("Spacer")))
@@ -801,7 +801,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
drawRecRect = TQT_BASE_OBJECT(newReceiver) != TQT_BASE_OBJECT(connectReceiver);
currentConnectPos = mapFromGlobal(e->globalPos());
if (newReceiver && (isMainContainer(TQT_TQOBJECT(newReceiver))
- || insertedWidgets.tqfind(newReceiver)) && !isCentralWidget(TQT_TQOBJECT(newReceiver)))
+ || insertedWidgets.find(newReceiver)) && !isCentralWidget(TQT_TQOBJECT(newReceiver)))
connectReceiver = connectableObject(TQT_TQOBJECT(newReceiver), TQT_TQOBJECT(connectReceiver));
mainWindow()->statusBar()->message(i18n("Connect '%1' to '%2'").tqarg(connectSender->name()).
arg(connectReceiver->name()));
@@ -832,7 +832,7 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
{ // we moved the widget
sizePreviewLabel->hide();
- if (moving.isEmpty() || w->pos() == *moving.tqfind((ulong) w))
+ if (moving.isEmpty() || w->pos() == *moving.find((ulong) w))
break;
// restore targetContainer
@@ -1064,7 +1064,7 @@ void FormWindow::handleKeyPress(TQKeyEvent * e, TQWidget * w)
TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING);
if (!l)
return;
- if (l->tqfind(TQT_TQOBJECT(w)) != -1)
+ if (l->find(TQT_TQOBJECT(w)) != -1)
e->accept();
delete l;
}
@@ -1118,7 +1118,7 @@ void FormWindow::selectWidget(TQObject * o, bool select)
repaintSelection((TQWidget *) opw);
if (!isPropertyShowingBlocked())
emitShowProperties(propertyWidget);
- WidgetSelection *s = usedSelections.tqfind(w);
+ WidgetSelection *s = usedSelections.find(w);
if (s)
{
s->show();
@@ -1143,7 +1143,7 @@ void FormWindow::selectWidget(TQObject * o, bool select)
emitSelectionChanged();
} else
{
- WidgetSelection *s = usedSelections.tqfind(w);
+ WidgetSelection *s = usedSelections.find(w);
if (s)
s->setWidget(0);
TQObject *opw = propertyWidget;
@@ -1168,7 +1168,7 @@ TQPoint FormWindow::grid() const
void FormWindow::updateSelection(TQWidget * w)
{
- WidgetSelection *s = usedSelections.tqfind(w);
+ WidgetSelection *s = usedSelections.find(w);
if (!w->isVisibleTo(this))
selectWidget(TQT_TQOBJECT(w), false);
else if (s)
@@ -1177,14 +1177,14 @@ void FormWindow::updateSelection(TQWidget * w)
void FormWindow::raiseSelection(TQWidget * w)
{
- WidgetSelection *s = usedSelections.tqfind(w);
+ WidgetSelection *s = usedSelections.find(w);
if (s)
s->show();
}
void FormWindow::repaintSelection(TQWidget * w)
{
- WidgetSelection *s = usedSelections.tqfind(w);
+ WidgetSelection *s = usedSelections.find(w);
if (s)
s->update();
}
@@ -1291,7 +1291,7 @@ void FormWindow::selectWidgets()
TQPoint p = ((TQWidget *) o)->mapToGlobal(TQPoint(0, 0));
p = mapFromGlobal(p);
TQRect r(p, ((TQWidget *) o)->size());
- if (r.intersects(currRect) && !r.tqcontains(currRect))
+ if (r.intersects(currRect) && !r.contains(currRect))
selectWidget(TQT_TQOBJECT(o));
}
}
@@ -1303,7 +1303,7 @@ void FormWindow::selectWidgets()
bool FormWindow::isWidgetSelected(TQObject * w)
{
if (w->isWidgetType())
- return usedSelections.tqfind((TQWidget *) w) != 0;
+ return usedSelections.find((TQWidget *) w) != 0;
return false; // #### do stuff for TQObjects
}
@@ -1350,7 +1350,7 @@ void FormWindow::raiseChildSelections(TQWidget * w)
TQPtrDictIterator < WidgetSelection > it(usedSelections);
for (; it.current(); ++it)
{
- if (l->tqfindRef(TQT_TQOBJECT(it.current()->widget())) != -1)
+ if (l->findRef(TQT_TQOBJECT(it.current()->widget())) != -1)
it.current()->show();
}
delete l;
@@ -1363,7 +1363,7 @@ void FormWindow::updateChildSelections(TQWidget * w)
{
for (TQObject * o = l->first(); o; o = l->next())
{
- if (o->isWidgetType() && insertedWidgets.tqfind((TQWidget *) o))
+ if (o->isWidgetType() && insertedWidgets.find((TQWidget *) o))
updateSelection((TQWidget *) o);
}
delete l;
@@ -1385,7 +1385,7 @@ void FormWindow::checkSelectionsForMove(TQWidget * w)
if (it.current()->widget() == mainContainer())
continue;
++it;
- if (l->tqfind(TQT_TQOBJECT(sel->widget())) == -1)
+ if (l->find(TQT_TQOBJECT(sel->widget())) == -1)
{
if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout)
sel->setWidget(0);
@@ -1500,7 +1500,7 @@ void FormWindow::invalidCheckedSelections()
void FormWindow::checkPreviewGeometry(TQRect & r)
{
- if (TQT_TQRECT_OBJECT(rect()).tqcontains(r))
+ if (TQT_TQRECT_OBJECT(rect()).contains(r))
return;
if (r.left() < rect().left())
r.moveTopLeft(TQPoint(0, r.top()));
@@ -1699,7 +1699,7 @@ void FormWindow::showOrderIndicators()
{
OrderIndicator *ind = new OrderIndicator(order++, w, this);
orderIndicators.append(ind);
- if (stackedWidgets.tqfindRef(w) == -1)
+ if (stackedWidgets.findRef(w) == -1)
stackedWidgets.append(w);
}
}
@@ -1788,14 +1788,14 @@ void FormWindow::lowerWidgets()
static void find_accel(const TQString & txt, TQMap < TQChar, TQWidgetList > &accels, TQWidget * w)
{
- int i = txt.tqfind("&");
+ int i = txt.find("&");
if (i == -1)
return;
TQChar c = txt[i + 1];
if (c.isNull() || c == '&')
return;
c = c.lower();
- TQMap < TQChar, TQWidgetList >::Iterator it = accels.tqfind(c);
+ TQMap < TQChar, TQWidgetList >::Iterator it = accels.find(c);
if (it == accels.end())
{
TQWidgetList wl;
@@ -1820,11 +1820,11 @@ void FormWindow::checkAccels()
{
TQWidget *w = (TQWidget *) o;
const TQMetaProperty *text =
- w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("text", true), true);
+ w->tqmetaObject()->property(w->tqmetaObject()->findProperty("text", true), true);
const TQMetaProperty *title =
- w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("title", true), true);
+ w->tqmetaObject()->property(w->tqmetaObject()->findProperty("title", true), true);
const TQMetaProperty *pageTitle =
- w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("pageTitle", true), true);
+ w->tqmetaObject()->property(w->tqmetaObject()->findProperty("pageTitle", true), true);
if (text)
find_accel(w->property("text").toString(), accels, w);
if (title)
@@ -1969,7 +1969,7 @@ void FormWindow::layoutHorizontalContainer(TQWidget * w)
for (TQObject * o = l.first(); o; o = l.next())
{
if (o->isWidgetType() &&
- ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o))
+ ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o))
widgets.append((TQWidget *) o);
}
LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay Out ChildrenQt::Horizontally"),
@@ -1990,7 +1990,7 @@ void FormWindow::layoutVerticalContainer(TQWidget * w)
for (TQObject * o = l.first(); o; o = l.next())
{
if (o->isWidgetType() &&
- ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o))
+ ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o))
widgets.append((TQWidget *) o);
}
LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay Out ChildrenQt::Vertically"),
@@ -2014,7 +2014,7 @@ void FormWindow::layoutGridContainer(TQWidget * w)
for (TQObject * o = l.first(); o; o = l.next())
{
if (o->isWidgetType() &&
- ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o))
+ ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o))
widgets.append((TQWidget *) o);
}
LayoutGridCommand *cmd = new LayoutGridCommand(i18n("Lay Out Children in a Grid"),
@@ -2067,7 +2067,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand(TQWidget * w)
{
if (o->isWidgetType() &&
!mainWindow()->isAToolBarChild(TQT_TQOBJECT(o)) &&
- ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o))
+ ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o))
widgets.append((TQWidget *) o);
}
return new BreakLayoutCommand(i18n("Break Layout"), this,
@@ -2102,7 +2102,7 @@ bool FormWindow::hasInsertedChildren(TQWidget *w) const
for (TQObject *o = l->first(); o; o = l->next())
if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo((FormWindow*)this) &&
- insertedWidgets.tqfind((TQWidget*)o))
+ insertedWidgets.find((TQWidget*)o))
{
delete l;
return true;
@@ -2116,7 +2116,7 @@ bool FormWindow::allowMove(TQWidget *w)
w = w->parentWidget();
while (w)
{
- if ((isMainContainer(TQT_TQOBJECT(w)) || insertedWidgets.tqfind(w)) && WidgetFactory::layoutType(w) ==
+ if ((isMainContainer(TQT_TQOBJECT(w)) || insertedWidgets.find(w)) && WidgetFactory::layoutType(w) ==
WidgetFactory::NoLayout)
return true;
w = w->parentWidget();
@@ -2197,7 +2197,7 @@ void FormWindow::restoreConnectionLine()
w = h = 64;
r = r.normalize();
- while (r.tqcontains(p))
+ while (r.contains(p))
{
unclippedPainter->drawPixmap(p, *buffer, TQRect(p, TQSize(w, h)));
unclippedPainter->setPen(red);
@@ -2366,7 +2366,7 @@ bool FormWindow::isDatabaseWidgetUsed() const
for (; it.current(); ++it)
{
TQString c(it.current()->className());
- if (dbClasses.tqcontains(c) > 0)
+ if (dbClasses.contains(c) > 0)
return true;
}
#endif
@@ -2444,7 +2444,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
TQWidget *container = 0;
int depth = -1;
TQWidgetList selected = selectedWidgets();
- if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(pos)))
+ if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(pos)))
{
container = mainContainer();
depth = widgetDepth(container);
@@ -2457,7 +2457,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
continue;
if (!it.current()->isVisibleTo(this))
continue;
- if (selected.tqfind(it.current()) != -1)
+ if (selected.find(it.current()) != -1)
continue;
if (!WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(
WidgetFactory::classNameOf(TQT_TQOBJECT(it.current())))) && it.current() != mainContainer())
@@ -2467,7 +2467,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
TQWidget *w = it.current();
while (w && !w->isTopLevel())
{
- if (!TQT_TQRECT_OBJECT(w->rect()).tqcontains((w->mapFromGlobal(pos))))
+ if (!TQT_TQRECT_OBJECT(w->rect()).contains((w->mapFromGlobal(pos))))
break;
w = w->parentWidget();
}
@@ -2475,8 +2475,8 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
int wd = widgetDepth(it.current());
if (wd == depth && container && (it.current()->parentWidget()->
- childrenListObject()).tqfind(TQT_TQOBJECT(it.current())) >
- (container->parentWidget()->childrenListObject()).tqfind(TQT_TQOBJECT(container)))
+ childrenListObject()).find(TQT_TQOBJECT(it.current())) >
+ (container->parentWidget()->childrenListObject()).find(TQT_TQOBJECT(container)))
wd++;
if (wd > depth && !isChildOf(it.current(), notParentOf)) {
depth = wd;