ui: added smart search box
This change switches the search box in the search view from QLineEdit to the derived QtSmartSearchBox implementation, which is capeable of displaying tokens of the query as selectable button elements in different colors. It allows for all the usual mouse and keyboard interactions that the QLineEdit offers. fortune cookie message = Good news from someone dear is coming soon.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "utility/utilityString.h"
|
||||
|
||||
#include <strings.h>
|
||||
|
||||
namespace utility
|
||||
{
|
||||
std::deque<std::string> split(const std::string& str, char delimiter)
|
||||
@@ -116,4 +118,9 @@ namespace utility
|
||||
|
||||
return res.first == prefix.end();
|
||||
}
|
||||
|
||||
bool equalsCaseInsensitive(const std::string& a, const std::string& b)
|
||||
{
|
||||
return strcasecmp(a.c_str(), b.c_str()) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace utility
|
||||
std::string substrAfter(const std::string& str, char delimiter);
|
||||
|
||||
bool isPrefix(const std::string& prefix, const std::string& text);
|
||||
|
||||
bool equalsCaseInsensitive(const std::string& a, const std::string& b);
|
||||
}
|
||||
|
||||
#endif // UTILITY_STRING_H
|
||||
|
||||
Reference in New Issue
Block a user