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, 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. | |
~KURLBarItem () | |
Destroys the item. | |
void | setURL (const KURL &url) |
Sets url for this item. | |
void | setIcon (const QString &icon, KIcon::Group group=KIcon::Panel) |
sets the icon for this item. | |
void | setDescription (const QString &desc) |
Sets the description of this item that will be shown as item-text. | |
void | setToolTip (const QString &tip) |
Sets a tooltip to be used for this item. | |
QSize | sizeHint () const |
returns the preferred size of this item
| |
virtual int | width (const QListBox *) const |
returns the width of this item. | |
virtual int | height (const QListBox *) const |
returns the height of this item. | |
const KURL & | url () const |
returns the url of this item. | |
const QString & | description () const |
returns the description of this item. | |
const QString & | icon () const |
returns the icon of this item. | |
QString | toolTip () const |
returns the tooltip of this item. | |
KIcon::Group | iconGroup () const |
returns the icon-group of this item (determines icon-effects). | |
virtual const QPixmap * | pixmap () const |
returns the pixmap of this item. | |
void | setApplicationLocal (bool local) |
Makes this item a local or global one. | |
bool | applicationLocal () const |
returns whether this is a global item or a local one. | |
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, descroption, 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 74 of file kurlbar.cpp. References KStdAccel::description(), setDescription(), and setIcon(). |
|
Destroys the item.
Definition at line 88 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 92 of file kurlbar.cpp. References QString::isEmpty(). Referenced by KURLBar::editItem(). |
|
See KIconLoader for a description of the icon groups.
Definition at line 99 of file kurlbar.cpp. References KIcon::DefaultState, KGlobal::iconLoader(), KIconLoader::loadIcon(), and KMimeType::pixmapForURL(). Referenced by KURLBar::editItem(), KURLBarItem(), and KURLBar::setIconSize(). |
|
Sets the description of this item that will be shown as item-text.
Definition at line 111 of file kurlbar.cpp. References KURL::fileName(). Referenced by KURLBar::editItem(), and KURLBarItem(). |
|
Sets a tooltip to be used for this item.
Definition at line 117 of file kurlbar.cpp. |
|
returns the preferred size of this item
Definition at line 185 of file kurlbar.cpp. References QPixmap::height(), QListBoxPixmap::height(), KURLBar::iconSize(), KURLBarListBox::isVertical(), pixmap(), KIcon::SizeMedium, QPixmap::width(), and QListBoxPixmap::width(). Referenced by height(), KURLBar::sizeHint(), and width(). |
|
returns the width of this item.
Reimplemented from QListBoxPixmap. Definition at line 208 of file kurlbar.cpp. References sizeHint(), and QSize::width(). |
|
returns the height of this item.
Reimplemented from QListBoxPixmap. Definition at line 216 of file kurlbar.cpp. References QSize::height(), and sizeHint(). |
|
returns the url of this item.
Definition at line 106 of file kurlbar.h. Referenced by KURLBar::currentURL(), KURLBarListBox::dragObject(), KURLBar::editItem(), KURLBar::setCurrentItem(), KURLBar::slotContextMenuRequested(), KURLBar::slotSelected(), KFileDialog::toggleSpeedbar(), and KURLBar::writeItem(). |
|
returns the description of this item.
Definition at line 111 of file kurlbar.h. Referenced by KURLBar::editItem(), and KURLBar::writeItem(). |
|
returns the icon of this item.
Definition at line 116 of file kurlbar.h. Referenced by KURLBar::editItem(), KURLBar::setIconSize(), and KURLBar::writeItem(). |
|
returns the tooltip of this item.
Definition at line 122 of file kurlbar.cpp. References QString::isEmpty(), and KURL::prettyURL(). |
|
returns the icon-group of this item (determines icon-effects).
Definition at line 126 of file kurlbar.h. References KIcon::Group. Referenced by KURLBar::setIconSize(), and KURLBar::writeItem(). |
|
returns the pixmap of this item.
Reimplemented from QListBoxPixmap. Definition at line 130 of file kurlbar.h. Referenced by sizeHint(). |
|
Makes this item a local or global one.
Definition at line 136 of file kurlbar.h. Referenced by KURLBar::editItem(), and 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.
Definition at line 143 of file kurlbar.h. Referenced by KURLBar::editItem(), and KURLBar::writeConfig(). |
The documentation for this class was generated from the following files: