diff options
Diffstat (limited to 'kommander/editor/mainwindow.cpp')
-rw-r--r-- | kommander/editor/mainwindow.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index 67d1e311..22969a3b 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -48,7 +48,7 @@ #include <tqaccel.h> #include <tqbuffer.h> -#include <clipboard.h> +#include <tqclipboard.h> #include <tqdir.h> #include <tqfeatures.h> #include <tqfile.h> @@ -368,7 +368,7 @@ int MainWindow::currentTool() const { if (!actionCurrentTool) return POINTER_TOOL; - return TQString::fromLatin1(actionCurrentTool->name()).toInt(); + return TQString::tqfromLatin1(actionCurrentTool->name()).toInt(); } void MainWindow::slotCreateBackups() @@ -392,7 +392,7 @@ void MainWindow::slotCreateBackups() form->formFile()->setModified(true); if (!form->formFile()->save(false)) { - KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").arg(backupName)); + KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").tqarg(backupName)); } form->formFile()->setFileName(fileName); form->formFile()->setModified(modified); @@ -436,7 +436,7 @@ void MainWindow::runForm() ::stat(m_fileName.local8Bit(), &statbuf); if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true)) { - KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").arg(m_backupName)); + KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").tqarg(m_backupName)); return; } form->formFile()->setFileName(m_fileName); @@ -446,12 +446,12 @@ void MainWindow::runForm() { if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true)) { - KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").arg(m_fileName + ".backup")); + KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").tqarg(m_fileName + ".backup")); } ::chmod(m_fileName.local8Bit(), S_IRWXU); KProcess* process = new KProcess; process->setUseShell(true); - (*process) << "kmdr-executor" << TQString("\"%1\"").arg(form->formFile()->fileName()); + (*process) << "kmdr-executor" << TQString("\"%1\"").tqarg(form->formFile()->fileName()); connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog, TQT_SLOT(receivedStdout(KProcess*, char*, int))); connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog, @@ -500,7 +500,7 @@ void MainWindow::runForm4() ::stat(m_fileName.local8Bit(), &statbuf); if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true)) { - KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").arg(m_backupName)); + KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").tqarg(m_backupName)); return; } form->formFile()->setFileName(m_fileName); @@ -510,12 +510,12 @@ void MainWindow::runForm4() { if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true)) { - KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").arg(m_fileName + ".backup")); + KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").tqarg(m_fileName + ".backup")); } ::chmod(m_fileName.local8Bit(), S_IRWXU); KProcess* process = new KProcess; process->setUseShell(true); - (*process) << "kommander" << TQString("\"%1\"").arg(form->formFile()->fileName()); + (*process) << "kommander" << TQString("\"%1\"").tqarg(form->formFile()->fileName()); connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog, TQT_SLOT(receivedStdout(KProcess*, char*, int))); connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog, @@ -848,7 +848,7 @@ void MainWindow::insertFormWindow(FormWindow *fw) { if (fw) TQWhatsThis::add(fw, i18n("<b>The Form Window</b>" - "<p>Use the various tools to add widgets or to change the layout " + "<p>Use the various tools to add widgets or to change the tqlayout " "and behavior of the components in the form. Select one or multiple " "widgets to move them or lay them out. If a single widget is chosen it can " "be resized using the resize handles.</p>" @@ -952,11 +952,11 @@ void MainWindow::updateUndoRedo(bool undoAvailable, bool redoAvailable, actionEditUndo->setEnabled(undoAvailable); actionEditRedo->setEnabled(redoAvailable); if (!undoCmd.isEmpty()) - actionEditUndo->setText(i18n("&Undo: %1").arg(undoCmd)); + actionEditUndo->setText(i18n("&Undo: %1").tqarg(undoCmd)); else actionEditUndo->setText(i18n("&Undo: Not Available")); if (!redoCmd.isEmpty()) - actionEditRedo->setText(i18n("&Redo: %1").arg(redoCmd)); + actionEditRedo->setText(i18n("&Redo: %1").tqarg(redoCmd)); else actionEditRedo->setText(i18n("&Redo: Not Available")); @@ -1012,18 +1012,18 @@ void MainWindow::popupWidgetMenu(const TQPoint &gp, FormWindow * /*fw*/, TQWidge void MainWindow::setupRMBProperties(TQValueList<int> &ids, TQMap<TQString, int> &props, TQWidget *w) { - const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true); + const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("text", true), true); if (text && qstrcmp(text->type(), TQSTRING_OBJECT_NAME_STRING) != 0) text = 0; - const TQMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true); + const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("title", true), true); if (title && qstrcmp(title->type(), TQSTRING_OBJECT_NAME_STRING) != 0) title = 0; const TQMetaProperty* pagetitle = - w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("pageTitle", true), true); if (pagetitle && qstrcmp(pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0) pagetitle = 0; const TQMetaProperty* pixmap = - w->metaObject()->property(w->metaObject()->findProperty("pixmap", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("pixmap", true), true); if (pixmap && qstrcmp(pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0) pixmap = 0; @@ -1153,7 +1153,7 @@ void MainWindow::handleRMBProperties(int id, TQMap<TQString, int> &props, TQWidg text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this); } if (ok) { - TQString pn(i18n("Set the 'text' of '%1'").arg(w->name())); + TQString pn(i18n("Set the 'text' of '%1'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "text", w->property("text"), text, TQString(), TQString()); @@ -1165,7 +1165,7 @@ void MainWindow::handleRMBProperties(int id, TQMap<TQString, int> &props, TQWidg 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())); + TQString pn(i18n("Set the 'title' of '%1'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "title", w->property("title"), title, TQString(), TQString()); @@ -1177,7 +1177,7 @@ void MainWindow::handleRMBProperties(int id, TQMap<TQString, int> &props, TQWidg 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())); + TQString pn(i18n("Set the 'pageTitle' of '%1'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "pageTitle", w->property("pageTitle"), text, TQString(), TQString()); @@ -1189,7 +1189,7 @@ void MainWindow::handleRMBProperties(int id, TQMap<TQString, int> &props, TQWidg 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())); + TQString pn(i18n("Set the 'pixmap' of '%1'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "pixmap", w->property("pixmap"), pix, TQString(), TQString()); @@ -1214,7 +1214,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands if (w->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) { TQTabWidget *tw = (TQTabWidget*)w; if (id == commands[ "add" ]) { - AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(), + AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").tqarg(tw->name()), formWindow(), tw, "Tab"); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1222,7 +1222,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands if (tw->currentPage()) { QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; DeleteTabPageCommand *cmd = new DeleteTabPageCommand(i18n("Delete Page %1 of %2"). - arg(dtw->pageTitle()).arg(tw->name()), + tqarg(dtw->pageTitle()).tqarg(tw->name()), formWindow(), tw, tw->currentPage()); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1232,7 +1232,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands if (w->inherits(TQTOOLBOX_OBJECT_NAME_STRING)) { TQToolBox *tw = (TQToolBox*)w; if (id == commands[ "add" ]) { - AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(), + AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").tqarg(tw->name()), formWindow(), tw, "Page"); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1240,7 +1240,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands if (tw->currentItem()) { EditorToolBox *dtw = (EditorToolBox*)tw; DeleteToolBoxPageCommand *cmd = new DeleteToolBoxPageCommand(i18n("Delete Page %1 of %2"). - arg(dtw->pageTitle()).arg(tw->name()), + tqarg(dtw->pageTitle()).tqarg(tw->name()), formWindow(), tw, tw->currentItem()); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1267,7 +1267,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands if (fw->mainContainer()->inherits(TQWIZARD_OBJECT_NAME_STRING)) { TQWizard *wiz = (TQWizard*)fw->mainContainer(); if (id == commands[ "add" ]) { - AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").arg(wiz->name()), formWindow(), + AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").tqarg(wiz->name()), formWindow(), wiz, "Page"); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1275,7 +1275,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands if (wiz->currentPage()) { QDesignerWizard *dw = (QDesignerWizard*)wiz; DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand(i18n("Delete Page %1 of %2"). - arg(dw->pageTitle()).arg(wiz->name()), + tqarg(dw->pageTitle()).tqarg(wiz->name()), formWindow(), wiz, wiz->indexOf(wiz->currentPage())); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1290,7 +1290,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands QDesignerWizard *dw = (QDesignerWizard*)wiz; TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), dw->pageTitle(), &ok, this); if (ok) { - TQString pn(i18n("Rename page %1 of %2").arg(dw->pageTitle()).arg(wiz->name())); + TQString pn(i18n("Rename page %1 of %2").tqarg(dw->pageTitle()).tqarg(wiz->name())); RenameWizardPageCommand *cmd = new RenameWizardPageCommand(pn, formWindow() , wiz, wiz->indexOf(wiz->currentPage()), text); formWindow()->commandHistory()->addCommand(cmd); @@ -1300,11 +1300,11 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands } else if (fw->mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) { TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); if (id == commands[ "add_toolbar" ]) { - AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").arg(formWindow()->name()), formWindow(), mw); + AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").tqarg(formWindow()->name()), formWindow(), mw); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); } else if (id == commands[ "add_menu_item" ]) { - AddMenuCommand *cmd = new AddMenuCommand(i18n("Add Menu to '%1'").arg(formWindow()->name()), formWindow(), mw); + AddMenuCommand *cmd = new AddMenuCommand(i18n("Add Menu to '%1'").tqarg(formWindow()->name()), formWindow(), mw); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); } @@ -1621,14 +1621,14 @@ ActionEditor *MainWindow::actioneditor() const bool MainWindow::openEditor(TQWidget* w, FormWindow*) { if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) { - statusBar()->message(i18n("Edit %1...").arg(w->className())); + statusBar()->message(i18n("Edit %1...").tqarg(w->className())); WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))), this, w, formWindow()); statusBar()->clear(); return true; } - const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true); - const TQMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true); + const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("text", true), true); + const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("title", true), true); if (text && text->designable(w)) { bool ok = false; TQString text; @@ -1639,7 +1639,7 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*) text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this); } if (ok) { - TQString pn(i18n("Set the 'text' of '%2'").arg(w->name())); + TQString pn(i18n("Set the 'text' of '%2'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "text", w->property("text"), text, TQString(), TQString()); @@ -1654,7 +1654,7 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*) TQString text; 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())); + TQString pn(i18n("Set the 'title' of '%2'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "title", w->property("title"), text, TQString(), TQString()); @@ -1756,7 +1756,7 @@ void MainWindow::checkTempFiles() void MainWindow::showDialogHelp() { TQWidget *w = (TQWidget*)sender(); - w = w->topLevelWidget(); + w = w->tqtopLevelWidget(); TQString link = "designer-manual-12.html#"; |