\section{KURLBar\-Item Class Reference}
\label{classKURLBarItem}\index{KURLBarItem@{KURLBarItem}}
An item to be used in {\bf KURLBar}{\rm (p.\,\pageref{classKURLBar})} / {\bf KURLBar\-List\-Box}{\rm (p.\,\pageref{classKURLBarListBox})}.  


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

Inheritance diagram for KURLBar\-Item:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=63pt]{classKURLBarItem__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KURLBar\-Item:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=268pt]{classKURLBarItem__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KURLBar\-Item} ({\bf KURLBar} $\ast$parent, const {\bf KURL} \&url, bool persistent, const {\bf QString} \&description=QString::null, const {\bf QString} \&icon=QString::null, {\bf KIcon::Group} group={\bf KIcon::Panel})
\item 
{\bf KURLBar\-Item} ({\bf KURLBar} $\ast$parent, const {\bf KURL} \&url, const {\bf QString} \&description=QString::null, const {\bf QString} \&icon=QString::null, {\bf KIcon::Group} group={\bf KIcon::Panel})
\item 
{\bf $\sim$KURLBar\-Item} ()
\item 
void {\bf set\-URL} (const {\bf KURL} \&url)
\item 
void {\bf set\-Icon} (const {\bf QString} \&icon, {\bf KIcon::Group} group={\bf KIcon::Panel})
\item 
void {\bf set\-Description} (const {\bf QString} \&desc)
\item 
void {\bf set\-Tool\-Tip} (const {\bf QString} \&tip)
\item 
{\bf QSize} {\bf size\-Hint} () const 
\item 
virtual int {\bf width} (const {\bf QList\-Box} $\ast$) const 
\item 
virtual int {\bf height} (const {\bf QList\-Box} $\ast$) const 
\item 
const {\bf KURL} \& {\bf url} () const 
\item 
const {\bf QString} \& {\bf description} () const 
\item 
const {\bf QString} \& {\bf icon} () const 
\item 
{\bf QString} {\bf tool\-Tip} () const 
\item 
{\bf KIcon::Group} {\bf icon\-Group} () const 
\item 
virtual const {\bf QPixmap} $\ast$ {\bf pixmap} () const 
\item 
void {\bf set\-Application\-Local} (bool local)
\item 
bool {\bf application\-Local} () const 
\item 
bool {\bf is\-Persistent} () const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf paint} ({\bf QPainter} $\ast$p)\label{classKURLBarItem_b0}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKURLBarItem_b1}

\end{CompactItemize}


\subsection{Detailed Description}
An item to be used in {\bf KURLBar}{\rm (p.\,\pageref{classKURLBar})} / {\bf KURLBar\-List\-Box}{\rm (p.\,\pageref{classKURLBarListBox})}. 

All the properties (url, icon, description, tooltip) can be changed dynamically.

\begin{Desc}
\item[Author:]Carsten Pfeiffer $<${\tt pfeiffer@kde.org}$>$ \end{Desc}
\begin{Desc}
\item[See also:]{\bf KURLBar}{\rm (p.\,\pageref{classKURLBar})} 

{\bf KURLBar\-List\-Box}{\rm (p.\,\pageref{classKURLBarListBox})} \end{Desc}




Definition at line 42 of file kurlbar.h.

\subsection{Constructor \& Destructor Documentation}
\index{KURLBarItem@{KURLBar\-Item}!KURLBarItem@{KURLBarItem}}
\index{KURLBarItem@{KURLBarItem}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KURLBar\-Item::KURLBar\-Item ({\bf KURLBar} $\ast$ {\em parent}, const {\bf KURL} \& {\em url}, bool {\em persistent}, const {\bf QString} \& {\em description} = {\tt QString::null}, const {\bf QString} \& {\em icon} = {\tt QString::null}, {\bf KIcon::Group} {\em group} = {\tt {\bf KIcon::Panel}})}\label{classKURLBarItem_a0}


Creates a KURLBar\-Item to be used in the {\tt parent} {\bf KURLBar}{\rm (p.\,\pageref{classKURLBar})}. 

You need to insert the item into the listbox manually, if you don't use {\bf KURLBar::insert\-Item()}{\rm (p.\,\pageref{classKURLBar_a2})}.

If description is empty, it will try to use the filename/directory of {\tt url}, which will be shown as text of the item. {\tt url} will be used as tooltip, unless you set a different tip with {\bf set\-Tool\-Tip()}{\rm (p.\,\pageref{classKURLBarItem_a6})}. {\tt persistent} specifies whether this item is a persistent item or a dynamic item, that is not saved with {\bf KURLBar::write\-Config()}{\rm (p.\,\pageref{classKURLBar_a14})}. \begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 88 of file kurlbar.cpp.

References description(), icon(), and url().\index{KURLBarItem@{KURLBar\-Item}!KURLBarItem@{KURLBarItem}}
\index{KURLBarItem@{KURLBarItem}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KURLBar\-Item::KURLBar\-Item ({\bf KURLBar} $\ast$ {\em parent}, const {\bf KURL} \& {\em url}, const {\bf QString} \& {\em description} = {\tt QString::null}, const {\bf QString} \& {\em icon} = {\tt QString::null}, {\bf KIcon::Group} {\em group} = {\tt {\bf KIcon::Panel}})}\label{classKURLBarItem_a1}


Creates a persistent KURLBar\-Item to be used in the {\tt parent} {\bf KURLBar}{\rm (p.\,\pageref{classKURLBar})}. 

You need to insert the item into the listbox manually, if you don't use {\bf KURLBar::insert\-Item()}{\rm (p.\,\pageref{classKURLBar_a2})}.

If description is empty, it will try to use the filename/directory of {\tt url}, which will be shown as text of the item. {\tt url} will be used as tooltip, unless you set a different tip with {\bf set\-Tool\-Tip()}{\rm (p.\,\pageref{classKURLBarItem_a6})}. {\tt persistent} specifies whether this item is a persistent item or a dynamic item, that is not saved with {\bf KURLBar::write\-Config()}{\rm (p.\,\pageref{classKURLBar_a14})}. 

Definition at line 100 of file kurlbar.cpp.

References description(), and icon().\index{KURLBarItem@{KURLBar\-Item}!~KURLBarItem@{$\sim$KURLBarItem}}
\index{~KURLBarItem@{$\sim$KURLBarItem}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KURLBar\-Item::$\sim${\bf KURLBar\-Item} ()}\label{classKURLBarItem_a2}


Destroys the item. 



Definition at line 123 of file kurlbar.cpp.

\subsection{Member Function Documentation}
\index{KURLBarItem@{KURLBar\-Item}!setURL@{setURL}}
\index{setURL@{setURL}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KURLBar\-Item::set\-URL (const {\bf KURL} \& {\em url})}\label{classKURLBarItem_a3}


Sets {\tt url} for this item. 

Also updates the visible text to the filename/directory of the url, if no description is set. \begin{Desc}
\item[See also:]{\bf url}{\rm (p.\,\pageref{classKURLBarItem_a10})} \end{Desc}


Definition at line 128 of file kurlbar.cpp.

References KURL::file\-Name(), QString::is\-Empty(), and url().\index{KURLBarItem@{KURLBar\-Item}!setIcon@{setIcon}}
\index{setIcon@{setIcon}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KURLBar\-Item::set\-Icon (const {\bf QString} \& {\em icon}, {\bf KIcon::Group} {\em group} = {\tt {\bf KIcon::Panel}})}\label{classKURLBarItem_a4}


{\tt sets} the icon for this item. 

See {\bf KIcon\-Loader} for a description of the icon groups. \begin{Desc}
\item[See also:]{\bf icon}{\rm (p.\,\pageref{classKURLBarItem_a12})} \end{Desc}


Definition at line 135 of file kurlbar.cpp.

References icon(), KGlobal::icon\-Loader(), QString::is\-Empty(), KIcon\-Loader::load\-Icon(), and KMime\-Type::pixmap\-For\-URL().

Referenced by KURLBar::set\-Icon\-Size().\index{KURLBarItem@{KURLBar\-Item}!setDescription@{setDescription}}
\index{setDescription@{setDescription}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KURLBar\-Item::set\-Description (const {\bf QString} \& {\em desc})}\label{classKURLBarItem_a5}


Sets the description of this item that will be shown as item-text. 

\begin{Desc}
\item[See also:]{\bf description}{\rm (p.\,\pageref{classKURLBarItem_a11})} \end{Desc}


Definition at line 147 of file kurlbar.cpp.

References KURL::file\-Name().\index{KURLBarItem@{KURLBar\-Item}!setToolTip@{setToolTip}}
\index{setToolTip@{setToolTip}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KURLBar\-Item::set\-Tool\-Tip (const {\bf QString} \& {\em tip})}\label{classKURLBarItem_a6}


Sets a tooltip to be used for this item. 

\begin{Desc}
\item[See also:]{\bf tool\-Tip}{\rm (p.\,\pageref{classKURLBarItem_a13})} \end{Desc}


Definition at line 164 of file kurlbar.cpp.\index{KURLBarItem@{KURLBar\-Item}!sizeHint@{sizeHint}}
\index{sizeHint@{sizeHint}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSize} KURLBar\-Item::size\-Hint () const}\label{classKURLBarItem_a7}


returns the preferred size of this item \begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 269 of file kurlbar.cpp.

References QPixmap::height(), QList\-Box\-Pixmap::height(), KURLBar::icon\-Size(), KURLBar\-List\-Box::is\-Vertical(), pixmap(), KDialog::spacing\-Hint(), QPixmap::width(), and QList\-Box\-Pixmap::width().

Referenced by height(), KURLBar::size\-Hint(), and width().\index{KURLBarItem@{KURLBar\-Item}!width@{width}}
\index{width@{width}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KURLBar\-Item::width (const {\bf QList\-Box} $\ast$) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKURLBarItem_a8}


returns the width of this item. 



Reimplemented from {\bf QList\-Box\-Pixmap}.

Definition at line 292 of file kurlbar.cpp.

References size\-Hint(), and QSize::width().\index{KURLBarItem@{KURLBar\-Item}!height@{height}}
\index{height@{height}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KURLBar\-Item::height (const {\bf QList\-Box} $\ast$) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKURLBarItem_a9}


returns the height of this item. 



Reimplemented from {\bf QList\-Box\-Pixmap}.

Definition at line 300 of file kurlbar.cpp.

References QSize::height(), and size\-Hint().\index{KURLBarItem@{KURLBar\-Item}!url@{url}}
\index{url@{url}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KURL}\& KURLBar\-Item::url () const\hspace{0.3cm}{\tt  [inline]}}\label{classKURLBarItem_a10}


returns the url of this item. 

\begin{Desc}
\item[See also:]{\bf set\-URL}{\rm (p.\,\pageref{classKURLBarItem_a3})} \end{Desc}


Definition at line 127 of file kurlbar.h.

Referenced by KURLBar::current\-URL(), KURLBar\-List\-Box::drag\-Object(), KURLBar::edit\-Item(), KURLBar\-Item(), KURLBar::set\-Current\-Item(), set\-URL(), KURLBar::slot\-Context\-Menu\-Requested(), KURLBar::slot\-Selected(), and KFile\-Dialog::toggle\-Speedbar().\index{KURLBarItem@{KURLBar\-Item}!description@{description}}
\index{description@{description}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QString}\& KURLBar\-Item::description () const\hspace{0.3cm}{\tt  [inline]}}\label{classKURLBarItem_a11}


returns the description of this item. 

\begin{Desc}
\item[See also:]{\bf set\-Description}{\rm (p.\,\pageref{classKURLBarItem_a5})} \end{Desc}


Definition at line 132 of file kurlbar.h.

Referenced by KURLBar\-Item().\index{KURLBarItem@{KURLBar\-Item}!icon@{icon}}
\index{icon@{icon}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QString}\& KURLBar\-Item::icon () const\hspace{0.3cm}{\tt  [inline]}}\label{classKURLBarItem_a12}


returns the icon of this item. 

\begin{Desc}
\item[See also:]{\bf set\-Icon}{\rm (p.\,\pageref{classKURLBarItem_a4})} \end{Desc}


Definition at line 137 of file kurlbar.h.

Referenced by KURLBar\-Item(), set\-Icon(), and KURLBar::set\-Icon\-Size().\index{KURLBarItem@{KURLBar\-Item}!toolTip@{toolTip}}
\index{toolTip@{toolTip}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KURLBar\-Item::tool\-Tip () const}\label{classKURLBarItem_a13}


returns the tooltip of this item. 

\begin{Desc}
\item[See also:]{\bf set\-Tool\-Tip}{\rm (p.\,\pageref{classKURLBarItem_a6})} \end{Desc}


Definition at line 169 of file kurlbar.cpp.

References QString::is\-Empty(), and KURL::pretty\-URL().\index{KURLBarItem@{KURLBar\-Item}!iconGroup@{iconGroup}}
\index{iconGroup@{iconGroup}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIcon::Group} KURLBar\-Item::icon\-Group () const\hspace{0.3cm}{\tt  [inline]}}\label{classKURLBarItem_a14}


returns the icon-group of this item (determines icon-effects). 

\begin{Desc}
\item[See also:]{\bf set\-Icon}{\rm (p.\,\pageref{classKURLBarItem_a4})} \end{Desc}


Definition at line 147 of file kurlbar.h.

Referenced by KURLBar::set\-Icon\-Size().\index{KURLBarItem@{KURLBar\-Item}!pixmap@{pixmap}}
\index{pixmap@{pixmap}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual const {\bf QPixmap}$\ast$ KURLBar\-Item::pixmap () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKURLBarItem_a15}


returns the pixmap of this item. 



Reimplemented from {\bf QList\-Box\-Pixmap}.

Definition at line 151 of file kurlbar.h.

Referenced by size\-Hint().\index{KURLBarItem@{KURLBar\-Item}!setApplicationLocal@{setApplicationLocal}}
\index{setApplicationLocal@{setApplicationLocal}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KURLBar\-Item::set\-Application\-Local (bool {\em local})}\label{classKURLBarItem_a16}


Makes this item a local or global one. 

This has only an effect on persistent items of course. \begin{Desc}
\item[See also:]{\bf is\-Persistent}{\rm (p.\,\pageref{classKURLBarItem_a18})} 

{\bf application\-Local}{\rm (p.\,\pageref{classKURLBarItem_a17})} \end{Desc}


Definition at line 153 of file kurlbar.cpp.

References endl(), is\-Persistent(), and kd\-Warning().

Referenced by KURLBar::insert\-Item().\index{KURLBarItem@{KURLBar\-Item}!applicationLocal@{applicationLocal}}
\index{applicationLocal@{applicationLocal}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KURLBar\-Item::application\-Local () const\hspace{0.3cm}{\tt  [inline]}}\label{classKURLBarItem_a17}


returns whether this is a global item or a local one. 

{\bf KURLBar}{\rm (p.\,\pageref{classKURLBar})} can differentiate between global and local items (only for the current application) for easy extensiblity. \begin{Desc}
\item[See also:]{\bf set\-Application\-Local}{\rm (p.\,\pageref{classKURLBarItem_a16})} \end{Desc}


Definition at line 167 of file kurlbar.h.

Referenced by KURLBar::write\-Config().\index{KURLBarItem@{KURLBar\-Item}!isPersistent@{isPersistent}}
\index{isPersistent@{isPersistent}!KURLBarItem@{KURLBar\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KURLBar\-Item::is\-Persistent () const}\label{classKURLBarItem_a18}


returns whether this item is persistent (via {\bf KURLBar::write\-Config()}{\rm (p.\,\pageref{classKURLBar_a14})} and {\bf KURLBar::read\-Config()}{\rm (p.\,\pageref{classKURLBar_a13})}) or not. 

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


Definition at line 308 of file kurlbar.cpp.

Referenced by set\-Application\-Local(), KURLBar::slot\-Context\-Menu\-Requested(), and KURLBar::write\-Config().

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