ui: node type keywords to filter autocompletions or activate all nodes (issue #78)

* Fix history stack activating wrong symbol when aggregation was clicked
This commit is contained in:
Eberhard Graether
2017-09-03 15:38:25 +02:00
parent 1d287541e3
commit 9f2509e7de
22 changed files with 333 additions and 94 deletions
+14
View File
@@ -73,6 +73,20 @@ std::string Node::getReadableTypeString(NodeType type)
return "";
}
Node::NodeType Node::getTypeForReadableTypeString(const std::string str)
{
for (Node::NodeTypeMask mask = 1; mask <= NODE_MAX_VALUE; mask *= 2)
{
Node::NodeType type = intToType(mask);
if (getReadableTypeString(type) == str)
{
return type;
}
}
return NODE_NON_INDEXED;
}
int Node::typeToInt(NodeType type)
{
return type;
+4 -1
View File
@@ -46,11 +46,14 @@ public:
NODE_FILE = 0x20000,
NODE_MACRO = 0x40000,
NODE_UNION = 0x80000
NODE_UNION = 0x80000,
NODE_MAX_VALUE = NODE_UNION
};
static std::string getUnderscoredTypeString(NodeType type);
static std::string getReadableTypeString(NodeType type);
static Node::NodeType getTypeForReadableTypeString(const std::string str);
static int typeToInt(NodeType type);
static NodeType intToType(int value);