end_effectors_widget.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2012, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Author: Dave Coleman */
36 
37 #pragma once
38 
39 // Qt
40 class QComboBox;
41 class QLineEdit;
42 class QPushButton;
43 class QStackedWidget;
44 class QTableWidget;
45 
46 // SA
47 #ifndef Q_MOC_RUN
49 #endif
50 
51 #include "setup_screen_widget.h" // a base class for screens in the setup assistant
52 
53 namespace moveit_setup_assistant
54 {
56 {
57  Q_OBJECT
58 
59 public:
60  // ******************************************************************************************
61  // Public Functions
62  // ******************************************************************************************
63 
64  EndEffectorsWidget(QWidget* parent, const MoveItConfigDataPtr& config_data);
65 
67  void focusGiven() override;
68 
69  // ******************************************************************************************
70  // Qt Components
71  // ******************************************************************************************
72  QTableWidget* data_table_;
73  QPushButton* btn_edit_;
74  QPushButton* btn_delete_;
75  QPushButton* btn_save_;
76  QPushButton* btn_cancel_;
77  QStackedWidget* stacked_widget_;
79  QComboBox* parent_name_field_;
81  QComboBox* group_name_field_;
84 
85 private Q_SLOTS:
86 
87  // ******************************************************************************************
88  // Slot Event Functions
89  // ******************************************************************************************
90 
92  void showNewScreen();
93 
95  void editSelected();
96 
98  void editDoubleClicked(int row, int column);
99 
101  void previewClicked(int row, int column);
102 
104  void previewClickedString(const QString& name);
105 
107  void deleteSelected();
108 
110  void doneEditing();
111 
113  void cancelEditing();
114 
115 private:
116  // ******************************************************************************************
117  // Variables
118  // ******************************************************************************************
119 
121  moveit_setup_assistant::MoveItConfigDataPtr config_data_;
122 
125 
126  // ******************************************************************************************
127  // Private Functions
128  // ******************************************************************************************
129 
136  srdf::Model::EndEffector* findEffectorByName(const std::string& name);
137 
143  QWidget* createContentsWidget();
144 
150  QWidget* createEditWidget();
151 
156  void loadDataTable();
157 
162  void loadGroupsComboBox();
163 
168  void loadParentComboBox();
169 
175  void edit(const std::string& name);
176 };
177 
178 } // namespace moveit_setup_assistant
moveit_setup_assistant::EndEffectorsWidget::previewClickedString
void previewClickedString(const QString &name)
Preview the planning group that is selected.
Definition: end_effectors_widget.cpp:316
moveit_setup_assistant::EndEffectorsWidget
Definition: end_effectors_widget.h:55
moveit_setup_assistant::EndEffectorsWidget::loadParentComboBox
void loadParentComboBox()
Definition: end_effectors_widget.cpp:414
moveit_setup_assistant::EndEffectorsWidget::cancelEditing
void cancelEditing()
Cancel changes.
Definition: end_effectors_widget.cpp:620
moveit_setup_assistant::EndEffectorsWidget::current_edit_effector_
std::string current_edit_effector_
Orignal name of effector currently being edited. This is used to find the element in the vector.
Definition: end_effectors_widget.h:124
moveit_setup_assistant::EndEffectorsWidget::config_data_
moveit_setup_assistant::MoveItConfigDataPtr config_data_
Contains all the configuration data for the setup assistant.
Definition: end_effectors_widget.h:121
moveit_setup_assistant::EndEffectorsWidget::editDoubleClicked
void editDoubleClicked(int row, int column)
Edit the double clicked element.
Definition: end_effectors_widget.cpp:286
moveit_setup_assistant::EndEffectorsWidget::btn_edit_
QPushButton * btn_edit_
Definition: end_effectors_widget.h:73
moveit_setup_assistant::EndEffectorsWidget::edit
void edit(const std::string &name)
Definition: end_effectors_widget.cpp:348
moveit_setup_assistant::EndEffectorsWidget::effector_name_field_
QLineEdit * effector_name_field_
Definition: end_effectors_widget.h:78
moveit_setup_assistant::EndEffectorsWidget::parent_group_name_field_
QComboBox * parent_group_name_field_
Definition: end_effectors_widget.h:80
moveit_setup_assistant::EndEffectorsWidget::createContentsWidget
QWidget * createContentsWidget()
Definition: end_effectors_widget.cpp:129
moveit_setup_assistant::EndEffectorsWidget::btn_cancel_
QPushButton * btn_cancel_
Definition: end_effectors_widget.h:76
moveit_setup_assistant::EndEffectorsWidget::showNewScreen
void showNewScreen()
Show edit screen.
Definition: end_effectors_widget.cpp:265
moveit_config_data.h
moveit_setup_assistant::EndEffectorsWidget::EndEffectorsWidget
EndEffectorsWidget(QWidget *parent, const MoveItConfigDataPtr &config_data)
Definition: end_effectors_widget.cpp:95
moveit_setup_assistant::EndEffectorsWidget::group_name_field_
QComboBox * group_name_field_
Definition: end_effectors_widget.h:81
moveit_setup_assistant::EndEffectorsWidget::parent_name_field_
QComboBox * parent_name_field_
Definition: end_effectors_widget.h:79
moveit_setup_assistant::EndEffectorsWidget::focusGiven
void focusGiven() override
Received when this widget is chosen from the navigation menu.
Definition: end_effectors_widget.cpp:687
moveit_setup_assistant::EndEffectorsWidget::effector_list_widget_
QWidget * effector_list_widget_
Definition: end_effectors_widget.h:82
moveit_setup_assistant::EndEffectorsWidget::doneEditing
void doneEditing()
Save editing changes.
Definition: end_effectors_widget.cpp:502
moveit_setup_assistant::EndEffectorsWidget::editSelected
void editSelected()
Edit whatever element is selected.
Definition: end_effectors_widget.cpp:332
moveit_setup_assistant::EndEffectorsWidget::data_table_
QTableWidget * data_table_
Definition: end_effectors_widget.h:72
SetupScreenWidget
Definition: setup_screen_widget.h:44
moveit_setup_assistant::EndEffectorsWidget::loadDataTable
void loadDataTable()
Definition: end_effectors_widget.cpp:635
moveit_setup_assistant
Definition: compute_default_collisions.h:46
moveit_setup_assistant::EndEffectorsWidget::deleteSelected
void deleteSelected()
Delete currently editing ite.
Definition: end_effectors_widget.cpp:460
moveit_setup_assistant::EndEffectorsWidget::btn_save_
QPushButton * btn_save_
Definition: end_effectors_widget.h:75
moveit_setup_assistant::EndEffectorsWidget::effector_edit_widget_
QWidget * effector_edit_widget_
Definition: end_effectors_widget.h:83
setup_screen_widget.h
moveit_setup_assistant::EndEffectorsWidget::createEditWidget
QWidget * createEditWidget()
Definition: end_effectors_widget.cpp:197
moveit_setup_assistant::EndEffectorsWidget::findEffectorByName
srdf::Model::EndEffector * findEffectorByName(const std::string &name)
Definition: end_effectors_widget.cpp:433
moveit_setup_assistant::EndEffectorsWidget::btn_delete_
QPushButton * btn_delete_
Definition: end_effectors_widget.h:74
moveit_setup_assistant::EndEffectorsWidget::loadGroupsComboBox
void loadGroupsComboBox()
Definition: end_effectors_widget.cpp:396
moveit_setup_assistant::EndEffectorsWidget::stacked_widget_
QStackedWidget * stacked_widget_
Definition: end_effectors_widget.h:77
srdf::Model::EndEffector
moveit_setup_assistant::EndEffectorsWidget::previewClicked
void previewClicked(int row, int column)
Preview whatever element is selected.
Definition: end_effectors_widget.cpp:294


moveit_setup_assistant
Author(s): Dave Coleman
autogenerated on Sat May 3 2025 02:28:04