shared: LooqsQuery: Add outline search filters
This commit is contained in:
parent
517e62dca2
commit
763bc47a89
@ -29,6 +29,11 @@ bool LooqsQuery::hasContentSearch() const
|
|||||||
return (this->getTokensMask() & FILTER_CONTENT) == FILTER_CONTENT;
|
return (this->getTokensMask() & FILTER_CONTENT) == FILTER_CONTENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LooqsQuery::hasOutlineSearch() const
|
||||||
|
{
|
||||||
|
return (this->getTokensMask() & FILTER_OUTLINE_CONTAINS) == FILTER_OUTLINE_CONTAINS;
|
||||||
|
}
|
||||||
|
|
||||||
bool LooqsQuery::hasPathSearch() const
|
bool LooqsQuery::hasPathSearch() const
|
||||||
{
|
{
|
||||||
return (this->getTokensMask() & FILTER_PATH) == FILTER_PATH;
|
return (this->getTokensMask() & FILTER_PATH) == FILTER_PATH;
|
||||||
@ -289,6 +294,10 @@ LooqsQuery LooqsQuery::build(QString expression, TokenType loneWordsTokenType, b
|
|||||||
{
|
{
|
||||||
tokenType = FILTER_TAG_ASSIGNED;
|
tokenType = FILTER_TAG_ASSIGNED;
|
||||||
}
|
}
|
||||||
|
else if(filtername == "toc" || filtername == "outline")
|
||||||
|
{
|
||||||
|
tokenType = FILTER_OUTLINE_CONTAINS;
|
||||||
|
}
|
||||||
// TODO: given this is not really a "filter", this feels slightly misplaced here
|
// TODO: given this is not really a "filter", this feels slightly misplaced here
|
||||||
else if(filtername == "sort")
|
else if(filtername == "sort")
|
||||||
{
|
{
|
||||||
|
@ -68,6 +68,7 @@ class LooqsQuery
|
|||||||
this->limit = limit;
|
this->limit = limit;
|
||||||
}
|
}
|
||||||
bool hasContentSearch() const;
|
bool hasContentSearch() const;
|
||||||
|
bool hasOutlineSearch() const;
|
||||||
bool hasPathSearch() const;
|
bool hasPathSearch() const;
|
||||||
|
|
||||||
void addSortCondition(SortCondition sc);
|
void addSortCondition(SortCondition sc);
|
||||||
|
Loading…
Reference in New Issue
Block a user