main_window.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2018 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 #ifndef rh_p12_rn_gui_MAIN_WINDOW_H
18 #define rh_p12_rn_gui_MAIN_WINDOW_H
19 
20 /*****************************************************************************
21 ** Includes
22 *****************************************************************************/
23 
24 #ifndef Q_MOC_RUN
25 
26 #include <QtGui/QMainWindow>
27 #include <pthread.h>
28 #include "ui_main_window.h"
29 #include "qnode.hpp"
30 
31 #endif
32 
33 /*****************************************************************************
34 ** Namespace
35 *****************************************************************************/
36 
37 namespace rh_p12_rn_gui {
38 
39 /*****************************************************************************
40 ** Interface [MainWindow]
41 *****************************************************************************/
45 class MainWindow : public QMainWindow {
46  Q_OBJECT
47 
48 public:
49  MainWindow(int argc, char** argv, QWidget *parent = 0);
50  ~MainWindow();
51 
52  void closeEvent(QCloseEvent *event); // Overloaded function
53 
54 public Q_SLOTS:
55  /******************************************
56  ** Auto-connections (connectSlotsByName())
57  *******************************************/
58 
60  void on_current_mode_radio_clicked( bool check );
61 
62  void on_torque_onoff_check_clicked( bool check );
63 
64  void on_goal_current_slider_valueChanged( int value );
65  void on_goal_vel_slider_valueChanged( int value );
66  void on_goal_accel_slider_valueChanged( int value );
67  void on_goal_position_slider_valueChanged( int value );
68 
69  void on_min_position_button_clicked( bool check );
70  void on_max_position_button_clicked( bool check );
71  void on_goal_position_button_clicked( bool check );
72 
73  void on_auto_repeat_check_clicked( bool check );
74  void on_go_goal_psoition_check_clicked( bool check );
75 
76  /******************************************
77  ** Manual connections
78  *******************************************/
79  void valueChanged(int pos, int curr);
80 
81 private:
82  Ui::MainWindowDesign ui;
84 
86  pthread_t auto_thread_;
87 
88  static void *autoRepeatFunc(void *main_window);
89 };
90 
91 } // namespace rh_p12_rn_gui
92 
93 #endif // rh_p12_rn_gui_MAIN_WINDOW_H
void on_go_goal_psoition_check_clicked(bool check)
void on_goal_accel_slider_valueChanged(int value)
void on_auto_repeat_check_clicked(bool check)
ROSCPP_DECL bool check()
void on_torque_onoff_check_clicked(bool check)
void on_goal_position_slider_valueChanged(int value)
void on_goal_position_button_clicked(bool check)
void on_goal_current_slider_valueChanged(int value)
static void * autoRepeatFunc(void *main_window)
MainWindow(int argc, char **argv, QWidget *parent=0)
Definition: main_window.cpp:38
void on_min_position_button_clicked(bool check)
Qt central, all operations relating to the view part here.
Definition: main_window.hpp:45
void on_position_mode_radio_clicked(bool check)
Definition: main_window.cpp:80
Ui::MainWindowDesign ui
Definition: main_window.hpp:82
void on_max_position_button_clicked(bool check)
void valueChanged(int pos, int curr)
void on_current_mode_radio_clicked(bool check)
void closeEvent(QCloseEvent *event)
void on_goal_vel_slider_valueChanged(int value)


rh_p12_rn_gui
Author(s): Zerom
autogenerated on Mon Jun 10 2019 14:42:12