KBookmarks

konqbookmarkmenu.h
1 /* This file is part of the KDE project
2  Copyright (C) 1998, 1999 Torben Weis <[email protected]>
3  Copyright (C) 2006 Daniel Teske <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef __konqbookmarkmenu_h__
22 #define __konqbookmarkmenu_h__
23 
24 #include "kbookmarkmenu.h"
25 #include "kbookmarkactionmenu.h"
26 #include "kbookmarkcontextmenu.h"
27 
28 #if KBOOKMARKS_ENABLE_DEPRECATED_SINCE(5, 0)
29 #include "kbookmarkowner.h" // for SC reasons
30 
31 typedef KBookmarkOwner KonqBookmarkOwner; // KF5: KonqBookmarkOwner is deprecated, use KBookmarkOwner
32 #endif
33 
34 #if KBOOKMARKS_ENABLE_DEPRECATED_SINCE(5, 65)
35 
39 class KBOOKMARKS_EXPORT KonqBookmarkMenu : public KBookmarkMenu
40 {
41  //friend class KBookmarkBar;
42  Q_OBJECT
43 public:
57  KBOOKMARKS_DEPRECATED_VERSION(5, 65, "This class has moved to Konqueror")
58  KonqBookmarkMenu(KBookmarkManager *mgr, KBookmarkOwner *owner, KBookmarkActionMenu *parentMenu, KActionCollection *collec)
59  : KBookmarkMenu(mgr, owner, parentMenu->menu(), collec)
60  {
61  }
62  ~KonqBookmarkMenu() override
63  {}
64 
70  KBOOKMARKS_DEPRECATED_VERSION(5, 65, "This class has moved to Konqueror")
71  KonqBookmarkMenu(KBookmarkManager *mgr, KBookmarkOwner *owner, KBookmarkActionMenu *parentMenu, QString parentAddress)
72  : KBookmarkMenu(mgr, owner, parentMenu->menu(), parentAddress)
73  {
74  }
75 
76 protected:
81  struct DynMenuInfo {
82  bool show;
83  QString location;
84  QString type;
85  QString name;
86  class DynMenuInfoPrivate *d;
87  };
88 
92  static DynMenuInfo showDynamicBookmarks(const QString &id);
93 
101  static void setDynamicBookmarks(const QString &id, const DynMenuInfo &info);
102 
106  static QStringList dynamicBookmarksList();
107 
108  void refill() override;
109  QAction *actionForBookmark(const KBookmark &bm) override;
110  QMenu *contextMenu(QAction *action) override;
111  void fillDynamicBookmarks();
112 };
113 
118 class KBOOKMARKS_EXPORT KonqBookmarkContextMenu : public KBookmarkContextMenu
119 {
120  Q_OBJECT
121 public:
126  KBOOKMARKS_DEPRECATED_VERSION(5, 65, "This class has moved to Konqueror")
127  KonqBookmarkContextMenu(const KBookmark &bm, KBookmarkManager *mgr, KBookmarkOwner *owner);
128  ~KonqBookmarkContextMenu() override;
129  void addActions() override;
130 
131 public Q_SLOTS:
132  void openInNewTab();
133  void openInNewWindow();
134  void toggleShowInToolbar();
135 };
136 
137 #endif
138 
139 #endif
140 
This class implements the reading/writing of bookmarks in XML.
Bookmark menu with dynamic import features, only used by Konqueror.
Structure used for storing information about the dynamic menu setting.
The KBookmarkMenu and KBookmarkBar classes gives the user the ability to either edit bookmarks or add...
This class provides a bookmark menu.
Definition: kbookmarkmenu.h:60
Browser-specific context menu.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 8 2020 22:38:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.