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 __kcelbookmarkmenu_h__ 00021 #define __kcelbookmarkmenu_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 KCelBookmarkOwner; 00036 class KCelBookmarkMenu; 00037 class KPopupMenu; 00038 namespace KIO { class Job; } 00039 00067 class KCelBookmarkMenu : public QObject 00068 { 00069 Q_OBJECT 00070 public: 00088 KCelBookmarkMenu( KBookmarkManager* mgr, 00089 KCelBookmarkOwner * owner, KPopupMenu * parentMenu, 00090 KActionCollection * collec, bool root, bool add = true, 00091 const QString & parentAddress = "" ); 00092 00093 ~KCelBookmarkMenu(); 00094 00100 void fillBookmarkMenu(); 00101 00105 void ensureUpToDate(); 00106 00107 public slots: // public for bookmark bar 00108 void slotBookmarksChanged(const QString &); 00109 00110 protected slots: 00111 void slotAboutToShow(); 00112 void slotBookmarkSelected(); 00113 void slotAddBookmark(); 00114 void slotAddRelativeBookmark(); 00115 void slotAddSettingsBookmark(); 00116 void slotNewFolder(); 00117 00118 protected: 00119 00120 void refill(); 00121 void addAddBookmark(); 00122 void addAddRelativeBookmark(); 00123 void addAddSettingsBookmark(); 00124 void addEditBookmarks(); 00125 void addNewFolder(); 00126 00127 bool m_bIsRoot:1; 00128 bool m_bAddBookmark:1; 00129 bool m_bDirty:1; 00130 bool m_bNSBookmark:1; 00131 00132 KBookmarkManager* m_pManager; 00133 KCelBookmarkOwner *m_pOwner; 00138 KPopupMenu * m_parentMenu; 00142 QPtrList<KCelBookmarkMenu> m_lstSubMenus; 00143 KActionCollection * m_actionCollection; 00147 QPtrList<KAction> m_actions; 00151 QString m_parentAddress; 00152 }; 00153 00154 00155 #endif
1.4.1