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
-5
View File
@@ -625,11 +625,6 @@ StorageEdge PersistentStorage::getEdgeById(Id edgeId) const
return m_sqliteIndexStorage.getEdgeById(edgeId);
}
bool PersistentStorage::checkEdgeExists(Id edgeId) const
{
return m_sqliteIndexStorage.checkEdgeExists(edgeId);
}
std::shared_ptr<SourceLocationCollection> PersistentStorage::getFullTextSearchLocations(
const std::string& searchTerm, bool caseSensitive
) const
-1
View File
@@ -103,7 +103,6 @@ public:
virtual Id getIdForEdge(
Edge::EdgeType type, const NameHierarchy& fromNameHierarchy, const NameHierarchy& toNameHierarchy) const;
virtual StorageEdge getEdgeById(Id edgeId) const;
virtual bool checkEdgeExists(Id edgeId) const;
virtual std::shared_ptr<SourceLocationCollection> getFullTextSearchLocations(
const std::string& searchTerm, bool caseSensitive) const;
-21
View File
@@ -504,27 +504,6 @@ std::vector<StorageEdge> SqliteIndexStorage::getEdgesByTargetsType(const std::ve
return doGetAll<StorageEdge>("WHERE target_node_id IN (" + utility::join(utility::toStrings(targetIds), ',') + ") AND type == " + std::to_string(type));
}
bool SqliteIndexStorage::checkEdgeExists(Id edgeId) const
{
CppSQLite3Statement stmt = m_database.compileStatement(
("SELECT type FROM edge WHERE id == " + std::to_string(edgeId) + ";").c_str()
);
CppSQLite3Query q = executeQuery(stmt);
if (!q.eof())
{
const int type = q.getIntField(0, -1);
if (type != -1)
{
return true;
}
}
return false;
}
StorageNode SqliteIndexStorage::getNodeById(Id id) const
{
std::vector<StorageNode> candidates = doGetAll<StorageNode>("WHERE id = " + std::to_string(id));
-2
View File
@@ -67,8 +67,6 @@ public:
std::vector<StorageEdge> getEdgesByTargetType(Id targetId, int type) const;
std::vector<StorageEdge> getEdgesByTargetsType(const std::vector<Id>& targetIds, int type) const;
bool checkEdgeExists(Id edgeId) const;
StorageNode getNodeById(Id id) const;
StorageNode getNodeBySerializedName(const std::string& serializedName) const;
-1
View File
@@ -42,7 +42,6 @@ public:
virtual Id getIdForEdge(
Edge::EdgeType type, const NameHierarchy& fromNameHierarchy, const NameHierarchy& toNameHierarchy) const = 0;
virtual StorageEdge getEdgeById(Id edgeId) const = 0;
virtual bool checkEdgeExists(Id edgeId) const = 0;
virtual std::shared_ptr<SourceLocationCollection> getFullTextSearchLocations(
const std::string& searchTerm, bool caseSensitive) const = 0;
@@ -114,16 +114,6 @@ StorageEdge StorageAccessProxy::getEdgeById(Id edgeId) const
return StorageEdge();
}
bool StorageAccessProxy::checkEdgeExists(Id edgeId) const
{
if (hasSubject())
{
return m_subject->checkEdgeExists(edgeId);
}
return false;
}
std::shared_ptr<SourceLocationCollection> StorageAccessProxy::getFullTextSearchLocations(
const std::string &searchTerm, bool caseSensitive) const
{
-1
View File
@@ -30,7 +30,6 @@ public:
virtual Id getIdForEdge(
Edge::EdgeType type, const NameHierarchy& fromNameHierarchy, const NameHierarchy& toNameHierarchy) const;
virtual StorageEdge getEdgeById(Id edgeId) const;
virtual bool checkEdgeExists(Id edgeId) const;
virtual std::shared_ptr<SourceLocationCollection> getFullTextSearchLocations(
const std::string& searchTerm, bool caseSensitive) const;