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>
7
#include <
albert/queryresults.h
>
8
9
namespace
albert
10
{
11
19
class
ALBERT_EXPORT
QueryExecution
:
public
QObject
20
{
21
Q_OBJECT
22
23
public
:
24
26
QueryExecution
(
QueryContext
&context);
27
29
const
uint
id
;
30
32
const
QueryContext
&
context
;
33
35
QueryResults
results
;
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
49
signals:
50
56
void
activeChanged
(
bool
active);
57
58
};
59
60
}
// namespace albert
albert::QueryContext
Query interface.
Definition
querycontext.h:19
albert::QueryExecution
Abstract asynchronous query execution interface.
Definition
queryexecution.h:20
albert::QueryExecution::cancel
virtual void cancel()=0
Cancels the query processing.
albert::QueryExecution::activeChanged
void activeChanged(bool active)
Emitted when query processing started or finished.
albert::QueryExecution::id
const uint id
The unique id of this query execution.
Definition
queryexecution.h:29
albert::QueryExecution::results
QueryResults results
The results of this query.
Definition
queryexecution.h:35
albert::QueryExecution::canFetchMore
virtual bool canFetchMore() const =0
Returns true if there are more results to fetch, otherwise returns false.
albert::QueryExecution::context
const QueryContext & context
The query context of this query execution.
Definition
queryexecution.h:32
albert::QueryExecution::isActive
virtual bool isActive() const =0
Returns true if the query is being processed, otherwise returns false.
albert::QueryExecution::QueryExecution
QueryExecution(QueryContext &context)
Constructs a query execution for context
albert::QueryExecution::fetchMore
virtual void fetchMore()=0
Fetches more results.
albert::QueryResults
Query results container.
Definition
queryresults.h:37
albert
Definition
app.h:56
queryresults.h
workspace
albert
include
albert
queryexecution.h
Generated by
1.9.8