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

#include <item.h>

Inheritance diagram for albert::Item:
albert::StandardItem

Detailed Description

Items displayed in the query results list.

Public Member Functions

virtual ~Item ()=default
 
virtual QString id () const =0
 Getter for the item identifier. More...
 
virtual QString text () const =0
 Getter for the item text. More...
 
virtual QString subtext () const =0
 Getter for the item subtext. More...
 
virtual QStringList iconUrls () const =0
 Getter for the items iconUrls. More...
 
virtual QString inputActionText () const
 Getter for the input action text. More...
 
virtual std::vector< Actionactions () const
 Getter for item actions. More...
 

Constructor & Destructor Documentation

◆ ~Item()

virtual albert::Item::~Item ( )
virtualdefault

Member Function Documentation

◆ actions()

virtual std::vector< Action > albert::Item::actions ( ) const
virtual

Getter for item actions.

These are the actions a users can run.

Reimplemented in albert::StandardItem.

◆ iconUrls()

virtual QStringList albert::Item::iconUrls ( ) const
pure virtual

Getter for the items iconUrls.

Used to get the item icon using the IconProvider.

Implemented in albert::StandardItem.

◆ id()

virtual QString albert::Item::id ( ) const
pure virtual

Getter for the item identifier.

Has to be unique per extension.

This function is involved in several time critical operartion such as indexing and sorting. It is therefore recommended to return a string that is as short as possible as fast as possible.

Implemented in albert::StandardItem.

◆ inputActionText()

virtual QString albert::Item::inputActionText ( ) const
virtual

Getter for the input action text.

Used as input text replacement (usually by pressing Tab).

Reimplemented in albert::StandardItem.

◆ subtext()

virtual QString albert::Item::subtext ( ) const
pure virtual

Getter for the item subtext.

Secondary descriptive text displayed in a list item.

Implemented in albert::StandardItem.

◆ text()

virtual QString albert::Item::text ( ) const
pure virtual

Getter for the item text.

Primary text displayed emphasized in a list item.

This string is used in scoring. It is therefore recommended to return as fast as possible. The text length is used as divisor for scoring, hence the string must not be empty, otherwise you get undefined behavior. For performance reasons text length is not checked.

Implemented in albert::StandardItem.


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