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

tdeio/bookmarks

  • tdeio
  • bookmarks
kbookmarkmenu.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3
4 This 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; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __kbookmarkmenu_h__
21#define __kbookmarkmenu_h__
22
23#include <sys/types.h>
24
25#include <tqptrlist.h>
26#include <tqptrstack.h>
27#include <tqobject.h>
28#include <tqlistview.h>
29
30#include <kdialogbase.h>
31#include <tdelocale.h>
32#include <tdeaction.h>
33
34#include "kbookmark.h"
35#include "kbookmarkmanager.h"
36
37class TQString;
38class TQPopupMenu;
39class TQPushButton;
40class TQListView;
41class KLineEdit;
42class KBookmark;
43class KBookmarkGroup;
44class TDEAction;
45class TDEActionMenu;
46class TDEActionCollection;
47class KBookmarkOwner;
48class KBookmarkMenu;
49class TDEPopupMenu;
50
51namespace TDEIO { class Job; }
52
77class TDEIO_EXPORT KBookmarkMenu : public TQObject
78{
79 TQ_OBJECT
80 friend class KBookmarkMenuNSImporter;
81 friend class RMB;
82public:
102 KBookmarkMenu( KBookmarkManager* mgr,
103 KBookmarkOwner * owner, TDEPopupMenu * parentMenu,
104 TDEActionCollection * collec, bool root, bool add = true,
105 const TQString & parentAddress = "" );
106
107 ~KBookmarkMenu();
108
114 void fillBookmarkMenu();
115
120 void ensureUpToDate();
121
127 // TODO - transform into class
128 struct DynMenuInfo {
129 bool show;
130 TQString location;
131 TQString type;
132 TQString name;
133 class DynMenuInfoPrivate *d;
134 };
135
140 static DynMenuInfo showDynamicBookmarks( const TQString &id );
141
150 static void setDynamicBookmarks( const TQString &id, const DynMenuInfo &info );
151
156 static TQStringList dynamicBookmarksList();
157
158signals:
159 void aboutToShowContextMenu( const KBookmark &, TQPopupMenu * );
163 void openBookmark( const TQString& url, TQt::ButtonState state );
164
165public slots: // public for bookmark bar
166 void slotBookmarksChanged( const TQString & );
167
168protected slots:
169 void slotAboutToShow();
170 void slotAboutToShowContextMenu( TDEPopupMenu *, int, TQPopupMenu * );
171 void slotActionHighlighted( TDEAction * );
172
173 void slotRMBActionRemove( int );
174 void slotRMBActionInsert( int );
175 void slotRMBActionCopyLocation( int );
176 void slotRMBActionEditAt( int );
177 void slotRMBActionProperties( int );
178
179 void slotBookmarkSelected();
183 void slotBookmarkSelected( TDEAction::ActivationReason reason, TQt::ButtonState state );
184 void slotAddBookmarksList();
185 void slotAddBookmark();
186 void slotNewFolder();
187
191 void slotNSLoad();
192
193protected:
194 KExtendedBookmarkOwner* extOwner();
195 void refill();
196 void addAddBookmark();
197 void addAddBookmarksList();
198 void addEditBookmarks();
199 void addNewFolder();
200
201 void fillContextMenu( TQPopupMenu *, const TQString &, int );
202
203 bool m_bIsRoot:1;
204 bool m_bAddBookmark:1;
205 bool m_bDirty:1;
206 bool m_bNSBookmark:1;
207 bool m_bAddShortcuts:1;
208
209 KBookmarkManager * m_pManager;
210 KBookmarkOwner *m_pOwner;
215 TDEPopupMenu * m_parentMenu;
219 TQPtrList<KBookmarkMenu> m_lstSubMenus;
220 TDEActionCollection * m_actionCollection;
224 TQPtrList<TDEAction> m_actions;
228 TQString m_parentAddress;
229
230 // TODO make non static!
231 static TQString s_highlightedAddress;
232 static TQString s_highlightedImportLocation;
233 static TQString s_highlightedImportType;
234};
235
239class TDEIO_EXPORT KBookmarkMenuNSImporter : public TQObject
240{
241 TQ_OBJECT
242public:
243 KBookmarkMenuNSImporter( KBookmarkManager* mgr, KBookmarkMenu * menu, TDEActionCollection * act ) :
244 m_menu(menu), m_actionCollection(act), m_pManager(mgr) {}
245
246 void openNSBookmarks();
247 void openBookmarks( const TQString &location, const TQString &type );
248 void connectToImporter( const TQObject &importer );
249
250protected slots:
251 void newBookmark( const TQString & text, const TQCString & url, const TQString & );
252 void newFolder( const TQString & text, bool, const TQString & );
253 void newSeparator();
254 void endFolder();
255
256protected:
257 TQPtrStack<KBookmarkMenu> mstack;
258 KBookmarkMenu * m_menu;
259 TDEActionCollection * m_actionCollection;
260 KBookmarkManager* m_pManager;
261};
262
263#endif
KBookmarkGroup
A group of bookmarks.
Definition: kbookmark.h:198
KBookmarkManager
This class implements the reading/writing of bookmarks in XML.
Definition: kbookmarkmanager.h:52
KBookmarkMenuNSImporter
A class connected to KNSBookmarkImporter, to fill TDEActionMenus.
Definition: kbookmarkmenu.h:240
KBookmarkMenu
This class provides a bookmark menu.
Definition: kbookmarkmenu.h:78
KBookmarkMenu::m_parentAddress
TQString m_parentAddress
Parent bookmark for this menu.
Definition: kbookmarkmenu.h:228
KBookmarkMenu::m_parentMenu
TDEPopupMenu * m_parentMenu
The menu in which we plug our actions.
Definition: kbookmarkmenu.h:215
KBookmarkMenu::openBookmark
void openBookmark(const TQString &url, TQt::ButtonState state)
KBookmarkMenu::m_lstSubMenus
TQPtrList< KBookmarkMenu > m_lstSubMenus
List of our sub menus.
Definition: kbookmarkmenu.h:219
KBookmarkMenu::m_actions
TQPtrList< TDEAction > m_actions
List of our actions.
Definition: kbookmarkmenu.h:224
KBookmarkOwner
The KBookmarkMenu and KBookmarkBar classes gives the user the ability to either edit bookmarks or add...
Definition: kbookmarkmanager.h:316
KExtendedBookmarkOwner
Definition: kbookmarkmanager.h:352
KBookmarkMenu::DynMenuInfo
Structure used for storing information about the dynamic menu setting.
Definition: kbookmarkmenu.h:128

tdeio/bookmarks

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

tdeio/bookmarks

Skip menu "tdeio/bookmarks"
  • 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/bookmarks by doxygen 1.9.4
This website is maintained by Timothy Pearson.