diff options
Diffstat (limited to 'quanta/dialogs/actionconfigdialog.cpp')
-rw-r--r-- | quanta/dialogs/actionconfigdialog.cpp | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/quanta/dialogs/actionconfigdialog.cpp b/quanta/dialogs/actionconfigdialog.cpp index de63fc3e..d823fc1f 100644 --- a/quanta/dialogs/actionconfigdialog.cpp +++ b/quanta/dialogs/actionconfigdialog.cpp @@ -50,10 +50,10 @@ #include "tagaction.h" #include "toolbartabwidget.h" -ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, KMainWindow* parent, const char* name, bool modal, WFlags fl, const TQString& defaultAction ) - :ActionConfigDialogS( parent, name, modal, fl ) +ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, KMainWindow* tqparent, const char* name, bool modal, WFlags fl, const TQString& defaultAction ) + :ActionConfigDialogS( tqparent, name, modal, fl ) { - m_mainWindow = parent; + m_mainWindow = tqparent; m_toolbarList = toolbarList; buttonOk->setIconSet(SmallIconSet("button_ok")); buttonCancel->setIconSet(SmallIconSet("button_cancel")); @@ -89,7 +89,7 @@ ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, for (int i = 0; i < tb->count(); i++) { toolbarName = tb->label(i); - toolbarName.replace(r, ""); + toolbarName.tqreplace(r, ""); item = new KListViewItem(actionTreeView, oldItem, i18n(toolbarName.utf8())); actionTreeView->insertItem(item); @@ -106,13 +106,13 @@ ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, action = ac->action(node.toElement().attribute("name").ascii()); if (action) { - oldActionItem = new KListViewItem(item, oldActionItem, action->text().replace(r,""), action->shortcut().toString(), action->name()); + oldActionItem = new KListViewItem(item, oldActionItem, action->text().tqreplace(r,""), action->shortcut().toString(), action->name()); oldActionItem->setPixmap(0, SmallIcon(action->icon()) ); } } node = node.nextSibling(); } - if (tb->label(tb->currentPageIndex()).replace(r, "") == toolbarName) + if (tb->label(tb->currentPageIndex()).tqreplace(r, "") == toolbarName) { item->setOpen(true); if (item->firstChild()) @@ -142,7 +142,7 @@ ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, for (uint i = 0; i < acCount; i++) { action = ac->action(i); - item = new KListViewItem(allActionsItem, action->text().replace(r, ""), action->shortcut().toString(), action->name()); + item = new KListViewItem(allActionsItem, action->text().tqreplace(r, ""), action->shortcut().toString(), action->name()); item->setPixmap(0, SmallIcon(action->icon()) ); } allActionsItem->sortChildItems(0, true); @@ -168,11 +168,11 @@ void ActionConfigDialog::slotAddToolbar() for (int i = 0; i < tb->count(); i++) { toolbarName = tb->label(i); - if (!actionTreeView->findItem(toolbarName, 0)) + if (!actionTreeView->tqfindItem(toolbarName, 0)) { item = actionTreeView->lastItem(); - if (item->parent()) - item = item->parent(); + if (item->tqparent()) + item = item->tqparent(); new KListViewItem(actionTreeView, item, i18n(toolbarName.utf8())); break; } @@ -183,14 +183,14 @@ void ActionConfigDialog::slotRemoveToolbar() { TQListViewItem *item = actionTreeView->currentItem(); TQString s = item->text(0); - if (item->parent()) + if (item->tqparent()) { - item = item->parent(); + item = item->tqparent(); s = item->text(0); } if (s != i18n("All")) { - if ( KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the \"%1\" toolbar?").arg(s),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue ) + if ( KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the \"%1\" toolbar?").tqarg(s),TQString(),KStdGuiItem::del()) == KMessageBox::Continue ) { m_toolbarItem = item; connect(m_mainWindow, TQT_SIGNAL(toolbarRemoved(const TQString&)), TQT_SLOT(slotToolbarRemoved(const TQString&))); @@ -213,8 +213,8 @@ void ActionConfigDialog::slotEditToolbar() TQString toolbarId; TQListViewItem *oldItem; TQListViewItem *item = actionTreeView->currentItem(); - if (item->parent()) - item = item->parent(); + if (item->tqparent()) + item = item->tqparent(); toolbarName = item->text(0); if ( toolbarName != i18n("All")) { @@ -231,7 +231,7 @@ void ActionConfigDialog::slotEditToolbar() ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; if (p_toolbar) { - oldItem = actionTreeView->findItem(toolbarName, 0); + oldItem = actionTreeView->tqfindItem(toolbarName, 0); item = new KListViewItem(actionTreeView, oldItem, toolbarName); item->setOpen(oldItem->isOpen()); delete oldItem; @@ -243,7 +243,7 @@ void ActionConfigDialog::slotEditToolbar() action = ac->action(node.toElement().attribute("name").ascii()); if (action) { - oldItem = new KListViewItem(item, oldItem, action->text().replace(TQRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name()); + oldItem = new KListViewItem(item, oldItem, action->text().tqreplace(TQRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name()); oldItem->setPixmap(0, SmallIcon(action->icon())); } } @@ -266,7 +266,7 @@ void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item) if (currentAction && currentAction->inherits("TagAction")) { if ( buttonApply->isEnabled() && - KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) + KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) { saveCurrentAction(); } @@ -309,7 +309,7 @@ void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item) actionIcon->setIcon(s); } TQString actionText = el.attribute("text"); - actionText.replace(TQRegExp("\\&(?!\\&)"),""); + actionText.tqreplace(TQRegExp("\\&(?!\\&)"),""); lineText->setText(actionText); lineToolTip->setText( el.attribute("tooltip") ); selectedShortcut = action->shortcut(); @@ -344,7 +344,7 @@ void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item) node.toElement().attribute("name") == el.attribute("name")) { toolbarListBox->insertItem(toolbarName); - if (item->parent()->text(0) == toolbarName) + if (item->tqparent()->text(0) == toolbarName) current = count; count++; } @@ -406,7 +406,7 @@ void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item) { outputBox->setCurrentItem(2); } else - if (s == "replace") + if (s == "tqreplace") { outputBox->setCurrentItem(3); } else @@ -431,7 +431,7 @@ void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item) { errorBox->setCurrentItem(2); } else - if (s == "replace") + if (s == "tqreplace") { errorBox->setCurrentItem(3); } else @@ -472,7 +472,7 @@ void ActionConfigDialog::saveCurrentAction() currentAction->setIcon(s); TQString oldText = el.attribute("text"); s = lineText->text(); - s.replace('&', "&&"); + s.tqreplace('&', "&&"); el.setAttribute("text", s); currentAction->setText(s); s = lineToolTip->text(); @@ -549,7 +549,7 @@ void ActionConfigDialog::saveCurrentAction() case 2:{ item.setAttribute("output", "selection"); break; } - case 3:{ item.setAttribute("output", "replace"); + case 3:{ item.setAttribute("output", "tqreplace"); break; } case 4:{ item.setAttribute("output", "new"); @@ -570,7 +570,7 @@ void ActionConfigDialog::saveCurrentAction() case 2:{ item.setAttribute("error", "selection"); break; } - case 3:{ item.setAttribute("error", "replace"); + case 3:{ item.setAttribute("error", "tqreplace"); break; } case 4:{ item.setAttribute("error", "new"); @@ -618,7 +618,7 @@ void ActionConfigDialog::saveCurrentAction() if (p_toolbar) { TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); - bool placeOnToolbar = toolbarListBox->findItem(toolbarName, Qt::ExactMatch); + bool placeOnToolbar = toolbarListBox->tqfindItem(toolbarName, TQt::ExactMatch); while (!node.isNull()) { if (node.nodeName() == "Action" && @@ -630,12 +630,12 @@ void ActionConfigDialog::saveCurrentAction() { currentAction->unplug(tb->page(i)); currentAction->unplug(p_toolbar->menu); - node.parentNode().removeChild(node); + node.tqparentNode().removeChild(node); TQListViewItemIterator iter(actionTreeView); while (iter.current()) { listItem = iter.current(); - if (listItem->depth() > 0 && listItem->parent()->text(0) == toolbarName + if (listItem->depth() > 0 && listItem->tqparent()->text(0) == toolbarName && listItem->text(2) == el.attribute("name")) { delete listItem; @@ -658,7 +658,7 @@ void ActionConfigDialog::saveCurrentAction() item.setAttribute("name",el.attribute("name")); p_toolbar->guiClient->domDocument().firstChild().firstChild().appendChild(item); //put it also in the treeview - listItem = actionTreeView->findItem(toolbarName, 0); + listItem = actionTreeView->tqfindItem(toolbarName, 0); if (listItem) { TQListViewItem *after = listItem->firstChild(); @@ -682,7 +682,7 @@ void ActionConfigDialog::saveCurrentAction() p_toolbar->guiClient->xmlFile(), p_toolbar->guiClient->instance()); } TQWidget *toolBar = tb->page(i); - if (toolBar->minimumSizeHint().height() > 20) + if (toolBar->tqminimumSizeHint().height() > 20) { toolBar->adjustSize(); toolBar->setGeometry(0,0, tb->width(), toolBar->height()); @@ -698,29 +698,29 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) { TQString shortcutText = shortcut.toString(); TQString shortcutText2; - int pos = shortcutText.find(';'); + int pos = shortcutText.tqfind(';'); if (pos != -1) { shortcutText2 = shortcutText.mid(pos + 1); shortcutText = shortcutText.left(pos); } TQString s = shortcutText; - s.replace('+', "\\+"); + s.tqreplace('+', "\\+"); TQRegExp shortcutRx("\\(" + s + "\\)|" + s + "$|" + s + ";"); s = shortcutText2; - s.replace('+', "\\+"); + s.tqreplace('+', "\\+"); TQRegExp shortcutRx2("\\(" + s + "\\)|" + s + "$|" + s + ";"); TQString global; //check for conflicting global shortcuts TQMap<TQString, TQString>::Iterator it; for ( it = globalShortcuts.begin(); it != globalShortcuts.end(); ++it ) { - if (it.data().contains(shortcutRx)) + if (it.data().tqcontains(shortcutRx)) { global = it.key(); break; } - if (!shortcutText2.isEmpty() && it.data().contains(shortcutRx2)) + if (!shortcutText2.isEmpty() && it.data().tqcontains(shortcutRx2)) { shortcutText = shortcutText2; global = it.key(); @@ -737,12 +737,12 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) for (uint i = 0; i < ac->count(); i++) { KAction *action = ac->action(i); - if (action != currentAction && action->shortcut().toString().contains(shortcutRx)) + if (action != currentAction && action->shortcut().toString().tqcontains(shortcutRx)) { global = action->text(); break; } - if (!shortcutText2.isEmpty() && action != currentAction && action->shortcut().toString().contains(shortcutRx)) + if (!shortcutText2.isEmpty() && action != currentAction && action->shortcut().toString().tqcontains(shortcutRx)) { shortcutText = shortcutText2; global = action->text(); @@ -761,11 +761,11 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) selectedShortcut = shortcut; } else { - global.replace('&',""); + global.tqreplace('&',""); TQString s = i18n("The '%1' key combination has already been allocated " "to the \"%2\" action.\n" "Please choose a unique key combination."). - arg(shortcutText).arg(global); + tqarg(shortcutText).tqarg(global); KMessageBox::sorry( this, s, i18n("Conflicting Shortcuts")); } } @@ -779,7 +779,7 @@ void ActionConfigDialog::accept() void ActionConfigDialog::reject() { - if (buttonApply->isEnabled() && KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) + if (buttonApply->isEnabled() && KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) saveCurrentAction(); ActionConfigDialogS::reject(); } @@ -805,29 +805,29 @@ void ActionConfigDialog::slotNewAction() static_cast<TagAction*>(currentAction)->setModified(true); TQListViewItem *currentItem = actionTreeView->currentItem(); TQListViewItem *item = new KListViewItem(allActionsItem); - TQString actionText = TQString("Action_%1").arg(m_mainWindow->actionCollection()->count()); + TQString actionText = TQString("Action_%1").tqarg(m_mainWindow->actionCollection()->count()); currentAction->setText(actionText); item->setText(2, currentAction->name()); item->setText(0, actionText); item->setPixmap(0, SmallIcon("ball")); allActionsItem->sortChildItems(0, true); - if (currentItem->parent() && currentItem->parent() == allActionsItem) + if (currentItem->tqparent() && currentItem->tqparent() == allActionsItem) { actionTreeView->setCurrentItem(item); } else { - TQListViewItem *parentItem = currentItem->parent(); - if (!parentItem) - parentItem = currentItem; + TQListViewItem *tqparentItem = currentItem->tqparent(); + if (!tqparentItem) + tqparentItem = currentItem; - item = new KListViewItem(parentItem, currentItem); + item = new KListViewItem(tqparentItem, currentItem); item->setText(0, actionText); item->setText(2, currentAction->name()); item->setPixmap(0, SmallIcon("ball")); actionTreeView->setCurrentItem(item); - if (parentItem != allActionsItem) + if (tqparentItem != allActionsItem) { - toolbarListBox->insertItem(parentItem->text(0)); + toolbarListBox->insertItem(tqparentItem->text(0)); toolbarListBox->setCurrentItem(0); toolbarListBox->setSelected(0, true); } @@ -838,7 +838,7 @@ void ActionConfigDialog::slotNewAction() void ActionConfigDialog::slotDeleteAction() { - if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Removing the action removes all the references to it.\nAre you sure you want to remove the <b>%1</b> action?</qt>").arg(currentAction->text()),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue ) + if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Removing the action removes all the references to it.\nAre you sure you want to remove the <b>%1</b> action?</qt>").tqarg(currentAction->text()),TQString(),KStdGuiItem::del()) == KMessageBox::Continue ) { TQString actionName = currentAction->name(); emit deleteUserAction(currentAction); @@ -876,7 +876,7 @@ void ActionConfigDialog::slotAddContainerToolbar() TQStringList lst; for (i = 0; i < tb->count(); i++) { - if (!toolbarListBox->findItem(tb->label(i), Qt::ExactMatch)) + if (!toolbarListBox->tqfindItem(tb->label(i), TQt::ExactMatch)) lst << tb->label(i); } |