• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KBookmark Class Reference

#include <kbookmark.h>

Inheritance diagram for KBookmark:

Inheritance graph
[legend]

List of all members.


Public Types

enum  MetaDataOverwriteMode { OverwriteMetaData, DontOverwriteMetaData }

Public Member Functions

QString address () const
QString fullText () const
bool hasParent () const
QString icon () const
QDomElement internalElement () const
bool isGroup () const
bool isNull () const
bool isSeparator () const
 KBookmark (QDomElement elem)
 KBookmark ()
QString metaDataItem (const QString &key) const
KBookmarkGroup parentGroup () const
void setMetaDataItem (const QString &key, const QString &value, MetaDataOverwriteMode mode=OverwriteMetaData)
QString text () const
KBookmarkGroup toGroup () const
void updateAccessMetadata ()
KURL url () const

Static Public Member Functions

static QString commonParent (QString A, QString B)
static QString nextAddress (const QString &address)
static QString parentAddress (const QString &address)
static uint positionInParent (const QString &address)
static QString previousAddress (const QString &address)
static KBookmark standaloneBookmark (const QString &text, const KURL &url, const QString &icon=QString::null)

Protected Attributes

QDomElement element

Detailed Description

Definition at line 31 of file kbookmark.h.


Member Enumeration Documentation

enum KBookmark::MetaDataOverwriteMode

Enumerator:
OverwriteMetaData 
DontOverwriteMetaData 

Definition at line 35 of file kbookmark.h.


Constructor & Destructor Documentation

KBookmark::KBookmark (  )  [inline]

Definition at line 39 of file kbookmark.h.

KBookmark::KBookmark ( QDomElement  elem  )  [inline]

Definition at line 40 of file kbookmark.h.


Member Function Documentation

QString KBookmark::address (  )  const

Return the "address" of this bookmark in the whole tree.

This is used when telling other processes about a change in a given bookmark. The encoding of the address is "/4/2", for instance, to design the 2nd child inside the 4th child of the root bk.

Definition at line 323 of file kbookmark.cc.

QString KBookmark::commonParent ( QString  A,
QString  B 
) [static]

Returns:
the common parent of both addresses which has the greatest depth
Since:
3.5

Definition at line 371 of file kbookmark.cc.

QString KBookmark::fullText (  )  const

Text shown for the bookmark, not truncated.

You should not use this - this is mainly for keditbookmarks.

Definition at line 283 of file kbookmark.cc.

bool KBookmark::hasParent (  )  const

Returns:
true if bookmark is contained by a QDomDocument, if not it is most likely that it has become separated and is thus invalid and/or has been deleted from the bookmarks.
Since:
3.2

Definition at line 272 of file kbookmark.cc.

QString KBookmark::icon (  )  const

Returns:
the pixmap file for this bookmark (i.e. the name of the icon)

Definition at line 296 of file kbookmark.cc.

QDomElement KBookmark::internalElement (  )  const [inline]

For internal use only.

for KEditBookmarks

Definition at line 118 of file kbookmark.h.

bool KBookmark::isGroup (  )  const

Whether the bookmark is a group or a normal bookmark.

Definition at line 260 of file kbookmark.cc.

bool KBookmark::isNull (  )  const [inline]

Returns:
true if this is a null bookmark. This will never be the case for a real bookmark (in a menu), but it's used for instance as the end condition for KBookmarkGroup::next()

Definition at line 59 of file kbookmark.h.

bool KBookmark::isSeparator (  )  const

Whether the bookmark is a separator.

Definition at line 267 of file kbookmark.cc.

QString KBookmark::metaDataItem ( const QString &  key  )  const

Get the value of a specific metadata item.

Parameters:
key Name of the metadata item
Returns:
Value of the metadata item. QString::null is returned in case the specified key does not exist.
Since:
3.4

Definition at line 465 of file kbookmark.cc.

static QString KBookmark::nextAddress ( const QString &  address  )  [inline, static]

Returns:
address of next sibling (e.g. /4/5/2 -> /4/5/3) This doesn't check whether it actually exists

Definition at line 155 of file kbookmark.h.

static QString KBookmark::parentAddress ( const QString &  address  )  [inline, static]

Returns:
address of parent

Definition at line 132 of file kbookmark.h.

KBookmarkGroup KBookmark::parentGroup (  )  const

Returns:
the group containing this bookmark

Definition at line 312 of file kbookmark.cc.

static uint KBookmark::positionInParent ( const QString &  address  )  [inline, static]

Returns:
position in parent (e.g. /4/5/2 -> 2)

Definition at line 138 of file kbookmark.h.

static QString KBookmark::previousAddress ( const QString &  address  )  [inline, static]

Returns:
address of previous sibling (e.g. /4/5/2 -> /4/5/1) Returns QString::null for a first child

Definition at line 145 of file kbookmark.h.

void KBookmark::setMetaDataItem ( const QString &  key,
const QString &  value,
MetaDataOverwriteMode  mode = OverwriteMetaData 
)

Change the value of a specific metadata item, or create the given item if it doesn't exist already.

Parameters:
key Name of the metadata item to change
value Value to use for the specified metadata item
mode Whether to overwrite the item's value if it exists already or not.
Since:
3.4

Definition at line 481 of file kbookmark.cc.

KBookmark KBookmark::standaloneBookmark ( const QString &  text,
const KURL &  url,
const QString &  icon = QString::null 
) [static]

Definition at line 350 of file kbookmark.cc.

QString KBookmark::text (  )  const

Text shown for the bookmark If bigger than 40, the text is shortened by replacing middle characters with "..." (see KStringHandler::csqueeze).

Definition at line 278 of file kbookmark.cc.

KBookmarkGroup KBookmark::toGroup (  )  const

Convert this to a group - do this only if isGroup() returns true.

Definition at line 317 of file kbookmark.cc.

void KBookmark::updateAccessMetadata (  ) 

Updates the bookmarks access metadata Call when a user accesses the bookmark.

Since:
3.2

Definition at line 446 of file kbookmark.cc.

KURL KBookmark::url (  )  const

URL contained by the bookmark.

Definition at line 291 of file kbookmark.cc.


Member Data Documentation

QDomElement KBookmark::element [protected]

Definition at line 185 of file kbookmark.h.


The documentation for this class was generated from the following files:
  • kbookmark.h
  • kbookmark.cc

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal