20 #ifndef __kbookmarkmanager_h
21 #define __kbookmarkmanager_h
24 #include <tqstringlist.h>
27 #include <dcopobject.h>
28 #include "kbookmark.h"
29 #include "kbookmarknotifier.h"
72 KBookmarkManager(
const TQString & bookmarksFile,
bool bImportDesktopFiles =
true );
89 void setUpdate(
bool update );
98 bool save(
bool toolbarCache =
true )
const;
106 bool saveAs(
const TQString & filename,
bool toolbarCache =
true )
const;
115 bool updateAccessMetadata(
const TQString &url,
bool emitSignal =
true );
126 void updateFavicon(
const TQString &url,
const TQString &faviconurl,
bool emitSignal =
true );
134 TQString
path() {
return m_bookmarksFile; }
158 KBookmark findByAddress(
const TQString & address,
bool tolerate =
false );
166 void emitConfigChanged();
173 bool showNSBookmarks()
const;
179 void setShowNSBookmarks(
bool show );
191 void setEditorOptions(
const TQString& caption,
bool browser );
210 bool bImportDesktopFiles =
true );
225 static TQString userBookmarksFile();
230 const TQDomDocument & internalDocument()
const;
242 KBookmarkGroup addBookmarkDialog(
const TQString & _url,
const TQString & _title,
243 const TQString & _parentBookmarkAddress = TQString::null );
246 void slotEditBookmarks();
247 void slotEditBookmarksAtAddress(
const TQString& address );
255 ASYNC notifyCompleteChange( TQString caller );
263 ASYNC notifyChanged( TQString groupAddress );
265 ASYNC notifyConfigChanged();
273 void changed(
const TQString & groupAddress,
const TQString & caller );
278 void importDesktopFiles();
279 static void convertToXBEL( TQDomElement & group );
280 static void convertAttribute( TQDomElement elem,
const TQString & oldName,
const TQString & newName );
284 TQString m_bookmarksFile;
285 mutable TQDomDocument m_doc;
286 mutable TQDomDocument m_toolbarDoc;
287 mutable bool m_docIsLoaded;
289 static TQPtrList<KBookmarkManager>* s_pSelf;
290 bool m_showNSBookmarks;
293 class KBookmarkManagerPrivate* dptr()
const;
324 virtual void openBookmarkURL(
const TQString& _url);
344 virtual TQString
currentURL()
const {
return TQString::null; }
347 virtual void virtual_hook(
int id,
void* data );
357 typedef TQValueList<QPair<TQString,TQString> > QStringPairList;
359 void fillBookmarksList( KExtendedBookmarkOwner::QStringPairList & list ) { emit signalFillBookmarksList( list ); };
361 void signalFillBookmarksList( KExtendedBookmarkOwner::QStringPairList & list );
363 class KExtendedBookmarkOwnerPrivate;
364 KExtendedBookmarkOwnerPrivate *d;
This class implements the reading/writing of bookmarks in XML.
TQString path()
This will return the path that this manager is using to read the bookmarks.
KBookmarkNotifier & notifier()
Access to bookmark notifier, for emitting signals.
void changed(const TQString &groupAddress, const TQString &caller)
Signals that the group (or any of its children) with the address groupAddress (e.g.
DCOP interface for a bookmark notifier (an object which emits signals upon changes to the bookmarks)
The KBookmarkMenu and KBookmarkBar classes gives the user the ability to either edit bookmarks or add...
virtual TQString currentTitle() const
This function is called whenever the user wants to add the current page to the bookmarks list.
virtual TQString currentURL() const
This function is called whenever the user wants to add the current page to the bookmarks list.