KBookmarks 5.109.0
Public Member Functions | Static Public Member Functions | List of all members
KBookmark::List

KBookmark::List is a QList that contains bookmarks with a few convenience methods. More...

#include <kbookmark.h>

Public Member Functions

void populateMimeData (QMimeData *mimeData) const
 Adds this list of bookmark into the given QMimeData.
 

Static Public Member Functions

static bool canDecode (const QMimeData *mimeData)
 Return true if mimeData contains bookmarks.
 
static KBookmark::List fromMimeData (const QMimeData *mimeData, QDomDocument &parentDocument)
 Extract a list of bookmarks from the contents of mimeData.
 
static QStringList mimeDataTypes ()
 Return the list of mimeTypes that can be decoded by fromMimeData.
 

Detailed Description

KBookmark::List is a QList that contains bookmarks with a few convenience methods.

See also
KBookmark
QList

Member Function Documentation

◆ canDecode()

static bool KBookmark::List::canDecode ( const QMimeData *  mimeData)
static

Return true if mimeData contains bookmarks.

◆ fromMimeData()

static KBookmark::List KBookmark::List::fromMimeData ( const QMimeData *  mimeData,
QDomDocument &  parentDocument 
)
static

Extract a list of bookmarks from the contents of mimeData.

Decoding will fail if mimeData does not contain any bookmarks.

Parameters
mimeDatathe mime data to extract from; cannot be 0
parentDocumentpass 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

◆ mimeDataTypes()

static QStringList KBookmark::List::mimeDataTypes ( )
static

Return the list of mimeTypes that can be decoded by fromMimeData.

◆ populateMimeData()

void KBookmark::List::populateMimeData ( QMimeData *  mimeData) const

Adds this list of bookmark into the given QMimeData.

Parameters
mimeDatathe QMimeData instance used to drag or copy this bookmark