kio
KURLBarItem Class Reference
An item to be used in KURLBar / KURLBarListBox. More...
#include <kurlbar.h>
Public Member Functions | |
bool | applicationLocal () const |
const QString & | description () const |
virtual int | height (const QListBox *) const |
const QString & | icon () const |
KIcon::Group | iconGroup () const |
bool | isPersistent () const |
KURLBarItem (KURLBar *parent, const KURL &url, const QString &description=QString::null, const QString &icon=QString::null, KIcon::Group group=KIcon::Panel) | |
KURLBarItem (KURLBar *parent, const KURL &url, bool persistent, const QString &description=QString::null, const QString &icon=QString::null, KIcon::Group group=KIcon::Panel) | |
virtual const QPixmap * | pixmap () const |
void | setApplicationLocal (bool local) |
void | setDescription (const QString &desc) |
void | setIcon (const QString &icon, KIcon::Group group=KIcon::Panel) |
void | setToolTip (const QString &tip) |
void | setURL (const KURL &url) |
QSize | sizeHint () const |
QString | toolTip () const |
const KURL & | url () const |
virtual int | width (const QListBox *) const |
~KURLBarItem () | |
Protected Member Functions | |
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, description, tooltip) can be changed dynamically.
- See also:
- KURLBar
Definition at line 42 of file kurlbar.h.
Constructor & Destructor Documentation
KURLBarItem::KURLBarItem | ( | KURLBar * | parent, | |
const KURL & | url, | |||
bool | persistent, | |||
const QString & | description = QString::null , |
|||
const QString & | icon = QString::null , |
|||
KIcon::Group | group = KIcon::Panel | |||
) |
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(). persistent
specifies whether this item is a persistent item or a dynamic item, that is not saved with KURLBar::writeConfig().
- Since:
- 3.2
Definition at line 88 of file kurlbar.cpp.
KURLBarItem::KURLBarItem | ( | KURLBar * | parent, | |
const KURL & | url, | |||
const QString & | description = QString::null , |
|||
const QString & | icon = QString::null , |
|||
KIcon::Group | group = KIcon::Panel | |||
) |
Creates a persistent 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(). persistent
specifies whether this item is a persistent item or a dynamic item, that is not saved with KURLBar::writeConfig().
Definition at line 100 of file kurlbar.cpp.
KURLBarItem::~KURLBarItem | ( | ) |
Member Function Documentation
bool KURLBarItem::applicationLocal | ( | ) | const [inline] |
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
const QString& KURLBarItem::description | ( | ) | const [inline] |
int KURLBarItem::height | ( | const QListBox * | lb | ) | const [virtual] |
returns the height of this item.
Reimplemented from QListBoxPixmap.
Definition at line 300 of file kurlbar.cpp.
const QString& KURLBarItem::icon | ( | ) | const [inline] |
KIcon::Group KURLBarItem::iconGroup | ( | ) | const [inline] |
bool KURLBarItem::isPersistent | ( | ) | const |
returns whether this item is persistent (via KURLBar::writeConfig() and KURLBar::readConfig()) or not.
- Since:
- 3.2
Definition at line 308 of file kurlbar.cpp.
void KURLBarItem::paint | ( | QPainter * | p | ) | [protected, virtual] |
virtual const QPixmap* KURLBarItem::pixmap | ( | ) | const [inline, virtual] |
void KURLBarItem::setApplicationLocal | ( | bool | local | ) |
Makes this item a local or global one.
This has only an effect on persistent items of course.
- See also:
- isPersistent
Definition at line 153 of file kurlbar.cpp.
void KURLBarItem::setDescription | ( | const QString & | desc | ) |
Sets the description of this item that will be shown as item-text.
- See also:
- description
Definition at line 147 of file kurlbar.cpp.
void KURLBarItem::setIcon | ( | const QString & | icon, | |
KIcon::Group | group = KIcon::Panel | |||
) |
sets
the icon for this item.
See KIconLoader for a description of the icon groups.
- See also:
- icon
Definition at line 135 of file kurlbar.cpp.
void KURLBarItem::setToolTip | ( | const QString & | tip | ) |
Sets a tooltip to be used for this item.
- See also:
- toolTip
Definition at line 164 of file kurlbar.cpp.
void KURLBarItem::setURL | ( | const KURL & | url | ) |
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
Definition at line 128 of file kurlbar.cpp.
QSize KURLBarItem::sizeHint | ( | ) | const |
QString KURLBarItem::toolTip | ( | ) | const |
const KURL& KURLBarItem::url | ( | ) | const [inline] |
void KURLBarItem::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
Definition at line 1026 of file kurlbar.cpp.
int KURLBarItem::width | ( | const QListBox * | lb | ) | const [virtual] |
returns the width of this item.
Reimplemented from QListBoxPixmap.
Definition at line 292 of file kurlbar.cpp.
The documentation for this class was generated from the following files: