From 9771f17f8cc5252b12ec5f3edf47ff9bffdf997f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:16:01 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- kommander/ChangeLog | 2 +- kommander/editor/assoctexteditorimpl.cpp | 10 ++-- kommander/editor/assoctexteditorimpl.h | 8 +-- kommander/editor/choosewidget.ui | 2 +- kommander/editor/connectioneditor.ui | 6 +- kommander/editor/connectioneditorimpl.cpp | 4 +- kommander/editor/functions.ui | 2 +- kommander/editor/mainwindow.cpp | 8 +-- kommander/editor/mainwindow.h | 22 ++++---- kommander/editor/mainwindowactions.cpp | 88 +++++++++++++++--------------- kommander/editor/messagelog.cpp | 6 +- kommander/editor/messagelog.h | 8 +-- kommander/examples/current/editor-poc.kmdr | 2 +- kommander/pluginmanager/mainwindow.cpp | 6 +- kommander/pluginmanager/mainwindow.h | 6 +- kommander/widget/kmdrmainwindow.cpp | 4 +- kommander/widget/kmdrmainwindow.h | 2 +- kommander/widgets/execbutton.cpp | 2 +- kommander/widgets/fontdialog.cpp | 4 +- kommander/widgets/listbox.cpp | 2 +- kommander/widgets/listbox.h | 2 +- kommander/widgets/popupmenu.cpp | 2 +- kommander/widgets/popupmenu.h | 6 +- kommander/widgets/treewidget.cpp | 10 ++-- kommander/widgets/treewidget.h | 2 +- 25 files changed, 108 insertions(+), 108 deletions(-) (limited to 'kommander') diff --git a/kommander/ChangeLog b/kommander/ChangeLog index b6aadfc5..4813f4d9 100644 --- a/kommander/ChangeLog +++ b/kommander/ChangeLog @@ -217,7 +217,7 @@ Tue 16 Nov 2004 23:28:16 CET - Michal Rudolf Sun 14 Nov 2004 22:39:38 CET - Michal Rudolf o massive cleanup and KDE-ification of Editor - o most actions converted to KActions, some were standarized + o most actions converted to TDEActions, some were standarized o some obsolete dialogs removed o About dialog changed to use KAboutDialog diff --git a/kommander/editor/assoctexteditorimpl.cpp b/kommander/editor/assoctexteditorimpl.cpp index 9fbfe938..f02b779c 100644 --- a/kommander/editor/assoctexteditorimpl.cpp +++ b/kommander/editor/assoctexteditorimpl.cpp @@ -96,8 +96,8 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form, partManager->addPart(doc, true); //trick to import all the KatePart actions into the dialog - KPopupMenu *invisiblePopup = new KPopupMenu(this); - KActionCollection *ac = view->actionCollection(); + TDEPopupMenu *invisiblePopup = new TDEPopupMenu(this); + TDEActionCollection *ac = view->actionCollection(); uint count = ac->count(); for (uint i = 0; i < count; i++) { @@ -105,8 +105,8 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form, } //add those KatePart actions to a popup menu that are important - KPopupMenu *popup = new KPopupMenu(this); - KAction *a = view->actionCollection()->action("edit_undo"); + TDEPopupMenu *popup = new TDEPopupMenu(this); + TDEAction *a = view->actionCollection()->action("edit_undo"); if (a) a->plug(popup); a = view->actionCollection()->action("edit_redo"); @@ -137,7 +137,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form, a->plug(popup); readOnlyAction = view->actionCollection()->action("tools_toggle_write_lock"); popup->insertSeparator(); - highlightPopup = new KPopupMenu(popup); + highlightPopup = new TDEPopupMenu(popup); connect(highlightPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(slotHighlightingChanged(int))); popup->insertItem(i18n("&Highlighting"), highlightPopup); diff --git a/kommander/editor/assoctexteditorimpl.h b/kommander/editor/assoctexteditorimpl.h index 532d61dd..845e9a1c 100644 --- a/kommander/editor/assoctexteditorimpl.h +++ b/kommander/editor/assoctexteditorimpl.h @@ -43,8 +43,8 @@ namespace KParts{ class PartManager; } -class KAction; -class KPopupMenu; +class TDEAction; +class TDEPopupMenu; class AssocTextEditor : public AssocTextEditorBase { @@ -125,10 +125,10 @@ private: KTextEditor::EditInterface *associatedTextEdit; KTextEditor::Document *doc; KTextEditor::View *view; - KPopupMenu *highlightPopup; + TDEPopupMenu *highlightPopup; int oldHlMode; bool readOnly; - KAction *readOnlyAction; + TDEAction *readOnlyAction; }; #endif diff --git a/kommander/editor/choosewidget.ui b/kommander/editor/choosewidget.ui index 64970e5a..782a2b22 100644 --- a/kommander/editor/choosewidget.ui +++ b/kommander/editor/choosewidget.ui @@ -97,7 +97,7 @@ - + widgetView diff --git a/kommander/editor/connectioneditor.ui b/kommander/editor/connectioneditor.ui index 8603b9e2..29a33a56 100644 --- a/kommander/editor/connectioneditor.ui +++ b/kommander/editor/connectioneditor.ui @@ -50,7 +50,7 @@ 6 - + Sender @@ -111,7 +111,7 @@ Displays the connections between the sender and the receiver. - + slotBox @@ -119,7 +119,7 @@ <b>A list of Q_SLOTS for the receiver.</b><p>The Q_SLOTS that are displayed are only those which have arguments that correspond with the arguments of the signal that is currently selected in the Signal-list.</b> - + signalBox diff --git a/kommander/editor/connectioneditorimpl.cpp b/kommander/editor/connectioneditorimpl.cpp index 0719716f..7dc7978d 100644 --- a/kommander/editor/connectioneditorimpl.cpp +++ b/kommander/editor/connectioneditorimpl.cpp @@ -197,7 +197,7 @@ void ConnectionEditor::connectClicked() conn.signal = signalBox->currentText(); conn.slot = slotBox->currentText(); conn.receiver = m_receiver; - KListViewItem *i = new KListViewItem(connectionView, m_sender->name(), conn.signal, m_receiver->name(), + TDEListViewItem *i = new TDEListViewItem(connectionView, m_sender->name(), conn.signal, m_receiver->name(), conn.slot); i->setPixmap(0, PixmapChooser::loadPixmap("connecttool.xpm")); connectionView->setCurrentItem(i); @@ -346,7 +346,7 @@ void ConnectionEditor::fillConnectionsList() !MetaDataBase::hasSlot(TQT_TQOBJECT(m_formWindow), MetaDataBase::normalizeSlot((*it).slot).latin1())) continue; MetaDataBase::Connection conn = *it; - KListViewItem *i = new KListViewItem(connectionView, conn.sender->name(), conn.signal, + TDEListViewItem *i = new TDEListViewItem(connectionView, conn.sender->name(), conn.signal, conn.receiver->name(), conn.slot); i->setPixmap(0, PixmapChooser::loadPixmap("connecttool.xpm")); m_connections.insert(i, conn); diff --git a/kommander/editor/functions.ui b/kommander/editor/functions.ui index 5930b06b..5e9686ff 100644 --- a/kommander/editor/functions.ui +++ b/kommander/editor/functions.ui @@ -100,7 +100,7 @@ functionListBox - + functionListBox diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index fd3f0ecb..dcd1b393 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -143,8 +143,8 @@ MainWindow::MainWindow(bool asClient) setupMDI(); setupFileActions(); setupEditActions(); - layoutToolBar = new KToolBar(this, "Layout"); - ((KToolBar *) layoutToolBar)->setFullSize(false); + layoutToolBar = new TDEToolBar(this, "Layout"); + ((TDEToolBar *) layoutToolBar)->setFullSize(false); addToolBar(layoutToolBar, i18n("Layout")); setupToolActions(); setupLayoutActions(); @@ -356,9 +356,9 @@ void MainWindow::setupRMBMenus() void MainWindow::toolSelected() { - if (!(sender())->inherits("KAction")) + if (!(sender())->inherits("TDEAction")) return; - actionCurrentTool = (KAction*)sender(); + actionCurrentTool = (TDEAction*)sender(); emit currentToolChanged(); if (formWindow()) formWindow()->commandHistory()->emitUndoRedo(); diff --git a/kommander/editor/mainwindow.h b/kommander/editor/mainwindow.h index 790f33b1..14a24c31 100644 --- a/kommander/editor/mainwindow.h +++ b/kommander/editor/mainwindow.h @@ -36,12 +36,12 @@ class FormFile; class FormWindow; class GotoLineDialog; class HierarchyView; -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; class TDEProcess; -class KRecentFilesAction; -class KToggleAction; -class KToolBar; +class TDERecentFilesAction; +class TDEToggleAction; +class TDEToolBar; class KURL; class PropertyEditor; class TQCloseEvent; @@ -264,24 +264,24 @@ private: bool splashScreen; TQString docPath; - KAction *actionEditUndo, *actionEditRedo, *actionEditCut, *actionEditCopy, + TDEAction *actionEditUndo, *actionEditRedo, *actionEditCut, *actionEditCopy, *actionEditPaste, *actionEditDelete, *actionEditAdjustSize, *actionEditHLayout, *actionEditVLayout, *actionEditGridLayout, *actionEditSplitHorizontal, *actionEditSplitVertical, *actionEditSelectAll, *actionEditBreakLayout, *actionEditConnections, *actionEditLower, *actionEditRaise, *actionEditFindGlobal; - KToggleAction* actionPointerTool, *actionConnectTool, *actionOrderTool; - KAction* actionCurrentTool; - KAction *actionEditFormSettings, *actionEditAccels; - KRecentFilesAction* actionRecent; + TDEToggleAction* actionPointerTool, *actionConnectTool, *actionOrderTool; + TDEAction* actionCurrentTool; + TDEAction *actionEditFormSettings, *actionEditAccels; + TDERecentFilesAction* actionRecent; TQPopupMenu *rmbWidgets; TQPopupMenu *rmbFormWindow; TQPopupMenu *windowMenu, *fileMenu; TQToolBar *layoutToolBar; - KToolBar *fileTb; + TDEToolBar *fileTb; Preferences *prefDia; TQMap propertyDocumentation; diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp index 8a217843..9f4a0ca8 100644 --- a/kommander/editor/mainwindowactions.cpp +++ b/kommander/editor/mainwindowactions.cpp @@ -123,7 +123,7 @@ void MainWindow::setupEditActions() actionEditPaste->setWhatsThis(whatsThisFrom("Edit|Paste")); actionEditPaste->setEnabled(false); - actionEditDelete = new KAction(i18n("Delete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(editDelete()), + actionEditDelete = new TDEAction(i18n("Delete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(editDelete()), actionCollection(), "edit_delete"); actionEditDelete->setToolTip(i18n("Deletes the selected widgets")); actionEditDelete->setWhatsThis(whatsThisFrom("Edit|Delete")); @@ -133,42 +133,42 @@ void MainWindow::setupEditActions() actionEditSelectAll->setToolTip(i18n("Selects all widgets")); actionEditSelectAll->setWhatsThis(whatsThisFrom("Edit|Select All")); - actionEditRaise = new KAction(i18n("Bring to Front"), createIconSet("editraise.xpm"), - KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editRaise()), actionCollection(), "edit_raise"); + actionEditRaise = new TDEAction(i18n("Bring to Front"), createIconSet("editraise.xpm"), + TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editRaise()), actionCollection(), "edit_raise"); actionEditRaise->setToolTip(i18n("Raises the selected widgets")); actionEditRaise->setEnabled(false); - actionEditLower = new KAction(i18n("Send to Back"), createIconSet("editlower.xpm"), - KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLower()), actionCollection(), "edit_lower"); + actionEditLower = new TDEAction(i18n("Send to Back"), createIconSet("editlower.xpm"), + TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLower()), actionCollection(), "edit_lower"); actionEditLower->setToolTip(i18n("Lowers the selected widgets")); actionEditLower->setWhatsThis(i18n("Lowers the selected widgets")); actionEditLower->setEnabled(false); - actionEditFindGlobal = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, TQT_TQOBJECT(this), TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global"); + actionEditFindGlobal = new TDEAction(i18n("Find in Form..."), CTRL + ALT + Key_F, TQT_TQOBJECT(this), TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global"); actionEditFindGlobal->setToolTip(i18n("Search for a text in the whole form.")); actionEditFindGlobal->setWhatsThis(whatsThisFrom("Edit|Find in Form")); connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFindGlobal, TQT_SLOT(setEnabled(bool))); - actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, TQT_TQOBJECT(this), TQT_SLOT(editAccels()), + actionEditAccels = new TDEAction(i18n("Check Accelerators"), ALT + Key_R, TQT_TQOBJECT(this), TQT_SLOT(editAccels()), actionCollection(), "edit_check_accel"); actionEditAccels->setToolTip(i18n("Checks if the accelerators used in the form are unique")); actionEditAccels->setWhatsThis(whatsThisFrom("Edit|Check Accelerator")); connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditAccels, TQT_SLOT(setEnabled(bool))); - actionEditConnections = new KAction(i18n("Connections"), createIconSet("connecttool.xpm"), - KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editConnections()), actionCollection(), + actionEditConnections = new TDEAction(i18n("Connections"), createIconSet("connecttool.xpm"), + TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editConnections()), actionCollection(), "edit_connections"); actionEditConnections->setToolTip(i18n("Opens a dialog for editing connections")); actionEditConnections->setWhatsThis(whatsThisFrom("Edit|Connections")); connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditConnections, TQT_SLOT(setEnabled(bool))); - actionEditFormSettings = new KAction(i18n("Form Settings..."), KShortcut::null(), + actionEditFormSettings = new TDEAction(i18n("Form Settings..."), TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editFormSettings()), actionCollection(), "edit_form"); actionEditFormSettings->setToolTip(i18n("Opens a dialog to change the form's settings")); actionEditFormSettings->setWhatsThis(whatsThisFrom("Edit|Form Settings")); connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFormSettings, TQT_SLOT(setEnabled(bool))); - KToolBar *tb = new KToolBar(this, "Edit"); + TDEToolBar *tb = new TDEToolBar(this, "Edit"); tb->setFullSize(false); TQWhatsThis::add(tb, i18n("The Edit toolbar%1").arg(toolbarHelp)); addToolBar(tb, i18n("Edit")); @@ -201,51 +201,51 @@ void MainWindow::setupEditActions() void MainWindow::setupLayoutActions() { - actionEditAdjustSize = new KAction(i18n("Adjust Size"), createIconSet("adjustsize.xpm"), + actionEditAdjustSize = new TDEAction(i18n("Adjust Size"), createIconSet("adjustsize.xpm"), CTRL + Key_J, TQT_TQOBJECT(this), TQT_SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size"); actionEditAdjustSize->setToolTip(i18n("Adjusts the size of the selected widget")); actionEditAdjustSize->setWhatsThis(whatsThisFrom("Layout|Adjust Size")); actionEditAdjustSize->setEnabled(false); - actionEditHLayout = new KAction(i18n("Lay OutQt::Horizontally"), createIconSet("edithlayout.xpm"), + actionEditHLayout = new TDEAction(i18n("Lay OutQt::Horizontally"), createIconSet("edithlayout.xpm"), CTRL + Key_H, TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h"); actionEditHLayout->setToolTip(i18n("Lays out the selected widgets horizontally")); actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Horizontally")); actionEditHLayout->setEnabled(false); - actionEditVLayout = new KAction(i18n("Lay OutQt::Vertically"), createIconSet("editvlayout.xpm"), + actionEditVLayout = new TDEAction(i18n("Lay OutQt::Vertically"), createIconSet("editvlayout.xpm"), CTRL + Key_L, TQT_TQOBJECT(this), TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v"); actionEditVLayout->setToolTip(i18n("Lays out the selected widgets vertically")); actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Vertically")); actionEditVLayout->setEnabled(false); - actionEditGridLayout = new KAction(i18n("Lay Out in a Grid"), createIconSet("editgrid.xpm"), + actionEditGridLayout = new TDEAction(i18n("Lay Out in a Grid"), createIconSet("editgrid.xpm"), CTRL + Key_G, TQT_TQOBJECT(this), TQT_SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid"); actionEditGridLayout->setToolTip(i18n("Lays out the selected widgets in a grid")); actionEditGridLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out in a Grid")); actionEditGridLayout->setEnabled(false); - actionEditSplitHorizontal = new KAction(i18n("Lay OutQt::Horizontally in Splitter"), createIconSet("editvlayoutsplit.xpm"), - KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(), + actionEditSplitHorizontal = new TDEAction(i18n("Lay OutQt::Horizontally in Splitter"), createIconSet("editvlayoutsplit.xpm"), + TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(), "edit_split_h"); actionEditSplitHorizontal->setToolTip(i18n("Lays out the selected widgets horizontally in a splitter")); actionEditSplitHorizontal->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Horizontally in Splitter")); actionEditSplitHorizontal->setEnabled(false); - actionEditSplitVertical = new KAction(i18n("Lay OutQt::Vertically in Splitter"), createIconSet("edithlayoutsplit.xpm"), - KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutVerticalSplit()), actionCollection(), + actionEditSplitVertical = new TDEAction(i18n("Lay OutQt::Vertically in Splitter"), createIconSet("edithlayoutsplit.xpm"), + TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutVerticalSplit()), actionCollection(), "edit_split_v"); actionEditSplitVertical->setToolTip(i18n("Lays out the selected widgets vertically in a splitter")); actionEditSplitVertical->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Vertically (in Splitter)")); actionEditSplitVertical->setEnabled(false); - actionEditBreakLayout = new KAction(i18n("Break Layout"), createIconSet("editbreaklayout.xpm"), + actionEditBreakLayout = new TDEAction(i18n("Break Layout"), createIconSet("editbreaklayout.xpm"), CTRL + Key_B, TQT_TQOBJECT(this), TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout"); actionEditBreakLayout->setToolTip(i18n("Breaks the selected layout")); actionEditBreakLayout->setWhatsThis(whatsThisFrom("Layout|Break Layout")); int id = WidgetDatabase::idFromClassName("Spacer"); - KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), + TDEToggleAction *a = new TDEToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(), TQString::number(id).latin1()); a->setExclusiveGroup("tool"); a->setText(i18n("Add ") + WidgetDatabase::className(id)); @@ -283,28 +283,28 @@ void MainWindow::setupLayoutActions() void MainWindow::setupToolActions() { - actionPointerTool = new KToggleAction(i18n("Pointer"), "arrow", Key_F2, + actionPointerTool = new TDEToggleAction(i18n("Pointer"), "arrow", Key_F2, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(), TQString::number(POINTER_TOOL).latin1()); actionPointerTool->setToolTip(i18n("Selects the pointer tool")); actionPointerTool->setWhatsThis(whatsThisFrom("Tools|Pointer")); actionPointerTool->setExclusiveGroup("tool"); - actionConnectTool = new KToggleAction(i18n("Connect Signal/Slots"), createIconSet("connecttool.xpm"), + actionConnectTool = new TDEToggleAction(i18n("Connect Signal/Slots"), createIconSet("connecttool.xpm"), Key_F3, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(), TQString::number(CONNECT_TOOL).latin1()); actionConnectTool->setToolTip(i18n("Selects the connection tool")); actionConnectTool->setWhatsThis(whatsThisFrom("Tools|Connect Signals and Slots")); actionConnectTool->setExclusiveGroup("tool"); - actionOrderTool = new KToggleAction(i18n("Tab Order"), createIconSet("ordertool.xpm"), + actionOrderTool = new TDEToggleAction(i18n("Tab Order"), createIconSet("ordertool.xpm"), Key_F4, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(), TQString::number(ORDER_TOOL).latin1()); actionOrderTool->setToolTip(i18n("Selects the tab order tool")); actionOrderTool->setWhatsThis(whatsThisFrom("Tools|Tab Order")); actionOrderTool->setExclusiveGroup("tool"); - KToolBar *tb = new KToolBar(this, "Tools"); + TDEToolBar *tb = new TDEToolBar(this, "Tools"); tb->setFullSize(false); TQWhatsThis::add(tb, i18n("The Tools toolbar%1").arg(toolbarHelp)); @@ -325,7 +325,7 @@ void MainWindow::setupToolActions() TQString grp = WidgetDatabase::widgetGroup(j); if (!WidgetDatabase::isGroupVisible(grp) || WidgetDatabase::isGroupEmpty(grp)) continue; - KToolBar *tb = new KToolBar(this, grp.latin1()); + TDEToolBar *tb = new TDEToolBar(this, grp.latin1()); tb->setFullSize(false); bool plural = grp[(int) grp.length() - 1] == 's'; if (plural) @@ -347,7 +347,7 @@ void MainWindow::setupToolActions() { if (WidgetDatabase::group(i) != grp) continue; // only widgets, i.e. not forms and temp stuff - KToggleAction *a = new KToggleAction(WidgetDatabase::className(i), KShortcut::null(), + TDEToggleAction *a = new TDEToggleAction(WidgetDatabase::className(i), TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1()); a->setExclusiveGroup("tool"); TQString atext = WidgetDatabase::className(i); @@ -406,7 +406,7 @@ void MainWindow::setupToolActions() void MainWindow::setupFileActions() { - fileTb = new KToolBar(this, "File"); + fileTb = new TDEToolBar(this, "File"); fileTb->setFullSize(false); TQWhatsThis::add(fileTb, i18n("The File toolbar%1").arg(toolbarHelp)); @@ -414,7 +414,7 @@ void MainWindow::setupFileActions() fileMenu = new TQPopupMenu(this, "File"); menuBar()->insertItem(i18n("&File"), fileMenu); - KAction *a = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); + TDEAction *a = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); a->setToolTip(i18n("Creates a new dialog")); a->setWhatsThis(whatsThisFrom("File|New")); a->plug(fileTb); @@ -452,7 +452,7 @@ void MainWindow::setupFileActions() connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool))); a->plug(fileMenu); - a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(fileSaveAll()), + a = new TDEAction(i18n("Save All"), "save_all", TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(fileSaveAll()), actionCollection(), "file_close_all"); a->setToolTip(i18n("Saves all open dialogs")); a->setWhatsThis(whatsThisFrom("File|Save All")); @@ -473,7 +473,7 @@ void MainWindow::setupRunActions() TQPopupMenu *menu = new TQPopupMenu(this, "Run"); menuBar()->insertItem(i18n("&Run"), menu); - KAction* a = new KAction(i18n("Run Dialog"), "run", CTRL + Key_R, + TDEAction* a = new TDEAction(i18n("Run Dialog"), "run", CTRL + Key_R, TQT_TQOBJECT(this), TQT_SLOT(runForm()), actionCollection(), "run"); a->setToolTip(i18n("Executes dialog")); a->setWhatsThis(whatsThisFrom("Run|Run dialog")); @@ -482,7 +482,7 @@ void MainWindow::setupRunActions() a->plug(menu); // add KDE4 executor - KAction* b = new KAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + TQt::Key_R, + TDEAction* b = new TDEAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + TQt::Key_R, TQT_TQOBJECT(this), TQT_SLOT(runForm4()), actionCollection(), "run4"); b->setToolTip(i18n("Executes dialog in KDE4")); b->setWhatsThis(whatsThisFrom("Run|Run dialog")); @@ -497,37 +497,37 @@ void MainWindow::setupWindowActions() { windowActionsSetup = true; - KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(tile()), + TDEAction* actionWindowTile = new TDEAction(i18n("Tile"), TDEShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(tile()), actionCollection(), "window_tile"); actionWindowTile->setToolTip(i18n("Tiles the windows so that they are all visible")); actionWindowTile->setWhatsThis(whatsThisFrom("Window|Tile")); - KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(cascade()), + TDEAction* actionWindowCascade = new TDEAction(i18n("Cascade"), TDEShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(cascade()), actionCollection(), "window_cascade"); actionWindowCascade->setToolTip(i18n("Cascades the windows so that all their title bars are visible")); actionWindowCascade->setWhatsThis(whatsThisFrom("Window|Cascade")); - KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(closeActiveWindow()), + TDEAction* actionWindowClose = new TDEAction(i18n("Cascade"), TDEShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(closeActiveWindow()), actionCollection(), "window_close"); actionWindowClose->setToolTip(i18n("Closes the active window")); actionWindowClose->setWhatsThis(whatsThisFrom("Window|Close")); - KAction* actionWindowCloseAll = new KAction(i18n("Close All"), KShortcut::null(), TQT_TQOBJECT(qworkspace), + TDEAction* actionWindowCloseAll = new TDEAction(i18n("Close All"), TDEShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(closeAllWindows()), actionCollection(), "window_close_all"); actionWindowCloseAll->setToolTip(i18n("Closes all form windows")); actionWindowCloseAll->setWhatsThis(whatsThisFrom("Window|Close All")); - KAction* actionWindowNext = new KAction(i18n("Next"), Key_F6, TQT_TQOBJECT(qworkspace), + TDEAction* actionWindowNext = new TDEAction(i18n("Next"), Key_F6, TQT_TQOBJECT(qworkspace), TQT_SLOT(activateNextWindow()), actionCollection(), "window_next"); actionWindowNext->setToolTip(i18n("Activates the next window")); actionWindowNext->setWhatsThis(whatsThisFrom("Window|Next")); - KAction* actionWindowPrevious = new KAction(i18n("Previous"), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(qworkspace), + TDEAction* actionWindowPrevious = new TDEAction(i18n("Previous"), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(qworkspace), TQT_SLOT(activatePreviousWindow()), actionCollection(), "window_prev"); actionWindowPrevious->setToolTip(i18n("Activates the previous window")); actionWindowPrevious->setWhatsThis(whatsThisFrom("Window|Previous")); - windowMenu = new KPopupMenu(this, "Window"); + windowMenu = new TDEPopupMenu(this, "Window"); menuBar()->insertItem(i18n("&Window"), windowMenu); connect(windowMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(setupWindowActions())); @@ -575,17 +575,17 @@ void MainWindow::setupWindowActions() void MainWindow::setupSettingsActions() { - KPopupMenu *settings = new KPopupMenu(this, "Settings"); - KAction* a = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(editShortcuts()), actionCollection()); + TDEPopupMenu *settings = new TDEPopupMenu(this, "Settings"); + TDEAction* a = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(editShortcuts()), actionCollection()); a->setToolTip(i18n("Opens a dialog to change shortcuts")); a->plug(settings); - a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editPlugins()), + a = new TDEAction(i18n("Configure &Plugins..."), TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editPlugins()), actionCollection(), "configure_plugins"); a->setToolTip(i18n("Opens a dialog to configure plugins")); a->plug(settings); - a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(configureEditor()), + a = new TDEAction(i18n("&Configure Editor..."), TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(configureEditor()), actionCollection(), "configure_editor"); a->setToolTip(i18n("Configure various aspects of this editor.")); a->plug(settings); @@ -600,7 +600,7 @@ void MainWindow::setupSettingsActions() void MainWindow::setupHelpActions() { - KPopupMenu *help = helpMenu(); + TDEPopupMenu *help = helpMenu(); menuBar()->insertItem( i18n("&Help"), help); } diff --git a/kommander/editor/messagelog.cpp b/kommander/editor/messagelog.cpp index 33a385b3..e89e04f3 100644 --- a/kommander/editor/messagelog.cpp +++ b/kommander/editor/messagelog.cpp @@ -30,7 +30,7 @@ MessageLog::MessageLog(TQWidget* parent, const char* name) : TQTabWidget(parent, name) { - m_popupMenu = new KPopupMenu(this); + m_popupMenu = new TDEPopupMenu(this); m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("Copy Current &Line"), this, TQT_SLOT(copyLine())); m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("&Copy Content"), this, TQT_SLOT(copyContent())); m_popupMenu->insertItem(SmallIconSet("filesaveas"), i18n("&Save As..."), this, TQT_SLOT(saveToFile())); @@ -39,7 +39,7 @@ MessageLog::MessageLog(TQWidget* parent, const char* name) : TQTabWidget(parent, for (int i = 0; i < m_listCount; i++) { - m_lists[i] = new KListBox(this); + m_lists[i] = new TDEListBox(this); addTab(m_lists[i], m_listNames[i]); m_seenEOL[i] = false; connect(m_lists[i], TQT_SIGNAL(contextMenuRequested(TQListBoxItem*, const TQPoint&)), @@ -72,7 +72,7 @@ void MessageLog::insertItem(InfoType i, TQString text) TQString MessageLog::content() { TQString p_content; - KListBox* list = m_lists[currentPageIndex()]; + TDEListBox* list = m_lists[currentPageIndex()]; for (uint i=0; i < list->count(); i++) p_content.append(list->text(i) + "\n"); return p_content; diff --git a/kommander/editor/messagelog.h b/kommander/editor/messagelog.h index e9848bd1..f0c1edbc 100644 --- a/kommander/editor/messagelog.h +++ b/kommander/editor/messagelog.h @@ -21,9 +21,9 @@ #include -class KListBox; +class TDEListBox; class TDEProcess; -class KPopupMenu; +class TDEPopupMenu; class TQListBoxItem; class MessageLog : public TQTabWidget @@ -48,9 +48,9 @@ public slots: private: static const int m_listCount = 2; static TQString m_listNames[m_listCount]; - KListBox* m_lists[m_listCount]; + TDEListBox* m_lists[m_listCount]; bool m_seenEOL[m_listCount]; - KPopupMenu* m_popupMenu; + TDEPopupMenu* m_popupMenu; }; #endif diff --git a/kommander/examples/current/editor-poc.kmdr b/kommander/examples/current/editor-poc.kmdr index 7e9c9b03..18d8168e 100755 --- a/kommander/examples/current/editor-poc.kmdr +++ b/kommander/examples/current/editor-poc.kmdr @@ -303,7 +303,7 @@ debug("Clicked at: "+Self.Item(0)+" "+Self.Item(1)) <stringlist> <string></string> <string>@Array.setValue(help, "Proof of concept", "&lt;center&gt;&lt;h2&gt;Kommander MainWindow frames!&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;As Kommander took on functionality an attempt was made to make a MainWindow Kommander widget. Sadly it was a huge time loss for two developers who both gave up after days of trying. The problem was with the editor. However you can use a Qt Designer generated UI file renamed to a *.kmdr file. Into this frame you can place your widgets and make a working application where nearly everything works.&lt;/p&gt;") -@Array.setValue(help, "Known limitations", "&lt;center&gt;&lt;h2&gt;Known limitations&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;As of this writing what is known not to work on the Kommander side is the settings read and write. There is no Initialize or Destroy section as there is no Kommander Text, however there are Q_SIGNALS for this on the window, so the functionality is intact. On the MainWindow side it is not possible to talk to any Actions as these are QActions from Designer and KActions are not derived from QActions in KDE 3x. This means a DCOP call to list actions or set states will not work. It is also not possible to talk to the Statusbar. Also submenus on the menubar and dropdown actions on the Toolbar will not work. Given that this is an unsupported use of Kommander it everything that does work makes it suitable for probably most small application uses.. &lt;/p&gt;") +@Array.setValue(help, "Known limitations", "&lt;center&gt;&lt;h2&gt;Known limitations&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;As of this writing what is known not to work on the Kommander side is the settings read and write. There is no Initialize or Destroy section as there is no Kommander Text, however there are Q_SIGNALS for this on the window, so the functionality is intact. On the MainWindow side it is not possible to talk to any Actions as these are QActions from Designer and TDEActions are not derived from QActions in KDE 3x. This means a DCOP call to list actions or set states will not work. It is also not possible to talk to the Statusbar. Also submenus on the menubar and dropdown actions on the Toolbar will not work. Given that this is an unsupported use of Kommander it everything that does work makes it suitable for probably most small application uses.. &lt;/p&gt;") @Array.setValue(help, "Rolling your own", "&lt;center&gt;&lt;h2&gt;Rolling your own&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;It is our intention to have a template in the 1.3 release of a MainWindow, but if you have Qt Designer for Qt 3x you can easily start a window design, save it, rename to *.kmdr and open in Kommander. Remember not to add widgets in Designer as Kommander will not recognize them.&lt;/p&gt;") @Array.setValue(help, "Using Actions", "&lt;center&gt;&lt;h2&gt;Using Actions&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;If you want to get the goodies, menus, toolbars and accelerator keys, you need to use actions. Kommander has an Action editor on the window menu under Views. There you can add actions and there is a shortcut to connecting them with Q_SIGNALS and Q_SLOTS. To get everything working select an Action and look in the properties menu for settings like name, text and icon. For menus and toolbars try right clicking on them for context menus. Now from the Action View drag an Action to the menu or toolbar. See the visual feedback? Just connect your Action to a script and you have three different ways to call it.&lt;/p&gt; ") diff --git a/kommander/pluginmanager/mainwindow.cpp b/kommander/pluginmanager/mainwindow.cpp index 249aed75..d4a17ea4 100644 --- a/kommander/pluginmanager/mainwindow.cpp +++ b/kommander/pluginmanager/mainwindow.cpp @@ -29,15 +29,15 @@ #include MainWindow::MainWindow( TQWidget* parent, const char *name, WFlags f ) - : KMainWindow( parent, name, f ) + : TDEMainWindow( parent, name, f ) { - KToolBar *toolBar = new KToolBar( this ); + TDEToolBar *toolBar = new TDEToolBar( this ); toolBar->insertButton("fileopen", Add, true, i18n("Add") ); toolBar->insertButton("no", Remove, true, i18n("Remove") ); toolBar->insertButton("reload", Refresh, true, i18n("Refresh") ); connect( toolBar, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(toolButton(int)) ); - m_list = new KListBox( this ); + m_list = new TDEListBox( this ); setCentralWidget(m_list); m_pluginManager = new PluginManager; diff --git a/kommander/pluginmanager/mainwindow.h b/kommander/pluginmanager/mainwindow.h index f37bb3e3..9f891d2c 100644 --- a/kommander/pluginmanager/mainwindow.h +++ b/kommander/pluginmanager/mainwindow.h @@ -20,10 +20,10 @@ #include -class KListBox; +class TDEListBox; class PluginManager; -class MainWindow : public KMainWindow +class MainWindow : public TDEMainWindow { Q_OBJECT @@ -49,7 +49,7 @@ private: void refresh(); // ListBox of available plugins - KListBox *m_list; + TDEListBox *m_list; // plugin manager PluginManager* m_pluginManager; }; diff --git a/kommander/widget/kmdrmainwindow.cpp b/kommander/widget/kmdrmainwindow.cpp index 118fcade..bd6d491f 100644 --- a/kommander/widget/kmdrmainwindow.cpp +++ b/kommander/widget/kmdrmainwindow.cpp @@ -14,7 +14,7 @@ #include KmdrMainWindow::KmdrMainWindow(TQWidget *parent, const char *name, WFlags f) - : KMainWindow(parent, name, f) + : TDEMainWindow(parent, name, f) { TQTimer::singleShot(10, this, TQT_SIGNAL(initialize())); } @@ -26,7 +26,7 @@ KmdrMainWindow::~KmdrMainWindow() bool KmdrMainWindow::queryClose() { - bool quit = KMainWindow::queryClose(); + bool quit = TDEMainWindow::queryClose(); if (quit) emit destroy(); return quit; diff --git a/kommander/widget/kmdrmainwindow.h b/kommander/widget/kmdrmainwindow.h index 5e31f122..f768552d 100644 --- a/kommander/widget/kmdrmainwindow.h +++ b/kommander/widget/kmdrmainwindow.h @@ -17,7 +17,7 @@ /** @author Andras Mantia */ -class KmdrMainWindow : public KMainWindow +class KmdrMainWindow : public TDEMainWindow { Q_OBJECT diff --git a/kommander/widgets/execbutton.cpp b/kommander/widgets/execbutton.cpp index 4e88eb22..a9a906f0 100644 --- a/kommander/widgets/execbutton.cpp +++ b/kommander/widgets/execbutton.cpp @@ -209,7 +209,7 @@ TQString ExecButton::handleDCOP(int function, const TQStringList& args) ++it; if (w->name() == args[0] && ( strcmp(w->className(), "PopupMenu")) == 0 ) { - TQPopupMenu *popup = dynamic_cast(w->child("unnamed", "KPopupMenu")); + TQPopupMenu *popup = dynamic_cast(w->child("unnamed", "TDEPopupMenu")); this->setPopup(popup); } } diff --git a/kommander/widgets/fontdialog.cpp b/kommander/widgets/fontdialog.cpp index fefd8d85..739fb0e0 100644 --- a/kommander/widgets/fontdialog.cpp +++ b/kommander/widgets/fontdialog.cpp @@ -140,8 +140,8 @@ TQString FontDialog::handleDCOP(int function, const TQStringList& args) } case DCOP::execute: { - int result = KFontDialog::getFont( m_font ); - if ( result == KFontDialog::Accepted ) + int result = TDEFontDialog::getFont( m_font ); + if ( result == TDEFontDialog::Accepted ) { return m_font.toString(); } diff --git a/kommander/widgets/listbox.cpp b/kommander/widgets/listbox.cpp index bf6f8b4a..9a84bd4b 100644 --- a/kommander/widgets/listbox.cpp +++ b/kommander/widgets/listbox.cpp @@ -30,7 +30,7 @@ #include "listbox.h" ListBox::ListBox(TQWidget *a_parent, const char *a_name) - : KListBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) + : TDEListBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; diff --git a/kommander/widgets/listbox.h b/kommander/widgets/listbox.h index 2b20f24b..b970c280 100644 --- a/kommander/widgets/listbox.h +++ b/kommander/widgets/listbox.h @@ -31,7 +31,7 @@ class TQWidget; class TQShowEvent; -class KOMMANDER_EXPORT ListBox : public KListBox, public KommanderWidget +class KOMMANDER_EXPORT ListBox : public TDEListBox, public KommanderWidget { Q_OBJECT diff --git a/kommander/widgets/popupmenu.cpp b/kommander/widgets/popupmenu.cpp index dfa7b325..ba6c3781 100644 --- a/kommander/widgets/popupmenu.cpp +++ b/kommander/widgets/popupmenu.cpp @@ -49,7 +49,7 @@ PopupMenu::PopupMenu(TQWidget *parent, const char *name) else setHidden(true); - m_menu = new KPopupMenu(this); + m_menu = new TDEPopupMenu(this); connect(m_menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuItemActivated(int))); KommanderPlugin::setDefaultGroup(Group::DCOP); diff --git a/kommander/widgets/popupmenu.h b/kommander/widgets/popupmenu.h index b044d74e..b7ed192a 100644 --- a/kommander/widgets/popupmenu.h +++ b/kommander/widgets/popupmenu.h @@ -17,7 +17,7 @@ #include -class KPopupMenu; +class TDEPopupMenu; /** @author Andras Mantia @@ -41,7 +41,7 @@ public: virtual void setAssociatedText(const TQStringList&); virtual TQString populationText() const; virtual void setPopulationText(const TQString&); - KPopupMenu *menu() {return m_menu;} + TDEPopupMenu *menu() {return m_menu;} public slots: virtual void setWidgetText(const TQString &); @@ -54,7 +54,7 @@ private slots: private: TQString insertSubmenu(const TQString& title, const TQString &menuWidget, int index, const TQString& icon); - KPopupMenu *m_menu; + TDEPopupMenu *m_menu; TQMap m_associations; TQStringList m_params; }; diff --git a/kommander/widgets/treewidget.cpp b/kommander/widgets/treewidget.cpp index 8a1aabf6..7c1c989a 100644 --- a/kommander/widgets/treewidget.cpp +++ b/kommander/widgets/treewidget.cpp @@ -55,7 +55,7 @@ enum Functions { }; TreeWidget::TreeWidget(TQWidget *a_parent, const char *a_name) - : KListView(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) + : TDEListView(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -243,7 +243,7 @@ bool TreeWidget::isKommanderWidget() const void TreeWidget::setCurrentItem(TQListViewItem* item) { - KListView::setCurrentItem(item); + TDEListView::setCurrentItem(item); setSelected(item, true); ensureItemVisible(item); } @@ -458,10 +458,10 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args) break; } case addColumnTree: - return TQString::number(KListView::addColumn(args[0], args[1].toInt())); + return TQString::number(TDEListView::addColumn(args[0], args[1].toInt())); break; case setSortCol: - KListView::setSorting(args[0].toInt(), args[1].toInt()); + TDEListView::setSorting(args[0].toInt(), args[1].toInt()); break; case DCOP::columnCount: return TQString::number(TQListView::columns() ); @@ -476,7 +476,7 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args) setColAlign(args[0].toInt(), args[1]); break; case setAltBackground: - KListView::setAlternateBackground(TQColor(args[0])); + TDEListView::setAlternateBackground(TQColor(args[0])); break; case DCOP::removeColumn: { diff --git a/kommander/widgets/treewidget.h b/kommander/widgets/treewidget.h index d1055547..19cbcea6 100644 --- a/kommander/widgets/treewidget.h +++ b/kommander/widgets/treewidget.h @@ -32,7 +32,7 @@ class TQWidget; class TQShowEvent; -class KOMMANDER_EXPORT TreeWidget : public KListView, public KommanderWidget +class KOMMANDER_EXPORT TreeWidget : public TDEListView, public KommanderWidget { Q_OBJECT -- cgit v1.2.1