KIO
#include <kbookmarkmenu.h>
Public Slots | |
void | slotBookmarksChanged (const QString &) |
Public Member Functions | |
KBookmarkMenu (KBookmarkManager *mgr, KBookmarkOwner *owner, KMenu *parentMenu, KActionCollection *collec) | |
KBookmarkMenu (KBookmarkManager *mgr, KBookmarkOwner *owner, KMenu *parentMenu, const QString &parentAddress) | |
~KBookmarkMenu () | |
void | ensureUpToDate () |
Protected Slots | |
void | slotAboutToShow () |
void | slotAddBookmark () |
void | slotAddBookmarksList () |
void | slotNewFolder () |
void | slotOpenFolderInTabs () |
Protected Member Functions | |
virtual QAction * | actionForBookmark (const KBookmark &bm) |
void | addActions () |
void | addAddBookmark () |
void | addAddBookmarksList () |
void | addEditBookmarks () |
void | addNewFolder () |
void | addOpenInTabs () |
virtual void | clear () |
virtual KMenu * | contextMenu (QAction *action) |
void | fillBookmarks () |
bool | isDirty () const |
bool | isRoot () const |
KBookmarkManager * | manager () const |
KBookmarkOwner * | owner () const |
QString | parentAddress () const |
KMenu * | parentMenu () const |
virtual void | refill () |
Protected Attributes | |
KActionCollection * | m_actionCollection |
QList< QAction * > | m_actions |
QList< KBookmarkMenu * > | m_lstSubMenus |
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 either this class or KBookmarkOwner.
Using this class is very simple:
1) Create a popup menu (either KActionMenu or KMenu 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
Definition at line 76 of file kbookmarkmenu.h.
Constructor & Destructor Documentation
KBookmarkMenu::KBookmarkMenu | ( | KBookmarkManager * | mgr, |
KBookmarkOwner * | owner, | ||
KMenu * | parentMenu, | ||
KActionCollection * | collec | ||
) |
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. Note: If you pass a null KBookmarkOwner to the constructor, the openBookmark signal is not emitted, instead KRun is used to open the bookmark. parentMenu menu to be filled collec parent collection for the KActions.
- Todo:
- KDE 5: give ownership of the bookmarkmenu to another qobject, e.g. parentMenu. Currently this is a QObject without a parent, use setParent to benefit from automatic deletion.
Definition at line 65 of file kbookmarkmenu.cc.
KBookmarkMenu::KBookmarkMenu | ( | KBookmarkManager * | mgr, |
KBookmarkOwner * | owner, | ||
KMenu * | parentMenu, | ||
const QString & | parentAddress | ||
) |
Creates a bookmark submenu.
- Todo:
- KDE 5: give ownership of the bookmarkmenu to another qobject, e.g. parentMenu. Currently this is a QObject without a parent, use setParent to benefit from automatic deletion.
Definition at line 117 of file kbookmarkmenu.cc.
KBookmarkMenu::~KBookmarkMenu | ( | ) |
Definition at line 138 of file kbookmarkmenu.cc.
Member Function Documentation
Reimplemented in KonqBookmarkMenu.
Definition at line 543 of file kbookmarkmenu.cc.
|
protected |
Definition at line 96 of file kbookmarkmenu.cc.
|
protected |
Definition at line 482 of file kbookmarkmenu.cc.
|
protected |
Definition at line 465 of file kbookmarkmenu.cc.
|
protected |
Definition at line 500 of file kbookmarkmenu.cc.
|
protected |
Definition at line 511 of file kbookmarkmenu.cc.
|
protected |
Definition at line 449 of file kbookmarkmenu.cc.
|
protectedvirtual |
Reimplemented in KImportedBookmarkMenu.
Definition at line 423 of file kbookmarkmenu.cc.
Reimplemented in KonqBookmarkMenu.
Definition at line 172 of file kbookmarkmenu.cc.
void KBookmarkMenu::ensureUpToDate | ( | ) |
Call ensureUpToDate() if you need KBookmarkMenu to adjust to its final size before it is executed.
Definition at line 145 of file kbookmarkmenu.cc.
|
protected |
Definition at line 527 of file kbookmarkmenu.cc.
|
protected |
Definition at line 185 of file kbookmarkmenu.cc.
|
protected |
Definition at line 180 of file kbookmarkmenu.cc.
|
protected |
Definition at line 195 of file kbookmarkmenu.cc.
|
protected |
Definition at line 200 of file kbookmarkmenu.cc.
|
protected |
Parent bookmark for this menu.
Definition at line 190 of file kbookmarkmenu.cc.
|
protected |
The menu in which we insert our actions Supplied in the constructor.
Definition at line 205 of file kbookmarkmenu.cc.
|
protectedvirtual |
Reimplemented in KonqBookmarkMenu, and KImportedBookmarkMenu.
Definition at line 439 of file kbookmarkmenu.cc.
|
protectedslot |
Definition at line 150 of file kbookmarkmenu.cc.
|
protectedslot |
Definition at line 583 of file kbookmarkmenu.cc.
|
protectedslot |
Definition at line 570 of file kbookmarkmenu.cc.
|
slot |
Definition at line 405 of file kbookmarkmenu.cc.
|
protectedslot |
Definition at line 607 of file kbookmarkmenu.cc.
|
protectedslot |
Definition at line 602 of file kbookmarkmenu.cc.
Member Data Documentation
|
protected |
Definition at line 164 of file kbookmarkmenu.h.
List of our actions.
Definition at line 168 of file kbookmarkmenu.h.
|
protected |
List of our sub menus.
Definition at line 159 of file kbookmarkmenu.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.