Albert
Loading...
Searching...
No Matches
albert::Action Class Referencefinal

#include <albert/item.h>

Detailed Description

Action used by result items (Item).

Public Member Functions

template<typename T1 = QString, typename T2 = QString, typename T3 = std::function<void()>>
 Action (T1 &&id_, T2 &&text_, T3 &&function_, bool hide_on_activation_=true) noexcept
 Constructs an Action with the contents initialized with the data passed.
 

Public Attributes

QString id
 The identifier.
 
QString text
 The description.
 
std::function< void()> function
 The function executed on activation.
 
bool hide_on_activation
 The activation behavior.
 

Constructor & Destructor Documentation

◆ Action()

template<typename T1 = QString, typename T2 = QString, typename T3 = std::function<void()>>
albert::Action::Action ( T1 &&  id_,
T2 &&  text_,
T3 &&  function_,
bool  hide_on_activation_ = true 
)
inlinenoexcept

Constructs an Action with the contents initialized with the data passed.

Parameters
idThe identifier.
textThe description.
functionThe function executed on activation.
hideOnActivationThe activation behavior.

Member Data Documentation

◆ function

std::function<void()> albert::Action::function

The function executed on activation.

◆ hide_on_activation

bool albert::Action::hide_on_activation

The activation behavior.

◆ id

QString albert::Action::id

The identifier.

◆ text

QString albert::Action::text

The description.


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