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

tdeio/bookmarks

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

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.8.13
This website is maintained by Timothy Pearson.