Pages
API Documentation
On this page

KBookmarkGroup Class

Bookmarks management library. More...

  • Header: #include <KBookmark>
  • CMake: find_package(KF6 REQUIRED COMPONENTS Bookmarks)
    target_link_libraries(mytarget PRIVATE KF6::Bookmarks)
  • Inherits: KBookmark

List of all members, including inherited members

Public Functions

Detailed Description

A group of bookmarks

Member Function Documentation

KBookmarkGroup::KBookmarkGroup()

Create an invalid group. This is mostly for use in QList, and other places where we need a null group. Also used as a parent for a bookmark that doesn't have one (e.g. Netscape bookmarks)

KBookmarkGroup::KBookmarkGroup(const QDomElement &elem)

Create a bookmark group as specified by the given element

KBookmark KBookmarkGroup::addBookmark(const KBookmark &bm)

Create a new bookmark, as the last child of this group Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark );

bm the bookmark to add

KBookmark KBookmarkGroup::addBookmark(const QString &text, const QUrl &url, const QString &icon)

Create a new bookmark, as the last child of this group Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark );

text for the bookmark

url the URL that the bookmark points to. It will be stored in its QUrl::FullyEncoded string format.

icon the name of the icon to associate with the bookmark. A suitable default will be determined from the URL if not specified.

KBookmarkGroup KBookmarkGroup::createNewFolder(const QString &text)

Create a new bookmark folder, as the last child of this group

text for the folder.

If you want an dialog use KBookmarkDialog

KBookmark KBookmarkGroup::createNewSeparator()

Create a new bookmark separator Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark );

void KBookmarkGroup::deleteBookmark(const KBookmark &bk)

Delete a bookmark - it has to be one of our children ! Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark );

KBookmark KBookmarkGroup::first() const

Return the first child bookmark of this group

QList<QUrl> KBookmarkGroup::groupUrlList() const

Returns the list of urls of bookmarks at top level of the group

int KBookmarkGroup::indexOf(const KBookmark &child) const

Return the index of a child bookmark, -1 if not found

bool KBookmarkGroup::isOpen() const

Returns true if the bookmark folder is opened in the bookmark editor

bool KBookmarkGroup::isToolbarGroup() const

Returns true if this is the toolbar group

bool KBookmarkGroup::moveBookmark(const KBookmark &bookmark, const KBookmark &after)

Moves bookmark after after (which should be a child of ours). If after is null, bookmark is moved as the first child. Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark );

KBookmark KBookmarkGroup::next(const KBookmark &current) const

Return the next sibling of a child bookmark of this group

current has to be one of our child bookmarks.

KBookmark KBookmarkGroup::previous(const KBookmark &current) const

Return the previous sibling of a child bookmark of this group

current has to be one of our child bookmarks.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.