1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3#ifndef BOOKMARKDIALOG_H
4#define BOOKMARKDIALOG_H
5
6#include "ui_bookmarkdialog.h"
7
8QT_BEGIN_NAMESPACE
9
10class BookmarkModel;
11class BookmarkFilterModel;
12class BookmarkTreeModel;
13
14class BookmarkDialog : public QDialog
15{
16 Q_OBJECT
17public:
18 BookmarkDialog(BookmarkModel *bookmarkModel, const QString &title,
19 const QString &url, QWidget *parent = nullptr);
20 ~BookmarkDialog() override;
21
22private:
23 bool isRootItem(const QModelIndex &index) const;
24 bool eventFilter(QObject *object, QEvent *event) override;
25
26private slots:
27 void currentIndexChanged(int index);
28 void currentIndexChanged(const QModelIndex &index);
29
30 void accepted();
31 void rejected();
32
33 void addFolder();
34 void toolButtonClicked();
35 void textChanged(const QString& text);
36 void customContextMenuRequested(const QPoint &point);
37
38private:
39 QString m_url;
40 QString m_title;
41 Ui::BookmarkDialog ui;
42 QList<QPersistentModelIndex> cache;
43
44 BookmarkModel *bookmarkModel;
45 BookmarkTreeModel *bookmarkTreeModel;
46 BookmarkFilterModel *bookmarkProxyModel;
47};
48
49QT_END_NAMESPACE
50
51#endif // BOOKMARKDIALOG_H
52

source code of qttools/src/assistant/assistant/bookmarkdialog.h