AuboCaps  0.6.0
keyboard_manager.h
Go to the documentation of this file.
1 #ifndef AUBO_CAPS_INTERFACE_KEYBOARD_MANAGER_H
2 #define AUBO_CAPS_INTERFACE_KEYBOARD_MANAGER_H
3 
4 #include <string>
5 #include <functional>
6 
9 
10 class QWidget;
11 
12 namespace arcs {
13 namespace aubo_scope {
14 
15 ARCS_CLASS_FORWARD(KeyboardManager);
16 ARCS_CLASS_FORWARD(Expression);
17 
19 {
20 public:
23  virtual ~KeyboardManager();
24 
25  void registerStandardKeyboard(
26  QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
27  const std::shared_ptr<InputValidator> &validator = nullptr,
28  std::function<void(std::string)> result_cb = nullptr);
29  void registerStringKeyboard(
30  QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
31  const std::shared_ptr<InputValidator> &validator = nullptr,
32  std::function<void(std::string)> result_cb = nullptr);
33  void registerPasswordKeyboard(
34  QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
35  const std::shared_ptr<InputValidator> &validator = nullptr,
36  std::function<void(std::string)> result_cb = nullptr);
37  void registerCodeEditerKeyboard(
38  QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
39  const std::shared_ptr<InputValidator> &validator = nullptr,
40  std::function<void(std::string)> result_cb = nullptr);
41  void registerNumberKeyboard(
42  QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
43  const std::shared_ptr<InputValidator> &validator = nullptr,
44  std::function<void(std::string)> result_cb = nullptr);
45  void registerDoubleKeyboard(
46  QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
47  const std::shared_ptr<InputValidator> &validator = nullptr,
48  std::function<void(std::string)> result_cb = nullptr);
49  void registerPositiveDoubleKeyboard(
50  QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
51  const std::shared_ptr<InputValidator> &validator = nullptr,
52  std::function<void(std::string)> result_cb = nullptr);
53  void registerIntegerKeyboard(
54  QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
55  const std::shared_ptr<InputValidator> &validator = nullptr,
56  std::function<void(std::string)> result_cb = nullptr);
57  void registerPositiveIntegerKeyboard(
58  QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
59  const std::shared_ptr<InputValidator> &validator = nullptr,
60  std::function<void(std::string)> result_cb = nullptr);
61  void registerIPAddressKeyboard(
62  QWidget *wd, std::function<std::string(void)> init_cb = nullptr,
63  std::function<void(std::string)> result_cb = nullptr);
64  void registerExpressionKeyboard(
65  QWidget *wd, std::function<ExpressionPtr(void)> init_cb = nullptr,
66  std::function<void(ExpressionPtr result_value)> result_cb = nullptr,
67  std::shared_ptr<InputValidator> validator = nullptr);
68 
69 private:
70  friend class DataSwitch;
72  void *d_{ nullptr };
73 };
74 
75 } // namespace aubo_scope
76 } // namespace arcs
77 
78 #endif // AUBO_CAPS_INTERFACE_KEYBOARD_MANAGER_H
ARCS_CLASS_FORWARD(GripForceCapability)
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16