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:
@@ -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) + "'");
|
||||
|
||||
Reference in New Issue
Block a user