KDE 4.9 PyKDE API Reference

- KDE's Python API

# List Class Reference

`from PyKDE4.kio import *`

Namespace: KBookmark

## Detailed Description

KUrl.Bookmark is a QList that contains bookmarks with a few convenience methods.

See also:
  KBookmark

See also:
  QList

## Methods

| __init__ (self)
| populateMimeData (self, QMimeData mimeData)

## Static Methods

bool | canDecode (QMimeData mimeData)
KBookmark.List | fromMimeData (QMimeData mimeData)
KBookmark.List | fromMimeData (QMimeData mimeData, QDomDocument parentDocument)
QStringList | mimeDataTypes ()

## Method Documentation

__init__ | ( |  | self ) |

populateMimeData | ( | self, |
|  | QMimeData | mimeData
| ) |  |  |

Adds this list of bookmark into the given QMimeData.

Parameters:

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

## Static Method Documentation

bool canDecode | ( | QMimeData | mimeData
| ) |  |  |

Return true if mimeData contains bookmarks

KBookmark.List fromMimeData | ( | QMimeData | mimeData
| ) |  |  |

Extract a list of bookmarks from the contents of mimeData. Decoding will fail if mimeData does not contain any bookmarks.

Parameters:

  | mimeData | the mime data to extract from; cannot be 0
  | parentDocument | pass an empty QDomDocument here, it will be used as container for the bookmarks. You just need to make sure it stays alive longer (or just as long) as the returned bookmarks.

Returns:
  the list of bookmarks

Since:
  4.3.2

KBookmark.List fromMimeData | ( | QMimeData | mimeData,
|  | QDomDocument | parentDocument
| ) |  |  |

Extract a list of bookmarks from the contents of mimeData. Decoding will fail if mimeData does not contain any bookmarks.

Parameters:

  | mimeData | the mime data to extract from; cannot be 0
  | parentDocument | pass an empty QDomDocument here, it will be used as container for the bookmarks. You just need to make sure it stays alive longer (or just as long) as the returned bookmarks.

Returns:
  the list of bookmarks

Since:
  4.3.2

QStringList mimeDataTypes | ( |  | ) |

Return the list of mimeTypes that can be decoded by fromMimeData