diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-24 20:07:57 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-24 20:07:57 +0000 |
commit | f7670c198945adc3b95ad69a959fe5f8ae55b493 (patch) | |
tree | f99e83cfcade37f343656314fa6088ef9c6d2526 /kommander/editor/formwindow.cpp | |
parent | 9cbbf05386502794e53fbf68678e3c7fc6d0e296 (diff) | |
download | tdewebdev-f7670c198945adc3b95ad69a959fe5f8ae55b493.tar.gz tdewebdev-f7670c198945adc3b95ad69a959fe5f8ae55b493.zip |
Runtime object naming repaired in kdewebdev
NOTE: runtime object naming still needs to be checked for stray "Q*" strings
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1222551 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/formwindow.cpp')
-rw-r--r-- | kommander/editor/formwindow.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp index 2b97dd3b..ac0712b4 100644 --- a/kommander/editor/formwindow.cpp +++ b/kommander/editor/formwindow.cpp @@ -165,7 +165,7 @@ void FormWindow::init() this, TQT_SLOT(modificationChanged(bool))); buffer = 0; - TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQFrame"), this); + TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName(TQFRAME_OBJECT_NAME_STRING), this); setMainContainer(w); propertyWidget = w; targetContainer = 0; @@ -297,7 +297,7 @@ void FormWindow::insertWidget() bool useSizeHint = !oldRectValid || (currRect.width() < 2 && currRect.height() < 2); Orientation orient = Horizontal; TQString n = WidgetDatabase::className(currTool); - if (useSizeHint && (n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar")) { + if (useSizeHint && (n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING)) { TQPopupMenu m(mainWindow()); m.insertItem(i18n("&Horizontal")); int ver = m.insertItem(i18n("&Vertical")); @@ -463,7 +463,7 @@ void FormWindow::handleContextMenu(TQContextMenuEvent *e, TQWidget *w) while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w))) w = w->parentWidget(); - if (mainContainer()->inherits("TQMainWindow") && + if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget) { e->accept(); @@ -524,7 +524,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w) // unselect its childs if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout) { - TQObjectList *l = w->queryList("TQWidget"); + TQObjectList *l = w->queryList(TQWIDGET_OBJECT_NAME_STRING); setPropertyShowingBlocked(true); for (TQObject *o = l->first(); o; o = l->next()) { @@ -636,7 +636,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w) { int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(wid)); if ((WidgetDatabase::isContainer(id) || wid == mainContainer()) && - !wid->inherits("QLayoutWidget") && !wid->inherits("TQSplitter")) + !wid->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) && !wid->inherits(TQSPLITTER_OBJECT_NAME_STRING)) { insertParent = WidgetFactory::containerOfWidget(wid); // found another parent, store it break; @@ -881,15 +881,15 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w) for (TQMap < ulong, TQPoint >::Iterator it = moving.begin(); it != moving.end(); ++it) { TQWidget *i = (TQWidget *) it.key(); - if (!emitSelChanged && i->inherits("TQButton")) + if (!emitSelChanged && i->inherits(TQBUTTON_OBJECT_NAME_STRING)) { - if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup") || - wa->inherits("TQButtonGroup")) + if (i->parentWidget() && i->parentWidget()->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING) || + wa->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING)) emitSelChanged = true; - if (!wa->inherits("TQButtonGroup")) + if (!wa->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING)) { MetaDataBase::setPropertyChanged(i, "buttonGroupId", false); - if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup")) + if (i->parentWidget() && i->parentWidget()->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING)) ((TQButtonGroup *) i->parentWidget())->remove((TQButton *) i); } } @@ -1061,7 +1061,7 @@ void FormWindow::handleKeyPress(TQKeyEvent * e, TQWidget * w) } if (!e->isAccepted()) { - TQObjectList *l = queryList("TQWidget"); + TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING); if (!l) return; if (l->find(w) != -1) @@ -1096,7 +1096,7 @@ void FormWindow::selectWidget(TQObject * o, bool select) return; } - if (mainContainer()->inherits("TQMainWindow") && + if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) && w == ((TQMainWindow *) mainContainer())->centralWidget()) { TQObject *opw = propertyWidget; @@ -1281,7 +1281,7 @@ void FormWindow::endRectDraw() void FormWindow::selectWidgets() { - TQObjectList *l = mainContainer()->queryList("TQWidget"); + TQObjectList *l = mainContainer()->queryList(TQWIDGET_OBJECT_NAME_STRING); if (l) { for (TQObject * o = l->first(); o; o = l->next()) @@ -1340,7 +1340,7 @@ void FormWindow::redo() void FormWindow::raiseChildSelections(TQWidget * w) { - TQObjectList *l = w->queryList("TQWidget"); + TQObjectList *l = w->queryList(TQWIDGET_OBJECT_NAME_STRING); if (!l || !l->first()) { delete l; @@ -1358,7 +1358,7 @@ void FormWindow::raiseChildSelections(TQWidget * w) void FormWindow::updateChildSelections(TQWidget * w) { - TQObjectList *l = w->queryList("TQWidget"); + TQObjectList *l = w->queryList(TQWIDGET_OBJECT_NAME_STRING); if (l) { for (TQObject * o = l->first(); o; o = l->next()) @@ -1374,7 +1374,7 @@ void FormWindow::checkSelectionsForMove(TQWidget * w) { checkedSelectionsForMove = true; - TQObjectList *l = w->parentWidget()->queryList("TQWidget", 0, false, false); + TQObjectList *l = w->parentWidget()->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, false); moving.clear(); if (l) { @@ -1686,7 +1686,7 @@ void FormWindow::showOrderIndicators() { hideOrderIndicators(); orderIndicators.setAutoDelete(true); - TQObjectList *l = mainContainer()->queryList("TQWidget"); + TQObjectList *l = mainContainer()->queryList(TQWIDGET_OBJECT_NAME_STRING); stackedWidgets = MetaDataBase::tabOrder(this); if (l) { @@ -1811,7 +1811,7 @@ static void find_accel(const TQString & txt, TQMap < TQChar, TQWidgetList > &acc void FormWindow::checkAccels() { TQMap < TQChar, TQWidgetList > accels; - TQObjectList *l = mainContainer()->queryList("TQWidget"); + TQObjectList *l = mainContainer()->queryList(TQWIDGET_OBJECT_NAME_STRING); if (l) { for (TQObject * o = l->first(); o; o = l->next()) @@ -1883,7 +1883,7 @@ void FormWindow::selectAll() { checkedSelectionsForMove = false; blockSignals(true); - TQObjectList *l = mainContainer()->queryList("TQWidget"); + TQObjectList *l = mainContainer()->queryList(TQWIDGET_OBJECT_NAME_STRING); if (l) { for (TQObject * o = l->first(); o; o = l->next()) @@ -2041,7 +2041,7 @@ void FormWindow::breakLayout(TQWidget * w) Command *cmd = breakLayoutCommand(w); if (cmd) commands.insert(0, cmd); - if (!w->inherits("QLayoutWidget") && !w->inherits("TQSplitter")) + if (!w->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) && !w->inherits(TQSPLITTER_OBJECT_NAME_STRING)) break; } w = w->parentWidget(); @@ -2093,7 +2093,7 @@ bool FormWindow::hasInsertedChildren(TQWidget *w) const w = WidgetFactory::containerOfWidget(w); if (!w) return false; - TQObjectList *l = w->queryList("TQWidget"); + TQObjectList *l = w->queryList(TQWIDGET_OBJECT_NAME_STRING); if (!l || !l->first()) { delete l; @@ -2291,7 +2291,7 @@ bool FormWindow::unify(TQObject *w, TQString &s, bool changeIt) TQAction *a = 0; for (a = actions.first(); a; a = actions.next()) { - TQObjectList *l = a->queryList("TQAction"); + TQObjectList *l = a->queryList(TQACTION_OBJECT_NAME_STRING); al.append(a); for (TQObject *ao = l->first(); ao; ao = l->next()) al.append((TQAction*)ao); @@ -2310,11 +2310,11 @@ bool FormWindow::unify(TQObject *w, TQString &s, bool changeIt) } } - if (mainContainer()->inherits("TQMainWindow")) + if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) { if (!found) { - TQObjectList *l = mainContainer()->queryList("TQDockWindow", 0, true); + TQObjectList *l = mainContainer()->queryList(TQDOCKWINDOW_OBJECT_NAME_STRING, 0, true); for (TQObject *o = l->first(); o; o = l->next()) if (o != w && !qstrcmp(o->name(), s.latin1())) { @@ -2361,7 +2361,7 @@ bool FormWindow::isDatabaseWidgetUsed() const { #ifndef QT_NO_SQL TQStringList dbClasses; - dbClasses << "TQDataTable"; // add more here + dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here TQPtrDictIterator<TQWidget> it(insertedWidgets); for (; it.current(); ++it) { @@ -2451,9 +2451,9 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf) } for (; it.current(); ++it) { - if (it.current()->inherits("QLayoutWidget")) + if (it.current()->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING)) continue; - if (it.current()->inherits("TQSplitter")) + if (it.current()->inherits(TQSPLITTER_OBJECT_NAME_STRING)) continue; if (!it.current()->isVisibleTo(this)) continue; @@ -2546,7 +2546,7 @@ TQAction *FormWindow::findAction(const TQString &name) { if (TQString(a->name()) == name) return a; - TQAction *ac = (TQAction*)a->child(name.latin1(), "TQAction"); + TQAction *ac = (TQAction*)a->child(name.latin1(), TQACTION_OBJECT_NAME_STRING); if (ac) return ac; } @@ -2555,7 +2555,7 @@ TQAction *FormWindow::findAction(const TQString &name) void FormWindow::killAccels(TQObject *top) { - TQObjectList *l = top->queryList("TQAccel"); + TQObjectList *l = top->queryList(TQACCEL_OBJECT_NAME_STRING); if (!l) return; for (TQObject *o = l->first(); o; o = l->next()) @@ -2565,7 +2565,7 @@ void FormWindow::killAccels(TQObject *top) bool FormWindow::isCentralWidget(TQObject *w) const { - if (!mainContainer()->inherits("TQMainWindow")) + if (!mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) return false; return w == ((TQMainWindow*)mainContainer())->centralWidget(); } |