Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
bookmarkmanagerwidget.h
Go to the documentation of this file.
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 BOOKMARKMANAGERWIDGET_H
4#define BOOKMARKMANAGERWIDGET_H
5
6#include "ui_bookmarkmanagerwidget.h"
7
8#include <QtCore/QPersistentModelIndex>
9
10#include <QtWidgets/QMenu>
11
13
14class BookmarkModel;
15class QCloseEvent;
16class QString;
17
19{
21public:
23 QWidget *parent = nullptr);
25
26protected:
27 void closeEvent(QCloseEvent *event) override;
28
30 void setSource(const QUrl &url);
31 void setSourceInNewTab(const QUrl &url);
32
34
35private:
36 void renameItem(const QModelIndex &index);
37 void selectNextIndex(bool direction) const;
38 bool eventFilter(QObject *object, QEvent *event) override;
39
40private slots:
41 void findNext();
42 void findPrevious();
43
44 void importBookmarks();
45 void exportBookmarks();
46
47 void refeshBookmarkCache();
48 void textChanged(const QString &text);
49
50 void removeItem(const QModelIndex &index = QModelIndex());
51
52 void customContextMenuRequested(const QPoint &point);
53 void setSourceFromIndex(const QModelIndex &index, bool newTab = false);
54
55private:
56 QMenu importExportMenu;
57 Ui::BookmarkManagerWidget ui;
58 QList<QPersistentModelIndex> cache;
59
60 BookmarkModel *bookmarkModel;
61};
62
63QT_END_NAMESPACE
64
65#endif // BOOKMARKMANAGERWIDGET_H
@ UserRoleExpanded
@ UserRoleFolder
@ UserRoleUrl
void managerWidgetAboutToClose()
bool eventFilter(QObject *object, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
void setSourceInNewTab(const QUrl &url)
void closeEvent(QCloseEvent *event) override
This event handler is called with the given event when Qt receives a window close request for a top-l...
void subclassKeyPressEvent(QKeyEvent *event)
void focusInEvent(QFocusEvent *event) override
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus receive...
void setBookmarksToolbar(QToolBar *toolBar)
QWidget * bookmarkDockWidget() const
void setBookmarksMenu(QMenu *menu)
~BookmarkManager() override
static void destroy()
bool eventFilter(QObject *object, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
void setItemsEditable(bool editable)
void expandFoldersIfNeeeded(QTreeView *treeView)
static HelpEngineWrapper & instance()
Combined button and popup list for selecting options.
#define TRACE_OBJ
Definition tracer.h:34