KIO
kbookmark.cc
Go to the documentation of this file.
218 KBookmark KBookmarkGroup::addBookmark( const QString & text, const KUrl & url, const QString & icon )
501 KBookmark KBookmark::standaloneBookmark( const QString & text, const KUrl & url, const QString & icon )
588 for ( QDomElement e = metaDataNode.firstChildElement(); !e.isNull(); e = e.nextSiblingElement() )
597 void KBookmark::setMetaDataItem( const QString &key, const QString &value, MetaDataOverwriteMode mode )
703 kWarning(7043) << "Deprecated method called, with wrong lifetime of QDomDocument, will probably crash";
QString i18n(const char *text)
bool moveBookmark(const KBookmark &bookmark, const KBookmark &after)
Moves bookmark after after (which should be a child of ours).
Definition: kbookmark.cc:189
static QDomNode cd_or_create(QDomNode node, const QString &name)
Definition: kbookmark.cc:53
QDomNode item(int index) const
QByteArray data(const QString &mimeType) const
KBookmark previous(const KBookmark ¤t) const
Return the prevous sibling of a child bookmark of this group.
Definition: kbookmark.cc:118
T pop()
QDomNode appendChild(const QDomNode &newChild)
void populateMimeData(QMimeData *mimeData, const KUrl::MetaDataMap &metaData=MetaDataMap(), MimeDataFlags flags=DefaultMimeDataFlags) const
QString attribute(const QString &name, const QString &defValue) const
void populateMimeData(QMimeData *mimeData) const
Adds this list of bookmark into the given QMimeData.
Definition: kbookmark.cc:670
QString data() const
virtual bool hasFormat(const QString &mimeType) const
QDomNode insertAfter(const QDomNode &newChild, const QDomNode &refChild)
void deleteBookmark(const KBookmark &bk)
Delete a bookmark - it has to be one of our children ! Don't forget to use KBookmarkManager::self()->...
Definition: kbookmark.cc:237
void push(const T &t)
void setMimeType(const QString &mimeType)
Set the Mime-Type of this item.
Definition: kbookmark.cc:436
KBookmark createNewSeparator()
Create a new bookmark separator Don't forget to use KBookmarkManager::self()->emitChanged( parentBook...
Definition: kbookmark.cc:171
void setShowInToolbar(bool show)
Set whether this bookmark is show in a filterd toolbar.
Definition: kbookmark.cc:455
bool isEmpty() const
QDomElement nextSiblingElement(const QString &tagName) const
QDomElement previousSiblingElement(const QString &tagName) const
KBookmarkGroup toGroup() const
Convert this to a group - do this only if isGroup() returns true.
Definition: kbookmark.cc:465
QDomElement documentElement() const
static bool canDecode(const QMimeData *mimeData)
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
Definition: kbookmark.h:34
QDomNodeList childNodes() const
virtual void visitEnter(const KBookmarkGroup &)
Definition: kbookmark.cc:651
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
Definition: kbookmark.h:39
QDomElement toElement() const
QString text() const
Text shown for the bookmark If bigger than 40, the text is shortened by replacing middle characters w...
Definition: kbookmark.cc:306
void setData(const QString &v)
int indexOf(const KBookmark &child) const
Return the index of a child bookmark, -1 if not found.
Definition: kbookmark.cc:128
int count() const
QString number(int n, int base)
void append(const T &value)
QDomDocument ownerDocument() const
QString text() const
bool hasAttribute(const QString &name) const
static KUrl::List fromMimeData(const QMimeData *mimeData, KUrl::MetaDataMap *metaData=0)
void setAttribute(const QString &name, const QString &value)
void setFullText(const QString &fullText)
Set the text shown for the bookmark.
Definition: kbookmark.cc:321
QDomNode metaData(const QString &owner, bool create) const
Definition: kbookmark.cc:578
KBookmark addBookmark(const KBookmark &bm)
Create a new bookmark, as the last child of this group Don't forget to use KBookmarkManager::self()->...
Definition: kbookmark.cc:212
int toInt(bool *ok, int base) const
bool isEmpty() const
bool isEmpty() const
bool isGroup() const
Whether the bookmark is a group or a normal bookmark.
Definition: kbookmark.cc:283
static QString parentAddress(const QString &address)
Definition: kbookmark.cc:554
static QStringList mimeDataTypes()
Return the list of mimeTypes that can be decoded by fromMimeData.
Definition: kbookmark.cc:694
QString csqueeze(const QString &str, int maxlen=40)
KUrl::Bookmark is a QList that contains bookmarks with a few convenience methods. ...
Definition: kbookmark.h:48
QDomElement nextKnownTag(const QDomElement &start, bool goNext) const
Definition: kbookmark.cc:138
QDomText createTextNode(const QString &value)
static KBookmark::List fromMimeData(const QMimeData *mimeData)
Extract a list of bookmarks from the contents of mimeData.
Definition: kbookmark.cc:700
iterator end()
QDomNode removeChild(const QDomNode &oldChild)
QDomNode namedItem(const QString &name) const
QString metaDataItem(const QString &key) const
Get the value of a specific metadata item (owner = "http://www.kde.org").
Definition: kbookmark.cc:585
void populateMimeData(QMimeData *mimeData) const
Adds this bookmark into the given QMimeData.
Definition: kbookmark.cc:659
void 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 (o...
Definition: kbookmark.cc:597
KGuiItem ok()
uint toTime_t() const
bool isNull() const
static QDomNode findMetadata(const QString &forOwner, QDomNode &parent, bool create)
Definition: kbookmark.cc:69
QColor fromMimeData(const QMimeData *mimeData)
QString & replace(int position, int n, QChar after)
static bool canDecode(const QMimeData *mimeData)
Return true if mimeData contains bookmarks.
Definition: kbookmark.cc:689
QDateTime currentDateTime()
QDomNode firstChild() const
QByteArray toLatin1() const
QString mid(int position, int n) const
static QString previousAddress(const QString &address)
Definition: kbookmark.cc:564
QDomNode parentNode() const
virtual ~KBookmarkGroupTraverser()
Definition: kbookmark.cc:617
QDomElement firstChildElement(const QString &tagName) const
typedef ConstIterator
int length() const
static QString commonParent(const QString &A, const QString &B)
Definition: kbookmark.cc:512
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QString left(int n) const
static KBookmark standaloneBookmark(const QString &text, const KUrl &url, const QString &icon=QString())
Creates a stand alone bookmark.
Definition: kbookmark.cc:501
static QStringList mimeDataTypes()
void removeAttribute(const QString &name)
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
QString tagName() const
void updateAccessMetadata()
Updates the bookmarks access metadata Call when a user accesses the bookmark.
Definition: kbookmark.cc:535
void setData(const QString &mimeType, const QByteArray &data)
const QString & staticQString(const char *str)
QDomElement createElement(const QString &tagName)
QDomText toText() const
bool moveItem(const KBookmark &item, const KBookmark &after)
Definition: kbookmark.cc:183
KBookmark next(const KBookmark ¤t) const
Return the next sibling of a child bookmark of this group.
Definition: kbookmark.cc:123
const KShortcut & end()
QDomNode insertBefore(const QDomNode &newChild, const QDomNode &refChild)
iterator begin()
static QString nextAddress(const QString &address)
Definition: kbookmark.cc:572
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
QString address() const
Return the "address" of this bookmark in the whole tree.
Definition: kbookmark.cc:471
KBookmarkGroup createNewFolder(const QString &text)
Create a new bookmark folder, as the last child of this group.
Definition: kbookmark.cc:157
QByteArray toByteArray(int indent) const
const KShortcut & begin()
void setDescription(const QString &description)
Set the description of the bookmark.
Definition: kbookmark.cc:412
bool setContent(const QByteArray &data, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)
virtual void visitLeave(const KBookmarkGroup &)
Definition: kbookmark.cc:655
T & top()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.