Fcitx
candidateaction.h
1 /*
2  * SPDX-FileCopyrightText: 2024-2024 CSSlayer <wengxt@gmail.com>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-or-later
5  *
6  */
7 #ifndef _FCITX_CANDIDATEACTION_H_
8 #define _FCITX_CANDIDATEACTION_H_
9 
10 #include <memory>
11 #include <string>
12 #include <fcitx-utils/macros.h>
13 #include <fcitx/fcitxcore_export.h>
14 
15 namespace fcitx {
16 
17 class CandidateActionPrivate;
18 
19 class FCITXCORE_EXPORT CandidateAction {
20 public:
22  virtual ~CandidateAction();
23  FCITX_DECLARE_COPY_AND_MOVE(CandidateAction);
24 
25  FCITX_DECLARE_PROPERTY(int, id, setId);
26  FCITX_DECLARE_PROPERTY(std::string, text, setText);
27  FCITX_DECLARE_PROPERTY(bool, isSeparator, setSeparator);
28  FCITX_DECLARE_PROPERTY(std::string, icon, setIcon);
29  FCITX_DECLARE_PROPERTY(bool, isCheckable, setCheckable);
30  FCITX_DECLARE_PROPERTY(bool, isChecked, setChecked);
31 
32 private:
33  FCITX_DECLARE_PRIVATE(CandidateAction);
34  std::unique_ptr<CandidateActionPrivate> d_ptr;
35 };
36 
37 } // namespace fcitx
38 
39 #endif // _FCITX_CANDIDATEACTION_H_
Definition: action.cpp:17