params_submenu.cpp
Go to the documentation of this file.
2 #include <ui_params_submenu.h>
3 
4 choreo_gui::ParamsSubmenu::ParamsSubmenu(QWidget* parent) : QWidget(parent)
5 {
6  ui_ = new Ui::ParamsSubmenu();
7  ui_->setupUi(this);
8 
9  // Set up option menus
10  // ModelInput
11  model_input_widget_ = new ModelInputConfigWidget(choreo_msgs::ModelInputParameters());
12  connect(ui_->pushbutton_model_input, SIGNAL(clicked()), model_input_widget_, SLOT(show()));
13 
14  // Path Input
15  task_sequence_input_widget_ = new TaskSequenceInputConfigWidget(choreo_msgs::TaskSequenceInputParameters());
16  connect(ui_->pushbutton_task_sequence_input, SIGNAL(clicked()), task_sequence_input_widget_, SLOT(show()));
17 
18  // Robot Input
19  robot_input_widget_ = new RobotInputConfigWidget(choreo_msgs::RobotInputParameters());
20  connect(ui_->pushbutton_robot_input, SIGNAL(clicked()), robot_input_widget_, SLOT(show()));
21 
22  // Output Path Input
23  output_save_dir_input_widget_ = new OutputSaveDirInputConfigWidget(choreo_msgs::OutputSaveDirInputParameters());
24  connect(ui_->pushbutton_output_save_dir_input, SIGNAL(clicked()), output_save_dir_input_widget_, SLOT(show()));
25 
26  // Save Request Connection
27  connect(model_input_widget_, SIGNAL(parameters_save_requested()), this, SIGNAL(saveRequested()));
28  connect(task_sequence_input_widget_, SIGNAL(parameters_save_requested()), this, SIGNAL(saveRequested()));
29  connect(robot_input_widget_, SIGNAL(parameters_save_requested()), this, SIGNAL(saveRequested()));
30  connect(output_save_dir_input_widget_, SIGNAL(parameters_save_requested()), this, SIGNAL(saveRequested()));
31 
32  // Accept Request Connection
33  connect(model_input_widget_, SIGNAL(parameters_changed()), this, SIGNAL(acceptRequested()));
34  connect(task_sequence_input_widget_, SIGNAL(parameters_changed()), this, SIGNAL(acceptRequested()));
35  connect(robot_input_widget_, SIGNAL(parameters_changed()), this, SIGNAL(acceptRequested()));
36  connect(output_save_dir_input_widget_, SIGNAL(parameters_changed()), this, SIGNAL(acceptRequested()));
37 }
38 
40 {
41  if(enable)
42  {
44  }
45  else
46  {
48  }
49 }
50 
51 const choreo_msgs::ModelInputParameters& choreo_gui::ParamsSubmenu::modelInputParams() const
52 {
53  return model_input_widget_->params();
54 }
55 
56 void choreo_gui::ParamsSubmenu::setModelInputParams(const choreo_msgs::ModelInputParameters& params)
57 {
58  model_input_widget_->params() = params;
60 }
61 
62 const choreo_msgs::TaskSequenceInputParameters& choreo_gui::ParamsSubmenu::taskSequenceInputParams() const
63 {
65 }
66 
67 void choreo_gui::ParamsSubmenu::setTaskSequenceInputParams(const choreo_msgs::TaskSequenceInputParameters& params)
68 {
71 }
72 
73 const choreo_msgs::RobotInputParameters& choreo_gui::ParamsSubmenu::robotInputParams() const
74 {
75  return robot_input_widget_->params();
76 }
77 
78 void choreo_gui::ParamsSubmenu::setRobotInputParams(const choreo_msgs::RobotInputParameters& params)
79 {
80  robot_input_widget_->params() = params;
82 }
83 
84 const choreo_msgs::OutputSaveDirInputParameters& choreo_gui::ParamsSubmenu::outputSaveDirInputParams() const
85 {
87 }
88 
89 void choreo_gui::ParamsSubmenu::setOutputSaveDirInputParams(const choreo_msgs::OutputSaveDirInputParameters& params)
90 {
93 }
OutputSaveDirInputConfigWidget * output_save_dir_input_widget_
void setModelInputParams(const choreo_msgs::ModelInputParameters &params)
TaskSequenceInputConfigWidget * task_sequence_input_widget_
virtual void update_display_fields()
Reads the internal data structure to update the fields of the GUI.
void showOutputSaveDirInputConfigWidget(bool enable)
const choreo_msgs::OutputSaveDirInputParameters & outputSaveDirInputParams() const
virtual void update_display_fields()
Reads the internal data structure to update the fields of the GUI.
virtual void show()
Updates GUI parameters and shows the main window.
choreo_msgs::ModelInputParameters & params()
const choreo_msgs::TaskSequenceInputParameters & taskSequenceInputParams() const
const choreo_msgs::RobotInputParameters & robotInputParams() const
choreo_msgs::RobotInputParameters & params()
void setRobotInputParams(const choreo_msgs::RobotInputParameters &params)
choreo_msgs::OutputSaveDirInputParameters & params()
virtual void update_display_fields()
Reads the internal data structure to update the fields of the GUI.
RobotInputConfigWidget * robot_input_widget_
void setTaskSequenceInputParams(const choreo_msgs::TaskSequenceInputParameters &params)
ModelInputConfigWidget * model_input_widget_
choreo_msgs::TaskSequenceInputParameters & params()
virtual void update_display_fields()
Reads the internal data structure to update the fields of the GUI.
void setOutputSaveDirInputParams(const choreo_msgs::OutputSaveDirInputParameters &params)
ParamsSubmenu(QWidget *parent=0)
const choreo_msgs::ModelInputParameters & modelInputParams() const
Ui::ParamsSubmenu * ui_


choreo_gui
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:58:56