diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:13:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:13:01 -0600 |
commit | deac2ca49faed824fe83066080714eb6d653615b (patch) | |
tree | 8b5bf97c5acaaf5285985b87fa76dbea0f35e4fa /tdeio/bookmarks | |
parent | 0c9d97065a3d6ceb12d687555a1a33d90db96238 (diff) | |
download | tdelibs-deac2ca49faed824fe83066080714eb6d653615b.tar.gz tdelibs-deac2ca49faed824fe83066080714eb6d653615b.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'tdeio/bookmarks')
-rw-r--r-- | tdeio/bookmarks/kbookmarkbar.cc | 56 | ||||
-rw-r--r-- | tdeio/bookmarks/kbookmarkbar.h | 18 | ||||
-rw-r--r-- | tdeio/bookmarks/kbookmarkimporter.h | 2 | ||||
-rw-r--r-- | tdeio/bookmarks/kbookmarkmenu.cc | 72 | ||||
-rw-r--r-- | tdeio/bookmarks/kbookmarkmenu.h | 36 | ||||
-rw-r--r-- | tdeio/bookmarks/kbookmarkmenu_p.h | 34 |
6 files changed, 109 insertions, 109 deletions
diff --git a/tdeio/bookmarks/kbookmarkbar.cc b/tdeio/bookmarks/kbookmarkbar.cc index e73801808..b1ebb94fa 100644 --- a/tdeio/bookmarks/kbookmarkbar.cc +++ b/tdeio/bookmarks/kbookmarkbar.cc @@ -45,10 +45,10 @@ class KBookmarkBarPrivate : public dPtrTemplate<KBookmarkBar, KBookmarkBarPrivate> { public: - TQPtrList<KAction> m_actions; + TQPtrList<TDEAction> m_actions; bool m_readOnly; KBookmarkManager* m_filteredMgr; - KToolBar* m_sepToolBar; + TDEToolBar* m_sepToolBar; int m_sepIndex; bool m_atFirst; TQString m_dropAddress; @@ -85,8 +85,8 @@ private: }; KBookmarkBar::KBookmarkBar( KBookmarkManager* mgr, - KBookmarkOwner *_owner, KToolBar *_toolBar, - KActionCollection *coll, + KBookmarkOwner *_owner, TDEToolBar *_toolBar, + TDEActionCollection *coll, TQObject *parent, const char *name ) : TQObject( parent, name ), m_pOwner(_owner), m_toolBar(_toolBar), m_actionCollection( coll ), m_pManager(mgr) @@ -150,7 +150,7 @@ KBookmarkBar::~KBookmarkBar() void KBookmarkBar::clear() { - TQPtrListIterator<KAction> it( dptr()->m_actions ); + TQPtrListIterator<TDEAction> it( dptr()->m_actions ); m_toolBar->clear(); for (; it.current(); ++it ) { (*it)->unplugAll(); @@ -199,9 +199,9 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent) m_toolBar->insertLineSeparator(); else { - KAction *action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); + TDEAction *action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); + connect(action, TQT_SIGNAL( activated ( TDEAction::ActivationReason, TQt::ButtonState )), + this, TQT_SLOT( slotBookmarkSelected( TDEAction::ActivationReason, TQt::ButtonState ) )); action->setProperty( "url", bm.url().url() ); action->setProperty( "address", bm.address() ); @@ -215,7 +215,7 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent) } else { - KActionMenu *action = new KBookmarkActionMenu( text, bm.icon(), + TDEActionMenu *action = new KBookmarkActionMenu( text, bm.icon(), m_actionCollection, "bookmarkbar-actionmenu"); action->setProperty( "address", bm.address() ); @@ -252,11 +252,11 @@ bool KBookmarkBar::isReadOnly() const return dptr()->m_readOnly; } -void KBookmarkBar::slotBookmarkSelected( KAction::ActivationReason /*reason*/, TQt::ButtonState state ) +void KBookmarkBar::slotBookmarkSelected( TDEAction::ActivationReason /*reason*/, TQt::ButtonState state ) { if (!m_pOwner) return; // this view doesn't handle bookmarks... - const KAction* action = dynamic_cast<const KAction *>(sender()); + const TDEAction* action = dynamic_cast<const TDEAction *>(sender()); if(action) { const TQString & url = sender()->property("url").toString(); @@ -267,7 +267,7 @@ void KBookmarkBar::slotBookmarkSelected( KAction::ActivationReason /*reason*/, T void KBookmarkBar::slotBookmarkSelected() { - slotBookmarkSelected(KAction::ToolBarActivation, Qt::NoButton); + slotBookmarkSelected(TDEAction::ToolBarActivation, Qt::NoButton); } static const int const_sepId = -9999; // FIXME this is ugly, @@ -282,9 +282,9 @@ static void removeTempSep(KBookmarkBarPrivate* p) } } -static KAction* findPluggedAction(TQPtrList<KAction> actions, KToolBar *tb, int id) +static TDEAction* findPluggedAction(TQPtrList<TDEAction> actions, TDEToolBar *tb, int id) { - TQPtrListIterator<KAction> it( actions ); + TQPtrListIterator<TDEAction> it( actions ); for (; (*it); ++it ) if ((*it)->isPlugged(tb, id)) return (*it); @@ -302,19 +302,19 @@ static KAction* findPluggedAction(TQPtrList<KAction> actions, KToolBar *tb, int * returned action was dropped on */ static TQString handleToolbarDragMoveEvent( - KBookmarkBarPrivate *p, KToolBar *tb, TQPoint pos, TQPtrList<KAction> actions, + KBookmarkBarPrivate *p, TDEToolBar *tb, TQPoint pos, TQPtrList<TDEAction> actions, bool &atFirst, KBookmarkManager *mgr ) { Q_UNUSED( mgr ); - Q_ASSERT( actions.isEmpty() || (tb == dynamic_cast<KToolBar*>(actions.first()->container(0))) ); + Q_ASSERT( actions.isEmpty() || (tb == dynamic_cast<TDEToolBar*>(actions.first()->container(0))) ); p->m_sepToolBar = tb; p->m_sepToolBar->removeItemDelayed(const_sepId); int index = 0; - KToolBarButton* b; + TDEToolBarButton* b; - b = dynamic_cast<KToolBarButton*>(tb->childAt(pos)); - KAction *a = 0; + b = dynamic_cast<TDEToolBarButton*>(tb->childAt(pos)); + TDEAction *a = 0; TQString address; atFirst = false; @@ -382,23 +382,23 @@ skipact: } // TODO - document!!!! -static KAction* handleToolbarMouseButton(TQPoint pos, TQPtrList<KAction> actions, +static TDEAction* handleToolbarMouseButton(TQPoint pos, TQPtrList<TDEAction> actions, KBookmarkManager * /*mgr*/, TQPoint & pt) { - KAction *act = actions.first(); + TDEAction *act = actions.first(); if (!act) { return 0; } - KToolBar *tb = dynamic_cast<KToolBar*>(act->container(0)); + TDEToolBar *tb = dynamic_cast<TDEToolBar*>(act->container(0)); Q_ASSERT(tb); - KToolBarButton *b; - b = dynamic_cast<KToolBarButton*>(tb->childAt(pos)); + TDEToolBarButton *b; + b = dynamic_cast<TDEToolBarButton*>(tb->childAt(pos)); if (!b) return 0; - KAction *a = 0; + TDEAction *a = 0; a = findPluggedAction(actions, tb, b->id()); Q_ASSERT(a); pt = tb->mapToGlobal(pos); @@ -454,7 +454,7 @@ bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e ) TQMouseEvent *mev = (TQMouseEvent*)e; TQPoint pt; - KAction *_a; + TDEAction *_a; // FIXME, see how this holds up on an empty toolbar _a = handleToolbarMouseButton( mev->pos(), dptr()->m_actions, m_pManager, pt ); @@ -463,7 +463,7 @@ bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e ) dptr()->m_highlightedAddress = _a->property("address").toString(); KBookmark bookmark = m_pManager->findByAddress( dptr()->m_highlightedAddress ); RMB::begin_rmb_action(this); - KPopupMenu *pm = new KPopupMenu; + TDEPopupMenu *pm = new TDEPopupMenu; rmbSelf(this)->fillContextMenu( pm, dptr()->m_highlightedAddress, 0 ); emit aboutToShowContextMenu( rmbSelf(this)->atAddress( dptr()->m_highlightedAddress ), pm ); rmbSelf(this)->fillContextMenu2( pm, dptr()->m_highlightedAddress, 0 ); @@ -510,7 +510,7 @@ bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e ) return false; bool _atFirst; TQString dropAddress; - KToolBar *tb = (KToolBar*)o; + TDEToolBar *tb = (TDEToolBar*)o; dropAddress = handleToolbarDragMoveEvent(dptr(), tb, dme->pos(), dptr()->m_actions, _atFirst, m_pManager); if (!dropAddress.isNull()) { diff --git a/tdeio/bookmarks/kbookmarkbar.h b/tdeio/bookmarks/kbookmarkbar.h index 1f100d183..2f5495cda 100644 --- a/tdeio/bookmarks/kbookmarkbar.h +++ b/tdeio/bookmarks/kbookmarkbar.h @@ -27,11 +27,11 @@ #include <kbookmark.h> #include <kaction.h> -class KToolBar; +class TDEToolBar; class KBookmarkMenu; class KBookmarkOwner; -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; class TQPopupMenu; /** @@ -52,14 +52,14 @@ public: * @param owner implementation of the KBookmarkOwner interface (callbacks) * @param toolBar toolbar to fill * - * The KActionCollection pointer argument is now obsolete. + * The TDEActionCollection pointer argument is now obsolete. * * @param parent the parent widget for the bookmark toolbar * @param name the internal name for the bookmark toolbar */ KBookmarkBar( KBookmarkManager* manager, - KBookmarkOwner *owner, KToolBar *toolBar, - KActionCollection *, + KBookmarkOwner *owner, TDEToolBar *toolBar, + TDEActionCollection *, TQObject *parent = 0L, const char *name = 0L); virtual ~KBookmarkBar(); @@ -98,7 +98,7 @@ public slots: /** * @since 3.4 */ - void slotBookmarkSelected( KAction::ActivationReason reason, TQt::ButtonState state ); + void slotBookmarkSelected( TDEAction::ActivationReason reason, TQt::ButtonState state ); /// @since 3.2 void slotRMBActionRemove( int ); @@ -119,8 +119,8 @@ private: KBookmarkGroup getToolbar(); KBookmarkOwner *m_pOwner; - TQGuardedPtr<KToolBar> m_toolBar; - KActionCollection *m_actionCollection; + TQGuardedPtr<TDEToolBar> m_toolBar; + TDEActionCollection *m_actionCollection; KBookmarkManager *m_pManager; TQPtrList<KBookmarkMenu> m_lstSubMenus; diff --git a/tdeio/bookmarks/kbookmarkimporter.h b/tdeio/bookmarks/kbookmarkimporter.h index cc87b2004..6a038e03b 100644 --- a/tdeio/bookmarks/kbookmarkimporter.h +++ b/tdeio/bookmarks/kbookmarkimporter.h @@ -31,7 +31,7 @@ /** * A class for importing NS bookmarks * KEditBookmarks uses it to insert bookmarks into its DOM tree, - * and KActionMenu uses it to create actions directly. + * and TDEActionMenu uses it to create actions directly. * @since 3.2 */ class TDEIO_EXPORT KBookmarkImporterBase : public TQObject diff --git a/tdeio/bookmarks/kbookmarkmenu.cc b/tdeio/bookmarks/kbookmarkmenu.cc index a4d88ae57..ff9f8d4ec 100644 --- a/tdeio/bookmarks/kbookmarkmenu.cc +++ b/tdeio/bookmarks/kbookmarkmenu.cc @@ -77,8 +77,8 @@ static TQString makeTextNodeMod(KBookmark bk, const TQString &m_nodename, const /********************************************************************/ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, - KBookmarkOwner * _owner, KPopupMenu * _parentMenu, - KActionCollection *collec, bool _isRoot, bool _add, + KBookmarkOwner * _owner, TDEPopupMenu * _parentMenu, + TDEActionCollection *collec, bool _isRoot, bool _add, const TQString & parentAddress ) : TQObject(), m_bIsRoot(_isRoot), m_bAddBookmark(_add), @@ -96,9 +96,9 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, if (m_actionCollection) { m_actionCollection->setHighlightingEnabled(true); - disconnect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ), 0, 0 ); - connect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ), - this, TQT_SLOT( slotActionHighlighted( KAction * ) ) ); + disconnect( m_actionCollection, TQT_SIGNAL( actionHighlighted( TDEAction * ) ), 0, 0 ); + connect( m_actionCollection, TQT_SIGNAL( actionHighlighted( TDEAction * ) ), + this, TQT_SLOT( slotActionHighlighted( TDEAction * ) ) ); } m_bNSBookmark = m_parentAddress.isNull(); @@ -112,8 +112,8 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, if ( KBookmarkSettings::self()->m_contextmenu ) { (void) _parentMenu->contextMenu(); - connect( _parentMenu, TQT_SIGNAL( aboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) ), - this, TQT_SLOT( slotAboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) )); + connect( _parentMenu, TQT_SIGNAL( aboutToShowContextMenu(TDEPopupMenu*, int, TQPopupMenu*) ), + this, TQT_SLOT( slotAboutToShowContextMenu(TDEPopupMenu*, int, TQPopupMenu*) )); } if ( m_bIsRoot ) @@ -142,7 +142,7 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, KBookmarkMenu::~KBookmarkMenu() { //kdDebug(7043) << "KBookmarkMenu::~KBookmarkMenu() " << this << endl; - TQPtrListIterator<KAction> it( m_actions ); + TQPtrListIterator<TDEAction> it( m_actions ); for (; it.current(); ++it ) it.current()->unplugAll(); @@ -169,7 +169,7 @@ TQString KBookmarkMenu::s_highlightedAddress; TQString KBookmarkMenu::s_highlightedImportType; TQString KBookmarkMenu::s_highlightedImportLocation; -void KBookmarkMenu::slotActionHighlighted( KAction* action ) +void KBookmarkMenu::slotActionHighlighted( TDEAction* action ) { if (action->isA("KBookmarkActionMenu") || action->isA("KBookmarkAction")) { @@ -231,12 +231,12 @@ KBookmark RMB::atAddress(const TQString & address) return bookmark; } -void KBookmarkMenu::slotAboutToShowContextMenu( KPopupMenu*, int, TQPopupMenu* contextMenu ) +void KBookmarkMenu::slotAboutToShowContextMenu( TDEPopupMenu*, int, TQPopupMenu* contextMenu ) { //kdDebug(7043) << "KBookmarkMenu::slotAboutToShowContextMenu" << s_highlightedAddress << endl; if (s_highlightedAddress.isNull()) { - KPopupMenu::contextMenuFocus()->hideContextMenu(); + TDEPopupMenu::contextMenuFocus()->hideContextMenu(); return; } contextMenu->clear(); @@ -411,7 +411,7 @@ void RMB::slotRMBActionCopyLocation( int val ) } void RMB::hidePopup() { - KPopupMenu::contextMenuFocus()->hideContextMenu(); + TDEPopupMenu::contextMenuFocus()->hideContextMenu(); } /********************************************************************/ @@ -467,7 +467,7 @@ void KBookmarkMenu::refill() //kdDebug(7043) << "KBookmarkMenu::refill()" << endl; m_lstSubMenus.clear(); - TQPtrListIterator<KAction> it( m_actions ); + TQPtrListIterator<TDEAction> it( m_actions ); for (; it.current(); ++it ) it.current()->unplug( m_parentMenu ); @@ -480,12 +480,12 @@ void KBookmarkMenu::refill() void KBookmarkMenu::addAddBookmarksList() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; TQString title = i18n( "Bookmark Tabs as Folder..." ); - KAction * paAddBookmarksList = new KAction( title, + TDEAction * paAddBookmarksList = new TDEAction( title, "bookmarks_list_add", 0, this, @@ -500,14 +500,14 @@ void KBookmarkMenu::addAddBookmarksList() void KBookmarkMenu::addAddBookmark() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; TQString title = i18n( "Add Bookmark" ); - KAction * paAddBookmarks = new KAction( title, + TDEAction * paAddBookmarks = new TDEAction( title, "bookmark_add", - m_bIsRoot && m_bAddShortcuts ? KStdAccel::addBookmark() : KShortcut(), + m_bIsRoot && m_bAddShortcuts ? TDEStdAccel::addBookmark() : TDEShortcut(), this, TQT_SLOT( slotAddBookmark() ), m_actionCollection, m_bIsRoot ? "add_bookmark" : 0 ); @@ -520,10 +520,10 @@ void KBookmarkMenu::addAddBookmark() void KBookmarkMenu::addEditBookmarks() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; - KAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, TQT_SLOT( slotEditBookmarks() ), + TDEAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, TQT_SLOT( slotEditBookmarks() ), m_actionCollection, "edit_bookmarks" ); m_paEditBookmarks->plug( m_parentMenu ); m_paEditBookmarks->setToolTip( i18n( "Edit your bookmark collection in a separate window" ) ); @@ -532,7 +532,7 @@ void KBookmarkMenu::addEditBookmarks() void KBookmarkMenu::addNewFolder() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; TQString title = i18n( "&New Bookmark Folder..." ); @@ -540,7 +540,7 @@ void KBookmarkMenu::addNewFolder() while ( ( p = title.find( '&' ) ) >= 0 ) title.remove( p, 1 ); - KAction * paNewFolder = new KAction( title, + TDEAction * paNewFolder = new TDEAction( title, "folder_new", //"folder", 0, this, @@ -555,7 +555,7 @@ void KBookmarkMenu::addNewFolder() void KBookmarkMenu::fillBookmarkMenu() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; if ( m_bIsRoot ) @@ -594,7 +594,7 @@ void KBookmarkMenu::fillBookmarkMenu() haveSep = true; } - KActionMenu * actionMenu; + TDEActionMenu * actionMenu; actionMenu = new KImportedBookmarksActionMenu( info.name, info.type, m_actionCollection, "kbookmarkmenu" ); @@ -638,9 +638,9 @@ void KBookmarkMenu::fillBookmarkMenu() else { //kdDebug(7043) << "Creating URL bookmark menu item for " << bm.text() << endl; - KAction * action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); + TDEAction * action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); + connect(action, TQT_SIGNAL( activated ( TDEAction::ActivationReason, TQt::ButtonState )), + this, TQT_SLOT( slotBookmarkSelected( TDEAction::ActivationReason, TQt::ButtonState ) )); action->setProperty( "url", bm.url().url() ); action->setProperty( "address", bm.address() ); @@ -654,7 +654,7 @@ void KBookmarkMenu::fillBookmarkMenu() else { //kdDebug(7043) << "Creating bookmark submenu named " << bm.text() << endl; - KActionMenu * actionMenu = new KBookmarkActionMenu( text, bm.icon(), + TDEActionMenu * actionMenu = new KBookmarkActionMenu( text, bm.icon(), m_actionCollection, "kbookmarkmenu" ); actionMenu->setProperty( "address", bm.address() ); @@ -681,7 +681,7 @@ void KBookmarkMenu::fillBookmarkMenu() if ( KBookmarkSettings::self()->m_quickactions ) { - KActionMenu * actionMenu = new KActionMenu( i18n("Quick Actions"), m_actionCollection, 0L ); + TDEActionMenu * actionMenu = new TDEActionMenu( i18n("Quick Actions"), m_actionCollection, 0L ); fillContextMenu( actionMenu->popupMenu(), m_parentAddress, 1 ); actionMenu->plug( m_parentMenu ); m_actions.append( actionMenu ); @@ -743,11 +743,11 @@ void KBookmarkMenu::slotNewFolder() } } -void KBookmarkMenu::slotBookmarkSelected( KAction::ActivationReason /*reason*/, TQt::ButtonState state ) +void KBookmarkMenu::slotBookmarkSelected( TDEAction::ActivationReason /*reason*/, TQt::ButtonState state ) { kdDebug(7043) << "KBookmarkMenu::slotBookmarkSelected()" << endl; if ( !m_pOwner ) return; // this view doesn't handle bookmarks... - const KAction* action = dynamic_cast<const KAction *>(sender()); + const TDEAction* action = dynamic_cast<const TDEAction *>(sender()); if(action) { const TQString& url = sender()->property("url").toString(); @@ -758,7 +758,7 @@ void KBookmarkMenu::slotBookmarkSelected( KAction::ActivationReason /*reason*/, void KBookmarkMenu::slotBookmarkSelected() { - slotBookmarkSelected(KAction::PopupMenuActivation, Qt::NoButton); + slotBookmarkSelected(TDEAction::PopupMenuActivation, Qt::NoButton); } KExtendedBookmarkOwner* KBookmarkMenu::extOwner() @@ -1057,9 +1057,9 @@ void KBookmarkMenuNSImporter::newBookmark( const TQString & text, const TQCStrin { TQString _text = KStringHandler::csqueeze(text); _text.replace( '&', "&&" ); - KAction * action = new KBookmarkAction(_text, "html", 0, 0, "", m_actionCollection, 0); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - m_menu, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); + TDEAction * action = new KBookmarkAction(_text, "html", 0, 0, "", m_actionCollection, 0); + connect(action, TQT_SIGNAL( activated ( TDEAction::ActivationReason, TQt::ButtonState )), + m_menu, TQT_SLOT( slotBookmarkSelected( TDEAction::ActivationReason, TQt::ButtonState ) )); action->setProperty( "url", url ); action->setToolTip( url ); action->plug( mstack.top()->m_parentMenu ); @@ -1070,7 +1070,7 @@ void KBookmarkMenuNSImporter::newFolder( const TQString & text, bool, const TQSt { TQString _text = KStringHandler::csqueeze(text); _text.replace( '&', "&&" ); - KActionMenu * actionMenu = new KActionMenu( _text, "folder", m_actionCollection, 0L ); + TDEActionMenu * actionMenu = new TDEActionMenu( _text, "folder", m_actionCollection, 0L ); actionMenu->plug( mstack.top()->m_parentMenu ); mstack.top()->m_actions.append( actionMenu ); KBookmarkMenu *subMenu = new KBookmarkMenu( m_pManager, m_menu->m_pOwner, actionMenu->popupMenu(), diff --git a/tdeio/bookmarks/kbookmarkmenu.h b/tdeio/bookmarks/kbookmarkmenu.h index 35e6191e3..003077202 100644 --- a/tdeio/bookmarks/kbookmarkmenu.h +++ b/tdeio/bookmarks/kbookmarkmenu.h @@ -43,18 +43,18 @@ class TQListView; class KLineEdit; class KBookmark; class KBookmarkGroup; -class KAction; -class KActionMenu; -class KActionCollection; +class TDEAction; +class TDEActionMenu; +class TDEActionCollection; class KBookmarkOwner; class KBookmarkMenu; -class KPopupMenu; +class TDEPopupMenu; namespace TDEIO { class Job; } /** * This class provides a bookmark menu. It is typically used in - * cooperation with KActionMenu but doesn't have to be. + * cooperation with TDEActionMenu but doesn't have to be. * * If you use this class by itself, then it will use KDE defaults for * everything -- the bookmark path, bookmark editor, bookmark launcher.. @@ -66,7 +66,7 @@ namespace TDEIO { class Job; } * * Using this class is very simple: * - * 1) Create a popup menu (either KActionMenu or KPopupMenu will do) + * 1) Create a popup menu (either TDEActionMenu or TDEPopupMenu will do) * 2) Instantiate a new KBookmarkMenu object using the above popup * menu as a parameter * 3) Insert your (now full) popup menu wherever you wish @@ -90,7 +90,7 @@ public: * @param mgr The bookmark manager to use (i.e. for reading and writing) * @param owner implementation of the KBookmarkOwner callback interface. * @param parentMenu menu to be filled - * @param collec parent collection for the KActions. + * @param collec parent collection for the TDEActions. * Only used for other menus than the toplevel one. * @param root true for the toplevel menu * @param add true to show the "Add Bookmark" and "New Folder" entries @@ -102,8 +102,8 @@ public: * An _empty_ parentAddress denotes the toplevel bookmark menu */ KBookmarkMenu( KBookmarkManager* mgr, - KBookmarkOwner * owner, KPopupMenu * parentMenu, - KActionCollection * collec, bool root, bool add = true, + KBookmarkOwner * owner, TDEPopupMenu * parentMenu, + TDEActionCollection * collec, bool root, bool add = true, const TQString & parentAddress = "" ); ~KBookmarkMenu(); @@ -169,8 +169,8 @@ public slots: // public for bookmark bar protected slots: void slotAboutToShow(); - void slotAboutToShowContextMenu( KPopupMenu *, int, TQPopupMenu * ); - void slotActionHighlighted( KAction * ); + void slotAboutToShowContextMenu( TDEPopupMenu *, int, TQPopupMenu * ); + void slotActionHighlighted( TDEAction * ); void slotRMBActionRemove( int ); void slotRMBActionInsert( int ); @@ -182,7 +182,7 @@ protected slots: /** * @ since 3.4 */ - void slotBookmarkSelected( KAction::ActivationReason reason, TQt::ButtonState state ); + void slotBookmarkSelected( TDEAction::ActivationReason reason, TQt::ButtonState state ); void slotAddBookmarksList(); void slotAddBookmark(); void slotNewFolder(); @@ -214,16 +214,16 @@ protected: * The menu in which we plug our actions. * Supplied in the constructor. */ - KPopupMenu * m_parentMenu; + TDEPopupMenu * m_parentMenu; /** * List of our sub menus */ TQPtrList<KBookmarkMenu> m_lstSubMenus; - KActionCollection * m_actionCollection; + TDEActionCollection * m_actionCollection; /** * List of our actions. */ - TQPtrList<KAction> m_actions; + TQPtrList<TDEAction> m_actions; /** * Parent bookmark for this menu. */ @@ -236,13 +236,13 @@ protected: }; /** - * A class connected to KNSBookmarkImporter, to fill KActionMenus. + * A class connected to KNSBookmarkImporter, to fill TDEActionMenus. */ class TDEIO_EXPORT KBookmarkMenuNSImporter : public TQObject { Q_OBJECT public: - KBookmarkMenuNSImporter( KBookmarkManager* mgr, KBookmarkMenu * menu, KActionCollection * act ) : + KBookmarkMenuNSImporter( KBookmarkManager* mgr, KBookmarkMenu * menu, TDEActionCollection * act ) : m_menu(menu), m_actionCollection(act), m_pManager(mgr) {} void openNSBookmarks(); @@ -258,7 +258,7 @@ protected slots: protected: TQPtrStack<KBookmarkMenu> mstack; KBookmarkMenu * m_menu; - KActionCollection * m_actionCollection; + TDEActionCollection * m_actionCollection; KBookmarkManager* m_pManager; }; diff --git a/tdeio/bookmarks/kbookmarkmenu_p.h b/tdeio/bookmarks/kbookmarkmenu_p.h index cb88607fe..dff3e6f30 100644 --- a/tdeio/bookmarks/kbookmarkmenu_p.h +++ b/tdeio/bookmarks/kbookmarkmenu_p.h @@ -44,15 +44,15 @@ class TQListView; class KLineEdit; class KBookmark; class KBookmarkGroup; -class KAction; -class KActionMenu; -class KActionCollection; +class TDEAction; +class TDEActionMenu; +class TDEActionCollection; class KBookmarkOwner; class KBookmarkMenu; class KBookmarkBar; -class KPopupMenu; +class TDEPopupMenu; -class KImportedBookmarksActionMenu : public KActionMenu { +class KImportedBookmarksActionMenu : public TDEActionMenu { Q_OBJECT TQ_PROPERTY( TQString type READ type WRITE setType ) TQ_PROPERTY( TQString location READ location WRITE setLocation ) @@ -67,13 +67,13 @@ private: public: KImportedBookmarksActionMenu( const TQString &text, const TQString& sIconName, - KActionCollection* parent, const char* name) - : KActionMenu(text, sIconName, parent, name) { + TDEActionCollection* parent, const char* name) + : TDEActionMenu(text, sIconName, parent, name) { ; } }; -class KBookmarkActionMenu : public KActionMenu { +class KBookmarkActionMenu : public TDEActionMenu { Q_OBJECT TQ_PROPERTY( TQString url READ url WRITE setUrl ) TQ_PROPERTY( TQString address READ address WRITE setAddress ) @@ -92,13 +92,13 @@ private: public: KBookmarkActionMenu( const TQString &text, const TQString& sIconName, - KActionCollection* parent, const char* name) - : KActionMenu(text, sIconName, parent, name) { + TDEActionCollection* parent, const char* name) + : TDEActionMenu(text, sIconName, parent, name) { ; } }; -class KBookmarkAction : public KAction { +class KBookmarkAction : public TDEAction { Q_OBJECT TQ_PROPERTY( TQString url READ url WRITE setUrl ) TQ_PROPERTY( TQString address READ address WRITE setAddress ) @@ -113,15 +113,15 @@ private: public: // KDE4: remove KBookmarkAction( - const TQString& text, const TQString& sIconName, const KShortcut& cut, + const TQString& text, const TQString& sIconName, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name) - : KAction(text, sIconName, cut, receiver, slot, parent, name) { + TDEActionCollection* parent, const char* name) + : TDEAction(text, sIconName, cut, receiver, slot, parent, name) { } KBookmarkAction( - const TQString& text, const TQString& sIconName, const KShortcut& cut, - KActionCollection* parent, const char* name) - : KAction(text, sIconName, cut, parent, name) { + const TQString& text, const TQString& sIconName, const TDEShortcut& cut, + TDEActionCollection* parent, const char* name) + : TDEAction(text, sIconName, cut, parent, name) { } }; |