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 KBookmarkOwner; |
18 | |
19 | /** |
20 | * @class KBookmarkAction kbookmarkaction.h KBookmarkAction |
21 | * |
22 | * This class is a QAction for bookmarks. |
23 | * It provides a nice constructor. |
24 | * And on triggered uses the owner to open the bookmark. |
25 | */ |
26 | class KBOOKMARKS_EXPORT KBookmarkAction : public QAction, public KBookmarkActionInterface |
27 | { |
28 | Q_OBJECT |
29 | public: |
30 | KBookmarkAction(const KBookmark &bk, KBookmarkOwner *owner, QObject *parent); |
31 | ~KBookmarkAction() override; |
32 | |
33 | public Q_SLOTS: |
34 | void slotSelected(Qt::MouseButtons mb, Qt::KeyboardModifiers km); |
35 | |
36 | private Q_SLOTS: |
37 | KBOOKMARKS_NO_EXPORT void slotTriggered(); |
38 | |
39 | private: |
40 | KBookmarkOwner *const m_pOwner; |
41 | }; |
42 | |
43 | #endif |
44 | |