KBookmarks

kbookmarkcontextmenu.h
1/*
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 1998, 1999 Torben Weis <weis@kde.org>
4 SPDX-FileCopyrightText: 2006 Daniel Teske <teske@squorn.de>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef KBOOKMARKCONTEXTMENU_H
10#define KBOOKMARKCONTEXTMENU_H
11
12#include <QMenu>
13
14#include "kbookmark.h"
15#include <kbookmarkswidgets_export.h>
16
18class KBookmarkOwner;
19
20/**
21 * @class KBookmarkContextMenu kbookmarkcontextmenu.h KBookmarkContextMenu
22 *
23 * A context menu for a bookmark.
24 */
25class KBOOKMARKSWIDGETS_EXPORT KBookmarkContextMenu : public QMenu
26{
27 Q_OBJECT
28
29public:
30 KBookmarkContextMenu(const KBookmark &bm, KBookmarkManager *manager, KBookmarkOwner *owner, QWidget *parent = nullptr);
31 ~KBookmarkContextMenu() override;
32 virtual void addActions();
33
34 /**
35 * Set this to true to make any "Edit Bookmarks" dialog
36 * show UI elements that are specific to browsers.
37 *
38 * @since 6.0
39 */
40 void setBrowserMode(bool browserMode);
41
42 /**
43 * Whether any "Edit Bookmarks" dialog shows UI elements
44 * that are specific to browsers.
45 *
46 * @since 6.0
47 */
48 bool browserMode() const;
49
50public Q_SLOTS:
51 void slotEditAt();
52 void slotProperties();
53 void slotInsert();
54 void slotRemove();
55 void slotCopyLocation();
56 void slotOpenFolderInTabs();
57
58protected:
59 void addBookmark();
60 void addFolderActions();
61 void addProperties();
62 void addBookmarkActions();
63 void addOpenFolderInTabs();
64
65 KBookmarkManager *manager() const;
66 KBookmarkOwner *owner() const;
67 KBookmark bookmark() const;
68
69private Q_SLOTS:
70 KBOOKMARKS_NO_EXPORT void slotAboutToShow();
71
72private:
73 // TODO KF6 dptr it
74 const KBookmark bm;
75 KBookmarkManager *const m_pManager;
76 KBookmarkOwner *const m_pOwner;
77 bool m_browserMode = false;
78};
79
80#endif
A context menu for a bookmark.
This class implements the reading/writing of bookmarks in XML.
The KBookmarkMenu and KBookmarkBar classes gives the user the ability to either edit bookmarks or add...
A class representing a bookmark.
Definition kbookmark.h:27
Q_SLOTSQ_SLOTS
void addActions(const QList< QAction * > &actions)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:10:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.