task_sequence_input_config_widget.cpp
Go to the documentation of this file.
1 //
2 // Created by yijiangh on 6/22/17.
3 //
4 #include <QString>
5 #include <QFileDialog>
6 
8 #include <ui_task_sequence_input_config.h>
9 
10 choreo_gui::TaskSequenceInputConfigWidget::TaskSequenceInputConfigWidget(choreo_msgs::TaskSequenceInputParameters params)
11  : params_(params)
12 {
13  ui_ = new Ui::TaskSequenceInputConfigWindow();
14  ui_->setupUi(this);
15 
16  connect(ui_->pushbutton_accept, SIGNAL(clicked()), this, SLOT(accept_changes_handler()));
17  connect(ui_->pushbutton_cancel, SIGNAL(clicked()), this, SLOT(cancel_changes_handler()));
18  connect(ui_->pushbutton_save, SIGNAL(clicked()), this, SLOT(save_changes_handler()));
19 
20  connect(ui_->pushbutton_readfile, SIGNAL(clicked()), this, SLOT(get_file_path_handler()));
21 
22  last_filepath_ = "/home";
23 }
24 
26 {
27  ui_->lineedit_filepath->setText(QString(params_.file_path.c_str()));
28 }
29 
31 {
32  params_.file_path = ui_->lineedit_filepath->text().toLocal8Bit().constData();
33  last_filepath_ = params_.file_path;
34 }
35 
37 {
38  QString filename = QFileDialog::getSaveFileName(
39  this,
40  tr("Open File"),
41  QString::fromStdString(last_filepath_));
42 
43  params_.file_path = filename.toLocal8Bit().constData();
44  last_filepath_ = filename.toLocal8Bit().constData();
45 
47 }
filename
TaskSequenceInputConfigWidget(choreo_msgs::TaskSequenceInputParameters params)
virtual void update_internal_fields()
Reads the fields of the GUI to update the internal data structure.
choreo_msgs::TaskSequenceInputParameters params_
virtual void update_display_fields()
Reads the internal data structure to update the fields of the GUI.


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