Albert
Loading...
Searching...
No Matches
indexqueryhandler.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2024 Manuel Schneider
2// SPDX-License-Identifier: MIT
3
4#pragma once
5#include <QString>
7#include <albert/indexitem.h>
8#include <memory>
9#include <vector>
10
11namespace albert
12{
13
17class ALBERT_EXPORT IndexQueryHandler : public GlobalQueryHandler
18{
19public:
21
23 bool supportsFuzzyMatching() const override;
24
27 void setFuzzyMatching(bool) override;
28
30 std::vector<RankItem> handleGlobalQuery(const Query*) override;
31
39 virtual void updateIndexItems() = 0;
40
44 void setIndexItems(std::vector<IndexItem>&&);
45
46protected:
47
49
50private:
51
52 class Private;
53 std::unique_ptr<Private> d;
54
55};
56
57}
Abstract global query handler.
Definition globalqueryhandler.h:23
Index query handler class.
Definition indexqueryhandler.h:18
bool supportsFuzzyMatching() const override
Returns "True".
std::vector< RankItem > handleGlobalQuery(const Query *) override
Uses the index to override GlobalQueryHandler::handleGlobalQuery.
void setFuzzyMatching(bool) override
Set the fuzzy mode of the internal index.
virtual void updateIndexItems()=0
Update the index.
void setIndexItems(std::vector< IndexItem > &&)
Set the items of the index.
Common query object.
Definition query.h:20
Definition action.h:10