An Gazebo GUI application loads a QML engine and provides an API to load plugins and configuration files. The application supports either running a single main window or several plugins as standalone dialogs.
More...
#include <Application.hh>
An Gazebo GUI application loads a QML engine and provides an API to load plugins and configuration files. The application supports either running a single main window or several plugins as standalone dialogs.
◆ Application()
Constructor.
- Parameters
-
[in] | _argc | Argument count. |
[in] | _argv | Argument values. |
[in] | _type | Window type, by default it's a main window. |
◆ ~Application()
◆ AddPluginPath()
Add an path to look for plugins.
- Parameters
-
◆ CreateMainWindow()
bool CreateMainWindow |
( |
| ) |
|
Create a main window. Just calls InitializeMainWindow.
- Returns
- True if successful
- See also
- InitializeMainWindow
◆ DefaultConfigPath()
◆ Engine()
QQmlApplicationEngine* Engine |
( |
| ) |
const |
Get the QML engine.
- Returns
- Pointer to QML engine
◆ LoadConfig()
Load a configuration file, which includes window configurations and plugins. This function doesn't instantiate the plugins, it just keeps them in memory and they can be applied later by either instantiating a window or several dialogs. and plugins.
- Parameters
-
[in] | _path | Full path to configuration file. |
- Returns
- True if successful
- See also
- InitializeMainWindow
-
InitializeDialogs
◆ LoadDefaultConfig()
bool LoadDefaultConfig |
( |
| ) |
|
◆ LoadPlugin()
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. If a window has been initialized, the plugin is added to the window. Otherwise, the plugin is stored and can be later added to a window or dialog.
- Parameters
-
[in] | _filename | Plugin filename. |
[in] | _pluginElem | Element containing plugin configuration |
- Returns
- True if successful
- See also
- LoadConfig
-
AddPluginsToWindow
◆ OnPluginClose
Callback when user requests to close a plugin.
◆ PluginAdded
void PluginAdded |
( |
const QString & |
_objectName | ) |
|
|
signal |
Notify that a plugin has been added.
- Parameters
-
[in] | _objectName | Plugin's object name. |
◆ PluginByName()
Get a plugin by its unique name.
- Parameters
-
[in] | _pluginName | Plugn instance's unique name. This is the plugin card's object name. |
- Returns
- Pointer to plugin object, null if not found.
◆ PluginList()
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 Gazebo GUI plugins are installed
- Returns
- A vector of pairs, where each pair contains:
- A path
- A vector of plugins in that path
◆ RemovePlugin()
Remove plugin by name. The plugin is removed from the application and its shared library unloaded if this was its last instance.
- Parameters
-
[in] | _pluginName | Plugn instance's unique name. This is the plugin card's object name. |
- Returns
- True if successful
◆ SetDefaultConfigPath()
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()
Set the environment variable which defines the paths to look for plugins.
- Parameters
-
[in] | _env | Name of environment variable. |
The documentation for this class was generated from the following file: