Albert
Loading...
Searching...
No Matches
albert::QueryExecution Class Referenceabstract

#include <albert/queryexecution.h>

Description

Abstract asynchronous query execution interface.

Controls the execution of a query, reports busy state and allows to fetch results on demand.

Inherits QObject.

Public Member Functions

 QueryExecution (QueryContext &context)
 Constructs a query execution for context
 
virtual void cancel ()=0
 Cancels the query processing.
 
virtual void fetchMore ()=0
 Fetches more results.
 
virtual bool canFetchMore () const =0
 Returns true if there are more results to fetch, otherwise returns false.
 
virtual bool isActive () const =0
 Returns true if the query is being processed, otherwise returns false.
 

Public Attributes

const uint id
 The unique id of this query execution.
 
const QueryContextcontext
 The query context of this query execution.
 
QueryResults results
 The results of this query.
 

Signals

void activeChanged (bool active)
 Emitted when query processing started or finished.
 

Constructor & Destructor Documentation

◆ QueryExecution()

albert::QueryExecution::QueryExecution ( QueryContext context)

Constructs a query execution for context

Member Function Documentation

◆ activeChanged

void albert::QueryExecution::activeChanged ( bool  active)
signal

Emitted when query processing started or finished.

Note
The UI state machine expects results to be added only while active is true.

◆ cancel()

virtual void albert::QueryExecution::cancel ( )
pure virtual

Cancels the query processing.

◆ canFetchMore()

virtual bool albert::QueryExecution::canFetchMore ( ) const
pure virtual

Returns true if there are more results to fetch, otherwise returns false.

◆ fetchMore()

virtual void albert::QueryExecution::fetchMore ( )
pure virtual

Fetches more results.

◆ isActive()

virtual bool albert::QueryExecution::isActive ( ) const
pure virtual

Returns true if the query is being processed, otherwise returns false.

Member Data Documentation

◆ context

const QueryContext& albert::QueryExecution::context

The query context of this query execution.

◆ id

const uint albert::QueryExecution::id

The unique id of this query execution.

◆ results

QueryResults albert::QueryExecution::results

The results of this query.


The documentation for this class was generated from the following file: