• 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 
37 class TQString;
38 class TQPopupMenu;
39 class TQPushButton;
40 class TQListView;
41 class KLineEdit;
42 class KBookmark;
43 class KBookmarkGroup;
44 class TDEAction;
45 class TDEActionMenu;
46 class TDEActionCollection;
47 class KBookmarkOwner;
48 class KBookmarkMenu;
49 class TDEPopupMenu;
50 
51 namespace TDEIO { class Job; }
52 
77 class TDEIO_EXPORT KBookmarkMenu : public TQObject
78 {
79  Q_OBJECT
80  friend class KBookmarkMenuNSImporter;
81  friend class RMB;
82 public:
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 
158 signals:
159  void aboutToShowContextMenu( const KBookmark &, TQPopupMenu * );
163  void openBookmark( const TQString& url, TQt::ButtonState state );
164 
165 public slots: // public for bookmark bar
166  void slotBookmarksChanged( const TQString & );
167 
168 protected 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 
193 protected:
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 
239 class TDEIO_EXPORT KBookmarkMenuNSImporter : public TQObject
240 {
241  Q_OBJECT
242 public:
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 
250 protected 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 
256 protected:
257  TQPtrStack<KBookmarkMenu> mstack;
258  KBookmarkMenu * m_menu;
259  TDEActionCollection * m_actionCollection;
260  KBookmarkManager* m_pManager;
261 };
262 
263 #endif
KBookmarkMenu::m_parentAddress
TQString m_parentAddress
Parent bookmark for this menu.
Definition: kbookmarkmenu.h:228
KBookmarkMenu::m_actions
TQPtrList< TDEAction > m_actions
List of our actions.
Definition: kbookmarkmenu.h:224
KBookmarkMenuNSImporter
A class connected to KNSBookmarkImporter, to fill TDEActionMenus.
Definition: kbookmarkmenu.h:239
KBookmarkManager
This class implements the reading/writing of bookmarks in XML.
Definition: kbookmarkmanager.h:51
TDEIO
Definition: kbookmarkmenu.h:51
KExtendedBookmarkOwner
Definition: kbookmarkmanager.h:351
KBookmarkGroup
A group of bookmarks.
Definition: kbookmark.h:197
KBookmarkOwner
The KBookmarkMenu and KBookmarkBar classes gives the user the ability to either edit bookmarks or add...
Definition: kbookmarkmanager.h:315
KBookmarkMenu::DynMenuInfo
Structure used for storing information about the dynamic menu setting.
Definition: kbookmarkmenu.h:128
KBookmarkMenu::m_parentMenu
TDEPopupMenu * m_parentMenu
The menu in which we plug our actions.
Definition: kbookmarkmenu.h:215
KBookmarkMenu
This class provides a bookmark menu.
Definition: kbookmarkmenu.h:77
KBookmarkMenu::m_lstSubMenus
TQPtrList< KBookmarkMenu > m_lstSubMenus
List of our sub menus.
Definition: kbookmarkmenu.h:219

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/bookmarks by doxygen 1.8.8
This website is maintained by Timothy Pearson.