• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdefile
 

tdeio/tdefile

  • tdeio
  • tdefile
kurlbar.h
1/* This file is part of the KDE libraries
2 Copyright (C) 2001,2002,2003 Carsten Pfeiffer <pfeiffer@kde.org>
3
4 library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation, version 2.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#ifndef KURLBAR_H
20#define KURLBAR_H
21
22#include <tqevent.h>
23#include <tqframe.h>
24#include <tqtooltip.h>
25
26#include <kdialogbase.h>
27#include <kicontheme.h>
28#include <tdelistbox.h>
29#include <kurl.h>
30
31class TDEConfig;
32class KURLBar;
33
42class TDEIO_EXPORT KURLBarItem : public TQListBoxPixmap
43{
44public:
58 KURLBarItem( KURLBar *parent, const KURL& url, bool persistent,
59 const TQString& description = TQString::null,
60 const TQString& icon = TQString::null,
61 TDEIcon::Group group = TDEIcon::Panel );
62
75 KURLBarItem( KURLBar *parent, const KURL& url,
76 const TQString& description = TQString::null,
77 const TQString& icon = TQString::null,
78 TDEIcon::Group group = TDEIcon::Panel );
79
83 ~KURLBarItem();
84
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 );
107
112 TQSize sizeHint() const;
113
117 virtual int width( const TQListBox * ) const;
121 virtual int height( const TQListBox * ) const;
122
127 const KURL& url() const { return m_url; }
132 const TQString& description() const { return m_description; }
137 const TQString& icon() const { return m_icon; }
142 TQString toolTip() const;
147 TDEIcon::Group iconGroup() const { return m_group; }
151 virtual const TQPixmap * pixmap() const { return &m_pixmap; }
152
159 void setApplicationLocal( bool local );
160
167 bool applicationLocal() const { return m_appLocal; }
168
174 bool isPersistent() const;
175
176protected:
177 virtual void paint( TQPainter *p );
178
179private:
180 int iconSize() const;
181 void init( const TQString& icon, TDEIcon::Group group,
182 const TQString& description, bool persistent );
183
184 KURL m_url;
185 TQString m_description;
186 TQString m_icon;
187 TQString m_toolTip;
188 TQPixmap m_pixmap;
189 TDEIcon::Group m_group;
190 KURLBar *m_parent;
191 bool m_appLocal :1;
192
193protected:
194 virtual void virtual_hook( int id, void* data );
195private:
196 class KURLBarItemPrivate;
197 KURLBarItemPrivate *d;
198};
199
200
203
204
205class KURLBarListBox;
206
230class TDEIO_EXPORT KURLBar : public TQFrame
231{
232 TQ_OBJECT
233
234public:
239 KURLBar( bool useGlobalItems,
240 TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
244 ~KURLBar();
245
256 virtual KURLBarItem * insertItem( const KURL& url,
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;
286
293 virtual void setListBox( KURLBarListBox * );
298 KURLBarListBox *listBox() const { return m_listBox; }
299
305 virtual void setIconSize( int size );
311 int iconSize() const { return m_iconSize; }
312
316 virtual void clear();
317
322 virtual TQSize sizeHint() const;
323
327 virtual TQSize minimumSizeHint() const;
328
334 virtual void readConfig( TDEConfig *config, const TQString& itemGroup );
340 virtual void writeConfig( TDEConfig *config, const TQString& itemGroup );
341
347 virtual void readItem( int i, TDEConfig *config, bool applicationLocal );
354 virtual void writeItem( KURLBarItem *item, int i, TDEConfig *, bool global );
355
361 KURLBarItem * currentItem() const;
368 KURL currentURL() const;
369
375 bool isModified() const { return m_isModified; }
376
380 bool isImmutable() const { return m_isImmutable; }
381
385 bool isVertical() const { return orientation() == TQt::Vertical; }
386
387public slots:
394 virtual void setCurrentItem( const KURL& url );
395
396signals:
401 void activated( const KURL& url );
402
403protected:
409 virtual bool addNewItem();
417 virtual bool editItem( KURLBarItem *item );
418
419 virtual void resizeEvent( TQResizeEvent * );
420
421 virtual void paletteChange( const TQPalette & );
422
426 KURLBarItem * m_activeItem;
430 bool m_useGlobal :1;
431
436 bool m_isModified :1;
437
442 bool m_isImmutable :1;
443
444protected slots:
449 virtual void slotContextMenuRequested( TQListBoxItem *, const TQPoint& pos );
454 virtual void slotSelected( TQListBoxItem * );
455
460 virtual void slotDropped( TQDropEvent * );
461
462private slots:
463 void slotSelected( int button, TQListBoxItem * );
464
465private:
466 KURLBarListBox *m_listBox;
467 int m_iconSize;
468
469
470protected:
471 virtual void virtual_hook( int id, void* data );
472private:
473 class KURLBarPrivate;
474 KURLBarPrivate *d;
475};
476
477
480
481
482class TQDragObject;
483class KURLBarToolTip;
484
493class TDEIO_EXPORT KURLBarListBox : public TDEListBox
494{
495 TQ_OBJECT
496
497public:
501 KURLBarListBox( TQWidget *parent = 0, const char *name = 0 );
505 ~KURLBarListBox();
506
513 virtual void setOrientation( TQt::Orientation orient );
518 TQt::Orientation orientation() const { return m_orientation; }
519
520 bool isVertical() const { return m_orientation == TQt::Vertical; }
521
522signals:
526 void dropped( TQDropEvent *e );
527
528protected:
532 virtual TQDragObject * dragObject();
533
534 virtual void contentsDragEnterEvent( TQDragEnterEvent * );
535 virtual void contentsDropEvent( TQDropEvent * );
536 virtual void contextMenuEvent( TQContextMenuEvent * );
537 virtual void paintEvent( TQPaintEvent* );
538
539private:
540 TQt::Orientation m_orientation;
541 KURLBarToolTip *m_toolTip;
542
543protected:
544 virtual void virtual_hook( int id, void* data );
545private:
546 class KURLBarListBoxPrivate;
547 KURLBarListBoxPrivate *d;
548};
549
550
553
554
555class TQCheckBox;
556class TDEIconButton;
557class KLineEdit;
558class KURLRequester;
559
567class TDEIO_EXPORT KURLBarItemDialog : public KDialogBase
568{
569 TQ_OBJECT
570
571public:
579 static bool getInformation( bool allowGlobal, KURL& url,
580 TQString& description, TQString& icon,
581 bool& appLocal, int iconSize,
582 TQWidget *parent = 0 );
583
601 KURLBarItemDialog( bool allowGlobal, const KURL& url,
602 const TQString& description, TQString icon,
603 bool appLocal = true,
604 int iconSize = TDEIcon::SizeMedium,
605 TQWidget *parent = 0, const char *name = 0 );
609 ~KURLBarItemDialog();
610
614 KURL url() const;
615
619 TQString description() const;
620
624 TQString icon() const;
625
631 bool applicationLocal() const;
632
633protected:
637 KURLRequester * m_urlEdit;
641 KLineEdit * m_edit;
645 TDEIconButton * m_iconButton;
649 TQCheckBox * m_appLocal;
650
651public slots:
652 void urlChanged(const TQString & );
653
654private:
655 class KURLBarItemDialogPrivate;
656 KURLBarItemDialogPrivate *d;
657};
658
659
660#endif // KURLBAR_H
KURLBarItemDialog
A dialog that allows editing entries of a KURLBar ( KURLBarItem).
Definition: kurlbar.h:568
KURLBarItemDialog::m_iconButton
TDEIconButton * m_iconButton
The TDEIconButton to configure the icon.
Definition: kurlbar.h:645
KURLBarItemDialog::m_urlEdit
KURLRequester * m_urlEdit
The KURLRequester used for editing the url.
Definition: kurlbar.h:637
KURLBarItemDialog::m_edit
KLineEdit * m_edit
The KLineEdit used for editing the description.
Definition: kurlbar.h:641
KURLBarItemDialog::m_appLocal
TQCheckBox * m_appLocal
The TQCheckBox to modify the local/global setting.
Definition: kurlbar.h:649
KURLBarItem
An item to be used in KURLBar / KURLBarListBox.
Definition: kurlbar.h:43
KURLBarItem::iconGroup
TDEIcon::Group iconGroup() const
returns the icon-group of this item (determines icon-effects).
Definition: kurlbar.h:147
KURLBarItem::applicationLocal
bool applicationLocal() const
returns whether this is a global item or a local one.
Definition: kurlbar.h:167
KURLBarItem::pixmap
virtual const TQPixmap * pixmap() const
returns the pixmap of this item.
Definition: kurlbar.h:151
KURLBarItem::icon
const TQString & icon() const
returns the icon of this item.
Definition: kurlbar.h:137
KURLBarItem::description
const TQString & description() const
returns the description of this item.
Definition: kurlbar.h:132
KURLBarItem::url
const KURL & url() const
returns the url of this item.
Definition: kurlbar.h:127
KURLBarListBox
This is the listbox used in KURLBar.
Definition: kurlbar.h:494
KURLBarListBox::dropped
void dropped(TQDropEvent *e)
Emitted when a drop-event happened.
KURLBarListBox::orientation
TQt::Orientation orientation() const
Definition: kurlbar.h:518
KURLBar
KURLBar is a widget that displays icons together with a description.
Definition: kurlbar.h:231
KURLBar::activated
void activated(const KURL &url)
This signal is emitted when the user activated an item, e.g., by clicking on it.
KURLBar::m_useGlobal
bool m_useGlobal
Whether we support global entries or just local ones.
Definition: kurlbar.h:430
KURLBar::isModified
bool isModified() const
Definition: kurlbar.h:375
KURLBar::isVertical
bool isVertical() const
Definition: kurlbar.h:385
KURLBar::isImmutable
bool isImmutable() const
Definition: kurlbar.h:380
KURLBar::iconSize
int iconSize() const
Definition: kurlbar.h:311
KURLBar::m_isModified
bool m_isModified
Whether the urlbar was modified by the user (e.g.
Definition: kurlbar.h:436
KURLBar::listBox
KURLBarListBox * listBox() const
Definition: kurlbar.h:298
KURLBar::m_activeItem
KURLBarItem * m_activeItem
The currently active item.
Definition: kurlbar.h:426
KURLBar::m_isImmutable
bool m_isImmutable
Whether the urlbar may be modified by the user.
Definition: kurlbar.h:442
KURLRequester
This class is a widget showing a lineedit and a button, which invokes a filedialog.
Definition: kurlrequester.h:57
TDEIconButton
A pushbutton for choosing an icon.
Definition: kicondialog.h:258

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdefile by doxygen 1.9.4
This website is maintained by Timothy Pearson.