Warning, file /frameworks/kbookmarks/src/konqbookmarkmenu_p.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 This file is part of the KDE project 0003 SPDX-FileCopyrightText: 2003 Alexander Kellett <lypanov@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #include "kbookmarkimporter.h" 0009 #include "kbookmarkmenu.h" 0010 0011 #include <KActionMenu> 0012 #include <QStack> 0013 0014 class QString; 0015 class QMenu; 0016 class KBookmark; 0017 class KBookmarkOwner; 0018 0019 #if KBOOKMARKS_BUILD_DEPRECATED_SINCE(5, 65) 0020 class KImportedBookmarkMenu : public KBookmarkMenu 0021 { 0022 friend class KBookmarkMenuImporter; 0023 Q_OBJECT 0024 public: 0025 // TODO simplfy 0026 KImportedBookmarkMenu(KBookmarkManager *mgr, KBookmarkOwner *owner, QMenu *parentMenu, const QString &type, const QString &location); 0027 KImportedBookmarkMenu(KBookmarkManager *mgr, KBookmarkOwner *owner, QMenu *parentMenu); 0028 ~KImportedBookmarkMenu() override; 0029 void clear() override; 0030 void refill() override; 0031 protected Q_SLOTS: 0032 void slotNSLoad(); 0033 0034 private: 0035 QString m_type; 0036 QString m_location; 0037 }; 0038 0039 /** 0040 * A class connected to KNSBookmarkImporter, to fill KActionMenus. 0041 */ 0042 class KBookmarkMenuImporter : public QObject 0043 { 0044 Q_OBJECT 0045 public: 0046 KBookmarkMenuImporter(KBookmarkManager *mgr, KImportedBookmarkMenu *menu) 0047 : m_menu(menu) 0048 , m_pManager(mgr) 0049 { 0050 } 0051 0052 void openBookmarks(const QString &location, const QString &type); 0053 void connectToImporter(const QObject &importer); 0054 0055 protected Q_SLOTS: 0056 void newBookmark(const QString &text, const QString &url, const QString &); 0057 void newFolder(const QString &text, bool, const QString &); 0058 void newSeparator(); 0059 void endFolder(); 0060 0061 protected: 0062 QStack<KImportedBookmarkMenu *> mstack; 0063 KImportedBookmarkMenu *m_menu; 0064 KBookmarkManager *m_pManager; 0065 }; 0066 0067 #include "kbookmarkactioninterface.h" 0068 0069 class KImportedBookmarkActionMenu : public KActionMenu, public KBookmarkActionInterface 0070 { 0071 Q_OBJECT 0072 public: 0073 KImportedBookmarkActionMenu(const QIcon &icon, const QString &text, QObject *parent) 0074 : KActionMenu(icon, text, parent) 0075 , KBookmarkActionInterface(KBookmark()) 0076 { 0077 } 0078 ~KImportedBookmarkActionMenu() override 0079 { 0080 } 0081 }; 0082 0083 #endif