ui: Added custom trail dialog (issue #249)

* open custom trail dialg via button in top of trail controls
* search from symbol to symbol or all referenced/referencing of symbol
* define search depth with slider
* define horizontal/vertical layout
* define node and edge types
* renamed depth graph to trail in graph ui
* added custom trail UI tests

fortune cookie message = A happy surprise is waiting for you.
This commit is contained in:
Eberhard Graether
2019-07-29 11:25:34 +02:00
parent 6a2c59f3e5
commit 68c9782e33
54 changed files with 1740 additions and 130 deletions
@@ -758,6 +758,46 @@ StorageNode SqliteIndexStorage::getNodeBySerializedName(const std::wstring& seri
return StorageNode();
}
std::vector<int> SqliteIndexStorage::getAvailableNodeTypes() const
{
CppSQLite3Query q = executeQuery("SELECT DISTINCT type FROM node;");
std::vector<int> types;
while (!q.eof())
{
const int type = q.getIntField(0, -1);
if (type != -1)
{
types.push_back(type);
}
q.nextRow();
}
return types;
}
std::vector<int> SqliteIndexStorage::getAvailableEdgeTypes() const
{
CppSQLite3Query q = executeQuery("SELECT DISTINCT type FROM edge;");
std::vector<int> types;
while (!q.eof())
{
const int type = q.getIntField(0, -1);
if (type != -1)
{
types.push_back(type);
}
q.nextRow();
}
return types;
}
StorageFile SqliteIndexStorage::getFileByPath(const std::wstring& filePath) const
{
return doGetFirst<StorageFile>("WHERE file.path == '" + utility::encodeToUtf8(filePath) + "'");