Public Types | Public Member Functions | List of all members
gazebo::gui::SaveDialog Class Reference

Dialog for saving to file. More...

#include <gui/gui.hh>

Inheritance diagram for gazebo::gui::SaveDialog:
Inheritance graph
[legend]

Public Types

enum  SaveMode { MODEL, BUILDING }
 Unique identifiers for all dialog modes. More...
 

Public Member Functions

 SaveDialog (int _mode=0, QWidget *_parent=0)
 Constructor. More...
 
 ~SaveDialog ()
 Destructor. More...
 
void AddDirToModelPaths (const std::string &_path)
 Add the parent folder of _path to the model path represented by SystemPaths, notify InsertModelWidget to display the model name in the "Insert Models" tab, and write the parent folder filename to gui.ini. More...
 
void GenerateConfig ()
 Generate the config file. More...
 
std::string GetAuthorEmail () const
 Get the model's author's email. More...
 
std::string GetAuthorName () const
 Get the model's author's name. More...
 
std::string GetDescription () const
 Get the model's description. More...
 
std::string GetFolderNameFromModelName (const std::string &_modelName)
 Helper function to generate a valid folder name from a human-readable model name. More...
 
std::string GetModelName () const
 Get the model name. More...
 
std::string GetSaveLocation () const
 Get the save location. More...
 
std::string GetVersion () const
 Get the model's version. More...
 
bool OnSaveAs ()
 Call to execute the dialog. More...
 
void SaveToConfig ()
 Save config file. More...
 
void SaveToSDF (sdf::SDFPtr _modelSDF)
 Save model to SDF format. More...
 
void SetModelName (const std::string &_name)
 Set the model name. More...
 
void SetSaveLocation (const std::string &_location)
 Set the save location. More...
 

Detailed Description

Dialog for saving to file.

Member Enumeration Documentation

Unique identifiers for all dialog modes.

Enumerator
MODEL 

Save model.

BUILDING 

Save building.

Constructor & Destructor Documentation

gazebo::gui::SaveDialog::SaveDialog ( int  _mode = 0,
QWidget *  _parent = 0 
)

Constructor.

Parameters
[in]_modeMode of the dialog.
[in]_parentParent QWidget.
gazebo::gui::SaveDialog::~SaveDialog ( )

Destructor.

Member Function Documentation

void gazebo::gui::SaveDialog::AddDirToModelPaths ( const std::string &  _path)

Add the parent folder of _path to the model path represented by SystemPaths, notify InsertModelWidget to display the model name in the "Insert Models" tab, and write the parent folder filename to gui.ini.

Parameters
[in]_pathPath to be added.
void gazebo::gui::SaveDialog::GenerateConfig ( )

Generate the config file.

std::string gazebo::gui::SaveDialog::GetAuthorEmail ( ) const

Get the model's author's email.

Returns
The author's email.
std::string gazebo::gui::SaveDialog::GetAuthorName ( ) const

Get the model's author's name.

Returns
The author's name.
std::string gazebo::gui::SaveDialog::GetDescription ( ) const

Get the model's description.

Returns
The model's description.
std::string gazebo::gui::SaveDialog::GetFolderNameFromModelName ( const std::string &  _modelName)

Helper function to generate a valid folder name from a human-readable model name.

Parameters
[in]_modelNameHuman-readable model name.
Returns
Folder name.
std::string gazebo::gui::SaveDialog::GetModelName ( ) const

Get the model name.

Returns
The model name.
std::string gazebo::gui::SaveDialog::GetSaveLocation ( ) const

Get the save location.

Returns
Path of the save location.
std::string gazebo::gui::SaveDialog::GetVersion ( ) const

Get the model's version.

Returns
The model's version.
bool gazebo::gui::SaveDialog::OnSaveAs ( )

Call to execute the dialog.

Returns
True if the user accepted the dialog.
void gazebo::gui::SaveDialog::SaveToConfig ( )

Save config file.

void gazebo::gui::SaveDialog::SaveToSDF ( sdf::SDFPtr  _modelSDF)

Save model to SDF format.

Parameters
[in]_modelSDFPointer to the model SDF.
void gazebo::gui::SaveDialog::SetModelName ( const std::string &  _name)

Set the model name.

Parameters
[in]_nameName to set the model to.
void gazebo::gui::SaveDialog::SetSaveLocation ( const std::string &  _location)

Set the save location.

Parameters
[in]_locationLocation to save to.

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