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

#include <albert/triggerqueryhandler.h>

Inheritance diagram for albert::TriggerQueryHandler:
[legend]
Collaboration diagram for albert::TriggerQueryHandler:
[legend]

Detailed Description

Abstract trigger query handler.

If the trigger matches this handler is the only query handler chosen to process the user query. Inherit this class if you dont want your results to be reordered or if you want to display your items of a long running query as soon as they are available.

Public Member Functions

virtual QString synopsis () const
 The synopsis, displayed on empty query.
 
virtual bool allowTriggerRemap () const
 Enable user remapping of the trigger.
 
virtual QString defaultTrigger () const
 The default (not user defined) trigger.
 
virtual void setTrigger (const QString &)
 Setter for the user defined trigger.
 
virtual bool supportsFuzzyMatching () const
 Fuzzy matching capability.
 
virtual void setFuzzyMatching (bool enabled)
 Fuzzy matching behavior.
 
virtual void handleTriggerQuery (Query *)=0
 The trigger query processing function.
 
- Public Member Functions inherited from albert::Extension
virtual QString id () const =0
 The identifier of this extension.
 
virtual QString name () const =0
 Pretty, human readable name.
 
virtual QString description () const =0
 Brief description of this extension.
 

Protected Member Functions

 ~TriggerQueryHandler () override
 
- Protected Member Functions inherited from albert::Extension
virtual ~Extension ()
 

Constructor & Destructor Documentation

◆ ~TriggerQueryHandler()

albert::TriggerQueryHandler::~TriggerQueryHandler ( )
overrideprotected

Member Function Documentation

◆ allowTriggerRemap()

virtual bool albert::TriggerQueryHandler::allowTriggerRemap ( ) const
virtual

Enable user remapping of the trigger.

Returns
False.

◆ defaultTrigger()

virtual QString albert::TriggerQueryHandler::defaultTrigger ( ) const
virtual

The default (not user defined) trigger.

Returns
Extension::id().

◆ handleTriggerQuery()

virtual void albert::TriggerQueryHandler::handleTriggerQuery ( Query )
pure virtual

The trigger query processing function.

Note
Executed in a worker thread.

Implemented in albert::GlobalQueryHandler.

◆ setFuzzyMatching()

virtual void albert::TriggerQueryHandler::setFuzzyMatching ( bool  enabled)
virtual

Fuzzy matching behavior.

Default does nothing.

Reimplemented in albert::IndexQueryHandler.

◆ setTrigger()

virtual void albert::TriggerQueryHandler::setTrigger ( const QString &  )
virtual

Setter for the user defined trigger.

Reimplement this if you need this information.

Since
0.24

◆ supportsFuzzyMatching()

virtual bool albert::TriggerQueryHandler::supportsFuzzyMatching ( ) const
virtual

Fuzzy matching capability.

Returns
False.

Reimplemented in albert::IndexQueryHandler.

◆ synopsis()

virtual QString albert::TriggerQueryHandler::synopsis ( ) const
virtual

The synopsis, displayed on empty query.

Use this to give the user hints about accepted query strings.

Returns
Empty string.

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