ui: search view autocompletion

- Implemented autocompletion for the QtSearchView.
- Added: MessageFinishedParsing that will be dispatched by the Project after the parsing step is done.
- Moved the initial MessageActivateToken from the Project to the Application.
- Added getNamesForNodesWithNamePrefix() to GraphAccess.
This commit is contained in:
malte_langkabel
2014-07-07 11:25:46 +02:00
parent a70a9009cc
commit c02767362f
18 changed files with 162 additions and 11 deletions
+15
View File
@@ -8,6 +8,7 @@
#include "data/parser/ParseLocation.h"
#include "data/parser/ParseVariable.h"
#include "utility/logging/logging.h"
#include "utility/utilityString.h"
Storage::Storage()
{
@@ -191,6 +192,20 @@ std::string Storage::getNameForNodeWithId(Id id) const
return (node ? node->getName() : "");
}
std::vector<std::string> Storage::getNamesForNodesWithNamePrefix(const std::string& prefix) const
{
std::vector<std::string> names;
m_graph.forEachNode([&](Node* node){
const std::string& nodeName = node->getName();
if (utility::isPrefix(prefix, nodeName))
{
names.push_back(nodeName);
}
});
return names;
}
TokenLocationCollection Storage::getTokenLocationsForTokenId(Id id) const
{
TokenLocationCollection ret;