File tree Expand file tree Collapse file tree 4 files changed +38
-54
lines changed Expand file tree Collapse file tree 4 files changed +38
-54
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ set(TARGET_LIB lib${PROJECT_NAME})
5454set (LIB_PUBLIC_HEADER
5555 ${PROJECT_BINARY_DIR} /include /albert/config.h # generated
5656 ${PROJECT_BINARY_DIR} /include /albert/export.h # generated
57- include /albert/action.h
5857 include /albert/albert.h
5958 include /albert/extension.h
6059 include /albert/extensionplugin.h
@@ -118,7 +117,6 @@ set(LIB_SRC
118117 src/app/triggersqueryhandler.h
119118 src/app/urlhandler.cpp
120119
121- src/common/action.cpp
122120 src/common/extension.cpp
123121 src/common/item.cpp
124122 src/common/rankitem.cpp
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33
44#pragma once
55#include < QStringList>
6- #include < albert/action.h>
76#include < albert/export.h>
7+ #include < functional>
88#include < vector>
99
1010namespace albert
1111{
1212
13+ // / Action used by result items (\ref Item).
14+ class ALBERT_EXPORT Action final
15+ {
16+ public:
17+
18+ // / Constructs an \ref Action with the contents initialized with the data passed.
19+ // / \param id \copybrief id
20+ // / \param text \copybrief text
21+ // / \param function \copybrief function
22+ // / \param hideOnActivation \copybrief hide_on_activation
23+ template <typename T1 = QString,
24+ typename T2 = QString,
25+ typename T3 = std::function<void ()>>
26+ Action (T1 &&id_,
27+ T2 &&text_,
28+ T3 &&function_,
29+ bool hide_on_activation_ = true ) noexcept :
30+ id (std::forward<T1>(id_)),
31+ text (std::forward<T2>(text_)),
32+ function (std::forward<T3>(function_)),
33+ hide_on_activation (hide_on_activation_)
34+ {}
35+
36+ // / The identifier.
37+ QString id;
38+
39+ // / The description.
40+ QString text;
41+
42+ // / The function executed on activation.
43+ std::function<void ()> function;
44+
45+ // / The activation behavior.
46+ bool hide_on_activation;
47+ };
48+
49+
1350// /
1451// / Result items displayed in the query results list
1552// /
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments