#include <kurlbar.h>
Inherits TQListBoxPixmap.
Public Member Functions | |
KURLBarItem (KURLBar *parent, const KURL &url, bool persistent, const TQString &description=TQString::null, const TQString &icon=TQString::null, TDEIcon::Group group=TDEIcon::Panel) | |
KURLBarItem (KURLBar *parent, const KURL &url, const TQString &description=TQString::null, const TQString &icon=TQString::null, TDEIcon::Group group=TDEIcon::Panel) | |
~KURLBarItem () | |
void | setURL (const KURL &url) |
void | setIcon (const TQString &icon, TDEIcon::Group group=TDEIcon::Panel) |
void | setDescription (const TQString &desc) |
void | setToolTip (const TQString &tip) |
TQSize | sizeHint () const |
virtual int | width (const TQListBox *) const |
virtual int | height (const TQListBox *) const |
const KURL & | url () const |
const TQString & | description () const |
const TQString & | icon () const |
TQString | toolTip () const |
TDEIcon::Group | iconGroup () const |
virtual const TQPixmap * | pixmap () const |
void | setApplicationLocal (bool local) |
bool | applicationLocal () const |
bool | isPersistent () const |
Protected Member Functions | |
virtual void | paint (TQPainter *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
- KURLBarListBox
Constructor & Destructor Documentation
◆ KURLBarItem() [1/2]
KURLBarItem::KURLBarItem | ( | KURLBar * | parent, |
const KURL & | url, | ||
bool | persistent, | ||
const TQString & | description = TQString::null , |
||
const TQString & | icon = TQString::null , |
||
TDEIcon::Group | group = TDEIcon::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 90 of file kurlbar.cpp.
◆ KURLBarItem() [2/2]
KURLBarItem::KURLBarItem | ( | KURLBar * | parent, |
const KURL & | url, | ||
const TQString & | description = TQString::null , |
||
const TQString & | icon = TQString::null , |
||
TDEIcon::Group | group = TDEIcon::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 102 of file kurlbar.cpp.
◆ ~KURLBarItem()
KURLBarItem::~KURLBarItem | ( | ) |
Destroys the item.
Definition at line 125 of file kurlbar.cpp.
Member Function Documentation
◆ applicationLocal()
|
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
◆ description()
|
inline |
returns the description of this item.
- See also
- setDescription
◆ height()
|
virtual |
returns the height of this item.
Definition at line 304 of file kurlbar.cpp.
◆ icon()
|
inline |
◆ iconGroup()
|
inline |
◆ isPersistent()
bool KURLBarItem::isPersistent | ( | ) | const |
returns whether this item is persistent (via KURLBar::writeConfig() and KURLBar::readConfig()) or not.
- Since
- 3.2
Definition at line 312 of file kurlbar.cpp.
◆ pixmap()
|
inlinevirtual |
◆ setApplicationLocal()
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
- applicationLocal
Definition at line 155 of file kurlbar.cpp.
◆ setDescription()
void KURLBarItem::setDescription | ( | const TQString & | desc | ) |
Sets the description of this item that will be shown as item-text.
- See also
- description
Definition at line 149 of file kurlbar.cpp.
◆ setIcon()
void KURLBarItem::setIcon | ( | const TQString & | icon, |
TDEIcon::Group | group = TDEIcon::Panel |
||
) |
sets
the icon for this item.
See TDEIconLoader for a description of the icon groups.
- See also
- icon
Definition at line 137 of file kurlbar.cpp.
◆ setToolTip()
void KURLBarItem::setToolTip | ( | const TQString & | tip | ) |
Sets a tooltip to be used for this item.
- See also
- toolTip
Definition at line 166 of file kurlbar.cpp.
◆ setURL()
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 130 of file kurlbar.cpp.
◆ sizeHint()
TQSize KURLBarItem::sizeHint | ( | ) | const |
◆ toolTip()
TQString KURLBarItem::toolTip | ( | ) | const |
◆ url()
|
inline |
◆ width()
|
virtual |
returns the width of this item.
Definition at line 296 of file kurlbar.cpp.
The documentation for this class was generated from the following files: