class KBookmarkManager |
|
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 :
|
|
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.
bookmarksFile - full path to the bookmarks file, Use ~/.kde/share/apps/konqueror/bookmarks.xml for the konqueror bookmarks dbusObjectName - a unique name that represents this bookmark collection, usually your kinstance (e.g. kapplication) name. This is "konqueror" for the konqueror bookmarks, "kfile" for KFileDialog bookmarks, etc. The final DBus object path is /KBookmarkManager/dbusObjectName An empty dbusObjectName disables the registration to dbus (used for temporary managers) |
|
Creates a bookmark manager for an external file (Using KDirWatch for change monitoring) @since 4.1 |
|
Creates a temp bookmark manager |
|
Signal send over DBUS |
|
Signal send over DBUS |
|
Signal send over DBUS |
|
Signals that the group (or any of its children) with the address groupAddress (e.g. "/4/5") has been modified by the caller caller. connect to this |
|
Signals that the config changed |
|
only used for KBookmarkBar |
|
Saves the bookmark file and notifies everyone. |
|
Saves the bookmark file and notifies everyone.
group - the parent of all changed bookmarks |
|
|
Returns the bookmark designated by address
address - the address belonging to the bookmark you're looking for tolerate - when true tries to find the most tolerable bookmark position See also KBookmark.address |
|
Internal |
|
Returns a KBookmarkManager, which will use KDirWatch for change detection
This is important when sharing bookmarks with other Desktops.
bookmarksFile - full path to the bookmarks file @since 4.1 |
|
This static function will return an instance of the
KBookmarkManager, responsible for the given bookmarksFile.
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.
bookmarksFile - full path to the bookmarks file, Use ~/.kde/share/apps/konqueror/bookmarks.xml for the konqueror bookmarks dbusObjectName - a unique name that represents this bookmark collection, usually your kinstance (e.g. kapplication) name. This is "konqueror" for the konqueror bookmarks, "kfile" for KFileDialog bookmarks, etc. The final DBus object path is /KBookmarkManager/dbusObjectName An empty dbusObjectName disables the registration to dbus (used for temporary managers) |
|
Emit the changed signal for the group whose address is given
See also KBookmark.address() Called by the process that saved the file after a small change (new bookmark or new folder). Does not send signal over DBUS to the other Bookmark Managers You probably want to call emitChanged() |
|
Reparse the whole bookmarks file and notify about the change Doesn't send signal over DBUS to the other Bookmark Managers You probably want to use emitChanged() |
|
|
This will return the path that this manager is using to read the bookmarks. Internal Returns the path containing the bookmarks |
|
This will return the root bookmark. It is used to iterate
through the bookmarks manually. It is mostly used internally.
Returns the root (top-level) bookmark |
|
Save the bookmarks to an XML file on disk.
You should use emitChanged() instead of this function, it saves
and notifies everyone that the file has changed.
Only use this if you don't want the emitChanged signal.
toolbarCache - iff true save a cache of the toolbar folder, too Returns true if saving was successful |
|
Save the bookmarks to the given XML file on disk.
filename - full path to the desired bookmarks file location toolbarCache - iff true save a cache of the toolbar folder, too Returns true if saving was successful |
|
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.
caption - the --caption string, for instance "Konsole" browser - iff false display no browser specific menu items in keditbookmarks . --nobrowser |
|
Set the update flag. Defaults to true.
update - if true then KBookmarkManager will listen to DBUS update requests. |
|
|
|
This returns the root of the toolbar menu.
In the XML, this is the group with the attribute toolbar=yes
Returns the toolbar group |
|
Update access time stamps for a given url.
url - the viewed url Returns true if any metadata was modified (bookmarks file is not saved automatically) |
|
|
Returns a pointer to the user's main (konqueror) bookmark collection. |