# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kbookmarkmenu.h

    00001 /* This file is part of the KDE project
    00002    Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License as published by the Free Software Foundation; either
    00007    version 2 of the License, or (at your option) any later version.
    00008
    00009    This library is distributed in the hope that it will be useful,
    00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012    Library General Public License for more details.
    00013
    00014    You should have received a copy of the GNU Library General Public License
    00015    along with this library; see the file COPYING.LIB.  If not, write to
    00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017    Boston, MA 02111-1307, USA.
    00018 */
    00019
    00020 #ifndef __kbookmarkmenu_h__
    00021 #define __kbookmarkmenu_h__
    00022
    00023 #include <qptrlist.h>
    00024 #include <qptrstack.h>
    00025 #include <qobject.h>
    00026 #include <sys/types.h>
    00027 #include "kbookmark.h"
    00028 #include "kbookmarkmanager.h"
    00029
    00030 class QString;
    00031 class KBookmark;
    00032 class KAction;
    00033 class KActionMenu;
    00034 class KActionCollection;
    00035 class KBookmarkOwner;
    00036 class KBookmarkMenu;
    00037 class KPopupMenu;
    00038 namespace KIO { class Job; }
    00039
    00064 class KBookmarkMenu : public QObject
    00065 {
    00066   Q_OBJECT
    00067   friend class KBookmarkMenuNSImporter;
    00068 public:
    00086   KBookmarkMenu( KBookmarkManager* mgr,
    00087                  KBookmarkOwner * owner, KPopupMenu * parentMenu,
    00088                  KActionCollection * collec, bool root, bool add = true,
    00089                  const QString & parentAddress = "" );
    00090
    00091   ~KBookmarkMenu();
    00092
    00098   void fillBookmarkMenu();
    00099
    00103   void ensureUpToDate();
    00104
    00105 public slots: // public for bookmark bar
    00106   void slotBookmarksChanged(const QString &);
    00107
    00108 protected slots:
    00109   void slotAboutToShow();
    00110   void slotBookmarkSelected();
    00111   void slotAddBookmark();
    00112   void slotNewFolder();
    00113   void slotNSBookmarkSelected();
    00117   void slotNSLoad();
    00118
    00119 protected:
    00120
    00121   void refill();
    00122   void addAddBookmark();
    00123   void addEditBookmarks();
    00124   void addNewFolder();
    00125
    00126   bool m_bIsRoot:1;
    00127   bool m_bAddBookmark:1;
    00128   bool m_bDirty:1;
    00129   bool m_bNSBookmark:1;
    00130
    00131   KBookmarkManager* m_pManager;
    00132   KBookmarkOwner *m_pOwner;
    00137   KPopupMenu * m_parentMenu;
    00141   QPtrList<KBookmarkMenu> m_lstSubMenus;
    00142   KActionCollection * m_actionCollection;
    00146   QPtrList<KAction> m_actions;
    00150   QString m_parentAddress;
    00151 };
    00152
    00156 class KBookmarkMenuNSImporter : public QObject
    00157 {
    00158     Q_OBJECT
    00159 public:
    00160     KBookmarkMenuNSImporter( KBookmarkManager* mgr, KBookmarkMenu * menu, KActionCollection * act ) :
    00161         m_menu(menu), m_actionCollection(act), m_pManager(mgr) {}
    00162
    00163     void openNSBookmarks();
    00164
    00165 protected slots:
    00166     void newBookmark( const QString & text, const QCString & url, const QString & );
    00167     void newFolder( const QString & text, bool, const QString & );
    00168     void newSeparator();
    00169     void endFolder();
    00170
    00171 protected:
    00172     QPtrStack<KBookmarkMenu> mstack;
    00173     KBookmarkMenu * m_menu;
    00174     KActionCollection * m_actionCollection;
    00175     KBookmarkManager* m_pManager;
    00176 };
    00177
    00178 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:13:13 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001