Helpers.hh File Reference
Go to the source code of this file.
| Namespaces | |
| namespace | gz | 
| namespace | gz::gui | 
| Functions | |
| template<class T > | |
| T | findFirstByProperty (const QList< T > _list, const char *_key, QVariant _value) | 
| Returns the first element on a QList which matches the given property. | |
| std::string | humanReadable (const std::string &_key) | 
| Create a human readable key, capitalizing the first letter and removing characters like "_". | |
| const QString | qmlQrcImportPath () | 
| Import path for gz-gui QML modules added to the Qt resource system. This helper function returns the QRC resource path where custom Gazebo QML modules can be imported from. To import a Gazebo QML module, add this path to the QML engine's import path list before attempting to load a QML file that imports Gazebo QML modules. | |
| void | rangeFromKey (const std::string &_key, double &_min, double &_max) | 
| Returns the range for a given key. For example, the key "transparency" returns min == 0, max == 1. | |
| std::string | renderEngineBackendApiName () | 
| Just like renderEngineName(), but valid entries are: | |
| std::string | renderEngineName () | 
| The main window's "renderEngine" property may be filled with a string of the render engine gui name. This information can be used by plugins to set the GUI render engine This helper function provides a handy access to the render engine GUI name. | |
| StringType | stringTypeFromKey (const std::string &_key) | 
| Returns the string type for a given key. For example, the key "innerxml" has a PLAIN_TEXT type while "name" is a LINE. | |
| std::string | uniqueFilePath (const std::string &_pathAndName, const std::string &_extension) | 
| Generates a path for a file which doesn't collide with existing files, by appending numbers to it (i.e. (0), (1), ...) | |
| std::string | unitFromKey (const std::string &_key, const std::string &_type="") | 
| Returns the unit for a given key. For example, the key "mass" returns "kg". | |
| QStringList | worldNames () | 
| The main window's "worldNames" property may be filled with a list of the names of all worlds currently loaded. This information can be used by plugins to choose which world to work with. This helper function provides a handy access to the world names list. | |