diff options
author | Michele Calgaro <[email protected]> | 2023-12-21 11:50:29 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-12-21 19:38:32 +0900 |
commit | 9e553028bac0f0d934926318a7b13aa4d8474b27 (patch) | |
tree | 363c971f334f9b91813928c97867a113f34431d5 /kommander/editor/mainwindow.cpp | |
parent | 13d63148446745909c8ba4b1b68f99e4291cf0cd (diff) | |
download | tdewebdev-9e553028bac0f0d934926318a7b13aa4d8474b27.tar.gz tdewebdev-9e553028bac0f0d934926318a7b13aa4d8474b27.zip |
Replace various '#define' strings - part 6
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kommander/editor/mainwindow.cpp')
-rw-r--r-- | kommander/editor/mainwindow.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index c584e3f9..f9dbac46 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -199,7 +199,7 @@ MainWindow::MainWindow(bool asClient) w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQFrame"), this, 0, false); delete w; - assistant = new AssistProc(TQT_TQOBJECT(this), "Internal Assistant", assistantPath()); + assistant = new AssistProc(this, "Internal Assistant", assistantPath()); statusBar()->setSizeGripEnabled(true); SpecialInformation::registerSpecials(); @@ -425,7 +425,7 @@ void MainWindow::runForm() while ((editor = it.current()) != 0L) { ++it; - static_cast<AssocTextEditor*>(TQT_TQWIDGET(editor))->save(); + static_cast<AssocTextEditor*>(editor)->save(); } delete editors; @@ -498,9 +498,9 @@ void MainWindow::showProperties(TQObject *o) } TQWidget *w = (TQWidget*)o; setupHierarchyView(); - FormWindow *fw = (FormWindow*)isAFormWindowChild(TQT_TQOBJECT(w)); + FormWindow *fw = (FormWindow*)isAFormWindowChild(w); if (fw) { - propertyEditor->setWidget(TQT_TQOBJECT(w), fw); + propertyEditor->setWidget(w, fw); hierarchyView->setFormWindow(fw, w); } else { propertyEditor->setWidget(0, 0); @@ -582,7 +582,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e) TQWidget *pw = w->parentWidget(); while (pw) { if (pw->inherits("FormWindow")) { - ((FormWindow*)pw)->emitShowProperties(TQT_TQOBJECT(w)); + ((FormWindow*)pw)->emitShowProperties(w); if (!o->inherits("QDesignerToolBar")) return !o->inherits("TQToolButton") && !o->inherits("TQMenuBar") && !o->inherits("TQComboBox") && !o->inherits("QDesignerToolBarSeparator"); @@ -684,8 +684,8 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e) case TQEvent::Hide: if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator")) break; - if (((FormWindow*)w)->isWidgetSelected(TQT_TQOBJECT(o))) - ((FormWindow*)w)->selectWidget(TQT_TQOBJECT(o), false); + if (((FormWindow*)w)->isWidgetSelected(o)) + ((FormWindow*)w)->selectWidget(o, false); break; case TQEvent::Enter: case TQEvent::Leave: @@ -821,7 +821,7 @@ void MainWindow::insertFormWindow(FormWindow *fw) fw->mainContainer()->setCaption(fw->caption()); WidgetFactory::saveDefaultProperties(fw->mainContainer(), WidgetDatabase:: - idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(fw->mainContainer())))); + idFromClassName(WidgetFactory::classNameOf(fw->mainContainer()))); activeWindowChanged(fw); emit formWindowsChanged(); } @@ -1032,7 +1032,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString, ids << (id = rmbWidgets->insertItem(i18n("Add Page"), -1, 0)); commands.insert("add", id); } - if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) + if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) { if (ids.isEmpty()) ids << rmbWidgets->insertSeparator(0); @@ -1098,48 +1098,48 @@ void MainWindow::handleRMBProperties(int id, TQMap<TQString, int> &props, TQWidg } if (ok) { TQString pn(i18n("Set the 'text' of '%1'").arg(w->name())); - SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor, "text", w->property("text"), text, TQString(), TQString()); cmd->execute(); formWindow()->commandHistory()->addCommand(cmd); - MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "text", true); + MetaDataBase::setPropertyChanged(w, "text", true); } } else if (id == props[ "title" ]) { bool ok = false; TQString title = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this); if (ok) { TQString pn(i18n("Set the 'title' of '%1'").arg(w->name())); - SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor, "title", w->property("title"), title, TQString(), TQString()); cmd->execute(); formWindow()->commandHistory()->addCommand(cmd); - MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "title", true); + MetaDataBase::setPropertyChanged(w, "title", true); } } else if (id == props[ "pagetitle" ]) { bool ok = false; TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), w->property("pageTitle").toString(), &ok, this); if (ok) { TQString pn(i18n("Set the 'pageTitle' of '%1'").arg(w->name())); - SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor, "pageTitle", w->property("pageTitle"), text, TQString(), TQString()); cmd->execute(); formWindow()->commandHistory()->addCommand(cmd); - MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "pageTitle", true); + MetaDataBase::setPropertyChanged(w, "pageTitle", true); } } else if (id == props[ "pixmap" ]) { TQPixmap oldPix = TQVariant(w->property("pixmap")).toPixmap(); TQPixmap pix = qChoosePixmap(this, formWindow(), oldPix); if (!pix.isNull()) { TQString pn(i18n("Set the 'pixmap' of '%1'").arg(w->name())); - SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor, "pixmap", w->property("pixmap"), pix, TQString(), TQString()); cmd->execute(); formWindow()->commandHistory()->addCommand(cmd); - MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "pixmap", true); + MetaDataBase::setPropertyChanged(w, "pixmap", true); } } } @@ -1191,9 +1191,9 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands } } } - if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) { + if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) { if (id == commands[ "edit" ]) - WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))), this, w, formWindow()); + WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)), this, w, formWindow()); } } @@ -1318,7 +1318,7 @@ void MainWindow::selectionChanged() breakLayout = laidout > 0; } else if (selectedWidgets == 1) { TQWidget *w = widgets.first(); - bool isContainer = WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w)))) || + bool isContainer = WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))) || w == formWindow()->mainContainer(); actionEditAdjustSize->setEnabled(!w->parentWidget() || WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout); @@ -1328,7 +1328,7 @@ void MainWindow::selectionChanged() actionEditVLayout->setEnabled(false); actionEditGridLayout->setEnabled(false); if (w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout) { - actionEditBreakLayout->setEnabled(!isAToolBarChild(TQT_TQOBJECT(w))); + actionEditBreakLayout->setEnabled(!isAToolBarChild(w)); breakLayout = true; } else { actionEditBreakLayout->setEnabled(false); @@ -1348,14 +1348,14 @@ void MainWindow::selectionChanged() layoutChilds = true; } if (w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout) { - actionEditBreakLayout->setEnabled(!isAToolBarChild(TQT_TQOBJECT(w))); + actionEditBreakLayout->setEnabled(!isAToolBarChild(w)); breakLayout = true; } } else { actionEditHLayout->setEnabled(false); actionEditVLayout->setEnabled(false); actionEditGridLayout->setEnabled(false); - actionEditBreakLayout->setEnabled(!isAToolBarChild(TQT_TQOBJECT(w))); + actionEditBreakLayout->setEnabled(!isAToolBarChild(w)); breakLayout = true; } } @@ -1564,9 +1564,9 @@ ActionEditor *MainWindow::actioneditor() const bool MainWindow::openEditor(TQWidget* w, FormWindow*) { - if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) { + if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) { statusBar()->message(i18n("Edit %1...").arg(w->className())); - WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))), this, w, formWindow()); + WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)), this, w, formWindow()); statusBar()->clear(); return true; } @@ -1584,12 +1584,12 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*) } if (ok) { TQString pn(i18n("Set the 'text' of '%2'").arg(w->name())); - SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor, "text", w->property("text"), text, TQString(), TQString()); cmd->execute(); formWindow()->commandHistory()->addCommand(cmd); - MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "text", true); + MetaDataBase::setPropertyChanged(w, "text", true); } return true; } @@ -1599,12 +1599,12 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*) text = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this); if (ok) { TQString pn(i18n("Set the 'title' of '%2'").arg(w->name())); - SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor, "title", w->property("title"), text, TQString(), TQString()); cmd->execute(); formWindow()->commandHistory()->addCommand(cmd); - MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "title", true); + MetaDataBase::setPropertyChanged(w, "title", true); } return true; } |