kio
KBookmarkMenu Class Reference
This class provides a bookmark menu. More...
#include <kbookmarkmenu.h>
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 79 of file kbookmarkmenu.h.
Constructor & Destructor Documentation
KBookmarkMenu::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).
- Parameters:
-
mgr The bookmark manager to use (i.e. for reading and writing) owner implementation of the KBookmarkOwner callback interface. parentMenu menu to be filled collec parent collection for the KActions. Only used for other menus than the toplevel one. root true for the toplevel menu add true to show the "Add Bookmark" and "New Folder" entries parentAddress the address of the group containing the items that we want to show.
- See also:
- KBookmark::address. Be careful : A _null_ parentAddress denotes a NS-bookmark menu. An _empty_ parentAddress denotes the toplevel bookmark menu
Definition at line 79 of file kbookmarkmenu.cc.
KBookmarkMenu::~KBookmarkMenu | ( | ) |
Definition at line 142 of file kbookmarkmenu.cc.
Member Function Documentation
void KBookmarkMenu::aboutToShowContextMenu | ( | const KBookmark & | , | |
QPopupMenu * | ||||
) | [signal] |
void KBookmarkMenu::addAddBookmark | ( | ) | [protected] |
Definition at line 501 of file kbookmarkmenu.cc.
void KBookmarkMenu::addAddBookmarksList | ( | ) | [protected] |
Definition at line 481 of file kbookmarkmenu.cc.
void KBookmarkMenu::addEditBookmarks | ( | ) | [protected] |
Definition at line 521 of file kbookmarkmenu.cc.
void KBookmarkMenu::addNewFolder | ( | ) | [protected] |
Definition at line 533 of file kbookmarkmenu.cc.
QStringList KBookmarkMenu::dynamicBookmarksList | ( | ) | [static] |
void KBookmarkMenu::ensureUpToDate | ( | ) |
Call ensureUpToDate() if you need KBookmarkMenu to adjust to its final size before it is executed.
Definition at line 153 of file kbookmarkmenu.cc.
KExtendedBookmarkOwner * KBookmarkMenu::extOwner | ( | ) | [protected] |
Definition at line 764 of file kbookmarkmenu.cc.
void KBookmarkMenu::fillBookmarkMenu | ( | ) |
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 556 of file kbookmarkmenu.cc.
void KBookmarkMenu::fillContextMenu | ( | QPopupMenu * | contextMenu, | |
const QString & | address, | |||
int | val | |||
) | [protected] |
Definition at line 421 of file kbookmarkmenu.cc.
void KBookmarkMenu::openBookmark | ( | const QString & | url, | |
Qt::ButtonState | state | |||
) | [signal] |
- Since:
- 3.4
void KBookmarkMenu::refill | ( | ) | [protected] |
Definition at line 465 of file kbookmarkmenu.cc.
void KBookmarkMenu::setDynamicBookmarks | ( | const QString & | id, | |
const DynMenuInfo & | info | |||
) | [static] |
Shows an extra menu for the given bookmarks file and type.
Upgrades from option inside XBEL to option in rc file on first call of this function.
- Parameters:
-
id the unique identification for the dynamic menu info a DynMenuInfo struct containing the to be added/modified data
- Since:
- 3.2
Definition at line 1146 of file kbookmarkmenu.cc.
KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks | ( | const QString & | id | ) | [static] |
- Returns:
- dynmenu info block for the given dynmenu name
- Since:
- 3.2
Definition at line 1100 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotAboutToShow | ( | ) | [protected, slot] |
Definition at line 158 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotAboutToShowContextMenu | ( | KPopupMenu * | , | |
int | , | |||
QPopupMenu * | contextMenu | |||
) | [protected, slot] |
Definition at line 234 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotActionHighlighted | ( | KAction * | action | ) | [protected, slot] |
Definition at line 172 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotAddBookmark | ( | ) | [protected, slot] |
Definition at line 725 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotAddBookmarksList | ( | ) | [protected, slot] |
Definition at line 699 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotBookmarksChanged | ( | const QString & | groupAddress | ) | [slot] |
Definition at line 444 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotBookmarkSelected | ( | KAction::ActivationReason | reason, | |
Qt::ButtonState | state | |||
) | [protected, slot] |
void KBookmarkMenu::slotBookmarkSelected | ( | ) | [protected, slot] |
Definition at line 759 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotNewFolder | ( | ) | [protected, slot] |
Definition at line 733 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotNSLoad | ( | ) | [protected, slot] |
void KBookmarkMenu::slotRMBActionCopyLocation | ( | int | val | ) | [protected, slot] |
Definition at line 441 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotRMBActionEditAt | ( | int | val | ) | [protected, slot] |
Definition at line 429 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotRMBActionInsert | ( | int | val | ) | [protected, slot] |
Definition at line 435 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotRMBActionProperties | ( | int | val | ) | [protected, slot] |
Definition at line 432 of file kbookmarkmenu.cc.
void KBookmarkMenu::slotRMBActionRemove | ( | int | val | ) | [protected, slot] |
Definition at line 438 of file kbookmarkmenu.cc.
Member Data Documentation
KActionCollection* KBookmarkMenu::m_actionCollection [protected] |
Definition at line 222 of file kbookmarkmenu.h.
QPtrList<KAction> KBookmarkMenu::m_actions [protected] |
bool KBookmarkMenu::m_bAddBookmark [protected] |
Definition at line 206 of file kbookmarkmenu.h.
bool KBookmarkMenu::m_bAddShortcuts [protected] |
Definition at line 209 of file kbookmarkmenu.h.
bool KBookmarkMenu::m_bDirty [protected] |
Definition at line 207 of file kbookmarkmenu.h.
bool KBookmarkMenu::m_bIsRoot [protected] |
Definition at line 205 of file kbookmarkmenu.h.
bool KBookmarkMenu::m_bNSBookmark [protected] |
Definition at line 208 of file kbookmarkmenu.h.
QPtrList<KBookmarkMenu> KBookmarkMenu::m_lstSubMenus [protected] |
QString KBookmarkMenu::m_parentAddress [protected] |
KPopupMenu* KBookmarkMenu::m_parentMenu [protected] |
The menu in which we plug our actions.
Supplied in the constructor.
Definition at line 217 of file kbookmarkmenu.h.
KBookmarkManager* KBookmarkMenu::m_pManager [protected] |
Definition at line 211 of file kbookmarkmenu.h.
KBookmarkOwner* KBookmarkMenu::m_pOwner [protected] |
Definition at line 212 of file kbookmarkmenu.h.
QString KBookmarkMenu::s_highlightedAddress [static, protected] |
Definition at line 233 of file kbookmarkmenu.h.
QString KBookmarkMenu::s_highlightedImportLocation [static, protected] |
Definition at line 234 of file kbookmarkmenu.h.
QString KBookmarkMenu::s_highlightedImportType [static, protected] |
Definition at line 235 of file kbookmarkmenu.h.
The documentation for this class was generated from the following files: