.TH "KBookmarkMenu" kde3 "11 Jun 2005" "Version Version 3.4.1" "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 "Signals"

.in +1c
.ti -1c
.RI "void \fBaboutToShowContextMenu\fP (const KBookmark &, \fBQPopupMenu\fP *)"
.br
.ti -1c
.RI "void \fBopenBookmark\fP (const \fBQString\fP &url, Qt::ButtonState state)"
.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
.ti -1c
.RI "void \fBfillBookmarkMenu\fP ()"
.br
.ti -1c
.RI "void \fBensureUpToDate\fP ()"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBDynMenuInfo\fP \fBshowDynamicBookmarks\fP (const \fBQString\fP &id)"
.br
.ti -1c
.RI "static void \fBsetDynamicBookmarks\fP (const \fBQString\fP &id, const \fBDynMenuInfo\fP &info)"
.br
.ti -1c
.RI "static \fBQStringList\fP \fBdynamicBookmarksList\fP ()"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBslotAboutToShow\fP ()"
.br
.ti -1c
.RI "void \fBslotAboutToShowContextMenu\fP (\fBKPopupMenu\fP *, int, \fBQPopupMenu\fP *)"
.br
.ti -1c
.RI "void \fBslotActionHighlighted\fP (\fBKAction\fP *)"
.br
.ti -1c
.RI "void \fBslotRMBActionRemove\fP (int)"
.br
.ti -1c
.RI "void \fBslotRMBActionInsert\fP (int)"
.br
.ti -1c
.RI "void \fBslotRMBActionCopyLocation\fP (int)"
.br
.ti -1c
.RI "void \fBslotRMBActionEditAt\fP (int)"
.br
.ti -1c
.RI "void \fBslotRMBActionProperties\fP (int)"
.br
.ti -1c
.RI "void \fBslotBookmarkSelected\fP ()"
.br
.ti -1c
.RI "void \fBslotBookmarkSelected\fP (\fBKAction::ActivationReason\fP reason, Qt::ButtonState state)"
.br
.ti -1c
.RI "void \fBslotAddBookmarksList\fP ()"
.br
.ti -1c
.RI "void \fBslotAddBookmark\fP ()"
.br
.ti -1c
.RI "void \fBslotNewFolder\fP ()"
.br
.ti -1c
.RI "void \fBslotNSLoad\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBKExtendedBookmarkOwner\fP * \fBextOwner\fP ()"
.br
.ti -1c
.RI "void \fBrefill\fP ()"
.br
.ti -1c
.RI "void \fBaddAddBookmark\fP ()"
.br
.ti -1c
.RI "void \fBaddAddBookmarksList\fP ()"
.br
.ti -1c
.RI "void \fBaddEditBookmarks\fP ()"
.br
.ti -1c
.RI "void \fBaddNewFolder\fP ()"
.br
.ti -1c
.RI "void \fBfillContextMenu\fP (\fBQPopupMenu\fP *, const \fBQString\fP &, int)"
.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 "bool \fBm_bAddShortcuts\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
.ti -1c
.RI "\fBQPtrList\fP< \fBKBookmarkMenu\fP > \fBm_lstSubMenus\fP"
.br
.ti -1c
.RI "\fBKActionCollection\fP * \fBm_actionCollection\fP"
.br
.ti -1c
.RI "\fBQPtrList\fP< \fBKAction\fP > \fBm_actions\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_parentAddress\fP"
.br
.in -1c
.SS "Static Protected Attributes"

.in +1c
.ti -1c
.RI "static \fBQString\fP \fBs_highlightedAddress\fP"
.br
.ti -1c
.RI "static \fBQString\fP \fBs_highlightedImportLocation\fP"
.br
.ti -1c
.RI "static \fBQString\fP \fBs_highlightedImportType\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKBookmarkMenuNSImporter\fP"
.br
.ti -1c
.RI "class \fBRMB\fP"
.br
.in -1c
.SS "Classes"

.in +1c
.ti -1c
.RI "struct \fBDynMenuInfo\fP"
.br
.RI "\fIStructure used for storing information about the dynamic menu setting 
.PP
\fBSince:\fP
.RS 4
3.2. 
.RE
.PP
\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 79 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 = \fCtrue\fP, const \fBQString\fP & parentAddress = \fC''\fP)"
.PP
Fills a bookmark menu (one instance of KBookmarkMenu is created for the toplevel menu, but also one per submenu). 
.PP
\fBParameters:\fP
.RS 4
\fImgr\fP The bookmark manager to use (i.e. for reading and writing) 
.br
\fIowner\fP implementation of the \fBKBookmarkOwner\fP callback interface. 
.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

.PP
Definition at line 79 of file kbookmarkmenu.cc.
.PP
References QObject::connect(), QObject::disconnect(), QString::isNull(), m_actions, m_lstSubMenus, m_parentAddress, m_parentMenu, QPtrList::setAutoDelete(), KActionCollection::setHighlightingEnabled(), 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. 
.PP
It fills a bookmark menu starting a given KBookmark. This is public for \fBKBookmarkBar\fP. 
.PP
Definition at line 556 of file kbookmarkmenu.cc.
.PP
References QPtrList::append(), QValueList::begin(), QObject::connect(), dynamicBookmarksList(), QValueList::end(), KBookmarkManager::findByAddress(), KBookmarkGroup::first(), KBookmarkMenu(), KBookmarkMenu::DynMenuInfo::location, m_actions, m_lstSubMenus, m_parentAddress, KBookmarkMenu::DynMenuInfo::name, KBookmarkGroup::next(), openBookmark(), KBookmarkManager::path(), KActionMenu::plug(), KActionMenu::popupMenu(), QString::replace(), QObject::setProperty(), KBookmarkMenu::DynMenuInfo::show, showDynamicBookmarks(), slotBookmarkSelected(), slotNSLoad(), and KBookmarkMenu::DynMenuInfo::type.
.SS "void KBookmarkMenu::ensureUpToDate ()"
.PP
Call \fBensureUpToDate()\fP if you need KBookmarkMenu to adjust to its final size before it is executed. 
.PP
Definition at line 153 of file kbookmarkmenu.cc.
.SS "\fBKBookmarkMenu::DynMenuInfo\fP KBookmarkMenu::showDynamicBookmarks (const \fBQString\fP & id)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
dynmenu info block for the given dynmenu name 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 1100 of file kbookmarkmenu.cc.
.PP
References KConfigBase::hasGroup(), KConfigBase::hasKey(), KBookmarkMenu::DynMenuInfo::location, KBookmarkMenu::DynMenuInfo::name, KConfigBase::readBoolEntry(), KConfigBase::readEntry(), KConfigBase::readPathEntry(), KBookmarkManager::root(), KConfigBase::setGroup(), KBookmarkMenu::DynMenuInfo::show, KBookmarkMenu::DynMenuInfo::type, and KBookmarkManager::userBookmarksManager().
.PP
Referenced by fillBookmarkMenu(), setDynamicBookmarks(), KBookmarkManager::setShowNSBookmarks(), and KBookmarkManager::showNSBookmarks().
.SS "void KBookmarkMenu::setDynamicBookmarks (const \fBQString\fP & id, const \fBDynMenuInfo\fP & info)\fC [static]\fP"
.PP
Shows an extra menu for the given bookmarks file and type. 
.PP
Upgrades from option inside XBEL to option in rc file on first call of this function. 
.PP
\fBParameters:\fP
.RS 4
\fIid\fP the unique identification for the dynamic menu 
.br
\fIinfo\fP a \fBDynMenuInfo\fP struct containing the to be added/modified data 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 1146 of file kbookmarkmenu.cc.
.PP
References KConfigBase::hasKey(), KBookmarkMenu::DynMenuInfo::location, KBookmarkMenu::DynMenuInfo::name, KConfigBase::readListEntry(), KConfigBase::setGroup(), KBookmarkMenu::DynMenuInfo::show, showDynamicBookmarks(), KConfigBase::sync(), KBookmarkMenu::DynMenuInfo::type, KConfigBase::writeEntry(), and KConfigBase::writePathEntry().
.PP
Referenced by KBookmarkManager::setShowNSBookmarks().
.SS "\fBQStringList\fP KBookmarkMenu::dynamicBookmarksList ()\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
list of dynamic menu ids 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 1132 of file kbookmarkmenu.cc.
.PP
References KConfigBase::hasKey(), KConfigBase::readListEntry(), and KConfigBase::setGroup().
.PP
Referenced by fillBookmarkMenu().
.SS "void KBookmarkMenu::openBookmark (const \fBQString\fP & url, Qt::ButtonState state)\fC [signal]\fP"
.PP
\fBSince:\fP
.RS 4
3.4 
.RE
.PP

.PP
Referenced by fillBookmarkMenu(), and slotBookmarkSelected().
.SS "void KBookmarkMenu::slotBookmarkSelected (\fBKAction::ActivationReason\fP reason, Qt::ButtonState state)\fC [protected, slot]\fP"
.PP
@ since 3.4 
.PP
Definition at line 746 of file kbookmarkmenu.cc.
.PP
References endl(), kdDebug(), openBookmark(), KBookmarkOwner::openBookmarkURL(), and QObject::sender().
.PP
Referenced by fillBookmarkMenu().
.SS "void KBookmarkMenu::slotNSLoad ()\fC [protected, slot]\fP"
.PP
load Netscape's bookmarks 
.PP
Definition at line 769 of file kbookmarkmenu.cc.
.PP
References QObject::disconnect(), and KBookmarkMenuNSImporter::openBookmarks().
.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. 
.PP
Supplied in the constructor. 
.PP
Definition at line 217 of file kbookmarkmenu.h.
.PP
Referenced by KBookmarkMenu().
.SS "\fBQPtrList\fP<\fBKBookmarkMenu\fP> \fBKBookmarkMenu::m_lstSubMenus\fP\fC [protected]\fP"
.PP
List of our sub menus. 
.PP
Definition at line 221 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. 
.PP
Definition at line 226 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. 
.PP
Definition at line 230 of file kbookmarkmenu.h.
.PP
Referenced by fillBookmarkMenu(), and KBookmarkMenu().

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