\section{KBookmark\-Menu Class Reference}
\label{classKBookmarkMenu}\index{KBookmarkMenu@{KBookmarkMenu}}
This class provides a bookmark menu.  


{\tt \#include $<$kbookmarkmenu.h$>$}

Inheritance diagram for KBookmark\-Menu:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=69pt]{classKBookmarkMenu__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KBookmark\-Menu:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=325pt]{classKBookmarkMenu__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Bookmarks\-Changed} (const  {\bf QString} \&)\label{classKBookmarkMenu_i0}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KBookmark\-Menu} ({\bf KBookmark\-Manager} $\ast$mgr, {\bf KBookmark\-Owner} $\ast$owner, {\bf KPopup\-Menu} $\ast$parent\-Menu, {\bf KAction\-Collection} $\ast$collec, bool root, bool add=true, const  {\bf QString} \&parent\-Address=\char`\"{}\char`\"{})
\begin{CompactList}\small\item\em Fills a bookmark menu (one instance of KBookmark\-Menu is created for the toplevel menu, but also one per submenu). \item\end{CompactList}\item 
void {\bf fill\-Bookmark\-Menu} ()
\begin{CompactList}\small\item\em Even if you think you need to use this, you are probably wrong. \item\end{CompactList}\item 
void {\bf ensure\-Up\-To\-Date} ()
\begin{CompactList}\small\item\em Call {\bf ensure\-Up\-To\-Date()}{\rm (p.\,\pageref{classKBookmarkMenu_a3})} if you need KBookmark\-Menu to adjust to its final size before it is executed. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-About\-To\-Show} ()\label{classKBookmarkMenu_j0}

\item 
void {\bf slot\-Bookmark\-Selected} ()\label{classKBookmarkMenu_j1}

\item 
void {\bf slot\-Add\-Bookmark} ()\label{classKBookmarkMenu_j2}

\item 
void {\bf slot\-New\-Folder} ()\label{classKBookmarkMenu_j3}

\item 
void {\bf slot\-NSBookmark\-Selected} ()\label{classKBookmarkMenu_j4}

\item 
void {\bf slot\-NSLoad} ()
\begin{CompactList}\small\item\em load Netscape's bookmarks \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf refill} ()\label{classKBookmarkMenu_b0}

\item 
void {\bf add\-Add\-Bookmark} ()\label{classKBookmarkMenu_b1}

\item 
void {\bf add\-Edit\-Bookmarks} ()\label{classKBookmarkMenu_b2}

\item 
void {\bf add\-New\-Folder} ()\label{classKBookmarkMenu_b3}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
bool {\bf m\_\-b\-Is\-Root}:1\label{classKBookmarkMenu_p0}

\item 
bool {\bf m\_\-b\-Add\-Bookmark}:1\label{classKBookmarkMenu_p1}

\item 
bool {\bf m\_\-b\-Dirty}:1\label{classKBookmarkMenu_p2}

\item 
bool {\bf m\_\-b\-NSBookmark}:1\label{classKBookmarkMenu_p3}

\item 
{\bf KBookmark\-Manager} $\ast$ {\bf m\_\-p\-Manager}\label{classKBookmarkMenu_p4}

\item 
{\bf KBookmark\-Owner} $\ast$ {\bf m\_\-p\-Owner}\label{classKBookmarkMenu_p5}

\item 
{\bf KPopup\-Menu} $\ast$ {\bf m\_\-parent\-Menu}
\begin{CompactList}\small\item\em The menu in which we plug our actions. \item\end{CompactList}\item 
{\bf QPtr\-List}$<$ {\bf KBookmark\-Menu} $>$ {\bf m\_\-lst\-Sub\-Menus}
\begin{CompactList}\small\item\em List of our sub menus. \item\end{CompactList}\item 
{\bf KAction\-Collection} $\ast$ {\bf m\_\-action\-Collection}\label{classKBookmarkMenu_p8}

\item 
{\bf QPtr\-List}$<$ {\bf KAction} $>$ {\bf m\_\-actions}
\begin{CompactList}\small\item\em List of our actions. \item\end{CompactList}\item 
{\bf QString} {\bf m\_\-parent\-Address}
\begin{CompactList}\small\item\em Parent bookmark for this menu. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
This class provides a bookmark menu. 

It is typically used in cooperation with {\bf KAction\-Menu} but doesn't have to be.

If you use this class by itself, then it will use {\bf KDE} defaults for everything -- the bookmark path, bookmark editor, bookmark launcher.. everything. These defaults reside in the classes {\bf KBookmark\-Owner}{\rm (p.\,\pageref{classKBookmarkOwner})} (editing bookmarks) and {\bf KBookmark\-Manager}{\rm (p.\,\pageref{classKBookmarkManager})} (almost everything else). If you wish to change the defaults in any way, you must reimplement and instantiate those classes {\em before\/} this class is ever called.

Using this class is very simple:

1) Create a popup menu (either {\bf KAction\-Menu} or {\bf KPopup\-Menu} will do) 2) Instantiate a new KBookmark\-Menu object using the above popup menu as a parameter 3) Insert your (now full) popup menu wherever you wish

Again, if you wish to modify any defaults, the procedure is:

1a) Reimplement your own {\bf KBookmark\-Owner}{\rm (p.\,\pageref{classKBookmarkOwner})} 1b) Reimplement and instantiate your own {\bf KBookmark\-Manager}{\rm (p.\,\pageref{classKBookmarkManager})} 



Definition at line 64 of file kbookmarkmenu.h.

\subsection{Constructor \& Destructor Documentation}
\index{KBookmarkMenu@{KBookmark\-Menu}!KBookmarkMenu@{KBookmarkMenu}}
\index{KBookmarkMenu@{KBookmarkMenu}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KBookmark\-Menu::KBookmark\-Menu ({\bf KBookmark\-Manager} $\ast$ {\em mgr}, {\bf KBookmark\-Owner} $\ast$ {\em owner}, {\bf KPopup\-Menu} $\ast$ {\em parent\-Menu}, {\bf KAction\-Collection} $\ast$ {\em collec}, bool {\em root}, bool {\em add} = true, const {\bf QString} \& {\em parent\-Address} = \char`\"{}\char`\"{})}\label{classKBookmarkMenu_a0}


Fills a bookmark menu (one instance of KBookmark\-Menu is created for the toplevel menu, but also one per submenu). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em owner}]implementation of the {\bf KBookmark\-Owner}{\rm (p.\,\pageref{classKBookmarkOwner})} interface (callbacks) \item[{\em parent\-Menu}]menu to be filled \item[{\em collec}]parent collection for the KActions. Only used for other menus than the toplevel one. \item[{\em root}]true for the toplevel menu \item[{\em add}]true to show the \char`\"{}Add Bookmark\char`\"{} and \char`\"{}New Folder\char`\"{} entries \item[{\em parent\-Address}]the address of the group containing the items that we want to show. \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]KBookmark::address. Be careful : A \_\-null\_\- parent\-Address denotes a NS-bookmark menu. An \_\-empty\_\- parent\-Address denotes the toplevel bookmark menu \end{Desc}


Definition at line 56 of file kbookmarkmenu.cc.

References QObject::connect(), QString::is\-Null(), m\_\-actions, m\_\-lst\-Sub\-Menus, m\_\-parent\-Address, m\_\-parent\-Menu, QPtr\-List$<$ KAction $>$::set\-Auto\-Delete(), QPtr\-List$<$ KBookmark\-Menu $>$::set\-Auto\-Delete(), and KPopup\-Menu::set\-Keyboard\-Shortcuts\-Enabled().

Referenced by fill\-Bookmark\-Menu().

\subsection{Member Function Documentation}
\index{KBookmarkMenu@{KBookmark\-Menu}!fillBookmarkMenu@{fillBookmarkMenu}}
\index{fillBookmarkMenu@{fillBookmarkMenu}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBookmark\-Menu::fill\-Bookmark\-Menu ()}\label{classKBookmarkMenu_a2}


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 {\bf KBookmark\-Bar}{\rm (p.\,\pageref{classKBookmarkBar})}. 

Definition at line 220 of file kbookmarkmenu.cc.

References KStd\-Accel::action(), QPtr\-List$<$ KBookmark\-Menu $>$::append(), QPtr\-List$<$ KAction $>$::append(), QObject::connect(), QFile::exists(), KBookmark\-Manager::find\-By\-Address(), KBookmark\-Group::first(), QPopup\-Menu::insert\-Separator(), KBookmark\-Menu(), m\_\-actions, m\_\-lst\-Sub\-Menus, m\_\-parent\-Address, m\_\-parent\-Menu, KBookmark\-Group::next(), KAction\-Menu::plug(), KAction\-Menu::popup\-Menu(), QString::replace(), KBookmark\-Manager::show\-NSBookmarks(), and slot\-NSLoad().\index{KBookmarkMenu@{KBookmark\-Menu}!ensureUpToDate@{ensureUpToDate}}
\index{ensureUpToDate@{ensureUpToDate}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBookmark\-Menu::ensure\-Up\-To\-Date ()}\label{classKBookmarkMenu_a3}


Call {\bf ensure\-Up\-To\-Date()}{\rm (p.\,\pageref{classKBookmarkMenu_a3})} if you need KBookmark\-Menu to adjust to its final size before it is executed. 



Definition at line 109 of file kbookmarkmenu.cc.\index{KBookmarkMenu@{KBookmark\-Menu}!slotNSLoad@{slotNSLoad}}
\index{slotNSLoad@{slotNSLoad}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBookmark\-Menu::slot\-NSLoad ()\hspace{0.3cm}{\tt  [protected, slot]}}\label{classKBookmarkMenu_j5}


load Netscape's bookmarks 



Definition at line 389 of file kbookmarkmenu.cc.

References m\_\-parent\-Menu, and KBookmark\-Menu\-NSImporter::open\-NSBookmarks().

Referenced by fill\-Bookmark\-Menu().

\subsection{Member Data Documentation}
\index{KBookmarkMenu@{KBookmark\-Menu}!m_parentMenu@{m\_\-parentMenu}}
\index{m_parentMenu@{m\_\-parentMenu}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KPopup\-Menu}$\ast$ {\bf KBookmark\-Menu::m\_\-parent\-Menu}\hspace{0.3cm}{\tt  [protected]}}\label{classKBookmarkMenu_p6}


The menu in which we plug our actions. 

Supplied in the constructor. 

Definition at line 137 of file kbookmarkmenu.h.

Referenced by fill\-Bookmark\-Menu(), KBookmark\-Menu(), and slot\-NSLoad().\index{KBookmarkMenu@{KBookmark\-Menu}!m_lstSubMenus@{m\_\-lstSubMenus}}
\index{m_lstSubMenus@{m\_\-lstSubMenus}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPtr\-List}$<${\bf KBookmark\-Menu}$>$ {\bf KBookmark\-Menu::m\_\-lst\-Sub\-Menus}\hspace{0.3cm}{\tt  [protected]}}\label{classKBookmarkMenu_p7}


List of our sub menus. 



Definition at line 141 of file kbookmarkmenu.h.

Referenced by fill\-Bookmark\-Menu(), and KBookmark\-Menu().\index{KBookmarkMenu@{KBookmark\-Menu}!m_actions@{m\_\-actions}}
\index{m_actions@{m\_\-actions}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPtr\-List}$<${\bf KAction}$>$ {\bf KBookmark\-Menu::m\_\-actions}\hspace{0.3cm}{\tt  [protected]}}\label{classKBookmarkMenu_p9}


List of our actions. 



Definition at line 146 of file kbookmarkmenu.h.

Referenced by fill\-Bookmark\-Menu(), and KBookmark\-Menu().\index{KBookmarkMenu@{KBookmark\-Menu}!m_parentAddress@{m\_\-parentAddress}}
\index{m_parentAddress@{m\_\-parentAddress}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} {\bf KBookmark\-Menu::m\_\-parent\-Address}\hspace{0.3cm}{\tt  [protected]}}\label{classKBookmarkMenu_p10}


Parent bookmark for this menu. 



Definition at line 150 of file kbookmarkmenu.h.

Referenced by fill\-Bookmark\-Menu(), and KBookmark\-Menu().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kbookmarkmenu.h\item 
kbookmarkmenu.cc\end{CompactItemize}
