Gazebo Gui

API Reference

3.12.1
gz/gui/Helpers.hh File Reference
#include <string>
#include "gz/gui/Enums.hh"
#include "gz/gui/Export.hh"

Go to the source code of this file.

Namespaces

 ignition
 
 ignition::gui
 

Functions

template<class T >
findFirstByProperty (const QList< T > _list, const char *_key, QVariant _value)
 Returns the first element on a QList which matches the given property. More...
 
std::string humanReadable (const std::string &_key)
 Create a human readable key, capitalizing the first letter and removing characters like "_". More...
 
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. More...
 
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. More...
 
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. More...
 
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), ...) More...
 
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". More...
 
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. More...