\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=64pt]{classKBookmarkMenu__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KBookmark\-Menu:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=282pt]{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*{Signals}
\begin{CompactItemize}
\item 
void {\bf about\-To\-Show\-Context\-Menu} (const KBookmark \&, {\bf QPopup\-Menu} $\ast$)\label{classKBookmarkMenu_l0}

\item 
void {\bf open\-Bookmark} (const {\bf QString} \&url, Qt::Button\-State state)
\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`\"{})
\item 
void {\bf fill\-Bookmark\-Menu} ()
\item 
void {\bf ensure\-Up\-To\-Date} ()
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf Dyn\-Menu\-Info} {\bf show\-Dynamic\-Bookmarks} (const {\bf QString} \&id)
\item 
static void {\bf set\-Dynamic\-Bookmarks} (const {\bf QString} \&id, const {\bf Dyn\-Menu\-Info} \&info)
\item 
static {\bf QString\-List} {\bf dynamic\-Bookmarks\-List} ()
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-About\-To\-Show} ()\label{classKBookmarkMenu_j0}

\item 
void {\bf slot\-About\-To\-Show\-Context\-Menu} ({\bf KPopup\-Menu} $\ast$, int, {\bf QPopup\-Menu} $\ast$)\label{classKBookmarkMenu_j1}

\item 
void {\bf slot\-Action\-Highlighted} ({\bf KAction} $\ast$)\label{classKBookmarkMenu_j2}

\item 
void {\bf slot\-RMBAction\-Remove} (int)\label{classKBookmarkMenu_j3}

\item 
void {\bf slot\-RMBAction\-Insert} (int)\label{classKBookmarkMenu_j4}

\item 
void {\bf slot\-RMBAction\-Copy\-Location} (int)\label{classKBookmarkMenu_j5}

\item 
void {\bf slot\-RMBAction\-Edit\-At} (int)\label{classKBookmarkMenu_j6}

\item 
void {\bf slot\-RMBAction\-Properties} (int)\label{classKBookmarkMenu_j7}

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

\item 
void {\bf slot\-Bookmark\-Selected} ({\bf KAction::Activation\-Reason} reason, Qt::Button\-State state)
\item 
void {\bf slot\-Add\-Bookmarks\-List} ()\label{classKBookmarkMenu_j10}

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

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

\item 
void {\bf slot\-NSLoad} ()
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf KExtended\-Bookmark\-Owner} $\ast$ {\bf ext\-Owner} ()\label{classKBookmarkMenu_b0}

\item 
void {\bf refill} ()\label{classKBookmarkMenu_b1}

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

\item 
void {\bf add\-Add\-Bookmarks\-List} ()\label{classKBookmarkMenu_b3}

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

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

\item 
void {\bf fill\-Context\-Menu} ({\bf QPopup\-Menu} $\ast$, const {\bf QString} \&, int)\label{classKBookmarkMenu_b6}

\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 
bool {\bf m\_\-b\-Add\-Shortcuts}:1\label{classKBookmarkMenu_p4}

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

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

\item 
{\bf KPopup\-Menu} $\ast$ {\bf m\_\-parent\-Menu}
\item 
{\bf QPtr\-List}$<$ {\bf KBookmark\-Menu} $>$ {\bf m\_\-lst\-Sub\-Menus}
\item 
{\bf KAction\-Collection} $\ast$ {\bf m\_\-action\-Collection}\label{classKBookmarkMenu_p9}

\item 
{\bf QPtr\-List}$<$ {\bf KAction} $>$ {\bf m\_\-actions}
\item 
{\bf QString} {\bf m\_\-parent\-Address}
\end{CompactItemize}
\subsection*{Static Protected Attributes}
\begin{CompactItemize}
\item 
static {\bf QString} {\bf s\_\-highlighted\-Address}\label{classKBookmarkMenu_t0}

\item 
static {\bf QString} {\bf s\_\-highlighted\-Import\-Location}\label{classKBookmarkMenu_t1}

\item 
static {\bf QString} {\bf s\_\-highlighted\-Import\-Type}\label{classKBookmarkMenu_t2}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KBookmark\-Menu\-NSImporter}\label{classKBookmarkMenu_n0}

\item 
class {\bf RMB}\label{classKBookmarkMenu_n1}

\end{CompactItemize}
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct {\bf Dyn\-Menu\-Info}
\begin{CompactList}\small\item\em Structure used for storing information about the dynamic menu setting \begin{Desc}
\item[Since:]3.2. \end{Desc}
\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 79 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} = {\tt true}, const {\bf QString} \& {\em parent\-Address} = {\tt \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 mgr}]The bookmark manager to use (i.e. for reading and writing) \item[{\em owner}]implementation of the {\bf KBookmark\-Owner}{\rm (p.\,\pageref{classKBookmarkOwner})} callback interface. \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 79 of file kbookmarkmenu.cc.

References QObject::connect(), QObject::disconnect(), QString::is\-Null(), m\_\-actions, m\_\-lst\-Sub\-Menus, m\_\-parent\-Address, m\_\-parent\-Menu, QPtr\-List::set\-Auto\-Delete(), KAction\-Collection::set\-Highlighting\-Enabled(), 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 556 of file kbookmarkmenu.cc.

References QPtr\-List::append(), QValue\-List::begin(), QObject::connect(), dynamic\-Bookmarks\-List(), QValue\-List::end(), KBookmark\-Manager::find\-By\-Address(), KBookmark\-Group::first(), KBookmark\-Menu(), KBookmark\-Menu::Dyn\-Menu\-Info::location, m\_\-actions, m\_\-lst\-Sub\-Menus, m\_\-parent\-Address, KBookmark\-Menu::Dyn\-Menu\-Info::name, KBookmark\-Group::next(), open\-Bookmark(), KBookmark\-Manager::path(), KAction\-Menu::plug(), KAction\-Menu::popup\-Menu(), QString::replace(), QObject::set\-Property(), KBookmark\-Menu::Dyn\-Menu\-Info::show, show\-Dynamic\-Bookmarks(), slot\-Bookmark\-Selected(), slot\-NSLoad(), and KBookmark\-Menu::Dyn\-Menu\-Info::type.\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 153 of file kbookmarkmenu.cc.\index{KBookmarkMenu@{KBookmark\-Menu}!showDynamicBookmarks@{showDynamicBookmarks}}
\index{showDynamicBookmarks@{showDynamicBookmarks}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KBookmark\-Menu::Dyn\-Menu\-Info} KBookmark\-Menu::show\-Dynamic\-Bookmarks (const {\bf QString} \& {\em id})\hspace{0.3cm}{\tt  [static]}}\label{classKBookmarkMenu_e0}


\begin{Desc}
\item[Returns:]dynmenu info block for the given dynmenu name \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 1100 of file kbookmarkmenu.cc.

References KConfig\-Base::has\-Group(), KConfig\-Base::has\-Key(), KBookmark\-Menu::Dyn\-Menu\-Info::location, KBookmark\-Menu::Dyn\-Menu\-Info::name, KConfig\-Base::read\-Bool\-Entry(), KConfig\-Base::read\-Entry(), KConfig\-Base::read\-Path\-Entry(), KBookmark\-Manager::root(), KConfig\-Base::set\-Group(), KBookmark\-Menu::Dyn\-Menu\-Info::show, KBookmark\-Menu::Dyn\-Menu\-Info::type, and KBookmark\-Manager::user\-Bookmarks\-Manager().

Referenced by fill\-Bookmark\-Menu(), set\-Dynamic\-Bookmarks(), KBookmark\-Manager::set\-Show\-NSBookmarks(), and KBookmark\-Manager::show\-NSBookmarks().\index{KBookmarkMenu@{KBookmark\-Menu}!setDynamicBookmarks@{setDynamicBookmarks}}
\index{setDynamicBookmarks@{setDynamicBookmarks}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBookmark\-Menu::set\-Dynamic\-Bookmarks (const {\bf QString} \& {\em id}, const {\bf Dyn\-Menu\-Info} \& {\em info})\hspace{0.3cm}{\tt  [static]}}\label{classKBookmarkMenu_e1}


Shows an extra menu for the given bookmarks file and type. 

Upgrades from option inside XBEL to option in rc file on first call of this function. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the unique identification for the dynamic menu \item[{\em info}]a {\bf Dyn\-Menu\-Info}{\rm (p.\,\pageref{structKBookmarkMenu_1_1DynMenuInfo})} struct containing the to be added/modified data \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 1146 of file kbookmarkmenu.cc.

References KConfig\-Base::has\-Key(), KBookmark\-Menu::Dyn\-Menu\-Info::location, KBookmark\-Menu::Dyn\-Menu\-Info::name, KConfig\-Base::read\-List\-Entry(), KConfig\-Base::set\-Group(), KBookmark\-Menu::Dyn\-Menu\-Info::show, show\-Dynamic\-Bookmarks(), KConfig\-Base::sync(), KBookmark\-Menu::Dyn\-Menu\-Info::type, KConfig\-Base::write\-Entry(), and KConfig\-Base::write\-Path\-Entry().

Referenced by KBookmark\-Manager::set\-Show\-NSBookmarks().\index{KBookmarkMenu@{KBookmark\-Menu}!dynamicBookmarksList@{dynamicBookmarksList}}
\index{dynamicBookmarksList@{dynamicBookmarksList}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KBookmark\-Menu::dynamic\-Bookmarks\-List ()\hspace{0.3cm}{\tt  [static]}}\label{classKBookmarkMenu_e2}


\begin{Desc}
\item[Returns:]list of dynamic menu ids \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 1132 of file kbookmarkmenu.cc.

References KConfig\-Base::has\-Key(), KConfig\-Base::read\-List\-Entry(), and KConfig\-Base::set\-Group().

Referenced by fill\-Bookmark\-Menu().\index{KBookmarkMenu@{KBookmark\-Menu}!openBookmark@{openBookmark}}
\index{openBookmark@{openBookmark}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBookmark\-Menu::open\-Bookmark (const {\bf QString} \& {\em url}, Qt::Button\-State {\em state})\hspace{0.3cm}{\tt  [signal]}}\label{classKBookmarkMenu_l1}


\begin{Desc}
\item[Since:]3.4 \end{Desc}




Referenced by fill\-Bookmark\-Menu(), and slot\-Bookmark\-Selected().\index{KBookmarkMenu@{KBookmark\-Menu}!slotBookmarkSelected@{slotBookmarkSelected}}
\index{slotBookmarkSelected@{slotBookmarkSelected}!KBookmarkMenu@{KBookmark\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBookmark\-Menu::slot\-Bookmark\-Selected ({\bf KAction::Activation\-Reason} {\em reason}, Qt::Button\-State {\em state})\hspace{0.3cm}{\tt  [protected, slot]}}\label{classKBookmarkMenu_j9}


@ since 3.4 



Definition at line 746 of file kbookmarkmenu.cc.

References endl(), kd\-Debug(), open\-Bookmark(), KBookmark\-Owner::open\-Bookmark\-URL(), and QObject::sender().

Referenced by fill\-Bookmark\-Menu().\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_j13}


load Netscape's bookmarks 



Definition at line 769 of file kbookmarkmenu.cc.

References QObject::disconnect(), and KBookmark\-Menu\-NSImporter::open\-Bookmarks().

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_p7}


The menu in which we plug our actions. 

Supplied in the constructor. 

Definition at line 217 of file kbookmarkmenu.h.

Referenced by KBookmark\-Menu().\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_p8}


List of our sub menus. 



Definition at line 221 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_p10}


List of our actions. 



Definition at line 226 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_p11}


Parent bookmark for this menu. 



Definition at line 230 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}
