26#include <kdialogbase.h>
27#include <kicontheme.h>
28#include <tdelistbox.h>
60 const TQString&
icon = TQString::null,
61 TDEIcon::Group group = TDEIcon::Panel );
77 const TQString&
icon = TQString::null,
78 TDEIcon::Group group = TDEIcon::Panel );
96 void setIcon(
const TQString&
icon, TDEIcon::Group group = TDEIcon::Panel );
117 virtual int width(
const TQListBox * )
const;
121 virtual int height(
const TQListBox * )
const;
127 const KURL&
url()
const {
return m_url; }
137 const TQString&
icon()
const {
return m_icon; }
142 TQString toolTip()
const;
151 virtual const TQPixmap *
pixmap()
const {
return &m_pixmap; }
159 void setApplicationLocal(
bool local );
174 bool isPersistent()
const;
177 virtual void paint( TQPainter *p );
180 int iconSize()
const;
181 void init(
const TQString& icon, TDEIcon::Group group,
182 const TQString& description,
bool persistent );
185 TQString m_description;
189 TDEIcon::Group m_group;
194 virtual void virtual_hook(
int id,
void* data );
196 class KURLBarItemPrivate;
197 KURLBarItemPrivate *d;
240 TQWidget *parent = 0,
const char *name = 0, WFlags f = 0 );
257 const TQString& description,
258 bool applicationLocal =
true,
259 const TQString& icon = TQString::null,
260 TDEIcon::Group group = TDEIcon::Panel );
272 const TQString& description,
273 const TQString& icon = TQString::null,
274 TDEIcon::Group group = TDEIcon::Panel );
305 virtual void setIconSize(
int size );
316 virtual void clear();
322 virtual TQSize sizeHint()
const;
327 virtual TQSize minimumSizeHint()
const;
334 virtual void readConfig( TDEConfig *config,
const TQString& itemGroup );
340 virtual void writeConfig( TDEConfig *config,
const TQString& itemGroup );
347 virtual void readItem(
int i, TDEConfig *config,
bool applicationLocal );
354 virtual void writeItem(
KURLBarItem *item,
int i, TDEConfig *,
bool global );
368 KURL currentURL()
const;
394 virtual void setCurrentItem(
const KURL& url );
419 virtual void resizeEvent( TQResizeEvent * );
421 virtual void paletteChange(
const TQPalette & );
471 virtual void virtual_hook(
int id,
void* data );
473 class KURLBarPrivate;
520 bool isVertical()
const {
return m_orientation == TQt::Vertical; }
534 virtual void contentsDragEnterEvent( TQDragEnterEvent * );
535 virtual void contentsDropEvent( TQDropEvent * );
536 virtual void contextMenuEvent( TQContextMenuEvent * );
537 virtual void paintEvent( TQPaintEvent* );
540 TQt::Orientation m_orientation;
541 KURLBarToolTip *m_toolTip;
544 virtual void virtual_hook(
int id,
void* data );
546 class KURLBarListBoxPrivate;
547 KURLBarListBoxPrivate *d;
581 bool& appLocal,
int iconSize,
582 TQWidget *parent = 0 );
603 bool appLocal =
true,
604 int iconSize = TDEIcon::SizeMedium,
605 TQWidget *parent = 0,
const char *name = 0 );
624 TQString
icon()
const;
652 void urlChanged(
const TQString & );
655 class KURLBarItemDialogPrivate;
656 KURLBarItemDialogPrivate *d;
bool applicationLocal() const
TDEIconButton * m_iconButton
The TDEIconButton to configure the icon.
static bool getInformation(bool allowGlobal, KURL &url, TQString &description, TQString &icon, bool &appLocal, int iconSize, TQWidget *parent=0)
A convenience method to show the dialog and retrieve all the properties via the given parameters.
KURLBarItemDialog(bool allowGlobal, const KURL &url, const TQString &description, TQString icon, bool appLocal=true, int iconSize=TDEIcon::SizeMedium, TQWidget *parent=0, const char *name=0)
Constructs a KURLBarItemDialog.
KURLRequester * m_urlEdit
The KURLRequester used for editing the url.
TQString description() const
KLineEdit * m_edit
The KLineEdit used for editing the description.
TQCheckBox * m_appLocal
The TQCheckBox to modify the local/global setting.
An item to be used in KURLBar / KURLBarListBox.
void setDescription(const TQString &desc)
Sets the description of this item that will be shown as item-text.
void setIcon(const TQString &icon, TDEIcon::Group group=TDEIcon::Panel)
sets the icon for this item.
TDEIcon::Group iconGroup() const
returns the icon-group of this item (determines icon-effects).
bool applicationLocal() const
returns whether this is a global item or a local one.
virtual const TQPixmap * pixmap() const
returns the pixmap of this item.
void setToolTip(const TQString &tip)
Sets a tooltip to be used for this item.
virtual int width(const TQListBox *) const
returns the width of this item.
void setURL(const KURL &url)
Sets url for this item.
const TQString & icon() const
returns the icon of this item.
const TQString & description() const
returns the description of this item.
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.
const KURL & url() const
returns the url of this item.
virtual int height(const TQListBox *) const
returns the height of this item.
TQSize sizeHint() const
returns the preferred size of this item
This is the listbox used in KURLBar.
void dropped(TQDropEvent *e)
Emitted when a drop-event happened.
TQt::Orientation orientation() const
virtual TQDragObject * dragObject()
KURLBarListBox(TQWidget *parent=0, const char *name=0)
Constructs a KURLBarListBox.
virtual void setOrientation(TQt::Orientation orient)
Sets the orientation of the widget.
KURLBar is a widget that displays icons together with a description.
void activated(const KURL &url)
This signal is emitted when the user activated an item, e.g., by clicking on it.
bool m_useGlobal
Whether we support global entries or just local ones.
virtual void setListBox(KURLBarListBox *)
Allows to set a custom KURLBarListBox.
virtual bool addNewItem()
Pops up a KURLBarItemDialog to let the user add a new item.
KURLBar(bool useGlobalItems, TQWidget *parent=0, const char *name=0, WFlags f=0)
Constructs a KURLBar.
virtual KURLBarItem * insertDynamicItem(const KURL &url, const TQString &description, const TQString &icon=TQString::null, TDEIcon::Group group=TDEIcon::Panel)
Inserts a new dynamic item into the KURLBar and returns the created KURLBarItem.
virtual void slotContextMenuRequested(TQListBoxItem *, const TQPoint &pos)
Reimplemented to show a contextmenu, allowing the user to add, edit or remove items,...
virtual void setOrientation(TQt::Orientation orient)
The items can be arranged either vertically in one column or horizontally in one row.
virtual bool editItem(KURLBarItem *item)
Pops up a KURLBarItemDialog to let the user edit the properties of item.
bool m_isModified
Whether the urlbar was modified by the user (e.g.
KURLBarListBox * listBox() const
KURLBarItem * m_activeItem
The currently active item.
virtual KURLBarItem * insertItem(const KURL &url, const TQString &description, bool applicationLocal=true, const TQString &icon=TQString::null, TDEIcon::Group group=TDEIcon::Panel)
Inserts a new item into the KURLBar and returns the created KURLBarItem.
Orientation orientation() const
bool m_isImmutable
Whether the urlbar may be modified by the user.
virtual void slotDropped(TQDropEvent *)
Called when a url was dropped onto the bar to show a KURLBarItemDialog.
virtual void slotSelected(TQListBoxItem *)
Called when an item has been selected.
This class is a widget showing a lineedit and a button, which invokes a filedialog.