kio
kbookmarkbar.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KBOOKMARKBAR_H
00022 #define KBOOKMARKBAR_H
00023
00024 #include <qobject.h>
00025 #include <qguardedptr.h>
00026 #include <qptrlist.h>
00027 #include <kbookmark.h>
00028 #include <kaction.h>
00029
00030 class KToolBar;
00031 class KBookmarkMenu;
00032 class KBookmarkOwner;
00033 class KActionCollection;
00034 class KAction;
00035 class QPopupMenu;
00036
00042 class KIO_EXPORT KBookmarkBar : public QObject
00043 {
00044 Q_OBJECT
00045 friend class RMB;
00046 public:
00059 KBookmarkBar( KBookmarkManager* manager,
00060 KBookmarkOwner *owner, KToolBar *toolBar,
00061 KActionCollection *,
00062 QObject *parent = 0L, const char *name = 0L);
00063
00064 virtual ~KBookmarkBar();
00065
00069 bool isReadOnly() const;
00070
00074 void setReadOnly(bool);
00075
00079 QString parentAddress();
00080
00081 signals:
00085 void aboutToShowContextMenu( const KBookmark &, QPopupMenu * );
00089 void openBookmark( const QString& url, Qt::ButtonState state );
00090
00091 public slots:
00092 void clear();
00093
00094 void slotBookmarksChanged( const QString & );
00095 void slotBookmarkSelected();
00096
00100 void slotBookmarkSelected( KAction::ActivationReason reason, Qt::ButtonState state );
00101
00103 void slotRMBActionRemove( int );
00105 void slotRMBActionInsert( int );
00107 void slotRMBActionCopyLocation( int );
00109 void slotRMBActionEditAt( int );
00111 void slotRMBActionProperties( int );
00112
00113 protected:
00114 void fillBookmarkBar( KBookmarkGroup & parent );
00115 virtual bool eventFilter( QObject *o, QEvent *e );
00116
00117 private:
00118 KBookmarkGroup getToolbar();
00119
00120 KBookmarkOwner *m_pOwner;
00121 QGuardedPtr<KToolBar> m_toolBar;
00122 KActionCollection *m_actionCollection;
00123 KBookmarkManager *m_pManager;
00124 QPtrList<KBookmarkMenu> m_lstSubMenus;
00125
00126 private:
00127 class KBookmarkBarPrivate* dptr() const;
00128 };
00129
00130 #endif // KBOOKMARKBAR_H