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:
@@ -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
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user