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, const MoveItConfigDataPtr &config_data)
 
void focusGiven () override
 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...
 
void setCheckSelected (bool checked)
 Set checked state of all selected items. 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...
 
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 75 of file configuration_files_widget.h.

Constructor & Destructor Documentation

◆ ConfigurationFilesWidget()

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

Definition at line 105 of file configuration_files_widget.cpp.

Member Function Documentation

◆ addTemplateString()

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 1382 of file configuration_files_widget.cpp.

◆ changeActionDesc

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

Display the selected action in the desc box.

Definition at line 891 of file configuration_files_widget.cpp.

◆ changeCheckedState

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

Disable or enable item in gen_files_ array.

Definition at line 904 of file configuration_files_widget.cpp.

◆ checkDependencies()

bool moveit_setup_assistant::ConfigurationFilesWidget::checkDependencies ( )
private

Verify with user if certain screens have not been completed.

Definition at line 787 of file configuration_files_widget.cpp.

◆ checkGenFiles()

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 961 of file configuration_files_widget.cpp.

◆ copyTemplate()

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 1392 of file configuration_files_widget.cpp.

◆ createFolder()

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 1440 of file configuration_files_widget.cpp.

◆ exitSetupAssistant

void moveit_setup_assistant::ConfigurationFilesWidget::exitSetupAssistant ( )
privateslot

Quit the program because we are done.

Definition at line 1203 of file configuration_files_widget.cpp.

◆ focusGiven()

void moveit_setup_assistant::ConfigurationFilesWidget::focusGiven ( )
overridevirtual

Received when this widget is chosen from the navigation menu.

Reimplemented from SetupScreenWidget.

Definition at line 923 of file configuration_files_widget.cpp.

◆ generatePackage

bool moveit_setup_assistant::ConfigurationFilesWidget::generatePackage ( )
privateslot

Generate the package.

Definition at line 1093 of file configuration_files_widget.cpp.

◆ getPackageName()

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 1216 of file configuration_files_widget.cpp.

◆ loadGenFiles()

bool moveit_setup_assistant::ConfigurationFilesWidget::loadGenFiles ( )
private

Populate the 'Files to be generated' list.

Definition at line 229 of file configuration_files_widget.cpp.

◆ loadTemplateStrings()

void moveit_setup_assistant::ConfigurationFilesWidget::loadTemplateStrings ( )
private

Load the strings that will be replaced in all templates.

Returns
void

Definition at line 1271 of file configuration_files_widget.cpp.

◆ noGroupsEmpty()

bool moveit_setup_assistant::ConfigurationFilesWidget::noGroupsEmpty ( )
private

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

Definition at line 1240 of file configuration_files_widget.cpp.

◆ savePackage

void moveit_setup_assistant::ConfigurationFilesWidget::savePackage ( )
privateslot

Save package click event.

Definition at line 1069 of file configuration_files_widget.cpp.

◆ setCheckSelected

void moveit_setup_assistant::ConfigurationFilesWidget::setCheckSelected ( bool  checked)
privateslot

Set checked state of all selected items.

Definition at line 220 of file configuration_files_widget.cpp.

◆ showGenFiles()

bool moveit_setup_assistant::ConfigurationFilesWidget::showGenFiles ( )
private

Show the list of files to be generated.

Definition at line 1018 of file configuration_files_widget.cpp.

◆ updateProgress()

void moveit_setup_assistant::ConfigurationFilesWidget::updateProgress ( )
private

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

Definition at line 877 of file configuration_files_widget.cpp.

Member Data Documentation

◆ action_desc_

QList<QString> moveit_setup_assistant::ConfigurationFilesWidget::action_desc_

Definition at line 98 of file configuration_files_widget.h.

◆ action_label_

QLabel* moveit_setup_assistant::ConfigurationFilesWidget::action_label_

Definition at line 96 of file configuration_files_widget.h.

◆ action_list_

QListWidget* moveit_setup_assistant::ConfigurationFilesWidget::action_list_

Definition at line 95 of file configuration_files_widget.h.

◆ action_num_

unsigned int moveit_setup_assistant::ConfigurationFilesWidget::action_num_
private

Track progress.

Definition at line 136 of file configuration_files_widget.h.

◆ btn_save_

QPushButton* moveit_setup_assistant::ConfigurationFilesWidget::btn_save_

Definition at line 92 of file configuration_files_widget.h.

◆ config_data_

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

Contains all the configuration data for the setup assistant.

Definition at line 130 of file configuration_files_widget.h.

◆ gen_files_

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

Vector of all files to be generated.

Definition at line 142 of file configuration_files_widget.h.

◆ has_generated_pkg_

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 139 of file configuration_files_widget.h.

◆ new_package_name_

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 133 of file configuration_files_widget.h.

◆ progress_bar_

QProgressBar* moveit_setup_assistant::ConfigurationFilesWidget::progress_bar_

Definition at line 94 of file configuration_files_widget.h.

◆ stack_path_

LoadPathWidget* moveit_setup_assistant::ConfigurationFilesWidget::stack_path_

Definition at line 93 of file configuration_files_widget.h.

◆ success_label_

QLabel* moveit_setup_assistant::ConfigurationFilesWidget::success_label_

Definition at line 97 of file configuration_files_widget.h.

◆ template_strings_

StringPairVector moveit_setup_assistant::ConfigurationFilesWidget::template_strings_
private

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

Definition at line 145 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 Sat May 3 2025 02:28:05