class KURLBarItem

# class KURLBarItem | An item to be used in KURLBar / KURLBarListBox. More...
Definition | `#include <kurlbar.h>`
Inherits | QListBoxPixmap (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KURLBarItem ( KURLBar *parent, const KURL& url, const QString& description = QString::null, const QString& icon = QString::null, KIcon::Group group = KIcon::Panel )
- ~KURLBarItem ()
- void setURL ( const KURL& url )
- void setIcon ( const QString& icon, KIcon::Group group = KIcon::Panel )
- void setDescription ( const QString& desc )
- void setToolTip ( const QString& tip )
- QSize sizeHint () const
- virtual int width ( const QListBox * ) const
- virtual int height ( const QListBox * ) const
- const KURL& url () const
- const QString& description () const
- const QString& icon () const
- QString toolTip () const
- KIcon::Group iconGroup () const
- virtual const QPixmap * pixmap () const
- void setApplicationLocal ( bool local )
- bool applicationLocal () const

#### Protected Methods

- virtual void paint ( QPainter *p )
- virtual void virtual_hook ( int id, void* data )

## Detailed Description

An item to be used in KURLBar / KURLBarListBox. All the properties (url, icon, descroption, tooltip) can be changed dynamically.

See also: KURLBar, KURLBarListBox

KURLBarItem ( KURLBar *parent, const KURL& url, const QString& description = QString::null, const QString& icon = QString::null, KIcon::Group group = KIcon::Panel ) | ### KURLBarItem

Creates a KURLBarItem to be used in the `parent` KURLBar. You need to insert the item into the listbox manually, if you don't use KURLBar::insertItem().

If description is empty, it will try to use the filename/directory of `url`, which will be shown as text of the item. `url` will be used as tooltip, unless you set a different tip with setToolTip()

~KURLBarItem () | ### ~KURLBarItem

Destroys the item

void setURL ( const KURL& url ) | ### setURL

Sets `url` for this item. Also updates the visible text to the filename/directory of the url, if no description is set.

See also: url

void setIcon ( const QString& icon, KIcon::Group group = KIcon::Panel ) | ### setIcon

`sets` the icon for this item. See KIconLoader for a description of the icon groups.

See also: icon

void setDescription ( const QString& desc ) | ### setDescription

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

See also: description

void setToolTip ( const QString& tip ) | ### setToolTip

Sets a tooltip to be used for this item.

See also: tooolTip

QSize sizeHint () | ### sizeHint

[const]

returns the preferred size of this item

int width ( const QListBox * ) | ### width

[const virtual]

returns the width of this item.

int height ( const QListBox * ) | ### height

[const virtual]

returns the height of this item.

const KURL& url () | ### url

[const]

returns the url of this item.

See also: setURL

const QString& description () | ### description

[const]

returns the description of this item.

See also: setDescription

const QString& icon () | ### icon

[const]

returns the icon of this item.

See also: setIcon

QString toolTip () | ### toolTip

[const]

returns the tooltip of this item.

See also: setToolTip

KIcon::Group iconGroup () | ### iconGroup

[const]

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

See also: setIcon

const QPixmap * pixmap () | ### pixmap

[const virtual]

returns the pixmap of this item.

void setApplicationLocal ( bool local ) | ### setApplicationLocal

Makes this item a local or global one.

See also: applicationLocal

bool applicationLocal () | ### applicationLocal

[const]

returns whether this is a global item or a local one. KURLBar can differentiate between global and local items (only for the current application) for easy extensiblity.

See also: setApplicationLocal

void paint ( QPainter *p ) | ### paint

[protected virtual]

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

- Author: Carsten Pfeiffer
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:37:17 2003, using kdoc 2.0a54.