File indexing completed on 2024-12-08 09:35:34
0001 /* 0002 This file is part of the KDE project 0003 SPDX-FileCopyrightText: 1998, 1999 Torben Weis <weis@kde.org> 0004 SPDX-FileCopyrightText: 2006 Daniel Teske <teske@squorn.de> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef KBOOKMARKCONTEXTMENU_H 0010 #define KBOOKMARKCONTEXTMENU_H 0011 0012 #include <QMenu> 0013 0014 #include "kbookmark.h" 0015 0016 class KBookmarkManager; 0017 class KBookmarkOwner; 0018 0019 /** 0020 * @class KBookmarkContextMenu kbookmarkcontextmenu.h KBookmarkContextMenu 0021 * 0022 * A context menu for a bookmark. 0023 */ 0024 class KBOOKMARKS_EXPORT KBookmarkContextMenu : public QMenu 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 KBookmarkContextMenu(const KBookmark &bm, KBookmarkManager *manager, KBookmarkOwner *owner, QWidget *parent = nullptr); 0030 ~KBookmarkContextMenu() override; 0031 virtual void addActions(); 0032 0033 public Q_SLOTS: 0034 void slotEditAt(); 0035 void slotProperties(); 0036 void slotInsert(); 0037 void slotRemove(); 0038 void slotCopyLocation(); 0039 void slotOpenFolderInTabs(); 0040 0041 protected: 0042 void addBookmark(); 0043 void addFolderActions(); 0044 void addProperties(); 0045 void addBookmarkActions(); 0046 void addOpenFolderInTabs(); 0047 0048 KBookmarkManager *manager() const; 0049 KBookmarkOwner *owner() const; 0050 KBookmark bookmark() const; 0051 0052 private Q_SLOTS: 0053 KBOOKMARKS_NO_EXPORT void slotAboutToShow(); 0054 0055 private: 0056 const KBookmark bm; 0057 KBookmarkManager *const m_pManager; 0058 KBookmarkOwner *const m_pOwner; 0059 }; 0060 0061 #endif