KBookmarkMenu Class Reference
This class provides a bookmark menu. More...
#include <kbookmarkmenu.h>
Inheritance diagram for KBookmarkMenu:


Public Slots | |
void | slotBookmarksChanged (const QString &) |
Public Member Functions | |
KBookmarkMenu (KBookmarkManager *mgr, KBookmarkOwner *owner, KPopupMenu *parentMenu, KActionCollection *collec, bool root, bool add=true, const QString &parentAddress="") | |
Fills a bookmark menu (one instance of KBookmarkMenu is created for the toplevel menu, but also one per submenu). | |
void | fillBookmarkMenu () |
Even if you think you need to use this, you are probably wrong. | |
void | ensureUpToDate () |
Call ensureUpToDate() if you need KBookmarkMenu to adjust to its final size before it is executed. | |
Protected Slots | |
void | slotAboutToShow () |
void | slotBookmarkSelected () |
void | slotAddBookmark () |
void | slotNewFolder () |
void | slotNSBookmarkSelected () |
void | slotNSLoad () |
load Netscape's bookmarks | |
Protected Member Functions | |
void | refill () |
void | addAddBookmark () |
void | addEditBookmarks () |
void | addNewFolder () |
Protected Attributes | |
bool | m_bIsRoot:1 |
bool | m_bAddBookmark:1 |
bool | m_bDirty:1 |
bool | m_bNSBookmark:1 |
KBookmarkManager * | m_pManager |
KBookmarkOwner * | m_pOwner |
KPopupMenu * | m_parentMenu |
The menu in which we plug our actions. | |
QPtrList< KBookmarkMenu > | m_lstSubMenus |
List of our sub menus. | |
KActionCollection * | m_actionCollection |
QPtrList< KAction > | m_actions |
List of our actions. | |
QString | m_parentAddress |
Parent bookmark for this menu. |
Detailed Description
This class provides a bookmark menu.It is typically used in cooperation with KActionMenu 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.. everything. These defaults reside in the classes KBookmarkOwner (editing bookmarks) and KBookmarkManager (almost everything else). If you wish to change the defaults in any way, you must reimplement and instantiate those classes before this class is ever called.
Using this class is very simple:
1) Create a popup menu (either KActionMenu or KPopupMenu 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
Again, if you wish to modify any defaults, the procedure is:
1a) Reimplement your own KBookmarkOwner 1b) Reimplement and instantiate your own KBookmarkManager
Definition at line 64 of file kbookmarkmenu.h.
Constructor & Destructor Documentation
|
Fills a bookmark menu (one instance of KBookmarkMenu is created for the toplevel menu, but also one per submenu).
Definition at line 56 of file kbookmarkmenu.cc. References QObject::connect(), QString::isNull(), m_actions, m_lstSubMenus, m_parentAddress, m_parentMenu, QPtrList< KAction >::setAutoDelete(), QPtrList< KBookmarkMenu >::setAutoDelete(), and KPopupMenu::setKeyboardShortcutsEnabled(). Referenced by fillBookmarkMenu(). |
Member Function Documentation
|
Even if you think you need to use this, you are probably wrong. It fills a bookmark menu starting a given KBookmark. This is public for KBookmarkBar. Definition at line 220 of file kbookmarkmenu.cc. References KStdAccel::action(), QPtrList< KBookmarkMenu >::append(), QPtrList< KAction >::append(), QObject::connect(), QFile::exists(), KBookmarkManager::findByAddress(), KBookmarkGroup::first(), QPopupMenu::insertSeparator(), KBookmarkMenu(), m_actions, m_lstSubMenus, m_parentAddress, m_parentMenu, KBookmarkGroup::next(), KActionMenu::plug(), KActionMenu::popupMenu(), QString::replace(), KBookmarkManager::showNSBookmarks(), and slotNSLoad(). |
|
Call ensureUpToDate() if you need KBookmarkMenu to adjust to its final size before it is executed.
Definition at line 109 of file kbookmarkmenu.cc. |
|
load Netscape's bookmarks
Definition at line 389 of file kbookmarkmenu.cc. References m_parentMenu, and KBookmarkMenuNSImporter::openNSBookmarks(). Referenced by fillBookmarkMenu(). |
Member Data Documentation
|
The menu in which we plug our actions. Supplied in the constructor. Definition at line 137 of file kbookmarkmenu.h. Referenced by fillBookmarkMenu(), KBookmarkMenu(), and slotNSLoad(). |
|
List of our sub menus.
Definition at line 141 of file kbookmarkmenu.h. Referenced by fillBookmarkMenu(), and KBookmarkMenu(). |
|
List of our actions.
Definition at line 146 of file kbookmarkmenu.h. Referenced by fillBookmarkMenu(), and KBookmarkMenu(). |
|
Parent bookmark for this menu.
Definition at line 150 of file kbookmarkmenu.h. Referenced by fillBookmarkMenu(), and KBookmarkMenu(). |
The documentation for this class was generated from the following files: