Albert
Loading...
Searching...
No Matches
queryexecution.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Manuel Schneider
2// SPDX-License-Identifier: MIT
3
4#pragma once
5#include <QObject>
6#include <albert/export.h>
8
9namespace albert
10{
11
19class ALBERT_EXPORT QueryExecution : public QObject
20{
21 Q_OBJECT
22
23public:
24
27
29 const uint id;
30
33
36
38 virtual void cancel() = 0;
39
41 virtual void fetchMore() = 0;
42
44 virtual bool canFetchMore() const = 0;
45
47 virtual bool isActive() const = 0;
48
49signals:
50
56 void activeChanged(bool active);
57
58};
59
60} // namespace albert
Query interface.
Definition querycontext.h:19
Abstract asynchronous query execution interface.
Definition queryexecution.h:20
virtual void cancel()=0
Cancels the query processing.
void activeChanged(bool active)
Emitted when query processing started or finished.
const uint id
The unique id of this query execution.
Definition queryexecution.h:29
QueryResults results
The results of this query.
Definition queryexecution.h:35
virtual bool canFetchMore() const =0
Returns true if there are more results to fetch, otherwise returns false.
const QueryContext & context
The query context of this query execution.
Definition queryexecution.h:32
virtual bool isActive() const =0
Returns true if the query is being processed, otherwise returns false.
QueryExecution(QueryContext &context)
Constructs a query execution for context
virtual void fetchMore()=0
Fetches more results.
Query results container.
Definition queryresults.h:37
Definition app.h:56