Namespaces | |
plugins | |
Classes | |
class | BoolWidget |
A widget which holds a boolean property. More... | |
class | CollapsibleWidget |
A widget consisting of a button and some content. The content is hidden or shown as the button is toggled. It inherits from property widget, but it doesn't hold a property value. More... | |
class | ColorWidget |
A widget which holds a color property. More... | |
class | Dialog |
Gui plugin. More... | |
class | Dock |
Gui plugin. More... | |
class | DragDropModel |
Customized item model so that we can pass along an URI query as MIME information during a drag-drop. More... | |
class | EditableLabel |
Editable Label. The widget toggles between a QLabel and QLineEdit to support edits to the label text. More... | |
class | EnumWidget |
A widget which holds an enum property, which consists of a list of possible string values. More... | |
class | GeometryWidget |
A widget which holds a geometry property based on an ignition::msgs::Geometry message. More... | |
class | MainWindow |
class | MessageWidget |
Generate a widget with property fields based on a Google Protobuf message. More... | |
class | NumberWidget |
A widget which holds a number property such as a double, int or uint. More... | |
class | Plugin |
Gui plugin. More... | |
class | Pose3dWidget |
A widget which holds a pose 3d property. More... | |
class | PropertyWidget |
Abstract base class for widgets which hold properties, such as numbers and strings. Each derived class specializes in a property type. The value of any derived widget can be retrieved as a QVariant. More... | |
class | SearchModel |
Customize the proxy model to display search results. More... | |
class | StringWidget |
A widget which holds a string property (std::string). More... | |
class | VariablePill |
A pill-shaped label which can be dragged onto other widgets. More... | |
class | VariablePillContainer |
A container for holding variable pills. More... | |
class | Vector3dWidget |
A widget which holds a vector 3d property. More... | |
struct | WindowConfig |
Holds configurations related to a MainWindow. More... | |
Enumerations | |
enum | DataRole { DISPLAY_NAME = Qt::UserRole + 100, URI_QUERY, TYPE, TO_EXPAND } |
Data roles. More... | |
enum | FileType { CSVFile, PDFFile } |
File types. More... | |
enum | NumberType { NONE, DOUBLE, INT, UINT } |
Number types. More... | |
enum | StringType { NONE, LINE, PLAIN_TEXT } |
String types. More... | |
Functions | |
void | addPluginPath (const std::string &_path) |
Add an path to look for plugins. More... | |
bool | addPluginsToWindow () |
Add previously loaded plugins to the main window. More... | |
bool | applyConfig () |
Apply previously loaded config to the main window. More... | |
QColor | convert (const math::Color &_color) |
Return the equivalent qt color. More... | |
math::Color | convert (const QColor &_color) |
Return the equivalent ignition color. More... | |
QPointF | convert (const math::Vector2d &_pt) |
Return the equivalent QPointF. More... | |
math::Vector2d | convert (const QPointF &_pt) |
Return the equivalent ignition vector. More... | |
QVector3D | convert (const math::Vector3d &_vec) |
Return the equivalent qt vector 3d. More... | |
math::Vector3d | convert (const QVector3D &_vec) |
Return the equivalent ignition vector 3d. More... | |
common::MouseEvent | convert (const QMouseEvent &_e) |
Return the equivalent ignition mouse event. More... | |
common::Time | convert (const msgs::Time &_t) |
Convert an ignition::msgs::Time to an ignition::common::Time. More... | |
msgs::Time | convert (const common::Time &_t) |
Convert an ignition::common::Time to an ignition::msgs::Time. More... | |
bool | createMainWindow () |
Run previously loaded plugins on a single main window. An empty window will be created if no plugins have been loaded. More... | |
std::string | defaultConfigPath () |
Get the location of the default configuration file. More... | |
std::vector< Dialog * > | dialogs () |
Get the dialogs, if they have been generated. More... | |
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. More... | |
std::vector< std::pair< std::string, std::vector< std::string > > > | getPluginList () |
Get the list of available plugins, organized by path. The paths are given in the following order: More... | |
std::string | humanReadable (const std::string &_key) |
Create a human readable key, capitalizing the first letter and removing characters like "_". More... | |
bool | initApp () |
Initialize the application. This must be run before everything else. More... | |
void | listPlugins () |
Print the available plugins, organized by path. More... | |
bool | loadConfig (const std::string &_config) |
Load plugins from a configuration file. More... | |
bool | loadDefaultConfig () |
Load the configuration from the default config file. More... | |
bool | loadPlugin (const std::string &_filename, const tinyxml2::XMLElement *_pluginElem=nullptr) |
Load a plugin from a file name. The plugin file must be in the path. More... | |
MainWindow * | mainWindow () |
Get the main window, if one has been generated. Use this to customize the window before running it. 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... | |
bool | runConfig (const std::string &_config) |
Run a main window using the given configuration file. This is the main entry point for the command line tool "ign gui -c". More... | |
bool | runDialogs () |
Run previously loaded plugins as individual dialogs. This has no effect if no plugins have been loaded. More... | |
bool | runEmptyWindow () |
Run an empty window. More... | |
bool | runMainWindow () |
Run previously created window. More... | |
bool | runStandalone (const std::string &_filename) |
Run a given plugin as a standalone window. This is the main entry point for the command line tool "ign gui -s". More... | |
void | setDefaultConfigPath (const std::string &_path) |
Specifies the location of the default configuration file. This is the file that stores the user settings when pressing "Save configuration". More... | |
void | setPluginPathEnv (const std::string &_env) |
Set the environment variable which defines the paths to look for plugins. More... | |
bool | setStyleFromFile (const std::string &_qssFile) |
Set the global style sheet from a file. More... | |
bool | setStyleFromString (const std::string &_styleSheet) |
Set the global style sheet from a string. More... | |
void | setVerbosity (const unsigned int _verbosity) |
Set the verbosity level (from 0 to 4). More... | |
bool | stop () |
Stop the graphical interface. 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... | |
Enumeration Type Documentation
◆ DataRole
enum DataRole |
Data roles.
◆ FileType
enum FileType |
◆ NumberType
|
strong |
◆ StringType
|
strong |
Function Documentation
◆ addPluginPath()
void ignition::gui::addPluginPath | ( | const std::string & | _path | ) |
Add an path to look for plugins.
- Parameters
-
[in] _path Full path.
◆ addPluginsToWindow()
bool ignition::gui::addPluginsToWindow | ( | ) |
Add previously loaded plugins to the main window.
- Make sure the window is created first
- Be sure to call loadPlugin() for each plugin first
- Plugins previously added must be loaded again
- Returns
- True if successful
◆ applyConfig()
bool ignition::gui::applyConfig | ( | ) |
Apply previously loaded config to the main window.
- Make sure the window is created first
- Be sure to call loadConfig() for each plugin first
- Returns
- True if successful
◆ convert() [1/9]
QColor ignition::gui::convert | ( | const math::Color & | _color | ) |
Return the equivalent qt color.
- Parameters
-
[in] _color Ignition color to convert
- Returns
- Qt color value
◆ convert() [2/9]
math::Color ignition::gui::convert | ( | const QColor & | _color | ) |
Return the equivalent ignition color.
- Parameters
-
[in] _color Qt color to convert
- Returns
- Ignition color value
◆ convert() [3/9]
QPointF ignition::gui::convert | ( | const math::Vector2d & | _pt | ) |
◆ convert() [4/9]
math::Vector2d ignition::gui::convert | ( | const QPointF & | _pt | ) |
Return the equivalent ignition vector.
- Parameters
-
[in] _pt QPointF to convert
- Returns
- Ignition Vector2d.
◆ convert() [5/9]
QVector3D ignition::gui::convert | ( | const math::Vector3d & | _vec | ) |
Return the equivalent qt vector 3d.
- Parameters
-
[in] _vec Ignition vector 3d to convert.
- Returns
- Qt vector 3d value.
◆ convert() [6/9]
math::Vector3d ignition::gui::convert | ( | const QVector3D & | _vec | ) |
Return the equivalent ignition vector 3d.
- Parameters
-
[in] _vec Qt vector 3d to convert.
- Returns
- Ignition vector 3d value
◆ convert() [7/9]
common::MouseEvent ignition::gui::convert | ( | const QMouseEvent & | _e | ) |
Return the equivalent ignition mouse event.
Note that there isn't a 1-1 mapping between these types, so fields such as common::MouseEvent::PressPos need to be set afterwards.
- Parameters
-
[in] _e Qt mouse event
- Returns
- Ignition mouse event
◆ convert() [8/9]
common::Time ignition::gui::convert | ( | const msgs::Time & | _t | ) |
Convert an ignition::msgs::Time to an ignition::common::Time.
- Parameters
-
[in] _t The time to convert
- Returns
- An ignition::common::Time object
◆ convert() [9/9]
msgs::Time ignition::gui::convert | ( | const common::Time & | _t | ) |
Convert an ignition::common::Time to an ignition::msgs::Time.
- Parameters
-
[in] _t The time to convert
- Returns
- An ignition::msgs::Time object
◆ createMainWindow()
bool ignition::gui::createMainWindow | ( | ) |
Run previously loaded plugins on a single main window. An empty window will be created if no plugins have been loaded.
- Returns
- True if successful
◆ defaultConfigPath()
std::string ignition::gui::defaultConfigPath | ( | ) |
Get the location of the default configuration file.
- Returns
- The default configuration path.
◆ dialogs()
std::vector<Dialog *> ignition::gui::dialogs | ( | ) |
Get the dialogs, if they have been generated.
◆ findFirstByProperty()
Returns the first element on a QList which matches the given property.
- Parameters
-
[in] _list The list to search through. [in] _key The property key value. [in] _value The property value.
- Returns
- The first matching element.
◆ getPluginList()
std::vector<std::pair<std::string, std::vector<std::string> > > ignition::gui::getPluginList | ( | ) |
Get the list of available plugins, organized by path. The paths are given in the following order:
- Paths given by the environment variable
- Paths added by calling addPluginPath
- Path ~/.ignition/gui/plugins
- The path where Ignition GUI plugins are installed
- Returns
- A vector of pairs, where each pair contains:
- A path
- A vector of plugins in that path
◆ humanReadable()
std::string ignition::gui::humanReadable | ( | const std::string & | _key | ) |
Create a human readable key, capitalizing the first letter and removing characters like "_".
- Parameters
-
[in] _key Non-human-readable key.
- Returns
- Human-readable key.
◆ initApp()
bool ignition::gui::initApp | ( | ) |
Initialize the application. This must be run before everything else.
- Returns
- True on success.
◆ listPlugins()
void ignition::gui::listPlugins | ( | ) |
Print the available plugins, organized by path.
◆ loadConfig()
bool ignition::gui::loadConfig | ( | const std::string & | _config | ) |
Load plugins from a configuration file.
- Parameters
-
[in] _config Path to configuration file.
- Returns
- True if successful
◆ loadDefaultConfig()
bool ignition::gui::loadDefaultConfig | ( | ) |
Load the configuration from the default config file.
- Returns
- True if successful
◆ loadPlugin()
bool ignition::gui::loadPlugin | ( | const std::string & | _filename, |
const tinyxml2::XMLElement * | _pluginElem = nullptr |
||
) |
Load a plugin from a file name. The plugin file must be in the path.
- Parameters
-
[in] _filename Plugin filename. [in] _pluginElem Element containing plugin configuration
- Returns
- True if successful
◆ mainWindow()
MainWindow* ignition::gui::mainWindow | ( | ) |
Get the main window, if one has been generated. Use this to customize the window before running it.
◆ rangeFromKey()
void ignition::gui::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.
- Parameters
-
[in] _key The key. [out] _min The minimum value. [out] _max The maximum value.
◆ runConfig()
bool ignition::gui::runConfig | ( | const std::string & | _config | ) |
Run a main window using the given configuration file. This is the main entry point for the command line tool "ign gui -c".
- Parameters
-
[in] _config Full path to configuration file.
- Returns
- True if successful
◆ runDialogs()
bool ignition::gui::runDialogs | ( | ) |
Run previously loaded plugins as individual dialogs. This has no effect if no plugins have been loaded.
- Returns
- True if successful
◆ runEmptyWindow()
bool ignition::gui::runEmptyWindow | ( | ) |
Run an empty window.
- Returns
- True if successful
◆ runMainWindow()
bool ignition::gui::runMainWindow | ( | ) |
Run previously created window.
- Returns
- True if successful
◆ runStandalone()
bool ignition::gui::runStandalone | ( | const std::string & | _filename | ) |
Run a given plugin as a standalone window. This is the main entry point for the command line tool "ign gui -s".
- Parameters
-
[in] _filename Plugin file name. The file must be in the path.
- Returns
- True if successful
◆ setDefaultConfigPath()
void ignition::gui::setDefaultConfigPath | ( | const std::string & | _path | ) |
Specifies the location of the default configuration file. This is the file that stores the user settings when pressing "Save configuration".
- Parameters
-
[in] _path The default configuration full path including filename.
- See also
- loadDefaultConfig
- defaultConfigPath
◆ setPluginPathEnv()
void ignition::gui::setPluginPathEnv | ( | const std::string & | _env | ) |
Set the environment variable which defines the paths to look for plugins.
- Parameters
-
[in] _env Name of environment variable.
◆ setStyleFromFile()
bool ignition::gui::setStyleFromFile | ( | const std::string & | _qssFile | ) |
Set the global style sheet from a file.
- Parameters
-
[in] _qssFile Path to QSS file. Use :/style.qss
for Ignition GUI's default style sheet.
- See also
- setStyleFromString
◆ setStyleFromString()
bool ignition::gui::setStyleFromString | ( | const std::string & | _styleSheet | ) |
Set the global style sheet from a string.
- Parameters
-
[in] _styleSheet Style sheet in QSS format. Pass an empty string to use Qt's default style.
- Returns
- True if successful.
- See also
- setStyleFromFile
◆ setVerbosity()
void ignition::gui::setVerbosity | ( | const unsigned int | _verbosity | ) |
Set the verbosity level (from 0 to 4).
◆ stop()
bool ignition::gui::stop | ( | ) |
Stop the graphical interface.
- Returns
- True if successful
◆ stringTypeFromKey()
StringType ignition::gui::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.
- Parameters
-
[in] _key The key.
- Returns
- The string type.
◆ uniqueFilePath()
std::string ignition::gui::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), ...)
- Parameters
-
[in] _pathAndName Full absolute path and file name up to the file extension. [in] _extension File extension, such as "pdf".
- Returns
- Full path, with name and extension, which doesn't collide with existing files
◆ unitFromKey()
std::string ignition::gui::unitFromKey | ( | const std::string & | _key, |
const std::string & | _type = "" |
||
) |
Returns the unit for a given key. For example, the key "mass" returns "kg".
- Parameters
-
[in] _key The key. [in] _type In case the key may have more than one type, the type must be given too. For example, a prismatic joint will have different units from a revolute joint.
- Returns
- The unit.