diff options
author | Eike Ziller <eike.ziller@digia.com> | 2014-10-09 16:42:12 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2014-10-13 11:18:14 +0200 |
commit | 46dfd21ce5d31ab0d4b611ed4f4d4d3889cef477 (patch) | |
tree | 0d58f559180f7f9d1a08ffa4e00d1a02e2cc1550 /src/shared/help | |
parent | 85a6ea6c98d6ce5bd20f759d66d4c5751199471a (diff) | |
download | qt-creator-46dfd21ce5d31ab0d4b611ed4f4d4d3889cef477.tar.gz |
Help Window: Add Bookmarks view
Change-Id: I8b4db5b3208c4133466fe4e61f1dd1f18b432fea
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/shared/help')
-rw-r--r-- | src/shared/help/bookmarkmanager.cpp | 9 | ||||
-rw-r--r-- | src/shared/help/bookmarkmanager.h | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/shared/help/bookmarkmanager.cpp b/src/shared/help/bookmarkmanager.cpp index c0e79953c0..bfc8f925d7 100644 --- a/src/shared/help/bookmarkmanager.cpp +++ b/src/shared/help/bookmarkmanager.cpp @@ -302,6 +302,7 @@ BookmarkWidget::BookmarkWidget(BookmarkManager *manager, QWidget *parent, , addButton(0) , removeButton(0) , bookmarkManager(manager) + , m_isOpenInNewPageActionVisible(true) { setup(showButtons); installEventFilter(this); @@ -311,6 +312,11 @@ BookmarkWidget::~BookmarkWidget() { } +void BookmarkWidget::setOpenInNewPageActionVisible(bool visible) +{ + m_isOpenInNewPageActionVisible = visible; +} + void BookmarkWidget::removeClicked() { const QModelIndex& index = treeView->currentIndex(); @@ -384,7 +390,8 @@ void BookmarkWidget::customContextMenuRequested(const QPoint &point) renameItem = menu.addAction(tr("Rename Folder")); } else { showItem = menu.addAction(tr("Show Bookmark")); - showItemNewTab = menu.addAction(tr("Show Bookmark as New Page")); + if (m_isOpenInNewPageActionVisible) + showItemNewTab = menu.addAction(tr("Show Bookmark as New Page")); if (searchField->text().isEmpty()) { menu.addSeparator(); removeItem = menu.addAction(tr("Delete Bookmark")); diff --git a/src/shared/help/bookmarkmanager.h b/src/shared/help/bookmarkmanager.h index d2e5424940..6139462ccf 100644 --- a/src/shared/help/bookmarkmanager.h +++ b/src/shared/help/bookmarkmanager.h @@ -113,6 +113,8 @@ public: bool showButtons = true); ~BookmarkWidget(); + void setOpenInNewPageActionVisible(bool visible); + signals: void addBookmark(); void linkActivated(const QUrl &url); @@ -138,6 +140,7 @@ private: QToolButton *removeButton; BookmarkManager *bookmarkManager; QSortFilterProxyModel* filterBookmarkModel; + bool m_isOpenInNewPageActionVisible; }; class BookmarkModel : public QStandardItemModel |