KBookmarkGroup

#include <kbookmark.h>

Inherits KBookmark.

Public Member Functions

 KBookmarkGroup ()
 
 KBookmarkGroup (const QDomElement &elem)
 
KBookmark addBookmark (const KBookmark &bm)
 
KBookmark addBookmark (const QString &text, const QUrl &url, const QString &icon)
 
KBookmarkGroup createNewFolder (const QString &text)
 
KBookmark createNewSeparator ()
 
void deleteBookmark (const KBookmark &bk)
 
QDomElement findToolbar () const
 
KBookmark first () const
 
QList< QUrlgroupUrlList () const
 
int indexOf (const KBookmark &child) const
 
bool isOpen () const
 
bool isToolbarGroup () const
 
bool moveBookmark (const KBookmark &bookmark, const KBookmark &after)
 
KBookmark next (const KBookmark &current) const
 
KBookmark previous (const KBookmark &current) const
 

Protected Member Functions

QDomElement nextKnownTag (const QDomElement &start, bool goNext) const
 

Detailed Description

A group of bookmarks.

Definition at line 316 of file kbookmark.h.

Constructor & Destructor 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)

Definition at line 91 of file kbookmark.cpp.

KBookmarkGroup::KBookmarkGroup ( const QDomElement elem)

Create a bookmark group as specified by the given element.

Definition at line 96 of file kbookmark.cpp.

Member Function Documentation

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 );.

Parameters
bmthe bookmark to add

Definition at line 201 of file kbookmark.cpp.

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 );.

Parameters
textfor the bookmark
urlthe URL that the bookmark points to. It will be stored in its QUrl::FullyEncoded string format.
iconthe name of the icon to associate with the bookmark. A suitable default will be determined from the URL if not specified.

Definition at line 207 of file kbookmark.cpp.

KBookmarkGroup KBookmarkGroup::createNewFolder ( const QString text)

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

Parameters
textfor the folder. If you want an dialog use KBookmarkDialog

Definition at line 149 of file kbookmark.cpp.

KBookmark KBookmarkGroup::createNewSeparator ( )

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

Definition at line 164 of file kbookmark.cpp.

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 );.

Definition at line 227 of file kbookmark.cpp.

QDomElement KBookmarkGroup::findToolbar ( ) const

Definition at line 237 of file kbookmark.cpp.

KBookmark KBookmarkGroup::first ( ) const

Return the first child bookmark of this group.

Definition at line 106 of file kbookmark.cpp.

QList< QUrl > KBookmarkGroup::groupUrlList ( ) const
Returns
the list of urls of bookmarks at top level of the group

Definition at line 252 of file kbookmark.cpp.

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

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

Definition at line 121 of file kbookmark.cpp.

bool KBookmarkGroup::isOpen ( ) const
Returns
true if the bookmark folder is opened in the bookmark editor

Definition at line 101 of file kbookmark.cpp.

bool KBookmarkGroup::isToolbarGroup ( ) const
Returns
true if this is the toolbar group

Definition at line 232 of file kbookmark.cpp.

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 );

Definition at line 176 of file kbookmark.cpp.

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

Return the next sibling of a child bookmark of this group.

Parameters
currenthas to be one of our child bookmarks.

Definition at line 116 of file kbookmark.cpp.

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

Return the prevous sibling of a child bookmark of this group.

Parameters
currenthas to be one of our child bookmarks.

Definition at line 111 of file kbookmark.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 14 2020 22:39:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.