data: bookmark refactoring

* implemented handling of aggregations in bookmarks
* split index Storage and bookmark storage
* each sqlite database has its own version now
* added bookmark tests
* fixed creating bookmark tables when project can be loaded but bookmark db does not exist
* fixed font size for bookmarkview tooltips
* using bookmark cache now
* using default category name when none specified by the user
* raising bookmark windows when they should be shown
* clearing a bookmark or category in the editor will now update the star icon accordingly
* non-persistent bookmarks use ids of nodes and edges now (instead of names)
* git ignore .srctrlbm files
This commit is contained in:
malte_langkabel
2017-04-17 10:55:59 +02:00
parent 6cd6552343
commit 2b24b88745
48 changed files with 2856 additions and 2981 deletions
+8 -14
View File
@@ -80,25 +80,19 @@ public:
virtual void setErrorFilter(const ErrorFilter& filter);
virtual Id addNodeBookmark(const NodeBookmark& bookmark) = 0;
virtual Id addEdgeBookmark(const EdgeBookmark& bookmark) = 0;
virtual Id addBookmarkCategory(const BookmarkCategory& category) = 0;
virtual Id addNodeBookmark(const NodeBookmark& bookmark) = 0; // todo: remove these from storage access
virtual Id addEdgeBookmark(const EdgeBookmark& bookmark) = 0; // todo: remove these from storage access
virtual Id addBookmarkCategory(const std::string& categoryName) = 0; // todo: remove these from storage access
virtual void updateBookmark(const Id bookmarkId, const std::string& name, const std::string& comment, const std::string& categoryName) = 0; // todo: remove these from storage access
virtual void removeBookmark(const Id id) = 0; // todo: remove these from storage access
virtual void removeBookmarkCategory(const Id id) = 0; // todo: remove these from storage access
virtual std::vector<NodeBookmark> getAllNodeBookmarks() const = 0;
virtual NodeBookmark getNodeBookmarkById(const Id bookmarkId) const = 0;
virtual bool checkNodeBookmarkExistsByTokens(const std::vector<std::string>& tokenNames) const = 0;
virtual void removeNodeBookmark(Id id) = 0;
virtual void editNodeBookmark(const NodeBookmark& bookmark) = 0;
virtual std::vector<EdgeBookmark> getAllEdgeBookmarks() const = 0;
virtual EdgeBookmark getEdgeBookmarkById(const Id bookmarkId) const = 0;
virtual bool checkEdgeBookmarkExistsByTokens(const std::vector<std::string>& tokenNames) const = 0;
virtual void removeEdgeBookmark(Id id) = 0;
virtual void editEdgeBookmark(const EdgeBookmark& bookmark) = 0;
virtual std::vector<BookmarkCategory> getAllBookmarkCategories() const = 0;
virtual bool checkBookmarkCategoryExists(const std::string& name) const = 0;
virtual void removeBookmarkCategory(Id id) = 0;
protected:
ErrorFilter m_errorFilter;