diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:11:21 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:11:21 -0600 |
commit | f537c21b68e08f649b1b297bce8f3904603137e0 (patch) | |
tree | fb33065387509dea898c90022ddec9c3f8ede86d /kmenuedit | |
parent | dc5f267664506a312203c26bfe9001a448b0bb0f (diff) | |
download | tdebase-f537c21b68e08f649b1b297bce8f3904603137e0.tar.gz tdebase-f537c21b68e08f649b1b297bce8f3904603137e0.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kmenuedit')
-rw-r--r-- | kmenuedit/basictab.cpp | 8 | ||||
-rw-r--r-- | kmenuedit/basictab.h | 4 | ||||
-rw-r--r-- | kmenuedit/kmenuedit.cpp | 20 | ||||
-rw-r--r-- | kmenuedit/kmenuedit.h | 10 | ||||
-rw-r--r-- | kmenuedit/menuinfo.cpp | 20 | ||||
-rw-r--r-- | kmenuedit/menuinfo.h | 10 | ||||
-rw-r--r-- | kmenuedit/treeview.cpp | 8 | ||||
-rw-r--r-- | kmenuedit/treeview.h | 12 |
8 files changed, 46 insertions, 46 deletions
diff --git a/kmenuedit/basictab.cpp b/kmenuedit/basictab.cpp index bdee0e3b3..ce1667cae 100644 --- a/kmenuedit/basictab.cpp +++ b/kmenuedit/basictab.cpp @@ -219,8 +219,8 @@ BasicTab::BasicTab( TQWidget *parent, const char *name ) //connect( _keyButton, TQT_SIGNAL( clicked()), this, TQT_SLOT( keyButtonPressed())); _keyEdit = new KKeyButton(general_group_keybind); grid_keybind->addWidget(new TQLabel(_keyEdit, i18n("Current shortcut &key:"), general_group_keybind), 0, 0); - connect( _keyEdit, TQT_SIGNAL(capturedShortcut(const KShortcut&)), - this, TQT_SLOT(slotCapturedShortcut(const KShortcut&))); + connect( _keyEdit, TQT_SIGNAL(capturedShortcut(const TDEShortcut&)), + this, TQT_SLOT(slotCapturedShortcut(const TDEShortcut&))); grid_keybind->addWidget(_keyEdit, 0, 1); //grid_keybind->addWidget(_keyButton, 0, 2 ); @@ -321,7 +321,7 @@ void BasicTab::setEntryInfo(MenuEntryInfo *entryInfo) _iconButton->setIcon(TQString::null); // key binding part - _keyEdit->setShortcut( KShortcut(), false ); + _keyEdit->setShortcut( TDEShortcut(), false ); _execEdit->lineEdit()->setText(TQString::null); _systrayCB->setChecked(false); @@ -463,7 +463,7 @@ void BasicTab::slotExecSelected() _execEdit->lineEdit()->setText(TDEProcess::quote(path)); } -void BasicTab::slotCapturedShortcut(const KShortcut& cut) +void BasicTab::slotCapturedShortcut(const TDEShortcut& cut) { if (signalsBlocked()) return; diff --git a/kmenuedit/basictab.h b/kmenuedit/basictab.h index fb4555c6a..947a2a14a 100644 --- a/kmenuedit/basictab.h +++ b/kmenuedit/basictab.h @@ -49,7 +49,7 @@ public: signals: void changed( MenuFolderInfo * ); void changed( MenuEntryInfo * ); - void findServiceShortcut(const KShortcut&, KService::Ptr &); + void findServiceShortcut(const TDEShortcut&, KService::Ptr &); public slots: void setFolderInfo(MenuFolderInfo *folderInfo); @@ -61,7 +61,7 @@ protected slots: void systraycb_clicked(); void termcb_clicked(); void uidcb_clicked(); - void slotCapturedShortcut(const KShortcut&); + void slotCapturedShortcut(const TDEShortcut&); void slotExecSelected(); protected: diff --git a/kmenuedit/kmenuedit.cpp b/kmenuedit/kmenuedit.cpp index 48af13124..80f5eabf0 100644 --- a/kmenuedit/kmenuedit.cpp +++ b/kmenuedit/kmenuedit.cpp @@ -38,7 +38,7 @@ #include "kmenuedit.moc" KMenuEdit::KMenuEdit (bool controlCenter, TQWidget *, const char *name) - : KMainWindow (0, name), m_tree(0), m_basicTab(0), m_splitter(0), m_controlCenter(controlCenter) + : TDEMainWindow (0, name), m_tree(0), m_basicTab(0), m_splitter(0), m_controlCenter(controlCenter) { #if 0 m_showHidden = config->readBoolEntry("ShowHidden"); @@ -62,12 +62,12 @@ KMenuEdit::~KMenuEdit() void KMenuEdit::setupActions() { - (void)new KAction(i18n("&New Submenu..."), "menu_new", 0, actionCollection(), "newsubmenu"); - (void)new KAction(i18n("New &Item..."), "filenew", KStdAccel::openNew(), actionCollection(), "newitem"); + (void)new TDEAction(i18n("&New Submenu..."), "menu_new", 0, actionCollection(), "newsubmenu"); + (void)new TDEAction(i18n("New &Item..."), "filenew", TDEStdAccel::openNew(), actionCollection(), "newitem"); if (!m_controlCenter) - (void)new KAction(i18n("New S&eparator"), "menu_new_sep", 0, actionCollection(), "newsep"); + (void)new TDEAction(i18n("New S&eparator"), "menu_new_sep", 0, actionCollection(), "newsep"); - (void)new KAction(i18n("Save && Quit"), "filesave_and_close", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSave_and_close()), actionCollection(), "file_save_and_quit"); + (void)new TDEAction(i18n("Save && Quit"), "filesave_and_close", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSave_and_close()), actionCollection(), "file_save_and_quit"); m_actionDelete = 0; @@ -97,8 +97,8 @@ void KMenuEdit::setupView() connect(m_basicTab, TQT_SIGNAL(changed(MenuEntryInfo *)), m_tree, TQT_SLOT(currentChanged(MenuEntryInfo *))); - connect(m_basicTab, TQT_SIGNAL(findServiceShortcut(const KShortcut&, KService::Ptr &)), - m_tree, TQT_SLOT(findServiceShortcut(const KShortcut&, KService::Ptr &))); + connect(m_basicTab, TQT_SIGNAL(findServiceShortcut(const TDEShortcut&, KService::Ptr &)), + m_tree, TQT_SLOT(findServiceShortcut(const TDEShortcut&, KService::Ptr &))); // restore splitter sizes TDEConfig* config = TDEGlobal::config(); @@ -126,14 +126,14 @@ void KMenuEdit::slotChangeView() delete m_actionDelete; - m_actionDelete = new KAction(i18n("&Delete"), "editdelete", Key_Delete, actionCollection(), "delete"); + m_actionDelete = new TDEAction(i18n("&Delete"), "editdelete", Key_Delete, actionCollection(), "delete"); if (!m_splitter) setupView(); if (m_controlCenter) - setupGUI(KMainWindow::ToolBar|Keys|Save|Create, "kcontroleditui.rc"); + setupGUI(TDEMainWindow::ToolBar|Keys|Save|Create, "kcontroleditui.rc"); else - setupGUI(KMainWindow::ToolBar|Keys|Save|Create, "kmenueditui.rc"); + setupGUI(TDEMainWindow::ToolBar|Keys|Save|Create, "kmenueditui.rc"); m_tree->setViewMode(m_showHidden); } diff --git a/kmenuedit/kmenuedit.h b/kmenuedit/kmenuedit.h index bc9bd13c1..fdd79bcef 100644 --- a/kmenuedit/kmenuedit.h +++ b/kmenuedit/kmenuedit.h @@ -25,10 +25,10 @@ class BasicTab; class TQSplitter; -class KAction; -class KToggleAction; +class TDEAction; +class TDEToggleAction; -class KMenuEdit : public KMainWindow +class KMenuEdit : public TDEMainWindow { Q_OBJECT @@ -54,8 +54,8 @@ protected: BasicTab *m_basicTab; TQSplitter *m_splitter; - KAction *m_actionDelete; - KToggleAction *m_actionShowHidden; + TDEAction *m_actionDelete; + TDEToggleAction *m_actionShowHidden; bool m_showHidden; bool m_controlCenter; }; diff --git a/kmenuedit/menuinfo.cpp b/kmenuedit/menuinfo.cpp index e04f92c18..03c3a2e57 100644 --- a/kmenuedit/menuinfo.cpp +++ b/kmenuedit/menuinfo.cpp @@ -254,7 +254,7 @@ bool MenuFolderInfo::hasDirt() return false; } -KService::Ptr MenuFolderInfo::findServiceShortcut(const KShortcut&cut) +KService::Ptr MenuFolderInfo::findServiceShortcut(const TDEShortcut&cut) { KService::Ptr result; // Check sub-menus @@ -382,7 +382,7 @@ void MenuEntryInfo::setIcon(const TQString &_icon) desktopFile()->writeEntry("Icon", icon); } -KShortcut MenuEntryInfo::shortcut() +TDEShortcut MenuEntryInfo::shortcut() { if (!shortcutLoaded) { @@ -395,7 +395,7 @@ KShortcut MenuEntryInfo::shortcut() return shortCut; } -static bool isEmpty(const KShortcut &shortCut) +static bool isEmpty(const TDEShortcut &shortCut) { for(int i = shortCut.count(); i--;) { @@ -405,7 +405,7 @@ static bool isEmpty(const KShortcut &shortCut) return true; } -static void freeShortcut(const KShortcut &shortCut) +static void freeShortcut(const TDEShortcut &shortCut) { if (!isEmpty(shortCut)) { @@ -420,7 +420,7 @@ static void freeShortcut(const KShortcut &shortCut) } } -static void allocateShortcut(const KShortcut &shortCut) +static void allocateShortcut(const TDEShortcut &shortCut) { if (!isEmpty(shortCut)) { @@ -435,7 +435,7 @@ static void allocateShortcut(const KShortcut &shortCut) } } -void MenuEntryInfo::setShortcut(const KShortcut &_shortcut) +void MenuEntryInfo::setShortcut(const TDEShortcut &_shortcut) { if (shortCut == _shortcut) return; @@ -445,7 +445,7 @@ void MenuEntryInfo::setShortcut(const KShortcut &_shortcut) shortCut = _shortcut; if (isEmpty(shortCut)) - shortCut = KShortcut(); // Normalize + shortCut = TDEShortcut(); // Normalize shortcutLoaded = true; shortcutDirty = true; @@ -455,8 +455,8 @@ void MenuEntryInfo::setInUse(bool inUse) { if (inUse) { - KShortcut temp = shortcut(); - shortCut = KShortcut(); + TDEShortcut temp = shortcut(); + shortCut = TDEShortcut(); if (isShortcutAvailable(temp)) shortCut = temp; else @@ -478,7 +478,7 @@ void MenuEntryInfo::setInUse(bool inUse) } } -bool MenuEntryInfo::isShortcutAvailable(const KShortcut &_shortcut) +bool MenuEntryInfo::isShortcutAvailable(const TDEShortcut &_shortcut) { if (shortCut == _shortcut) return true; diff --git a/kmenuedit/menuinfo.h b/kmenuedit/menuinfo.h index 1d9cbeb8e..616df68ad 100644 --- a/kmenuedit/menuinfo.h +++ b/kmenuedit/menuinfo.h @@ -119,7 +119,7 @@ public: void save(MenuFile *); // Search service by shortcut - KService::Ptr findServiceShortcut(const KShortcut&); + KService::Ptr findServiceShortcut(const TDEShortcut&); // Set whether the entry is in active use (as opposed to in the clipboard/deleted) void setInUse(bool inUse); @@ -160,9 +160,9 @@ public: TQString file() const { return service->desktopEntryPath(); } - KShortcut shortcut(); - void setShortcut(const KShortcut &_shortcut); - bool isShortcutAvailable(const KShortcut &_shortcut); + TDEShortcut shortcut(); + void setShortcut(const TDEShortcut &_shortcut); + bool isShortcutAvailable(const TDEShortcut &_shortcut); void setDirty(); @@ -182,7 +182,7 @@ public: TQString icon; KService::Ptr service; KDesktopFile *df; - KShortcut shortCut; + TDEShortcut shortCut; bool shortcutLoaded; bool shortcutDirty; bool dirty; diff --git a/kmenuedit/treeview.cpp b/kmenuedit/treeview.cpp index 1947af3e3..c58d7bf0f 100644 --- a/kmenuedit/treeview.cpp +++ b/kmenuedit/treeview.cpp @@ -146,8 +146,8 @@ static TQPixmap appIcon(const TQString &iconName) } -TreeView::TreeView( bool controlCenter, KActionCollection *ac, TQWidget *parent, const char *name ) - : KListView(parent, name), m_ac(ac), m_rmb(0), m_clipboard(0), +TreeView::TreeView( bool controlCenter, TDEActionCollection *ac, TQWidget *parent, const char *name ) + : TDEListView(parent, name), m_ac(ac), m_rmb(0), m_clipboard(0), m_clipboardFolderInfo(0), m_clipboardEntryInfo(0), m_controlCenter(controlCenter), m_layoutDirty(false) { @@ -209,7 +209,7 @@ void TreeView::setViewMode(bool showHidden) // setup rmb menu m_rmb = new TQPopupMenu(this); - KAction *action; + TDEAction *action; action = m_ac->action("edit_cut"); if(action) { @@ -1574,7 +1574,7 @@ bool TreeView::dirty() return m_layoutDirty || m_rootFolder->hasDirt() || m_menuFile->dirty() || isLayoutDirty(); } -void TreeView::findServiceShortcut(const KShortcut&cut, KService::Ptr &service) +void TreeView::findServiceShortcut(const TDEShortcut&cut, KService::Ptr &service) { service = m_rootFolder->findServiceShortcut(cut); } diff --git a/kmenuedit/treeview.h b/kmenuedit/treeview.h index 5811a2159..562a33301 100644 --- a/kmenuedit/treeview.h +++ b/kmenuedit/treeview.h @@ -28,13 +28,13 @@ #include <kservicegroup.h> class TQPopupMenu; -class KActionCollection; +class TDEActionCollection; class KDesktopFile; class MenuFile; class MenuFolderInfo; class MenuEntryInfo; class MenuSeparatorInfo; -class KShortcut; +class TDEShortcut; class TreeItem : public TQListViewItem { @@ -85,12 +85,12 @@ private: MenuEntryInfo *m_entryInfo; }; -class TreeView : public KListView +class TreeView : public TDEListView { friend class TreeItem; Q_OBJECT public: - TreeView(bool controlCenter, KActionCollection *ac, TQWidget *parent=0, const char *name=0); + TreeView(bool controlCenter, TDEActionCollection *ac, TQWidget *parent=0, const char *name=0); ~TreeView(); void readMenuFolderInfo(MenuFolderInfo *folderInfo=0, KServiceGroup::Ptr folder=0, const TQString &prefix=TQString::null); @@ -105,7 +105,7 @@ public: public slots: void currentChanged(MenuFolderInfo *folderInfo); void currentChanged(MenuEntryInfo *entryInfo); - void findServiceShortcut(const KShortcut&, KService::Ptr &); + void findServiceShortcut(const TDEShortcut&, KService::Ptr &); signals: void entrySelected(MenuFolderInfo *folderInfo); @@ -154,7 +154,7 @@ protected: virtual void startDrag(); private: - KActionCollection *m_ac; + TDEActionCollection *m_ac; TQPopupMenu *m_rmb; int m_clipboard; MenuFolderInfo *m_clipboardFolderInfo; |