Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include <QVBoxLayout>
00039 #include <QPushButton>
00040 #include <QMessageBox>
00041 #include <QApplication>
00042 #include <QSplitter>
00043
00044 #include "author_information_widget.h"
00045 #include <srdfdom/model.h>
00046 #include <ros/ros.h>
00047
00048 #include <boost/algorithm/string.hpp>
00049 #include <boost/filesystem.hpp>
00050
00051 #include <iostream>
00052 #include <fstream>
00053
00054 namespace moveit_setup_assistant
00055 {
00056
00057 namespace fs = boost::filesystem;
00058
00059
00060
00061
00062 AuthorInformationWidget::AuthorInformationWidget(QWidget* parent,
00063 moveit_setup_assistant::MoveItConfigDataPtr config_data)
00064 : SetupScreenWidget(parent), config_data_(config_data)
00065 {
00066
00067 QVBoxLayout* layout = new QVBoxLayout();
00068 layout->setAlignment(Qt::AlignTop);
00069
00070
00071
00072 HeaderWidget* header =
00073 new HeaderWidget("Author Information", "Specify contact information of the author and initial maintainer of the "
00074 "generated package. catkin requires valid details in the package's "
00075 "package.xml",
00076 this);
00077 layout->addWidget(header);
00078
00079 QLabel* name_title = new QLabel(this);
00080 name_title->setText("Name of the maintainer this MoveIt! configuration:");
00081 layout->addWidget(name_title);
00082
00083 name_edit_ = new QLineEdit(this);
00084 connect(name_edit_, SIGNAL(editingFinished()), this, SLOT(edited_name()));
00085 layout->addWidget(name_edit_);
00086
00087 QLabel* email_title = new QLabel(this);
00088 email_title->setText("Email of the maintainer of this MoveIt! configuration:");
00089 layout->addWidget(email_title);
00090
00091 email_edit_ = new QLineEdit(this);
00092 connect(email_edit_, SIGNAL(editingFinished()), this, SLOT(edited_email()));
00093 layout->addWidget(email_edit_);
00094
00095
00096 this->setLayout(layout);
00097 }
00098
00099
00100
00101
00102 void AuthorInformationWidget::focusGiven()
00103 {
00104
00105 this->name_edit_->setText(QString::fromStdString(config_data_->author_name_));
00106 this->email_edit_->setText(QString::fromStdString(config_data_->author_email_));
00107 }
00108
00109 void AuthorInformationWidget::edited_name()
00110 {
00111 config_data_->author_name_ = this->name_edit_->text().toStdString();
00112 config_data_->changes |= MoveItConfigData::AUTHOR_INFO;
00113 }
00114
00115 void AuthorInformationWidget::edited_email()
00116 {
00117 config_data_->author_email_ = this->email_edit_->text().toStdString();
00118 config_data_->changes |= MoveItConfigData::AUTHOR_INFO;
00119 }
00120
00121 }