kio Library API Documentation

kbookmarkbar.h

00001 //  -*- c-basic-offset:4; indent-tabs-mode:nil -*-
00002 // vim: set ts=4 sts=4 sw=4 et:
00003 /* This file is part of the KDE project
00004    Copyright (C) 1999 Kurt Granroth <granroth@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019    Boston, MA 02111-1307, USA.
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 * );
00086 
00087 public slots:
00088     void clear();
00089 
00090     void slotBookmarksChanged( const QString & );
00091     void slotBookmarkSelected();
00092 
00094     void slotRMBActionRemove( int );
00096     void slotRMBActionInsert( int );
00098     void slotRMBActionCopyLocation( int );
00100     void slotRMBActionEditAt( int );
00102     void slotRMBActionProperties( int );
00103 
00104 protected:
00105     void fillBookmarkBar( KBookmarkGroup & parent );
00106     virtual bool eventFilter( QObject *o, QEvent *e );
00107 
00108 private:
00109     KBookmarkGroup getToolbar();
00110 
00111     KBookmarkOwner *m_pOwner;
00112     QGuardedPtr<KToolBar> m_toolBar;
00113     KActionCollection *m_actionCollection;
00114     KBookmarkManager *m_pManager;
00115     QPtrList<KBookmarkMenu> m_lstSubMenus;
00116 
00117 private:
00118     class KBookmarkBarPrivate* dptr() const;
00119 };
00120 
00121 #endif // KBOOKMARKBAR_H
KDE Logo
This file is part of the documentation for kio Library Version 3.3.90.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 30 10:15:27 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003