Public Member Functions | Public Attributes | Private Slots | Private Member Functions | Private Attributes | List of all members
moveit_setup_assistant::ConfigurationFilesWidget Class Reference

#include <configuration_files_widget.h>

Inheritance diagram for moveit_setup_assistant::ConfigurationFilesWidget:
Inheritance graph
[legend]

Public Member Functions

 ConfigurationFilesWidget (QWidget *parent, moveit_setup_assistant::MoveItConfigDataPtr config_data)
 
virtual void focusGiven ()
 Received when this widget is chosen from the navigation menu. More...
 
- Public Member Functions inherited from SetupScreenWidget
virtual bool focusLost ()
 function called when widget lost focus, allows to accept/reject changes and to reject switching (returning false) More...
 
 SetupScreenWidget (QWidget *parent)
 

Public Attributes

QList< QString > action_desc_
 
QLabel * action_label_
 
QListWidget * action_list_
 
QPushButton * btn_save_
 
QProgressBar * progress_bar_
 
LoadPathWidgetstack_path_
 
QLabel * success_label_
 

Private Slots

void changeActionDesc (int id)
 Display the selected action in the desc box. More...
 
void changeCheckedState (QListWidgetItem *item)
 Disable or enable item in gen_files_ array. More...
 
void exitSetupAssistant ()
 Quit the program because we are done. More...
 
bool generatePackage ()
 Generate the package. More...
 
void savePackage ()
 Save package click event. More...
 

Private Member Functions

bool addTemplateString (const std::string &key, const std::string &value)
 Insert a string pair into the template_strings_ datastructure. More...
 
bool checkDependencies ()
 Verify with user if certain screens have not been completed. More...
 
bool checkGenFiles ()
 
bool copyTemplate (const std::string &template_path, const std::string &output_path)
 
bool createFolder (const std::string &output_path)
 Create a folder. More...
 
const std::string getPackageName (std::string package_path)
 Get the last folder name in a directory path. More...
 
bool loadGenFiles ()
 Populate the 'Files to be generated' list. More...
 
void loadTemplateStrings ()
 Load the strings that will be replaced in all templates. More...
 
bool noGroupsEmpty ()
 Check that no group is empty (without links/joints/etc) More...
 
bool showGenFiles ()
 Show the list of files to be generated. More...
 
void updateProgress ()
 A function for showing progress and user feedback about what happened. More...
 

Private Attributes

unsigned int action_num_
 Track progress. More...
 
moveit_setup_assistant::MoveItConfigDataPtr config_data_
 Contains all the configuration data for the setup assistant. More...
 
bool first_focusGiven_
 Populate the 'Files to be Generated' list just once. More...
 
std::vector< GenerateFilegen_files_
 Vector of all files to be generated. More...
 
bool has_generated_pkg_
 Has the package been generated yet this program execution? Used for popping up exit warning. More...
 
std::string new_package_name_
 Name of the new package that is being (or going) to be generated, based on user specified save path. More...
 
StringPairVector template_strings_
 Vector of all strings to search for in templates, and their replacements. More...
 

Additional Inherited Members

- Signals inherited from SetupScreenWidget
void highlightGroup (const std::string &name)
 Event for telling rviz to highlight a group of the robot. More...
 
void highlightLink (const std::string &name, const QColor &)
 Event for telling rviz to highlight a link of the robot. More...
 
void isModal (bool isModal)
 Event for when the current screen is in modal view. Essential disabled the left navigation. More...
 
void unhighlightAll ()
 Event for telling rviz to unhighlight all links of the robot. More...
 

Detailed Description

Definition at line 76 of file configuration_files_widget.h.

Constructor & Destructor Documentation

moveit_setup_assistant::ConfigurationFilesWidget::ConfigurationFilesWidget ( QWidget *  parent,
moveit_setup_assistant::MoveItConfigDataPtr  config_data 
)

Definition at line 65 of file configuration_files_widget.cpp.

Member Function Documentation

bool moveit_setup_assistant::ConfigurationFilesWidget::addTemplateString ( const std::string &  key,
const std::string &  value 
)
private

Insert a string pair into the template_strings_ datastructure.

Parameters
keystring to search in template
valuestring to replace with
Returns
void

Definition at line 1132 of file configuration_files_widget.cpp.

void moveit_setup_assistant::ConfigurationFilesWidget::changeActionDesc ( int  id)
privateslot

Display the selected action in the desc box.

Definition at line 672 of file configuration_files_widget.cpp.

void moveit_setup_assistant::ConfigurationFilesWidget::changeCheckedState ( QListWidgetItem *  item)
privateslot

Disable or enable item in gen_files_ array.

Definition at line 685 of file configuration_files_widget.cpp.

bool moveit_setup_assistant::ConfigurationFilesWidget::checkDependencies ( )
private

Verify with user if certain screens have not been completed.

Definition at line 567 of file configuration_files_widget.cpp.

bool moveit_setup_assistant::ConfigurationFilesWidget::checkGenFiles ( )
private

Check the list of files to be generated for modification Returns true if files were detected as modified

Definition at line 748 of file configuration_files_widget.cpp.

bool moveit_setup_assistant::ConfigurationFilesWidget::copyTemplate ( const std::string &  template_path,
const std::string &  output_path 
)
private

Copy a template from location <template_path> to location <output_path> and replace package name

Parameters
template_pathpath to template file
output_pathdesired path to copy to
new_package_namename of the new package being created, to replace key word in template
Returns
bool if the template was copied correctly

Definition at line 1142 of file configuration_files_widget.cpp.

bool moveit_setup_assistant::ConfigurationFilesWidget::createFolder ( const std::string &  output_path)
private

Create a folder.

Parameters
output_pathname of folder relative to package
Returns
bool if success

Definition at line 1196 of file configuration_files_widget.cpp.

void moveit_setup_assistant::ConfigurationFilesWidget::exitSetupAssistant ( )
privateslot

Quit the program because we are done.

Definition at line 986 of file configuration_files_widget.cpp.

void moveit_setup_assistant::ConfigurationFilesWidget::focusGiven ( )
virtual

Received when this widget is chosen from the navigation menu.

Reimplemented from SetupScreenWidget.

Definition at line 703 of file configuration_files_widget.cpp.

bool moveit_setup_assistant::ConfigurationFilesWidget::generatePackage ( )
privateslot

Generate the package.

Definition at line 880 of file configuration_files_widget.cpp.

const std::string moveit_setup_assistant::ConfigurationFilesWidget::getPackageName ( std::string  package_path)
private

Get the last folder name in a directory path.

Definition at line 1000 of file configuration_files_widget.cpp.

bool moveit_setup_assistant::ConfigurationFilesWidget::loadGenFiles ( )
private

Populate the 'Files to be generated' list.

Definition at line 175 of file configuration_files_widget.cpp.

void moveit_setup_assistant::ConfigurationFilesWidget::loadTemplateStrings ( )
private

Load the strings that will be replaced in all templates.

Returns
void

Definition at line 1056 of file configuration_files_widget.cpp.

bool moveit_setup_assistant::ConfigurationFilesWidget::noGroupsEmpty ( )
private

Check that no group is empty (without links/joints/etc)

Definition at line 1024 of file configuration_files_widget.cpp.

void moveit_setup_assistant::ConfigurationFilesWidget::savePackage ( )
privateslot

Save package click event.

Definition at line 856 of file configuration_files_widget.cpp.

bool moveit_setup_assistant::ConfigurationFilesWidget::showGenFiles ( )
private

Show the list of files to be generated.

Definition at line 805 of file configuration_files_widget.cpp.

void moveit_setup_assistant::ConfigurationFilesWidget::updateProgress ( )
private

A function for showing progress and user feedback about what happened.

Definition at line 658 of file configuration_files_widget.cpp.

Member Data Documentation

QList<QString> moveit_setup_assistant::ConfigurationFilesWidget::action_desc_

Definition at line 99 of file configuration_files_widget.h.

QLabel* moveit_setup_assistant::ConfigurationFilesWidget::action_label_

Definition at line 97 of file configuration_files_widget.h.

QListWidget* moveit_setup_assistant::ConfigurationFilesWidget::action_list_

Definition at line 96 of file configuration_files_widget.h.

unsigned int moveit_setup_assistant::ConfigurationFilesWidget::action_num_
private

Track progress.

Definition at line 134 of file configuration_files_widget.h.

QPushButton* moveit_setup_assistant::ConfigurationFilesWidget::btn_save_

Definition at line 93 of file configuration_files_widget.h.

moveit_setup_assistant::MoveItConfigDataPtr moveit_setup_assistant::ConfigurationFilesWidget::config_data_
private

Contains all the configuration data for the setup assistant.

Definition at line 128 of file configuration_files_widget.h.

bool moveit_setup_assistant::ConfigurationFilesWidget::first_focusGiven_
private

Populate the 'Files to be Generated' list just once.

Definition at line 140 of file configuration_files_widget.h.

std::vector<GenerateFile> moveit_setup_assistant::ConfigurationFilesWidget::gen_files_
private

Vector of all files to be generated.

Definition at line 143 of file configuration_files_widget.h.

bool moveit_setup_assistant::ConfigurationFilesWidget::has_generated_pkg_
private

Has the package been generated yet this program execution? Used for popping up exit warning.

Definition at line 137 of file configuration_files_widget.h.

std::string moveit_setup_assistant::ConfigurationFilesWidget::new_package_name_
private

Name of the new package that is being (or going) to be generated, based on user specified save path.

Definition at line 131 of file configuration_files_widget.h.

QProgressBar* moveit_setup_assistant::ConfigurationFilesWidget::progress_bar_

Definition at line 95 of file configuration_files_widget.h.

LoadPathWidget* moveit_setup_assistant::ConfigurationFilesWidget::stack_path_

Definition at line 94 of file configuration_files_widget.h.

QLabel* moveit_setup_assistant::ConfigurationFilesWidget::success_label_

Definition at line 98 of file configuration_files_widget.h.

StringPairVector moveit_setup_assistant::ConfigurationFilesWidget::template_strings_
private

Vector of all strings to search for in templates, and their replacements.

Definition at line 146 of file configuration_files_widget.h.


The documentation for this class was generated from the following files:


moveit_setup_assistant
Author(s): Dave Coleman
autogenerated on Sun Oct 18 2020 13:19:28