moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
author_information_widget.cpp
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, Michael 'v4hn' Goerner */
36
37// Qt
38#include <QVBoxLayout>
39#include <QPushButton>
40#include <QMessageBox>
41#include <QApplication>
42#include <QLabel>
43#include <QLineEdit>
46
47namespace moveit_setup
48{
49namespace core
50{
51// ******************************************************************************************
52// Outer User Interface for MoveIt Configuration Assistant
53// ******************************************************************************************
55{
56 // Basic widget container
57 QVBoxLayout* layout = new QVBoxLayout();
58 layout->setAlignment(Qt::AlignTop);
59
60 // Top Header Area ------------------------------------------------
61
62 auto header = new HeaderWidget("Specify Author Information",
63 "Input contact information of the author and initial maintainer of the generated "
64 "package. catkin requires valid details in the package's package.xml",
65 this);
66 layout->addWidget(header);
67
68 QLabel* name_title = new QLabel(this);
69 name_title->setText("Name of the maintainer of this MoveIt configuration:");
70 layout->addWidget(name_title);
71
72 name_edit_ = new QLineEdit(this);
73 connect(name_edit_, SIGNAL(editingFinished()), this, SLOT(editedName()));
74 layout->addWidget(name_edit_);
75
76 QLabel* email_title = new QLabel(this);
77 email_title->setText("Email of the maintainer of this MoveIt configuration:");
78 layout->addWidget(email_title);
79
80 email_edit_ = new QLineEdit(this);
81 connect(email_edit_, SIGNAL(editingFinished()), this, SLOT(editedEmail()));
82 layout->addWidget(email_edit_);
83
84 // Finish Layout --------------------------------------------------
85 setLayout(layout);
86}
87
88// ******************************************************************************************
89// Called when setup assistant navigation switches to this screen
90// ******************************************************************************************
92{
93 // Allow list box to populate
94 name_edit_->setText(QString::fromStdString(setup_step_.getAuthorName()));
95 email_edit_->setText(QString::fromStdString(setup_step_.getAuthorEmail()));
96}
97
98void AuthorInformationWidget::editedName()
99{
100 setup_step_.setAuthorName(name_edit_->text().toStdString());
101}
102
103void AuthorInformationWidget::editedEmail()
104{
105 setup_step_.setAuthorEmail(email_edit_->text().toStdString());
106}
107
108} // namespace core
109} // namespace moveit_setup
110
111#include <pluginlib/class_list_macros.hpp> // NOLINT
PLUGINLIB_EXPORT_CLASS(cached_ik_kinematics_plugin::CachedIKKinematicsPlugin< kdl_kinematics_plugin::KDLKinematicsPlugin >, kinematics::KinematicsBase)
The GUI code for one SetupStep.
void focusGiven() override
Received when this widget is chosen from the navigation menu.
void setAuthorEmail(const std::string &email)
void setAuthorName(const std::string &name)