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 KBOOKMARKACTION_H |
10 | #define KBOOKMARKACTION_H |
11 | |
12 | #include "kbookmarkactioninterface.h" |
13 | |
14 | #include <QAction> |
15 | |
16 | class KBookmark; |
17 | class KBookmarkActionPrivate; |
18 | class KBookmarkOwner; |
19 | |
20 | /*! |
21 | * \class KBookmarkAction |
22 | * \inmodule KBookmarks |
23 | * |
24 | * \brief This class is a QAction for bookmarks. |
25 | * |
26 | * It provides a nice constructor. |
27 | * And on triggered uses the owner to open the bookmark. |
28 | */ |
29 | class KBOOKMARKS_EXPORT KBookmarkAction : public QAction, public KBookmarkActionInterface |
30 | { |
31 | Q_OBJECT |
32 | public: |
33 | /*! |
34 | * |
35 | */ |
36 | KBookmarkAction(const KBookmark &bk, KBookmarkOwner *owner, QObject *parent); |
37 | ~KBookmarkAction() override; |
38 | |
39 | public Q_SLOTS: |
40 | /*! |
41 | * |
42 | */ |
43 | void slotSelected(Qt::MouseButtons mb, Qt::KeyboardModifiers km); |
44 | |
45 | private Q_SLOTS: |
46 | KBOOKMARKS_NO_EXPORT void slotTriggered(); |
47 | |
48 | private: |
49 | friend KBookmarkActionPrivate; |
50 | KBookmarkActionPrivate *d; |
51 | }; |
52 | |
53 | #endif |
54 | |