Albert
Loading...
Searching...
No Matches
query.h
1
// SPDX-FileCopyrightText: 2025 Manuel Schneider
2
// SPDX-License-Identifier: MIT
3
4
#pragma once
5
#include <QString>
6
#include <albert/export.h>
7
#include <albert/querycontext.h>
8
#include <memory>
9
#include <vector>
10
class
QueryEngine;
11
namespace
albert
12
{
13
class
QueryHandler;
14
class
QueryResult;
15
class
QueryResults;
16
class
QueryExecution;
17
}
// namespace albert
18
19
namespace
albert::detail
20
{
21
23
class
ALBERT_EXPORT Query :
public
albert::QueryContext
24
{
25
public
:
27
Query(UsageScoring usage_scoring,
28
std::vector<albert::QueryResult> &&fallbacks,
29
QueryHandler &handler,
30
QString trigger,
31
QString
string
);
32
34
~Query();
35
37
bool
isValid()
const override
;
38
40
QueryHandler &handler()
const override
;
41
43
QString trigger()
const override
;
44
46
QString query()
const override
;
47
49
const
UsageScoring &usageScoring()
const override
;
50
52
QueryExecution &execution()
const
;
53
55
void
cancel();
56
58
QueryResults &matches();
59
61
QueryResults &fallbacks();
62
63
private
:
64
class
Private;
65
std::unique_ptr<Private> d;
66
};
67
68
}
// namespace albert::detail
albert::QueryContext
Query interface.
Definition
querycontext.h:19
albert
The Albert namespace.
Definition
app.h:55
workspace
albert
include
albert
query.h
Generated by
1.9.8