KIO
KBookmarkOwner Class Reference
#include <kbookmarkmanager.h>

Detailed Description
The KBookmarkMenu and KBookmarkBar classes gives the user the ability to either edit bookmarks or add their own.In the first case, the app may want to open the bookmark in a special way. In the second case, the app must supply the name and the URL for the bookmark.
This class gives the app this callback-like ability.
If your app does not give the user the ability to add bookmarks and you don't mind using the default bookmark editor to edit your bookmarks, then you don't need to overload this class at all. Rather, just use something like:
bookmarks = new KBookmarkMenu( mgr, 0, menu, actioncollec )
If you wish to use your own editor or allow the user to add bookmarks, you must overload this class.
Definition at line 326 of file kbookmarkmanager.h.
Public Types | |
| enum | BookmarkOption { ShowAddBookmark, ShowEditBookmark } |
Public Member Functions | |
| virtual | ~KBookmarkOwner () |
| virtual QString | currentTitle () const |
| virtual QString | currentUrl () const |
| virtual bool | supportsTabs () const |
| virtual QList< QPair< QString, QString > > | currentBookmarkList () const |
| virtual bool | enableOption (BookmarkOption option) const |
| virtual void | openBookmark (const KBookmark &bm, Qt::MouseButtons mb, Qt::KeyboardModifiers km)=0 |
| virtual void | openFolderinTabs (const KBookmarkGroup &bm) |
| virtual KBookmarkDialog * | bookmarkDialog (KBookmarkManager *mgr, QWidget *parent) |
Member Enumeration Documentation
Constructor & Destructor Documentation
| virtual KBookmarkOwner::~KBookmarkOwner | ( | ) | [inline, virtual] |
Definition at line 329 of file kbookmarkmanager.h.
Member Function Documentation
| virtual QString KBookmarkOwner::currentTitle | ( | ) | const [inline, virtual] |
This function is called whenever the user wants to add the current page to the bookmarks list.
The title will become the "name" of the bookmark. You must overload this function if you wish to give your users the ability to add bookmarks.
- Returns:
- the title of the current page.
Definition at line 339 of file kbookmarkmanager.h.
| virtual QString KBookmarkOwner::currentUrl | ( | ) | const [inline, virtual] |
This function is called whenever the user wants to add the current page to the bookmarks list.
The URL will become the URL of the bookmark. You must overload this function if you wish to give your users the ability to add bookmarks.
- Returns:
- the URL of the current page.
Definition at line 349 of file kbookmarkmanager.h.
| virtual bool KBookmarkOwner::supportsTabs | ( | ) | const [inline, virtual] |
This function returns whether the owner supports tabs.
Definition at line 355 of file kbookmarkmanager.h.
| virtual QList<QPair<QString, QString> > KBookmarkOwner::currentBookmarkList | ( | ) | const [inline, virtual] |
Returns a list of title, URL pairs of the open tabs.
Definition at line 360 of file kbookmarkmanager.h.
| bool KBookmarkOwner::enableOption | ( | BookmarkOption | option | ) | const [virtual] |
Returns true if action should be shown in the menu The default is to show both a add and editBookmark Entry //TODO ContextMenuAction? to disable the contextMenu? Delete and Propeties to disable those in the context menu?
Definition at line 585 of file kbookmarkmanager.cc.
| virtual void KBookmarkOwner::openBookmark | ( | const KBookmark & | bm, | |
| Qt::MouseButtons | mb, | |||
| Qt::KeyboardModifiers | km | |||
| ) | [pure virtual] |
Called if a bookmark is selected.
You need to override this.
| void KBookmarkOwner::openFolderinTabs | ( | const KBookmarkGroup & | bm | ) | [virtual] |
Called if the user wants to open every bookmark in this folder in a new tab.
The default implementation does nothing. This is only called if supportsTabs() returns true
Definition at line 599 of file kbookmarkmanager.cc.
| KBookmarkDialog * KBookmarkOwner::bookmarkDialog | ( | KBookmarkManager * | mgr, | |
| QWidget * | parent | |||
| ) | [virtual] |
Definition at line 594 of file kbookmarkmanager.cc.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference