main_window.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2016 ROBOTIS CO., LTD.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16 
17 /* Authors: Taehun Lim (Darby) */
18 
19 #ifndef DYNAMIXEL_WORKBENCH_SINGLE_MANAGER_GUI_MAIN_WINDOW_H
20 #define DYNAMIXEL_WORKBENCH_SINGLE_MANAGER_GUI_MAIN_WINDOW_H
21 
22 #ifndef Q_MOC_RUN
23 
24 #include <QMainWindow>
25 #include <QTimer>
26 #include "ui_main_window.h"
27 #include "qnode.hpp"
28 
29 #include "dynamixel_workbench_msgs/DynamixelCommand.h"
31 
32 #endif
33 
34 namespace main_window
35 {
36 
38 {
39  std::string device_name;
40  int baud_rate;
42 };
43 
45 {
46  int16_t model_number;
47  int8_t model_id;
48  std::string model_name;
50 };
51 
52 class MainWindow : public QMainWindow
53 {
54  Q_OBJECT
55 
56  public:
57  MainWindow(int argc, char** argv, QWidget *parent = 0);
58  ~MainWindow();
59 
60  void closeEvent(QCloseEvent *event);
61  void showNoMasterMessage();
62 
63  public Q_SLOTS:
64  void on_actionAbout_triggered();
65  void on_torque_enable_toggle_button_toggled(bool check);
66  void on_reboot_push_button_clicked(bool check);
67  void on_factory_reset_push_button_clicked(bool check);
68  void on_set_position_zero_push_button_clicked(bool check);
69 
70  void changeID();
71  void changeBaudrate();
72  void changeOperatingMode();
73  void changeControlTableValue();
74  void setEachAddressFunction(QString index);
75 
76  void updateDynamixelInfoLineEdit(dynamixel_workbench_msgs::DynamixelInfo dynamixel_info);
77  void updateListView();
78 
79  private:
80  Ui::MainWindowDesign ui_;
82  QTimer timer_;
83 
86 
89 
90  void InitUserInterface();
91  void InitConnect();
92 
93  void setIdComboBox();
94  void setBaudRateComboBox();
95  void setOperatingModeComboBox();
96  void setRebootButton();
97  void setAddressComboBox(bool torque_enable);
98 
99  void errorMsg();
100  void rightMsg();
101 };
102 }
103 
104 #endif // DYNAMIXEL_WORKBENCH_SINGLE_MANAGER_GUI_MAIN_WINDOW_H
ROSCPP_DECL bool check()
Ui::MainWindowDesign ui_
Definition: main_window.hpp:80
DynamixelTool * dynamixel_tool_
Definition: main_window.hpp:85
DynamixelLoadInfo lode_info
Definition: main_window.hpp:49
DynamixelInfo * dynamixel_info_
Definition: main_window.hpp:84


dynamixel_workbench_single_manager_gui
Author(s): Darby Lim
autogenerated on Mon Jun 10 2019 13:06:15