.TH "KBookmarkMenu" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KBookmarkMenu \- This class provides a bookmark menu.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kbookmarkmenu.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBslotBookmarksChanged\fP (const  \fBQString\fP &)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKBookmarkMenu\fP (\fBKBookmarkManager\fP *mgr, \fBKBookmarkOwner\fP *owner, \fBKPopupMenu\fP *parentMenu, \fBKActionCollection\fP *collec, bool root, bool add=true, const  \fBQString\fP &parentAddress='')"
.br
.RI "\fIFills a bookmark menu (one instance of KBookmarkMenu is created for the toplevel menu, but also one per submenu). \fP"
.ti -1c
.RI "void \fBfillBookmarkMenu\fP ()"
.br
.RI "\fIEven if you think you need to use this, you are probably wrong. \fP"
.ti -1c
.RI "void \fBensureUpToDate\fP ()"
.br
.RI "\fICall \fBensureUpToDate()\fP if you need KBookmarkMenu to adjust to its final size before it is executed. \fP"
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBslotAboutToShow\fP ()"
.br
.ti -1c
.RI "void \fBslotBookmarkSelected\fP ()"
.br
.ti -1c
.RI "void \fBslotAddBookmark\fP ()"
.br
.ti -1c
.RI "void \fBslotNewFolder\fP ()"
.br
.ti -1c
.RI "void \fBslotNSBookmarkSelected\fP ()"
.br
.ti -1c
.RI "void \fBslotNSLoad\fP ()"
.br
.RI "\fIload Netscape's bookmarks \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBrefill\fP ()"
.br
.ti -1c
.RI "void \fBaddAddBookmark\fP ()"
.br
.ti -1c
.RI "void \fBaddEditBookmarks\fP ()"
.br
.ti -1c
.RI "void \fBaddNewFolder\fP ()"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "bool \fBm_bIsRoot\fP:1"
.br
.ti -1c
.RI "bool \fBm_bAddBookmark\fP:1"
.br
.ti -1c
.RI "bool \fBm_bDirty\fP:1"
.br
.ti -1c
.RI "bool \fBm_bNSBookmark\fP:1"
.br
.ti -1c
.RI "\fBKBookmarkManager\fP * \fBm_pManager\fP"
.br
.ti -1c
.RI "\fBKBookmarkOwner\fP * \fBm_pOwner\fP"
.br
.ti -1c
.RI "\fBKPopupMenu\fP * \fBm_parentMenu\fP"
.br
.RI "\fIThe menu in which we plug our actions. \fP"
.ti -1c
.RI "\fBQPtrList\fP< \fBKBookmarkMenu\fP > \fBm_lstSubMenus\fP"
.br
.RI "\fIList of our sub menus. \fP"
.ti -1c
.RI "\fBKActionCollection\fP * \fBm_actionCollection\fP"
.br
.ti -1c
.RI "\fBQPtrList\fP< \fBKAction\fP > \fBm_actions\fP"
.br
.RI "\fIList of our actions. \fP"
.ti -1c
.RI "\fBQString\fP \fBm_parentAddress\fP"
.br
.RI "\fIParent bookmark for this menu. \fP"
.in -1c
.SH "Detailed Description"
.PP 
This class provides a bookmark menu. 

It is typically used in cooperation with \fBKActionMenu\fP but doesn't have to be.
.PP
If you use this class by itself, then it will use \fBKDE\fP defaults for everything -- the bookmark path, bookmark editor, bookmark launcher.. everything. These defaults reside in the classes \fBKBookmarkOwner\fP (editing bookmarks) and \fBKBookmarkManager\fP (almost everything else). If you wish to change the defaults in any way, you must reimplement and instantiate those classes \fIbefore\fP this class is ever called.
.PP
Using this class is very simple:
.PP
1) Create a popup menu (either \fBKActionMenu\fP or \fBKPopupMenu\fP will do) 2) Instantiate a new KBookmarkMenu object using the above popup menu as a parameter 3) Insert your (now full) popup menu wherever you wish
.PP
Again, if you wish to modify any defaults, the procedure is:
.PP
1a) Reimplement your own \fBKBookmarkOwner\fP 1b) Reimplement and instantiate your own \fBKBookmarkManager\fP 
.PP
Definition at line 64 of file kbookmarkmenu.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KBookmarkMenu::KBookmarkMenu (\fBKBookmarkManager\fP * mgr, \fBKBookmarkOwner\fP * owner, \fBKPopupMenu\fP * parentMenu, \fBKActionCollection\fP * collec, bool root, bool add = true, const \fBQString\fP & parentAddress = '')"
.PP
Fills a bookmark menu (one instance of KBookmarkMenu is created for the toplevel menu, but also one per submenu). \fBParameters:\fP
.RS 4
\fIowner\fP implementation of the \fBKBookmarkOwner\fP interface (callbacks) 
.br
\fIparentMenu\fP menu to be filled 
.br
\fIcollec\fP parent collection for the KActions. Only used for other menus than the toplevel one. 
.br
\fIroot\fP true for the toplevel menu 
.br
\fIadd\fP true to show the 'Add Bookmark' and 'New Folder' entries 
.br
\fIparentAddress\fP the address of the group containing the items that we want to show. 
.RE
.PP
\fBSee also:\fP
.RS 4
KBookmark::address. Be careful : A _null_ parentAddress denotes a NS-bookmark menu. An _empty_ parentAddress denotes the toplevel bookmark menu 
.RE
.PP
Definition at line 56 of file kbookmarkmenu.cc.
.PP
References QObject::connect(), QString::isNull(), m_actions, m_lstSubMenus, m_parentAddress, m_parentMenu, QPtrList< KAction >::setAutoDelete(), QPtrList< KBookmarkMenu >::setAutoDelete(), and KPopupMenu::setKeyboardShortcutsEnabled().
.PP
Referenced by fillBookmarkMenu().
.SH "Member Function Documentation"
.PP 
.SS "void KBookmarkMenu::fillBookmarkMenu ()"
.PP
Even if you think you need to use this, you are probably wrong. It fills a bookmark menu starting a given KBookmark. This is public for \fBKBookmarkBar\fP. Definition at line 220 of file kbookmarkmenu.cc.
.PP
References KStdAccel::action(), QPtrList< KBookmarkMenu >::append(), QPtrList< KAction >::append(), QObject::connect(), QFile::exists(), KBookmarkManager::findByAddress(), KBookmarkGroup::first(), QPopupMenu::insertSeparator(), KBookmarkMenu(), m_actions, m_lstSubMenus, m_parentAddress, m_parentMenu, KBookmarkGroup::next(), KActionMenu::plug(), KActionMenu::popupMenu(), QString::replace(), KBookmarkManager::showNSBookmarks(), and slotNSLoad().
.SS "void KBookmarkMenu::ensureUpToDate ()"
.PP
Call \fBensureUpToDate()\fP if you need KBookmarkMenu to adjust to its final size before it is executed. Definition at line 109 of file kbookmarkmenu.cc.
.SS "void KBookmarkMenu::slotNSLoad ()\fC [protected, slot]\fP"
.PP
load Netscape's bookmarks Definition at line 389 of file kbookmarkmenu.cc.
.PP
References m_parentMenu, and KBookmarkMenuNSImporter::openNSBookmarks().
.PP
Referenced by fillBookmarkMenu().
.SH "Member Data Documentation"
.PP 
.SS "\fBKPopupMenu\fP* \fBKBookmarkMenu::m_parentMenu\fP\fC [protected]\fP"
.PP
The menu in which we plug our actions. Supplied in the constructor. Definition at line 137 of file kbookmarkmenu.h.
.PP
Referenced by fillBookmarkMenu(), KBookmarkMenu(), and slotNSLoad().
.SS "\fBQPtrList\fP<\fBKBookmarkMenu\fP> \fBKBookmarkMenu::m_lstSubMenus\fP\fC [protected]\fP"
.PP
List of our sub menus. Definition at line 141 of file kbookmarkmenu.h.
.PP
Referenced by fillBookmarkMenu(), and KBookmarkMenu().
.SS "\fBQPtrList\fP<\fBKAction\fP> \fBKBookmarkMenu::m_actions\fP\fC [protected]\fP"
.PP
List of our actions. Definition at line 146 of file kbookmarkmenu.h.
.PP
Referenced by fillBookmarkMenu(), and KBookmarkMenu().
.SS "\fBQString\fP \fBKBookmarkMenu::m_parentAddress\fP\fC [protected]\fP"
.PP
Parent bookmark for this menu. Definition at line 150 of file kbookmarkmenu.h.
.PP
Referenced by fillBookmarkMenu(), and KBookmarkMenu().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
