KBookmarkManager Class Reference
#include <kbookmarkmanager.h>
Inheritance diagram for KBookmarkManager:

Detailed Description
This class implements the reading/writing of bookmarks in XML.The bookmarks file is read and written using the XBEL standard (http://pyxml.sourceforge.net/topics/xbel/)
A sample file looks like this :
<xbel> <bookmark href="http://developer.kde.org"><title>Developer Web Site</title></bookmark> <folder folded="no"> <title>Title of this folder</title> <bookmark icon="kde" href="http://www.kde.org"><title>KDE Web Site</title></bookmark> <folder toolbar="yes"> <title>My own bookmarks</title> <bookmark href="http://www.koffice.org"><title>KOffice Web Site</title></bookmark> <separator/> <bookmark href="http://www.kdevelop.org"><title>KDevelop Web Site</title></bookmark> </folder> </folder> </xbel>
Definition at line 53 of file kbookmarkmanager.h.
Public Slots | |
void | slotEditBookmarks () |
void | slotEditBookmarksAtAddress (const QString &address) |
Signals | |
void | changed (const QString &groupAddress, const QString &caller) |
DCOP Member Functions | |
ASYNC | notifyCompleteChange (QString caller) |
ASYNC | notifyChanged (QString groupAddress) |
ASYNC | notifyConfigChanged () |
Public Member Functions | |
~KBookmarkManager () | |
void | setUpdate (bool update) |
bool | save (bool toolbarCache=true) const |
bool | saveAs (const QString &filename, bool toolbarCache=true) const |
bool | updateAccessMetadata (const QString &url, bool emitSignal=true) |
void | updateFavicon (const QString &url, const QString &faviconurl, bool emitSignal=true) |
QString | path () |
KBookmarkGroup | root () const |
KBookmarkGroup | toolbar () |
KBookmark | findByAddress (const QString &address, bool tolerate=false) |
void | emitChanged (KBookmarkGroup &group) |
void | emitConfigChanged () |
bool | showNSBookmarks () const |
void | setShowNSBookmarks (bool show) |
void | setEditorOptions (const QString &caption, bool browser) |
const QDomDocument & | internalDocument () const |
KBookmarkNotifier & | notifier () |
KBookmarkGroup | addBookmarkDialog (const QString &_url, const QString &_title, const QString &_parentBookmarkAddress=QString::null) |
Static Public Member Functions | |
static KBookmarkManager * | managerForFile (const QString &bookmarksFile, bool bImportDesktopFiles=true) |
static KBookmarkManager * | createTempManager () |
static KBookmarkManager * | userBookmarksManager () |
Protected Member Functions | |
KBookmarkManager (const QString &bookmarksFile, bool bImportDesktopFiles=true) | |
KBookmarkManager () | |
void | parse () const |
void | importDesktopFiles () |
Static Protected Member Functions | |
static void | convertToXBEL (QDomElement &group) |
static void | convertAttribute (QDomElement elem, const QString &oldName, const QString &newName) |
Constructor & Destructor Documentation
|
Creates a bookmark manager with a path to the bookmarks. By default, it will use the KDE standard dirs to find and create the correct location. If you are using your own app-specific bookmarks directory, you must instantiate this class with your own path before KBookmarkManager::managerForFile() is ever called.
Definition at line 130 of file kbookmarkmanager.cc. |
|
Definition at line 155 of file kbookmarkmanager.cc. |
|
Destructor.
Definition at line 176 of file kbookmarkmanager.cc. |
Member Function Documentation
|
Definition at line 496 of file kbookmarkmanager.cc. |
|
Signals that the group (or any of its children) with the address
"/4/5") has been modified by the caller |
|
Saves the bookmark file and notifies everyone.
Definition at line 535 of file kbookmarkmanager.cc. |
|
Definition at line 425 of file kbookmarkmanager.cc. |
|
This static function will return an instance of the KBookmarkManager, responsible for the given If you do not instantiate this class either natively or in a derived class, then it will return an object with the default behaviors. If you wish to use different behaviors, you must derive your own class and instantiate it before this method is ever called.
Definition at line 100 of file kbookmarkmanager.cc. |
|
Access to bookmark notifier, for emitting signals. We need this object to exist in one instance only, so we could connectDCOP to it by name. Definition at line 231 of file kbookmarkmanager.h. |
|
Emit the changed signal for the group whose address is given.
Definition at line 577 of file kbookmarkmanager.cc. |
|
Reparse the whole bookmarks file and notify about the change (Called by the bookmark editor).
Definition at line 557 of file kbookmarkmanager.cc. |
|
This will return the path that this manager is using to read the bookmarks.
Definition at line 134 of file kbookmarkmanager.h. |
|
This will return the root bookmark. It is used to iterate through the bookmarks manually. It is mostly used internally.
Definition at line 379 of file kbookmarkmanager.cc. |
|
Save the bookmarks to the default konqueror XML file on disk. You should use emitChanged() instead of this function, it saves and notifies everyone that the file has changed.
Definition at line 321 of file kbookmarkmanager.cc. |
|
Save the bookmarks to the given XML file on disk.
Definition at line 326 of file kbookmarkmanager.cc. |
|
Set options with which slotEditBookmarks called keditbookmarks this can be used to change the appearance of the keditbookmarks in order to provide a slightly differing outer shell depending on the bookmarks file / app which calls it.
Definition at line 608 of file kbookmarkmanager.cc. |
|
Shows an extra menu for NS bookmarks. Set this to false, if you don't want this. Definition at line 597 of file kbookmarkmanager.cc. |
|
Set the update flag. Defaults to true. TODO - check
Definition at line 182 of file kbookmarkmanager.cc. |
|
Definition at line 592 of file kbookmarkmanager.cc. |
|
This returns the root of the toolbar menu. In the XML, this is the group with the attribute TOOLBAR=1
Definition at line 384 of file kbookmarkmanager.cc. |
|
Update access time stamps for a given url.
Definition at line 645 of file kbookmarkmanager.cc. |
|
Returns a pointer to the users main bookmark collection.
Definition at line 691 of file kbookmarkmanager.cc. |
The documentation for this class was generated from the following files: