KURLBarItem Class Reference
An item to be used in KURLBar / KURLBarListBox. More...
#include <kurlbar.h>
Inheritance diagram for KURLBarItem:

Public Member Functions | |
KURLBarItem (KURLBar *parent, const KURL &url, bool persistent, const QString &description=QString::null, const QString &icon=QString::null, KIcon::Group group=KIcon::Panel) | |
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 |
bool | isPersistent () const |
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.
- Author:
- Carsten Pfeiffer <pfeiffer@kde.org>
- See also:
- KURLBar
Definition at line 42 of file kurlbar.h.
Constructor & Destructor Documentation
|
Creates a KURLBarItem to be used in the 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
Definition at line 88 of file kurlbar.cpp. |
|
Creates a persistent KURLBarItem to be used in the 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 Definition at line 100 of file kurlbar.cpp. |
|
Destroys the item.
Definition at line 123 of file kurlbar.cpp. |
Member Function Documentation
|
Sets Also updates the visible text to the filename/directory of the url, if no description is set.
Definition at line 128 of file kurlbar.cpp. References KURL::fileName(). |
|
See KIconLoader for a description of the icon groups.
Definition at line 135 of file kurlbar.cpp. References KIcon::DefaultState, KGlobal::iconLoader(), and KMimeType::pixmapForURL(). |
|
Sets the description of this item that will be shown as item-text.
Definition at line 147 of file kurlbar.cpp. References KURL::fileName(). |
|
Sets a tooltip to be used for this item.
Definition at line 164 of file kurlbar.cpp. |
|
returns the preferred size of this item
Definition at line 269 of file kurlbar.cpp. References KURLBar::iconSize(), KURLBarListBox::isVertical(), pixmap(), KIcon::SizeMedium, and KDialog::spacingHint(). Referenced by height(), KURLBar::sizeHint(), and width(). |
|
returns the width of this item.
Definition at line 292 of file kurlbar.cpp. References sizeHint(). |
|
returns the height of this item.
Definition at line 300 of file kurlbar.cpp. References sizeHint(). |
|
returns the url of this item.
Definition at line 127 of file kurlbar.h. Referenced by KURLBar::currentURL(), KURLBarListBox::dragObject(), KURLBar::setCurrentItem(), and KURLBar::slotContextMenuRequested(). |
|
returns the description of this item.
|
|
returns the icon of this item.
|
|
returns the tooltip of this item.
Definition at line 169 of file kurlbar.cpp. References KURL::prettyURL(). |
|
returns the icon-group of this item (determines icon-effects).
|
|
returns the pixmap of this item.
Definition at line 151 of file kurlbar.h. Referenced by sizeHint(). |
|
Makes this item a local or global one. This has only an effect on persistent items of course.
Definition at line 153 of file kurlbar.cpp. References endl(), isPersistent(), and kdWarning(). Referenced by KURLBar::insertItem(). |
|
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.
|
|
returns whether this item is persistent (via KURLBar::writeConfig() and KURLBar::readConfig()) or not.
Definition at line 308 of file kurlbar.cpp. Referenced by setApplicationLocal(), and KURLBar::slotContextMenuRequested(). |
The documentation for this class was generated from the following files: