Dialog for saving to file. More...
#include <gui/gui.hh>
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... | |
Dialog for saving to file.
gazebo::gui::SaveDialog::SaveDialog | ( | int | _mode = 0 , |
QWidget * | _parent = 0 |
||
) |
Constructor.
[in] | _mode | Mode of the dialog. |
[in] | _parent | Parent QWidget. |
gazebo::gui::SaveDialog::~SaveDialog | ( | ) |
Destructor.
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.
[in] | _path | Path 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.
std::string gazebo::gui::SaveDialog::GetAuthorName | ( | ) | const |
Get the model's author's name.
std::string gazebo::gui::SaveDialog::GetDescription | ( | ) | const |
Get 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.
[in] | _modelName | Human-readable model name. |
std::string gazebo::gui::SaveDialog::GetModelName | ( | ) | const |
Get the model name.
std::string gazebo::gui::SaveDialog::GetSaveLocation | ( | ) | const |
Get the save location.
std::string gazebo::gui::SaveDialog::GetVersion | ( | ) | const |
Get the model's version.
bool gazebo::gui::SaveDialog::OnSaveAs | ( | ) |
Call to execute the dialog.
void gazebo::gui::SaveDialog::SaveToConfig | ( | ) |
Save config file.
void gazebo::gui::SaveDialog::SaveToSDF | ( | sdf::SDFPtr | _modelSDF | ) |
Save model to SDF format.
[in] | _modelSDF | Pointer to the model SDF. |
void gazebo::gui::SaveDialog::SetModelName | ( | const std::string & | _name | ) |
Set the model name.
[in] | _name | Name to set the model to. |
void gazebo::gui::SaveDialog::SetSaveLocation | ( | const std::string & | _location | ) |
Set the save location.
[in] | _location | Location to save to. |