Main Page
Namespaces
Classes
Files
File List
File Members
src
widgets
controller_edit_widget.h
Go to the documentation of this file.
1
/*********************************************************************
2
* Software License Agreement (BSD License)
3
*
4
* Copyright (c) 2018, Mohamad Ayman.
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
* * The name of Mohamad Ayman may be used to endorse or promote products derived
18
* from this software without specific prior written permission.
19
*
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
* POSSIBILITY OF SUCH DAMAGE.
32
*********************************************************************/
33
34
/* Author: Mohamad Ayman */
35
36
#ifndef MOVEIT_ROS_MOVEIT_SETUP_ASSISTANT_WIDGETS_CONTROLLER_EDIT_WIDGET_H
37
#define MOVEIT_ROS_MOVEIT_SETUP_ASSISTANT_WIDGETS_CONTROLLER_EDIT_WIDGET_H
38
39
#include <QWidget>
40
#include <QLabel>
41
#include <QLineEdit>
42
#include <QComboBox>
43
#include <QPushButton>
44
45
#ifndef Q_MOC_RUN
46
#include <
moveit/setup_assistant/tools/moveit_config_data.h
>
47
#endif
48
49
namespace
moveit_ros_control
50
{
51
class
ControllerEditWidget
:
public
QWidget
52
{
53
Q_OBJECT
54
55
public
:
56
// ******************************************************************************************
57
// Public Functions
58
// ******************************************************************************************
59
61
ControllerEditWidget
(QWidget* parent, moveit_setup_assistant::MoveItConfigDataPtr config_data);
62
64
void
setSelected
(
const
std::string& controller_name);
65
67
void
loadControllersTypesComboBox
();
68
70
void
hideDelete
();
71
73
void
hideSave
();
74
76
void
hideNewButtonsWidget
();
77
79
void
showDelete
();
80
82
void
showSave
();
83
85
void
showNewButtonsWidget
();
86
88
void
setTitle
(
const
QString& title);
89
91
std::string
getControllerName
();
92
94
std::string
getControllerType
();
95
96
private
Q_SLOTS:
97
98
// ******************************************************************************************
99
// Slot Event Functions
100
// ******************************************************************************************
101
102
Q_SIGNALS:
103
104
// ******************************************************************************************
105
// Emitted Signals
106
// ******************************************************************************************
107
109
void
saveJoints
();
110
112
void
saveJointsGroups
();
113
115
void
save
();
116
118
void
cancelEditing
();
119
121
void
deleteController
();
122
123
private
:
124
// ******************************************************************************************
125
// Qt Components
126
// ******************************************************************************************
127
128
QLabel*
title_
;
// specify the title from the parent widget
129
QLineEdit*
controller_name_field_
;
130
QComboBox*
controller_type_field_
;
131
QPushButton*
btn_delete_
;
// this button is hidden for new controllers
132
QPushButton*
btn_save_
;
// this button is hidden for new controllers
133
QWidget*
new_buttons_widget_
;
// for showing/hiding the new controllers buttons
134
135
// ******************************************************************************************
136
// Variables
137
// ******************************************************************************************
138
139
// For loading default types combo box just once
140
bool
has_loaded_
=
false
;
142
moveit_setup_assistant::MoveItConfigDataPtr
config_data_
;
143
};
144
}
145
146
#endif
moveit_ros_control::ControllerEditWidget::has_loaded_
bool has_loaded_
Definition:
controller_edit_widget.h:140
moveit_ros_control::ControllerEditWidget::config_data_
moveit_setup_assistant::MoveItConfigDataPtr config_data_
Contains all the configuration data for the setup assistant.
Definition:
controller_edit_widget.h:142
moveit_ros_control::ControllerEditWidget::getControllerName
std::string getControllerName()
Get controller name.
Definition:
controller_edit_widget.cpp:251
moveit_ros_control::ControllerEditWidget::hideSave
void hideSave()
Hide save controller button.
Definition:
controller_edit_widget.cpp:221
moveit_ros_control::ControllerEditWidget::hideDelete
void hideDelete()
Hide delete controller button.
Definition:
controller_edit_widget.cpp:216
moveit_ros_control::ControllerEditWidget::showSave
void showSave()
Show save controller button.
Definition:
controller_edit_widget.cpp:236
moveit_ros_control::ControllerEditWidget::setSelected
void setSelected(const std::string &controller_name)
Set the previous data.
Definition:
controller_edit_widget.cpp:161
moveit_ros_control::ControllerEditWidget::cancelEditing
void cancelEditing()
Event sent when user presses cancel button.
moveit_ros_control::ControllerEditWidget::save
void save()
Button event for just saving, when in edit mode.
moveit_ros_control::ControllerEditWidget::btn_save_
QPushButton * btn_save_
Definition:
controller_edit_widget.h:132
moveit_ros_control::ControllerEditWidget::saveJointsGroups
void saveJointsGroups()
Button event for new groups, progressing to adding subgroups.
moveit_ros_control::ControllerEditWidget::showNewButtonsWidget
void showNewButtonsWidget()
Show new buttons widget.
Definition:
controller_edit_widget.cpp:241
moveit_ros_control::ControllerEditWidget::saveJoints
void saveJoints()
Button event for new groups, progressing to adding joints.
moveit_ros_control::ControllerEditWidget::setTitle
void setTitle(const QString &title)
Set widget title.
Definition:
controller_edit_widget.cpp:246
moveit_ros_control::ControllerEditWidget
Definition:
controller_edit_widget.h:51
moveit_ros_control::ControllerEditWidget::hideNewButtonsWidget
void hideNewButtonsWidget()
Hide new buttons widget.
Definition:
controller_edit_widget.cpp:226
moveit_ros_control::ControllerEditWidget::deleteController
void deleteController()
Event sent when delete is being requested for controller.
moveit_ros_control::ControllerEditWidget::controller_name_field_
QLineEdit * controller_name_field_
Definition:
controller_edit_widget.h:129
moveit_ros_control::ControllerEditWidget::title_
QLabel * title_
Definition:
controller_edit_widget.h:128
moveit_ros_control::ControllerEditWidget::getControllerType
std::string getControllerType()
Get controller type.
Definition:
controller_edit_widget.cpp:256
moveit_ros_control::ControllerEditWidget::showDelete
void showDelete()
Show delete controller button.
Definition:
controller_edit_widget.cpp:231
moveit_ros_control::ControllerEditWidget::ControllerEditWidget
ControllerEditWidget(QWidget *parent, moveit_setup_assistant::MoveItConfigDataPtr config_data)
Constructor.
Definition:
controller_edit_widget.cpp:49
moveit_ros_control::ControllerEditWidget::btn_delete_
QPushButton * btn_delete_
Definition:
controller_edit_widget.h:131
moveit_config_data.h
moveit_ros_control::ControllerEditWidget::new_buttons_widget_
QWidget * new_buttons_widget_
Definition:
controller_edit_widget.h:133
moveit_ros_control::ControllerEditWidget::loadControllersTypesComboBox
void loadControllersTypesComboBox()
Populate the combo dropdown box with controllers types.
Definition:
controller_edit_widget.cpp:191
moveit_ros_control
Definition:
controller_edit_widget.cpp:44
moveit_ros_control::ControllerEditWidget::controller_type_field_
QComboBox * controller_type_field_
Definition:
controller_edit_widget.h:130
moveit_setup_assistant
Author(s): Dave Coleman
autogenerated on Sun Oct 18 2020 13:19:28