KBookmarks 5.109.0
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
KonqBookmarkMenu

Bookmark menu with dynamic import features, only used by Konqueror. More...

#include <KonqBookmarkMenu>

Classes

struct  DynMenuInfo
 Structure used for storing information about the dynamic menu setting. More...
 

Public Member Functions

 KonqBookmarkMenu (KBookmarkManager *mgr, KBookmarkOwner *owner, KBookmarkActionMenu *parentMenu, KActionCollection *collec)
 Fills a bookmark menu with konquerors bookmarks (one instance of KonqBookmarkMenu is created for the toplevel menu, but also one per submenu).
 
 KonqBookmarkMenu (KBookmarkManager *mgr, KBookmarkOwner *owner, KBookmarkActionMenu *parentMenu, QString parentAddress)
 Creates a bookmark submenu.
 
- Public Member Functions inherited from KBookmarkMenu
 KBookmarkMenu (KBookmarkManager *manager, KBookmarkOwner *owner, QMenu *parentMenu)
 Fills a bookmark menu (one instance of KBookmarkMenu is created for the toplevel menu, but also one per submenu).
 
 KBookmarkMenu (KBookmarkManager *mgr, KBookmarkOwner *owner, QMenu *parentMenu, const QString &parentAddress)
 Creates a bookmark submenu.
 
QAction * addBookmarkAction () const
 Returns the action for adding a bookmark.
 
QAction * bookmarkTabsAsFolderAction () const
 Returns the action for adding all current tabs as bookmarks.
 
QAction * editBookmarksAction () const
 Returns the action for editing bookmarks.
 
void ensureUpToDate ()
 Call ensureUpToDate() if you need KBookmarkMenu to adjust to its final size before it is executed.
 
QAction * newBookmarkFolderAction () const
 Returns the action for adding a new bookmarks folder.
 
int numberOfOpenTabs () const
 This function returns how many (if any) tabs the application has open.
 
void setNumberOfOpenTabs (int numberOfOpenTabs)
 Sets the number of currently open tabs.
 

Protected Member Functions

QAction * actionForBookmark (const KBookmark &bm) override
 
QMenu * contextMenu (QAction *action) override
 
void fillDynamicBookmarks ()
 
void refill () override
 
- Protected Member Functions inherited from KBookmarkMenu
virtual QAction * actionForBookmark (const KBookmark &bm)
 
void addActions ()
 
void addAddBookmark ()
 
void addAddBookmarksList ()
 
void addEditBookmarks ()
 
void addNewFolder ()
 
void addOpenInTabs ()
 
virtual void clear ()
 
virtual QMenu * contextMenu (QAction *action)
 
void fillBookmarks ()
 
bool isDirty () const
 
bool isRoot () const
 
KBookmarkManagermanager () const
 
KBookmarkOwnerowner () const
 
QString parentAddress () const
 Parent bookmark for this menu.
 
QMenu * parentMenu () const
 The menu in which we insert our actions Supplied in the constructor.
 
virtual void refill ()
 

Static Protected Member Functions

static QStringList dynamicBookmarksList ()
 
static void setDynamicBookmarks (const QString &id, const DynMenuInfo &info)
 Shows an extra menu for the given bookmarks file and type.
 
static DynMenuInfo showDynamicBookmarks (const QString &id)
 

Additional Inherited Members

- Public Slots inherited from KBookmarkMenu
void slotBookmarksChanged (const QString &)
 
- Protected Slots inherited from KBookmarkMenu
void slotAboutToShow ()
 
void slotAddBookmark ()
 
void slotAddBookmarksList ()
 
void slotNewFolder ()
 
void slotOpenFolderInTabs ()
 
- Protected Attributes inherited from KBookmarkMenu
KActionCollection * m_actionCollection
 
QList< QAction * > m_actions
 List of our actions.
 
QList< KBookmarkMenu * > m_lstSubMenus
 List of our sub menus.
 

Detailed Description

Bookmark menu with dynamic import features, only used by Konqueror.

Deprecated:
since 5.65, this class has moved to Konqueror

Constructor & Destructor Documentation

◆ KonqBookmarkMenu() [1/2]

KonqBookmarkMenu::KonqBookmarkMenu ( KBookmarkManager mgr,
KBookmarkOwner owner,
KBookmarkActionMenu parentMenu,
KActionCollection *  collec 
)
inline

Fills a bookmark menu with konquerors bookmarks (one instance of KonqBookmarkMenu is created for the toplevel menu, but also one per submenu).

Parameters
mgrThe bookmark manager to use (i.e. for reading and writing)
ownerimplementation of the KBookmarkOwner callback interface. Note: If you pass a null KBookmarkOwner to the constructor, the URLs are opened by QDesktopServices::openUrl and "Add Bookmark" is disabled.
parentMenumenu to be filled
collecparent collection for the KActions.
Deprecated:
since 5.65 This class has moved to Konqueror

◆ KonqBookmarkMenu() [2/2]

KonqBookmarkMenu::KonqBookmarkMenu ( KBookmarkManager mgr,
KBookmarkOwner owner,
KBookmarkActionMenu parentMenu,
QString  parentAddress 
)
inline

Creates a bookmark submenu.

Only used internally and for bookmark toolbar.

Deprecated:
since 5.65 This class has moved to Konqueror

Member Function Documentation

◆ actionForBookmark()

QAction * KonqBookmarkMenu::actionForBookmark ( const KBookmark bm)
overrideprotectedvirtual

Reimplemented from KBookmarkMenu.

◆ contextMenu()

QMenu * KonqBookmarkMenu::contextMenu ( QAction *  action)
overrideprotectedvirtual

Reimplemented from KBookmarkMenu.

◆ dynamicBookmarksList()

static QStringList KonqBookmarkMenu::dynamicBookmarksList ( )
staticprotected
Returns
list of dynamic menu ids

◆ refill()

void KonqBookmarkMenu::refill ( )
overrideprotectedvirtual

Reimplemented from KBookmarkMenu.

◆ setDynamicBookmarks()

static void KonqBookmarkMenu::setDynamicBookmarks ( const QString &  id,
const DynMenuInfo info 
)
staticprotected

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
idthe unique identification for the dynamic menu
infoa DynMenuInfo struct containing the to be added/modified data

◆ showDynamicBookmarks()

static DynMenuInfo KonqBookmarkMenu::showDynamicBookmarks ( const QString &  id)
staticprotected
Returns
dynmenu info block for the given dynmenu name