# class KBookmark

###

Module | kio
Namespace |
Class | KBookmark
Inherits |

### enums

- MetaDataOverwriteMode { OverwriteMetaData, DontOverwriteMetaData }

enum details

### methods

- KBookmark ( )

  returns ctor

- KBookmark (elem)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  elem | QDomElement |

  Creates the KBookmark wrapper for elem - Mostly for internal usage.

- KBookmark (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QDomElement |

- address ( )

  returns QString

  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 designate the 2nd child inside the 4th child of the root bookmark.

- commonParent (A, B)

  returns QString
  static

  Argument | Type | Default
  --- | --- | ---
  A | QString |
  B | QString |

  Returns the common parent of both addresses which has the greatest depth

- fullText ( )

  returns QString

  Text shown for the bookmark, not truncated. You should not use this - this is mainly for keditbookmarks.

- hasParent ( )

  returns bool

  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.

- icon ( )

  returns QString

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

- internalElement ( )

  returns QDomElement

  Internal for KEditBookmarks

- isGroup ( )

  returns bool

  Whether the bookmark is a group or a normal bookmark

- isNull ( )

  returns bool

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

- isSeparator ( )

  returns bool

  Whether the bookmark is a separator

- metaData (owner, create)

  returns QDomNode
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  owner | QString |
  create | bool |

  Returns the metadata container node for a certain matadata owner @since 4.1

- metaDataItem (key)

  returns QString

  Argument | Type | Default
  --- | --- | ---
  key | QString |

  Get the value of a specific metadata item (owner = "http://www.kde.org").

  key - Name of the metadata item Returns Value of the metadata item. QString() is returned in case the specified key does not exist.

- mimeType ( )

  returns QString
  KDE 4.1.0 and later only

  Returns Mime-Type of this item @since 4.1

- nextAddress (address)

  returns QString
  static

  Argument | Type | Default
  --- | --- | ---
  address | QString |

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

- operator == (rhs)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  rhs | KBookmark |

  Comparison operator

- parentAddress (address)

  returns QString
  static

  Argument | Type | Default
  --- | --- | ---
  address | QString |

  Returns address of parent

- parentGroup ( )

  returns KBookmarkGroup

  Returns the group containing this bookmark

- populateMimeData (mimeData)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  mimeData | QMimeData |

  Adds this bookmark into the given QMimeData.

  WARNING: do not call this method multiple times, use KBookmark.List.populateMimeData instead.

  mimeData - the QMimeData instance used to drag or copy this bookmark

- positionInParent ( )

  returns int

  Return the position in the parent, i.e. the last number in the address

- positionInParent (address)

  returns uint
  static

  Argument | Type | Default
  --- | --- | ---
  address | QString |

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

- previousAddress (address)

  returns QString
  static

  Argument | Type | Default
  --- | --- | ---
  address | QString |

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

- setFullText (fullText)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  fullText | QString |

  Set the text shown for the bookmark.

  fullText - the new bookmark title

- setIcon (icon)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  icon | QString |

  Set the icon name of the bookmark

  icon - the new icon name for this bookmark

- setMetaDataItem (key, value, mode)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  key | QString |
  value | QString |
  mode | KBookmark.MetaDataOverwriteMode | KBookmark.OverwriteMetaData

  Change the value of a specific metadata item, or create the given item if it doesn't exist already (owner = "http://www.kde.org").

  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.

- setMimeType (mimeType)

  returns Nothing
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  mimeType | QString |

  Set the Mime-Type of this item

  Mime-Type - @since 4.1

- setShowInToolbar (show)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  show | bool |

  Set whether this bookmark is show in a filterd toolbar

- setUrl (url)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  url | KUrl |

  Set the URL of the bookmark

  url - the new bookmark URL

- showInToolbar ( )

  returns bool

  Returns if the bookmark should be shown in the toolbar (used by the filtered toolbar)

- standaloneBookmark (text, url, icon)

  returns KBookmark
  static

  Argument | Type | Default
  --- | --- | ---
  text | QString |
  url | KUrl |
  icon | QString | QString()

  Creates a stand alone bookmark. This is fairly expensive since a new QDom Tree is build.

- text ( )

  returns QString

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

- toGroup ( )

  returns KBookmarkGroup

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

- updateAccessMetadata ( )

  returns Nothing

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

- url ( )

  returns KUrl

  URL contained by the bookmark

### enums - detail

- MetaDataOverwriteMode { OverwriteMetaData, DontOverwriteMetaData }

  | OverwriteMetaData | - | - |
  | DontOverwriteMetaData | - | - |