gz/gui/Helpers.hh
STL class.
std::string humanReadable(const std::string &_key)
Create a human readable key, capitalizing the first letter and removing characters like "_".
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,...
QStringList worldNames()
The main window's "worldNames" property may be filled with a list of the names of all worlds currentl...
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 ...
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".
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....
const QString qmlQrcImportPath()
Import path for gz-gui QML modules added to the Qt resource system. This helper function returns the ...
T findFirstByProperty(const QList< T > _list, const char *_key, QVariant _value)
Returns the first element on a QList which matches the given property.
Definition: gz/gui/Helpers.hh:99