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})
54
54
set (LIB_PUBLIC_HEADER
55
55
${PROJECT_BINARY_DIR} /include /albert/config.h # generated
56
56
${PROJECT_BINARY_DIR} /include /albert/export.h # generated
57
- include /albert/action.h
58
57
include /albert/albert.h
59
58
include /albert/extension.h
60
59
include /albert/extensionplugin.h
@@ -118,7 +117,6 @@ set(LIB_SRC
118
117
src/app/triggersqueryhandler.h
119
118
src/app/urlhandler.cpp
120
119
121
- src/common/action.cpp
122
120
src/common/extension.cpp
123
121
src/common/item.cpp
124
122
src/common/rankitem.cpp
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3
3
4
4
#pragma once
5
5
#include < QStringList>
6
- #include < albert/action.h>
7
6
#include < albert/export.h>
7
+ #include < functional>
8
8
#include < vector>
9
9
10
10
namespace albert
11
11
{
12
12
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
+
13
50
// /
14
51
// / Result items displayed in the query results list
15
52
// /
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments