AuboStudio SDK 0.6.3

keyboard_manager.h
浏览该文件的文档.
1 #ifndef AUBO_CAPS_INTERFACE_KEYBOARD_MANAGER_H
2 #define AUBO_CAPS_INTERFACE_KEYBOARD_MANAGER_H
3
4 #include <string>
5 #include <functional>
6
7 #include <aubo_caps/class_forward.h>
8 #include <aubo_caps/domain/user_interface/input_validator.h>
9 #include <aubo/global_config.h>
10 class QWidget;
11
12 namespace arcs {
13 namespace aubo_scope {
14
15 ARCS_CLASS_FORWARD(KeyboardManager);
16 ARCS_CLASS_FORWARD(Expression);
17
18 class ARCS_ABI_EXPORT KeyboardManager
19 {
20 public:
21 KeyboardManager(KeyboardManager &f);
22 KeyboardManager(KeyboardManager &&f);
23 virtual ~KeyboardManager();
24
25 /**
26 * @brief registerStandardKeyboard 注册标准键盘
27 * @param wd: 当前要书写的控件，比如　ui->lineedit
28 * @param init_cb: 初始 edit 自带的字符串输出到键盘
29 * @param validator: 键盘的过滤器
30 * @param result_cb: 把当前键盘中的值发送到 edit
31 */
32 ARCS_DEPRECATED void registerStandardKeyboard(
33 QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
34 const std::shared_ptr<InputValidator> &validator = nullptr,
35 std::function<void(std::string)> result_cb = nullptr);
36 /**
37 * @brief registerStandardKeyboard
38 * @param wd: 当前要书写的控件，比如　ui->lineedit
39 * @param init_cb:
40 * 当前控件存储的内容以表达式指针的形式表示　将指针指向的内容发送到键盘
41 * @param result_cb　将当前键盘的内容的 Expression　存储　然后已 string
42 * 的格式显示到控件
43 * @param validator: 键盘的过滤器
44 */
45 void registerStandardKeyboard(
46 QWidget *wd, std::function<ExpressionPtr(void)> init_cb,
47 std::function<void(ExpressionPtr)> result_cb,
48 const std::shared_ptr<InputValidator> &validator = nullptr);
49
50 /// 注册字符串键盘
51 ARCS_DEPRECATED void registerStringKeyboard(
52 QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
53 const std::shared_ptr<InputValidator> &validator = nullptr,
54 std::function<void(std::string)> result_cb = nullptr);
55 void registerStringKeyboard(
56 QWidget *wd, std::function<ExpressionPtr(void)> init_cb,
57 std::function<void(ExpressionPtr)> result_cb,
58 const std::shared_ptr<InputValidator> &validator = nullptr);
59
60 /// 注册密码键盘
61 ARCS_DEPRECATED void registerPasswordKeyboard(
62 QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
63 const std::shared_ptr<InputValidator> &validator = nullptr,
64 std::function<void(std::string)> result_cb = nullptr);
65 void registerPasswordKeyboard(
66 QWidget *wd, std::function<ExpressionPtr(void)> init_cb,
67 std::function<void(ExpressionPtr)> result_cb,
68 const std::shared_ptr<InputValidator> &validator = nullptr);
69
70 /// 注册多行代码编辑键盘
71 ARCS_DEPRECATED void registerCodeEditerKeyboard(
72 QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
73 const std::shared_ptr<InputValidator> &validator = nullptr,
74 std::function<void(std::string)> result_cb = nullptr);
75 void registerCodeEditerKeyboard(
76 QWidget *wd, std::function<ExpressionPtr(void)> init_cb,
77 std::function<void(ExpressionPtr)> result_cb,
78 const std::shared_ptr<InputValidator> &validator = nullptr);
79
80 void registerNumberKeyboard(
81 QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
82 const std::shared_ptr<InputValidator> &validator = nullptr,
83 std::function<void(std::string)> result_cb = nullptr);
84 void registerDoubleKeyboard(
85 QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
86 const std::shared_ptr<InputValidator> &validator = nullptr,
87 std::function<void(std::string)> result_cb = nullptr);
88 void registerPositiveDoubleKeyboard(
89 QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
90 const std::shared_ptr<InputValidator> &validator = nullptr,
91 std::function<void(std::string)> result_cb = nullptr);
92 void registerIntegerKeyboard(
93 QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
94 const std::shared_ptr<InputValidator> &validator = nullptr,
95 std::function<void(std::string)> result_cb = nullptr);
96 void registerPositiveIntegerKeyboard(
97 QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
98 const std::shared_ptr<InputValidator> &validator = nullptr,
99 std::function<void(std::string)> result_cb = nullptr);
100 void registerIPAddressKeyboard(
101 QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
102 std::function<void(std::string)> result_cb = nullptr);
103 void registerExpressionKeyboard(
104 QWidget *wd, std::function<ExpressionPtr(void)> init_cb = nullptr,
105 std::function<void(ExpressionPtr result_value)> result_cb = nullptr,
106 std::shared_ptr<InputValidator> validator = nullptr);
107
108 private:
109 friend class DataSwitch;
110 KeyboardManager();
111 void *d_{ nullptr };
112 };
113
114 } // namespace aubo_scope
115 } // namespace arcs
116
117 #endif // AUBO_CAPS_INTERFACE_KEYBOARD_MANAGER_H
class_forward.h
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
arcs::aubo_scope::Expression
Definition: expression.h:26
arcs::aubo_scope::KeyboardManager
Definition: keyboard_manager.h:19
arcs::aubo_scope::KeyboardManager::registerCodeEditerKeyboard
ARCS_DEPRECATED void registerCodeEditerKeyboard(QWidget *wd, std::function< std::string(void)> init_cb=nullptr, const std::shared_ptr< InputValidator > &validator=nullptr, std::function< void(std::string)> result_cb=nullptr)
注册多行代码编辑键盘
arcs::aubo_scope::KeyboardManager::registerPasswordKeyboard
ARCS_DEPRECATED void registerPasswordKeyboard(QWidget *wd, std::function< std::string(void)> init_cb=nullptr, const std::shared_ptr< InputValidator > &validator=nullptr, std::function< void(std::string)> result_cb=nullptr)
注册密码键盘
arcs::aubo_scope::KeyboardManager::registerPositiveDoubleKeyboard
void registerPositiveDoubleKeyboard(QWidget *wd, std::function< std::string(void)> init_cb=nullptr, const std::shared_ptr< InputValidator > &validator=nullptr, std::function< void(std::string)> result_cb=nullptr)
arcs::aubo_scope::KeyboardManager::registerDoubleKeyboard
void registerDoubleKeyboard(QWidget *wd, std::function< std::string(void)> init_cb=nullptr, const std::shared_ptr< InputValidator > &validator=nullptr, std::function< void(std::string)> result_cb=nullptr)
arcs::aubo_scope::KeyboardManager::registerStringKeyboard
void registerStringKeyboard(QWidget *wd, std::function< ExpressionPtr(void)> init_cb, std::function< void(ExpressionPtr)> result_cb, const std::shared_ptr< InputValidator > &validator=nullptr)
arcs::aubo_scope::KeyboardManager::registerPositiveIntegerKeyboard
void registerPositiveIntegerKeyboard(QWidget *wd, std::function< std::string(void)> init_cb=nullptr, const std::shared_ptr< InputValidator > &validator=nullptr, std::function< void(std::string)> result_cb=nullptr)
arcs::aubo_scope::KeyboardManager::registerPasswordKeyboard
void registerPasswordKeyboard(QWidget *wd, std::function< ExpressionPtr(void)> init_cb, std::function< void(ExpressionPtr)> result_cb, const std::shared_ptr< InputValidator > &validator=nullptr)
arcs::aubo_scope::KeyboardManager::registerExpressionKeyboard
void registerExpressionKeyboard(QWidget *wd, std::function< ExpressionPtr(void)> init_cb=nullptr, std::function< void(ExpressionPtr result_value)> result_cb=nullptr, std::shared_ptr< InputValidator > validator=nullptr)
arcs::aubo_scope::KeyboardManager::registerStandardKeyboard
ARCS_DEPRECATED void registerStandardKeyboard(QWidget *wd, std::function< std::string(void)> init_cb=nullptr, const std::shared_ptr< InputValidator > &validator=nullptr, std::function< void(std::string)> result_cb=nullptr)
registerStandardKeyboard 注册标准键盘
arcs::aubo_scope::KeyboardManager::KeyboardManager
KeyboardManager()
arcs::aubo_scope::KeyboardManager::registerIPAddressKeyboard
void registerIPAddressKeyboard(QWidget *wd, std::function< std::string(void)> init_cb=nullptr, std::function< void(std::string)> result_cb=nullptr)
arcs::aubo_scope::KeyboardManager::KeyboardManager
KeyboardManager(KeyboardManager &f)
arcs::aubo_scope::KeyboardManager::registerNumberKeyboard
void registerNumberKeyboard(QWidget *wd, std::function< std::string(void)> init_cb=nullptr, const std::shared_ptr< InputValidator > &validator=nullptr, std::function< void(std::string)> result_cb=nullptr)
arcs::aubo_scope::KeyboardManager::registerCodeEditerKeyboard
void registerCodeEditerKeyboard(QWidget *wd, std::function< ExpressionPtr(void)> init_cb, std::function< void(ExpressionPtr)> result_cb, const std::shared_ptr< InputValidator > &validator=nullptr)
arcs::aubo_scope::KeyboardManager::registerStringKeyboard
ARCS_DEPRECATED void registerStringKeyboard(QWidget *wd, std::function< std::string(void)> init_cb=nullptr, const std::shared_ptr< InputValidator > &validator=nullptr, std::function< void(std::string)> result_cb=nullptr)
注册字符串键盘
arcs::aubo_scope::KeyboardManager::~KeyboardManager
virtual ~KeyboardManager()
arcs::aubo_scope::KeyboardManager::registerStandardKeyboard
void registerStandardKeyboard(QWidget *wd, std::function< ExpressionPtr(void)> init_cb, std::function< void(ExpressionPtr)> result_cb, const std::shared_ptr< InputValidator > &validator=nullptr)
registerStandardKeyboard
arcs::aubo_scope::KeyboardManager::registerIntegerKeyboard
void registerIntegerKeyboard(QWidget *wd, std::function< std::string(void)> init_cb=nullptr, const std::shared_ptr< InputValidator > &validator=nullptr, std::function< void(std::string)> result_cb=nullptr)
arcs::aubo_scope::KeyboardManager::KeyboardManager
KeyboardManager(KeyboardManager &&f)
input_validator.h
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs
Definition: contribution_provider.h:7