.TH "KURLBarItem" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KURLBarItem \- An item to be used in \fBKURLBar\fP / \fBKURLBarListBox\fP.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kurlbar.h>\fP
.PP
Inherits \fBQListBoxPixmap\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKURLBarItem\fP (\fBKURLBar\fP *parent, const  \fBKURL\fP &url, const  \fBQString\fP &description=QString::null, const  \fBQString\fP &icon=QString::null, \fBKIcon::Group\fP group=KIcon::Panel)"
.br
.RI "\fICreates a KURLBarItem to be used in the \fCparent\fP \fBKURLBar\fP. \fP"
.ti -1c
.RI "\fB~KURLBarItem\fP ()"
.br
.RI "\fIDestroys the item. \fP"
.ti -1c
.RI "void \fBsetURL\fP (const  \fBKURL\fP &url)"
.br
.RI "\fISets \fCurl\fP for this item. \fP"
.ti -1c
.RI "void \fBsetIcon\fP (const  \fBQString\fP &icon, \fBKIcon::Group\fP group=KIcon::Panel)"
.br
.RI "\fI\fCsets\fP the icon for this item. \fP"
.ti -1c
.RI "void \fBsetDescription\fP (const  \fBQString\fP &desc)"
.br
.RI "\fISets the description of this item that will be shown as item-text. \fP"
.ti -1c
.RI "void \fBsetToolTip\fP (const  \fBQString\fP &tip)"
.br
.RI "\fISets a tooltip to be used for this item. \fP"
.ti -1c
.RI "\fBQSize\fP \fBsizeHint\fP () const "
.br
.RI "\fIreturns the preferred size of this item 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
\fP"
.ti -1c
.RI "virtual int \fBwidth\fP (const  \fBQListBox\fP *) const "
.br
.RI "\fIreturns the width of this item. \fP"
.ti -1c
.RI "virtual int \fBheight\fP (const  \fBQListBox\fP *) const "
.br
.RI "\fIreturns the height of this item. \fP"
.ti -1c
.RI "const  \fBKURL\fP & \fBurl\fP () const "
.br
.RI "\fIreturns the url of this item. \fP"
.ti -1c
.RI "const  \fBQString\fP & \fBdescription\fP () const "
.br
.RI "\fIreturns the description of this item. \fP"
.ti -1c
.RI "const  \fBQString\fP & \fBicon\fP () const "
.br
.RI "\fIreturns the icon of this item. \fP"
.ti -1c
.RI "\fBQString\fP \fBtoolTip\fP () const "
.br
.RI "\fIreturns the tooltip of this item. \fP"
.ti -1c
.RI "\fBKIcon::Group\fP \fBiconGroup\fP () const "
.br
.RI "\fIreturns the icon-group of this item (determines icon-effects). \fP"
.ti -1c
.RI "virtual const  \fBQPixmap\fP * \fBpixmap\fP () const "
.br
.RI "\fIreturns the pixmap of this item. \fP"
.ti -1c
.RI "void \fBsetApplicationLocal\fP (bool local)"
.br
.RI "\fIMakes this item a local or global one. \fP"
.ti -1c
.RI "bool \fBapplicationLocal\fP () const "
.br
.RI "\fIreturns whether this is a global item or a local one. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBpaint\fP (\fBQPainter\fP *p)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
An item to be used in \fBKURLBar\fP / \fBKURLBarListBox\fP. 

All the properties (url, icon, descroption, tooltip) can be changed dynamically.
.PP
\fBAuthor:\fP
.RS 4
Carsten Pfeiffer <pfeiffer@kde.org> 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKURLBar\fP 
.PP
\fBKURLBarListBox\fP 
.RE
.PP

.PP
Definition at line 42 of file kurlbar.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KURLBarItem::KURLBarItem (\fBKURLBar\fP * parent, const \fBKURL\fP & url, const \fBQString\fP & description = QString::null, const \fBQString\fP & icon = QString::null, \fBKIcon::Group\fP group = KIcon::Panel)"
.PP
Creates a KURLBarItem to be used in the \fCparent\fP \fBKURLBar\fP. You need to insert the item into the listbox manually, if you don't use \fBKURLBar::insertItem()\fP.
.PP
If description is empty, it will try to use the filename/directory of \fCurl\fP, which will be shown as text of the item. \fCurl\fP will be used as tooltip, unless you set a different tip with \fBsetToolTip\fP() Definition at line 74 of file kurlbar.cpp.
.PP
References KStdAccel::description(), setDescription(), and setIcon().
.SS "KURLBarItem::~\fBKURLBarItem\fP ()"
.PP
Destroys the item. Definition at line 88 of file kurlbar.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KURLBarItem::setURL (const \fBKURL\fP & url)"
.PP
Sets \fCurl\fP for this item. Also updates the visible text to the filename/directory of the url, if no description is set. 
.PP
\fBSee also:\fP
.RS 4
\fBurl\fP 
.RE
.PP
Definition at line 92 of file kurlbar.cpp.
.PP
References QString::isEmpty().
.PP
Referenced by KURLBar::editItem().
.SS "void KURLBarItem::setIcon (const \fBQString\fP & icon, \fBKIcon::Group\fP group = KIcon::Panel)"
.PP
\fCsets\fP the icon for this item. See \fBKIconLoader\fP for a description of the icon groups. 
.PP
\fBSee also:\fP
.RS 4
\fBicon\fP 
.RE
.PP
Definition at line 99 of file kurlbar.cpp.
.PP
References KIcon::DefaultState, KGlobal::iconLoader(), KIconLoader::loadIcon(), and KMimeType::pixmapForURL().
.PP
Referenced by KURLBar::editItem(), KURLBarItem(), and KURLBar::setIconSize().
.SS "void KURLBarItem::setDescription (const \fBQString\fP & desc)"
.PP
Sets the description of this item that will be shown as item-text. \fBSee also:\fP
.RS 4
\fBdescription\fP 
.RE
.PP
Definition at line 111 of file kurlbar.cpp.
.PP
References KURL::fileName().
.PP
Referenced by KURLBar::editItem(), and KURLBarItem().
.SS "void KURLBarItem::setToolTip (const \fBQString\fP & tip)"
.PP
Sets a tooltip to be used for this item. \fBSee also:\fP
.RS 4
#tooolTip 
.RE
.PP
Definition at line 117 of file kurlbar.cpp.
.SS "\fBQSize\fP KURLBarItem::sizeHint () const"
.PP
returns the preferred size of this item 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 185 of file kurlbar.cpp.
.PP
References QPixmap::height(), QListBoxPixmap::height(), KURLBar::iconSize(), KURLBarListBox::isVertical(), pixmap(), KIcon::SizeMedium, QPixmap::width(), and QListBoxPixmap::width().
.PP
Referenced by height(), KURLBar::sizeHint(), and width().
.SS "int KURLBarItem::width (const \fBQListBox\fP *) const\fC [virtual]\fP"
.PP
returns the width of this item. Reimplemented from \fBQListBoxPixmap\fP.
.PP
Definition at line 208 of file kurlbar.cpp.
.PP
References sizeHint(), and QSize::width().
.SS "int KURLBarItem::height (const \fBQListBox\fP *) const\fC [virtual]\fP"
.PP
returns the height of this item. Reimplemented from \fBQListBoxPixmap\fP.
.PP
Definition at line 216 of file kurlbar.cpp.
.PP
References QSize::height(), and sizeHint().
.SS "const \fBKURL\fP& KURLBarItem::url () const\fC [inline]\fP"
.PP
returns the url of this item. \fBSee also:\fP
.RS 4
\fBsetURL\fP 
.RE
.PP
Definition at line 106 of file kurlbar.h.
.PP
Referenced by KURLBar::currentURL(), KURLBarListBox::dragObject(), KURLBar::editItem(), KURLBar::setCurrentItem(), KURLBar::slotContextMenuRequested(), KURLBar::slotSelected(), KFileDialog::toggleSpeedbar(), and KURLBar::writeItem().
.SS "const \fBQString\fP& KURLBarItem::description () const\fC [inline]\fP"
.PP
returns the description of this item. \fBSee also:\fP
.RS 4
\fBsetDescription\fP 
.RE
.PP
Definition at line 111 of file kurlbar.h.
.PP
Referenced by KURLBar::editItem(), and KURLBar::writeItem().
.SS "const \fBQString\fP& KURLBarItem::icon () const\fC [inline]\fP"
.PP
returns the icon of this item. \fBSee also:\fP
.RS 4
\fBsetIcon\fP 
.RE
.PP
Definition at line 116 of file kurlbar.h.
.PP
Referenced by KURLBar::editItem(), KURLBar::setIconSize(), and KURLBar::writeItem().
.SS "\fBQString\fP KURLBarItem::toolTip () const"
.PP
returns the tooltip of this item. \fBSee also:\fP
.RS 4
\fBsetToolTip\fP 
.RE
.PP
Definition at line 122 of file kurlbar.cpp.
.PP
References QString::isEmpty(), and KURL::prettyURL().
.SS "\fBKIcon::Group\fP KURLBarItem::iconGroup () const\fC [inline]\fP"
.PP
returns the icon-group of this item (determines icon-effects). \fBSee also:\fP
.RS 4
\fBsetIcon\fP 
.RE
.PP
Definition at line 126 of file kurlbar.h.
.PP
References KIcon::Group.
.PP
Referenced by KURLBar::setIconSize(), and KURLBar::writeItem().
.SS "virtual const \fBQPixmap\fP* KURLBarItem::pixmap () const\fC [inline, virtual]\fP"
.PP
returns the pixmap of this item. Reimplemented from \fBQListBoxPixmap\fP.
.PP
Definition at line 130 of file kurlbar.h.
.PP
Referenced by sizeHint().
.SS "void KURLBarItem::setApplicationLocal (bool local)\fC [inline]\fP"
.PP
Makes this item a local or global one. \fBSee also:\fP
.RS 4
\fBapplicationLocal\fP 
.RE
.PP
Definition at line 136 of file kurlbar.h.
.PP
Referenced by KURLBar::editItem(), and KURLBar::insertItem().
.SS "bool KURLBarItem::applicationLocal () const\fC [inline]\fP"
.PP
returns whether this is a global item or a local one. \fBKURLBar\fP can differentiate between global and local items (only for the current application) for easy extensiblity. 
.PP
\fBSee also:\fP
.RS 4
\fBsetApplicationLocal\fP 
.RE
.PP
Definition at line 143 of file kurlbar.h.
.PP
Referenced by KURLBar::editItem(), and KURLBar::writeConfig().

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