Ignition Gui

API Reference

6.4.0
Helpers.hh File Reference
#include <string>
#include "ignition/gui/Enums.hh"
#include "ignition/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 ign-gui QML modules added to the Qt resource system. This helper function returns the QRC resource path where custom ignition QML modules can be imported from. To import an ignition QML module, add this path to the QML engine's import path list before attempting to load a QML file that imports ignition 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...
 
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. 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...