diff options
author | ormorph <roma251078@mail.ru> | 2020-08-27 19:48:01 +0300 |
---|---|---|
committer | ormorph <roma251078@mail.ru> | 2020-08-27 19:48:01 +0300 |
commit | ae3ed3d32920f5780af51aad9683b82179e9655d (patch) | |
tree | 7ee0468d90507a69359f9b5e6d1e15c4d05c67bd /kommander/editor/formwindow.cpp | |
parent | 20fd79e5f4ac230cc4f6da008605be225f8b3399 (diff) | |
download | tdewebdev-ae3ed3d32920f5780af51aad9683b82179e9655d.tar.gz tdewebdev-ae3ed3d32920f5780af51aad9683b82179e9655d.zip |
Rename *OBJECT_NAME_STRING
Signed-off-by: ormorph <roma251078@mail.ru>
Diffstat (limited to 'kommander/editor/formwindow.cpp')
-rw-r--r-- | kommander/editor/formwindow.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp index 70796291..ea76109e 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_OBJECT_NAME_STRING), this); + TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQFrame"), this); setMainContainer(w); propertyWidget = TQT_TQOBJECT(w); targetContainer = 0; @@ -297,7 +297,7 @@ void FormWindow::insertWidget() bool useSizeHint = !oldRectValid || (currRect.width() < 2 && currRect.height() < 2); Qt::Orientation orient =Qt::Horizontal; TQString n = WidgetDatabase::className(currTool); - if (useSizeHint && (n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING)) { + if (useSizeHint && (n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar")) { 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_OBJECT_NAME_STRING) && + if (mainContainer()->inherits("TQMainWindow") && ((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_OBJECT_NAME_STRING); + TQObjectList *l = w->queryList("TQWidget"); 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(TQT_TQOBJECT(wid))); if ((WidgetDatabase::isContainer(id) || wid == mainContainer()) && - !wid->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) && !wid->inherits(TQSPLITTER_OBJECT_NAME_STRING)) + !wid->inherits("TQLayoutWidget") && !wid->inherits("TQSplitter")) { insertParent = WidgetFactory::containerOfWidget(wid); // found another parent, store it break; @@ -795,7 +795,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w) wid = designerWidget(TQT_TQOBJECT(wid)); if (wid && (isMainContainer(TQT_TQOBJECT(wid)) || insertedWidgets.find(wid)) && wid->isVisibleTo(this)) newReceiver = wid; - if (newReceiver && (newReceiver->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) + if (newReceiver && (newReceiver->inherits("TQLayoutWidget") || newReceiver->inherits("Spacer"))) newReceiver = (TQWidget*)connectReceiver; drawRecRect = TQT_BASE_OBJECT(newReceiver) != TQT_BASE_OBJECT(connectReceiver); @@ -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_OBJECT_NAME_STRING)) + if (!emitSelChanged && i->inherits("TQButton")) { - if (i->parentWidget() && i->parentWidget()->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING) || - wa->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING)) + if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup") || + wa->inherits("TQButtonGroup")) emitSelChanged = true; - if (!wa->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING)) + if (!wa->inherits("TQButtonGroup")) { MetaDataBase::setPropertyChanged(TQT_TQOBJECT(i), "buttonGroupId", false); - if (i->parentWidget() && i->parentWidget()->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING)) + if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup")) ((TQButtonGroup *) i->parentWidget())->remove((TQButton *) i); } } @@ -1061,7 +1061,7 @@ void FormWindow::handleKeyPress(TQKeyEvent * e, TQWidget * w) } if (!e->isAccepted()) { - TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING); + TQObjectList *l = queryList("TQWidget"); if (!l) return; if (l->find(TQT_TQOBJECT(w)) != -1) @@ -1096,7 +1096,7 @@ void FormWindow::selectWidget(TQObject * o, bool select) return; } - if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) && + if (mainContainer()->inherits("TQMainWindow") && w == ((TQMainWindow *) mainContainer())->centralWidget()) { TQObject *opw = propertyWidget; @@ -1281,7 +1281,7 @@ void FormWindow::endRectDraw() void FormWindow::selectWidgets() { - TQObjectList *l = mainContainer()->queryList(TQWIDGET_OBJECT_NAME_STRING); + TQObjectList *l = mainContainer()->queryList("TQWidget"); 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_OBJECT_NAME_STRING); + TQObjectList *l = w->queryList("TQWidget"); 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_OBJECT_NAME_STRING); + TQObjectList *l = w->queryList("TQWidget"); 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_OBJECT_NAME_STRING, 0, false, false); + TQObjectList *l = w->parentWidget()->queryList("TQWidget", 0, false, false); moving.clear(); if (l) { @@ -1686,7 +1686,7 @@ void FormWindow::showOrderIndicators() { hideOrderIndicators(); orderIndicators.setAutoDelete(true); - TQObjectList *l = mainContainer()->queryList(TQWIDGET_OBJECT_NAME_STRING); + TQObjectList *l = mainContainer()->queryList("TQWidget"); 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_OBJECT_NAME_STRING); + TQObjectList *l = mainContainer()->queryList("TQWidget"); 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_OBJECT_NAME_STRING); + TQObjectList *l = mainContainer()->queryList("TQWidget"); 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(TQLAYOUTWIDGET_OBJECT_NAME_STRING) && !w->inherits(TQSPLITTER_OBJECT_NAME_STRING)) + if (!w->inherits("TQLayoutWidget") && !w->inherits("TQSplitter")) 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_OBJECT_NAME_STRING); + TQObjectList *l = w->queryList("TQWidget"); 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_OBJECT_NAME_STRING); + TQObjectList *l = a->queryList("TQAction"); 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_OBJECT_NAME_STRING)) + if (mainContainer()->inherits("TQMainWindow")) { if (!found) { - TQObjectList *l = mainContainer()->queryList(TQDOCKWINDOW_OBJECT_NAME_STRING, 0, true); + TQObjectList *l = mainContainer()->queryList("TQDockWindow", 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 TQT_NO_SQL TQStringList dbClasses; - dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here + dbClasses << "TQDataTable"; // 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(TQLAYOUTWIDGET_OBJECT_NAME_STRING)) + if (it.current()->inherits("TQLayoutWidget")) continue; - if (it.current()->inherits(TQSPLITTER_OBJECT_NAME_STRING)) + if (it.current()->inherits("TQSplitter")) 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_OBJECT_NAME_STRING); + TQAction *ac = (TQAction*)a->child(name.latin1(), "TQAction"); if (ac) return ac; } @@ -2555,7 +2555,7 @@ TQAction *FormWindow::findAction(const TQString &name) void FormWindow::killAccels(TQObject *top) { - TQObjectList *l = top->queryList(TQACCEL_OBJECT_NAME_STRING); + TQObjectList *l = top->queryList("TQAccel"); 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_OBJECT_NAME_STRING)) + if (!mainContainer()->inherits("TQMainWindow")) return false; return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(((TQMainWindow*)mainContainer())->centralWidget()); } |