Dialog for saving to file.
More...
#include <gui/gui.hh>
Inherits QDialog.
|
| SaveEntityDialog (int _mode=0, QWidget *_parent=0) |
| Constructor.
|
|
| ~SaveEntityDialog () |
| Destructor.
|
|
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.
|
|
void | GenerateConfig () |
| Generate the config file.
|
|
std::string | GetAuthorEmail () const |
| Get the model's author's email.
|
|
std::string | GetAuthorName () const |
| Get the model's author's name.
|
|
std::string | GetDescription () const |
| Get the model's description.
|
|
std::string | GetFolderNameFromModelName (const std::string &_modelName) |
| Helper function to generate a valid folder name from a human-readable model name.
|
|
std::string | GetModelName () const |
| Get the model name.
|
|
std::string | GetSaveLocation () const |
| Get the save location.
|
|
std::string | GetVersion () const |
| Get the model's version.
|
|
bool | OnSaveAs () |
| Call to execute the dialog.
|
|
void | SaveToConfig () |
| Save config file.
|
|
void | SaveToSDF (sdf::SDFPtr _modelSDF) |
| Save model to SDF format.
|
|
void | SetModelName (const std::string &_name) |
| Set the model name.
|
|
void | SetSaveLocation (const std::string &_location) |
| Set the save location.
|
|
Dialog for saving to file.
◆ SaveMode
Unique identifiers for all dialog modes.
Enumerator |
---|
MODEL | Save model.
|
BUILDING | Save building.
|
◆ SaveEntityDialog()
Constructor.
- Parameters
-
[in] | _mode | Mode of the dialog. |
[in] | _parent | Parent QWidget. |
◆ ~SaveEntityDialog()
◆ AddDirToModelPaths()
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.
- Parameters
-
[in] | _path | Path to be added. |
◆ GenerateConfig()
Generate the config file.
◆ GetAuthorEmail()
std::string GetAuthorEmail |
( |
| ) |
const |
Get the model's author's email.
- Returns
- The author's email.
◆ GetAuthorName()
std::string GetAuthorName |
( |
| ) |
const |
Get the model's author's name.
- Returns
- The author's name.
◆ GetDescription()
std::string GetDescription |
( |
| ) |
const |
Get the model's description.
- Returns
- The model's description.
◆ GetFolderNameFromModelName()
std::string GetFolderNameFromModelName |
( |
const std::string & | _modelName | ) |
|
Helper function to generate a valid folder name from a human-readable model name.
- Parameters
-
[in] | _modelName | Human-readable model name. |
- Returns
- Folder name.
◆ GetModelName()
std::string GetModelName |
( |
| ) |
const |
Get the model name.
- Returns
- The model name.
◆ GetSaveLocation()
std::string GetSaveLocation |
( |
| ) |
const |
Get the save location.
- Returns
- Path of the save location.
◆ GetVersion()
std::string GetVersion |
( |
| ) |
const |
Get the model's version.
- Returns
- The model's version.
◆ OnSaveAs()
Call to execute the dialog.
- Returns
- True if the user accepted the dialog.
◆ SaveToConfig()
◆ SaveToSDF()
void SaveToSDF |
( |
sdf::SDFPtr | _modelSDF | ) |
|
Save model to SDF format.
- Parameters
-
[in] | _modelSDF | Pointer to the model SDF. |
◆ SetModelName()
void SetModelName |
( |
const std::string & | _name | ) |
|
Set the model name.
- Parameters
-
[in] | _name | Name to set the model to. |
◆ SetSaveLocation()
void SetSaveLocation |
( |
const std::string & | _location | ) |
|
Set the save location.
- Parameters
-
[in] | _location | Location to save to. |
The documentation for this class was generated from the following file: