diff options
Diffstat (limited to 'quanta/dialogs/actionconfigdialog.cpp')
-rw-r--r-- | quanta/dialogs/actionconfigdialog.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/quanta/dialogs/actionconfigdialog.cpp b/quanta/dialogs/actionconfigdialog.cpp index 9654c046..4346be52 100644 --- a/quanta/dialogs/actionconfigdialog.cpp +++ b/quanta/dialogs/actionconfigdialog.cpp @@ -50,7 +50,7 @@ #include "tagaction.h" #include "toolbartabwidget.h" -ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, KMainWindow* parent, const char* name, bool modal, WFlags fl, const TQString& defaultAction ) +ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, TDEMainWindow* parent, const char* name, bool modal, WFlags fl, const TQString& defaultAction ) :ActionConfigDialogS( parent, name, modal, fl ) { m_mainWindow = parent; @@ -63,34 +63,34 @@ ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, currentAction = 0L; m_toolbarItem = 0L; - connect(actionTreeView, TQT_SIGNAL(contextMenu(KListView *,TQListViewItem *,const TQPoint &)), - TQT_SLOT(slotContextMenu(KListView *,TQListViewItem *,const TQPoint &))); + connect(actionTreeView, TQT_SIGNAL(contextMenu(TDEListView *,TQListViewItem *,const TQPoint &)), + TQT_SLOT(slotContextMenu(TDEListView *,TQListViewItem *,const TQPoint &))); connect(actionTreeView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), TQT_SLOT(slotSelectionChanged(TQListViewItem *))); - connect(shortcutKeyButton, TQT_SIGNAL(capturedShortcut(const KShortcut &)), - TQT_SLOT(slotShortcutCaptured(const KShortcut &))); + connect(shortcutKeyButton, TQT_SIGNAL(capturedShortcut(const TDEShortcut &)), + TQT_SLOT(slotShortcutCaptured(const TDEShortcut &))); connect(scriptPath, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotTextChanged(const TQString&))); connect(this, TQT_SIGNAL(addToolbar()), m_mainWindow, TQT_SLOT(slotAddToolbar())); connect(this, TQT_SIGNAL(removeToolbar(const TQString&)), m_mainWindow, TQT_SLOT(slotRemoveToolbar(const TQString&))); - connect(this, TQT_SIGNAL(deleteUserAction(KAction*)), m_mainWindow, TQT_SLOT(slotDeleteAction(KAction*))); + connect(this, TQT_SIGNAL(deleteUserAction(TDEAction*)), m_mainWindow, TQT_SLOT(slotDeleteAction(TDEAction*))); connect(this, TQT_SIGNAL(configureToolbars(const TQString&)), m_mainWindow, TQT_SLOT(slotConfigureToolbars(const TQString&))); //fill up the tree view with the toolbars and actions actionTreeView->setSorting(-1); - allActionsItem = new KListViewItem(actionTreeView, i18n("All")); + allActionsItem = new TDEListViewItem(actionTreeView, i18n("All")); actionTreeView->insertItem(allActionsItem); TQListViewItem *item, *oldItem = allActionsItem; - KAction *action; + TDEAction *action; TQString toolbarName; TQString toolbarId; ToolbarTabWidget *tb = ToolbarTabWidget::ref(); TQRegExp r("\\&(?!\\&)"); - KActionCollection *ac = m_mainWindow->actionCollection(); + TDEActionCollection *ac = m_mainWindow->actionCollection(); for (int i = 0; i < tb->count(); i++) { toolbarName = tb->label(i); toolbarName.replace(r, ""); - item = new KListViewItem(actionTreeView, oldItem, i18n(toolbarName.utf8())); + item = new TDEListViewItem(actionTreeView, oldItem, i18n(toolbarName.utf8())); actionTreeView->insertItem(item); toolbarId = tb->id(i); @@ -106,7 +106,7 @@ 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 TDEListViewItem(item, oldActionItem, action->text().replace(r,""), action->shortcut().toString(), action->name()); oldActionItem->setPixmap(0, SmallIcon(action->icon()) ); } } @@ -142,12 +142,12 @@ 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 TDEListViewItem(allActionsItem, action->text().replace(r, ""), action->shortcut().toString(), action->name()); item->setPixmap(0, SmallIcon(action->icon()) ); } allActionsItem->sortChildItems(0, true); - treeMenu = new KPopupMenu(actionTreeView); + treeMenu = new TDEPopupMenu(actionTreeView); treeMenu->insertItem(i18n("&Add New Toolbar"), this, TQT_SLOT(slotAddToolbar())); treeMenu->insertItem(i18n("&Remove Toolbar"), this, TQT_SLOT(slotRemoveToolbar())); treeMenu->insertItem(i18n("&Edit Toolbar"), this, TQT_SLOT(slotEditToolbar())); @@ -173,7 +173,7 @@ void ActionConfigDialog::slotAddToolbar() item = actionTreeView->lastItem(); if (item->parent()) item = item->parent(); - new KListViewItem(actionTreeView, item, i18n(toolbarName.utf8())); + new TDEListViewItem(actionTreeView, item, i18n(toolbarName.utf8())); break; } } @@ -221,8 +221,8 @@ void ActionConfigDialog::slotEditToolbar() emit configureToolbars(toolbarName +" <quanta>"); //update the tree view - KAction *action; - KActionCollection *ac = m_mainWindow->actionCollection(); + TDEAction *action; + TDEActionCollection *ac = m_mainWindow->actionCollection(); ToolbarTabWidget *tb = ToolbarTabWidget::ref(); for (int i = 0; i < tb->count(); i++) { @@ -232,7 +232,7 @@ void ActionConfigDialog::slotEditToolbar() if (p_toolbar) { oldItem = actionTreeView->findItem(toolbarName, 0); - item = new KListViewItem(actionTreeView, oldItem, toolbarName); + item = new TDEListViewItem(actionTreeView, oldItem, toolbarName); item->setOpen(oldItem->isOpen()); delete oldItem; TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); @@ -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 TDEListViewItem(item, oldItem, action->text().replace(TQRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name()); oldItem->setPixmap(0, SmallIcon(action->icon())); } } @@ -256,7 +256,7 @@ void ActionConfigDialog::slotEditToolbar() } } -void ActionConfigDialog::slotContextMenu(KListView *,TQListViewItem *,const TQPoint &point) +void ActionConfigDialog::slotContextMenu(TDEListView *,TQListViewItem *,const TQPoint &point) { treeMenu->popup(point); } @@ -276,12 +276,12 @@ void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item) if (item && item->depth() > 0) { TagAction *action = 0L; - KActionCollection *ac = m_mainWindow->actionCollection(); + TDEActionCollection *ac = m_mainWindow->actionCollection(); uint acCount = ac->count(); //find the corresponding action for (uint i = 0; i < acCount; i++) { - KAction *a = ac->action(i); + TDEAction *a = ac->action(i); TQString actionName = a->name(); if (a && actionName == item->text(2) && a->inherits("TagAction")) { @@ -485,7 +485,7 @@ void ActionConfigDialog::saveCurrentAction() currentAction->setShortcut(selectedShortcut); } else { - currentAction->setShortcut(KShortcut()); + currentAction->setShortcut(TDEShortcut()); } el.setAttribute("shortcut", s); @@ -673,7 +673,7 @@ void ActionConfigDialog::saveCurrentAction() } if (placeOnToolbar) { - listItem = new KListViewItem(listItem, after, lineText->text(), currentAction->shortcut().toString(), currentAction->name()); + listItem = new TDEListViewItem(listItem, after, lineText->text(), currentAction->shortcut().toString(), currentAction->name()); listItem->setPixmap(0, SmallIcon(actionIcon->icon())); } } @@ -694,7 +694,7 @@ void ActionConfigDialog::saveCurrentAction() } } -void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) +void ActionConfigDialog::slotShortcutCaptured(const TDEShortcut &shortcut) { TQString shortcutText = shortcut.toString(); TQString shortcutText2; @@ -733,10 +733,10 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) TQPtrList<KXMLGUIClient> clients = m_mainWindow->guiFactory()->clients(); for( TQPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it ) { - KActionCollection *ac = (*it)->actionCollection(); + TDEActionCollection *ac = (*it)->actionCollection(); for (uint i = 0; i < ac->count(); i++) { - KAction *action = ac->action(i); + TDEAction *action = ac->action(i); if (action != currentAction && action->shortcut().toString().contains(shortcutRx)) { global = action->text(); @@ -801,10 +801,10 @@ void ActionConfigDialog::slotNewAction() ++it; } - selectedShortcut = KShortcut(); + selectedShortcut = TDEShortcut(); static_cast<TagAction*>(currentAction)->setModified(true); TQListViewItem *currentItem = actionTreeView->currentItem(); - TQListViewItem *item = new KListViewItem(allActionsItem); + TQListViewItem *item = new TDEListViewItem(allActionsItem); TQString actionText = TQString("Action_%1").arg(m_mainWindow->actionCollection()->count()); currentAction->setText(actionText); item->setText(2, currentAction->name()); @@ -820,7 +820,7 @@ void ActionConfigDialog::slotNewAction() if (!parentItem) parentItem = currentItem; - item = new KListViewItem(parentItem, currentItem); + item = new TDEListViewItem(parentItem, currentItem); item->setText(0, actionText); item->setText(2, currentAction->name()); item->setPixmap(0, SmallIcon("ball")); |