Ignition Gui

API Reference

5.0.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...
 
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...