summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarksmenu.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks/bookmarksmenu.hpp')
-rw-r--r--src/bookmarks/bookmarksmenu.hpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/bookmarks/bookmarksmenu.hpp b/src/bookmarks/bookmarksmenu.hpp
new file mode 100644
index 00000000..6199708f
--- /dev/null
+++ b/src/bookmarks/bookmarksmenu.hpp
@@ -0,0 +1,41 @@
+/* ============================================================
+ * The rekonq project
+ * ============================================================
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright (C) 2008-2013 by Andrea Diamantini <adjam7 at gmail dot com>
+ * Copyright (C) 2010 by Yoann Laissus <yoann dot laissus at gmail dot com>
+ * SPDX-License-Identifier: GPL-3.0-only
+ * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
+ * ============================================================
+ * Description: rekonq bookmarks menu
+ * ============================================================ */
+
+#pragma once
+
+#include "rekonq.hpp"
+#include <QMenu>
+
+class BookmarkModel;
+class BookmarksMenu : public QMenu {
+ Q_OBJECT
+
+public:
+ explicit BookmarksMenu(QWidget *parent = nullptr);
+ ~BookmarksMenu() override = default;
+
+ void setModel(const BookmarkModel *ptr)
+ {
+ Q_CHECK_PTR(ptr);
+ model = ptr;
+ }
+
+signals:
+ void loadUrl(const QUrl &url, rekonq::OpenType type);
+
+private slots:
+ void refill();
+
+private:
+ const BookmarkModel *model = nullptr;
+ QList<QAction *> actions;
+};