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 () |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
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 Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Protected Attributes | |
KActionCollection * | m_actionCollection |
QList< QAction * > | m_actions |
QList< KBookmarkMenu * > | m_lstSubMenus |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.