Albert
Loading...
Searching...
No Matches
action.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2024 Manuel Schneider
2// SPDX-License-Identifier: MIT
3
4#pragma once
5#include <QString>
6#include <albert/export.h>
7#include <functional>
8
9namespace albert
10{
11
15class ALBERT_EXPORT Action final
16{
17public:
18
23 Action(QString id, QString text, std::function<void()> function) noexcept;
24
26 QString id;
27
29 QString text;
30
32 std::function<void()> function;
33};
34
35}
Action used by result items (Item).
Definition action.h:16
QString text
The description of the action.
Definition action.h:29
Action(QString id, QString text, std::function< void()> function) noexcept
Action constructor.
std::function< void()> function
The action function.
Definition action.h:32
QString id
The identifier of the action.
Definition action.h:26
Definition action.h:10