ui: Fixes and improvements for bookmarks

* moved bookmark buttons behind search bar
* suggest qualified name when creating, file name for files
* fixed bug when updating bookmark category
* changed comment toggle arrow
* changed edit and delete icons
* fixed undo for edge bookmarks
* keep categories always alphabetical regardless of subsorting
* keep category expansion state when opening and closing browser
* removed QtBookmarkBar, moved logic into QtBookmarkView
* added bookmarks Menu with shortcuts
	Ctrl + D: Create Bookmark
	Ctrl + B: Bookmark Manager
This commit is contained in:
Eberhard Graether
2017-04-26 00:33:34 +02:00
parent 4ac41de61e
commit 0468168d61
32 changed files with 398 additions and 563 deletions
+26 -10
View File
@@ -3,12 +3,18 @@
#include "component/view/BookmarkView.h"
#include "qt/element/QtBookmarkBar.h"
#include "qt/utility/QtThreadedFunctor.h"
class QFrame;
class QPushButton;
class QtBookmarkBrowser;
class QtBookmarkView
: public BookmarkView
: public QObject
, public BookmarkView
{
Q_OBJECT
public:
QtBookmarkView(ViewLayout* viewLayout);
virtual ~QtBookmarkView();
@@ -22,19 +28,29 @@ public:
virtual void enableDisplayBookmarks(bool enable);
virtual bool bookmarkBrowserIsVisible() const;
private slots:
void createBookmarkClicked();
void showBookmarksClicked();
private:
void doRefreshView();
void setStyleSheet();
virtual void displayBookmarks(const std::vector<std::shared_ptr<Bookmark>>& bookmarks);
virtual void displayBookmarkCreator(const std::vector<std::string>& names, const std::vector<BookmarkCategory>& categories);
virtual void displayBookmarkEditor(std::shared_ptr<Bookmark> bookmark, const std::vector<BookmarkCategory>& categories);
QtThreadedFunctor<> m_refreshViewFunctor;
void setStyleSheet();
void refreshStyle();
QtBookmarkBar* m_widget;
QtThreadedLambdaFunctor m_onQtThread;
QFrame* m_widget;
QPushButton* m_createBookmarkButton;
QPushButton* m_showBookmarksButton;
QtBookmarkBrowser* m_bookmarkBrowser;
BookmarkView::CreateButtonState m_createButtonState;
};
#endif // QT_BOOKMARK_VIEW_H
#endif // QT_BOOKMARK_VIEW_H