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
@@ -17,7 +17,6 @@ public:
return "MessageActivateToken";
}
public:
const Id tokenId;
};
@@ -0,0 +1,19 @@
#ifndef MESSAGE_FINISHED_PARSING_H
#define MESSAGE_FINISHED_PARSING_H
#include "utility/messaging/Message.h"
class MessageFinishedParsing: public Message<MessageFinishedParsing>
{
public:
MessageFinishedParsing()
{
}
static const std::string getStaticType()
{
return "MessageFinishedParsing";
}
};
#endif // MESSAGE_FINISHED_PARSING_H
+8
View File
@@ -23,4 +23,12 @@ namespace utility
return vec;
}
bool isPrefix(const std::string& prefix, const std::string& text)
{
typedef std::pair<std::string::const_iterator, std::string::const_iterator> ResType;
ResType res = std::mismatch(prefix.begin(), prefix.end(), text.begin());
return res.first == prefix.end();
}
}
+2
View File
@@ -8,6 +8,8 @@ namespace utility
{
std::vector<std::string> split(const std::string& str, char delimiter);
std::vector<std::string> split(const std::string& str, const std::string& delimiter);
bool isPrefix(const std::string& prefix, const std::string& text);
}
#endif // UTILITY_STRING_H