24 #include <tqtooltip.h>
26 #include <kdialogbase.h>
27 #include <kicontheme.h>
28 #include <tdelistbox.h>
59 const TQString& description = TQString::null,
60 const TQString& icon = TQString::null,
61 TDEIcon::Group group = TDEIcon::Panel );
76 const TQString& description = TQString::null,
77 const TQString& icon = TQString::null,
78 TDEIcon::Group group = TDEIcon::Panel );
90 void setURL(
const KURL& url );
96 void setIcon(
const TQString& icon, TDEIcon::Group group = TDEIcon::Panel );
101 void setDescription(
const TQString& desc );
106 void setToolTip(
const TQString& tip );
112 TQSize sizeHint()
const;
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 );
271 virtual KURLBarItem * insertDynamicItem(
const KURL& url,
272 const TQString& description,
273 const TQString& icon = TQString::null,
274 TDEIcon::Group group = TDEIcon::Panel );
280 virtual void setOrientation( TQt::Orientation orient );
285 Orientation orientation()
const;
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;
385 bool isVertical()
const {
return orientation() == TQt::Vertical; }
394 virtual void setCurrentItem(
const KURL& url );
409 virtual bool addNewItem();
419 virtual void resizeEvent( TQResizeEvent * );
421 virtual void paletteChange(
const TQPalette & );
449 virtual void slotContextMenuRequested( TQListBoxItem *,
const TQPoint& pos );
454 virtual void slotSelected( TQListBoxItem * );
460 virtual void slotDropped( TQDropEvent * );
463 void slotSelected(
int button, TQListBoxItem * );
471 virtual void virtual_hook(
int id,
void* data );
473 class KURLBarPrivate;
483 class KURLBarToolTip;
513 virtual void setOrientation( TQt::Orientation orient );
520 bool isVertical()
const {
return m_orientation == TQt::Vertical; }
532 virtual TQDragObject * dragObject();
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;
579 static bool getInformation(
bool allowGlobal, KURL& url,
580 TQString& description, TQString& icon,
581 bool& appLocal,
int iconSize,
582 TQWidget *parent = 0 );
602 const TQString& description, TQString icon,
603 bool appLocal =
true,
604 int iconSize = TDEIcon::SizeMedium,
605 TQWidget *parent = 0,
const char *name = 0 );
619 TQString description()
const;
624 TQString icon()
const;
631 bool applicationLocal()
const;
652 void urlChanged(
const TQString & );
655 class KURLBarItemDialogPrivate;
656 KURLBarItemDialogPrivate *d;
A dialog that allows editing entries of a KURLBar ( KURLBarItem).
TDEIconButton * m_iconButton
The TDEIconButton to configure the icon.
KURLRequester * m_urlEdit
The KURLRequester used for editing the url.
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.
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.
const KURL & url() const
returns the url of this item.
const TQString & description() const
returns the description of this item.
const TQString & icon() const
returns the icon of this item.
This is the listbox used in KURLBar.
void dropped(TQDropEvent *e)
Emitted when a drop-event happened.
TQt::Orientation orientation() const
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.
bool m_isModified
Whether the urlbar was modified by the user (e.g.
KURLBarListBox * listBox() const
KURLBarItem * m_activeItem
The currently active item.
bool m_isImmutable
Whether the urlbar may be modified by the user.
This class is a widget showing a lineedit and a button, which invokes a filedialog.